mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2025-04-21 04:53:08 +03:00
linter fixes
This commit is contained in:
parent
5b2e237c34
commit
2b8ab994ef
@ -37,7 +37,7 @@ export const getAllCertificates = _afterPluginsLoaded(
|
|||||||
|
|
||||||
while (containerAllCertificatesCount) {
|
while (containerAllCertificatesCount) {
|
||||||
foundAvailableCertificate = availableCertificates.find(
|
foundAvailableCertificate = availableCertificates.find(
|
||||||
(cert) => cert.thumbprint === containerAllCertificates[containerAllCertificatesCount].thumbprint
|
(cert) => cert.thumbprint === containerAllCertificates[containerAllCertificatesCount].thumbprint,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!foundAvailableCertificate) {
|
if (!foundAvailableCertificate) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { Certificate } from './certificate';
|
import { Certificate } from './certificate';
|
||||||
import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';
|
import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';
|
||||||
import {getCertificates} from "./getCertificates";
|
import { getCertificates } from './getCertificates';
|
||||||
import {getAllCertificates} from "./getAllCertificates";
|
import { getAllCertificates } from './getAllCertificates';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Возвращает сертификат по отпечатку
|
* Возвращает сертификат по отпечатку
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
import { Certificate } from './certificate';
|
import { Certificate } from './certificate';
|
||||||
import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';
|
import { _afterPluginsLoaded } from '../helpers/_afterPluginsLoaded';
|
||||||
import { getUserCertificates } from './getUserCertificates';
|
import { getUserCertificates } from './getUserCertificates';
|
||||||
import {getContainerCertificates} from "./getContainerCertificates";
|
import { getContainerCertificates } from './getContainerCertificates';
|
||||||
import {getAllUserCertificates} from "./getAllUserCertificates";
|
import { getAllUserCertificates } from './getAllUserCertificates';
|
||||||
import {getAllContainerCertificates} from "./getAllContainerCertificates";
|
import { getAllContainerCertificates } from './getAllContainerCertificates';
|
||||||
|
|
||||||
|
|
||||||
let certificatesCache: Certificate[];
|
let certificatesCache: Certificate[];
|
||||||
/**
|
/**
|
||||||
@ -15,7 +14,6 @@ let certificatesCache: Certificate[];
|
|||||||
*/
|
*/
|
||||||
export const getCertificates = _afterPluginsLoaded(
|
export const getCertificates = _afterPluginsLoaded(
|
||||||
async (resetCache: boolean = false): Promise<Certificate[]> => {
|
async (resetCache: boolean = false): Promise<Certificate[]> => {
|
||||||
|
|
||||||
if (!resetCache && certificatesCache) {
|
if (!resetCache && certificatesCache) {
|
||||||
return certificatesCache;
|
return certificatesCache;
|
||||||
}
|
}
|
||||||
@ -41,7 +39,7 @@ export const getCertificates = _afterPluginsLoaded(
|
|||||||
|
|
||||||
while (containerCertificatesCount) {
|
while (containerCertificatesCount) {
|
||||||
foundAvailableCertificate = availableCertificates.find(
|
foundAvailableCertificate = availableCertificates.find(
|
||||||
(cert) => cert.thumbprint === containerCertificates[containerCertificatesCount].thumbprint
|
(cert) => cert.thumbprint === containerCertificates[containerCertificatesCount].thumbprint,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!foundAvailableCertificate) {
|
if (!foundAvailableCertificate) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { CadesCertificate } from '../api/certificate';
|
import { CadesCertificate } from '../api/certificate';
|
||||||
import { _afterPluginsLoaded } from './_afterPluginsLoaded';
|
import { _afterPluginsLoaded } from './_afterPluginsLoaded';
|
||||||
import {_getCadesUserCert} from "./_getCadesUserCert";
|
import { _getCadesUserCert } from './_getCadesUserCert';
|
||||||
import {_getCadesContainerCert} from "./_getCadesContainerCert";
|
import { _getCadesContainerCert } from './_getCadesContainerCert';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Возвращает сертификат в формате Cades по отпечатку
|
* Возвращает сертификат в формате Cades по отпечатку
|
||||||
@ -22,5 +22,5 @@ export const _getCadesCert = _afterPluginsLoaded(
|
|||||||
}
|
}
|
||||||
|
|
||||||
return cadesCertificate;
|
return cadesCertificate;
|
||||||
}
|
},
|
||||||
);
|
);
|
||||||
|
@ -53,7 +53,10 @@ export const _getCadesContainerCert = _afterPluginsLoaded(
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
||||||
throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов из хранилища закрытого ключа');
|
throw new Error(
|
||||||
|
_extractMeaningfulErrorMessage(error) ||
|
||||||
|
'Ошибка получения списка сертификатов из хранилища закрытого ключа',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!certificatesCount) {
|
if (!certificatesCount) {
|
||||||
@ -76,7 +79,9 @@ export const _getCadesContainerCert = _afterPluginsLoaded(
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
||||||
throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища закрытого ключа');
|
throw new Error(
|
||||||
|
_extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища закрытого ключа',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
cadesStore.Close();
|
cadesStore.Close();
|
||||||
|
@ -53,7 +53,9 @@ export const _getCadesUserCert = _afterPluginsLoaded(
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
||||||
throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов из хранилища пользователя');
|
throw new Error(
|
||||||
|
_extractMeaningfulErrorMessage(error) || 'Ошибка получения списка сертификатов из хранилища пользователя',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!certificatesCount) {
|
if (!certificatesCount) {
|
||||||
@ -76,7 +78,9 @@ export const _getCadesUserCert = _afterPluginsLoaded(
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|
||||||
throw new Error(_extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища пользователя');
|
throw new Error(
|
||||||
|
_extractMeaningfulErrorMessage(error) || 'Ошибка при получении сертификата из хранилища пользователя',
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
cadesStore.Close();
|
cadesStore.Close();
|
||||||
|
Loading…
Reference in New Issue
Block a user