mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-09-07 01:09:54 +08:00
fix(server): lint
This commit is contained in:
@@ -61,25 +61,22 @@ test('R2 provider should throw when accountId is missing', t => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
test(
|
test('R2 provider should use default endpoint when jurisdiction is explicitly undefined', t => {
|
||||||
'R2 provider should use default endpoint when jurisdiction is explicitly undefined',
|
const provider = new R2StorageProvider(
|
||||||
t => {
|
{
|
||||||
const provider = new R2StorageProvider(
|
accountId: 'test-account',
|
||||||
{
|
jurisdiction: undefined,
|
||||||
accountId: 'test-account',
|
region: 'auto',
|
||||||
jurisdiction: undefined,
|
credentials: {
|
||||||
region: 'auto',
|
accessKeyId: 'test',
|
||||||
credentials: {
|
secretAccessKey: 'test',
|
||||||
accessKeyId: 'test',
|
|
||||||
secretAccessKey: 'test',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
'test-bucket'
|
},
|
||||||
);
|
'test-bucket'
|
||||||
|
);
|
||||||
|
|
||||||
t.is(
|
t.is(
|
||||||
endpointOf(provider),
|
endpointOf(provider),
|
||||||
'https://test-account.r2.cloudflarestorage.com/test-bucket'
|
'https://test-account.r2.cloudflarestorage.com/test-bucket'
|
||||||
);
|
);
|
||||||
}
|
});
|
||||||
);
|
|
||||||
|
|||||||
@@ -3,11 +3,7 @@ import { Type } from '@nestjs/common';
|
|||||||
import { JSONSchema } from '../../config';
|
import { JSONSchema } from '../../config';
|
||||||
import { FsStorageConfig, FsStorageProvider } from './fs';
|
import { FsStorageConfig, FsStorageProvider } from './fs';
|
||||||
import { StorageProvider } from './provider';
|
import { StorageProvider } from './provider';
|
||||||
import {
|
import { R2_JURISDICTIONS, R2StorageConfig, R2StorageProvider } from './r2';
|
||||||
R2_JURISDICTIONS,
|
|
||||||
R2StorageConfig,
|
|
||||||
R2StorageProvider,
|
|
||||||
} from './r2';
|
|
||||||
import { S3StorageConfig, S3StorageProvider } from './s3';
|
import { S3StorageConfig, S3StorageProvider } from './s3';
|
||||||
|
|
||||||
export type StorageProviderName = 'fs' | 'aws-s3' | 'cloudflare-r2';
|
export type StorageProviderName = 'fs' | 'aws-s3' | 'cloudflare-r2';
|
||||||
|
|||||||
Reference in New Issue
Block a user