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
17
dist/1.crypto-pro.js
vendored
17
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();
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -614,14 +614,12 @@ webpackJsonpCryptoPro([1],[
|
|||||||
args = (args && args[1]) || '';
|
args = (args && args[1]) || '';
|
||||||
|
|
||||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||||
|
|
||||||
cadesplugin.async_spawn(new GeneratorFunction(args, cb));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function createObj(type) {
|
cb = String(new GeneratorFunction(args, cb));
|
||||||
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 = {
|
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
13
dist/2.crypto-pro.js
vendored
13
dist/2.crypto-pro.js
vendored
@ -57,14 +57,12 @@ webpackJsonpCryptoPro([2],[
|
|||||||
args = (args && args[1]) || '';
|
args = (args && args[1]) || '';
|
||||||
|
|
||||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||||
|
|
||||||
cadesplugin.async_spawn(new GeneratorFunction(args, cb));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function createObj(type) {
|
cb = String(new GeneratorFunction(args, cb));
|
||||||
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 = {
|
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();
|
||||||
});
|
}));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,14 +48,12 @@ function execute(cb) {
|
|||||||
args = (args && args[1]) || '';
|
args = (args && args[1]) || '';
|
||||||
|
|
||||||
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
cb = cb.replace(/^.*?{([\s\S]*?)}$/, '$1');
|
||||||
|
|
||||||
cadesplugin.async_spawn(new GeneratorFunction(args, cb));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function createObj(type) {
|
cb = String(new GeneratorFunction(args, cb));
|
||||||
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 = {
|
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