Skip to content

Commit 45e125f

Browse files
Google APIscopybara-github
Google APIs
authored andcommitted
Synchronize new proto/yaml changes.
PiperOrigin-RevId: 254026509
1 parent cc23354 commit 45e125f

File tree

5 files changed

+95
-6
lines changed

5 files changed

+95
-6
lines changed

WORKSPACE

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,16 @@ switched_rules_by_language(
1515
go = True,
1616
grpc = True,
1717
java = True,
18+
nodejs = True,
1819
php = True,
1920
)
2021

2122
# Note gapic-generator contains java-specific and common code, that is why it is imported in common
2223
# section
2324
http_archive(
2425
name = "com_google_api_codegen",
25-
strip_prefix = "gapic-generator-4a5220485893da3ee8934615d1901626f5b18e36",
26-
urls = ["https://github.com/googleapis/gapic-generator/archive/4a5220485893da3ee8934615d1901626f5b18e36.zip"],
26+
strip_prefix = "gapic-generator-c075bbe8eff3a1094a03cd77474d8dbcb010f954",
27+
urls = ["https://github.com/googleapis/gapic-generator/archive/c075bbe8eff3a1094a03cd77474d8dbcb010f954.zip"],
2728
)
2829

2930
##############################################################################

google/cloud/dialogflow/v2/BUILD.bazel

+25
Original file line numberDiff line numberDiff line change
@@ -214,3 +214,28 @@ php_gapic_assembly_pkg(
214214
":dialogflow_php_proto",
215215
],
216216
)
217+
218+
##############################################################################
219+
# Node.js
220+
##############################################################################
221+
load(
222+
"@com_google_googleapis_imports//:imports.bzl",
223+
"nodejs_gapic_library",
224+
"nodejs_gapic_assembly_pkg",
225+
)
226+
227+
nodejs_gapic_library(
228+
name = "dialogflow_nodejs_gapic",
229+
src = ":dialogflow_proto_with_info",
230+
gapic_yaml = "dialogflow_gapic.yaml",
231+
service_yaml = "//google/cloud/dialogflow:dialogflow_v2.yaml",
232+
deps = [],
233+
)
234+
235+
nodejs_gapic_assembly_pkg(
236+
name = "dialogflow-v2-nodejs",
237+
deps = [
238+
":dialogflow_nodejs_gapic",
239+
":dialogflow_proto",
240+
],
241+
)

google/cloud/language/v1/BUILD.bazel

+26
Original file line numberDiff line numberDiff line change
@@ -168,3 +168,29 @@ php_gapic_assembly_pkg(
168168
":language_php_proto",
169169
],
170170
)
171+
172+
##############################################################################
173+
# Node.js
174+
##############################################################################
175+
load(
176+
"@com_google_googleapis_imports//:imports.bzl",
177+
"nodejs_gapic_library",
178+
"nodejs_gapic_assembly_pkg",
179+
)
180+
181+
nodejs_gapic_library(
182+
name = "language_nodejs_gapic",
183+
src = ":language_proto_with_info",
184+
gapic_yaml = "language_gapic.yaml",
185+
service_yaml = "//google/cloud/language:language_v1.yaml",
186+
deps = [],
187+
)
188+
189+
nodejs_gapic_assembly_pkg(
190+
name = "language-v1-nodejs",
191+
deps = [
192+
":language_nodejs_gapic",
193+
":language_proto",
194+
],
195+
)
196+

google/pubsub/v1/BUILD.bazel

+25
Original file line numberDiff line numberDiff line change
@@ -192,3 +192,28 @@ php_gapic_assembly_pkg(
192192
":pubsub_php_proto",
193193
],
194194
)
195+
196+
##############################################################################
197+
# Node.js
198+
##############################################################################
199+
load(
200+
"@com_google_googleapis_imports//:imports.bzl",
201+
"nodejs_gapic_library",
202+
"nodejs_gapic_assembly_pkg",
203+
)
204+
205+
nodejs_gapic_library(
206+
name = "pubsub_nodejs_gapic",
207+
src = ":pubsub_proto_with_info",
208+
gapic_yaml = "pubsub_gapic.yaml",
209+
service_yaml = "//google/pubsub:pubsub.yaml",
210+
deps = [],
211+
)
212+
213+
nodejs_gapic_assembly_pkg(
214+
name = "pubsub-v1-nodejs",
215+
deps = [
216+
":pubsub_nodejs_gapic",
217+
":pubsub_proto",
218+
],
219+
)

repository_rules.bzl

+16-4
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ def switched_rules_by_language(
5353
java = False,
5454
go = False,
5555
cc = False,
56-
python = False,
5756
php = False,
57+
nodejs = False,
58+
python = False,
5859
ruby = False,
59-
js = False,
6060
csharp = False,
6161
rules_override = {}):
6262
"""Switches rules in the generated imports.bzl between no-op and the actual implementation.
@@ -93,10 +93,10 @@ def switched_rules_by_language(
9393
java (bool): Enable Java specific rules. False by default.
9494
go (bool): Enable Go specific rules. False by default.
9595
cc (bool): Enable C++ specific rules. False by default. Partially implemented.
96-
python (bool): Enable Python-specific rules. False by default. Not implemented yet.
9796
php (bool): Enable PHP specific rules. False by default.
97+
nodejs (bool): Enable Node.js specific rules. False by default.
9898
ruby (bool): Enable Ruby specific rules. False by default. Not implemented yet.
99-
js (bool): Enable JavaScript specific rules. False by default. Not implemented yet.
99+
python (bool): Enable Python-specific rules. False by default. Not implemented yet.
100100
csharp (bool): Enable C# specific rules. False by default. Not implemented yet.
101101
rules_override (dict): Custom rule overrides (for advanced usage).
102102
"""
@@ -199,6 +199,18 @@ def switched_rules_by_language(
199199
"@com_google_api_codegen//rules_gapic/php:php_gapic_pkg.bzl",
200200
)
201201

202+
#
203+
# Node.js
204+
#
205+
rules["nodejs_gapic_library"] = _switch(
206+
nodejs and grpc and gapic,
207+
"@com_google_api_codegen//rules_gapic/nodejs:nodejs_gapic.bzl",
208+
)
209+
rules["nodejs_gapic_assembly_pkg"] = _switch(
210+
nodejs and grpc and gapic,
211+
"@com_google_api_codegen//rules_gapic/nodejs:nodejs_gapic_pkg.bzl",
212+
)
213+
202214
rules.update(rules_override)
203215

204216
switched_rules(

0 commit comments

Comments
 (0)