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

feat: export protos in src/index.ts #296

Merged
merged 6 commits into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 2 additions & 0 deletions baselines/dlp/src/index.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

import * as protos from '../protos/protos';
import * as v2 from './v2';
const DlpServiceClient = v2.DlpServiceClient;
export {v2, DlpServiceClient};
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
export default {v2, DlpServiceClient};
export {protos}
2 changes: 2 additions & 0 deletions baselines/kms/src/index.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

import * as protos from '../protos/protos';
import * as v1 from './v1';
const KeyManagementServiceClient = v1.KeyManagementServiceClient;
export {v1, KeyManagementServiceClient};
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
export default {v1, KeyManagementServiceClient};
export {protos}
2 changes: 2 additions & 0 deletions baselines/monitoring/src/index.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

import * as protos from '../protos/protos';
import * as v3 from './v3';
const AlertPolicyServiceClient = v3.AlertPolicyServiceClient;
const GroupServiceClient = v3.GroupServiceClient;
Expand All @@ -27,3 +28,4 @@ export {v3, AlertPolicyServiceClient, GroupServiceClient, MetricServiceClient, N
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
export default {v3, AlertPolicyServiceClient, GroupServiceClient, MetricServiceClient, NotificationChannelServiceClient, ServiceMonitoringServiceClient, UptimeCheckServiceClient};
export {protos}
2 changes: 2 additions & 0 deletions baselines/redis/src/index.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

import * as protos from '../protos/protos';
import * as v1beta1 from './v1beta1';
const CloudRedisClient = v1beta1.CloudRedisClient;
export {v1beta1, CloudRedisClient};
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
export default {v1beta1, CloudRedisClient};
export {protos}
2 changes: 2 additions & 0 deletions baselines/showcase/src/index.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

import * as protos from '../protos/protos';
import * as v1beta1 from './v1beta1';
const EchoClient = v1beta1.EchoClient;
const IdentityClient = v1beta1.IdentityClient;
Expand All @@ -25,3 +26,4 @@ export {v1beta1, EchoClient, IdentityClient, MessagingClient, TestingClient};
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
export default {v1beta1, EchoClient, IdentityClient, MessagingClient, TestingClient};
export {protos}
2 changes: 2 additions & 0 deletions baselines/texttospeech/src/index.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

import * as protos from '../protos/protos';
import * as v1 from './v1';
const TextToSpeechClient = v1.TextToSpeechClient;
export {v1, TextToSpeechClient};
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
export default {v1, TextToSpeechClient};
export {protos}
2 changes: 2 additions & 0 deletions baselines/translate/src/index.ts.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@
// ** https://github.com/googleapis/gapic-generator-typescript **
// ** All changes to this file may be overwritten. **

import * as protos from '../protos/protos';
import * as v3beta1 from './v3beta1';
const TranslationServiceClient = v3beta1.TranslationServiceClient;
export {v3beta1, TranslationServiceClient};
// For compatibility with JavaScript libraries we need to provide this default export:
// tslint:disable-next-line no-default-export
export default {v3beta1, TranslationServiceClient};
export {protos}
2 changes: 2 additions & 0 deletions templates/typescript_gapic/src/index.ts.njk
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ limitations under the License.
-#}
{% import "../_license.njk" as license -%}
{{license.license()}}
import * as protos from '../protos/protos';
import * as {{ api.naming.version }} from './{{ api.naming.version }}';
{%- for service in api.services %}
const {{ service.name.toPascalCase() }}Client = {{ api.naming.version }}.{{ service.name.toPascalCase() }}Client;
Expand All @@ -33,3 +34,4 @@ export default { {{- api.naming.version }}
, {{ service.name.toPascalCase() + 'Client' }}
{%- endfor -%}
};
export {protos}