refactor: introduce type-only imports (#5462)
This commit is contained in:
committed by
GitHub
parent
e4a29d5991
commit
fc07ce6854
@ -1,14 +1,12 @@
|
||||
import { Base64 } from 'js-base64';
|
||||
import { partial, result, trim, trimStart } from 'lodash';
|
||||
import type { ApiRequest, AssetProxy, PersistOptions, DataFile } from 'netlify-cms-lib-util';
|
||||
import {
|
||||
localForage,
|
||||
APIError,
|
||||
ApiRequest,
|
||||
unsentRequest,
|
||||
requestWithBackoff,
|
||||
responseParser,
|
||||
AssetProxy,
|
||||
PersistOptions,
|
||||
readFile,
|
||||
DEFAULT_PR_BODY,
|
||||
MERGE_COMMIT_MESSAGE,
|
||||
@ -20,10 +18,9 @@ import {
|
||||
statusToLabel,
|
||||
PreviewState,
|
||||
readFileMetadata,
|
||||
DataFile,
|
||||
branchFromContentKey,
|
||||
} from 'netlify-cms-lib-util';
|
||||
import { Map } from 'immutable';
|
||||
import type { Map } from 'immutable';
|
||||
import { dirname, basename } from 'path';
|
||||
|
||||
export const API_NAME = 'Azure DevOps';
|
||||
@ -304,7 +301,6 @@ export default class API {
|
||||
const url = result.coreAttributes?.Avatar?.value?.value;
|
||||
const user = {
|
||||
name: name || email || '',
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
avatar_url: `data:image/png;base64,${url}`,
|
||||
email,
|
||||
};
|
||||
@ -492,7 +488,6 @@ export default class API {
|
||||
return statuses.map(({ context, state, targetUrl }) => ({
|
||||
context: context.name,
|
||||
state: state === AzureCommitStatusState.SUCCEEDED ? PreviewState.Success : PreviewState.Other,
|
||||
// eslint-disable-next-line @typescript-eslint/camelcase
|
||||
target_url: targetUrl,
|
||||
}));
|
||||
}
|
||||
|
@ -1,28 +1,31 @@
|
||||
import { trimStart, trim } from 'lodash';
|
||||
import semaphore, { Semaphore } from 'semaphore';
|
||||
import type { Semaphore } from 'semaphore';
|
||||
import semaphore from 'semaphore';
|
||||
import AuthenticationPage from './AuthenticationPage';
|
||||
import API, { API_NAME } from './API';
|
||||
import {
|
||||
import type {
|
||||
Credentials,
|
||||
Implementation,
|
||||
ImplementationFile,
|
||||
ImplementationMediaFile,
|
||||
DisplayURL,
|
||||
basename,
|
||||
Entry,
|
||||
AssetProxy,
|
||||
PersistOptions,
|
||||
Config,
|
||||
AsyncLock,
|
||||
User,
|
||||
UnpublishedEntryMediaFile,
|
||||
} from 'netlify-cms-lib-util';
|
||||
import {
|
||||
basename,
|
||||
getMediaDisplayURL,
|
||||
generateContentKey,
|
||||
getMediaAsBlob,
|
||||
Config,
|
||||
getPreviewStatus,
|
||||
asyncLock,
|
||||
AsyncLock,
|
||||
runWithLock,
|
||||
User,
|
||||
unpublishedEntries,
|
||||
UnpublishedEntryMediaFile,
|
||||
entriesByFiles,
|
||||
filterByExtension,
|
||||
branchFromContentKey,
|
||||
|
Reference in New Issue
Block a user