mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2024-11-24 00:55:00 +03:00
создание асинхронных функций на лету
This commit is contained in:
parent
bdb36572f1
commit
811babb9f3
15
dist/1.crypto-pro.js
vendored
15
dist/1.crypto-pro.js
vendored
@ -177,7 +177,7 @@ webpackJsonpCryptoPro([1],[
|
|||||||
* */
|
* */
|
||||||
function isValidEDSSettings() {
|
function isValidEDSSettings() {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
cryptoCommon.execute(function () {
|
eval(cryptoCommon.execute(function () {
|
||||||
var result;
|
var result;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -187,7 +187,7 @@ webpackJsonpCryptoPro([1],[
|
|||||||
}
|
}
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -615,13 +615,11 @@ webpackJsonpCryptoPro([1],[
|
|||||||
|
|
||||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||||
|
|
||||||
cadesplugin.async_spawn(new GeneratorFunction(args, cb));
|
cb = String(new GeneratorFunction(args, cb));
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function createObj(type) {
|
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'yield cadesplugin.CreateObjectAsync$1');
|
||||||
if (cadesplugin.CreateObjectAsync) {
|
|
||||||
return (new Function('', 'return yield cadesplugin.CreateObjectAsync(' + type + ')'))();
|
return 'cadesplugin.async_spawn(' + cb + ');';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -853,7 +851,6 @@ webpackJsonpCryptoPro([1],[
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
execute: execute,
|
execute: execute,
|
||||||
createObj: createObj,
|
|
||||||
subjectNameTagsTranslations: subjectNameTagsTranslations,
|
subjectNameTagsTranslations: subjectNameTagsTranslations,
|
||||||
issuerNameTagsTranslations: issuerNameTagsTranslations,
|
issuerNameTagsTranslations: issuerNameTagsTranslations,
|
||||||
parseCertInfo: parseCertInfo,
|
parseCertInfo: parseCertInfo,
|
||||||
|
2
dist/1.crypto-pro.js.map
vendored
2
dist/1.crypto-pro.js.map
vendored
File diff suppressed because one or more lines are too long
11
dist/2.crypto-pro.js
vendored
11
dist/2.crypto-pro.js
vendored
@ -58,13 +58,11 @@ webpackJsonpCryptoPro([2],[
|
|||||||
|
|
||||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||||
|
|
||||||
cadesplugin.async_spawn(new GeneratorFunction(args, cb));
|
cb = String(new GeneratorFunction(args, cb));
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function createObj(type) {
|
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'yield cadesplugin.CreateObjectAsync$1');
|
||||||
if (cadesplugin.CreateObjectAsync) {
|
|
||||||
return (new Function('', 'return yield cadesplugin.CreateObjectAsync(' + type + ')'))();
|
return 'cadesplugin.async_spawn(' + cb + ');';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -296,7 +294,6 @@ webpackJsonpCryptoPro([2],[
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
execute: execute,
|
execute: execute,
|
||||||
createObj: createObj,
|
|
||||||
subjectNameTagsTranslations: subjectNameTagsTranslations,
|
subjectNameTagsTranslations: subjectNameTagsTranslations,
|
||||||
issuerNameTagsTranslations: issuerNameTagsTranslations,
|
issuerNameTagsTranslations: issuerNameTagsTranslations,
|
||||||
parseCertInfo: parseCertInfo,
|
parseCertInfo: parseCertInfo,
|
||||||
|
2
dist/2.crypto-pro.js.map
vendored
2
dist/2.crypto-pro.js.map
vendored
File diff suppressed because one or more lines are too long
2
dist/crypto-pro.js
vendored
2
dist/crypto-pro.js
vendored
@ -178,7 +178,7 @@ var CryptoPro =
|
|||||||
cadesplugin.then(
|
cadesplugin.then(
|
||||||
function () {
|
function () {
|
||||||
if (canAsync) {
|
if (canAsync) {
|
||||||
__webpack_require__.e/* nsure */(1/* empty */, function () {
|
__webpack_require__.e/* nsure */(1, function () {
|
||||||
cryptoService = __webpack_require__(4);
|
cryptoService = __webpack_require__(4);
|
||||||
finishLoading();
|
finishLoading();
|
||||||
});
|
});
|
||||||
|
2
dist/crypto-pro.js.map
vendored
2
dist/crypto-pro.js.map
vendored
File diff suppressed because one or more lines are too long
@ -169,7 +169,7 @@ Certificate.prototype.hasExtendedKeyUsage = cryptoCommon.hasExtendedKeyUsage;
|
|||||||
* */
|
* */
|
||||||
function isValidEDSSettings() {
|
function isValidEDSSettings() {
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
cryptoCommon.execute(function () {
|
eval(cryptoCommon.execute(function () {
|
||||||
var result;
|
var result;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -179,7 +179,7 @@ function isValidEDSSettings() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resolve();
|
resolve();
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -49,13 +49,11 @@ function execute(cb) {
|
|||||||
|
|
||||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||||
|
|
||||||
cadesplugin.async_spawn(new GeneratorFunction(args, cb));
|
cb = String(new GeneratorFunction(args, cb));
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function createObj(type) {
|
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'yield cadesplugin.CreateObjectAsync$1');
|
||||||
if (cadesplugin.CreateObjectAsync) {
|
|
||||||
return (new Function('', 'return yield cadesplugin.CreateObjectAsync(' + type + ')'))();
|
return 'cadesplugin.async_spawn(' + cb + ');';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -287,7 +285,6 @@ function isValidCadesVersion(version) {
|
|||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
execute: execute,
|
execute: execute,
|
||||||
createObj: createObj,
|
|
||||||
subjectNameTagsTranslations: subjectNameTagsTranslations,
|
subjectNameTagsTranslations: subjectNameTagsTranslations,
|
||||||
issuerNameTagsTranslations: issuerNameTagsTranslations,
|
issuerNameTagsTranslations: issuerNameTagsTranslations,
|
||||||
parseCertInfo: parseCertInfo,
|
parseCertInfo: parseCertInfo,
|
||||||
|
Loading…
Reference in New Issue
Block a user