fix(core): update
This commit is contained in:
@@ -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 };
|
||||
|
Reference in New Issue
Block a user