Skip to content

Commit 8efc15f

Browse files
committed
style: apply Biome formatting to all packages and scripts
1 parent e05a6c6 commit 8efc15f

File tree

142 files changed

+526
-461
lines changed

Some content is hidden

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

142 files changed

+526
-461
lines changed

packages/client/src/internal/interceptors/types.ts

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
*
1818
* @public
1919
*/
20-
export interface RequestInterceptor {
21-
({ request }: { request: Readonly<Request> }): Request | Promise<Request>
22-
}
20+
export type RequestInterceptor = ({
21+
request,
22+
}: {
23+
request: Readonly<Request>
24+
}) => Request | Promise<Request>
2325

2426
/**
2527
* Defines the interceptor for a `Response`.
@@ -36,9 +38,11 @@ export interface RequestInterceptor {
3638
*
3739
* @public
3840
*/
39-
export interface ResponseInterceptor {
40-
({ response }: { response: Readonly<Response> }): Response | Promise<Response>
41-
}
41+
export type ResponseInterceptor = ({
42+
response,
43+
}: {
44+
response: Readonly<Response>
45+
}) => Response | Promise<Response>
4246

4347
/**
4448
* Defines the interceptor for a `Response` error.
@@ -67,9 +71,13 @@ export interface ResponseInterceptor {
6771
*
6872
* @public
6973
*/
70-
export interface ResponseErrorInterceptor {
71-
({ request, error }: { request: Request; error: unknown }): unknown
72-
}
74+
export type ResponseErrorInterceptor = ({
75+
request,
76+
error,
77+
}: {
78+
request: Request
79+
error: unknown
80+
}) => unknown
7381

7482
/**
7583
* Defines the network interceptors.

packages/client/src/scw/__tests__/client.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { describe, expect, it } from 'vitest'
2+
import { createAdvancedClient, createClient } from '../client.js'
23
import type { ClientConfig } from '../client-ini-factory.js'
34
import { withProfile } from '../client-ini-factory.js'
45
import type { Settings } from '../client-settings.js'
5-
import { createAdvancedClient, createClient } from '../client.js'
66

77
const withApiURL =
88
(apiURL: string): ClientConfig =>

packages/client/src/scw/auth.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@ import type { AuthenticationSecrets } from './client-ini-profile.js'
77
import { assertValidAuthenticationSecrets } from './client-ini-profile.js'
88
import { AUTH_HEADER_KEY, SESSION_HEADER_KEY } from './constants.js'
99

10-
interface TokenAccessor {
11-
(): Promise<string | undefined>
12-
}
10+
type TokenAccessor = () => Promise<string | undefined>
1311

1412
interface AddSessionHeader {
1513
request: Request

packages/client/src/scw/errors/error-parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { JSONObject } from '../../helpers/json.js'
22
import { InvalidRequestMapper } from './non-standard/invalid-request-mapper.js'
33
import { UnknownResourceMapper } from './non-standard/unknown-resource-mapper.js'
4-
import type { ScalewayErrorFromJSONInitializer } from './scw-error-from-json.js'
54
import { ScalewayError } from './scw-error.js'
5+
import type { ScalewayErrorFromJSONInitializer } from './scw-error-from-json.js'
66
import { AlreadyExistsError } from './standard/already-exists-error.js'
77
import { DeniedAuthenticationError } from './standard/denied-authentication-error.js'
88
import { InvalidArgumentsError } from './standard/invalid-arguments-error.js'

packages/client/src/scw/errors/non-standard/invalid-request-mapper.ts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,13 @@ export class InvalidRequestMapper {
3434
return new InvalidArgumentsError(
3535
status,
3636
obj,
37-
fieldsMessages
38-
.map(([argumentName, messages]) =>
39-
messages.map(helpMessage => ({
40-
argumentName,
41-
helpMessage,
42-
reason: 'constraint',
43-
})),
44-
)
45-
.flat(),
37+
fieldsMessages.flatMap(([argumentName, messages]) =>
38+
messages.map(helpMessage => ({
39+
argumentName,
40+
helpMessage,
41+
reason: 'constraint',
42+
})),
43+
),
4644
)
4745
}
4846

packages/client/src/scw/fetch/http-interceptors.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ import { dumpRequest, dumpResponse } from './http-dumper.js'
1414
*
1515
* @internal
1616
*/
17-
interface HeaderEntryMapper {
18-
(entry: [string, string]): [string, string]
19-
}
17+
type HeaderEntryMapper = (entry: [string, string]) => [string, string]
2018

2119
/**
2220
* HTTP Request with obfuscated secrets.

packages/client/src/vendor/base64/index.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
'use strict'
2-
31
var lookup = []
42
var revLookup = []
53
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array

packages/sdk/src/index.gen.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ import { Testv1 } from '@scaleway/sdk-test'
4545
import { Vpcv2 } from '@scaleway/sdk-vpc'
4646
import { Vpcgwv1, Vpcgwv2 } from '@scaleway/sdk-vpcgw'
4747
import { Webhostingv1 } from '@scaleway/sdk-webhosting'
48-
export { createClient, createAdvancedClient } from '@scaleway/sdk-client'
48+
49+
export { createAdvancedClient, createClient } from '@scaleway/sdk-client'
4950

5051
/**
5152
* @deprecated Direct version exports are deprecated. Use the 'Account' namespace instead (e.g., Account.v1).

packages_generated/account/src/v3/api.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
33
import {
4-
API as ParentAPI,
54
enrichForPagination,
5+
API as ParentAPI,
66
urlParams,
77
validatePathParam,
88
} from '@scaleway/sdk-client'

packages_generated/account/src/v3/marshalling.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
33
import randomName from '@scaleway/random-name'
4+
import type { DefaultValues } from '@scaleway/sdk-client'
45
import {
56
isJSONObject,
67
resolveOneOf,
78
unmarshalArrayOfObject,
89
unmarshalDate,
910
} from '@scaleway/sdk-client'
10-
import type { DefaultValues } from '@scaleway/sdk-client'
1111
import type {
1212
CheckContractSignatureResponse,
1313
Contract,

0 commit comments

Comments
 (0)