Skip to content

Commit 1b5f4f3

Browse files
refactor: explicit export in protos.js (#372)
1 parent 3a40006 commit 1b5f4f3

9 files changed

+96
-89
lines changed

packages/google-cloud-automl/.jsdoc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ module.exports = {
4040
includePattern: '\\.js$'
4141
},
4242
templates: {
43-
copyright: 'Copyright 2019 Google, LLC.',
43+
copyright: 'Copyright 2020 Google LLC',
4444
includeDate: false,
4545
sourceFiles: false,
4646
systemName: '@google-cloud/automl',
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"enable-source-maps": true,
3+
"throw-deprecation": true,
4+
"timeout": 10000
5+
}

packages/google-cloud-automl/.prettierrc.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// you may not use this file except in compliance with the License.
55
// You may obtain a copy of the License at
66
//
7-
// http://www.apache.org/licenses/LICENSE-2.0
7+
// https://www.apache.org/licenses/LICENSE-2.0
88
//
99
// Unless required by applicable law or agreed to in writing, software
1010
// distributed under the License is distributed on an "AS IS" BASIS,

packages/google-cloud-automl/protos/protos.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
2929

3030
// Exported root namespace
31-
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
31+
var $root = $protobuf.roots._google_cloud_automl_1_11_0_protos || ($protobuf.roots._google_cloud_automl_1_11_0_protos = {});
3232

3333
$root.google = (function() {
3434

packages/google-cloud-automl/synth.metadata

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
{
2-
"updateTime": "2020-04-02T11:12:17.121671Z",
2+
"updateTime": "2020-04-07T11:33:25.441508Z",
33
"sources": [
44
{
55
"git": {
66
"name": "googleapis",
77
"remote": "https://github.com/googleapis/googleapis.git",
8-
"sha": "75047719f704d61f405cac6d7439637ab36c1232",
9-
"internalRef": "304305096"
8+
"sha": "823facb4ca6a4b36b817ce955a790dcb40cf808f",
9+
"internalRef": "305155214",
10+
"log": "823facb4ca6a4b36b817ce955a790dcb40cf808f\nchore: enable gapicv2 for videointelligence/v1p3beta1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305155214\n\n6b9c969d42bcb0f8206675bd868ed7d1ddcdaef9\nAdd API for bigqueryreservation v1.\n\nPiperOrigin-RevId: 305151484\n\n514f7d27811832a9f58b83d6f6305d894b097cf6\nchore: enable gapicv2 for phishingprotection/v1beta1 API\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305126983\n\nff74d47d47280e6bbcbad1a7c82b1e0959c472ec\nfix: PHP-related fixes in BUILD.bazel and service.yamls\n\nThis PR also adds the rules for all 7 langauges in OsLogin and Kms BUILD.bazel files. Those build files were missing rules for 5 langagues, including PHP.\n\nThis PR is the prerequisite for migrating PHP synth.py scripts from artman to bazel.\n\nThe fixes in service.yaml fix regression made during proto annotation migration. This became visible only during PHP generation, because only PHP depends on the affected sections of the service.yaml config.\n\nPiperOrigin-RevId: 305108224\n\nfdbc7b1f63969307c71143a0c24fdfd02e739df6\nEnable gapicv2 for osconfig/agentendpoint/v1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305086443\n\n1490d30e1ae339570dd7826ba625a603ede91a08\nEnable gapicv2 for osconfig/v1beta\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305069755\n\n7bf824e82e5c3549642b150dc4a9579602000f34\nEnable gapicv2 for iam/credentials/v1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 305065283\n\n9ff6fd3b22f99167827e89aae7778408b5e82425\nUpdates Dataproc v1 API:\n- Adds Dataproc Jobs.SubmitJobAsOperation RPC\n- Adds SparkR and Presto job types to WorkflowTemplates\n- Adds new Optional Components\n- Clarifies usage of some APIs\n\nPiperOrigin-RevId: 305053617\n\ncad0f5137a70d0d14a8d9acbfcee98e4cd3e9662\nUpdates to Dataproc v1beta2 API:\n- Adds SparkR and Presto job types to WorkflowTemplates\n- Adds new Optional Components\n- Clarifies usage of some APIs\n\nPiperOrigin-RevId: 305053062\n\na005f045a301535eeb4c4b3fa7bb94eec9d22a8b\nAdd support for Cloud EKM to the Cloud KMS service and resource protos.\n\nPiperOrigin-RevId: 305026790\n\n5077b1e4674afdbbf11dac3f5f43d36285ba53ff\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304836531\n\nd6cb4997910eda04c0c66c0f2fd043eeaa0f660d\nchore: enable gapic v2 and proto annotation for documentai API.\n\ncommitter @summer-ji-eng\n\nPiperOrigin-RevId: 304724866\n\n490bc556608bfa5b1548c9374b06152fa33d657e\nEnable gapicv2 for devtools/remoteworkers/v1test2\n\nCommitter: @miraleung\nPiperOrigin-RevId: 304718691\n\n9f78ce31a5bd7f4a63e3cf0ddf28221557adb7ed\nEnable gapicv2 for managedidentities/v1beta1\n\nCommitter: @miraleung\nPiperOrigin-RevId: 304718676\n\n6e17d259b8e320bc51aa240cefef05ec753e2b83\ndocs: treat a dummy example URL as a string literal instead of a link\n\nPiperOrigin-RevId: 304716376\n\na8d76f99d3073aaccabdcc122c798a63e812c4fe\ndocs: change relative URLs to absolute URLs to fix broken links.\n\nPiperOrigin-RevId: 304702368\n\n65c749bc6a1d240416a0e6979381b67f97aff907\ndocs: fix formatting of some regexes and string literals.\n\nPiperOrigin-RevId: 304701150\n\n9119eefcd2b5ce845a680fa4ec4093ed733498f0\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304698702\n\n62a2a7cc33d3535638d220df238823eefcca930d\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304696461\n\n23848c8f64a5e81a239d6133378468185f1756dc\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304696192\n\n9514fa9e390a4c0715972c5b510cf4c10ad049a1\ndocs: change relative URLs to absolute URLs to fix broken links.\n\nPiperOrigin-RevId: 304695334\n\n0f7b1509a9a452808c3d07fe90fedfcea763d7d5\nfix: change config_schema_version to 2.0.0 for containeranalysis v1 gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304672648\n\n3d52f3c126fbfc31f067a7f54737b7f0dfbce163\nDialogflow weekly v2 library update:\n- Change `parent` field's resource_reference to specify child_type instead of type per client library generation requirement;\n- Change Session with its child resource pattern to support both projects/{project}/agent/sessions/{session} and projects/{project}/agent/environments/{environment}/users/{user}/sessions/{session};\n- Fix `method_signature`\n- Regular documentation update\n\nImportant updates are also posted at:\nhttps://cloud.google.com/dialogflow/docs/release-notes\n\nPiperOrigin-RevId: 304635286\n\n4a6a01ce0ead505c245d11a2ce156de34800c58f\ndocs: change a relative URL to an absolute URL to fix broken links.\n\nPiperOrigin-RevId: 304633630\n\n1b969c28a6579265e89cd35e6c2ecacc89970e2d\nchore: set Ruby namespace in proto options\n\nPiperOrigin-RevId: 304620317\n\n5378173a889f9c7d83e36e52d38a6267190de692\nAdd v1beta2 SubmitJobAsOperation RPC to Dataproc.\n\nPiperOrigin-RevId: 304594381\n\n3d5d228a58bdf875e6147b228db3159010c735ee\nEnable visibility on the GetSnapshot and GetTopicSnapshots methods\n\nPiperOrigin-RevId: 304500143\n\n1346f5c11a0376bc82c5c03259b304de52671518\nRefresh public client library for Cloud Monitoring.\nIncrease default ListTimeSeries deadline to 90s.\n\nPiperOrigin-RevId: 304467075\n\n4a6cfccb4a32cb28db7366295d90078c6af3112f\ndocs: Fix link in monitoring summary description.\n\nPiperOrigin-RevId: 304438717\n\n6e2ea9a4b63a264090f1bd4b5b25766a3f634f3a\nfix: add interface name overrides back to logging gapic config.\n\ncommitter: @hzyi-google\nPiperOrigin-RevId: 304438432\n\n01f3ccbaa66cf3ae4e3b9fd140b1ecfbe54a3ed0\nFix: Add package/namespace options for C#, Ruby and PHP in remaining protos.\n\nPiperOrigin-RevId: 304416658\n\nb89abbf12cd3c086abddcd79adb0a653349f960a\nchore(google/maps): Rename nox.py to noxfile.py\n\nupstream wip fix here: https://github.com/googleapis/gapic-generator/pull/3156\n\nPiperOrigin-RevId: 304411146\n\nbbf26d7f11fae7789b13959bf100983c496c9807\nSynchronize new proto/yaml changes.\n\nPiperOrigin-RevId: 304409906\n\n"
1011
}
1112
},
1213
{
1314
"git": {
1415
"name": "synthtool",
1516
"remote": "https://github.com/googleapis/synthtool.git",
16-
"sha": "99820243d348191bc9c634f2b48ddf65096285ed"
17+
"sha": "1df68ed6735ddce6797d0f83641a731c3c3f75b4",
18+
"log": "1df68ed6735ddce6797d0f83641a731c3c3f75b4\nfix: apache license URL (#468)\n\n\nf4a59efa54808c4b958263de87bc666ce41e415f\nfeat: Add discogapic support for GAPICBazel generation (#459)\n\n* feat: Add discogapic support for GAPICBazel generation\n\n* reformat with black\n\n* Rename source repository variable\n\nCo-authored-by: Jeffrey Rennie <[email protected]>\n"
1719
}
1820
}
1921
],

packages/google-cloud-automl/test/gapic_auto_ml_v1.ts

+33-33
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ describe('v1.AutoMlClient', () => {
329329
undefined,
330330
expectedError
331331
);
332-
assert.rejects(async () => {
332+
await assert.rejects(async () => {
333333
await client.getDataset(request);
334334
}, expectedError);
335335
assert(
@@ -446,7 +446,7 @@ describe('v1.AutoMlClient', () => {
446446
undefined,
447447
expectedError
448448
);
449-
assert.rejects(async () => {
449+
await assert.rejects(async () => {
450450
await client.updateDataset(request);
451451
}, expectedError);
452452
assert(
@@ -560,7 +560,7 @@ describe('v1.AutoMlClient', () => {
560560
undefined,
561561
expectedError
562562
);
563-
assert.rejects(async () => {
563+
await assert.rejects(async () => {
564564
await client.getAnnotationSpec(request);
565565
}, expectedError);
566566
assert(
@@ -671,7 +671,7 @@ describe('v1.AutoMlClient', () => {
671671
};
672672
const expectedError = new Error('expected');
673673
client.innerApiCalls.getModel = stubSimpleCall(undefined, expectedError);
674-
assert.rejects(async () => {
674+
await assert.rejects(async () => {
675675
await client.getModel(request);
676676
}, expectedError);
677677
assert(
@@ -788,7 +788,7 @@ describe('v1.AutoMlClient', () => {
788788
undefined,
789789
expectedError
790790
);
791-
assert.rejects(async () => {
791+
await assert.rejects(async () => {
792792
await client.updateModel(request);
793793
}, expectedError);
794794
assert(
@@ -904,7 +904,7 @@ describe('v1.AutoMlClient', () => {
904904
undefined,
905905
expectedError
906906
);
907-
assert.rejects(async () => {
907+
await assert.rejects(async () => {
908908
await client.getModelEvaluation(request);
909909
}, expectedError);
910910
assert(
@@ -1028,7 +1028,7 @@ describe('v1.AutoMlClient', () => {
10281028
undefined,
10291029
expectedError
10301030
);
1031-
assert.rejects(async () => {
1031+
await assert.rejects(async () => {
10321032
await client.createDataset(request);
10331033
}, expectedError);
10341034
assert(
@@ -1063,7 +1063,7 @@ describe('v1.AutoMlClient', () => {
10631063
expectedError
10641064
);
10651065
const [operation] = await client.createDataset(request);
1066-
assert.rejects(async () => {
1066+
await assert.rejects(async () => {
10671067
await operation.promise();
10681068
}, expectedError);
10691069
assert(
@@ -1187,7 +1187,7 @@ describe('v1.AutoMlClient', () => {
11871187
undefined,
11881188
expectedError
11891189
);
1190-
assert.rejects(async () => {
1190+
await assert.rejects(async () => {
11911191
await client.deleteDataset(request);
11921192
}, expectedError);
11931193
assert(
@@ -1222,7 +1222,7 @@ describe('v1.AutoMlClient', () => {
12221222
expectedError
12231223
);
12241224
const [operation] = await client.deleteDataset(request);
1225-
assert.rejects(async () => {
1225+
await assert.rejects(async () => {
12261226
await operation.promise();
12271227
}, expectedError);
12281228
assert(
@@ -1344,7 +1344,7 @@ describe('v1.AutoMlClient', () => {
13441344
undefined,
13451345
expectedError
13461346
);
1347-
assert.rejects(async () => {
1347+
await assert.rejects(async () => {
13481348
await client.importData(request);
13491349
}, expectedError);
13501350
assert(
@@ -1379,7 +1379,7 @@ describe('v1.AutoMlClient', () => {
13791379
expectedError
13801380
);
13811381
const [operation] = await client.importData(request);
1382-
assert.rejects(async () => {
1382+
await assert.rejects(async () => {
13831383
await operation.promise();
13841384
}, expectedError);
13851385
assert(
@@ -1501,7 +1501,7 @@ describe('v1.AutoMlClient', () => {
15011501
undefined,
15021502
expectedError
15031503
);
1504-
assert.rejects(async () => {
1504+
await assert.rejects(async () => {
15051505
await client.exportData(request);
15061506
}, expectedError);
15071507
assert(
@@ -1536,7 +1536,7 @@ describe('v1.AutoMlClient', () => {
15361536
expectedError
15371537
);
15381538
const [operation] = await client.exportData(request);
1539-
assert.rejects(async () => {
1539+
await assert.rejects(async () => {
15401540
await operation.promise();
15411541
}, expectedError);
15421542
assert(
@@ -1658,7 +1658,7 @@ describe('v1.AutoMlClient', () => {
16581658
undefined,
16591659
expectedError
16601660
);
1661-
assert.rejects(async () => {
1661+
await assert.rejects(async () => {
16621662
await client.createModel(request);
16631663
}, expectedError);
16641664
assert(
@@ -1693,7 +1693,7 @@ describe('v1.AutoMlClient', () => {
16931693
expectedError
16941694
);
16951695
const [operation] = await client.createModel(request);
1696-
assert.rejects(async () => {
1696+
await assert.rejects(async () => {
16971697
await operation.promise();
16981698
}, expectedError);
16991699
assert(
@@ -1815,7 +1815,7 @@ describe('v1.AutoMlClient', () => {
18151815
undefined,
18161816
expectedError
18171817
);
1818-
assert.rejects(async () => {
1818+
await assert.rejects(async () => {
18191819
await client.deleteModel(request);
18201820
}, expectedError);
18211821
assert(
@@ -1850,7 +1850,7 @@ describe('v1.AutoMlClient', () => {
18501850
expectedError
18511851
);
18521852
const [operation] = await client.deleteModel(request);
1853-
assert.rejects(async () => {
1853+
await assert.rejects(async () => {
18541854
await operation.promise();
18551855
}, expectedError);
18561856
assert(
@@ -1972,7 +1972,7 @@ describe('v1.AutoMlClient', () => {
19721972
undefined,
19731973
expectedError
19741974
);
1975-
assert.rejects(async () => {
1975+
await assert.rejects(async () => {
19761976
await client.deployModel(request);
19771977
}, expectedError);
19781978
assert(
@@ -2007,7 +2007,7 @@ describe('v1.AutoMlClient', () => {
20072007
expectedError
20082008
);
20092009
const [operation] = await client.deployModel(request);
2010-
assert.rejects(async () => {
2010+
await assert.rejects(async () => {
20112011
await operation.promise();
20122012
}, expectedError);
20132013
assert(
@@ -2131,7 +2131,7 @@ describe('v1.AutoMlClient', () => {
21312131
undefined,
21322132
expectedError
21332133
);
2134-
assert.rejects(async () => {
2134+
await assert.rejects(async () => {
21352135
await client.undeployModel(request);
21362136
}, expectedError);
21372137
assert(
@@ -2166,7 +2166,7 @@ describe('v1.AutoMlClient', () => {
21662166
expectedError
21672167
);
21682168
const [operation] = await client.undeployModel(request);
2169-
assert.rejects(async () => {
2169+
await assert.rejects(async () => {
21702170
await operation.promise();
21712171
}, expectedError);
21722172
assert(
@@ -2288,7 +2288,7 @@ describe('v1.AutoMlClient', () => {
22882288
undefined,
22892289
expectedError
22902290
);
2291-
assert.rejects(async () => {
2291+
await assert.rejects(async () => {
22922292
await client.exportModel(request);
22932293
}, expectedError);
22942294
assert(
@@ -2323,7 +2323,7 @@ describe('v1.AutoMlClient', () => {
23232323
expectedError
23242324
);
23252325
const [operation] = await client.exportModel(request);
2326-
assert.rejects(async () => {
2326+
await assert.rejects(async () => {
23272327
await operation.promise();
23282328
}, expectedError);
23292329
assert(
@@ -2441,7 +2441,7 @@ describe('v1.AutoMlClient', () => {
24412441
undefined,
24422442
expectedError
24432443
);
2444-
assert.rejects(async () => {
2444+
await assert.rejects(async () => {
24452445
await client.listDatasets(request);
24462446
}, expectedError);
24472447
assert(
@@ -2528,7 +2528,7 @@ describe('v1.AutoMlClient', () => {
25282528
reject(err);
25292529
});
25302530
});
2531-
assert.rejects(async () => {
2531+
await assert.rejects(async () => {
25322532
await promise;
25332533
}, expectedError);
25342534
assert(
@@ -2601,7 +2601,7 @@ describe('v1.AutoMlClient', () => {
26012601
expectedError
26022602
);
26032603
const iterable = client.listDatasetsAsync(request);
2604-
assert.rejects(async () => {
2604+
await assert.rejects(async () => {
26052605
const responses: protos.google.cloud.automl.v1.IDataset[] = [];
26062606
for await (const resource of iterable) {
26072607
responses.push(resource!);
@@ -2729,7 +2729,7 @@ describe('v1.AutoMlClient', () => {
27292729
undefined,
27302730
expectedError
27312731
);
2732-
assert.rejects(async () => {
2732+
await assert.rejects(async () => {
27332733
await client.listModels(request);
27342734
}, expectedError);
27352735
assert(
@@ -2815,7 +2815,7 @@ describe('v1.AutoMlClient', () => {
28152815
reject(err);
28162816
});
28172817
});
2818-
assert.rejects(async () => {
2818+
await assert.rejects(async () => {
28192819
await promise;
28202820
}, expectedError);
28212821
assert(
@@ -2887,7 +2887,7 @@ describe('v1.AutoMlClient', () => {
28872887
expectedError
28882888
);
28892889
const iterable = client.listModelsAsync(request);
2890-
assert.rejects(async () => {
2890+
await assert.rejects(async () => {
28912891
const responses: protos.google.cloud.automl.v1.IModel[] = [];
28922892
for await (const resource of iterable) {
28932893
responses.push(resource!);
@@ -3029,7 +3029,7 @@ describe('v1.AutoMlClient', () => {
30293029
undefined,
30303030
expectedError
30313031
);
3032-
assert.rejects(async () => {
3032+
await assert.rejects(async () => {
30333033
await client.listModelEvaluations(request);
30343034
}, expectedError);
30353035
assert(
@@ -3128,7 +3128,7 @@ describe('v1.AutoMlClient', () => {
31283128
reject(err);
31293129
});
31303130
});
3131-
assert.rejects(async () => {
3131+
await assert.rejects(async () => {
31323132
await promise;
31333133
}, expectedError);
31343134
assert(
@@ -3207,7 +3207,7 @@ describe('v1.AutoMlClient', () => {
32073207
expectedError
32083208
);
32093209
const iterable = client.listModelEvaluationsAsync(request);
3210-
assert.rejects(async () => {
3210+
await assert.rejects(async () => {
32113211
const responses: protos.google.cloud.automl.v1.IModelEvaluation[] = [];
32123212
for await (const resource of iterable) {
32133213
responses.push(resource!);

0 commit comments

Comments
 (0)