Moved throttle below imports in BitbucketServerClient

Signed-off-by: David Lilienfeld <davidlilienfeld4@gmail.com>
This commit is contained in:
David Lilienfeld
2024-12-13 17:43:19 -05:00
parent 351f3aedb9
commit 00d989fd7a
@@ -19,6 +19,13 @@ import {
getBitbucketServerRequestOptions,
} from '@backstage/integration';
import pThrottle from 'p-throttle';
import {
BitbucketServerDefaultBranch,
BitbucketServerRepository,
} from './index';
import { BitbucketServerProject } from './types';
import { NotFoundError } from '@backstage/errors';
import { ResponseError } from '@backstage/errors';
// 1 per second
const throttle = pThrottle({
@@ -31,15 +38,6 @@ const throttledFetch = throttle(
return await fetch(url, options);
},
);
import {
BitbucketServerDefaultBranch,
BitbucketServerRepository,
} from './index';
import { BitbucketServerProject } from './types';
import { NotFoundError } from '@backstage/errors';
import { ResponseError } from '@backstage/errors';
/**
* A client for interacting with a Bitbucket Server instance