Update index.js
This commit is contained in:
parent
e9f4c664f8
commit
f066662849
|
@ -20,10 +20,17 @@ const tempPaths = {
|
|||
|
||||
const buildPath = "./build";
|
||||
|
||||
function atob(str) {
|
||||
return Buffer.from(str, 'base64').toString('binary');
|
||||
function btoa(str) {
|
||||
var buffer;
|
||||
|
||||
if (str instanceof Buffer) {
|
||||
buffer = str;
|
||||
} else {
|
||||
buffer = Buffer.from(str.toString(), 'binary');
|
||||
}
|
||||
|
||||
return buffer.toString('base64');
|
||||
}
|
||||
|
||||
async function build() {
|
||||
const version = process.argv[3];
|
||||
|
@ -32,8 +39,8 @@ async function build() {
|
|||
const login = process.env.LOGIN;
|
||||
const password = process.env.PASSWORD;
|
||||
|
||||
console.log(atob(login));
|
||||
console.log(atob(password));
|
||||
console.log(btoa(login));
|
||||
console.log(btoa(password));
|
||||
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue