Skip to content

Commit 132240f

Browse files
gcf-owl-bot[bot]feywindsofisl
authored
feat: add protobufjs 2023 edition support (#6304)
* chore: upgrade typescript generator to 4.9.0 chore: updated gapic-generator-typescript WORKSPACE section to match the latest from the generator chore: added Required Typecheck Performance Selection section to .bazelrc feat: add protobufjs 2023 edition support feat: selective gapic support for typescript generation fix: catch dangling promises PiperOrigin-RevId: 751558264 Source-Link: googleapis/googleapis@f132131 Source-Link: googleapis/googleapis-gen@7aaa93d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLXN0aXRjaGVyLy5Pd2xCb3QueWFtbCIsImgiOiI3YWFhOTNkOWQ0YmJkMGM4N2FkYzE4YjRkYzAzODRiNzgzODAwYTNiIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvLXRyYW5zY29kZXIvLk93bEJvdC55YW1sIiwiaCI6IjdhYWE5M2Q5ZDRiYmQwYzg3YWRjMThiNGRjMDM4NGI3ODM4MDBhM2IifQ== Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpZGVvaW50ZWxsaWdlbmNlLy5Pd2xCb3QueWFtbCIsImgiOiI3YWFhOTNkOWQ0YmJkMGM4N2FkYzE4YjRkYzAzODRiNzgzODAwYTNiIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZpc2lvbi8uT3dsQm90LnlhbWwiLCJoIjoiN2FhYTkzZDlkNGJiZDBjODdhZGMxOGI0ZGMwMzg0Yjc4MzgwMGEzYiJ9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZtbWlncmF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiI3YWFhOTNkOWQ0YmJkMGM4N2FkYzE4YjRkYzAzODRiNzgzODAwYTNiIn0= Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXZtd2FyZWVuZ2lu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mJkMGM4N2FkYzE4YjRkYzAzODRiNzgzODAwYTNiIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Megan Potter <[email protected]> Co-authored-by: sofisl <[email protected]>
1 parent 81a1577 commit 132240f

139 files changed

Lines changed: 3766 additions & 3902 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/google-cloud-video-stitcher/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
4444
1. [Select or create a Cloud Platform project][projects].
4545
1. [Enable billing for your project][billing].
4646
1. [Enable the Video Stitcher API API][enable_api].
47-
1. [Set up authentication with a service account][auth] so you can access the
47+
1. [Set up authentication][auth] so you can access the
4848
API from your local workstation.
4949

5050
### Installing the client library
@@ -162,4 +162,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
162162
[projects]: https://console.cloud.google.com/project
163163
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
164164
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=videostitcher.googleapis.com
165-
[auth]: https://cloud.google.com/docs/authentication/getting-started
165+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local

packages/google-cloud-video-stitcher/protos/protos.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/google-cloud-video-stitcher/src/v1/video_stitcher_service_client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6616,7 +6616,7 @@ export class VideoStitcherServiceClient {
66166616
this._log.info('ending gRPC channel');
66176617
this._terminated = true;
66186618
stub.close();
6619-
this.operationsClient.close();
6619+
void this.operationsClient.close();
66206620
});
66216621
}
66226622
return Promise.resolve();

packages/google-cloud-video-stitcher/test/gapic_video_stitcher_service_v1.ts

Lines changed: 100 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,14 @@ describe('v1.VideoStitcherServiceClient', () => {
302302
throw err;
303303
});
304304
assert(client.videoStitcherServiceStub);
305-
client.close().then(() => {
306-
done();
307-
});
305+
client
306+
.close()
307+
.then(() => {
308+
done();
309+
})
310+
.catch(err => {
311+
throw err;
312+
});
308313
});
309314

310315
it('has close method for the non-initialized client', done => {
@@ -314,9 +319,14 @@ describe('v1.VideoStitcherServiceClient', () => {
314319
projectId: 'bogus',
315320
});
316321
assert.strictEqual(client.videoStitcherServiceStub, undefined);
317-
client.close().then(() => {
318-
done();
319-
});
322+
client
323+
.close()
324+
.then(() => {
325+
done();
326+
})
327+
.catch(err => {
328+
throw err;
329+
});
320330
});
321331

322332
it('has getProjectId method', async () => {
@@ -482,7 +492,9 @@ describe('v1.VideoStitcherServiceClient', () => {
482492
);
483493
request.name = defaultValue1;
484494
const expectedError = new Error('The client has already been closed.');
485-
client.close();
495+
client.close().catch(err => {
496+
throw err;
497+
});
486498
await assert.rejects(client.getCdnKey(request), expectedError);
487499
});
488500
});
@@ -616,7 +628,9 @@ describe('v1.VideoStitcherServiceClient', () => {
616628
);
617629
request.parent = defaultValue1;
618630
const expectedError = new Error('The client has already been closed.');
619-
client.close();
631+
client.close().catch(err => {
632+
throw err;
633+
});
620634
await assert.rejects(client.createVodSession(request), expectedError);
621635
});
622636
});
@@ -750,7 +764,9 @@ describe('v1.VideoStitcherServiceClient', () => {
750764
);
751765
request.name = defaultValue1;
752766
const expectedError = new Error('The client has already been closed.');
753-
client.close();
767+
client.close().catch(err => {
768+
throw err;
769+
});
754770
await assert.rejects(client.getVodSession(request), expectedError);
755771
});
756772
});
@@ -885,7 +901,9 @@ describe('v1.VideoStitcherServiceClient', () => {
885901
);
886902
request.name = defaultValue1;
887903
const expectedError = new Error('The client has already been closed.');
888-
client.close();
904+
client.close().catch(err => {
905+
throw err;
906+
});
889907
await assert.rejects(client.getVodStitchDetail(request), expectedError);
890908
});
891909
});
@@ -1019,7 +1037,9 @@ describe('v1.VideoStitcherServiceClient', () => {
10191037
);
10201038
request.name = defaultValue1;
10211039
const expectedError = new Error('The client has already been closed.');
1022-
client.close();
1040+
client.close().catch(err => {
1041+
throw err;
1042+
});
10231043
await assert.rejects(client.getVodAdTagDetail(request), expectedError);
10241044
});
10251045
});
@@ -1154,7 +1174,9 @@ describe('v1.VideoStitcherServiceClient', () => {
11541174
);
11551175
request.name = defaultValue1;
11561176
const expectedError = new Error('The client has already been closed.');
1157-
client.close();
1177+
client.close().catch(err => {
1178+
throw err;
1179+
});
11581180
await assert.rejects(client.getLiveAdTagDetail(request), expectedError);
11591181
});
11601182
});
@@ -1285,7 +1307,9 @@ describe('v1.VideoStitcherServiceClient', () => {
12851307
);
12861308
request.name = defaultValue1;
12871309
const expectedError = new Error('The client has already been closed.');
1288-
client.close();
1310+
client.close().catch(err => {
1311+
throw err;
1312+
});
12891313
await assert.rejects(client.getSlate(request), expectedError);
12901314
});
12911315
});
@@ -1419,7 +1443,9 @@ describe('v1.VideoStitcherServiceClient', () => {
14191443
);
14201444
request.parent = defaultValue1;
14211445
const expectedError = new Error('The client has already been closed.');
1422-
client.close();
1446+
client.close().catch(err => {
1447+
throw err;
1448+
});
14231449
await assert.rejects(client.createLiveSession(request), expectedError);
14241450
});
14251451
});
@@ -1553,7 +1579,9 @@ describe('v1.VideoStitcherServiceClient', () => {
15531579
);
15541580
request.name = defaultValue1;
15551581
const expectedError = new Error('The client has already been closed.');
1556-
client.close();
1582+
client.close().catch(err => {
1583+
throw err;
1584+
});
15571585
await assert.rejects(client.getLiveSession(request), expectedError);
15581586
});
15591587
});
@@ -1687,7 +1715,9 @@ describe('v1.VideoStitcherServiceClient', () => {
16871715
);
16881716
request.name = defaultValue1;
16891717
const expectedError = new Error('The client has already been closed.');
1690-
client.close();
1718+
client.close().catch(err => {
1719+
throw err;
1720+
});
16911721
await assert.rejects(client.getLiveConfig(request), expectedError);
16921722
});
16931723
});
@@ -1821,7 +1851,9 @@ describe('v1.VideoStitcherServiceClient', () => {
18211851
);
18221852
request.name = defaultValue1;
18231853
const expectedError = new Error('The client has already been closed.');
1824-
client.close();
1854+
client.close().catch(err => {
1855+
throw err;
1856+
});
18251857
await assert.rejects(client.getVodConfig(request), expectedError);
18261858
});
18271859
});
@@ -6613,20 +6645,24 @@ describe('v1.VideoStitcherServiceClient', () => {
66136645
.stub()
66146646
.callsArgWith(2, null, expectedResponse);
66156647
const promise = new Promise((resolve, reject) => {
6616-
client.operationsClient.getOperation(
6617-
request,
6618-
undefined,
6619-
(
6620-
err?: Error | null,
6621-
result?: operationsProtos.google.longrunning.Operation | null
6622-
) => {
6623-
if (err) {
6624-
reject(err);
6625-
} else {
6626-
resolve(result);
6648+
client.operationsClient
6649+
.getOperation(
6650+
request,
6651+
undefined,
6652+
(
6653+
err?: Error | null,
6654+
result?: operationsProtos.google.longrunning.Operation | null
6655+
) => {
6656+
if (err) {
6657+
reject(err);
6658+
} else {
6659+
resolve(result);
6660+
}
66276661
}
6628-
}
6629-
);
6662+
)
6663+
.catch(err => {
6664+
throw err;
6665+
});
66306666
});
66316667
const response = await promise;
66326668
assert.deepStrictEqual(response, expectedResponse);
@@ -6696,20 +6732,24 @@ describe('v1.VideoStitcherServiceClient', () => {
66966732
.stub()
66976733
.callsArgWith(2, null, expectedResponse);
66986734
const promise = new Promise((resolve, reject) => {
6699-
client.operationsClient.cancelOperation(
6700-
request,
6701-
undefined,
6702-
(
6703-
err?: Error | null,
6704-
result?: protos.google.protobuf.Empty | null
6705-
) => {
6706-
if (err) {
6707-
reject(err);
6708-
} else {
6709-
resolve(result);
6735+
client.operationsClient
6736+
.cancelOperation(
6737+
request,
6738+
undefined,
6739+
(
6740+
err?: Error | null,
6741+
result?: protos.google.protobuf.Empty | null
6742+
) => {
6743+
if (err) {
6744+
reject(err);
6745+
} else {
6746+
resolve(result);
6747+
}
67106748
}
6711-
}
6712-
);
6749+
)
6750+
.catch(err => {
6751+
throw err;
6752+
});
67136753
});
67146754
const response = await promise;
67156755
assert.deepStrictEqual(response, expectedResponse);
@@ -6779,20 +6819,24 @@ describe('v1.VideoStitcherServiceClient', () => {
67796819
.stub()
67806820
.callsArgWith(2, null, expectedResponse);
67816821
const promise = new Promise((resolve, reject) => {
6782-
client.operationsClient.deleteOperation(
6783-
request,
6784-
undefined,
6785-
(
6786-
err?: Error | null,
6787-
result?: protos.google.protobuf.Empty | null
6788-
) => {
6789-
if (err) {
6790-
reject(err);
6791-
} else {
6792-
resolve(result);
6822+
client.operationsClient
6823+
.deleteOperation(
6824+
request,
6825+
undefined,
6826+
(
6827+
err?: Error | null,
6828+
result?: protos.google.protobuf.Empty | null
6829+
) => {
6830+
if (err) {
6831+
reject(err);
6832+
} else {
6833+
resolve(result);
6834+
}
67936835
}
6794-
}
6795-
);
6836+
)
6837+
.catch(err => {
6838+
throw err;
6839+
});
67966840
});
67976841
const response = await promise;
67986842
assert.deepStrictEqual(response, expectedResponse);

packages/google-cloud-video-transcoder/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained].
4444
1. [Select or create a Cloud Platform project][projects].
4545
1. [Enable billing for your project][billing].
4646
1. [Enable the Transcoder API API][enable_api].
47-
1. [Set up authentication with a service account][auth] so you can access the
47+
1. [Set up authentication][auth] so you can access the
4848
API from your local workstation.
4949

5050
### Installing the client library
@@ -164,4 +164,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE)
164164
[projects]: https://console.cloud.google.com/project
165165
[billing]: https://support.google.com/cloud/answer/6293499#enable-billing
166166
[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=transcoder.googleapis.com
167-
[auth]: https://cloud.google.com/docs/authentication/getting-started
167+
[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local

packages/google-cloud-video-transcoder/protos/protos.json

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)