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