Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: close GRPC channel when we dispose of clients #779

Merged
merged 18 commits into from
Dec 15, 2019
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ has instructions for running the samples.
| Sample | Source Code | Try it |
| --------------------------- | --------------------------------- | ------ |
| Quickstart | [source code](https://github.com/googleapis/nodejs-firestore/blob/master/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-firestore&page=editor&open_in_editor=samples/quickstart.js,samples/README.md) |
| Solution-counters | [source code](https://github.com/googleapis/nodejs-firestore/blob/master/samples/solution-counters.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/nodejs-firestore&page=editor&open_in_editor=samples/solution-counters.js,samples/README.md) |



Expand Down
6 changes: 2 additions & 4 deletions dev/conformance/runner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ import {CallOptions} from 'google-gax';
import * as path from 'path';
import * as protobufjs from 'protobufjs';
import * as through2 from 'through2';
import * as proto from '../protos/firestore_proto_api';
import * as proto from '../protos/firestore_v1_proto_api';

import {
DocumentChange,
DocumentData,
DocumentSnapshot,
FieldPath,
FieldValue,
Expand All @@ -35,7 +36,6 @@ import {
import {fieldsFromJson} from '../src/convert';
import {DocumentChangeType} from '../src/document-change';
import {QualifiedResourcePath} from '../src/path';
import {DocumentData} from '../src/types';
import {isObject} from '../src/util';
import {
ApiOverride,
Expand All @@ -47,8 +47,6 @@ import api = proto.google.firestore.v1;
// TODO(mrschmidt): Create Protobuf .d.ts file for the conformance proto
type ConformanceProto = any; // tslint:disable-line:no-any

const REQUEST_TIME = 'REQUEST_TIME';

/** List of test cases that are ignored. */
const ignoredRe: RegExp[] = [];

Expand Down
3,118 changes: 3,118 additions & 0 deletions dev/protos/firestore_admin_v1_proto_api.d.ts

Large diffs are not rendered by default.

5,401 changes: 5,401 additions & 0 deletions dev/protos/firestore_admin_v1_proto_api.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
/*!
* Copyright 2019 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import * as $protobuf from "protobufjs";
/** Namespace google. */
Expand Down Expand Up @@ -584,6 +586,9 @@ export namespace google {

/** FileOptions uninterpretedOption */
uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);

/** FileOptions .google.api.resourceDefinition */
".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null);
}

/** Represents a FileOptions. */
Expand Down Expand Up @@ -665,6 +670,9 @@ export namespace google {

/** MessageOptions uninterpretedOption */
uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);

/** MessageOptions .google.api.resource */
".google.api.resource"?: (google.api.IResourceDescriptor|null);
}

/** Represents a MessageOptions. */
Expand Down Expand Up @@ -715,6 +723,12 @@ export namespace google {

/** FieldOptions uninterpretedOption */
uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);

/** FieldOptions .google.api.fieldBehavior */
".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null);

/** FieldOptions .google.api.resourceReference */
".google.api.resourceReference"?: (google.api.IResourceReference|null);
}

/** Represents a FieldOptions. */
Expand Down Expand Up @@ -845,6 +859,12 @@ export namespace google {

/** ServiceOptions uninterpretedOption */
uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null);

/** ServiceOptions .google.api.defaultHost */
".google.api.defaultHost"?: (string|null);

/** ServiceOptions .google.api.oauthScopes */
".google.api.oauthScopes"?: (string|null);
}

/** Represents a ServiceOptions. */
Expand Down Expand Up @@ -875,6 +895,9 @@ export namespace google {
/** MethodOptions .google.api.http */
".google.api.http"?: (google.api.IHttpRule|null);

/** MethodOptions .google.api.methodSignature */
".google.api.methodSignature"?: (string[]|null);

/** MethodOptions .google.longrunning.operationInfo */
".google.longrunning.operationInfo"?: (google.longrunning.IOperationInfo|null);
}
Expand Down Expand Up @@ -3229,26 +3252,6 @@ export namespace google {
"OPERATOR_UNSPECIFIED"| "IS_NAN"| "IS_NULL";
}

/** Properties of a Projection. */
interface IProjection {

/** Projection fields */
fields?: (google.firestore.v1.StructuredQuery.IFieldReference[]|null);
}

/** Represents a Projection. */
class Projection implements IProjection {

/**
* Constructs a new Projection.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.StructuredQuery.IProjection);

/** Projection fields. */
public fields: google.firestore.v1.StructuredQuery.IFieldReference[];
}

/** Properties of an Order. */
interface IOrder {

Expand All @@ -3275,6 +3278,10 @@ export namespace google {
public direction: google.firestore.v1.StructuredQuery.Direction;
}

/** Direction enum. */
type Direction =
"DIRECTION_UNSPECIFIED"| "ASCENDING"| "DESCENDING";

/** Properties of a FieldReference. */
interface IFieldReference {

Expand All @@ -3295,9 +3302,25 @@ export namespace google {
public fieldPath: string;
}

/** Direction enum. */
type Direction =
"DIRECTION_UNSPECIFIED"| "ASCENDING"| "DESCENDING";
/** Properties of a Projection. */
interface IProjection {

/** Projection fields */
fields?: (google.firestore.v1.StructuredQuery.IFieldReference[]|null);
}

/** Represents a Projection. */
class Projection implements IProjection {

/**
* Constructs a new Projection.
* @param [properties] Properties to set
*/
constructor(properties?: google.firestore.v1.StructuredQuery.IProjection);

/** Projection fields. */
public fields: google.firestore.v1.StructuredQuery.IFieldReference[];
}
}

/** Properties of a Cursor. */
Expand Down Expand Up @@ -3737,6 +3760,93 @@ export namespace google {
/** CustomHttpPattern path. */
public path: string;
}

/** FieldBehavior enum. */
type FieldBehavior =
"FIELD_BEHAVIOR_UNSPECIFIED"| "OPTIONAL"| "REQUIRED"| "OUTPUT_ONLY"| "INPUT_ONLY"| "IMMUTABLE";

/** Properties of a ResourceDescriptor. */
interface IResourceDescriptor {

/** ResourceDescriptor type */
type?: (string|null);

/** ResourceDescriptor pattern */
pattern?: (string[]|null);

/** ResourceDescriptor nameField */
nameField?: (string|null);

/** ResourceDescriptor history */
history?: (google.api.ResourceDescriptor.History|null);

/** ResourceDescriptor plural */
plural?: (string|null);

/** ResourceDescriptor singular */
singular?: (string|null);
}

/** Represents a ResourceDescriptor. */
class ResourceDescriptor implements IResourceDescriptor {

/**
* Constructs a new ResourceDescriptor.
* @param [properties] Properties to set
*/
constructor(properties?: google.api.IResourceDescriptor);

/** ResourceDescriptor type. */
public type: string;

/** ResourceDescriptor pattern. */
public pattern: string[];

/** ResourceDescriptor nameField. */
public nameField: string;

/** ResourceDescriptor history. */
public history: google.api.ResourceDescriptor.History;

/** ResourceDescriptor plural. */
public plural: string;

/** ResourceDescriptor singular. */
public singular: string;
}

namespace ResourceDescriptor {

/** History enum. */
type History =
"HISTORY_UNSPECIFIED"| "ORIGINALLY_SINGLE_PATTERN"| "FUTURE_MULTI_PATTERN";
}

/** Properties of a ResourceReference. */
interface IResourceReference {

/** ResourceReference type */
type?: (string|null);

/** ResourceReference childType */
childType?: (string|null);
}

/** Represents a ResourceReference. */
class ResourceReference implements IResourceReference {

/**
* Constructs a new ResourceReference.
* @param [properties] Properties to set
*/
constructor(properties?: google.api.IResourceReference);

/** ResourceReference type. */
public type: string;

/** ResourceReference childType. */
public childType: string;
}
}

/** Namespace type. */
Expand Down
Loading