mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
fix(repo): make the workspace lint, typecheck and test clean (#1978)
This commit is contained in:
+8
-1
@@ -145,7 +145,14 @@
|
||||
"!fluxer_static",
|
||||
"!packages/fonts",
|
||||
"!fluxer_admin/static/htmx.min.js",
|
||||
"!fluxer_api/src/api/openapi/openapi.json"
|
||||
"!fluxer_api/src/api/openapi/openapi.json",
|
||||
"!fluxer_api/pkgs/email/src/email_i18n/locales",
|
||||
"!fluxer_api/pkgs/email/src/email_i18n/weblate",
|
||||
"!fluxer_api/src/api/content_i18n/locales",
|
||||
"!fluxer_api/src/api/content_i18n/weblate",
|
||||
"!packages/errors/src/i18n/locales",
|
||||
"!packages/errors/src/i18n/weblate",
|
||||
"!**/auto-i18n-reviewed-unchanged.json"
|
||||
],
|
||||
"ignoreUnknown": true
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import type {S3ProviderSettings} from '@fluxer/config/src/S3DownloadsProvider';
|
||||
import assert from 'node:assert/strict';
|
||||
import {createHash} from 'node:crypto';
|
||||
import fs from 'node:fs';
|
||||
@@ -27,6 +26,7 @@ import {
|
||||
} from '@aws-sdk/client-s3';
|
||||
import {Upload} from '@aws-sdk/lib-storage';
|
||||
import {getSignedUrl} from '@aws-sdk/s3-request-presigner';
|
||||
import type {S3ProviderSettings} from '@fluxer/config/src/S3DownloadsProvider';
|
||||
import {isSupportedMediaContentType} from '@pkgs/mime_utils/src/ContentTypeUtils';
|
||||
import {seconds} from 'itty-time';
|
||||
import {temporaryFile} from 'tempy';
|
||||
|
||||
@@ -8,11 +8,11 @@ import {InputValidationError} from '@fluxer/errors/src/domains/core/InputValidat
|
||||
import type {UserUpdateRequest} from '@fluxer/schema/src/domains/user/UserRequestSchemas';
|
||||
import type {IRateLimitService} from '@pkgs/rate_limit/src/IRateLimitService';
|
||||
import type {ApiContext} from '../../ApiContext';
|
||||
import {Config} from '../../Config';
|
||||
import * as AuthPassword from '../../auth/AuthPassword';
|
||||
import * as AuthSession from '../../auth/AuthSession';
|
||||
import type {SudoVerificationResult} from '../../auth/services/SudoVerificationService';
|
||||
import {deriveSudoMethods, userHasMfa} from '../../auth/services/SudoVerificationService';
|
||||
import {Config} from '../../Config';
|
||||
import type {UserRow} from '../../database/types/UserTypes';
|
||||
import type {IDiscriminatorService} from '../../infrastructure/DiscriminatorService';
|
||||
import type {LimitConfigService} from '../../limits/LimitConfigService';
|
||||
|
||||
@@ -23,7 +23,6 @@ import {requireEmailVerified} from '../../auth/EmailVerificationUtils';
|
||||
import type {ChannelID, UserID} from '../../BrandedTypes';
|
||||
import {createChannelID, createMessageID, createUserID} from '../../BrandedTypes';
|
||||
import {mapChannelToResponse} from '../../channel/ChannelMappers';
|
||||
import {SYSTEM_USER_ID} from '../../constants/Core';
|
||||
import type {IChannelRepository} from '../../channel/IChannelRepository';
|
||||
import type {ChannelService} from '../../channel/services/ChannelService';
|
||||
import {dispatchMessageCreateBroadcast} from '../../channel/services/message/MessageGatewayDispatch';
|
||||
@@ -31,6 +30,7 @@ import {
|
||||
createMessageResponseDataService,
|
||||
messageResponseAccessForGuild,
|
||||
} from '../../channel/services/message/MessageResponseDataService';
|
||||
import {SYSTEM_USER_ID} from '../../constants/Core';
|
||||
import type {IGatewayService} from '../../infrastructure/IGatewayService';
|
||||
import type {ISnowflakeService} from '../../infrastructure/ISnowflakeService';
|
||||
import type {UserCacheService} from '../../infrastructure/UserCacheService';
|
||||
|
||||
@@ -5,6 +5,7 @@ import {ChannelTypes} from '@fluxer/constants/src/ChannelConstants';
|
||||
import {UserFlags} from '@fluxer/constants/src/UserConstants';
|
||||
import {afterAll, beforeAll, beforeEach, describe, expect, test} from 'vitest';
|
||||
import {createTestAccount, unclaimAccount} from '../../auth/tests/AuthTestUtils';
|
||||
import {createChannelID, createUserID} from '../../BrandedTypes';
|
||||
import {authorizeBot, createTestBotAccount} from '../../bot/tests/BotTestUtils';
|
||||
import {
|
||||
acceptInvite,
|
||||
@@ -19,13 +20,12 @@ import {
|
||||
type MinimalChannelResponse,
|
||||
sendChannelMessage,
|
||||
} from '../../channel/tests/ChannelTestUtils';
|
||||
import {createChannelID, createUserID} from '../../BrandedTypes';
|
||||
import {SYSTEM_USER_ID} from '../../constants/Core';
|
||||
import {UserRepository} from '../../user/repositories/UserRepository';
|
||||
import {ensureSessionStarted} from '../../message/tests/MessageTestUtils';
|
||||
import {type ApiTestHarness, createApiTestHarness} from '../../test/ApiTestHarness';
|
||||
import {HTTP_STATUS} from '../../test/TestConstants';
|
||||
import {createBuilder} from '../../test/TestRequestBuilder';
|
||||
import {UserRepository} from '../../user/repositories/UserRepository';
|
||||
|
||||
interface PrivateChannelsResponse extends Array<MinimalChannelResponse> {}
|
||||
|
||||
|
||||
@@ -670,5 +670,5 @@ describe('VoiceMediaGraphSimulation', () => {
|
||||
const second = runSimulation(seed);
|
||||
expect(second, `seed=${seed} replay diverged`).toEqual(first);
|
||||
}
|
||||
});
|
||||
}, 60_000);
|
||||
});
|
||||
|
||||
@@ -135,7 +135,14 @@ function addFilesFromDirectory(files, packageDir, relativeDir, predicate) {
|
||||
|
||||
function collectRuntimeArtifactPaths(packageDir) {
|
||||
const artifacts = new Set();
|
||||
for (const fileName of ['index.js', 'index.d.ts', 'binding.js', 'binding.d.ts', 'loader-diagnostics.cjs', 'pure.cjs']) {
|
||||
for (const fileName of [
|
||||
'index.js',
|
||||
'index.d.ts',
|
||||
'binding.js',
|
||||
'binding.d.ts',
|
||||
'loader-diagnostics.cjs',
|
||||
'pure.cjs',
|
||||
]) {
|
||||
if (fs.existsSync(path.join(packageDir, fileName))) {
|
||||
artifacts.add(fileName);
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ export const GuildAdminResponse = z.object({
|
||||
.optional()
|
||||
.describe('Custom content warning text shown before entry'),
|
||||
approximate_member_count: Int32Type.optional().describe(
|
||||
'Approximate total member count (only when with_counts is true)'
|
||||
'Approximate total member count (only when with_counts is true)',
|
||||
),
|
||||
approximate_presence_count: Int32Type.optional().describe(
|
||||
'Approximate online member count (only when with_counts is true)'
|
||||
'Approximate online member count (only when with_counts is true)',
|
||||
),
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import {AdminACLs} from '@fluxer/constants/src/AdminACLs';
|
||||
import {
|
||||
PremiumFlags,
|
||||
PremiumFlagsDescriptions,
|
||||
@@ -8,7 +9,6 @@ import {
|
||||
UserFlags,
|
||||
UserFlagsDescriptions,
|
||||
} from '@fluxer/constants/src/UserConstants';
|
||||
import {AdminACLs} from '@fluxer/constants/src/AdminACLs';
|
||||
import {NSFWLevelSchema} from '@fluxer/schema/src/primitives/GuildValidators';
|
||||
import {
|
||||
createBitflagInt32Type,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
export const FORMAT_CONTENT_TYPES: Record<string, string> = {
|
||||
const FORMAT_CONTENT_TYPES: Record<string, string> = {
|
||||
gif: 'image/gif',
|
||||
loopedmp4: 'video/mp4',
|
||||
mediumgif: 'image/gif',
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
import {ClientUploadedAttachmentRequest} from '@fluxer/schema/src/domains/message/AttachmentSchemas';
|
||||
import {
|
||||
PresignedAttachmentUploadRequest,
|
||||
PresignedAttachmentUploadResponse,
|
||||
} from '@fluxer/schema/src/domains/message/AttachmentUploadSchemas';
|
||||
import {ClientUploadedAttachmentRequest} from '@fluxer/schema/src/domains/message/AttachmentSchemas';
|
||||
import {MessageAttachmentResponse} from '@fluxer/schema/src/domains/message/MessageResponseSchemas';
|
||||
import {describe, expect, it} from 'vitest';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user