mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2024-11-23 16:44:59 +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() {
|
||||
return new Promise(function (resolve, reject) {
|
||||
cryptoCommon.execute(function () {
|
||||
eval(cryptoCommon.execute(function () {
|
||||
var result;
|
||||
|
||||
try {
|
||||
@ -187,7 +187,7 @@ webpackJsonpCryptoPro([1],[
|
||||
}
|
||||
|
||||
resolve();
|
||||
});
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
@ -615,13 +615,11 @@ webpackJsonpCryptoPro([1],[
|
||||
|
||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||
|
||||
cadesplugin.async_spawn(new GeneratorFunction(args, cb));
|
||||
}
|
||||
}
|
||||
cb = String(new GeneratorFunction(args, cb));
|
||||
|
||||
function createObj(type) {
|
||||
if (cadesplugin.CreateObjectAsync) {
|
||||
return (new Function('', 'return yield cadesplugin.CreateObjectAsync(' + type + ')'))();
|
||||
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'yield cadesplugin.CreateObjectAsync$1');
|
||||
|
||||
return 'cadesplugin.async_spawn(' + cb + ');';
|
||||
}
|
||||
}
|
||||
|
||||
@ -853,7 +851,6 @@ webpackJsonpCryptoPro([1],[
|
||||
|
||||
module.exports = {
|
||||
execute: execute,
|
||||
createObj: createObj,
|
||||
subjectNameTagsTranslations: subjectNameTagsTranslations,
|
||||
issuerNameTagsTranslations: issuerNameTagsTranslations,
|
||||
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');
|
||||
|
||||
cadesplugin.async_spawn(new GeneratorFunction(args, cb));
|
||||
}
|
||||
}
|
||||
cb = String(new GeneratorFunction(args, cb));
|
||||
|
||||
function createObj(type) {
|
||||
if (cadesplugin.CreateObjectAsync) {
|
||||
return (new Function('', 'return yield cadesplugin.CreateObjectAsync(' + type + ')'))();
|
||||
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'yield cadesplugin.CreateObjectAsync$1');
|
||||
|
||||
return 'cadesplugin.async_spawn(' + cb + ');';
|
||||
}
|
||||
}
|
||||
|
||||
@ -296,7 +294,6 @@ webpackJsonpCryptoPro([2],[
|
||||
|
||||
module.exports = {
|
||||
execute: execute,
|
||||
createObj: createObj,
|
||||
subjectNameTagsTranslations: subjectNameTagsTranslations,
|
||||
issuerNameTagsTranslations: issuerNameTagsTranslations,
|
||||
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(
|
||||
function () {
|
||||
if (canAsync) {
|
||||
__webpack_require__.e/* nsure */(1/* empty */, function () {
|
||||
__webpack_require__.e/* nsure */(1, function () {
|
||||
cryptoService = __webpack_require__(4);
|
||||
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() {
|
||||
return new Promise(function (resolve, reject) {
|
||||
cryptoCommon.execute(function () {
|
||||
eval(cryptoCommon.execute(function () {
|
||||
var result;
|
||||
|
||||
try {
|
||||
@ -179,7 +179,7 @@ function isValidEDSSettings() {
|
||||
}
|
||||
|
||||
resolve();
|
||||
});
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -49,13 +49,11 @@ function execute(cb) {
|
||||
|
||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||
|
||||
cadesplugin.async_spawn(new GeneratorFunction(args, cb));
|
||||
}
|
||||
}
|
||||
cb = String(new GeneratorFunction(args, cb));
|
||||
|
||||
function createObj(type) {
|
||||
if (cadesplugin.CreateObjectAsync) {
|
||||
return (new Function('', 'return yield cadesplugin.CreateObjectAsync(' + type + ')'))();
|
||||
cb = cb.replace(/cryptoCommon\.createObj(\([\s\S]*?\))/gm, 'yield cadesplugin.CreateObjectAsync$1');
|
||||
|
||||
return 'cadesplugin.async_spawn(' + cb + ');';
|
||||
}
|
||||
}
|
||||
|
||||
@ -287,7 +285,6 @@ function isValidCadesVersion(version) {
|
||||
|
||||
module.exports = {
|
||||
execute: execute,
|
||||
createObj: createObj,
|
||||
subjectNameTagsTranslations: subjectNameTagsTranslations,
|
||||
issuerNameTagsTranslations: issuerNameTagsTranslations,
|
||||
parseCertInfo: parseCertInfo,
|
||||
|
Loading…
Reference in New Issue
Block a user