Socket
Socket
Sign inDemoInstall

@google-cloud/logging

Package Overview
Dependencies
Maintainers
1
Versions
157
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@google-cloud/logging - npm Package Compare versions

Comparing version 8.0.9 to 8.0.10

134

build/src/v2/config_service_v2_client.d.ts

@@ -32,4 +32,6 @@ /// <reference types="node" />

*
* @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.

@@ -54,2 +56,9 @@ * @param {string} [options.credentials.client_email]

* 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.
*/

@@ -73,2 +82,3 @@ constructor(opts?: ClientOptions);

* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/

@@ -79,2 +89,3 @@ static get servicePath(): string;

* exists for compatibility reasons.
* @returns {string} The DNS address for this service.
*/

@@ -84,2 +95,3 @@ static get apiEndpoint(): string;

* The port for this API service.
* @returns {number} The default port for this service.
*/

@@ -90,2 +102,3 @@ static get port(): number;

* in this service.
* @returns {string[]} List of default scopes.
*/

@@ -135,14 +148,3 @@ static get scopes(): string[];

/**
* Equivalent to {@link listBuckets}, but returns a NodeJS Stream object.
*
* This fetches the paged responses for {@link listBuckets} continuously
* and invokes the callback registered for 'data' event for each element in the
* responses.
*
* The returned object has 'end' method when no more elements are required.
*
* autoPaginate option will be ignored.
*
* @see {@link https://nodejs.org/api/stream.html}
*
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
* @param {Object} request

@@ -174,9 +176,15 @@ * The request object that will be sent.

* An object stream which emits an object representing [LogBucket]{@link google.logging.v2.LogBucket} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listBucketsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
listBucketsStream(request?: protos.google.logging.v2.IListBucketsRequest, options?: gax.CallOptions): Transform;
/**
* Equivalent to {@link listBuckets}, but returns an iterable object.
* Equivalent to `listBuckets`, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request

@@ -207,3 +215,14 @@ * The request object that will be sent.

* @returns {Object}
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
* An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
* When you iterate the returned iterable, each element will be an object representing
* [LogBucket]{@link google.logging.v2.LogBucket}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
* @example
* const iterable = client.listBucketsAsync(request);
* for await (const response of iterable) {
* // process response
* }
*/

@@ -215,14 +234,3 @@ listBucketsAsync(request?: protos.google.logging.v2.IListBucketsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.logging.v2.ILogBucket>;

/**
* Equivalent to {@link listSinks}, but returns a NodeJS Stream object.
*
* This fetches the paged responses for {@link listSinks} continuously
* and invokes the callback registered for 'data' event for each element in the
* responses.
*
* The returned object has 'end' method when no more elements are required.
*
* autoPaginate option will be ignored.
*
* @see {@link https://nodejs.org/api/stream.html}
*
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
* @param {Object} request

@@ -250,9 +258,15 @@ * The request object that will be sent.

* An object stream which emits an object representing [LogSink]{@link google.logging.v2.LogSink} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listSinksAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
listSinksStream(request?: protos.google.logging.v2.IListSinksRequest, options?: gax.CallOptions): Transform;
/**
* Equivalent to {@link listSinks}, but returns an iterable object.
* Equivalent to `listSinks`, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request

@@ -279,3 +293,14 @@ * The request object that will be sent.

* @returns {Object}
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
* An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
* When you iterate the returned iterable, each element will be an object representing
* [LogSink]{@link google.logging.v2.LogSink}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
* @example
* const iterable = client.listSinksAsync(request);
* for await (const response of iterable) {
* // process response
* }
*/

@@ -287,14 +312,3 @@ listSinksAsync(request?: protos.google.logging.v2.IListSinksRequest, options?: gax.CallOptions): AsyncIterable<protos.google.logging.v2.ILogSink>;

/**
* Equivalent to {@link listExclusions}, but returns a NodeJS Stream object.
*
* This fetches the paged responses for {@link listExclusions} continuously
* and invokes the callback registered for 'data' event for each element in the
* responses.
*
* The returned object has 'end' method when no more elements are required.
*
* autoPaginate option will be ignored.
*
* @see {@link https://nodejs.org/api/stream.html}
*
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
* @param {Object} request

@@ -322,9 +336,15 @@ * The request object that will be sent.

* An object stream which emits an object representing [LogExclusion]{@link google.logging.v2.LogExclusion} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listExclusionsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
listExclusionsStream(request?: protos.google.logging.v2.IListExclusionsRequest, options?: gax.CallOptions): Transform;
/**
* Equivalent to {@link listExclusions}, but returns an iterable object.
* Equivalent to `listExclusions`, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request

@@ -351,3 +371,14 @@ * The request object that will be sent.

* @returns {Object}
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
* An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
* When you iterate the returned iterable, each element will be an object representing
* [LogExclusion]{@link google.logging.v2.LogExclusion}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
* @example
* const iterable = client.listExclusionsAsync(request);
* for await (const response of iterable) {
* // process response
* }
*/

@@ -899,7 +930,8 @@ listExclusionsAsync(request?: protos.google.logging.v2.IListExclusionsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.logging.v2.ILogExclusion>;

/**
* 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<void>;
}

@@ -32,4 +32,6 @@ /// <reference types="node" />

*
* @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.

@@ -54,2 +56,9 @@ * @param {string} [options.credentials.client_email]

* 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.
*/

@@ -73,2 +82,3 @@ constructor(opts?: ClientOptions);

* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/

@@ -79,2 +89,3 @@ static get servicePath(): string;

* exists for compatibility reasons.
* @returns {string} The DNS address for this service.
*/

@@ -84,2 +95,3 @@ static get apiEndpoint(): string;

* The port for this API service.
* @returns {number} The default port for this service.
*/

@@ -90,2 +102,3 @@ static get port(): number;

* in this service.
* @returns {string[]} List of default scopes.
*/

@@ -105,14 +118,3 @@ static get scopes(): string[];

/**
* Equivalent to {@link listLogEntries}, but returns a NodeJS Stream object.
*
* This fetches the paged responses for {@link listLogEntries} continuously
* and invokes the callback registered for 'data' event for each element in the
* responses.
*
* The returned object has 'end' method when no more elements are required.
*
* autoPaginate option will be ignored.
*
* @see {@link https://nodejs.org/api/stream.html}
*
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
* @param {Object} request

@@ -160,9 +162,15 @@ * The request object that will be sent.

* An object stream which emits an object representing [LogEntry]{@link google.logging.v2.LogEntry} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listLogEntriesAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
listLogEntriesStream(request?: protos.google.logging.v2.IListLogEntriesRequest, options?: gax.CallOptions): Transform;
/**
* Equivalent to {@link listLogEntries}, but returns an iterable object.
* Equivalent to `listLogEntries`, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request

@@ -209,3 +217,14 @@ * The request object that will be sent.

* @returns {Object}
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
* An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
* When you iterate the returned iterable, each element will be an object representing
* [LogEntry]{@link google.logging.v2.LogEntry}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
* @example
* const iterable = client.listLogEntriesAsync(request);
* for await (const response of iterable) {
* // process response
* }
*/

@@ -217,14 +236,3 @@ listLogEntriesAsync(request?: protos.google.logging.v2.IListLogEntriesRequest, options?: gax.CallOptions): AsyncIterable<protos.google.logging.v2.ILogEntry>;

/**
* Equivalent to {@link listMonitoredResourceDescriptors}, but returns a NodeJS Stream object.
*
* This fetches the paged responses for {@link listMonitoredResourceDescriptors} continuously
* and invokes the callback registered for 'data' event for each element in the
* responses.
*
* The returned object has 'end' method when no more elements are required.
*
* autoPaginate option will be ignored.
*
* @see {@link https://nodejs.org/api/stream.html}
*
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
* @param {Object} request

@@ -245,9 +253,15 @@ * The request object that will be sent.

* An object stream which emits an object representing [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listMonitoredResourceDescriptorsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
listMonitoredResourceDescriptorsStream(request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, options?: gax.CallOptions): Transform;
/**
* Equivalent to {@link listMonitoredResourceDescriptors}, but returns an iterable object.
* Equivalent to `listMonitoredResourceDescriptors`, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request

@@ -267,3 +281,14 @@ * The request object that will be sent.

* @returns {Object}
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
* An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
* When you iterate the returned iterable, each element will be an object representing
* [MonitoredResourceDescriptor]{@link google.api.MonitoredResourceDescriptor}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
* @example
* const iterable = client.listMonitoredResourceDescriptorsAsync(request);
* for await (const response of iterable) {
* // process response
* }
*/

@@ -275,14 +300,3 @@ listMonitoredResourceDescriptorsAsync(request?: protos.google.logging.v2.IListMonitoredResourceDescriptorsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.api.IMonitoredResourceDescriptor>;

/**
* Equivalent to {@link listLogs}, but returns a NodeJS Stream object.
*
* This fetches the paged responses for {@link listLogs} continuously
* and invokes the callback registered for 'data' event for each element in the
* responses.
*
* The returned object has 'end' method when no more elements are required.
*
* autoPaginate option will be ignored.
*
* @see {@link https://nodejs.org/api/stream.html}
*
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
* @param {Object} request

@@ -310,9 +324,15 @@ * The request object that will be sent.

* An object stream which emits an object representing string on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listLogsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
listLogsStream(request?: protos.google.logging.v2.IListLogsRequest, options?: gax.CallOptions): Transform;
/**
* Equivalent to {@link listLogs}, but returns an iterable object.
* Equivalent to `listLogs`, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request

@@ -339,3 +359,14 @@ * The request object that will be sent.

* @returns {Object}
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
* An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
* When you iterate the returned iterable, each element will be an object representing
* string. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
* @example
* const iterable = client.listLogsAsync(request);
* for await (const response of iterable) {
* // process response
* }
*/

@@ -863,7 +894,8 @@ listLogsAsync(request?: protos.google.logging.v2.IListLogsRequest, options?: gax.CallOptions): AsyncIterable<string>;

/**
* 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<void>;
}

@@ -32,4 +32,6 @@ /// <reference types="node" />

*
* @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.

@@ -54,2 +56,9 @@ * @param {string} [options.credentials.client_email]

* 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.
*/

@@ -73,2 +82,3 @@ constructor(opts?: ClientOptions);

* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/

@@ -79,2 +89,3 @@ static get servicePath(): string;

* exists for compatibility reasons.
* @returns {string} The DNS address for this service.
*/

@@ -84,2 +95,3 @@ static get apiEndpoint(): string;

* The port for this API service.
* @returns {number} The default port for this service.
*/

@@ -90,2 +102,3 @@ static get port(): number;

* in this service.
* @returns {string[]} List of default scopes.
*/

@@ -111,14 +124,3 @@ static get scopes(): string[];

/**
* Equivalent to {@link listLogMetrics}, but returns a NodeJS Stream object.
*
* This fetches the paged responses for {@link listLogMetrics} continuously
* and invokes the callback registered for 'data' event for each element in the
* responses.
*
* The returned object has 'end' method when no more elements are required.
*
* autoPaginate option will be ignored.
*
* @see {@link https://nodejs.org/api/stream.html}
*
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
* @param {Object} request

@@ -143,9 +145,15 @@ * The request object that will be sent.

* An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listLogMetricsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/
listLogMetricsStream(request?: protos.google.logging.v2.IListLogMetricsRequest, options?: gax.CallOptions): Transform;
/**
* Equivalent to {@link listLogMetrics}, but returns an iterable object.
* Equivalent to `listLogMetrics`, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request

@@ -169,3 +177,14 @@ * The request object that will be sent.

* @returns {Object}
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
* An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
* When you iterate the returned iterable, each element will be an object representing
* [LogMetric]{@link google.logging.v2.LogMetric}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
* @example
* const iterable = client.listLogMetricsAsync(request);
* for await (const response of iterable) {
* // process response
* }
*/

@@ -693,7 +712,8 @@ listLogMetricsAsync(request?: protos.google.logging.v2.IListLogMetricsRequest, options?: gax.CallOptions): AsyncIterable<protos.google.logging.v2.ILogMetric>;

/**
* 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<void>;
}

@@ -34,4 +34,6 @@ "use strict";

*
* @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.

@@ -56,4 +58,12 @@ * @param {string} [options.credentials.client_email]

* 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) {
var _a, _b;
this._terminated = false;

@@ -66,30 +76,16 @@ this.descriptors = {

};
// Ensure that options include the service address and port.
// Ensure that options include all the required fields.
const staticMembers = this.constructor;
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 };
const servicePath = (opts === null || opts === void 0 ? void 0 : opts.servicePath) || (opts === null || opts === void 0 ? void 0 : opts.apiEndpoint) || staticMembers.servicePath;
const port = (opts === null || opts === void 0 ? void 0 : opts.port) || staticMembers.port;
const clientConfig = (_a = opts === null || opts === void 0 ? void 0 : opts.clientConfig) !== null && _a !== void 0 ? _a : {};
const fallback = (_b = opts === null || opts === void 0 ? void 0 : opts.fallback) !== null && _b !== void 0 ? _b : typeof window !== 'undefined';
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.
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 MetricsServiceV2Client 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.scopes;
// Create a `gaxGrpc` object, with any grpc-specific options sent to the client.
this._gaxGrpc = new this._gaxModule.GrpcClient(opts);

@@ -100,2 +96,6 @@ // Save options to use in initialize() method.

this.auth = this._gaxGrpc.auth;
// Set the default scopes in auth client if needed.
if (servicePath === staticMembers.servicePath) {
this.auth.defaultScopes = staticMembers.scopes;
}
// Determine the client header string.

@@ -212,2 +212,3 @@ const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`];

* The DNS address for this API service.
* @returns {string} The DNS address for this service.
*/

@@ -220,2 +221,3 @@ static get servicePath() {

* exists for compatibility reasons.
* @returns {string} The DNS address for this service.
*/

@@ -227,2 +229,3 @@ static get apiEndpoint() {

* The port for this API service.
* @returns {number} The default port for this service.
*/

@@ -235,2 +238,3 @@ static get port() {

* in this service.
* @returns {string[]} List of default scopes.
*/

@@ -248,4 +252,3 @@ static get scopes() {

* 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.
*/

@@ -272,3 +275,7 @@ getProjectId(callback) {

* The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}.
* 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.getLogMetric(request);
*/

@@ -312,3 +319,7 @@ getLogMetric(request, optionsOrCallback, callback) {

* The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}.
* 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.createLogMetric(request);
*/

@@ -353,3 +364,7 @@ createLogMetric(request, optionsOrCallback, callback) {

* The first element of the array is an object representing [LogMetric]{@link google.logging.v2.LogMetric}.
* 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.updateLogMetric(request);
*/

@@ -388,3 +403,7 @@ updateLogMetric(request, optionsOrCallback, callback) {

* The first element of the array is an object representing [Empty]{@link google.protobuf.Empty}.
* 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.deleteLogMetric(request);
*/

@@ -432,15 +451,10 @@ deleteLogMetric(request, optionsOrCallback, callback) {

* The first element of the array is Array of [LogMetric]{@link google.logging.v2.LogMetric}.
* The client library support auto-pagination by default: it will call the API as many
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed and will merge results from all the pages into this array.
*
* When autoPaginate: false is specified through options, the array has three elements.
* The first element is Array of [LogMetric]{@link google.logging.v2.LogMetric} that corresponds to
* the one page received from the API server.
* If the second element is not null it contains the request object of type [ListLogMetricsRequest]{@link google.logging.v2.ListLogMetricsRequest}
* that can be used to obtain the next page of the results.
* If it is null, the next page does not exist.
* The third element contains the raw response received from the API server. Its type is
* [ListLogMetricsResponse]{@link google.logging.v2.ListLogMetricsResponse}.
*
* The promise has a method named "cancel" which cancels the ongoing API call.
* Note that it can affect your quota.
* We recommend using `listLogMetricsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/

@@ -467,14 +481,3 @@ listLogMetrics(request, optionsOrCallback, callback) {

/**
* Equivalent to {@link listLogMetrics}, but returns a NodeJS Stream object.
*
* This fetches the paged responses for {@link listLogMetrics} continuously
* and invokes the callback registered for 'data' event for each element in the
* responses.
*
* The returned object has 'end' method when no more elements are required.
*
* autoPaginate option will be ignored.
*
* @see {@link https://nodejs.org/api/stream.html}
*
* Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object.
* @param {Object} request

@@ -499,2 +502,9 @@ * The request object that will be sent.

* An object stream which emits an object representing [LogMetric]{@link google.logging.v2.LogMetric} on 'data' event.
* The client library will perform auto-pagination by default: it will call the API as many
* times as needed. Note that it can affect your quota.
* We recommend using `listLogMetricsAsync()`
* method described below for async iteration which you can stop as needed.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
*/

@@ -514,6 +524,5 @@ listLogMetricsStream(request, options) {

/**
* Equivalent to {@link listLogMetrics}, but returns an iterable object.
* Equivalent to `listLogMetrics`, but returns an iterable object.
*
* for-await-of syntax is used with the iterable to recursively get response element on-demand.
*
* `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand.
* @param {Object} request

@@ -537,3 +546,14 @@ * The request object that will be sent.

* @returns {Object}
* An iterable Object that conforms to @link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols.
* An iterable Object that allows [async iteration](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols).
* When you iterate the returned iterable, each element will be an object representing
* [LogMetric]{@link google.logging.v2.LogMetric}. The API will be called under the hood as needed, once per the page,
* so you can stop the iteration when you don't need more results.
* Please see the
* [documentation](https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination)
* for more details and examples.
* @example
* const iterable = client.listLogMetricsAsync(request);
* for await (const response of iterable) {
* // process response
* }
*/

@@ -1276,5 +1296,6 @@ listLogMetricsAsync(request, options) {

/**
* 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.
*/

@@ -1281,0 +1302,0 @@ close() {

@@ -7,2 +7,9 @@ # Changelog

### [8.0.10](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.9...v8.0.10) (2020-11-06)
### Bug Fixes
* do not modify options object, use defaultScopes ([#935](https://www.github.com/googleapis/nodejs-logging/issues/935)) ([fd1e63a](https://www.github.com/googleapis/nodejs-logging/commit/fd1e63a56f19b5af48fbba40d136a4ce640ca2f3))
### [8.0.9](https://www.github.com/googleapis/nodejs-logging/compare/v8.0.8...v8.0.9) (2020-11-03)

@@ -9,0 +16,0 @@

{
"name": "@google-cloud/logging",
"version": "8.0.9",
"version": "8.0.10",
"description": "Stackdriver Logging Client Library for Node.js",

@@ -60,3 +60,3 @@ "keywords": [

"google-auth-library": "^6.0.0",
"google-gax": "^2.7.0",
"google-gax": "^2.9.2",
"is": "^3.3.0",

@@ -63,0 +63,0 @@ "on-finished": "^2.3.0",

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc