Skip to content

Commit b406e80

Browse files
authoredJan 16, 2025··
chore(codegen): move nested client generation to end (#6812)
1 parent 5c53685 commit b406e80

File tree

3 files changed

+59
-53
lines changed

3 files changed

+59
-53
lines changed
 

‎packages/nested-clients/src/submodules/sso-oidc/protocols/Aws_restJson1.ts

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
11
// smithy-typescript generated code
2-
import { CreateTokenCommandInput, CreateTokenCommandOutput } from "../commands/CreateTokenCommand";
3-
import { SSOOIDCServiceException as __BaseException } from "../models/SSOOIDCServiceException";
4-
import {
5-
AccessDeniedException,
6-
AuthorizationPendingException,
7-
ExpiredTokenException,
8-
InternalServerException,
9-
InvalidClientException,
10-
InvalidGrantException,
11-
InvalidRequestException,
12-
InvalidScopeException,
13-
SlowDownException,
14-
UnauthorizedClientException,
15-
UnsupportedGrantTypeException,
16-
} from "../models/models_0";
172
import { loadRestJsonErrorCode, parseJsonBody as parseBody, parseJsonErrorBody as parseErrorBody } from "@aws-sdk/core";
183
import { requestBuilder as rb } from "@smithy/core";
194
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
205
import {
6+
_json,
7+
collectBody,
218
decorateServiceException as __decorateServiceException,
229
expectInt32 as __expectInt32,
2310
expectNonNull as __expectNonNull,
2411
expectObject as __expectObject,
2512
expectString as __expectString,
26-
_json,
27-
collectBody,
2813
map,
2914
take,
3015
withBaseException,
@@ -35,6 +20,22 @@ import {
3520
SerdeContext as __SerdeContext,
3621
} from "@smithy/types";
3722

23+
import { CreateTokenCommandInput, CreateTokenCommandOutput } from "../commands/CreateTokenCommand";
24+
import {
25+
AccessDeniedException,
26+
AuthorizationPendingException,
27+
ExpiredTokenException,
28+
InternalServerException,
29+
InvalidClientException,
30+
InvalidGrantException,
31+
InvalidRequestException,
32+
InvalidScopeException,
33+
SlowDownException,
34+
UnauthorizedClientException,
35+
UnsupportedGrantTypeException,
36+
} from "../models/models_0";
37+
import { SSOOIDCServiceException as __BaseException } from "../models/SSOOIDCServiceException";
38+
3839
/**
3940
* serializeAws_restJson1CreateTokenCommand
4041
*/

‎packages/nested-clients/src/submodules/sts/protocols/Aws_query.ts

+36-35
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,34 @@
11
// smithy-typescript generated code
2+
import { parseXmlBody as parseBody, parseXmlErrorBody as parseErrorBody } from "@aws-sdk/core";
3+
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
4+
import {
5+
collectBody,
6+
decorateServiceException as __decorateServiceException,
7+
expectNonNull as __expectNonNull,
8+
expectString as __expectString,
9+
extendedEncodeURIComponent as __extendedEncodeURIComponent,
10+
parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset,
11+
strictParseInt32 as __strictParseInt32,
12+
withBaseException,
13+
} from "@smithy/smithy-client";
14+
import {
15+
Endpoint as __Endpoint,
16+
HeaderBag as __HeaderBag,
17+
ResponseMetadata as __ResponseMetadata,
18+
SerdeContext as __SerdeContext,
19+
} from "@smithy/types";
20+
221
import { AssumeRoleCommandInput, AssumeRoleCommandOutput } from "../commands/AssumeRoleCommand";
322
import {
423
AssumeRoleWithWebIdentityCommandInput,
524
AssumeRoleWithWebIdentityCommandOutput,
625
} from "../commands/AssumeRoleWithWebIdentityCommand";
7-
import { STSServiceException as __BaseException } from "../models/STSServiceException";
826
import {
27+
AssumedRoleUser,
928
AssumeRoleRequest,
1029
AssumeRoleResponse,
1130
AssumeRoleWithWebIdentityRequest,
1231
AssumeRoleWithWebIdentityResponse,
13-
AssumedRoleUser,
1432
Credentials,
1533
ExpiredTokenException,
1634
IDPCommunicationErrorException,
@@ -23,24 +41,7 @@ import {
2341
RegionDisabledException,
2442
Tag,
2543
} from "../models/models_0";
26-
import { parseXmlBody as parseBody, parseXmlErrorBody as parseErrorBody } from "@aws-sdk/core";
27-
import { HttpRequest as __HttpRequest, HttpResponse as __HttpResponse } from "@smithy/protocol-http";
28-
import {
29-
decorateServiceException as __decorateServiceException,
30-
expectNonNull as __expectNonNull,
31-
expectString as __expectString,
32-
extendedEncodeURIComponent as __extendedEncodeURIComponent,
33-
parseRfc3339DateTimeWithOffset as __parseRfc3339DateTimeWithOffset,
34-
strictParseInt32 as __strictParseInt32,
35-
collectBody,
36-
withBaseException,
37-
} from "@smithy/smithy-client";
38-
import {
39-
Endpoint as __Endpoint,
40-
HeaderBag as __HeaderBag,
41-
ResponseMetadata as __ResponseMetadata,
42-
SerdeContext as __SerdeContext,
43-
} from "@smithy/types";
44+
import { STSServiceException as __BaseException } from "../models/STSServiceException";
4445

4546
/**
4647
* serializeAws_queryAssumeRoleCommand
@@ -383,7 +384,7 @@ const se_AssumeRoleWithWebIdentityRequest = (input: AssumeRoleWithWebIdentityReq
383384
const se_policyDescriptorListType = (input: PolicyDescriptorType[], context: __SerdeContext): any => {
384385
const entries: any = {};
385386
let counter = 1;
386-
for (let entry of input) {
387+
for (const entry of input) {
387388
if (entry === null) {
388389
continue;
389390
}
@@ -427,7 +428,7 @@ const se_ProvidedContext = (input: ProvidedContext, context: __SerdeContext): an
427428
const se_ProvidedContextsListType = (input: ProvidedContext[], context: __SerdeContext): any => {
428429
const entries: any = {};
429430
let counter = 1;
430-
for (let entry of input) {
431+
for (const entry of input) {
431432
if (entry === null) {
432433
continue;
433434
}
@@ -460,7 +461,7 @@ const se_Tag = (input: Tag, context: __SerdeContext): any => {
460461
const se_tagKeyListType = (input: string[], context: __SerdeContext): any => {
461462
const entries: any = {};
462463
let counter = 1;
463-
for (let entry of input) {
464+
for (const entry of input) {
464465
if (entry === null) {
465466
continue;
466467
}
@@ -476,7 +477,7 @@ const se_tagKeyListType = (input: string[], context: __SerdeContext): any => {
476477
const se_tagListType = (input: Tag[], context: __SerdeContext): any => {
477478
const entries: any = {};
478479
let counter = 1;
479-
for (let entry of input) {
480+
for (const entry of input) {
480481
if (entry === null) {
481482
continue;
482483
}
@@ -493,7 +494,7 @@ const se_tagListType = (input: Tag[], context: __SerdeContext): any => {
493494
* deserializeAws_queryAssumedRoleUser
494495
*/
495496
const de_AssumedRoleUser = (output: any, context: __SerdeContext): AssumedRoleUser => {
496-
let contents: any = {};
497+
const contents: any = {};
497498
if (output[_ARI] != null) {
498499
contents[_ARI] = __expectString(output[_ARI]);
499500
}
@@ -507,7 +508,7 @@ const de_AssumedRoleUser = (output: any, context: __SerdeContext): AssumedRoleUs
507508
* deserializeAws_queryAssumeRoleResponse
508509
*/
509510
const de_AssumeRoleResponse = (output: any, context: __SerdeContext): AssumeRoleResponse => {
510-
let contents: any = {};
511+
const contents: any = {};
511512
if (output[_C] != null) {
512513
contents[_C] = de_Credentials(output[_C], context);
513514
}
@@ -530,7 +531,7 @@ const de_AssumeRoleWithWebIdentityResponse = (
530531
output: any,
531532
context: __SerdeContext
532533
): AssumeRoleWithWebIdentityResponse => {
533-
let contents: any = {};
534+
const contents: any = {};
534535
if (output[_C] != null) {
535536
contents[_C] = de_Credentials(output[_C], context);
536537
}
@@ -559,7 +560,7 @@ const de_AssumeRoleWithWebIdentityResponse = (
559560
* deserializeAws_queryCredentials
560561
*/
561562
const de_Credentials = (output: any, context: __SerdeContext): Credentials => {
562-
let contents: any = {};
563+
const contents: any = {};
563564
if (output[_AKI] != null) {
564565
contents[_AKI] = __expectString(output[_AKI]);
565566
}
@@ -579,7 +580,7 @@ const de_Credentials = (output: any, context: __SerdeContext): Credentials => {
579580
* deserializeAws_queryExpiredTokenException
580581
*/
581582
const de_ExpiredTokenException = (output: any, context: __SerdeContext): ExpiredTokenException => {
582-
let contents: any = {};
583+
const contents: any = {};
583584
if (output[_m] != null) {
584585
contents[_m] = __expectString(output[_m]);
585586
}
@@ -590,7 +591,7 @@ const de_ExpiredTokenException = (output: any, context: __SerdeContext): Expired
590591
* deserializeAws_queryIDPCommunicationErrorException
591592
*/
592593
const de_IDPCommunicationErrorException = (output: any, context: __SerdeContext): IDPCommunicationErrorException => {
593-
let contents: any = {};
594+
const contents: any = {};
594595
if (output[_m] != null) {
595596
contents[_m] = __expectString(output[_m]);
596597
}
@@ -601,7 +602,7 @@ const de_IDPCommunicationErrorException = (output: any, context: __SerdeContext)
601602
* deserializeAws_queryIDPRejectedClaimException
602603
*/
603604
const de_IDPRejectedClaimException = (output: any, context: __SerdeContext): IDPRejectedClaimException => {
604-
let contents: any = {};
605+
const contents: any = {};
605606
if (output[_m] != null) {
606607
contents[_m] = __expectString(output[_m]);
607608
}
@@ -612,7 +613,7 @@ const de_IDPRejectedClaimException = (output: any, context: __SerdeContext): IDP
612613
* deserializeAws_queryInvalidIdentityTokenException
613614
*/
614615
const de_InvalidIdentityTokenException = (output: any, context: __SerdeContext): InvalidIdentityTokenException => {
615-
let contents: any = {};
616+
const contents: any = {};
616617
if (output[_m] != null) {
617618
contents[_m] = __expectString(output[_m]);
618619
}
@@ -626,7 +627,7 @@ const de_MalformedPolicyDocumentException = (
626627
output: any,
627628
context: __SerdeContext
628629
): MalformedPolicyDocumentException => {
629-
let contents: any = {};
630+
const contents: any = {};
630631
if (output[_m] != null) {
631632
contents[_m] = __expectString(output[_m]);
632633
}
@@ -637,7 +638,7 @@ const de_MalformedPolicyDocumentException = (
637638
* deserializeAws_queryPackedPolicyTooLargeException
638639
*/
639640
const de_PackedPolicyTooLargeException = (output: any, context: __SerdeContext): PackedPolicyTooLargeException => {
640-
let contents: any = {};
641+
const contents: any = {};
641642
if (output[_m] != null) {
642643
contents[_m] = __expectString(output[_m]);
643644
}
@@ -648,7 +649,7 @@ const de_PackedPolicyTooLargeException = (output: any, context: __SerdeContext):
648649
* deserializeAws_queryRegionDisabledException
649650
*/
650651
const de_RegionDisabledException = (output: any, context: __SerdeContext): RegionDisabledException => {
651-
let contents: any = {};
652+
const contents: any = {};
652653
if (output[_m] != null) {
653654
contents[_m] = __expectString(output[_m]);
654655
}

‎scripts/generate-clients/index.js

+5-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ const {
100100

101101
if (!protocolTestsOnly) {
102102
await generateClients(models || globs || DEFAULT_CODE_GEN_INPUT_DIR, batchSize);
103-
await generateNestedClients();
104103
}
105104

106105
if (!noPrivateClients) {
@@ -144,6 +143,11 @@ const {
144143
}
145144

146145
require("./customizations/workspaces-thin-client")();
146+
147+
if (!protocolTestsOnly) {
148+
await generateNestedClients();
149+
}
150+
147151
await spawnProcess("yarn", ["install", "--no-immutable"], {
148152
cwd: REPO_ROOT,
149153
stdio: "inherit",

0 commit comments

Comments
 (0)
Please sign in to comment.