This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { execSync } = require('child_process'); | |
const os = require('os'); | |
const path = require('path'); | |
const fs = require('fs'); | |
const tempFile = path.resolve(os.tmpdir(), 'importFile.js'); | |
const IMPORT_REGEX = /import\s+(\S+)\s+from\s+['|"](\S+)['|"]/gm; | |
let result; | |
let output = ''; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for multiple requests | |
let isRefreshing = false; | |
let failedQueue = []; | |
const processQueue = (error, token = null) => { | |
failedQueue.forEach(prom => { | |
if (error) { | |
prom.reject(error); | |
} else { | |
prom.resolve(token); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; | |
const Base64 = { | |
btoa: (input: string = '') => { | |
let str = input; | |
let output = ''; | |
for ( | |
let block = 0, charCode, i = 0, map = chars; | |
str.charAt(i | 0) || ((map = '='), i % 1); | |
output += map.charAt(63 & (block >> (8 - (i % 1) * 8))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
/* qr.js -- QR code generator in Javascript (revision 2011-01-19) | |
* Written by Kang Seonghoon <[email protected]>. | |
* | |
* This source code is in the public domain; if your jurisdiction does not | |
* recognize the public domain the terms of Creative Commons CC0 license | |
* apply. In the other words, you can always do what you want. | |
*/ | |
// per-version information (cf. JIS X 0510:2004 pp. 30--36, 71) |