diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 3e9fba89..78e22089 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -1,6 +1,8 @@ -module.exports = { +const cfg = { ...require('@linzjs/style/.eslintrc.cjs'), - rules: { - '@typescript-eslint/require-await': 0, - }, }; + +const testOverrides = cfg.overrides.find((ovr) => ovr.files.find((f) => f.includes('.test.ts'))); +testOverrides.rules['@typescript-eslint/no-floating-promises'] = 'off'; + +module.exports = cfg; \ No newline at end of file diff --git a/packages/fs-aws/package.json b/packages/fs-aws/package.json index 42d4a932..4f6cbee7 100644 --- a/packages/fs-aws/package.json +++ b/packages/fs-aws/package.json @@ -24,7 +24,10 @@ "@chunkd/fs": "11.2.0", "@chunkd/source-aws": "11.0.3" }, - "devDependencies": {}, + "devDependencies": { + "@types/node": "^18.16.19", + "@smithy/types": "*" + }, "publishConfig": { "access": "public" }, diff --git a/packages/fs-aws/src/credentials.ts b/packages/fs-aws/src/credentials.ts index 9fafdf4a..f531f612 100644 --- a/packages/fs-aws/src/credentials.ts +++ b/packages/fs-aws/src/credentials.ts @@ -1,6 +1,7 @@ import { S3Client } from '@aws-sdk/client-s3'; import { fromTemporaryCredentials } from '@aws-sdk/credential-providers'; import { FileSystem, FileSystemProvider } from '@chunkd/fs'; +import type { RequestSigner } from '@smithy/types'; import { FsAwsS3 } from './fs.s3.js'; import { AwsCredentialConfig, AwsCredentialProvider } from './types.js'; @@ -50,10 +51,11 @@ export class FsConfigFetcher { } let PublicClient: S3Client | undefined; -/** Creating a public s3 client is somewhat hard, where the signing method needs to be overriden */ +/** Creating a public s3 client is somewhat hard, where the signing method needs to be overridden */ export function getPublicS3(): S3Client { if (PublicClient) return PublicClient; - PublicClient = new S3Client({ signer: { sign: (req) => Promise.resolve(req) } }); + const signer: RequestSigner = { sign: (req) => Promise.resolve(req) }; + PublicClient = new S3Client({ signer }); return PublicClient; } diff --git a/packages/fs/src/systems/http.ts b/packages/fs/src/systems/http.ts index 65c069e3..1f414541 100644 --- a/packages/fs/src/systems/http.ts +++ b/packages/fs/src/systems/http.ts @@ -1,8 +1,9 @@ -import { SourceHttp } from '@chunkd/source-http'; import type { Readable } from 'node:stream'; import { PassThrough, Stream } from 'node:stream'; import type { ReadableStream } from 'node:stream/web'; +import { SourceHttp } from '@chunkd/source-http'; + import { FsError } from '../error.js'; import { FileInfo, FileSystem } from '../file.system.js'; diff --git a/yarn.lock b/yarn.lock index 20120416..ff99ae8d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1557,6 +1557,13 @@ resolved "https://registry.yarnpkg.com/@sinclair/typebox/-/typebox-0.27.8.tgz#6667fac16c436b5434a387a34dedb013198f6e6e" integrity sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA== +"@smithy/types@*": + version "3.3.0" + resolved "https://registry.yarnpkg.com/@smithy/types/-/types-3.3.0.tgz#fae037c733d09bc758946a01a3de0ef6e210b16b" + integrity sha512-IxvBBCTFDHbVoK7zIxqA1ZOdc4QfM5HM7rGleCuHi7L1wnKv5Pn69xXJQ9hgxH60ZVygH9/JG0jRgtUncE3QUA== + dependencies: + tslib "^2.6.2" + "@tootallnate/once@2": version "2.0.0" resolved "https://registry.yarnpkg.com/@tootallnate/once/-/once-2.0.0.tgz#f544a148d3ab35801c1f633a7441fd87c2e484bf"