fix(core): update

This commit is contained in:
Philipp Kunz 2020-12-31 04:25:31 +00:00
parent bd20512b10
commit 2bd1741893
4 changed files with 13 additions and 13 deletions

8
package-lock.json generated
View File

@ -1350,8 +1350,7 @@
"@pushrocks/isounique": {
"version": "1.0.4",
"resolved": "https://verdaccio.lossless.one/@pushrocks%2fisounique/-/isounique-1.0.4.tgz",
"integrity": "sha512-P1xLsuA1+8LQpoWCo2nP2vIQXKGUl5wDWU6CD7xTDZc3uw0He5V/qCPHM5zpIZsS7IuZOxDDpWb7aFveB11tXw==",
"dev": true
"integrity": "sha512-P1xLsuA1+8LQpoWCo2nP2vIQXKGUl5wDWU6CD7xTDZc3uw0He5V/qCPHM5zpIZsS7IuZOxDDpWb7aFveB11tXw=="
},
"@pushrocks/lik": {
"version": "4.0.20",
@ -7528,11 +7527,6 @@
"dev": true,
"optional": true
},
"nanoid": {
"version": "3.1.20",
"resolved": "https://verdaccio.lossless.one/nanoid/-/nanoid-3.1.20.tgz",
"integrity": "sha512-a1cQNyczgKbLX9jwbS/+d7W8fX/RfgYR7lVWwWOGIPNgK2m0MWvrGF6/m4kk6U3QcFMnZf3RIhL0v2Jgh/0Uxw=="
},
"nanomatch": {
"version": "1.2.13",
"resolved": "https://verdaccio.lossless.one/nanomatch/-/nanomatch-1.2.13.tgz",

View File

@ -33,9 +33,9 @@
"tslint-config-prettier": "^1.18.0"
},
"dependencies": {
"@pushrocks/isounique": "^1.0.4",
"@pushrocks/smartenv": "^4.0.16",
"js-base64": "^2.5.1",
"nanoid": "^3.1.20",
"normalize-newline": "^3.0.0",
"randomatic": "^3.1.1",
"strip-indent": "^3.0.0",

View File

@ -25,5 +25,5 @@ export const createRandomString = (
* @param lengthArg the length of the crypto string
*/
export const createCryptoRandomString = (lengthArg: number): string => {
return plugins.nanoid(lengthArg);
return plugins.isounique.uni();
};

View File

@ -1,12 +1,19 @@
// node native
import * as smartenv from '@pushrocks/smartenv';
const smartenvInstance = new smartenv.Smartenv();
const crypto = smartenvInstance.getSafeNodeModule('crypto');
// node native
const crypto = smartenvInstance.getSafeNodeModule('crypto');
import * as url from 'url';
export { crypto, url };
// pushrocks scope
import * as isounique from '@pushrocks/isounique';
export {
isounique
};
// third party
const jsBase64 = require('js-base64').Base64;
@ -14,12 +21,11 @@ const stripIndent = require('strip-indent');
const normalizeNewline = require('normalize-newline');
const randomatic = require('randomatic');
import { nanoid } from 'nanoid';
export {
jsBase64,
stripIndent,
normalizeNewline,
randomatic,
nanoid
}