Skip to content

Commit 74a4554

Browse files
authored
Bump prettier to 3.2.5 (#1265)
1 parent 0ee4d33 commit 74a4554

78 files changed

Lines changed: 847 additions & 1658 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.

.changeset/fuzzy-coats-rush.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
"karma-sourcemap-loader": "0.3.8",
6060
"karma-typescript": "5.5.3",
6161
"karma-webpack": "5.0.0",
62-
"prettier": "2.2.1",
62+
"prettier": "3.2.5",
6363
"puppeteer": "^19.2.0",
6464
"ts-jest": "28.0.5",
6565
"turbo": "latest",

packages/config-resolver/src/regionInfo/getResolvedHostname.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,5 @@ export const getResolvedHostname = (
1616
regionHostname
1717
? regionHostname
1818
: partitionHostname
19-
? partitionHostname.replace("{region}", resolvedRegion)
20-
: undefined;
19+
? partitionHostname.replace("{region}", resolvedRegion)
20+
: undefined;

packages/core/src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ interface HttpAuthSchemeEndpointRuleSetPluginOptions<
3030
TConfig extends object,
3131
TContext extends HandlerExecutionContext,
3232
TParameters extends HttpAuthSchemeParameters,
33-
TInput extends object
33+
TInput extends object,
3434
> {
3535
httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider<TConfig, TContext, TParameters, TInput>;
3636
identityProviderConfigProvider: (config: TConfig) => Promise<IdentityProviderConfig>;
@@ -43,7 +43,7 @@ export const getHttpAuthSchemeEndpointRuleSetPlugin = <
4343
TConfig extends object,
4444
TContext extends HandlerExecutionContext,
4545
TParameters extends HttpAuthSchemeParameters,
46-
TInput extends object
46+
TInput extends object,
4747
>(
4848
config: TConfig & PreviouslyResolved<TParameters>,
4949
{

packages/core/src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ interface HttpAuthSchemePluginOptions<
3030
TConfig extends object,
3131
TContext extends HandlerExecutionContext,
3232
TParameters extends HttpAuthSchemeParameters,
33-
TInput extends object
33+
TInput extends object,
3434
> {
3535
httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider<TConfig, TContext, TParameters, TInput>;
3636
identityProviderConfigProvider: (config: TConfig) => Promise<IdentityProviderConfig>;
@@ -43,7 +43,7 @@ export const getHttpAuthSchemePlugin = <
4343
TConfig extends object,
4444
TContext extends HandlerExecutionContext,
4545
TParameters extends HttpAuthSchemeParameters,
46-
TInput extends object
46+
TInput extends object,
4747
>(
4848
config: TConfig & PreviouslyResolved<TParameters>,
4949
{

packages/core/src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts

Lines changed: 47 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ interface HttpAuthSchemeMiddlewareOptions<
3030
TConfig extends object,
3131
TContext extends HandlerExecutionContext,
3232
TParameters extends HttpAuthSchemeParameters,
33-
TInput extends object
33+
TInput extends object,
3434
> {
3535
httpAuthSchemeParametersProvider: HttpAuthSchemeParametersProvider<TConfig, TContext, TParameters, TInput>;
3636
identityProviderConfigProvider: (config: TConfig) => Promise<IdentityProviderConfig>;
@@ -65,50 +65,51 @@ function convertHttpAuthSchemesToMap(httpAuthSchemes: HttpAuthScheme[]): Map<Htt
6565
/**
6666
* @internal
6767
*/
68-
export const httpAuthSchemeMiddleware = <
69-
TInput extends object,
70-
Output extends object,
71-
TConfig extends object,
72-
TContext extends HttpAuthSchemeMiddlewareHandlerExecutionContext,
73-
TParameters extends HttpAuthSchemeParameters
74-
>(
75-
config: TConfig & PreviouslyResolved<TParameters>,
76-
mwOptions: HttpAuthSchemeMiddlewareOptions<TConfig, TContext, TParameters, TInput>
77-
): SerializeMiddleware<TInput, Output> => (
78-
next: SerializeHandler<TInput, Output>,
79-
context: HttpAuthSchemeMiddlewareHandlerExecutionContext
80-
): SerializeHandler<TInput, Output> => async (
81-
args: SerializeHandlerArguments<TInput>
82-
): Promise<SerializeHandlerOutput<Output>> => {
83-
const options = config.httpAuthSchemeProvider(
84-
await mwOptions.httpAuthSchemeParametersProvider(config, context as TContext, args.input)
85-
);
86-
const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
87-
const smithyContext: HttpAuthSchemeMiddlewareSmithyContext = getSmithyContext(context);
88-
const failureReasons = [];
89-
for (const option of options) {
90-
const scheme = authSchemes.get(option.schemeId);
91-
if (!scheme) {
92-
failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`);
93-
continue;
68+
export const httpAuthSchemeMiddleware =
69+
<
70+
TInput extends object,
71+
Output extends object,
72+
TConfig extends object,
73+
TContext extends HttpAuthSchemeMiddlewareHandlerExecutionContext,
74+
TParameters extends HttpAuthSchemeParameters,
75+
>(
76+
config: TConfig & PreviouslyResolved<TParameters>,
77+
mwOptions: HttpAuthSchemeMiddlewareOptions<TConfig, TContext, TParameters, TInput>
78+
): SerializeMiddleware<TInput, Output> =>
79+
(
80+
next: SerializeHandler<TInput, Output>,
81+
context: HttpAuthSchemeMiddlewareHandlerExecutionContext
82+
): SerializeHandler<TInput, Output> =>
83+
async (args: SerializeHandlerArguments<TInput>): Promise<SerializeHandlerOutput<Output>> => {
84+
const options = config.httpAuthSchemeProvider(
85+
await mwOptions.httpAuthSchemeParametersProvider(config, context as TContext, args.input)
86+
);
87+
const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
88+
const smithyContext: HttpAuthSchemeMiddlewareSmithyContext = getSmithyContext(context);
89+
const failureReasons = [];
90+
for (const option of options) {
91+
const scheme = authSchemes.get(option.schemeId);
92+
if (!scheme) {
93+
failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`);
94+
continue;
95+
}
96+
const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));
97+
if (!identityProvider) {
98+
failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
99+
continue;
100+
}
101+
const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};
102+
option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
103+
option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
104+
smithyContext.selectedHttpAuthScheme = {
105+
httpAuthOption: option,
106+
identity: await identityProvider(option.identityProperties),
107+
signer: scheme.signer,
108+
};
109+
break;
94110
}
95-
const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));
96-
if (!identityProvider) {
97-
failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
98-
continue;
111+
if (!smithyContext.selectedHttpAuthScheme) {
112+
throw new Error(failureReasons.join("\n"));
99113
}
100-
const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};
101-
option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
102-
option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
103-
smithyContext.selectedHttpAuthScheme = {
104-
httpAuthOption: option,
105-
identity: await identityProvider(option.identityProperties),
106-
signer: scheme.signer,
107-
};
108-
break;
109-
}
110-
if (!smithyContext.selectedHttpAuthScheme) {
111-
throw new Error(failureReasons.join("\n"));
112-
}
113-
return next(args);
114-
};
114+
return next(args);
115+
};

packages/core/src/middleware-http-signing/httpSigningMiddleware.ts

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -38,32 +38,31 @@ const defaultSuccessHandler: SuccessHandler = (
3838
/**
3939
* @internal
4040
*/
41-
export const httpSigningMiddleware = <Input extends object, Output extends object>(
42-
config: object
43-
): FinalizeRequestMiddleware<Input, Output> => (
44-
next: FinalizeHandler<Input, Output>,
45-
context: HttpSigningMiddlewareHandlerExecutionContext
46-
): FinalizeHandler<Input, Output> => async (
47-
args: FinalizeHandlerArguments<Input>
48-
): Promise<FinalizeHandlerOutput<Output>> => {
49-
if (!HttpRequest.isInstance(args.request)) {
50-
return next(args);
51-
}
41+
export const httpSigningMiddleware =
42+
<Input extends object, Output extends object>(config: object): FinalizeRequestMiddleware<Input, Output> =>
43+
(
44+
next: FinalizeHandler<Input, Output>,
45+
context: HttpSigningMiddlewareHandlerExecutionContext
46+
): FinalizeHandler<Input, Output> =>
47+
async (args: FinalizeHandlerArguments<Input>): Promise<FinalizeHandlerOutput<Output>> => {
48+
if (!HttpRequest.isInstance(args.request)) {
49+
return next(args);
50+
}
5251

53-
const smithyContext: HttpSigningMiddlewareSmithyContext = getSmithyContext(context);
54-
const scheme = smithyContext.selectedHttpAuthScheme;
55-
if (!scheme) {
56-
throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
57-
}
58-
const {
59-
httpAuthOption: { signingProperties = {} },
60-
identity,
61-
signer,
62-
} = scheme;
63-
const output = await next({
64-
...args,
65-
request: await signer.sign(args.request, identity, signingProperties),
66-
}).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
67-
(signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
68-
return output;
69-
};
52+
const smithyContext: HttpSigningMiddlewareSmithyContext = getSmithyContext(context);
53+
const scheme = smithyContext.selectedHttpAuthScheme;
54+
if (!scheme) {
55+
throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
56+
}
57+
const {
58+
httpAuthOption: { signingProperties = {} },
59+
identity,
60+
signer,
61+
} = scheme;
62+
const output = await next({
63+
...args,
64+
request: await signer.sign(args.request, identity, signingProperties),
65+
}).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
66+
(signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
67+
return output;
68+
};

packages/core/src/pagination/createPaginator.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const makePagedClientRequest = async <ClientType extends Client<any, any, any>,
2020
export function createPaginator<
2121
PaginationConfigType extends PaginationConfiguration,
2222
InputType extends object,
23-
OutputType extends object
23+
OutputType extends object,
2424
>(
2525
ClientCtor: any,
2626
CommandCtor: any,

packages/core/src/protocols/requestBuilder.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@ export class RequestBuilder {
2323

2424
private resolvePathStack: Array<(path: string) => void> = [];
2525

26-
public constructor(private input: any, private context: SerdeContext) {}
26+
public constructor(
27+
private input: any,
28+
private context: SerdeContext
29+
) {}
2730

2831
public async build() {
2932
const { hostname, protocol = "https", port, path: basePath } = await this.context.endpoint();

packages/credential-provider-imds/src/error/InstanceMetadataV1FallbackError.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ import { CredentialsProviderError } from "@smithy/property-provider";
99
export class InstanceMetadataV1FallbackError extends CredentialsProviderError {
1010
public name = "InstanceMetadataV1FallbackError";
1111

12-
constructor(message: string, public readonly tryNextLink: boolean = true) {
12+
constructor(
13+
message: string,
14+
public readonly tryNextLink: boolean = true
15+
) {
1316
super(message, tryNextLink);
1417
Object.setPrototypeOf(this, InstanceMetadataV1FallbackError.prototype);
1518
}

0 commit comments

Comments
 (0)