Skip to content

Commit

Permalink
build(nodejs): correct package name for npm (#12)
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 385822138
Source-Link: googleapis/googleapis@efecdbf
Source-Link: googleapis/googleapis-gen@373d95c

fix: Updating WORKSPACE files to use the newest version of the Typescript generator
PiperOrigin-RevId: 385101839
Source-Link: googleapis/googleapis@80f4042
Source-Link: googleapis/googleapis-gen@d3509d2

chore: use gapic-generator-typescript v2.1.0
Committer: @alexander-fenster
PiperOrigin-RevId: 385246182
Source-Link: googleapis/googleapis@d767d0a
Source-Link: googleapis/googleapis-gen@e44f054
  • Loading branch information
gcf-owl-bot[bot] authored Jul 22, 2021
1 parent c89e3f4 commit 13c814d
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-gkeconnect-gateway/.jsdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = {
copyright: 'Copyright 2021 Google LLC',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/gateway',
systemName: '@google-cloud/gke-connect-gateway',
theme: 'lumen',
default: {
outputSourceFiles: false
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"recurse": true,
"skip": [
"https://github.com/googleapis/nodejs-gke-connect-gateway/blob/master/CHANGELOG.md",
"https://codecov.io/gh/googleapis/",
"www.googleapis.com",
"img.shields.io"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
"language": "typescript",
"protoPackage": "google.cloud.gkeconnect.gateway.v1beta1",
"libraryPackage": "@google-cloud/gateway",
"libraryPackage": "@google-cloud/gke-connect-gateway",
"services": {
"GatewayService": {
"clients": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const version = require('../../../package.json').version;
export class GatewayServiceClient {
private _terminated = false;
private _opts: ClientOptions;
private _providedCustomServicePath: boolean;
private _gaxModule: typeof gax | typeof gax.fallback;
private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient;
private _protos: {};
Expand All @@ -54,6 +55,7 @@ export class GatewayServiceClient {
longrunning: {},
batching: {},
};
warn: (code: string, message: string, warnType?: string) => void;
innerApiCalls: {[name: string]: Function};
gatewayServiceStub?: Promise<{[name: string]: Function}>;

Expand Down Expand Up @@ -96,6 +98,9 @@ export class GatewayServiceClient {
const staticMembers = this.constructor as typeof GatewayServiceClient;
const servicePath =
opts?.servicePath || opts?.apiEndpoint || staticMembers.servicePath;
this._providedCustomServicePath = !!(
opts?.servicePath || opts?.apiEndpoint
);
const port = opts?.port || staticMembers.port;
const clientConfig = opts?.clientConfig ?? {};
const fallback =
Expand Down Expand Up @@ -155,6 +160,9 @@ export class GatewayServiceClient {
// of calling the API is handled in `google-gax`, with this code
// merely providing the destination and request information.
this.innerApiCalls = {};

// Add a warn function to the client constructor so it can be easily tested.
this.warn = gax.warn;
}

/**
Expand Down Expand Up @@ -184,7 +192,8 @@ export class GatewayServiceClient {
: // eslint-disable-next-line @typescript-eslint/no-explicit-any
(this._protos as any).google.cloud.gkeconnect.gateway.v1beta1
.GatewayService,
this._opts
this._opts,
this._providedCustomServicePath
) as Promise<{[method: string]: Function}>;

// Iterate over each of the methods that the service provides
Expand Down

0 comments on commit 13c814d

Please sign in to comment.