This commit is contained in:
vgoma 2020-07-04 09:37:44 +03:00
parent 59752af1a8
commit 7eaab650a0
17 changed files with 40 additions and 28 deletions

View File

@ -1,3 +1,15 @@
2.0.5 / 2020-07-04
==================
* Улучшение: Дополнены словари для расшифровки данных о сертификате
2.0.4 / 2020-04-05
==================
* Улучшение: Исправлены ссылки в README.md
* Улучшение: Добавлен файл с лицензией
* Улучшение: Обновлены версии пакета в примерах
2.0.3 / 2020-03-29 2.0.3 / 2020-03-29
================== ==================

View File

@ -1,4 +1,4 @@
// Type definitions for crypto-pro 2.0.4 // Type definitions for crypto-pro 2.0.5
// Project: crypto-pro // Project: crypto-pro
// Definitions by: Vitalii Goma https://github.com/vgoma // Definitions by: Vitalii Goma https://github.com/vgoma

8
dist/crypto-pro.js vendored
View File

@ -1275,7 +1275,7 @@ exports.ISSUER_TAGS_TRANSLATIONS = [
{ possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' }, { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },
{ possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' }, { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },
{ possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' }, { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },
{ possibleNames: ['ИНН', 'INN'], translation: 'ИНН' }, { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },
{ possibleNames: ['E'], translation: 'Email' }, { possibleNames: ['E'], translation: 'Email' },
{ possibleNames: ['L'], translation: 'Город' }, { possibleNames: ['L'], translation: 'Город' },
]; ];
@ -1365,7 +1365,7 @@ exports.SUBJECT_TAGS_TRANSLATIONS = [
{ possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' }, { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },
{ possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' }, { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },
{ possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' }, { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },
{ possibleNames: ['ИНН', 'INN'], translation: 'ИНН' }, { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },
{ possibleNames: ['E'], translation: 'Email' }, { possibleNames: ['E'], translation: 'Email' },
{ possibleNames: ['L'], translation: 'Город' }, { possibleNames: ['L'], translation: 'Город' },
]; ];
@ -1749,11 +1749,11 @@ var constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.ts"
* @returns расшифрованная информация по отдельным тэгам * @returns расшифрованная информация по отдельным тэгам
*/ */
exports._parseCertInfo = function (tagsTranslations, rawInfo) { exports._parseCertInfo = function (tagsTranslations, rawInfo) {
var extractedEntities = rawInfo.match(/([а-яА-Яa-zA-Z0-9.]+)=(?:("[^"]+?")|(.+?))(?:,|$)/g); var extractedEntities = rawInfo.match(/([а-яА-Яa-zA-Z0-9\s.]+)=(?:("[^"]+?")|(.+?))(?:,|$)/g);
if (extractedEntities) { if (extractedEntities) {
return extractedEntities.map(function (group) { return extractedEntities.map(function (group) {
var _a, _b, _c; var _a, _b, _c;
var segmentsMatch = group.match(/^([а-яА-Яa-zA-Z0-9.]+)=(.+?),?$/); var segmentsMatch = group.trim().match(/^([а-яА-Яa-zA-Z0-9\s.]+)=(.+?),?$/);
var title = segmentsMatch === null || segmentsMatch === void 0 ? void 0 : segmentsMatch[1]; var title = segmentsMatch === null || segmentsMatch === void 0 ? void 0 : segmentsMatch[1];
// Вырезаем лишние кавычки // Вырезаем лишние кавычки
var description = (_b = (_a = segmentsMatch === null || segmentsMatch === void 0 ? void 0 : segmentsMatch[2]) === null || _a === void 0 ? void 0 : _a.replace(/^"(.*)"/, '$1')) === null || _b === void 0 ? void 0 : _b.replace(/"{2}/g, '"'); var description = (_b = (_a = segmentsMatch === null || segmentsMatch === void 0 ? void 0 : segmentsMatch[2]) === null || _a === void 0 ? void 0 : _a.replace(/^"(.*)"/, '$1')) === null || _b === void 0 ? void 0 : _b.replace(/"{2}/g, '"');

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3308,9 +3308,9 @@
} }
}, },
"crypto-pro": { "crypto-pro": {
"version": "2.0.4", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/crypto-pro/-/crypto-pro-2.0.4.tgz", "resolved": "https://registry.npmjs.org/crypto-pro/-/crypto-pro-2.0.5.tgz",
"integrity": "sha512-fR8RE7iApGdvb0Z6vKV4yeaapKZyzZf/98ShA7i4Y2Mn1p3iwpL22X6gQWlFc/VGvz29dKomvvWiXiVYmOryfw==" "integrity": "sha512-YZbVNt9ZmE75H97gdqS2ZGW8xnuHxdvQxLH/SmMQIizIBLmMIylOhY3HvgEUxnrIkL64/m6vrG5H2w7pGTb17Q=="
}, },
"css": { "css": {
"version": "2.2.4", "version": "2.2.4",

View File

@ -21,7 +21,7 @@
"@angular/platform-browser": "~9.0.7", "@angular/platform-browser": "~9.0.7",
"@angular/platform-browser-dynamic": "~9.0.7", "@angular/platform-browser-dynamic": "~9.0.7",
"@angular/router": "~9.0.7", "@angular/router": "~9.0.7",
"crypto-pro": "2.0.4", "crypto-pro": "2.0.5",
"rxjs": "~6.5.4", "rxjs": "~6.5.4",
"tslib": "^1.10.0", "tslib": "^1.10.0",
"zone.js": "~0.10.2" "zone.js": "~0.10.2"

View File

@ -3712,9 +3712,9 @@
} }
}, },
"crypto-pro": { "crypto-pro": {
"version": "2.0.4", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/crypto-pro/-/crypto-pro-2.0.4.tgz", "resolved": "https://registry.npmjs.org/crypto-pro/-/crypto-pro-2.0.5.tgz",
"integrity": "sha512-fR8RE7iApGdvb0Z6vKV4yeaapKZyzZf/98ShA7i4Y2Mn1p3iwpL22X6gQWlFc/VGvz29dKomvvWiXiVYmOryfw==" "integrity": "sha512-YZbVNt9ZmE75H97gdqS2ZGW8xnuHxdvQxLH/SmMQIizIBLmMIylOhY3HvgEUxnrIkL64/m6vrG5H2w7pGTb17Q=="
}, },
"css": { "css": {
"version": "2.2.4", "version": "2.2.4",

View File

@ -7,7 +7,7 @@
"@testing-library/jest-dom": "4.2.4", "@testing-library/jest-dom": "4.2.4",
"@testing-library/react": "9.5.0", "@testing-library/react": "9.5.0",
"@testing-library/user-event": "7.2.1", "@testing-library/user-event": "7.2.1",
"crypto-pro": "2.0.4", "crypto-pro": "2.0.5",
"react": "^16.13.1", "react": "^16.13.1",
"react-app-polyfill": "1.0.6", "react-app-polyfill": "1.0.6",
"react-dom": "^16.13.1", "react-dom": "^16.13.1",

View File

@ -42,9 +42,9 @@
"dev": true "dev": true
}, },
"crypto-pro": { "crypto-pro": {
"version": "2.0.4", "version": "2.0.5",
"resolved": "https://registry.npmjs.org/crypto-pro/-/crypto-pro-2.0.4.tgz", "resolved": "https://registry.npmjs.org/crypto-pro/-/crypto-pro-2.0.5.tgz",
"integrity": "sha512-fR8RE7iApGdvb0Z6vKV4yeaapKZyzZf/98ShA7i4Y2Mn1p3iwpL22X6gQWlFc/VGvz29dKomvvWiXiVYmOryfw==" "integrity": "sha512-YZbVNt9ZmE75H97gdqS2ZGW8xnuHxdvQxLH/SmMQIizIBLmMIylOhY3HvgEUxnrIkL64/m6vrG5H2w7pGTb17Q=="
}, },
"fs.realpath": { "fs.realpath": {
"version": "1.0.0", "version": "1.0.0",

View File

@ -13,6 +13,6 @@
"symlink-dir": "3.1.2" "symlink-dir": "3.1.2"
}, },
"dependencies": { "dependencies": {
"crypto-pro": "2.0.4" "crypto-pro": "2.0.5"
} }
} }

2
lib/crypto-pro.d.ts vendored
View File

@ -1,4 +1,4 @@
// Type definitions for crypto-pro 2.0.4 // Type definitions for crypto-pro 2.0.5
// Project: crypto-pro // Project: crypto-pro
// Definitions by: Vitalii Goma https://github.com/vgoma // Definitions by: Vitalii Goma https://github.com/vgoma

View File

@ -1050,7 +1050,7 @@ exports.ISSUER_TAGS_TRANSLATIONS = [
{ possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' }, { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },
{ possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' }, { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },
{ possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' }, { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },
{ possibleNames: ['ИНН', 'INN'], translation: 'ИНН' }, { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },
{ possibleNames: ['E'], translation: 'Email' }, { possibleNames: ['E'], translation: 'Email' },
{ possibleNames: ['L'], translation: 'Город' }, { possibleNames: ['L'], translation: 'Город' },
]; ];
@ -1140,7 +1140,7 @@ exports.SUBJECT_TAGS_TRANSLATIONS = [
{ possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' }, { possibleNames: ['ОГРН', 'OGRN'], translation: 'ОГРН' },
{ possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' }, { possibleNames: ['ОГРНИП', 'OGRNIP'], translation: 'ОГРНИП' },
{ possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' }, { possibleNames: ['СНИЛС', 'SNILS'], translation: 'СНИЛС' },
{ possibleNames: ['ИНН', 'INN'], translation: 'ИНН' }, { possibleNames: ['ИНН', 'INN', 'ИНН организации'], translation: 'ИНН' },
{ possibleNames: ['E'], translation: 'Email' }, { possibleNames: ['E'], translation: 'Email' },
{ possibleNames: ['L'], translation: 'Город' }, { possibleNames: ['L'], translation: 'Город' },
]; ];
@ -1476,11 +1476,11 @@ const constants_1 = __webpack_require__(/*! ../constants */ "./constants/index.t
* @returns расшифрованная информация по отдельным тэгам * @returns расшифрованная информация по отдельным тэгам
*/ */
exports._parseCertInfo = (tagsTranslations, rawInfo) => { exports._parseCertInfo = (tagsTranslations, rawInfo) => {
const extractedEntities = rawInfo.match(/([а-яА-Яa-zA-Z0-9.]+)=(?:("[^"]+?")|(.+?))(?:,|$)/g); const extractedEntities = rawInfo.match(/([а-яА-Яa-zA-Z0-9\s.]+)=(?:("[^"]+?")|(.+?))(?:,|$)/g);
if (extractedEntities) { if (extractedEntities) {
return extractedEntities.map((group) => { return extractedEntities.map((group) => {
var _a, _b, _c; var _a, _b, _c;
const segmentsMatch = group.match(/^([а-яА-Яa-zA-Z0-9.]+)=(.+?),?$/); const segmentsMatch = group.trim().match(/^([а-яА-Яa-zA-Z0-9\s.]+)=(.+?),?$/);
let title = segmentsMatch === null || segmentsMatch === void 0 ? void 0 : segmentsMatch[1]; let title = segmentsMatch === null || segmentsMatch === void 0 ? void 0 : segmentsMatch[1];
// Вырезаем лишние кавычки // Вырезаем лишние кавычки
const description = (_b = (_a = segmentsMatch === null || segmentsMatch === void 0 ? void 0 : segmentsMatch[2]) === null || _a === void 0 ? void 0 : _a.replace(/^"(.*)"/, '$1')) === null || _b === void 0 ? void 0 : _b.replace(/"{2}/g, '"'); const description = (_b = (_a = segmentsMatch === null || segmentsMatch === void 0 ? void 0 : segmentsMatch[2]) === null || _a === void 0 ? void 0 : _a.replace(/^"(.*)"/, '$1')) === null || _b === void 0 ? void 0 : _b.replace(/"{2}/g, '"');

File diff suppressed because one or more lines are too long

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{ {
"name": "crypto-pro", "name": "crypto-pro",
"version": "2.0.4", "version": "2.0.5",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@ -1,6 +1,6 @@
{ {
"name": "crypto-pro", "name": "crypto-pro",
"version": "2.0.4", "version": "2.0.5",
"description": "API для взаимодействия с КриптоПро", "description": "API для взаимодействия с КриптоПро",
"main": "./lib/crypto-pro.js", "main": "./lib/crypto-pro.js",
"types": "./lib/crypto-pro.d.ts", "types": "./lib/crypto-pro.d.ts",