diff --git a/airgram.js b/airgram.js new file mode 100644 index 0000000..d99df17 --- /dev/null +++ b/airgram.js @@ -0,0 +1,19 @@ +const { Airgram, Auth, prompt } = require('airgram') +const airgram = new Airgram({ + apiId: 1203086, + apiHash: '213bcfbdae59ef171d85cade070fc33d', + + useChatInfoDatabase: true, + useMessageDatabase: true, + databaseDirectory: './db/', + useSecretChats: false, + + + logVerbosityLevel: 2, // 2, + + deviceModel: 'by @cat6e', + systemVersion: '1.0.0', + applicationVersion: '1.0.0', +}) + +module.exports = airgram diff --git a/index.js b/index.js new file mode 100644 index 0000000..ef6d736 --- /dev/null +++ b/index.js @@ -0,0 +1,698 @@ +const { v4: uuidv4 } = require('uuid') +// #tgfusefs:dirData:fileName:fuseData:attributes +const { Airgram, Auth, prompt, toObject } = require( 'airgram' ) +const airgram = require('./airgram') +const G_UID = process.getuid ? process.getuid() : 0 +const G_GID = process.getgid ? process.getgid() : 0 +const FILEMODE = { + RO: 33024, + 400: 33024, + 444: 33060, + 666: 33206, + 777: 33279, + PRWRR: 4516, // Pipe +} +const cachePrefix = new Date().valueOf() +airgram.use(new Auth({ + code: () => prompt(`Please enter the secret code:\n`), + phoneNumber: () => prompt(`Please enter your phone number:\n`), + password: () => prompt(`Please enter your pw:\n`) +})) +const cacheManager = require('cache-manager') +const CACHE = memoryCache = cacheManager.caching({store: 'memory', max: 100, ttl: 10/*seconds*/}); + +const virtualPipes = {} +const virtualUploads = {} +const virtualUploadMap = [] +//const virtualUploadMapReverse = {} + + +const fuse = require('node-fuse-bindings') +const mountPath = '/home/user/telegram' +/** + * mkdir /tgfusefstmp + * mount -t tmpfs -o size=1G,nr_inodes=10k,mode=777 tmpfs /tgfusefstmp +*/ +const tempMountPath = '/home/user/temp' + +const fs = require('fs') +const path = require('path') + +async function main() { + const me = toObject(await airgram.api.getMe()) + console.log(`[Me] `, me.id) + const chats = toObject(await airgram.api.getChats({ + chatList: { _: 'chatListMain' }, + limit: 100, + })) + /*let uploadFileRequest = await toObject(airgram.api.sendMessage({ + chatId: 777000, + inputMessageContent: { + _: 'inputMessageDocument', + document: { _: 'inputFileLocal', path: '/root/test' }, + caption: { + _: 'formattedText', + text: `#tgfusefs💾${ 'test.fifo' }` + } + }, + })) + console.log('uploadFileRequest', uploadFileRequest)*/ + /*{ + file: { + _: 'inputFileGenerated', + originalPath: '', + conversion: '#tgfuse', + expectedSize: 0, + }, + fileType: { + _: 'fileTypeDocument' + }, + priority: 15, + }*/ + console.log('Done') + //process.exit(0) +} + +const EventEmitter = require('events'); +class TGFileUploadEmitter extends EventEmitter {} +const tgFileUploadEmitter = new TGFileUploadEmitter() + +const asyncRedis = require("async-redis") +const client = asyncRedis.createClient() + +airgram.on('updateMessageSendAcknowledged', ({ update }) => { + console.log(update) +}) +airgram.on('updateMessageSendFailed', ({ update }) => { + console.log(update) + tgFileUploadEmitter.emit(`failed:${ update.oldMessageId }`, update) +}) +airgram.on('updateMessageSendSucceeded', ({ update }) => { + //console.log(update) + tgFileUploadEmitter.emit(`finished:${ update.oldMessageId }`, update) +}) +airgram.on('uploadFile', ({ update }) => { + console.log(update) +}) + +const resolveAndCache = (name, resolver, cacheTime=60) => memoryCache.wrap(name, resolver, { ttl: cacheTime }) +const sleep = (ms) => new Promise(res => setTimeout(res, ms)) + +async function getAllFiles(chatId, query, resourceLocator, offset, totalMessages) { + if (!totalMessages) totalMessages = [] + console.log(query) + let messages = await resolveAndCache(`files:${ resourceLocator }:${ offset }`, async () => { + await sleep(500) + console.log(`renewing cache entry for "files:${ resourceLocator }:${ offset }", newttl=${ !!offset ? 5 : 10 }`) + return toObject(await airgram.api.searchChatMessages({ + chatId, + filter: { _: 'searchMessagesFilterEmpty' }, + limit: !!offset ? 100 : 50, + fromMessageId: offset || 0, + query, + })).messages + }, !!offset ? 5 : 10) + let lastMessageID + for (let message of messages) lastMessageID = message.id + totalMessages = totalMessages.concat(messages) + + if (!!lastMessageID) { + return await getAllFiles(chatId, query, resourceLocator, lastMessageID, totalMessages) + } + return totalMessages +} +const folder2FilterType = { + 'ALL': 'searchMessagesFilterEmpty', + 'animation': 'searchMessagesFilterAnimation', + 'audio': 'searchMessagesFilterAnimation', + 'document': 'searchMessagesFilterDocument', + 'photo': 'searchMessagesFilterPhoto', + 'video': 'searchMessagesFilterVideo', + 'voicenote': 'searchMessagesFilterVoiceNote', + 'photoandvideo': 'searchMessagesFilterPhotoAndVideo' +} + + +function getStatusHTML() { + return '
html test\n' +} + +function getContentSize(content) { + switch (content._) { + case 'messagePhoto': return getContentFileID(content.photo) + case 'photo': return getContentFileID(content.photo.size[content.photo.size.length - 1]) + case 'photoSize': return getContentFileID(content.photo) + + case 'messageAudio': return getContentSize(content.audio) + case 'audio': return getContentSize(content.audio) + + case 'messageDocument': return getContentSize(content.document) + case 'document': return getContentSize(content.document) + + case 'messageVideo': return getContentSize(content.video) + case 'video': return getContentSize(content.video) + + case 'file': return content.size + } +} +function getContentFileID(content) { + switch (content._) { + case 'messagePhoto': return getContentFileID(content.photo) + case 'photo': return getContentFileID(content.photo.size[content.photo.size.length - 1]) + case 'photoSize': return getContentFileID(content.photo) + + case 'messageAudio': return getContentFileID(content.audio) + case 'audio': return getContentFileID(content.audio) + + case 'messageDocument': return getContentFileID(content.document) + case 'document': return getContentFileID(content.document) + + case 'messageVideo': return getContentFileID(content.video) + case 'video': return getContentFileID(content.video) + + case 'file': return content.id // getContentFileID(content.remote) + // case 'remoteFile': return content.id + } +} + +const chatDirs = {} +async function getDirDataFromChat(chatId) { + //console.log('getDirDataFromChat', chatId) + let indexes = toObject(await airgram.api.searchChatMessages({ + chatId, + // filter: { _: 'sea' }, + limit: 1, + fromMessageId: 0, + query: `#tgfuseindex`, + })).messages + if (indexes.length === 1) { + chatDirs[chatId] = JSON.parse(indexes[0].content.text.text.split('\n')[1]) || [] + } else { + chatDirs[chatId] = [] + } +} +async function saveDirDataToChat(chatId) { + //console.log('saveDirDataToChat', chatId) + let indexes = toObject(await airgram.api.searchChatMessages({ + chatId, + // filter: { _: 'sea' }, + limit: 1, + fromMessageId: 0, + query: `#tgfuseindex`, + })).messages + //console.log('saveDirDataToChat indexes.length', indexes.length) + chatDirs[chatId] = chatDirs[chatId] || [] + if (indexes.length > 0) { + let deleteResponse = await airgram.api.deleteMessages({ + chatId, + messageIds: indexes.map(x => x.id), + revoke: true, + }) + //console.log('deleting old msg', chatId) + } + let newIndexResponse = toObject(await airgram.api.sendMessage({ + chatId, + inputMessageContent: { + _: 'inputMessageText', + text: { + _: 'formattedText', text: `#tgfuseindex\n${ JSON.stringify(chatDirs[chatId]) }` + } + }, + })) + //console.log('saveDirDataToChat', newIndexResponse) +} +function getDirData(path, notAFileName=false) { + //if (path.split('/').length === 4) return path.split('/')[3] + // const p = require('path').parse(path.split('/').splice(3)) + let p = path.split('/').splice(3).map(x => Buffer.from(x).toString('base64')).join('/') + p = p.length === 0 ? '$' : p + console.log('getDirData', path, p) + return p +} +let fdCounter = 0 +const FD_RANGE = { REAL: 10, VIRTUAL: 50 } +function getFDHandle(offset) { + fdCounter = (fdCounter + 1) % 30 + console.log('[FD HANDLER] next handle is ', fdCounter+ offset ) + return fdCounter + offset +} +fuse.mount(mountPath, { + readdir: async (path, cb) => { + const p = require('path').parse(path), + deepness = p.dir.substring(1).split('/').length + console.log(deepness, p, p.dir.substring(1).split('/')) + + console.log('readdir(%s)', path) + if (path === '/') { // first folder + let chatList = await resolveAndCache('chatList', async () => { + return toObject(await airgram.api.getChats({ + offsetOrder: '9223372036854775807', + offsetChatId: 0, + limit: 500 + })).chatIds + }) + return cb(0, ['status.html'].concat(chatList)) + } + // Chat ID Directorys + if (deepness === 1 && path.split('/').length == 2) { + return cb(0, ['title', 'json', 'root']) + } + // Chat FilterType Files Directorys + if (deepness >= 1 && path.split('/').length >= 3 && path.indexOf('root') > 0) { + // console.log('every folder in the chatfolder, listing the files corresponding to the type') + const chatId = parseInt(p.dir.split('/')[1]) + await resolveAndCache(`dirIndex:${ chatId }`, async () => await getDirDataFromChat(parseInt(chatId))) + let dirs = chatDirs[chatId] || [] + const dirData = getDirData(path, true) + console.log('[VDIR] dirs=', dirs, '| dirData=', dirData) + dirs = dirs.filter(dirName => { + if (dirData === '$') return dirName.indexOf('/') === -1 + console.log(dirName, dirName.split('/').length, dirData, dirData.split('/').length) + return dirName.length > dirData.length && + dirName.indexOf(dirData) === 0 && + dirName.split('/').length === dirData.split('/').length + 1 + }) + .map(x => { + x = x.indexOf('/') === -1 ? x : x.split('/')[x.split('/').length - 1] + return Buffer.from(x, 'base64').toString('utf8') + }) + + let files = await getAllFiles(parseInt(p.dir.substr(1)), `#tgfusefs:${ dirData }${ dirData === '$' ? ':' : ''}`, `${ p.dir }:${ p.base }`) + //console.log(`files:${ p.dir }:${ p.base }`, files) + // files folder folder + console.log('---') + return cb(0, files.map(message => { + // console.log(message.content.caption.text.split(':')) + return Buffer.from(message.content.caption.text.split(':')[2], 'base64').toString('utf8') + }).concat(dirs)) + } + return cb(0, []) + }, + mkdir: async (path, mode, cb) => { + console.log('mkdir(%s, %d)', path, mode) + const p = require('path').parse(path), + deepness = p.dir.substring(1).split('/').length + try { + const chatId = parseInt(p.dir.split('/')[1]) + if (deepness >= 1 && path.split('/').length > 3 && path.indexOf('root') > 0) { + const dirData = getDirData(path, true) + console.log('mkdir', chatId, path, dirData) + chatDirs[chatId] = chatDirs[chatId] || [] + if (chatDirs[chatId].indexOf(dirData) < 0) { + chatDirs[chatId].push(dirData) + await saveDirDataToChat(chatId) + await client.set(cachePrefix+'-'+chatId+'-'+dirData, 1) + } + } + return cb(0) + } catch (e) { + console.error(e) + return cb(fuse.ENOENT) + } + }, + rmdir: async (path, cb) => { + console.log('rmdir(%s)', path) + const p = require('path').parse(path), + deepness = p.dir.substring(1).split('/').length + try { + const chatId = parseInt(p.dir.split('/')[1]) + if (deepness >= 1 && path.split('/').length > 3 && path.indexOf('root') > 0) { + const dirData = getDirData(path, true) + console.log('rmdir', chatId, path, dirData) + chatDirs[chatId] = chatDirs[chatId] || [] + if (chatDirs[chatId].indexOf(dirData) > -1) { + chatDirs[chatId].splice(chatDirs[chatId].indexOf(dirData), 1) + await saveDirDataToChat(chatId) + await client.set(chatId+'-'+dirData, 0) + } + } + return cb(0) + } catch (e) { + console.error(e) + return cb(fuse.ENOENT) + } + }, + getattr: async (path, cb) => { + if (!!virtualPipes[path]) { + return cb(0, { + mtime: new Date(), atime: new Date(), ctime: new Date(), uid: G_UID, gid: G_GID, + nlink: 1, mode: FILEMODE[666], // fifo pipe + size: 10, + }) + } + if (path === '/status.html') { + return cb(0, { + mtime: new Date(), atime: new Date(), ctime: new Date(), uid: G_UID, gid: G_GID, + nlink: 1, mode: FILEMODE[444], + size: getStatusHTML().length, + }) + } + try { + const p = require('path').parse(path), + deepness = p.dir.substring(1).split('/').length + const chatId = parseInt(p.dir.split('/')[1]) + console.log('getattr(%s)', path, deepness, path.split('/').length, 'chatId=' + chatId) + if (!!chatId && chatId > 0) { + await resolveAndCache(`dirIndex:${ chatId }`, async () => await getDirDataFromChat(chatId)) + const dirData = getDirData(path, true) + console.log ('VDIR DATA SEARCHED', dirData, chatDirs[chatId] || []) + let existInCache = false + try { + existInCache = await client.get(cachePrefix+'-'+chatId+'-'+dirData) == 1 + console.log('existInCache', existInCache) + } catch (e) { } + if (existInCache || (chatDirs[chatId] || []).indexOf(dirData) > -1 ) { + console.log('[VDIR] emulating', path, existInCache, (chatDirs[chatId] || []).indexOf(dirData)) + console.log('---') + return cb(0, { + mtime: new Date(), atime: new Date(), ctime: new Date(), uid: G_UID, gid: G_GID, + nlink: 1, + size: 0, + mode: 16877, // dir + }) + } + } + if (deepness === 1 && p.name === 'title' && p.ext === '') { + let title = await resolveAndCache(`title:${ p.dir }`, async () => toObject(await airgram.api.getChat({ + chatId: parseInt(p.dir.substr(1)), + })).title) + return cb(0, { + mtime: new Date(), atime: new Date(), ctime: new Date(), uid: G_UID, gid: G_GID, + nlink: 1, mode: FILEMODE[444], // readonly file + size: title.length + 1, // + 1 for nullbyte + }) + } + if (deepness === 1 && p.name === 'json' && p.ext === '') { + let json = await resolveAndCache(`json:${ p.dir }`, async () => JSON.stringify(toObject(await airgram.api.getChat({ + chatId: parseInt(p.dir.substr(1)), + })), null, '\t')) + return cb(0, { + mtime: new Date(), atime: new Date(), ctime: new Date(), uid: G_UID, gid: G_GID, + nlink: 1, mode: FILEMODE[444], // readonly file + size: json.length + 1, // + 1 for nullbyte + }) + } + // every folder in the chatfolder, its size = amount of files in there + if (deepness === 1 && path.split('/').length == 3 && p.base === 'root') { + console.log('every folder in the chatfolder, its size = amount of files in there') + /*if (p.base === 'files') return cb(0, { mtime: new Date(), atime: new Date(), ctime: new Date(), uid: G_UID, gid: G_GID, nlink: 1, mode: 16877, size: 0, }) + let fileTypeCount = await resolveAndCache(`count:${ p.dir }:${ p.base }`, async () => toObject(await airgram.api.getChatMessageCount({ + chatId: parseInt(p.dir.substr(1)), + filter: { _: 'searchMessagesFilterEmpty' }, + returnLocal: false + })).count, 5) + console.log(`count:${ p.dir }:${ p.base }`, fileTypeCount) + */ + // files folder folder + return cb(0, { + mtime: new Date(), atime: new Date(), ctime: new Date(), uid: G_UID, gid: G_GID, + nlink: 1, mode: 16877, // dir + size: 0, + }) + } + if (deepness === 1) { // first folder + return cb(0, { + mtime: new Date(), atime: new Date(), ctime: new Date(), uid: G_UID, gid: G_GID, + nlink: 1, + size: 0, + mode: 16877, // dir + }) + } + // show file stats for specific file in type dir + if (deepness >= 2 && path.split('/').length >= 4 && p.dir.split('/')[2] === 'root') { + const dirData = getDirData(path) + console.log('dirData', dirData) + //let files = await getAllFiles(parseInt(p.dir.substr(1)), folder2FilterType[ p.base ], `${ p.dir }:${ p.base }`) + let getattr = await resolveAndCache(`getattr:${ path }`, async () => { + const query = `#tgfusefs:${ dirData }:${ Buffer.from(p.base).toString('base64') }:` + console.log ('searching for ===' + query) + return toObject(await airgram.api.searchChatMessages({ + chatId, + // filter: { _: 'sea' }, + limit: 1, + fromMessageId: 0, + query, + })).messages[0] + }, 15) + if (!getattr) { console.log('no file found, ', path); return cb(fuse.ENOENT) } + console.log('---', getattr.id) + return cb(0, { + mtime: new Date(getattr.date*1e3), atime: new Date(getattr.date*1e3), ctime: new Date(getattr.date*1e3), uid: G_UID, gid: G_GID, + nlink: 1, mode: FILEMODE[666], // file + size: getContentSize(getattr.content), + }) + } + // else anything + console.log('nothing is matching for readdir') + return cb(fuse.ENOENT) + } catch (e) { + console.error(e) + return cb(fuse.ENOENT) + } + }, + open: async (path, flags, cb) => { + const p = require('path').parse(path), + deepness = p.dir.substring(1).split('/').length + console.log('open(%s, %d)', path, flags) + if (!!virtualPipes[path]) return cb(0, getFDHandle(FD_RANGE.VIRTUAL)) // virtual file handles are from 50-79 + if (deepness === 1 && p.name === 'title' && p.ext === '') return cb(0, 1) + if (deepness === 1 && p.name === 'json' && p.ext === '') return cb(0, 2) + if (path === '/status.html') return cb(0, 4) + + cb(0, getFDHandle(FD_RANGE.REAL)) // real file handles are from 10-39 + }, + read: async (path, fd, buf, len, pos, cb) => { + const p = require('path').parse(path), + deepness = p.dir.substring(1).split('/').length + console.log('read(%s, %d, %d, %d)', path, fd, len, pos) + //console.log(p, deepness) + + if (fd === 1 && deepness === 1 && p.name === 'title' && p.ext === '') { + let title = await resolveAndCache(`title:${ p.dir }`, async () => toObject(await airgram.api.getChat({ + chatId: parseInt(p.dir.substr(1)), + })).title) + + let str = title.slice(pos, pos + len) + if (!str) return cb(0) + buf.write(str) + return cb(str.length) + } + if (fd === 2 && deepness === 1 && p.name === 'json' && p.ext === '') { + let json = await resolveAndCache(`json:${ p.dir }`, async () => JSON.stringify(toObject(await airgram.api.getChat({ + chatId: parseInt(p.dir.substr(1)), + })), null, '\t')) + + let str = json.slice(pos, pos + len) + if (!str) return cb(0) + buf.write(str) + return cb(str.length) + } + if (fd >= FD_RANGE.VIRTUAL && !!virtualPipes[path]) { + } + if (fd === 4) { + let str = getStatusHTML().slice(pos, pos + len) + if (!str) return cb(0) + buf.write(str) + return cb(str.length) + } + if (fd >= FD_RANGE.REAL && deepness >= 2 && path.split('/').length >= 4 && p.dir.split('/')[2] === 'root') { + // show file stats for specific file in type dir + //let files = await getAllFiles(parseInt(p.dir.substr(1)), folder2FilterType[ p.base ], `${ p.dir }:${ p.base }`) + let getattr = await resolveAndCache(`getattr:${ path }`, async () => toObject(await airgram.api.searchChatMessages({ + chatId: parseInt(p.dir.substr(1)), + // filter: { _: 'searchMessagesFilterEmpty' }, + limit: 1, + fromMessageId: 0, + query: `#tgfusefs:${ getDirData(p.dir) }:${ Buffer.from(p.base).toString('base64') }`, + })).messages[0], 15) + let fileId = getContentFileID(getattr.content) + let downloadRequest = toObject(await airgram.api.downloadFile({ + fileId, priority: 30, offset: pos, limit: len, synchronous: true + })) + return fs.open(downloadRequest.local.path, 'r', function(err, fd) { + // /----- where to start writing at in `buffer` + fs.readSync(fd, buf, 0, len, pos) + // \------- where to read from in the file given by `fd` + return cb(buf.length) + }) + } + + let str = '< Empty >\n'.slice(pos, pos + len) + if (!str) return cb(0) + buf.write(str) + return cb(str.length) + }, + release: async (path, fd, cb) => { + console.log('release(%s, %d)', path, fd) + if (!!virtualPipes[path]) { + const virtualPipe = virtualPipes[path] + console.log(virtualPipes[path]) + fs.closeSync(virtualPipes[path].fd) + const b64Name = Buffer.from(require('path').parse(virtualPipe.tempTargetFile).base).toString('base64') + let uploadFileRequest = toObject(await airgram.api.sendMessage({ + chatId: 777000, + inputMessageContent: { + _: 'inputMessageDocument', + document: { _: 'inputFileLocal', path: virtualPipe.tempTargetFile }, + caption: { + _: 'formattedText', text: `#tgfusefs:${ getDirData(virtualPipe.targetPath) }:${ b64Name }:fuseData:attributes` + } + }, + })) + + console.log('uploadFileRequest', uploadFileRequest.sendingState) + try { + //console.log(clipJSON) + tgCloud = await new Promise((res, rej) => { + tgFileUploadEmitter.removeAllListeners() + tgFileUploadEmitter.once(`finished:${ uploadFileRequest.id }`, res) + tgFileUploadEmitter.once(`failed:${ uploadFileRequest.id }`, rej) + }) + // console.log('upload emitter', tgCloud) + } catch (e) { + console.error(e) + return cb(fuse.ENOENT) + } + fs.unlinkSync(virtualPipes[path].tempTargetFile) + // uploadFile + delete virtualPipes[path] + return cb(0) + } + return cb(0) + }, + unlink: async (path, cb) => { + try { + const p = require('path').parse(path), + deepness = p.dir.substring(1).split('/').length + console.log('unlink(%s)', path) + + if (deepness === 2 && path.split('/').length == 4 && p.dir.split('/')[2] === 'root') { + let unlink = await resolveAndCache(`unlink:${ path }`, async () => toObject(await airgram.api.searchChatMessages({ + chatId: parseInt(p.dir.substr(1)), + filter: { _: folder2FilterType[ p.dir.split('/')[2] ] }, + limit: 1, + fromMessageId: 0, + query: `#tgfusefs💾${ Buffer.from(p.base).toString('base64') }`, + })).messages[0], 15) + let deleteResponse = await airgram.api.deleteMessages({ + chatId: parseInt(p.dir.substr(1)), + messageIds: [ unlink.id ], + revoke: true, + }) + return cb(0) + } + } catch (e) { + return cb(fuse.ENOENT) + } + return cb(fuse.ENOENT) + }, + rename: async (src, dest, cb) => { + console.log('rename(%s, %s)', src, dest) + return cb(fuse.ENOENT) + }, +/* + if (deepness === 2 && path.split('/').length == 4 && ['ALL', 'animation', 'audio', 'document', 'photo', 'video', 'voicenote', 'photoandvideo'].indexOf(p.dir.split('/')[2]) > - 1) { + let rename = await resolveAndCache(`rename:${ path }`, async () => toObject(await airgram.api.searchChatMessages({ + chatId: parseInt(p.dir.substr(1)), + filter: { _: folder2FilterType[ p.dir.split('/')[2] ] }, + limit: 1, + fromMessageId: 0, + query: `#tgfusefs💾${ p.base }`, + })).messages[0], 15) + let deleteREsponse = await airgram.api.deleteMessages({ + chatId: parseInt(p.dir.substr(1)), + messageIds: [ rename.id ], + revoke: true, + }) + return cb(0) + } + return cb(fuse.ENOENT) + },*/ + create: async (path, mode, cb) => { + const p = require('path').parse(path), + deepness = p.dir.substring(1).split('/').length + console.log('create(%s, %d)', path, mode) + if (deepness >= 2 && path.split('/').length >= 4 && p.dir.split('/')[2] === 'root') { + //createdFiles[path] = true + let cUUID = uuidv4() + const tempTargetFile = require('path').join(tempMountPath, path) + const mkdirp = require('mkdirp') + await mkdirp(require('path').parse(tempTargetFile).dir) + console.log('tempTargetFile', tempTargetFile) + if (fs.existsSync(tempTargetFile)) fs.unlinkSync(tempTargetFile) + return fs.open(tempTargetFile, 'wx', (err, fd) => { + if (err) return console.error(err, cb(fuse.ENOENT)) + virtualUploads[cUUID] = path + virtualPipes[path] = { + path, + targetPath: path, + mode, + cUUID, + size: 0, + tempTargetFile, + fd + } + let virtFd = virtualUploadMap.push(path) + return cb(0, virtFd) + }) +/* + let uploadFileRequest = await toObject(airgram.api.sendMessage({ + chatId: 777000, + inputMessageContent: { + _: 'inputMessageDocument', + document: { _: 'inputFileLocal', expectedSize: 0, originalPath }, + caption: { + _: 'formattedText', + text: `#tgfusefs💾${ p.base }` + } + }, + })) + let virtFd = virtualUploadMap.push(fifoPath) + return cb(0, virtFd) + console.log('uploadFileRequest', uploadFileRequest) +*/ + /* + return tgFileUploadEmitter.once('genStartCB'+cUUID, (genId) => { + //virtualUploadMapReverse[genId] = mapIndex + console.log('file gen created', `genid=${ genId } | virtFd=${ virtFd }`) + cb(0, virtFd) + })*/ + //tgFileUploadEmitter.once('genStartFail'+cUUID, () => cb(fuse.ENOENT)) + // return cb(0, 123) + } + return cb(fuse.ENOENT) + }, + write: async (path, fd, buffer, length, position, cb) => { + // console.log('write(%s, %d, buffer, %d, %d)', path, fd, length, position) + // console.log('writing', buffer.slice(0, length)) + try { + const bytesWritten = fs.writeSync(virtualPipes[path].fd, buffer, 0, buffer.length, position) + return cb(bytesWritten) + } catch (e) { + console.error(e) + return cb(fuse.ENOENT) + } + }, + + + + +}, (err) => { + if (err) throw err + console.log('filesystem mounted on ' + mountPath) +}) + +process.on('SIGINT', function () { + fuse.unmount(mountPath, function (err) { + if (err) { + console.log('filesystem at ' + mountPath + ' not unmounted', err) + } else { + console.log('filesystem at ' + mountPath + ' unmounted') + } + }) +}) + + + +console.log(new Date()) +main() diff --git a/libtdjson.so b/libtdjson.so new file mode 100644 index 0000000..92d510a Binary files /dev/null and b/libtdjson.so differ diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..aaf0181 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,1251 @@ +{ + "name": "user", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@airgram/constants": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@airgram/constants/-/constants-3.0.0.tgz", + "integrity": "sha512-xm/hhvs6gnN+zuqeuQ+wk+qQd7A7pdVtziyV09eyWtRM7J7IUD4uDZoP9I3gQxbO3g23W/j4/2J+1Fvc8LEP7w==" + }, + "@airgram/core": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/@airgram/core/-/core-3.0.1.tgz", + "integrity": "sha512-mmUcDjHb/3tf+BW7Eugmi0685oUt/yFFiUcODI/odwdINTg5dvko8dFW9Wel8SYTvkgHtRNgS7iH/w8XnK+bcg==" + }, + "abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" + }, + "airgram": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/airgram/-/airgram-3.0.2.tgz", + "integrity": "sha512-nO+VD44bzmtUwXwiVcmRMB2bIUunHdpcOAWjMTgnPF0gWEFUkvI7wUCSgU8RdICxUZRg1xEepiGICbLqwAAiPg==", + "requires": { + "@airgram/constants": "^3.0.0", + "@airgram/core": "^3.0.1", + "ffi-napi": "^2.4.5" + } + }, + "ajv": { + "version": "6.12.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.2.tgz", + "integrity": "sha512-k+V+hzjm5q/Mr8ef/1Y9goCmlsK4I6Sm74teeyGvFk1XrOsbsKLjEdrvny42CZ+a8sXbk8KWpY/bDwS+FLL2UQ==", + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "aproba": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", + "integrity": "sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw==" + }, + "are-we-there-yet": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz", + "integrity": "sha512-5hYdAkZlcG8tOLujVDTgCT+uPX0VnpAH28gWsLfzpXYm7wP6mp5Q/gYyR7YQ0cKVJcXJnl3j2kpBan13PtQf6w==", + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "async-redis": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/async-redis/-/async-redis-1.1.7.tgz", + "integrity": "sha512-phpZe2/U+Ih4Lpy72KWF4+c8gymsUgzg6NV/TZUb8BLNn7soQewFxqcq9nndobfPmzXiuhMLi6GNBiQVIor/EA==", + "requires": { + "redis": "^2.8.0", + "redis-commands": "^1.3.1" + }, + "dependencies": { + "redis": { + "version": "2.8.0", + "resolved": "https://registry.npmjs.org/redis/-/redis-2.8.0.tgz", + "integrity": "sha512-M1OkonEQwtRmZv4tEWF2VgpG0JWJ8Fv1PhlgT5+B+uNq2cA3Rt1Yt/ryoR+vQNOQcIEgdCdfH0jr3bDpihAw1A==", + "requires": { + "double-ended-queue": "^2.1.0-0", + "redis-commands": "^1.2.0", + "redis-parser": "^2.6.0" + } + }, + "redis-parser": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-2.6.0.tgz", + "integrity": "sha1-Uu0J2srBCPGmMcB+m2mUHnoZUEs=" + } + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.10.0.tgz", + "integrity": "sha512-3YDiu347mtVtjpyV3u5kVqQLP242c06zwDOgpeRnybmXlYYsLbtTrUBUm8i8srONt+FWobl5aibnU1030PeeuA==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bl": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.0.2.tgz", + "integrity": "sha512-j4OH8f6Qg2bGuWfRiltT2HYGx0e1QcBTrK9KAHNMwMZdQnDZFk0ZSYIpADjYCB3U12nicC5tVJwSIhwOWjb4RQ==", + "requires": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "buffer": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", + "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "cache-manager": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/cache-manager/-/cache-manager-3.3.0.tgz", + "integrity": "sha512-BH7pfWWZ6BYnkcj6759uWnTCwMz24LXI0PzribTP8WqpydHo9Jk6EM9itmG+rBXAJHbNOwo1ES49SIn8hyhW2A==", + "requires": { + "async": "1.5.2", + "lodash": "^4.17.15", + "lru-cache": "4.0.0" + } + }, + "cache-manager-redis-store": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/cache-manager-redis-store/-/cache-manager-redis-store-2.0.0.tgz", + "integrity": "sha512-bWLWlUg6nCYHiJLCCYxY2MgvwvKnvlWwrbuynrzpjEIhfArD2GC9LtutIHFEPeyGVQN6C+WEw+P3r+BFBwhswg==", + "requires": { + "redis": "^3.0.2" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "requires": { + "ms": "^2.1.1" + } + }, + "decompress-response": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz", + "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==", + "requires": { + "mimic-response": "^2.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" + }, + "denque": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/denque/-/denque-1.4.1.tgz", + "integrity": "sha512-OfzPuSZKGcgr96rf1oODnfjqBFmr1DVoc/TrItj3Ohe0Ah1C5WX5Baquw/9U9KovnQ88EqmJbD66rKYUQYN1tQ==" + }, + "detect-libc": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz", + "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=" + }, + "double-ended-queue": { + "version": "2.1.0-0", + "resolved": "https://registry.npmjs.org/double-ended-queue/-/double-ended-queue-2.1.0-0.tgz", + "integrity": "sha1-ED01J/0xUo9AGIEwyEHv3XgmTlw=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "requires": { + "once": "^1.4.0" + } + }, + "env-paths": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/env-paths/-/env-paths-2.2.0.tgz", + "integrity": "sha512-6u0VYSCo/OW6IoD5WCLLy9JUGARbamfSavcNXry/eu8aHVFei6CD3Sw+VGX5alea1i9pgPHW0mbu6Xj0uBh7gA==" + }, + "expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==" + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.1.tgz", + "integrity": "sha512-8UEa58QDLauDNfpbrX55Q9jrGHThw2ZMdOky5Gl1CDtVeJDPVrG4Jxx1N8jw2gkWaff5UUuX1KJd+9zGe2B+ZA==" + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" + }, + "ffi-napi": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/ffi-napi/-/ffi-napi-2.5.0.tgz", + "integrity": "sha512-ninYS+GI4BDFOg29dEJ68uZOcWgCp05teU4Lm40vrnyh+E1fYjKYvTDMYAG+WUD75NNHPTJhNjgVqv5whSgU3w==", + "requires": { + "debug": "^3.1.0", + "get-uv-event-loop-napi-h": "^1.0.5", + "node-addon-api": "1.6.1", + "node-gyp-build": "^4.2.1", + "ref-napi": "^1.5.2", + "ref-struct-di": "^1.1.0" + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "fs-minipass": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-1.2.7.tgz", + "integrity": "sha512-GWSSJGFy4e9GUeCcbIkED+bgAoFyj7XF1mV8rma3QW4NIqX9Kyx79N/PF61H5udOV3aY1IaMLs6pGbH71nlCTA==", + "requires": { + "minipass": "^2.6.0" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "fuse-native": { + "version": "2.2.5", + "resolved": "https://registry.npmjs.org/fuse-native/-/fuse-native-2.2.5.tgz", + "integrity": "sha512-2W1S6d7Jj/z+5lW9S340/ePNDPeaCk13Gw0zJmh1Qs+L/QKpUw0X9gRotWWr9uf5wqwvOCQZ5O2ddxOoXwD2xA==", + "requires": { + "fuse-shared-library": "^1.0.2", + "nanoresource": "^1.3.0", + "napi-macros": "^2.0.0", + "node-gyp-build": "^4.2.0" + } + }, + "fuse-shared-library": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/fuse-shared-library/-/fuse-shared-library-1.1.1.tgz", + "integrity": "sha512-EfgTo/eS1euZFUe7x8KqyA40hV4DwP7kqp1VNZApu2nlPnJv8SanraBE3VXyX7ff41sxw7M0oWY7re3G3wnZVA==", + "requires": { + "fuse-shared-library-darwin": "^1.0.3", + "fuse-shared-library-linux": "^1.0.1", + "fuse-shared-library-linux-arm": "^1.0.0" + } + }, + "fuse-shared-library-darwin": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/fuse-shared-library-darwin/-/fuse-shared-library-darwin-1.1.3.tgz", + "integrity": "sha512-4Q8gMxyMl1+gwHGpiYUoKKpi7xq8WcPo0TvJvjZzHMuCiszouu2GgEs6SJAqPB3LjfmEkl6kPV+2Oluczr0Nig==" + }, + "fuse-shared-library-linux": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/fuse-shared-library-linux/-/fuse-shared-library-linux-1.0.1.tgz", + "integrity": "sha512-07MQRSobrBKwW4D7oKm0gM2TwgvZWb+gC08JdiYDG4KBTncxk9ssqEDiDMKll8hpseZufsY2w1yc/feOu2DPmQ==" + }, + "fuse-shared-library-linux-arm": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fuse-shared-library-linux-arm/-/fuse-shared-library-linux-arm-1.0.0.tgz", + "integrity": "sha512-Dj4ssxo1/MKGvOsVWRblSRu+o5F5OJTrVPDkjSyGDU2yKvVnIzQSwy1deiWA0qCcS/Q8iJMlZaCpCcZWSwvoug==" + }, + "gauge": { + "version": "2.7.4", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-2.7.4.tgz", + "integrity": "sha1-LANAXHU4w51+s3sxcCLjJfsBi/c=", + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "get-symbol-from-current-process-h": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-from-current-process-h/-/get-symbol-from-current-process-h-1.0.2.tgz", + "integrity": "sha512-syloC6fsCt62ELLrr1VKBM1ggOpMdetX9hTrdW77UQdcApPHLmf7CI7OKcN1c9kYuNxKcDe4iJ4FY9sX3aw2xw==" + }, + "get-uv-event-loop-napi-h": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/get-uv-event-loop-napi-h/-/get-uv-event-loop-napi-h-1.0.6.tgz", + "integrity": "sha512-t5c9VNR84nRoF+eLiz6wFrEp1SE2Acg0wS+Ysa2zF0eROes+LzOfuTaVHxGy8AbS8rq7FHEJzjnCZo1BupwdJg==", + "requires": { + "get-symbol-from-current-process-h": "^1.0.1" + } + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4=" + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==" + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==" + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + }, + "lru-cache": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.0.tgz", + "integrity": "sha1-tcvwFVbBaWb+vlTO7A+03JDfbCg=", + "requires": { + "pseudomap": "^1.0.1", + "yallist": "^2.0.0" + }, + "dependencies": { + "yallist": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", + "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" + } + } + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==" + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "requires": { + "mime-db": "1.44.0" + } + }, + "mimic-response": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz", + "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==" + }, + "minipass": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-2.9.0.tgz", + "integrity": "sha512-wxfUjg9WebH+CUDX/CdbRlh5SmfZiy/hpkxaRI16Y9W56Pa75sWgd/rvFilSgrauD9NyFymP/+JFV3KwzIsJeg==", + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-1.3.3.tgz", + "integrity": "sha512-6ZYMOEnmVsdCeTJVE0W9ZD+pVnE8h9Hma/iOwwRDsdQoePpoX56/8B6z3P9VNwppJuBKNRuFDRNRqRWexT9G9Q==", + "requires": { + "minipass": "^2.9.0" + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==" + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" + }, + "nan": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==" + }, + "nanoresource": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/nanoresource/-/nanoresource-1.3.0.tgz", + "integrity": "sha512-OI5dswqipmlYfyL3k/YMm7mbERlh4Bd1KuKdMHpeoVD1iVxqxaTMKleB4qaA2mbQZ6/zMNSxCXv9M9P/YbqTuQ==", + "requires": { + "inherits": "^2.0.4" + } + }, + "napi-build-utils": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", + "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==" + }, + "napi-macros": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-macros/-/napi-macros-2.0.0.tgz", + "integrity": "sha512-A0xLykHtARfueITVDernsAWdtIMbOJgKgcluwENp3AlsKN/PloyO10HtmoqnFAQAcxPkgZN7wdfPfEd0zNGxbg==" + }, + "node-abi": { + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.18.0.tgz", + "integrity": "sha512-yi05ZoiuNNEbyT/xXfSySZE+yVnQW6fxPZuFbLyS1s6b5Kw3HzV2PHOM4XR+nsjzkHxByK+2Wg+yCQbe35l8dw==", + "requires": { + "semver": "^5.4.1" + } + }, + "node-addon-api": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-1.6.1.tgz", + "integrity": "sha512-GcLOYrG5/enbqH4SMsqXt6GQUQGGnDnE3FLDZzXYkCgQHuZV5UDFR+EboeY8kpG0avroyOjpFQ2qLEBosFcRIA==" + }, + "node-fuse-bindings": { + "version": "2.12.4", + "resolved": "https://registry.npmjs.org/node-fuse-bindings/-/node-fuse-bindings-2.12.4.tgz", + "integrity": "sha512-BtrWlcmtm/qJ3puxmaGf+9x//zZGqebyI1lkrMwUN1ID7tQTPZdGTXOMVA6gQoWpPjgcmb3CryvbWRswG0Kxsw==", + "requires": { + "nan": "^2.14.0", + "node-gyp": "^6.0.1", + "node-gyp-build": "^4.2.0", + "prebuild-install": "^5.3.3", + "xtend": "^4.0.2" + } + }, + "node-gyp": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/node-gyp/-/node-gyp-6.1.0.tgz", + "integrity": "sha512-h4A2zDlOujeeaaTx06r4Vy+8MZ1679lU+wbCKDS4ZtvY2A37DESo37oejIw0mtmR3+rvNwts5B6Kpt1KrNYdNw==", + "requires": { + "env-paths": "^2.2.0", + "glob": "^7.1.4", + "graceful-fs": "^4.2.2", + "mkdirp": "^0.5.1", + "nopt": "^4.0.1", + "npmlog": "^4.1.2", + "request": "^2.88.0", + "rimraf": "^2.6.3", + "semver": "^5.7.1", + "tar": "^4.4.12", + "which": "^1.3.1" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + } + } + }, + "node-gyp-build": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/node-gyp-build/-/node-gyp-build-4.2.2.tgz", + "integrity": "sha512-Lqh7mrByWCM8Cf9UPqpeoVBBo5Ugx+RKu885GAzmLBVYjeywScxHXPGLa4JfYNZmcNGwzR0Glu5/9GaQZMFqyA==" + }, + "noop-logger": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/noop-logger/-/noop-logger-0.1.1.tgz", + "integrity": "sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI=" + }, + "nopt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", + "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npmlog": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-4.1.2.tgz", + "integrity": "sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg==", + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", + "integrity": "sha1-/7xJiDNuDoM94MFox+8VISGqf7M=" + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" + }, + "osenv": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", + "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "prebuild-install": { + "version": "5.3.4", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-5.3.4.tgz", + "integrity": "sha512-AkKN+pf4fSEihjapLEEj8n85YIw/tN6BQqkhzbDc0RvEZGdkpJBGMUYx66AAMcPG2KzmPQS7Cm16an4HVBRRMA==", + "requires": { + "detect-libc": "^1.0.3", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp": "^0.5.1", + "napi-build-utils": "^1.0.1", + "node-abi": "^2.7.0", + "noop-logger": "^0.1.1", + "npmlog": "^4.0.1", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^3.0.3", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0", + "which-pm-runs": "^1.0.0" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + } + } + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==" + }, + "pseudomap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", + "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" + }, + "psl": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", + "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" + }, + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "redis": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/redis/-/redis-3.0.2.tgz", + "integrity": "sha512-PNhLCrjU6vKVuMOyFu7oSP296mwBkcE6lrAjruBYG5LgdSqtRBoVQIylrMyVZD/lkF24RSNNatzvYag6HRBHjQ==", + "requires": { + "denque": "^1.4.1", + "redis-commands": "^1.5.0", + "redis-errors": "^1.2.0", + "redis-parser": "^3.0.0" + } + }, + "redis-commands": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/redis-commands/-/redis-commands-1.5.0.tgz", + "integrity": "sha512-6KxamqpZ468MeQC3bkWmCB1fp56XL64D4Kf0zJSwDZbVLLm7KFkoIcHrgRvQ+sk8dnhySs7+yBg94yIkAK7aJg==" + }, + "redis-errors": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/redis-errors/-/redis-errors-1.2.0.tgz", + "integrity": "sha1-62LSrbFeTq9GEMBK/hUpOEJQq60=" + }, + "redis-parser": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/redis-parser/-/redis-parser-3.0.0.tgz", + "integrity": "sha1-tm2CjNyv5rS4pCin3vTGvKwxyLQ=", + "requires": { + "redis-errors": "^1.0.0" + } + }, + "ref-napi": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/ref-napi/-/ref-napi-1.5.2.tgz", + "integrity": "sha512-hwyNmWpUkt1bDWDW4aiwCoC+SJfJO69UIdjqssNqdaS0sYJpgqzosGg/rLtk69UoQ8drZdI9yyQefM7eEMM3Gw==", + "requires": { + "debug": "^3.1.0", + "node-addon-api": "^2.0.0", + "node-gyp-build": "^4.2.1" + }, + "dependencies": { + "node-addon-api": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.1.tgz", + "integrity": "sha512-2WVfwRfIr1AVn3dRq4yRc2Hn35ND+mPJH6inC6bjpYCZVrpXPB4j3T6i//OGVfqVsR1t/X/axRulDsheq4F0LQ==" + } + } + }, + "ref-struct-di": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ref-struct-di/-/ref-struct-di-1.1.0.tgz", + "integrity": "sha512-gghZITj/iQwdwFDduZ6T8kL2B2ogInlOz7AOB0ggFoEc7akAKMcDrbzh3OIPk13Kxy8U2bHPvN6nejcBh4jN7A==", + "requires": { + "debug": "^3.1.0" + } + }, + "request": { + "version": "2.88.2", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", + "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.3", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.5.0", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + }, + "dependencies": { + "uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==" + } + } + }, + "rimraf": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.7.1.tgz", + "integrity": "sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==", + "requires": { + "glob": "^7.1.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==" + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=" + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==" + }, + "simple-concat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", + "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=" + }, + "simple-get": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.0.tgz", + "integrity": "sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA==", + "requires": { + "decompress-response": "^4.2.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=" + }, + "tar": { + "version": "4.4.13", + "resolved": "https://registry.npmjs.org/tar/-/tar-4.4.13.tgz", + "integrity": "sha512-w2VwSrBoHa5BsSyH+KxEqeQBAllHhccyMFVHtGtdMpF4W7IRWfZjFiQceJPChOeTsSDVUpER2T8FA93pr0L+QA==", + "requires": { + "chownr": "^1.1.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.8.6", + "minizlib": "^1.2.1", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.3" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "requires": { + "minimist": "^1.2.5" + } + } + } + }, + "tar-fs": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.0.tgz", + "integrity": "sha512-9uW5iDvrIMCVpvasdFHW0wJPez0K4JnMZtsuIeDI7HyMGJNxmDZDOCQROr7lXyS+iL/QMpj07qcjGYTSdRFXUg==", + "requires": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.0.0" + } + }, + "tar-stream": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.2.tgz", + "integrity": "sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q==", + "requires": { + "bl": "^4.0.1", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "tough-cookie": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", + "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", + "requires": { + "psl": "^1.1.28", + "punycode": "^2.1.1" + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "uuid": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.1.0.tgz", + "integrity": "sha512-CI18flHDznR0lq54xBycOVmphdCYnQLKn8abKn7PXUiKUGdEd+/l9LWNJmugXel4hXq7S+RMNl34ecyC9TntWg==" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "requires": { + "isexe": "^2.0.0" + } + }, + "which-pm-runs": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz", + "integrity": "sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=" + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" + }, + "yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..cad1844 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "user", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "airgram": "^3.0.2", + "async-redis": "^1.1.7", + "cache-manager": "^3.3.0", + "cache-manager-redis-store": "^2.0.0", + "fuse-native": "^2.2.5", + "mkdirp": "^1.0.4", + "node-fuse-bindings": "^2.12.4", + "redis": "^3.0.2", + "uuid": "^8.1.0" + } +}