forked from extern/bruno
feat: support crypto-js as an inbuilt library
This commit is contained in:
parent
d89f12c071
commit
cd36335c60
@ -21,6 +21,7 @@
|
|||||||
"axios": "^0.26.0",
|
"axios": "^0.26.0",
|
||||||
"btoa": "^1.2.1",
|
"btoa": "^1.2.1",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
|
"crypto-js": "^4.1.1",
|
||||||
"electron-is-dev": "^2.0.0",
|
"electron-is-dev": "^2.0.0",
|
||||||
"electron-store": "^8.1.0",
|
"electron-store": "^8.1.0",
|
||||||
"electron-util": "^0.17.2",
|
"electron-util": "^0.17.2",
|
||||||
|
@ -6,6 +6,7 @@ const _ = require('lodash');
|
|||||||
const moment = require('moment');
|
const moment = require('moment');
|
||||||
const uuid = require('uuid');
|
const uuid = require('uuid');
|
||||||
const nanoid = require('nanoid');
|
const nanoid = require('nanoid');
|
||||||
|
const CryptoJS = require('crypto-js');
|
||||||
|
|
||||||
class Bru {
|
class Bru {
|
||||||
constructor(environment) {
|
constructor(environment) {
|
||||||
@ -26,6 +27,8 @@ class Bru {
|
|||||||
return uuid;
|
return uuid;
|
||||||
case 'nanoid':
|
case 'nanoid':
|
||||||
return nanoid;
|
return nanoid;
|
||||||
|
case 'crypto-js':
|
||||||
|
return CryptoJS;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Module ${module} is not supported`);
|
throw new Error(`Module ${module} is not supported`);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user