move all Rate Limit type defs to rate-limit-utils.ts
This commit is contained in:
@@ -20,7 +20,8 @@ import { SigninWithPasskeyApiService } from '@/server/api/SigninWithPasskeyApiSe
|
||||
import { WebAuthnService } from '@/core/WebAuthnService.js';
|
||||
import { SigninService } from '@/server/api/SigninService.js';
|
||||
import { IdentifiableError } from '@/misc/identifiable-error.js';
|
||||
import { LimitInfo, SkRateLimiterService } from '@/server/api/SkRateLimiterService.js';
|
||||
import { SkRateLimiterService } from '@/server/api/SkRateLimiterService.js';
|
||||
import { LimitInfo } from '@/misc/rate-limit-utils.js';
|
||||
|
||||
const moduleMocker = new ModuleMocker(global);
|
||||
|
||||
|
||||
@@ -6,8 +6,9 @@
|
||||
import { KEYWORD } from 'color-convert/conversions.js';
|
||||
import { jest } from '@jest/globals';
|
||||
import type Redis from 'ioredis';
|
||||
import { LegacyRateLimit, LimitCounter, RateLimit, SkRateLimiterService } from '@/server/api/SkRateLimiterService.js';
|
||||
import { LimitCounter, SkRateLimiterService } from '@/server/api/SkRateLimiterService.js';
|
||||
import { LoggerService } from '@/core/LoggerService.js';
|
||||
import { BucketRateLimit, LegacyRateLimit } from '@/misc/rate-limit-utils.js';
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-non-null-assertion */
|
||||
/* eslint-disable @typescript-eslint/no-unnecessary-condition */
|
||||
@@ -141,7 +142,7 @@ describe(SkRateLimiterService, () => {
|
||||
});
|
||||
|
||||
describe('with bucket limit', () => {
|
||||
let limit: RateLimit = null!;
|
||||
let limit: BucketRateLimit = null!;
|
||||
|
||||
beforeEach(() => {
|
||||
limit = {
|
||||
|
||||
Reference in New Issue
Block a user