From d1cd945b79e967aac91481b2e22bb3a460ed5141 Mon Sep 17 00:00:00 2001 From: Jason Dobry Date: Sun, 22 Jan 2017 12:42:20 -0800 Subject: [PATCH] Add new Monitoring snippets. --- monitoring/README.md | 51 ++ monitoring/metrics.js | 550 ++++++++++++++ monitoring/package.json | 6 +- monitoring/quickstart.js | 71 ++ monitoring/system-test/metrics.test.js | 179 +++++ monitoring/system-test/quickstart.test.js | 57 ++ monitoring/yarn.lock | 853 +++++++++++++++++++++- package.json | 2 +- yarn.lock | 22 +- 9 files changed, 1767 insertions(+), 24 deletions(-) create mode 100644 monitoring/metrics.js create mode 100644 monitoring/quickstart.js create mode 100644 monitoring/system-test/metrics.test.js create mode 100644 monitoring/system-test/quickstart.test.js diff --git a/monitoring/README.md b/monitoring/README.md index 445f9ede86..aeebd85a64 100644 --- a/monitoring/README.md +++ b/monitoring/README.md @@ -28,6 +28,57 @@ including Cassandra, Nginx, Apache Web Server, Elasticsearch and many others. ## Samples +### Metrics + +View the [documentation][metrics_docs] or the [source code][metrics_code]. + +__Usage:__ `node metrics.js --help` + +``` +Commands: + create [projectId] Creates an example 'custom.googleapis.com/stores/daily_sales' custom metric + descriptor. + list [projectId] Lists metric descriptors. + get [projectId] Get a metric descriptor. + delete [projectId] Deletes a custom metric descriptor. + write [projectId] Writes example time series data to + 'custom.googleapis.com/stores/daily_sales'. + read [projectId] Reads time series data that matches the given filter. + read-fields [projectId] Reads headers of time series data that matches + 'compute.googleapis.com/instance/cpu/utilization'. + read-aggregate [projectId] Aggregates time series data that matches + 'compute.googleapis.com/instance/cpu/utilization'. + read-reduce [projectId] Reduces time series data that matches + 'compute.googleapis.com/instance/cpu/utilization'. + list-resources [projectId] Lists monitored resource descriptors. + get-resource [projectId] Get a monitored resource descriptor. + +Options: + --help Show help [boolean] + --projectId, -p [string] + +Examples: + node metrics.js create + node metrics.js list + node metrics.js get logging.googleapis.com/log_entry_count + node metrics.js delete + custom.googleapis.com/stores/daily_sales + node metrics.js list-resources + node metrics.js get-resource cloudsql_database + node metrics.js write + node metrics.js read + 'metric.type="compute.googleapis.com/instance/cpu/utilizatio + n"' + node metrics.js read-fields + node metrics.js read-aggregate + node metrics.js read-reduce + +For more information, see https://cloud.google.com/monitoring/docs +``` + +[metrics_docs]: https://cloud.google.com/monitoring/docs +[metrics_code]: metrics.js + ### List resources `list_resources.js` is a command-line program to demonstrate connecting to the Google diff --git a/monitoring/metrics.js b/monitoring/metrics.js new file mode 100644 index 0000000000..33cf7dabc7 --- /dev/null +++ b/monitoring/metrics.js @@ -0,0 +1,550 @@ +/** + * 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. + */ + +/** + * This application demonstrates how to perform basic operations on metrics with + * the Google Stackdriver Monitoring API. + * + * For more information, see the README.md under /monitoring and the + * documentation at https://cloud.google.com/monitoring/docs. + */ + +'use strict'; + +function createMetricDescriptor (projectId) { + // [START monitoring_create_metric] + // Imports the Google Cloud client library + const Monitoring = require('@google-cloud/monitoring'); + + // Instantiates a client + const client = Monitoring.v3().metricServiceClient(); + + // The Google Cloud Platform project on which to execute the request + // const projectId = 'YOUR_PROJECT_ID'; + + const request = { + name: client.projectPath(projectId), + metricDescriptor: { + description: 'Daily sales records from all branch stores.', + displayName: 'Daily Sales', + type: 'custom.googleapis.com/stores/daily_sales', + metricKind: 'GAUGE', + valueType: 'DOUBLE', + unit: '{USD}', + labels: [ + { + key: 'store_id', + valueType: 'STRING', + description: 'The ID of the store.' + } + ] + } + }; + + // Creates a custom metric descriptor + client.createMetricDescriptor(request) + .then((results) => { + const descriptor = results[0]; + + console.log('Created custom Metric:\n'); + console.log(`Name: ${descriptor.displayName}`); + console.log(`Description: ${descriptor.description}`); + console.log(`Type: ${descriptor.type}`); + console.log(`Kind: ${descriptor.metricKind}`); + console.log(`Value Type: ${descriptor.valueType}`); + console.log(`Unit: ${descriptor.unit}`); + console.log('Labels:'); + descriptor.labels.forEach((label) => { + console.log(` ${label.key} (${label.valueType}) - ${label.description}`); + }); + }); + // [END monitoring_create_metric] +} + +function listMetricDescriptors (projectId) { + // [START monitoring_list_descriptors] + // Imports the Google Cloud client library + const Monitoring = require('@google-cloud/monitoring'); + + // Instantiates a client + const client = Monitoring.v3().metricServiceClient(); + + // The Google Cloud Platform project on which to execute the request + // const projectId = 'YOUR_PROJECT_ID'; + + const request = { + name: client.projectPath(projectId) + }; + + // Lists metric descriptors + client.listMetricDescriptors(request) + .then((results) => { + const descriptors = results[0]; + + console.log('Metric Descriptors:'); + descriptors.forEach((descriptor) => console.log(descriptor.name)); + }); + // [END monitoring_list_descriptors] +} + +function getMetricDescriptor (projectId, metricId) { + // [START monitoring_get_descriptor] + // Imports the Google Cloud client library + const Monitoring = require('@google-cloud/monitoring'); + + // Instantiates a client + const client = Monitoring.v3().metricServiceClient(); + + // The Google Cloud Platform project on which to execute the request + // const projectId = 'YOUR_PROJECT_ID'; + + // An example of "metricId" is "logging.googleapis.com/log_entry_count" + // const metricId = 'some/metric/id'; + + const request = { + name: client.metricDescriptorPath(projectId, metricId) + }; + + // Retrieves a metric descriptor + client.getMetricDescriptor(request) + .then((results) => { + const descriptor = results[0]; + + console.log(`Name: ${descriptor.displayName}`); + console.log(`Description: ${descriptor.description}`); + console.log(`Type: ${descriptor.type}`); + console.log(`Kind: ${descriptor.metricKind}`); + console.log(`Value Type: ${descriptor.valueType}`); + console.log(`Unit: ${descriptor.unit}`); + console.log('Labels:'); + descriptor.labels.forEach((label) => { + console.log(` ${label.key} (${label.valueType}) - ${label.description}`); + }); + }); + // [END monitoring_get_descriptor] +} + +function deleteMetricDescriptor (projectId, metricId) { + // [START monitoring_delete_metric] + // Imports the Google Cloud client library + const Monitoring = require('@google-cloud/monitoring'); + + // Instantiates a client + const client = Monitoring.v3().metricServiceClient(); + + // The Google Cloud Platform project on which to execute the request + // const projectId = 'YOUR_PROJECT_ID'; + + // The ID of the Metric Descriptor to delete, e.g. + // const metricId = 'custom.googleapis.com/stores/daily_sales'; + + const request = { + name: client.metricDescriptorPath(projectId, metricId) + }; + + // Deletes a metric descriptor + client.deleteMetricDescriptor(request) + .then((results) => { + console.log(`Deleted ${metricId}`); + }); + // [END monitoring_delete_metric] +} + +function writeTimeSeriesData (projectId, metricId) { + // [START monitoring_write_timeseries] + // Imports the Google Cloud client library + const Monitoring = require('@google-cloud/monitoring'); + + // Instantiates a client + const client = Monitoring.v3().metricServiceClient(); + + // The Google Cloud Platform project on which to execute the request + // const projectId = 'YOUR_PROJECT_ID'; + + const dataPoint = { + interval: { + endTime: { + seconds: Date.now() / 1000 + } + }, + value: { + doubleValue: 123.45 + } + }; + + const timeSeriesData = { + metric: { + type: 'custom.googleapis.com/stores/daily_sales', + labels: { + store_id: 'Pittsburgh' + } + }, + resource: { + type: 'global', + labels: { + project_id: projectId + } + }, + points: [ + dataPoint + ] + }; + + const request = { + name: client.projectPath(projectId), + timeSeries: [ + timeSeriesData + ] + }; + + // Writes time series data + client.createTimeSeries(request) + .then((results) => { + console.log(`Done writing time series data.`); + }); + // [END monitoring_write_timeseries] +} + +function readTimeSeriesData (projectId, filter) { + // [START monitoring_read_timeseries_simple] + // Imports the Google Cloud client library + const Monitoring = require('@google-cloud/monitoring'); + + // Instantiates a client + const client = Monitoring.v3().metricServiceClient(); + + // The Google Cloud Platform project on which to execute the request + // const projectId = 'YOUR_PROJECT_ID'; + + // An example "filter" is 'metric.type="compute.googleapis.com/instance/cpu/utilization"' + // const filter = 'metric.type="compute.googleapis.com/instance/cpu/utilization"'; + + const request = { + name: client.projectPath(projectId), + filter: filter, + interval: { + startTime: { + // Limit results to the last 20 minutes + seconds: (Date.now() / 1000) - (60 * 20) + }, + endTime: { + seconds: Date.now() / 1000 + } + } + }; + + // Writes time series data + client.listTimeSeries(request) + .then((results) => { + const timeSeries = results[0]; + + timeSeries.forEach((data) => { + console.log(`${data.metric.labels.instance_name}:`); + data.points.forEach((point) => { + console.log(JSON.stringify(point.value)); + }); + }); + }); + // [END monitoring_read_timeseries_simple] +} + +function readTimeSeriesFields (projectId) { + // [START monitoring_read_timeseries_fields] + // Imports the Google Cloud client library + const Monitoring = require('@google-cloud/monitoring'); + + // Instantiates a client + const client = Monitoring.v3().metricServiceClient(); + + // The Google Cloud Platform project on which to execute the request + // const projectId = 'YOUR_PROJECT_ID'; + + const request = { + name: client.projectPath(projectId), + filter: 'metric.type="compute.googleapis.com/instance/cpu/utilization"', + interval: { + startTime: { + // Limit results to the last 20 minutes + seconds: (Date.now() / 1000) - (60 * 20) + }, + endTime: { + seconds: Date.now() / 1000 + } + }, + // Don't return time series data, instead just return information about + // the metrics that match the filter + view: 'HEADERS' + }; + + // Writes time series data + client.listTimeSeries(request) + .then((results) => { + const timeSeries = results[0]; + + console.log('Found data points for the following instances:'); + timeSeries.forEach((data) => { + console.log(data.metric.labels.instance_name); + }); + }); + // [END monitoring_read_timeseries_fields] +} + +function readTimeSeriesAggregate (projectId) { + // [START monitoring_read_timeseries_align] + // Imports the Google Cloud client library + const Monitoring = require('@google-cloud/monitoring'); + + // Instantiates a client + const client = Monitoring.v3().metricServiceClient(); + + // The Google Cloud Platform project on which to execute the request + // const projectId = 'YOUR_PROJECT_ID'; + + const request = { + name: client.projectPath(projectId), + filter: 'metric.type="compute.googleapis.com/instance/cpu/utilization"', + interval: { + startTime: { + // Limit results to the last 20 minutes + seconds: (Date.now() / 1000) - (60 * 20) + }, + endTime: { + seconds: Date.now() / 1000 + } + }, + // Aggregate results per matching instance + aggregation: { + alignmentPeriod: { + seconds: 600 + }, + perSeriesAligner: 'ALIGN_MEAN' + } + }; + + // Writes time series data + client.listTimeSeries(request) + .then((results) => { + const timeSeries = results[0]; + + console.log('CPU utilization:'); + timeSeries.forEach((data) => { + console.log(data.metric.labels.instance_name); + console.log(` Now: ${data.points[0].value.doubleValue}`); + console.log(` 10 min ago: ${data.points[1].value.doubleValue}`); + }); + }); + // [END monitoring_read_timeseries_align] +} + +function readTimeSeriesReduce (projectId) { + // [START monitoring_read_timeseries_reduce] + // Imports the Google Cloud client library + const Monitoring = require('@google-cloud/monitoring'); + + // Instantiates a client + const client = Monitoring.v3().metricServiceClient(); + + // The Google Cloud Platform project on which to execute the request + // const projectId = 'YOUR_PROJECT_ID'; + + const request = { + name: client.projectPath(projectId), + filter: 'metric.type="compute.googleapis.com/instance/cpu/utilization"', + interval: { + startTime: { + // Limit results to the last 20 minutes + seconds: (Date.now() / 1000) - (60 * 20) + }, + endTime: { + seconds: Date.now() / 1000 + } + }, + // Aggregate results per matching instance + aggregation: { + alignmentPeriod: { + seconds: 600 + }, + crossSeriesReducer: 'REDUCE_MEAN', + perSeriesAligner: 'ALIGN_MEAN' + } + }; + + // Writes time series data + client.listTimeSeries(request) + .then((results) => { + const reductions = results[0][0].points; + + console.log('Average CPU utilization across all GCE instances:'); + console.log(` Last 10 min: ${reductions[0].value.doubleValue}`); + console.log(` 10-20 min ago: ${reductions[0].value.doubleValue}`); + }); + // [END monitoring_read_timeseries_reduce] +} + +function listMonitoredResourceDescriptors (projectId) { + // [START monitoring_list_resources] + // Imports the Google Cloud client library + const Monitoring = require('@google-cloud/monitoring'); + + // Instantiates a client + const client = Monitoring.v3().metricServiceClient(); + + // The Google Cloud Platform project on which to execute the request + // const projectId = 'YOUR_PROJECT_ID'; + + const request = { + name: client.projectPath(projectId) + }; + + // Lists monitored resource descriptors + client.listMonitoredResourceDescriptors(request) + .then((results) => { + const descriptors = results[0]; + + console.log('Monitored Resource Descriptors:'); + descriptors.forEach((descriptor) => console.log(descriptor.name)); + }); + // [END monitoring_list_resources] +} + +function getMonitoredResourceDescriptor (projectId, resourceType) { + // [START monitoring_get_resource] + // Imports the Google Cloud client library + const Monitoring = require('@google-cloud/monitoring'); + + // Instantiates a client + const client = Monitoring.v3().metricServiceClient(); + + // The Google Cloud Platform project on which to execute the request + // const projectId = 'YOUR_PROJECT_ID'; + + // "resourceType" should be a predefined type, such as "cloudsql_database" + // const resourceType = 'some_resource_type'; + + const request = { + name: client.monitoredResourceDescriptorPath(projectId, resourceType) + }; + + // Lists monitored resource descriptors + client.getMonitoredResourceDescriptor(request) + .then((results) => { + const descriptor = results[0]; + + console.log(`Name: ${descriptor.displayName}`); + console.log(`Description: ${descriptor.description}`); + console.log(`Type: ${descriptor.type}`); + console.log('Labels:'); + descriptor.labels.forEach((label) => { + console.log(` ${label.key} (${label.valueType}) - ${label.description}`); + }); + }); + // [END monitoring_get_resource] +} + +const cli = require(`yargs`) + .demand(1) + .command( + `create [projectId]`, + `Creates an example 'custom.googleapis.com/stores/daily_sales' custom metric descriptor.`, + {}, + (opts) => createMetricDescriptor(opts.projectId) + ) + .command( + `list [projectId]`, + `Lists metric descriptors.`, + {}, + (opts) => listMetricDescriptors(opts.projectId) + ) + .command( + `get [projectId]`, + `Get a metric descriptor.`, + {}, + (opts) => getMetricDescriptor(opts.projectId, opts.metricId) + ) + .command( + `delete [projectId]`, + `Deletes a custom metric descriptor.`, + {}, + (opts) => deleteMetricDescriptor(opts.projectId, opts.metricId) + ) + .command( + `write [projectId]`, + `Writes example time series data to 'custom.googleapis.com/stores/daily_sales'.`, + {}, + (opts) => writeTimeSeriesData(opts.projectId) + ) + .command( + `read [projectId]`, + `Reads time series data that matches the given filter.`, + {}, + (opts) => readTimeSeriesData(opts.projectId, opts.filter) + ) + .command( + `read-fields [projectId]`, + `Reads headers of time series data that matches 'compute.googleapis.com/instance/cpu/utilization'.`, + {}, + (opts) => readTimeSeriesFields(opts.projectId) + ) + .command( + `read-aggregate [projectId]`, + `Aggregates time series data that matches 'compute.googleapis.com/instance/cpu/utilization'.`, + {}, + (opts) => readTimeSeriesAggregate(opts.projectId) + ) + .command( + `read-reduce [projectId]`, + `Reduces time series data that matches 'compute.googleapis.com/instance/cpu/utilization'.`, + {}, + (opts) => readTimeSeriesReduce(opts.projectId) + ) + .command( + `list-resources [projectId]`, + `Lists monitored resource descriptors.`, + {}, + (opts) => listMonitoredResourceDescriptors(opts.projectId) + ) + .command( + `get-resource [projectId]`, + `Get a monitored resource descriptor.`, + {}, + (opts) => getMonitoredResourceDescriptor(opts.projectId, opts.resourceType) + ) + .options({ + projectId: { + alias: 'p', + default: process.env.GCLOUD_PROJECT, + global: true, + requiresArg: true, + type: 'string' + } + }) + .example(`node $0 create`) + .example(`node $0 list`) + .example(`node $0 get logging.googleapis.com/log_entry_count`) + .example(`node $0 delete custom.googleapis.com/stores/daily_sales`) + .example(`node $0 list-resources`) + .example(`node $0 get-resource cloudsql_database`) + .example(`node $0 write`) + .example(`node $0 read 'metric.type="compute.googleapis.com/instance/cpu/utilization"'`) + .example(`node $0 read-fields`) + .example(`node $0 read-aggregate`) + .example(`node $0 read-reduce`) + .wrap(120) + .recommendCommands() + .epilogue(`For more information, see https://cloud.google.com/monitoring/docs`); + +if (module === require.main) { + cli.help().strict().argv; +} diff --git a/monitoring/package.json b/monitoring/package.json index 66ce1a7845..15de3068d0 100644 --- a/monitoring/package.json +++ b/monitoring/package.json @@ -8,7 +8,9 @@ "test": "cd ..; npm run st -- --verbose monitoring/system-test/*.test.js" }, "dependencies": { - "async":"2.1.4", - "googleapis": "16.0.0" + "@google-cloud/monitoring": "0.1.4", + "async": "2.1.4", + "googleapis": "16.0.0", + "yargs": "6.6.0" } } diff --git a/monitoring/quickstart.js b/monitoring/quickstart.js new file mode 100644 index 0000000000..c743cc1856 --- /dev/null +++ b/monitoring/quickstart.js @@ -0,0 +1,71 @@ +/** + * 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'; + +// [START monitoring_quickstart] +// Imports the Google Cloud client library +const Monitoring = require('@google-cloud/monitoring'); + +// Your Google Cloud Platform project ID +const projectId = 'YOUR_PROJECT_ID'; + +// Instantiates a client +const client = Monitoring.v3().metricServiceClient(); + +// Prepares an individual data point +const dataPoint = { + interval: { + endTime: { + seconds: Date.now() / 1000 + } + }, + value: { + // The amount of sales + doubleValue: 123.45 + } +}; + +// Prepares the time series request +const request = { + name: client.projectPath(projectId), + timeSeries: [ + { + // Ties the data point to a custom metric + metric: { + type: 'custom.googleapis.com/stores/daily_sales', + labels: { + store_id: 'Pittsburgh' + } + }, + resource: { + type: 'global', + labels: { + project_id: projectId + } + }, + points: [ + dataPoint + ] + } + ] +}; + +// Writes time series data +client.createTimeSeries(request) + .then((results) => { + console.log(`Done writing time series data.`); + }); +// [END monitoring_quickstart] diff --git a/monitoring/system-test/metrics.test.js b/monitoring/system-test/metrics.test.js new file mode 100644 index 0000000000..0e2ea332ff --- /dev/null +++ b/monitoring/system-test/metrics.test.js @@ -0,0 +1,179 @@ +/** + * 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'; + +require(`../../system-test/_setup`); + +const client = require(`@google-cloud/monitoring`).v3().metricServiceClient(); +const path = require(`path`); + +const cmd = `node metrics.js`; +const cwd = path.join(__dirname, `..`); +const customMetricId = `custom.googleapis.com/stores/daily_sales`; +const computeMetricId = `compute.googleapis.com/instance/cpu/utilization`; +const filter = `metric.type="${computeMetricId}"`; +const projectId = process.env.GCLOUD_PROJECT; +const resourceId = `cloudsql_database`; + +test.beforeEach(stubConsole); +test.afterEach.always(restoreConsole); + +test.serial(`should create a metric descriptors`, async (t) => { + const output = await runAsync(`${cmd} create`, cwd); + t.true(output.includes(`Created custom Metric`)); + t.true(output.includes(`Type: ${customMetricId}`)); +}); + +test.serial(`should list metric descriptors, including the new custom one`, async (t) => { + await tryTest(async () => { + const output = await runAsync(`${cmd} list`, cwd); + t.true(output.includes(customMetricId)); + t.true(output.includes(computeMetricId)); + }).start(); +}); + +test.serial(`should get a metric descriptor`, async (t) => { + await tryTest(async () => { + const output = await runAsync(`${cmd} get ${customMetricId}`, cwd); + t.true(output.includes(`Type: ${customMetricId}`)); + }).start(); +}); + +test.serial(`should write time series data`, async (t) => { + const output = await runAsync(`${cmd} write`, cwd); + t.true(output.includes(`Done writing time series data.`)); +}); + +test.serial(`should delete a metric descriptor`, async (t) => { + const output = await runAsync(`${cmd} delete ${customMetricId}`, cwd); + t.true(output.includes(`Deleted ${customMetricId}`)); +}); + +test(`should list monitored resource descriptors`, async (t) => { + const output = await runAsync(`${cmd} list-resources`, cwd); + t.true(output.includes(`projects/${projectId}/monitoredResourceDescriptors/${resourceId}`)); +}); + +test(`should get a monitored resource descriptor`, async (t) => { + const output = await runAsync(`${cmd} get-resource ${resourceId}`, cwd); + t.true(output.includes(`Type: ${resourceId}`)); +}); + +test(`should read time series data`, async (t) => { + const [timeSeries] = await client.listTimeSeries({ + name: client.projectPath(projectId), + filter: filter, + interval: { + startTime: { + // Limit results to the last 20 minutes + seconds: (Date.now() / 1000) - (60 * 20) + }, + endTime: { + seconds: Date.now() / 1000 + } + } + }); + const output = await runAsync(`${cmd} read '${filter}'`, cwd); + timeSeries.forEach((data) => { + t.true(output.includes(`${data.metric.labels.instance_name}:`)); + data.points.forEach((point) => { + t.true(output.includes(JSON.stringify(point.value))); + }); + }); +}); + +test(`should read time series data fields`, async (t) => { + const [timeSeries] = await client.listTimeSeries({ + name: client.projectPath(projectId), + filter: filter, + interval: { + startTime: { + // Limit results to the last 20 minutes + seconds: (Date.now() / 1000) - (60 * 20) + }, + endTime: { + seconds: Date.now() / 1000 + } + }, + // Don't return time series data, instead just return information about + // the metrics that match the filter + view: `HEADERS` + }); + const output = await runAsync(`${cmd} read-fields`, cwd); + t.true(output.includes(`Found data points for the following instances:`)); + timeSeries.forEach((data) => { + t.true(output.includes(data.metric.labels.instance_name)); + }); +}); + +test(`should read time series data aggregated`, async (t) => { + const [timeSeries] = await client.listTimeSeries({ + name: client.projectPath(projectId), + filter: filter, + interval: { + startTime: { + // Limit results to the last 20 minutes + seconds: (Date.now() / 1000) - (60 * 20) + }, + endTime: { + seconds: Date.now() / 1000 + } + }, + // Aggregate results per matching instance + aggregation: { + alignmentPeriod: { + seconds: 600 + }, + perSeriesAligner: `ALIGN_MEAN` + } + }); + const output = await runAsync(`${cmd} read-aggregate`, cwd); + t.true(output.includes(`CPU utilization:`)); + timeSeries.forEach((data) => { + t.true(output.includes(data.metric.labels.instance_name)); + t.true(output.includes(` Now: ${data.points[0].value.doubleValue}`)); + t.true(output.includes(` 10 min ago: ${data.points[1].value.doubleValue}`)); + }); +}); + +test(`should read time series data reduced`, async (t) => { + const [timeSeries] = await client.listTimeSeries({ + name: client.projectPath(projectId), + filter: filter, + interval: { + startTime: { + // Limit results to the last 20 minutes + seconds: (Date.now() / 1000) - (60 * 20) + }, + endTime: { + seconds: Date.now() / 1000 + } + }, + // Aggregate results per matching instance + aggregation: { + alignmentPeriod: { + seconds: 600 + }, + crossSeriesReducer: `REDUCE_MEAN`, + perSeriesAligner: `ALIGN_MEAN` + } + }); + const reductions = timeSeries[0].points; + const output = await runAsync(`${cmd} read-reduce`, cwd); + t.true(output.includes(`Average CPU utilization across all GCE instances:`)); + t.true(output.includes(` Last 10 min: ${reductions[0].value.doubleValue}`)); + t.true(output.includes(` 10-20 min ago: ${reductions[0].value.doubleValue}`)); +}); diff --git a/monitoring/system-test/quickstart.test.js b/monitoring/system-test/quickstart.test.js new file mode 100644 index 0000000000..61f5f5c456 --- /dev/null +++ b/monitoring/system-test/quickstart.test.js @@ -0,0 +1,57 @@ +/** + * 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'; + +require(`../../system-test/_setup`); + +const proxyquire = require(`proxyquire`).noPreserveCache(); +const client = proxyquire(`@google-cloud/monitoring`, {}).v3().metricServiceClient(); + +test.beforeEach(stubConsole); +test.afterEach.always(restoreConsole); + +test.cb(`should list time series`, (t) => { + const clientMock = { + projectPath: (projectId) => client.projectPath(projectId), + createTimeSeries: (_request) => { + _request.name = client.projectPath(process.env.GCLOUD_PROJECT); + _request.timeSeries[0].resource.labels.project_id = process.env.GCLOUD_PROJECT; + + return client.createTimeSeries(_request) + .then((result) => { + setTimeout(() => { + try { + t.is(console.log.callCount, 1); + t.deepEqual(console.log.getCall(0).args, [`Done writing time series data.`]); + t.end(); + } catch (err) { + t.end(err); + } + }, 200); + + return result; + }); + } + }; + + proxyquire(`../quickstart`, { + '@google-cloud/monitoring': { + v3: sinon.stub().returns({ + metricServiceClient: sinon.stub().returns(clientMock) + }) + } + }); +}); diff --git a/monitoring/yarn.lock b/monitoring/yarn.lock index 5b4c30f9a0..90d58f38df 100644 --- a/monitoring/yarn.lock +++ b/monitoring/yarn.lock @@ -2,6 +2,18 @@ # yarn lockfile v1 +"@google-cloud/monitoring@0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@google-cloud/monitoring/-/monitoring-0.1.4.tgz#d2629045150289ae6eef385f68f6e1b93cce2967" + dependencies: + extend "^3.0.0" + google-gax "^0.10.0" + google-proto-files "^0.8.3" + +abbrev@1: + version "1.0.9" + resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.0.9.tgz#91b4792588a7738c25f35dd6f63752a2f8776135" + ansi-regex@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.0.0.tgz#c5061b6e0ef8a81775e50f5d66151bf6bf371107" @@ -10,6 +22,28 @@ ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" +aproba@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.0.4.tgz#2713680775e7614c8ba186c065d4e2e52d1072c0" + +are-we-there-yet@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.2.tgz#80e470e95a084794fe1899262c5667c6e88de1b3" + dependencies: + delegates "^1.0.0" + readable-stream "^2.0.0 || ^1.1.13" + +arguejs@^0.2.3: + version "0.2.3" + resolved "https://registry.yarnpkg.com/arguejs/-/arguejs-0.2.3.tgz#b6f939f5fe0e3cd1f3f93e2aa9262424bf312af7" + +ascli@~1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/ascli/-/ascli-1.0.1.tgz#bcfa5974a62f18e81cabaeb49732ab4a88f906bc" + dependencies: + colour "~0.7.1" + optjs "~3.2.2" + asn1@~0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.3.tgz#dac8787713c9966849fc8180777ebe9c1ddf3b86" @@ -22,12 +56,16 @@ assert-plus@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525" -async@2.1.4, async@~2.1.4: +async@2.1.4, async@^2.0.1, async@^2.1.2, async@~2.1.4: version "2.1.4" resolved "https://registry.yarnpkg.com/async/-/async-2.1.4.tgz#2d2160c7788032e4dd6cbe2502f1f9a2c8f6cde4" dependencies: lodash "^4.14.0" +async@~1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/async/-/async-1.4.2.tgz#6c9edcb11ced4f0dd2f2d40db0d49a109c088aab" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -40,26 +78,93 @@ aws4@^1.2.1: version "1.5.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.5.0.tgz#0a29ffb79c31c9e712eeb087e8e7a64b4a56d755" +balanced-match@^0.4.1: + version "0.4.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" + base64url@2.0.0, base64url@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/base64url/-/base64url-2.0.0.tgz#eac16e03ea1438eff9423d69baa36262ed1f70bb" +base64url@~0.0.4: + version "0.0.6" + resolved "https://registry.yarnpkg.com/base64url/-/base64url-0.0.6.tgz#9597b36b330db1c42477322ea87ea8027499b82b" + +base64url@~1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/base64url/-/base64url-1.0.6.tgz#d64d375d68a7c640d912e2358d170dca5bb54681" + dependencies: + concat-stream "~1.4.7" + meow "~2.0.0" + bcrypt-pbkdf@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.0.tgz#3ca76b85241c7170bf7d9703e7b9aa74630040d4" dependencies: tweetnacl "^0.14.3" +bl@~1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/bl/-/bl-1.1.2.tgz#fdca871a99713aa00d19e3bbba41c44787a65398" + dependencies: + readable-stream "~2.0.5" + +block-stream@*: + version "0.0.9" + resolved "https://registry.yarnpkg.com/block-stream/-/block-stream-0.0.9.tgz#13ebfe778a03205cfe03751481ebb4b3300c126a" + dependencies: + inherits "~2.0.0" + boom@2.x.x: version "2.10.1" resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f" dependencies: hoek "2.x.x" -buffer-equal-constant-time@1.0.1: +brace-expansion@^1.0.0: + version "1.1.6" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.6.tgz#7197d7eaa9b87e648390ea61fc66c84427420df9" + dependencies: + balanced-match "^0.4.1" + concat-map "0.0.1" + +buffer-equal-constant-time@1.0.1, buffer-equal-constant-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819" +buffer-shims@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/buffer-shims/-/buffer-shims-1.0.0.tgz#9978ce317388c649ad8793028c3477ef044a8b51" + +builtin-modules@^1.0.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/builtin-modules/-/builtin-modules-1.1.1.tgz#270f076c5a72c02f5b65a47df94c5fe3a278892f" + +bytebuffer@~5: + version "5.0.1" + resolved "https://registry.yarnpkg.com/bytebuffer/-/bytebuffer-5.0.1.tgz#582eea4b1a873b6d020a48d58df85f0bba6cfddd" + dependencies: + long "~3" + +camelcase-keys@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-1.0.0.tgz#bd1a11bf9b31a1ce493493a930de1a0baf4ad7ec" + dependencies: + camelcase "^1.0.1" + map-obj "^1.0.0" + +camelcase@^1.0.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" + +camelcase@^2.0.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f" + +camelcase@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a" + caseless@~0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.11.0.tgz#715b96ea9841593cc33067923f5ec60ebda4f7d7" @@ -74,6 +179,22 @@ chalk@^1.1.1: strip-ansi "^3.0.0" supports-color "^2.0.0" +cliui@^3.0.3, cliui@^3.2.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + wrap-ansi "^2.0.0" + +code-point-at@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" + +colour@~0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/colour/-/colour-0.7.1.tgz#9cb169917ec5d12c0736d3e8685746df1cadf778" + combined-stream@^1.0.5, combined-stream@~1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.5.tgz#938370a57b4a51dea2c77c15d5c5fdf895164009" @@ -86,6 +207,26 @@ commander@^2.9.0: dependencies: graceful-readlink ">= 1.0.0" +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + +concat-stream@~1.4.7: + version "1.4.10" + resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.4.10.tgz#acc3bbf5602cb8cc980c6ac840fa7d8603e3ef36" + dependencies: + inherits "~2.0.1" + readable-stream "~1.1.9" + typedarray "~0.0.5" + +console-control-strings@^1.0.0, console-control-strings@~1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e" + +core-util-is@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" + cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -98,28 +239,52 @@ dashdash@^1.12.0: dependencies: assert-plus "^1.0.0" +debug@~2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" + dependencies: + ms "0.7.1" + +decamelize@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" + +deep-extend@~0.4.0: + version "0.4.1" + resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.4.1.tgz#efe4113d08085f4e6f9687759810f807469e2253" + delayed-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619" +delegates@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" + ecc-jsbn@~0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz#0fc73a9ed5f0d53c38193398523ef7e543777505" dependencies: jsbn "~0.1.0" -ecdsa-sig-formatter@1.0.9: +ecdsa-sig-formatter@1.0.9, ecdsa-sig-formatter@^1.0.0: version "1.0.9" resolved "https://registry.yarnpkg.com/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.9.tgz#4bc926274ec3b5abb5016e7e1d60921ac262b2a1" dependencies: base64url "^2.0.0" safe-buffer "^5.0.1" +error-ex@^1.2.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/error-ex/-/error-ex-1.3.0.tgz#e67b43f3e82c96ea3a584ffee0b9fc3325d802d9" + dependencies: + is-arrayish "^0.2.1" + escape-string-regexp@^1.0.2: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" -extend@~3.0.0: +extend@^3.0.0, extend@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" @@ -127,10 +292,25 @@ extsprintf@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" +find-up@^1.0.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/find-up/-/find-up-1.1.2.tgz#6b2e9822b1a2ce0a60ab64d610eccad53cb24d0f" + dependencies: + path-exists "^2.0.0" + pinkie-promise "^2.0.0" + forever-agent@~0.6.1: version "0.6.1" resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" +form-data@~1.0.0-rc4: + version "1.0.1" + resolved "https://registry.yarnpkg.com/form-data/-/form-data-1.0.1.tgz#ae315db9a4907fa065502304a66d7733475ee37c" + dependencies: + async "^2.0.1" + combined-stream "^1.0.5" + mime-types "^2.1.11" + form-data@~2.1.1: version "2.1.2" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.2.tgz#89c3534008b97eada4cbb157d58f6f5df025eae4" @@ -139,6 +319,41 @@ form-data@~2.1.1: combined-stream "^1.0.5" mime-types "^2.1.12" +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + +fstream-ignore@~1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105" + dependencies: + fstream "^1.0.0" + inherits "2" + minimatch "^3.0.0" + +fstream@^1.0.0, fstream@^1.0.2, fstream@~1.0.10: + version "1.0.10" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.10.tgz#604e8a92fe26ffd9f6fae30399d4984e1ab22822" + dependencies: + graceful-fs "^4.1.2" + inherits "~2.0.0" + mkdirp ">=0.5 0" + rimraf "2" + +gauge@~2.7.1: + version "2.7.2" + resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.2.tgz#15cecc31b02d05345a5d6b0e171cdb3ad2307774" + dependencies: + aproba "^1.0.3" + console-control-strings "^1.0.0" + has-unicode "^2.0.0" + object-assign "^4.1.0" + signal-exit "^3.0.0" + string-width "^1.0.1" + strip-ansi "^3.0.1" + supports-color "^0.2.0" + wide-align "^1.1.0" + generate-function@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/generate-function/-/generate-function-2.0.0.tgz#6858fe7c0969b7d4e9093337647ac79f60dfbe74" @@ -149,12 +364,52 @@ generate-object-property@^1.1.0: dependencies: is-property "^1.0.0" +get-caller-file@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5" + +get-stdin@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" + getpass@^0.1.1: version "0.1.6" resolved "https://registry.yarnpkg.com/getpass/-/getpass-0.1.6.tgz#283ffd9fc1256840875311c1b60e8c40187110e6" dependencies: assert-plus "^1.0.0" +glob@^5.0.10: + version "5.0.15" + resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" + dependencies: + inflight "^1.0.4" + inherits "2" + minimatch "2 || 3" + once "^1.3.0" + path-is-absolute "^1.0.0" + +glob@^7.0.5: + version "7.1.1" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.1.tgz#805211df04faaf1c63a3600306cdf5ade50b2ec8" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.2" + once "^1.3.0" + path-is-absolute "^1.0.0" + +google-auth-library@^0.9.10: + version "0.9.10" + resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.9.10.tgz#4993dc07bb4834b8ca0350213a6873a32c6051b9" + dependencies: + async "~1.4.2" + gtoken "^1.1.0" + jws "~3.0.0" + lodash.noop "~3.0.0" + request "~2.74.0" + string-template "~0.2.0" + google-auth-library@~0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/google-auth-library/-/google-auth-library-0.10.0.tgz#6e15babee85fd1dd14d8d128a295b6838d52136e" @@ -164,12 +419,37 @@ google-auth-library@~0.10.0: lodash.noop "^3.0.1" request "^2.74.0" +google-auto-auth@^0.5.2: + version "0.5.2" + resolved "https://registry.yarnpkg.com/google-auto-auth/-/google-auto-auth-0.5.2.tgz#4c9f38574e69fb55a3c516ab0415e9fa33e67602" + dependencies: + async "^2.1.2" + google-auth-library "^0.9.10" + object-assign "^3.0.0" + request "^2.79.0" + +google-gax@^0.10.0: + version "0.10.6" + resolved "https://registry.yarnpkg.com/google-gax/-/google-gax-0.10.6.tgz#3af119704700fd212df6b9250e4b4a61676b3f96" + dependencies: + extend "^3.0.0" + google-auto-auth "^0.5.2" + google-proto-files "^0.8.3" + grpc "~1.0" + lodash "^4.17.2" + process-nextick-args "^1.0.7" + readable-stream "^2.2.2" + google-p12-pem@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/google-p12-pem/-/google-p12-pem-0.1.1.tgz#66ef8946ee97e8da37f1beb1d8ec5c3be2ba4539" dependencies: node-forge "^0.6.46" +google-proto-files@^0.8.3: + version "0.8.6" + resolved "https://registry.yarnpkg.com/google-proto-files/-/google-proto-files-0.8.6.tgz#a7c8ddccd2179690d270b0ebfc42994d56da0ee6" + googleapis@16.0.0: version "16.0.0" resolved "https://registry.yarnpkg.com/googleapis/-/googleapis-16.0.0.tgz#037fb52d604ca5bfb91bb20979f3eed36af06dc3" @@ -178,11 +458,25 @@ googleapis@16.0.0: google-auth-library "~0.10.0" string-template "~1.0.0" +graceful-fs@^4.1.2: + version "4.1.11" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" + "graceful-readlink@>= 1.0.0": version "1.0.1" resolved "https://registry.yarnpkg.com/graceful-readlink/-/graceful-readlink-1.0.1.tgz#4cafad76bc62f02fa039b2f94e9a3dd3a391a725" -gtoken@^1.2.1: +grpc@~1.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/grpc/-/grpc-1.0.1.tgz#e965544b5e56c998058102184e2ab1f27f123afd" + dependencies: + arguejs "^0.2.3" + lodash "^4.15.0" + nan "^2.0.0" + node-pre-gyp "^0.6.0" + protobufjs "^5.0.0" + +gtoken@^1.1.0, gtoken@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/gtoken/-/gtoken-1.2.1.tgz#90153a547c2fc1cd24a4d3d2ab3b5aba0a26897a" dependencies: @@ -206,6 +500,10 @@ has-ansi@^2.0.0: dependencies: ansi-regex "^2.0.0" +has-unicode@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" + hawk@~3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4" @@ -219,6 +517,10 @@ hoek@2.x.x: version "2.16.3" resolved "https://registry.yarnpkg.com/hoek/-/hoek-2.16.3.tgz#20bb7403d3cea398e91dc4710a8ff1b8274a25ed" +hosted-git-info@^2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.1.5.tgz#0ba81d90da2e25ab34a332e6ec77936e1598118b" + http-signature@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf" @@ -227,6 +529,55 @@ http-signature@~1.1.0: jsprim "^1.2.2" sshpk "^1.7.0" +indent-string@^1.1.0: + version "1.2.2" + resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-1.2.2.tgz#db99bcc583eb6abbb1e48dcbb1999a986041cb6b" + dependencies: + get-stdin "^4.0.1" + minimist "^1.1.0" + repeating "^1.1.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2, inherits@~2.0.0, inherits@~2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" + +ini@~1.3.0: + version "1.3.4" + resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" + +invert-kv@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" + +is-arrayish@^0.2.1: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" + +is-builtin-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-1.0.0.tgz#540572d34f7ac3119f8f76c30cbc1b1e037affbe" + dependencies: + builtin-modules "^1.0.0" + +is-finite@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-finite/-/is-finite-1.0.2.tgz#cc6677695602be550ef11e8b4aa6305342b6d0aa" + dependencies: + number-is-nan "^1.0.0" + +is-fullwidth-code-point@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz#ef9e31386f031a7f0d643af82fde50c457ef00cb" + dependencies: + number-is-nan "^1.0.0" + is-my-json-valid@^2.12.4: version "2.15.0" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.15.0.tgz#936edda3ca3c211fd98f3b2d3e08da43f7b2915b" @@ -244,6 +595,18 @@ is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" +is-utf8@^0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/is-utf8/-/is-utf8-0.2.1.tgz#4b0da1442104d1b336340e80797e865cf39f7d72" + +isarray@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" + +isarray@~1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" + isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -287,6 +650,14 @@ jwa@^1.1.4: ecdsa-sig-formatter "1.0.9" safe-buffer "^5.0.1" +jwa@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/jwa/-/jwa-1.0.2.tgz#fd79609f1e772e299dce8ddb76d00659dd83511f" + dependencies: + base64url "~0.0.4" + buffer-equal-constant-time "^1.0.1" + ecdsa-sig-formatter "^1.0.0" + jws@^3.0.0, jws@^3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.4.tgz#f9e8b9338e8a847277d6444b1464f61880e050a2" @@ -295,19 +666,59 @@ jws@^3.0.0, jws@^3.1.4: jwa "^1.1.4" safe-buffer "^5.0.1" -lodash.noop@^3.0.1: +jws@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.0.0.tgz#da5f267897dd4e9cf8137979db33fc54a3c05418" + dependencies: + base64url "~1.0.4" + jwa "~1.0.0" + +lcid@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-1.0.0.tgz#308accafa0bc483a3867b4b6f2b9506251d1b835" + dependencies: + invert-kv "^1.0.0" + +load-json-file@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-1.1.0.tgz#956905708d58b4bab4c2261b04f59f31c99374c0" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + pinkie-promise "^2.0.0" + strip-bom "^2.0.0" + +lodash.noop@^3.0.1, lodash.noop@~3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/lodash.noop/-/lodash.noop-3.0.1.tgz#38188f4d650a3a474258439b96ec45b32617133c" -lodash@^4.14.0: +lodash@^4.14.0, lodash@^4.15.0, lodash@^4.17.2: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" +long@~3: + version "3.2.0" + resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" + +map-obj@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/map-obj/-/map-obj-1.0.1.tgz#d933ceb9205d82bdcf4886f6742bdc2b4dea146d" + +meow@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/meow/-/meow-2.0.0.tgz#8f530a8ecf5d40d3f4b4df93c3472900fba2a8f1" + dependencies: + camelcase-keys "^1.0.0" + indent-string "^1.1.0" + minimist "^1.1.0" + object-assign "^1.0.0" + mime-db@~1.25.0: version "1.25.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.25.0.tgz#c18dbd7c73a5dbf6f44a024dc0d165a1e7b1c392" -mime-types@^2.1.12, mime-types@~2.1.7: +mime-types@^2.1.11, mime-types@^2.1.12, mime-types@~2.1.7: version "2.1.13" resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.13.tgz#e07aaa9c6c6b9a7ca3012c69003ad25a39e92a88" dependencies: @@ -317,14 +728,144 @@ mime@^1.2.11: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" +"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2: + version "3.0.3" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.3.tgz#2a4e4090b96b2db06a9d7df01055a62a77c9b774" + dependencies: + brace-expansion "^1.0.0" + +minimist@0.0.8: + version "0.0.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + +minimist@^1.1.0, minimist@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" + +"mkdirp@>=0.5 0", mkdirp@~0.5.1: + version "0.5.1" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" + dependencies: + minimist "0.0.8" + +ms@0.7.1: + version "0.7.1" + resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" + +nan@^2.0.0: + version "2.5.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.5.0.tgz#aa8f1e34531d807e9e27755b234b4a6ec0c152a8" + node-forge@^0.6.46: version "0.6.46" resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.6.46.tgz#04a8a1c336eb72ef6f434ba7c854d608916c328d" +node-pre-gyp@^0.6.0: + version "0.6.32" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.6.32.tgz#fc452b376e7319b3d255f5f34853ef6fd8fe1fd5" + dependencies: + mkdirp "~0.5.1" + nopt "~3.0.6" + npmlog "^4.0.1" + rc "~1.1.6" + request "^2.79.0" + rimraf "~2.5.4" + semver "~5.3.0" + tar "~2.2.1" + tar-pack "~3.3.0" + +node-uuid@~1.4.7: + version "1.4.7" + resolved "https://registry.yarnpkg.com/node-uuid/-/node-uuid-1.4.7.tgz#6da5a17668c4b3dd59623bda11cf7fa4c1f60a6f" + +nopt@~3.0.6: + version "3.0.6" + resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" + dependencies: + abbrev "1" + +normalize-package-data@^2.3.2: + version "2.3.5" + resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.3.5.tgz#8d924f142960e1777e7ffe170543631cc7cb02df" + dependencies: + hosted-git-info "^2.1.4" + is-builtin-module "^1.0.0" + semver "2 || 3 || 4 || 5" + validate-npm-package-license "^3.0.1" + +npmlog@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.0.2.tgz#d03950e0e78ce1527ba26d2a7592e9348ac3e75f" + dependencies: + are-we-there-yet "~1.1.2" + console-control-strings "~1.1.0" + gauge "~2.7.1" + set-blocking "~2.0.0" + +number-is-nan@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" + oauth-sign@~0.8.1: version "0.8.2" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" +object-assign@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-1.0.0.tgz#e65dc8766d3b47b4b8307465c8311da030b070a6" + +object-assign@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2" + +object-assign@^4.1.0: + version "4.1.1" + resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" + +once@^1.3.0, once@~1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20" + dependencies: + wrappy "1" + +optjs@~3.2.2: + version "3.2.2" + resolved "https://registry.yarnpkg.com/optjs/-/optjs-3.2.2.tgz#69a6ce89c442a44403141ad2f9b370bd5bb6f4ee" + +os-locale@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-1.4.0.tgz#20f9f17ae29ed345e8bde583b13d2009803c14d9" + dependencies: + lcid "^1.0.0" + +parse-json@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/parse-json/-/parse-json-2.2.0.tgz#f480f40434ef80741f8469099f8dea18f55a4dc9" + dependencies: + error-ex "^1.2.0" + +path-exists@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/path-exists/-/path-exists-2.1.0.tgz#0feb6c64f0fc518d9a754dd5efb62c7022761f4b" + dependencies: + pinkie-promise "^2.0.0" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + +path-type@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-1.1.0.tgz#59c44f7ee491da704da415da5a4070ba4f8fe441" + dependencies: + graceful-fs "^4.1.2" + pify "^2.0.0" + pinkie-promise "^2.0.0" + +pify@^2.0.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c" + pinkie-promise@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/pinkie-promise/-/pinkie-promise-2.0.1.tgz#2135d6dfa7a358c069ac9b178776288228450ffa" @@ -335,15 +876,106 @@ pinkie@^2.0.0: version "2.0.4" resolved "https://registry.yarnpkg.com/pinkie/-/pinkie-2.0.4.tgz#72556b80cfa0d48a974e80e77248e80ed4f7f870" +process-nextick-args@^1.0.7, process-nextick-args@~1.0.6: + version "1.0.7" + resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-1.0.7.tgz#150e20b756590ad3f91093f25a4f2ad8bff30ba3" + +protobufjs@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/protobufjs/-/protobufjs-5.0.1.tgz#589ecdda1a555fd69df4699adc142d36f133aa0b" + dependencies: + ascli "~1" + bytebuffer "~5" + glob "^5.0.10" + yargs "^3.10.0" + punycode@^1.4.1: version "1.4.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-1.4.1.tgz#c0d5a63b2718800ad8e1eb0fa5269c84dd41845e" +qs@~6.2.0: + version "6.2.1" + resolved "https://registry.yarnpkg.com/qs/-/qs-6.2.1.tgz#ce03c5ff0935bc1d9d69a9f14cbd18e568d67625" + qs@~6.3.0: version "6.3.0" resolved "https://registry.yarnpkg.com/qs/-/qs-6.3.0.tgz#f403b264f23bc01228c74131b407f18d5ea5d442" -request@^2.72.0, request@^2.74.0: +rc@~1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/rc/-/rc-1.1.6.tgz#43651b76b6ae53b5c802f1151fa3fc3b059969c9" + dependencies: + deep-extend "~0.4.0" + ini "~1.3.0" + minimist "^1.2.0" + strip-json-comments "~1.0.4" + +read-pkg-up@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-1.0.1.tgz#9d63c13276c065918d57f002a57f40a1b643fb02" + dependencies: + find-up "^1.0.0" + read-pkg "^1.0.0" + +read-pkg@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" + dependencies: + load-json-file "^1.0.0" + normalize-package-data "^2.3.2" + path-type "^1.0.0" + +"readable-stream@^2.0.0 || ^1.1.13", readable-stream@^2.2.2: + version "2.2.2" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.2.2.tgz#a9e6fec3c7dda85f8bb1b3ba7028604556fc825e" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@~1.1.9: + version "1.1.14" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "0.0.1" + string_decoder "~0.10.x" + +readable-stream@~2.0.5: + version "2.0.6" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.0.6.tgz#8f90341e68a53ccc928788dacfcd11b36eb9b78e" + dependencies: + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +readable-stream@~2.1.4: + version "2.1.5" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.1.5.tgz#66fa8b720e1438b364681f2ad1a63c618448c9d0" + dependencies: + buffer-shims "^1.0.0" + core-util-is "~1.0.0" + inherits "~2.0.1" + isarray "~1.0.0" + process-nextick-args "~1.0.6" + string_decoder "~0.10.x" + util-deprecate "~1.0.1" + +repeating@^1.1.0: + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeating/-/repeating-1.1.3.tgz#3d4114218877537494f97f77f9785fab810fa4ac" + dependencies: + is-finite "^1.0.0" + +request@^2.72.0, request@^2.74.0, request@^2.79.0: version "2.79.0" resolved "https://registry.yarnpkg.com/request/-/request-2.79.0.tgz#4dfe5bf6be8b8cdc37fcf93e04b65577722710de" dependencies: @@ -368,16 +1000,82 @@ request@^2.72.0, request@^2.74.0: tunnel-agent "~0.4.1" uuid "^3.0.0" +request@~2.74.0: + version "2.74.0" + resolved "https://registry.yarnpkg.com/request/-/request-2.74.0.tgz#7693ca768bbb0ea5c8ce08c084a45efa05b892ab" + dependencies: + aws-sign2 "~0.6.0" + aws4 "^1.2.1" + bl "~1.1.2" + caseless "~0.11.0" + combined-stream "~1.0.5" + extend "~3.0.0" + forever-agent "~0.6.1" + form-data "~1.0.0-rc4" + har-validator "~2.0.6" + hawk "~3.1.3" + http-signature "~1.1.0" + is-typedarray "~1.0.0" + isstream "~0.1.2" + json-stringify-safe "~5.0.1" + mime-types "~2.1.7" + node-uuid "~1.4.7" + oauth-sign "~0.8.1" + qs "~6.2.0" + stringstream "~0.0.4" + tough-cookie "~2.3.0" + tunnel-agent "~0.4.1" + +require-directory@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" + +require-main-filename@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" + +rimraf@2, rimraf@~2.5.1, rimraf@~2.5.4: + version "2.5.4" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.5.4.tgz#96800093cbf1a0c86bd95b4625467535c29dfa04" + dependencies: + glob "^7.0.5" + safe-buffer@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.0.1.tgz#d263ca54696cd8a306b5ca6551e92de57918fbe7" +"semver@2 || 3 || 4 || 5", semver@~5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" + +set-blocking@^2.0.0, set-blocking@~2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" + +signal-exit@^3.0.0: + version "3.0.2" + resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" + sntp@1.x.x: version "1.0.9" resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198" dependencies: hoek "2.x.x" +spdx-correct@~1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/spdx-correct/-/spdx-correct-1.0.2.tgz#4b3073d933ff51f3912f03ac5519498a4150db40" + dependencies: + spdx-license-ids "^1.0.2" + +spdx-expression-parse@~1.0.0: + version "1.0.4" + resolved "https://registry.yarnpkg.com/spdx-expression-parse/-/spdx-expression-parse-1.0.4.tgz#9bdf2f20e1f40ed447fbe273266191fced51626c" + +spdx-license-ids@^1.0.2: + version "1.2.2" + resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-1.2.2.tgz#c9df7a3424594ade6bd11900d596696dc06bac57" + sshpk@^1.7.0: version "1.10.1" resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.10.1.tgz#30e1a5d329244974a1af61511339d595af6638b0" @@ -393,24 +1091,75 @@ sshpk@^1.7.0: jsbn "~0.1.0" tweetnacl "~0.14.0" +string-template@~0.2.0: + version "0.2.1" + resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add" + string-template@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/string-template/-/string-template-1.0.0.tgz#9e9f2233dc00f218718ec379a28a5673ecca8b96" +string-width@^1.0.1, string-width@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" + dependencies: + code-point-at "^1.0.0" + is-fullwidth-code-point "^1.0.0" + strip-ansi "^3.0.0" + +string_decoder@~0.10.x: + version "0.10.31" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" + stringstream@~0.0.4: version "0.0.5" resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878" -strip-ansi@^3.0.0: +strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" dependencies: ansi-regex "^2.0.0" +strip-bom@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" + dependencies: + is-utf8 "^0.2.0" + +strip-json-comments@~1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-1.0.4.tgz#1e15fbcac97d3ee99bf2d73b4c656b082bbafb91" + +supports-color@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-0.2.0.tgz#d92de2694eb3f67323973d7ae3d8b55b4c22190a" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" +tar-pack@~3.3.0: + version "3.3.0" + resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.3.0.tgz#30931816418f55afc4d21775afdd6720cee45dae" + dependencies: + debug "~2.2.0" + fstream "~1.0.10" + fstream-ignore "~1.0.5" + once "~1.3.3" + readable-stream "~2.1.4" + rimraf "~2.5.1" + tar "~2.2.1" + uid-number "~0.0.6" + +tar@~2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.1.tgz#8e4d2a256c0e2185c6b18ad694aec968b83cb1d1" + dependencies: + block-stream "*" + fstream "^1.0.2" + inherits "2" + tough-cookie@~2.3.0: version "2.3.2" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.2.tgz#f081f76e4c85720e6c37a5faced737150d84072a" @@ -425,16 +1174,100 @@ tweetnacl@^0.14.3, tweetnacl@~0.14.0: version "0.14.5" resolved "https://registry.yarnpkg.com/tweetnacl/-/tweetnacl-0.14.5.tgz#5ae68177f192d4456269d108afa93ff8743f4f64" +typedarray@~0.0.5: + version "0.0.6" + resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" + +uid-number@~0.0.6: + version "0.0.6" + resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81" + +util-deprecate@~1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" + uuid@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1" +validate-npm-package-license@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.1.tgz#2804babe712ad3379459acfbe24746ab2c303fbc" + dependencies: + spdx-correct "~1.0.0" + spdx-expression-parse "~1.0.0" + verror@1.3.6: version "1.3.6" resolved "https://registry.yarnpkg.com/verror/-/verror-1.3.6.tgz#cff5df12946d297d2baaefaa2689e25be01c005c" dependencies: extsprintf "1.0.2" +which-module@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f" + +wide-align@^1.1.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.0.tgz#40edde802a71fea1f070da3e62dcda2e7add96ad" + dependencies: + string-width "^1.0.1" + +window-size@^0.1.4: + version "0.1.4" + resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876" + +wrap-ansi@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-2.1.0.tgz#d8fc3d284dd05794fe84973caecdd1cf824fdd85" + dependencies: + string-width "^1.0.1" + strip-ansi "^3.0.1" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + xtend@^4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" + +y18n@^3.2.0, y18n@^3.2.1: + version "3.2.1" + resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41" + +yargs-parser@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-4.2.1.tgz#29cceac0dc4f03c6c87b4a9f217dd18c9f74871c" + dependencies: + camelcase "^3.0.0" + +yargs@6.6.0: + version "6.6.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-6.6.0.tgz#782ec21ef403345f830a808ca3d513af56065208" + dependencies: + camelcase "^3.0.0" + cliui "^3.2.0" + decamelize "^1.1.1" + get-caller-file "^1.0.1" + os-locale "^1.4.0" + read-pkg-up "^1.0.1" + require-directory "^2.1.1" + require-main-filename "^1.0.1" + set-blocking "^2.0.0" + string-width "^1.0.2" + which-module "^1.0.0" + y18n "^3.2.1" + yargs-parser "^4.2.0" + +yargs@^3.10.0: + version "3.32.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995" + dependencies: + camelcase "^2.0.1" + cliui "^3.0.3" + decamelize "^1.1.1" + os-locale "^1.4.0" + string-width "^1.0.1" + window-size "^0.1.4" + y18n "^3.2.0" diff --git a/package.json b/package.json index c16f80ff3b..1ddc22a7a0 100644 --- a/package.json +++ b/package.json @@ -77,7 +77,7 @@ "@google-cloud/dns": "0.4.0", "@google-cloud/language": "0.7.0", "@google-cloud/logging": "0.6.0", - "@google-cloud/monitoring": "0.1.3", + "@google-cloud/monitoring": "0.1.4", "@google-cloud/pubsub": "0.7.0", "@google-cloud/resource": "0.5.1", "@google-cloud/speech": "0.5.0", diff --git a/yarn.lock b/yarn.lock index 390a555965..666762214b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -107,9 +107,9 @@ is-circular "^1.0.1" string-format-obj "^1.0.0" -"@google-cloud/monitoring@0.1.3": - version "0.1.3" - resolved "https://registry.yarnpkg.com/@google-cloud/monitoring/-/monitoring-0.1.3.tgz#d8e9ac0bb5eece45657b9f0ee94d62935225fc54" +"@google-cloud/monitoring@0.1.4": + version "0.1.4" + resolved "https://registry.yarnpkg.com/@google-cloud/monitoring/-/monitoring-0.1.4.tgz#d2629045150289ae6eef385f68f6e1b93cce2967" dependencies: extend "^3.0.0" google-gax "^0.10.0" @@ -3343,14 +3343,7 @@ jwa@~1.0.0: buffer-equal-constant-time "^1.0.1" ecdsa-sig-formatter "^1.0.0" -jws@^3.0.0, jws@~3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/jws/-/jws-3.0.0.tgz#da5f267897dd4e9cf8137979db33fc54a3c05418" - dependencies: - base64url "~1.0.4" - jwa "~1.0.0" - -jws@^3.1.4: +jws@^3.0.0, jws@^3.1.4: version "3.1.4" resolved "https://registry.yarnpkg.com/jws/-/jws-3.1.4.tgz#f9e8b9338e8a847277d6444b1464f61880e050a2" dependencies: @@ -3358,6 +3351,13 @@ jws@^3.1.4: jwa "^1.1.4" safe-buffer "^5.0.1" +jws@~3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/jws/-/jws-3.0.0.tgz#da5f267897dd4e9cf8137979db33fc54a3c05418" + dependencies: + base64url "~1.0.4" + jwa "~1.0.0" + kind-of@^3.0.2: version "3.1.0" resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.1.0.tgz#475d698a5e49ff5e53d14e3e732429dc8bf4cf47"