fix(core): update

This commit is contained in:
2022-03-18 22:50:24 +01:00
parent 8b1769d65e
commit 1e6077ce34
25 changed files with 15372 additions and 7452 deletions

View File

@@ -1,18 +1,24 @@
// node native
import * as smartenv from '@pushrocks/smartenv';
const smartenvInstance = new smartenv.Smartenv();
const crypto = smartenvInstance.getSafeNodeModule('crypto');
import * as isounique from '@pushrocks/isounique';
export {
isounique
}
import { Buffer } from 'buffer';
if (smartenvInstance.isBrowser) {
globalThis.Buffer = Buffer;
}
import * as url from 'url';
export { crypto, url };
export { url };
// third party
const jsBase64 = require('js-base64').Base64;
import { Base64 as jsBase64 } from 'js-base64';
const stripIndent = require('strip-indent');
const normalizeNewline = require('normalize-newline');
const randomatic = smartenvInstance.getSafeNodeModule('randomatic');
const cryptoRandomString = smartenvInstance.getSafeNodeModule('crypto-random-string');
import stripIndent from 'strip-indent';
import normalizeNewline from 'normalize-newline';
import randomatic from 'randomatic';
export { jsBase64, stripIndent, normalizeNewline, randomatic, cryptoRandomString };
export { jsBase64, stripIndent, normalizeNewline, randomatic };