diff --git a/app/index.start.html b/app/index.start.html deleted file mode 100644 index 65e7a91e..00000000 --- a/app/index.start.html +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/app/js/lang/lang.ja.js b/app/js/lang/lang.ja.js index 4dacbf4b..ba51e9ad 100644 --- a/app/js/lang/lang.ja.js +++ b/app/js/lang/lang.ja.js @@ -108,6 +108,8 @@ var lang={ //tl/tl.js "lang_tl_media":"メディア", "lang_tl_reconnect":"Streamingに再接続しました", +//ui/img.js + "lang_img_DLDone":"ダウンロード先:", //ui/layout.js "lang_layout_gotop":"一番上へ。アイコンが赤のときはストリーミングに接続できていません。F5等で再読込をお試し下さい。", "lang_layout_thisacct":"このアカウントの{{notf}}", diff --git a/app/js/tl/datails.js b/app/js/tl/datails.js index 623e41d5..56fc189a 100644 --- a/app/js/tl/datails.js +++ b/app/js/tl/datails.js @@ -412,62 +412,6 @@ function staCopy(id){ } } -//魚拓 -function shot(){ - var title=$("#tootmodal").attr("data-id"); - var off = $('#toot-this').offset(); - var w=$("#toot-this").width()+50; - var h=$("#toot-this").height()+50; - var electron = require("electron"); - const fs = require("fs"); - const os = require('os') - const shell = electron.shell; - const path = require('path') - var ipc = electron.ipcRenderer; - let options = { - types: ['screen'], - thumbnailSize: { - width: window.parent.screen.width, - height: window.parent.screen.height - } - } - const desktopCapturer = electron.desktopCapturer; - desktopCapturer.getSources(options, function(error, sources) { - if (error) return console.log(error) - - sources.forEach(function(source) { - if (source.name === 'Screen 1' || source.name === 'TheDesk') { - var durl=source.thumbnail.toDataURL(); - var b64 = durl.match( - /data:image\/png;base64,(.+)/ - ); - const screenshotPath = path.join(os.tmpdir(), 'screenshot.png'); - const savePath = path.join(os.tmpdir(), 'screenshot.png'); - var ipc = electron.ipcRenderer; - if(localStorage.getItem("savefolder")){ - var save=localStorage.getItem("savefolder"); - }else{ - var save=""; - } - ipc.send('shot', ['file://' + screenshotPath,w,h,b64[1],title,off.top+50,off.left,save]); - if($("#toot-this .img-parsed").length>0){ - for(i=0;i<$("#toot-this .img-parsed").length;i++){ - var url=$("#toot-this .img-parsed").eq(i).attr("data-url"); - if(localStorage.getItem("savefolder")){ - var save=localStorage.getItem("savefolder"); - }else{ - var save=""; - } - ipc.send('shot-img-dl', [url,title+"_img"+i+".png",save]); - } - } - return; - const message = `Saved screenshot to: ${screenshotPath}` - //screenshotMsg.textContent = message - } - }) - }) -} //翻訳 function trans(tar,to){ var html=$("#toot-this .toot").html(); diff --git a/app/js/ui/img.js b/app/js/ui/img.js index 0145e5f4..8589b2c8 100644 --- a/app/js/ui/img.js +++ b/app/js/ui/img.js @@ -287,6 +287,10 @@ function dlImg(){ console.log(arg); }) ipc.on('general-dl-message', function (event, arg) { - console.log(arg); + var argC=arg.replace(/\\/g,"\\\\")+"\\\\."; + Materialize.toast(lang.lang_img_DLDone+arg+'', 5000); }) +} +function openFinder(dir){ + ipc.send('open-finder', dir); } \ No newline at end of file diff --git a/app/language.html b/app/language.html deleted file mode 100644 index 1907baa9..00000000 --- a/app/language.html +++ /dev/null @@ -1,75 +0,0 @@ - - - - Languages - TheDesk - - - - - - - - - - - - - - -

- - -
-
- - - \ No newline at end of file diff --git a/app/main.js b/app/main.js index c555156d..7ebc5197 100644 --- a/app/main.js +++ b/app/main.js @@ -1,33 +1,26 @@ 'use strict'; - +var dir='file://' + __dirname; +var base=dir + '/view/'; // Electronのモジュール const electron = require("electron"); const fs = require("fs"); -const dialog = require('electron').dialog; -var Jimp = require("jimp"); -const shell = electron.shell; -const os = require('os') -const path = require('path') -const fm = require('font-manager'); -const language = require('./language.js'); +const language = require('./main/language.js'); +const css = require('./main/css.js'); +const dl = require('./main/dl.js'); +const img = require('./main/img.js'); +const np = require('./main/np.js'); +const systemFunc = require('./main/system.js'); const Menu=electron.Menu -var updatewin=null; const join = require('path').join; -var JSON5 = require('json5'); // アプリケーションをコントロールするモジュール const app = electron.app; // ウィンドウを作成するモジュール const BrowserWindow = electron.BrowserWindow; -const { - download -} = require('electron-dl'); // メインウィンドウはGCされないようにグローバル宣言 let mainWindow; var info_path = join(app.getPath("userData"), "window-size.json"); var max_info_path = join(app.getPath("userData"), "max-window-size.json"); var lang_path=join(app.getPath("userData"), "language"); -var customcss=join(app.getPath("userData"), "custom.css"); -var tmp_img = join(app.getPath("userData"), "tmp.png"); var ha_path=join(app.getPath("userData"), "hardwareAcceleration"); try{ fs.readFileSync(ha_path, 'utf8'); @@ -107,7 +100,7 @@ function createWindow() { }else{ var plus=""; } - mainWindow.loadURL('file://' + __dirname + '/view/'+lang+'/index.html'+plus); + mainWindow.loadURL(base+lang+'/index.html'+plus); if(!window_size.x && !window_size.y){ mainWindow.center(); } @@ -140,527 +133,21 @@ function createWindow() { if(platform=="darwin"){ Menu.setApplicationMenu(Menu.buildFromTemplate(language.template(lang,mainWindow,false))); } + //CSS + css.css(mainWindow); + //アップデータとダウンロード + dl.dl(mainWindow,lang_path,base); + //画像選択と画像処理 + img.img(mainWindow,dir); + //NowPlaying + np.TheDeskNowPlaying(mainWindow); + //その他system + systemFunc.system(mainWindow,dir,lang); } // Electronの初期化完了後に実行 app.on('ready', createWindow); var onError = function(err,response){ console.error(err,response); }; -var ipc = electron.ipcMain; -ipc.on('minimize', function(e, args) { - mainWindow.minimize(); -}); -ipc.on('maximize', function(e, args) { - mainWindow.isMaximized() ? mainWindow.unmaximize() : mainWindow.maximize(); -}); -ipc.on('native-notf', function(e, args) { - var platform=process.platform; - var bit=process.arch; - if(platform=="win32"){ - const notifier = require('node-notifier') - var tmp_imge=tmp_img; - Jimp.read(args[2], function (err, lenna) { - if(!err && lenna){ - lenna.write(tmp_img); - var tmp_imge=tmp_img; - }else{ - var tmp_imge=""; - } - notifier.notify({ - appID: "top.thedesk", - message: args[1], - title: args[0], - icon : tmp_imge, - sound: false, - wait: true, - }, - function(err, response) { - console.log(err, response) - }); - }); - } -}); -//言語 -ipc.on('lang', function(e, arg) { - console.log("set:"+arg); - fs.writeFileSync(lang_path,arg); - mainWindow.webContents.send('langres', ""); -}) -//CSS -ipc.on('custom-css-create', function(e, arg) { - fs.writeFileSync(customcss,arg); - mainWindow.webContents.send('custom-css-create-complete', ""); -}) -ipc.on('custom-css-request', function(e, arg) { - try { - var css = fs.readFileSync(customcss, 'utf8'); - } catch (e) { - var css=""; - } - mainWindow.webContents.send('custom-css-response', css); -}) -ipc.on('theme-json-create', function(e, arg) { - var themecss=join(app.getPath("userData"), JSON5.parse(arg)["id"]+".thedesktheme"); - fs.writeFileSync(themecss,JSON.stringify(JSON5.parse(arg))); - if(JSON5.parse(arg)["id"]){ - mainWindow.webContents.send('theme-json-create-complete', ""); - }else{ - mainWindow.webContents.send('theme-json-create-complete', "error"); - } -}) -ipc.on('theme-json-delete', function(e, arg) { - var themecss=join(app.getPath("userData"), arg+".thedesktheme"); - console.log(themecss); - fs.unlink(themecss, function (err) { - mainWindow.webContents.send('theme-json-delete-complete', ""); - }); -}) -ipc.on('theme-json-request', function(e, arg) { - var themecss=join(app.getPath("userData"), arg+".thedesktheme"); - var json = JSON.parse(fs.readFileSync(themecss, 'utf8')); - mainWindow.webContents.send('theme-json-response', json); -}) -ipc.on('theme-css-request', function(e, arg) { - var themecss=join(app.getPath("userData"), arg+".thedesktheme"); - try { - var json = JSON.parse(fs.readFileSync(themecss, 'utf8')); - - var primary=json.vars.primary; - var secondary=json.vars.secondary; - var text=json.vars.text; - if(json.base=="light"){ - var drag="rgba(255, 255, 255, 0.8)"; - var beforehover="#757575"; - }else{ - var drag="rgba(0, 0, 0, 0.8)"; - var beforehover="#9e9e9e"; - } - if(json.props){ - if(json.props.TheDeskAccent){ - var emphasized=json.props.TheDeskAccent - }else{ - var emphasized=secondary; - } - }else{ - var emphasized=primary; - } - - var css=".customtheme {--bg:"+secondary+";--drag:"+drag+";"+ - "--color:"+text+";--beforehover:"+beforehover+";--modal:"+secondary+";--subcolor:"+primary+";--box:"+primary+";--sidebar:"+primary+";--shared:"+emphasized+";"+ - "--notfbox:"+secondary+";--emphasized:"+primary+";--his-data:"+secondary+ - "--active:"+primary+";--postbox:"+primary+";--modalfooter:"+primary+";}.blacktheme #imagemodal{background: url(\"../img/pixel.svg\");}"; - mainWindow.webContents.send('theme-css-response', css); - } catch (e) { - var css=""; - } - -}) -ipc.on('theme-json-list', function(e, arg) { - fs.readdir(app.getPath("userData"), function(err, files){ - if (err) throw err; - var fileList = files.filter(function(file){ - var tfile=join(app.getPath("userData"), file); - return fs.statSync(tfile).isFile() && /.*\.thedesktheme$/.test(tfile); //絞り込み - }) - var themes=[]; - for(var i=0;i { - Jimp.read(args[0], function (err, lenna) { - if (err) throw err; - if(args[1]==""){ - if(process.platform=="win32"){ - var folder=app.getPath('home')+"\\Pictures\\TheDesk\\Screenshots\\"; - }else if(process.platform=="linux" || process.platform=="darwin" ){ - var folder=app.getPath('home')+"/Pictures/TheDesk/Screenshots/"; - } - }else{ - var folder=args[2]; - } - - lenna.write(folder+args[1]); - }); -}) -//アプデDL -ipc.on('download-btn', (e, args) => { - //console.log(args[1]); - var platform=process.platform; - var bit=process.arch; - dialog.showSaveDialog(null, { - title: 'Save', - defaultPath: app.getPath('home')+"/"+args[1] - }, (savedFiles) => { - console.log(savedFiles); - if(!savedFiles){ - return false; - } - if(platform=="win32"){ - var m = savedFiles.match(/(.+)\\(.+)$/); - }else{ - var m = savedFiles.match(/(.+)\/(.+)$/); - } - //console.log(m); - if(isExistFile(savedFiles)){ - fs.unlinkSync(savedFiles); - } - dl(args[0],args[1],m[1]); - }); -}); -function isExistFile(file) { - try { - fs.statSync(file); - return true - } catch(err) { - if(err.code === 'ENOENT') return false - } - } -function dl(url,file,dir){ - updatewin.webContents.send('mess', "ダウンロードを開始します。"); - const opts = { - directory:dir, - openFolderWhenDone: true, - onProgress: function(e) { - updatewin.webContents.send('prog', e); - }, - saveAs: false - }; - download(BrowserWindow.getFocusedWindow(), - url, opts) - .then(dl => { - updatewin.webContents.send('mess', "ダウンロードが完了しました。"); - app.quit(); - - }) - .catch(console.error); -} -ipc.on('general-dl', (e, args) => { - var name=""; - var platform=process.platform; - var bit=process.arch; - if(args[1]==""){ - if(platform=="win32"){ - var dir=app.getPath('home')+"\\Pictures\\TheDesk"; - }else if(platform=="linux" || platform=="darwin" ){ - var dir=app.getPath('home')+"/Pictures/TheDesk"; - } - }else{ - var dir=args[1]; - } - mainWindow.webContents.send('general-dl-message', "ダウンロードを開始します。"); - const opts = { - directory: dir, - filename:name, - openFolderWhenDone: true, - onProgress: function(e) { - mainWindow.webContents.send('general-dl-prog', e); - }, - saveAs: false - }; - download(BrowserWindow.getFocusedWindow(), - args[0], opts) - .then(dl => { - mainWindow.webContents.send('general-dl-message', "ダウンロードが完了しました。"); - }) - .catch(console.error); -}); -ipc.on('quit', (e, args) => { - app.quit(); -}); -ipc.on('about', (e, args) => { - about(); -}); -function about(){ - var ver=app.getVersion() - var window = new BrowserWindow({width: 300, height: 460, - "transparent": false, // ウィンドウの背景を透過 - "frame": false, // 枠の無いウィンドウ - "resizable": false }); - window.loadURL('file://' + __dirname + '/about.html?ver='+ver); - return "true" -} - -ipc.on('itunes', (e, args) => { - console.log("Access"); - if(args[0]=="set"){ - var {NowPlaying,PlayerName} = require("nowplaying-node"); - var nppath=join(app.getPath("userData"), "nowplaying"); - var npProvider; - try { - npProvider = args[1]; - } catch (e) { - npProvider="AIMP"; - } - var myAIMP = new NowPlaying({ - fetchCover: true, - player: PlayerName[npProvider], - }); - fs.writeFileSync(nppath, npProvider); - }else{ - var platform=process.platform; - var bit=process.arch; - if(platform=="darwin"){ - const nowplaying = require("itunes-nowplaying-mac") - nowplaying.getRawData().then(function (value) { - mainWindow.webContents.send('itunes-np', value); - }).catch(function (error) { - // 非同期処理失敗。呼ばれない - console.log(error); - }); - }else{ - var {NowPlaying,PlayerName} = require("nowplaying-node"); - var nppath=join(app.getPath("userData"), "nowplaying"); - var npProvider; - try { - npProvider = fs.readFileSync(nppath, 'utf8'); - } catch (e) { - npProvider="AIMP"; - } - var myAIMP = new NowPlaying({ - fetchCover: true, - player: PlayerName[npProvider], - }); - myAIMP.update(); - var path=myAIMP.getCoverPath(); - if(path){ - var bin = fs.readFileSync(path, 'base64'); - }else{ - var bin=false; - } - - var value={ - win:true, - name:myAIMP.getTitle(), - artist:myAIMP.getArtist(), - album:myAIMP.getAlbum(), - path:bin - } - mainWindow.webContents.send('itunes-np', value); - } - } - -}); -ipc.on('file-select', (e, args) => { - dialog.showOpenDialog(null, { - properties: ['openFile', 'multiSelections'], - title: '添付ファイルを選択', - defaultPath: '.', - filters: [ - {name: 'メディアファイル', extensions: ['jpg', 'png', 'gif', 'bmp', 'jpeg','mp4','webm']}, - {name: '画像', extensions: ['jpg', 'png', 'gif', 'bmp', 'jpeg']}, - {name: '動画', extensions: ['mp4','webm']}, - {name: '全てのファイル', extensions: ['*']} - ] - }, (fileNames) => { - if(!fileNames){ - return false; - } - for(var i=0;i { - console.log(lang); - var options=language.delsel(lang) - dialog.showMessageBox(options, function(index) { - mainWindow.webContents.send('column-del-reply', index); - }) -}); -ipc.on('bmp-image', (e, args) => { - var m = args[0].match(/(.+)\\(.+)\.(.+)$/); - Jimp.read(args[0], function (err, lenna) { - if (err) throw err; - lenna.getBase64(Jimp.MIME_PNG, function (err, src) { - mainWindow.webContents.send('bmp-img-comp', [src,args[1]]); - }); - }); - -}); -ipc.on('nano', function (e, x, y) { - var nano_info_path = join(app.getPath("userData"), "nano-window-position.json"); - var window_pos; - try { - window_pos = JSON.parse(fs.readFileSync(nano_info_path, 'utf8')); - } catch (e) { - window_pos = [0,0]; // デフォルトバリュー - } - var nanowindow = new BrowserWindow({width: 350, height: 200, - "transparent": false, // ウィンドウの背景を透過 - "frame": false, // 枠の無いウィンドウ - "resizable": false }); - nanowindow.loadURL('file://' + __dirname + '/nano.html'); - nanowindow.setAlwaysOnTop(true); - - nanowindow.setPosition(window_pos[0], window_pos[1]); - nanowindow.on('close', function() { - fs.writeFileSync(nano_info_path, JSON.stringify(nanowindow.getPosition())); - }); - return true; - }) - ipc.on('adobe', (e, arg) => { - if(!arg){ - const options = { - type: 'info', - title: 'Adobeフォトエディタ', - message: "「許可」または「永続的に許可」をクリックするとTheDeskとAdobeで情報を共有します。\n次のウィンドウを開いている時以外は一切提供しません。", - buttons: ['拒否', '許可','永続的に許可'] - } - dialog.showMessageBox(options, function(index) { - if(index===2){ - mainWindow.webContents.send('adobeagree', "true"); - } - if(index>0){ - adobeWindow(); - } - }) - }else{ - adobeWindow(); - } -}); -function adobeWindow(){ - var window = new BrowserWindow({ - width: 1000, - height: 750 - }); - window.loadURL('file://' + __dirname + '/adobe.html'); -} -var cbTimer1; -ipc.on('startmem', (e, arg) => { - cbTimer1 = setInterval(mems, 1000); -}); -ipc.on('endmem', (e, arg) => { - if(cbTimer1){ - clearInterval(cbTimer1); - } -}); -function mems(){ - var mem=os.totalmem()-os.freemem(); - if(mainWindow){ - mainWindow.webContents.send('memory', [mem,os.cpus()[0].model,os.totalmem()]); - } -} -ipc.on('mkc', (e, arg) => { - var platform=process.platform; - if(platform=="linux" || platform=="win32" ){ - var mkc = fs.readFileSync(__dirname + '/.tkn', 'utf8'); - - }else{ - var mkc = ""; - } - mainWindow.webContents.send('mkcr', mkc); -}); -ipc.on('export', (e, args) => { - fs.writeFileSync(args[0], args[1]); -}); -ipc.on('import', (e, arg) => { - mainWindow.webContents.send('config', fs.readFileSync(arg, 'utf8')); -}); -//フォント -function object_array_sort(data,key,order,fn){ - //デフォは降順(DESC) - var num_a = -1; - var num_b = 1; - - if(order === 'asc'){//指定があれば昇順(ASC) - num_a = 1; - num_b = -1; - } - - data = data.sort(function(a, b){ - var x = a[key]; - var y = b[key]; - if (x > y) return num_a; - if (x < y) return num_b; - return 0; - }); - - //重複排除 - var arrObj = {}; - for (var i = 0; i < data.length; i++) { - arrObj[data[i]['family']] = data[i]; - } - - data = []; - for (var key in arrObj) { - data.push(arrObj[key]); - } - - fn(data); // ソート後の配列を返す - } -ipc.on('fonts', (e, arg) => { - var fonts = fm.getAvailableFontsSync(); -object_array_sort(fonts, 'family', 'asc', function(fonts_sorted){ - mainWindow.webContents.send('font-list', fonts_sorted); -}); -}); - - app.setAsDefaultProtocolClient('thedesk') diff --git a/app/main/css.js b/app/main/css.js new file mode 100644 index 00000000..a36e91b1 --- /dev/null +++ b/app/main/css.js @@ -0,0 +1,105 @@ +function css(mainWindow) { + const electron = require("electron"); + const fs = require("fs"); + const path = require('path') + var ipc = electron.ipcMain; + var JSON5 = require('json5'); + const app = electron.app; + const join = require('path').join; + var customcss = join(app.getPath("userData"), "custom.css"); + + ipc.on('custom-css-create', function(e, arg) { + fs.writeFileSync(customcss, arg); + mainWindow.webContents.send('custom-css-create-complete', ""); + }) + ipc.on('custom-css-request', function(e, arg) { + try { + var css = fs.readFileSync(customcss, 'utf8'); + } catch (e) { + var css = ""; + } + mainWindow.webContents.send('custom-css-response', css); + }) + ipc.on('theme-json-create', function(e, arg) { + var themecss = join(app.getPath("userData"), JSON5.parse(arg)["id"] + + ".thedesktheme"); + fs.writeFileSync(themecss, JSON.stringify(JSON5.parse(arg))); + if (JSON5.parse(arg)["id"]) { + mainWindow.webContents.send('theme-json-create-complete', ""); + } else { + mainWindow.webContents.send('theme-json-create-complete', "error"); + } + }) + ipc.on('theme-json-delete', function(e, arg) { + var themecss = join(app.getPath("userData"), arg + ".thedesktheme"); + console.log(themecss); + fs.unlink(themecss, function(err) { + mainWindow.webContents.send('theme-json-delete-complete', ""); + }); + }) + ipc.on('theme-json-request', function(e, arg) { + var themecss = join(app.getPath("userData"), arg + ".thedesktheme"); + var json = JSON.parse(fs.readFileSync(themecss, 'utf8')); + mainWindow.webContents.send('theme-json-response', json); + }) + ipc.on('theme-css-request', function(e, arg) { + var themecss = join(app.getPath("userData"), arg + ".thedesktheme"); + try { + var json = JSON.parse(fs.readFileSync(themecss, 'utf8')); + + var primary = json.vars.primary; + var secondary = json.vars.secondary; + var text = json.vars.text; + if (json.base == "light") { + var drag = "rgba(255, 255, 255, 0.8)"; + var beforehover = "#757575"; + } else { + var drag = "rgba(0, 0, 0, 0.8)"; + var beforehover = "#9e9e9e"; + } + if (json.props) { + if (json.props.TheDeskAccent) { + var emphasized = json.props.TheDeskAccent + } else { + var emphasized = secondary; + } + } else { + var emphasized = primary; + } + + var css = ".customtheme {--bg:" + secondary + ";--drag:" + drag + ";" + + "--color:" + text + ";--beforehover:" + beforehover + ";--modal:" + + secondary + ";--subcolor:" + primary + ";--box:" + primary + + ";--sidebar:" + primary + ";--shared:" + emphasized + ";" + + "--notfbox:" + secondary + ";--emphasized:" + primary + ";--his-data:" + + secondary + + ";--active:" + primary + ";--postbox:" + primary + ";--modalfooter:" + + primary + + ";}.blacktheme #imagemodal{background: url(\"../img/pixel.svg\");}"; + mainWindow.webContents.send('theme-css-response', css); + } catch (e) { + var css = ""; + } + + }) + ipc.on('theme-json-list', function(e, arg) { + fs.readdir(app.getPath("userData"), function(err, files) { + if (err) throw err; + var fileList = files.filter(function(file) { + var tfile = join(app.getPath("userData"), file); + return fs.statSync(tfile).isFile() && /.*\.thedesktheme$/.test(tfile); //絞り込み + }) + var themes = []; + for (var i = 0; i < fileList.length; i++) { + var themecss = join(app.getPath("userData"), fileList[i]); + var json = JSON.parse(fs.readFileSync(themecss, 'utf8')); + themes.push({ + name: json.name, + id: json.id + }) + } + mainWindow.webContents.send('theme-json-list-response', themes); + }); + }) +} +exports.css = css; diff --git a/app/main/dl.js b/app/main/dl.js new file mode 100644 index 00000000..e5d1436c --- /dev/null +++ b/app/main/dl.js @@ -0,0 +1,123 @@ +function dl(mainWindow,lang_path,base) { + const electron = require("electron"); + const shell=electron.shell; + const fs = require("fs"); + const {download} = require('electron-dl'); + const BrowserWindow = electron.BrowserWindow; + const dialog = electron.dialog; + var updatewin = null; + var ipc = electron.ipcMain; + const app = electron.app; + const join = require('path').join; + ipc.on('update', function(e, x, y) { + + var platform = process.platform; + var bit = process.arch; + if (platform != "others") { + updatewin = new BrowserWindow({ + width: 600, + height: 400, + "transparent": false, // ウィンドウの背景を透過 + "frame": false, // 枠の無いウィンドウ + "resizable": false, + "modal": true + }); + var lang = fs.readFileSync(lang_path, 'utf8'); + updatewin.loadURL(base + lang + '/update.html'); + + return "true" + } else { + return false; + } + }) + //アプデDL + ipc.on('download-btn', (e, args) => { + + var platform = process.platform; + var bit = process.arch; + dialog.showSaveDialog(null, { + title: 'Save', + defaultPath: app.getPath('home') + "/" + args[1] + }, (savedFiles) => { + console.log(savedFiles); + if (!savedFiles) { + return false; + } + if (platform == "win32") { + var m = savedFiles.match(/(.+)\\(.+)$/); + } else { + var m = savedFiles.match(/(.+)\/(.+)$/); + } + //console.log(m); + if (isExistFile(savedFiles)) { + fs.unlinkSync(savedFiles); + } + dl(args[0], args[1], m[1]); + }); + }); + + function isExistFile(file) { + try { + fs.statSync(file); + return true + } catch (err) { + if (err.code === 'ENOENT') return false + } + } + + function dl(url, file, dir) { + + updatewin.webContents.send('mess', "ダウンロードを開始します。"); + const opts = { + directory: dir, + openFolderWhenDone: true, + onProgress: function(e) { + updatewin.webContents.send('prog', e); + }, + saveAs: false + }; + download(BrowserWindow.getFocusedWindow(), + url, opts) + .then(dl => { + updatewin.webContents.send('mess', "ダウンロードが完了しました。"); + app.quit(); + + }) + .catch(console.error); + } + ipc.on('general-dl', (e, args) => { + + var name = ""; + var platform = process.platform; + var bit = process.arch; + if (args[1] == "") { + if (platform == "win32") { + var dir = app.getPath('home') + "\\Pictures\\TheDesk"; + } else if (platform == "linux" || platform == "darwin") { + var dir = app.getPath('home') + "/Pictures/TheDesk"; + } + } else { + var dir = args[1]; + } + const opts = { + directory: dir, + filename: name, + openFolderWhenDone: false, + onProgress: function(e) { + mainWindow.webContents.send('general-dl-prog', e); + }, + saveAs: false + }; + download(BrowserWindow.getFocusedWindow(), + args[0], opts) + .then(dl => { + mainWindow.webContents.send('general-dl-message', dir); + }) + .catch(console.error); + }); + ipc.on('open-finder', (e, folder) => { + + shell.showItemInFolder(folder) + }); +} +exports.dl = dl; diff --git a/app/main/img.js b/app/main/img.js new file mode 100644 index 00000000..eb473c6f --- /dev/null +++ b/app/main/img.js @@ -0,0 +1,71 @@ +function img(mainWindow,dir){ + const electron = require("electron"); + const dialog = electron.dialog; + const fs = require("fs"); + var Jimp = require("jimp"); + var ipc = electron.ipcMain; + const BrowserWindow = electron.BrowserWindow; + ipc.on('file-select', (e, args) => { + + dialog.showOpenDialog(null, { + properties: ['openFile', 'multiSelections'], + title: '添付ファイルを選択', + defaultPath: '.', + filters: [ + {name: 'メディアファイル', extensions: ['jpg', 'png', 'gif', 'bmp', 'jpeg','mp4','webm']}, + {name: '画像', extensions: ['jpg', 'png', 'gif', 'bmp', 'jpeg']}, + {name: '動画', extensions: ['mp4','webm']}, + {name: '全てのファイル', extensions: ['*']} + ] + }, (fileNames) => { + if(!fileNames){ + return false; + } + for(var i=0;i { + + if(!arg){ + const options = { + type: 'info', + title: 'Adobeフォトエディタ', + message: "「許可」または「永続的に許可」をクリックするとTheDeskとAdobeで情報を共有します。\n次のウィンドウを開いている時以外は一切提供しません。", + buttons: ['拒否', '許可','永続的に許可'] + } + dialog.showMessageBox(options, function(index) { + if(index===2){ + mainWindow.webContents.send('adobeagree', "true"); + } + if(index>0){ + adobeWindow(); + } + }) + }else{ + adobeWindow(); + } + }); + function adobeWindow(){ + var window = new BrowserWindow({ + width: 1000, + height: 750 + }); + window.loadURL(dir + '/adobe.html'); + } + ipc.on('bmp-image', (e, args) => { + + var m = args[0].match(/(.+)\\(.+)\.(.+)$/); + Jimp.read(args[0], function (err, lenna) { + if (err) throw err; + lenna.getBase64(Jimp.MIME_PNG, function (err, src) { + mainWindow.webContents.send('bmp-img-comp', [src,args[1]]); + }); + }); + +}); +} +exports.img = img; \ No newline at end of file diff --git a/app/language.js b/app/main/language.js similarity index 100% rename from app/language.js rename to app/main/language.js diff --git a/app/main/np.js b/app/main/np.js new file mode 100644 index 00000000..31ad140b --- /dev/null +++ b/app/main/np.js @@ -0,0 +1,69 @@ +function np(mainWindow){ + const electron = require("electron"); + const join = require('path').join; + const app = electron.app; + const fs = require("fs"); + var ipc = electron.ipcMain; + ipc.on('itunes', (e, args) => { + //Verified on Windows + console.log("Access"); + if(args[0]=="set"){ + var {NowPlaying,PlayerName} = require("nowplaying-node"); + var nppath=join(app.getPath("userData"), "nowplaying"); + var npProvider; + try { + npProvider = args[1]; + } catch (e) { + npProvider="AIMP"; + } + var myAIMP = new NowPlaying({ + fetchCover: true, + player: PlayerName[npProvider], + }); + fs.writeFileSync(nppath, npProvider); + }else{ + var platform=process.platform; + var bit=process.arch; + if(platform=="darwin"){ + const nowplaying = require("itunes-nowplaying-mac") + nowplaying.getRawData().then(function (value) { + mainWindow.webContents.send('itunes-np', value); + }).catch(function (error) { + // 非同期処理失敗。呼ばれない + console.log(error); + }); + }else{ + var {NowPlaying,PlayerName} = require("nowplaying-node"); + var nppath=join(app.getPath("userData"), "nowplaying"); + var npProvider; + try { + npProvider = fs.readFileSync(nppath, 'utf8'); + } catch (e) { + npProvider="AIMP"; + } + var myAIMP = new NowPlaying({ + fetchCover: true, + player: PlayerName[npProvider], + }); + myAIMP.update(); + var path=myAIMP.getCoverPath(); + if(path){ + var bin = fs.readFileSync(path, 'base64'); + }else{ + var bin=false; + } + + var value={ + win:true, + name:myAIMP.getTitle(), + artist:myAIMP.getArtist(), + album:myAIMP.getAlbum(), + path:bin + } + mainWindow.webContents.send('itunes-np', value); + } + } + + }); +} +exports.TheDeskNowPlaying = np; \ No newline at end of file diff --git a/app/main/system.js b/app/main/system.js new file mode 100644 index 00000000..715c1a3e --- /dev/null +++ b/app/main/system.js @@ -0,0 +1,181 @@ +function system(mainWindow, dir, lang) { + const electron = require("electron"); + const app = electron.app; + const join = require('path').join; + var Jimp = require("jimp"); + const fs = require("fs"); + var ipc = electron.ipcMain; + var tmp_img = join(app.getPath("userData"), "tmp.png"); + var ha_path = join(app.getPath("userData"), "hardwareAcceleration"); + var lang_path = join(app.getPath("userData"), "language"); + const BrowserWindow = electron.BrowserWindow; + const dialog = electron.dialog; + const os = require('os') + const fm = require('font-manager'); + const language=require("../main/language.js"); + ipc.on('native-notf', function(e, args) { + + var platform = process.platform; + var bit = process.arch; + if (platform == "win32") { + const notifier = require('node-notifier') + var tmp_imge = tmp_img; + Jimp.read(args[2], function(err, lenna) { + if (!err && lenna) { + lenna.write(tmp_img); + var tmp_imge = tmp_img; + } else { + var tmp_imge = ""; + } + notifier.notify({ + appID: "top.thedesk", + message: args[1], + title: args[0], + icon: tmp_imge, + sound: false, + wait: true, + }, + function(err, response) { + console.log(err, response) + }); + }); + } + }); + //言語 + ipc.on('lang', function(e, arg) { + + console.log("set:" + arg); + fs.writeFileSync(lang_path, arg); + mainWindow.webContents.send('langres', ""); + }) + //ハードウェアアクセラレーションの無効化 + ipc.on('ha', function(e, arg) { + + if (arg == "true") { + fs.writeFileSync(ha_path, arg); + } else { + fs.unlink(ha_path, function(err) {}); + } + app.relaunch() + app.exit() + }) + + ipc.on('quit', (e, args) => { + + app.quit(); + }); + ipc.on('about', (e, args) => { + + about(); + }); + + function about() { + + var ver = app.getVersion() + var window = new BrowserWindow({ + width: 300, + height: 460, + "transparent": false, // ウィンドウの背景を透過 + "frame": false, // 枠の無いウィンドウ + "resizable": false + }); + window.loadURL(dir + '/about.html?ver=' + ver); + return "true" + } + ipc.on('column-del', (e, args) => { + + console.log(lang); + var options = language.delsel(lang) + dialog.showMessageBox(options, function(index) { + mainWindow.webContents.send('column-del-reply', index); + }) + }); + ipc.on('nano', function(e, x, y) { + + var nano_info_path = join(app.getPath("userData"), + "nano-window-position.json"); + var window_pos; + try { + window_pos = JSON.parse(fs.readFileSync(nano_info_path, 'utf8')); + } catch (e) { + window_pos = [0, 0]; // デフォルトバリュー + } + var nanowindow = new BrowserWindow({ + width: 350, + height: 200, + "transparent": false, // ウィンドウの背景を透過 + "frame": false, // 枠の無いウィンドウ + "resizable": false + }); + nanowindow.loadURL(dir + '/nano.html'); + nanowindow.setAlwaysOnTop(true); + + nanowindow.setPosition(window_pos[0], window_pos[1]); + nanowindow.on('close', function() { + fs.writeFileSync(nano_info_path, JSON.stringify(nanowindow.getPosition())); + }); + return true; + }) + + var cbTimer1; + ipc.on('startmem', (e, arg) => { + cbTimer1 = setInterval(mems, 1000); + }); + ipc.on('endmem', (e, arg) => { + if (cbTimer1) { + clearInterval(cbTimer1); + } + }); + + function mems() { + var mem = os.totalmem() - os.freemem(); + if (mainWindow) { + mainWindow.webContents.send('memory', [mem, os.cpus()[0].model, os.totalmem()]); + } + } + ipc.on('export', (e, args) => { + fs.writeFileSync(args[0], args[1]); + }); + ipc.on('import', (e, arg) => { + mainWindow.webContents.send('config', fs.readFileSync(arg, 'utf8')); + }); + //フォント + function object_array_sort(data, key, order, fn) { + //デフォは降順(DESC) + var num_a = -1; + var num_b = 1; + + if (order === 'asc') { //指定があれば昇順(ASC) + num_a = 1; + num_b = -1; + } + + data = data.sort(function(a, b) { + var x = a[key]; + var y = b[key]; + if (x > y) return num_a; + if (x < y) return num_b; + return 0; + }); + + //重複排除 + var arrObj = {}; + for (var i = 0; i < data.length; i++) { + arrObj[data[i]['family']] = data[i]; + } + + data = []; + for (var key in arrObj) { + data.push(arrObj[key]); + } + + fn(data); // ソート後の配列を返す + } + ipc.on('fonts', (e, arg) => { + var fonts = fm.getAvailableFontsSync(); + object_array_sort(fonts, 'family', 'asc', function(fonts_sorted) { + mainWindow.webContents.send('font-list', fonts_sorted); + }); + }); +} +exports.system = system; \ No newline at end of file diff --git a/app/package-lock.json b/app/package-lock.json index ed662863..5e7809d9 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,6 +1,6 @@ { "name": "thedesk", - "version": "18.0.3", + "version": "18.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -15,14 +15,14 @@ "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==" }, "ajv": { - "version": "5.5.2", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-5.5.2.tgz", - "integrity": "sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU=", + "version": "6.10.0", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.10.0.tgz", + "integrity": "sha512-nffhOpkymDECQyR0mnsUtoCE8RlX38G0rYP+wgLWFyZuUyuuojSSvi/+euOiQBIn63whYwYVIIH1TvE3tu4OEg==", "requires": { - "co": "^4.6.0", - "fast-deep-equal": "^1.0.0", + "fast-deep-equal": "^2.0.1", "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.3.0" + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" } }, "ansi-regex": { @@ -60,40 +60,36 @@ "dev": true }, "asar": { - "version": "0.14.6", - "resolved": "https://registry.npmjs.org/asar/-/asar-0.14.6.tgz", - "integrity": "sha512-ZqybKcdO5At6y3ge2RHxVImc6Eltb2t3sxT7lk4T4zjZBSFUuIGCIZY6f41dCjlvJSizN5QPRr8YTgMhpgBjLg==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/asar/-/asar-1.0.0.tgz", + "integrity": "sha512-MBiDU5cDr9UWuY2F0zq2fZlnyRq1aOPmJGMas22Qa14K1odpRXL3xkMHPN3uw2hAK5mD89Q+/KidOUtpi4V0Cg==", "dev": true, "requires": { "chromium-pickle-js": "^0.2.0", - "commander": "^2.9.0", - "cuint": "^0.2.1", - "glob": "^6.0.4", - "minimatch": "^3.0.3", - "mkdirp": "^0.5.0", - "mksnapshot": "^0.3.4", - "tmp": "0.0.28" + "commander": "^2.19.0", + "cuint": "^0.2.2", + "glob": "^7.1.3", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "pify": "^4.0.1", + "tmp-promise": "^1.0.5" }, "dependencies": { - "glob": { - "version": "6.0.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-6.0.4.tgz", - "integrity": "sha1-DwiGD2oVUSey+t1PnOJLGqtuTSI=", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } + "pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true } } }, "asn1": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.3.tgz", - "integrity": "sha1-2sh4dxPJlmhJ/IGAd36+nB3fO4Y=" + "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", @@ -117,9 +113,9 @@ "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" }, "aws4": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.6.0.tgz", - "integrity": "sha1-g+9cqGCysy5KDe7e6MdxudtXRx4=" + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" }, "balanced-match": { "version": "1.0.0", @@ -133,10 +129,9 @@ "dev": true }, "bcrypt-pbkdf": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz", - "integrity": "sha1-Y7xdy2EzG5K8Bf1SiVPDNGKgb40=", - "optional": true, + "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" } @@ -146,16 +141,6 @@ "resolved": "https://registry.npmjs.org/bignumber.js/-/bignumber.js-2.4.0.tgz", "integrity": "sha1-g4qZLan51zfg9LLbC+YrsJ3Qxeg=" }, - "binary": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/binary/-/binary-0.3.0.tgz", - "integrity": "sha1-n2BVO8XOjDOG87VTz/R0Yq3sqnk=", - "dev": true, - "requires": { - "buffers": "~0.1.1", - "chainsaw": "~0.1.0" - } - }, "block-stream": { "version": "0.0.9", "resolved": "https://registry.npmjs.org/block-stream/-/block-stream-0.0.9.tgz", @@ -175,14 +160,6 @@ "resolved": "https://registry.npmjs.org/bmp-js/-/bmp-js-0.0.3.tgz", "integrity": "sha1-ZBE+nHzxICs3btYHvzBibr5XsYo=" }, - "boom": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/boom/-/boom-4.3.1.tgz", - "integrity": "sha1-T4owBctKfjiJ90kDD9JbluAdLjE=", - "requires": { - "hoek": "4.x.x" - } - }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -225,12 +202,6 @@ "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", "dev": true }, - "buffers": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/buffers/-/buffers-0.1.1.tgz", - "integrity": "sha1-skV5w77U1tOWru5tmorn9Ugqt7s=", - "dev": true - }, "builtin-modules": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", @@ -266,15 +237,6 @@ "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" }, - "chainsaw": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.1.0.tgz", - "integrity": "sha1-XqtQsor+WAdNDVgpE4iCi15fvJg=", - "dev": true, - "requires": { - "traverse": ">=0.3.0 <0.4" - } - }, "chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", @@ -357,11 +319,6 @@ "integrity": "sha1-2jCcwmPfFZlMaIypAheco8fNfH4=", "dev": true }, - "co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=" - }, "code-point-at": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", @@ -397,9 +354,9 @@ } }, "commander": { - "version": "2.19.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.19.0.tgz", - "integrity": "sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==", + "version": "2.20.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", + "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", "dev": true }, "compare-version": { @@ -448,24 +405,6 @@ "which": "^1.2.9" } }, - "cryptiles": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/cryptiles/-/cryptiles-3.1.2.tgz", - "integrity": "sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4=", - "requires": { - "boom": "5.x.x" - }, - "dependencies": { - "boom": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/boom/-/boom-5.2.0.tgz", - "integrity": "sha1-XdnabuOl8wIHdDYpDLcX0/SlTgI=", - "requires": { - "hoek": "4.x.x" - } - } - } - }, "cuint": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/cuint/-/cuint-0.2.2.tgz", @@ -503,47 +442,6 @@ "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", "dev": true }, - "decompress-zip": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/decompress-zip/-/decompress-zip-0.3.0.tgz", - "integrity": "sha1-rjvLfjTGWHmt/nfhnDD4ZgK0vbA=", - "dev": true, - "requires": { - "binary": "^0.3.0", - "graceful-fs": "^4.1.3", - "mkpath": "^0.1.0", - "nopt": "^3.0.1", - "q": "^1.1.2", - "readable-stream": "^1.1.8", - "touch": "0.0.3" - }, - "dependencies": { - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", - "dev": true - } - } - }, "deep-extend": { "version": "0.6.0", "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", @@ -581,12 +479,12 @@ "integrity": "sha1-ZyIm3HTI95mtNTB9+TaroRrNYBg=" }, "ecc-jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.1.tgz", - "integrity": "sha1-D8c6ntXw1Tw4GTOYUj735UN3dQU=", - "optional": true, + "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" + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" } }, "electron": { @@ -662,48 +560,40 @@ } }, "electron-download": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-3.3.0.tgz", - "integrity": "sha1-LP1U1pZsAZxNSa1l++Zcyc3vaMg=", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.1.tgz", + "integrity": "sha512-FjEWG9Jb/ppK/2zToP+U5dds114fM1ZOJqMAR4aXXL5CvyPE9fiqBK/9YcwC9poIFQTEJk/EM/zyRwziziRZrg==", "dev": true, "requires": { - "debug": "^2.2.0", - "fs-extra": "^0.30.0", - "home-path": "^1.0.1", + "debug": "^3.0.0", + "env-paths": "^1.0.0", + "fs-extra": "^4.0.1", "minimist": "^1.2.0", - "nugget": "^2.0.0", - "path-exists": "^2.1.0", - "rc": "^1.1.2", - "semver": "^5.3.0", - "sumchecker": "^1.2.0" + "nugget": "^2.0.1", + "path-exists": "^3.0.0", + "rc": "^1.2.1", + "semver": "^5.4.1", + "sumchecker": "^2.0.2" }, "dependencies": { - "es6-promise": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.5.tgz", - "integrity": "sha512-n6wvpdE43VFtJq+lUDYDBFUwV8TZbuGXLV4D6wKafg13ldznKsyEvatubnmUe31zcvelSzOHF+XbaT+Bl9ObDg==", - "dev": true + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } }, "fs-extra": { - "version": "0.30.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.30.0.tgz", - "integrity": "sha1-8jP/zAjU2n1DLapEl3aYnbHfk/A=", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", + "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", "dev": true, "requires": { "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" } }, "minimist": { @@ -712,24 +602,11 @@ "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", "dev": true }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "sumchecker": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/sumchecker/-/sumchecker-1.3.1.tgz", - "integrity": "sha1-ebs7RFbdBPGOvbwNcDodHa7FEF0=", - "dev": true, - "requires": { - "debug": "^2.2.0", - "es6-promise": "^4.0.5" - } + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", + "dev": true } } }, @@ -752,26 +629,6 @@ "ms": "^2.1.1" } }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -803,12 +660,12 @@ } }, "electron-packager": { - "version": "13.0.1", - "resolved": "https://registry.npmjs.org/electron-packager/-/electron-packager-13.0.1.tgz", - "integrity": "sha512-fXfldaZ1wihpPaMTSGMxvCeETJwVArlnMmKafVXLJbbZwS+WTjY4iL7ju9WMQ0LNGuiiIwSMCQFxt5iA087mqg==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/electron-packager/-/electron-packager-13.1.1.tgz", + "integrity": "sha512-3Drgcw8OEOP3Psw/PprloAFJSkSUSQgjUq3AmWffJGB3Kj5WXmZl6A3GOUs8aT7bP/8GWg4oYqSiCSnA5PQkdQ==", "dev": true, "requires": { - "asar": "^0.14.0", + "asar": "^1.0.0", "debug": "^4.0.1", "electron-download": "^4.1.1", "electron-notarize": "^0.0.5", @@ -824,15 +681,9 @@ "resolve": "^1.1.6", "sanitize-filename": "^1.6.0", "semver": "^5.3.0", - "yargs-parser": "^11.0.0" + "yargs-parser": "^13.0.0" }, "dependencies": { - "camelcase": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.0.0.tgz", - "integrity": "sha512-faqwZqnWxbxn+F1d399ygeamQNy3lPp/H9H6rNrqYh4FSVCtcY+3cub1MxA8o9mDd55mM8Aghuu/kuyYA6VTsA==", - "dev": true - }, "debug": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", @@ -842,71 +693,6 @@ "ms": "^2.1.1" } }, - "electron-download": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/electron-download/-/electron-download-4.1.1.tgz", - "integrity": "sha512-FjEWG9Jb/ppK/2zToP+U5dds114fM1ZOJqMAR4aXXL5CvyPE9fiqBK/9YcwC9poIFQTEJk/EM/zyRwziziRZrg==", - "dev": true, - "requires": { - "debug": "^3.0.0", - "env-paths": "^1.0.0", - "fs-extra": "^4.0.1", - "minimist": "^1.2.0", - "nugget": "^2.0.1", - "path-exists": "^3.0.0", - "rc": "^1.2.1", - "semver": "^5.4.1", - "sumchecker": "^2.0.2" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - }, - "fs-extra": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-4.0.3.tgz", - "integrity": "sha512-q6rbdDd1o2mAnQreO7YADIxf/Whx4AHBiRf6d+/cVT8h44ss+lHgxf1FemcqDnQt9X3ct4McHr+JMGlYSsK7Cg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - } - } - }, - "fs-extra": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-7.0.1.tgz", - "integrity": "sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^4.0.0", - "universalify": "^0.1.0" - } - }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "minimist": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz", - "integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=", - "dev": true - }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -920,9 +706,9 @@ "dev": true }, "yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", + "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -931,16 +717,6 @@ } } }, - "electron-prebuilt": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/electron-prebuilt/-/electron-prebuilt-1.4.13.tgz", - "integrity": "sha1-Cg5Ne/iVokIGHM+rKTlNzaHaM9I=", - "dev": true, - "requires": { - "electron-download": "^3.0.1", - "extract-zip": "^1.0.3" - } - }, "electron-rebuild": { "version": "1.8.4", "resolved": "https://registry.npmjs.org/electron-rebuild/-/electron-rebuild-1.8.4.tgz", @@ -1048,9 +824,9 @@ } }, "extend": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.1.tgz", - "integrity": "sha1-p1Xqe8Gt/MWjHOfnYtuq3F5jZEQ=" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" }, "extract-zip": { "version": "1.6.7", @@ -1070,9 +846,9 @@ "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" }, "fast-deep-equal": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz", - "integrity": "sha1-liVqO8l1WV6zbYLpkp0GDYk0Of8=" + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" }, "fast-json-stable-stringify": { "version": "2.0.0", @@ -1144,15 +920,6 @@ "universalify": "^0.1.0" } }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -1250,15 +1017,6 @@ "universalify": "^0.1.0" } }, - "jsonfile": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", - "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, "ms": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", @@ -1420,11 +1178,11 @@ "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" }, "har-validator": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.0.3.tgz", - "integrity": "sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0=", + "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": "^5.1.0", + "ajv": "^6.5.5", "har-schema": "^2.0.0" } }, @@ -1439,28 +1197,6 @@ "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=" }, - "hawk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/hawk/-/hawk-6.0.2.tgz", - "integrity": "sha1-r02RTrBl+bXOTZ0RwcshJu7MMDg=", - "requires": { - "boom": "4.x.x", - "cryptiles": "3.x.x", - "hoek": "4.x.x", - "sntp": "2.x.x" - } - }, - "hoek": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", - "integrity": "sha1-ljRQKqEsRF3Vp8VzS1cruHOKrLs=" - }, - "home-path": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/home-path/-/home-path-1.0.6.tgz", - "integrity": "sha512-wo+yjrdAtoXt43Vy92a+0IPCYViiyLAHyp0QVS4xL/tfvVz5sXIW1ubLZk3nhVkD92fQpUMKX+fzMjr5F489vw==", - "dev": true - }, "hosted-git-info": { "version": "2.7.1", "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz", @@ -1600,10 +1336,6 @@ "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" }, - "itunes-nowplaying-mac": { - "version": "github:rinsuki/itunes-nowplaying-mac#faf0f53c39d5f895eab9afadbac762914693a1fd", - "from": "github:rinsuki/itunes-nowplaying-mac#pull/1/head" - }, "jimp": { "version": "0.2.28", "resolved": "https://registry.npmjs.org/jimp/-/jimp-0.2.28.tgz", @@ -1635,8 +1367,7 @@ "jsbn": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=", - "optional": true + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, "json-schema": { "version": "0.2.3", @@ -1644,9 +1375,9 @@ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" }, "json-schema-traverse": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz", - "integrity": "sha1-NJptRMU6Ud6JtAgFxdXlm0F9M0A=" + "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", @@ -1688,15 +1419,6 @@ "verror": "1.10.0" } }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha1-QIhDO0azsbolnXh4XY6W9zugJDk=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, "lcid": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", @@ -1886,47 +1608,6 @@ "minimist": "0.0.8" } }, - "mkpath": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/mkpath/-/mkpath-0.1.0.tgz", - "integrity": "sha1-dVSm+Nhxg0zJe1RisSLEwSTW3pE=", - "dev": true - }, - "mksnapshot": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/mksnapshot/-/mksnapshot-0.3.4.tgz", - "integrity": "sha512-FgUTiWiY+35LgL95P/MDYrBuQO5o0s3MmaWKX6ZJWoX4vMOY9vPsAv763l1OSSelL9jPsBQ/wf4bzfqTLNPSFg==", - "dev": true, - "requires": { - "decompress-zip": "0.3.0", - "fs-extra": "0.26.7", - "request": "2.x" - }, - "dependencies": { - "fs-extra": { - "version": "0.26.7", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-0.26.7.tgz", - "integrity": "sha1-muH92UiXeY7at20JGM9C0MMYT6k=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0", - "path-is-absolute": "^1.0.0", - "rimraf": "^2.2.8" - } - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - } - } - }, "modify-filename": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/modify-filename/-/modify-filename-1.1.0.tgz", @@ -2189,9 +1870,9 @@ "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" }, "oauth-sign": { - "version": "0.8.2", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.8.2.tgz", - "integrity": "sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=" + "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", @@ -2514,16 +2195,10 @@ "resolved": "https://registry.npmjs.org/pupa/-/pupa-1.0.0.tgz", "integrity": "sha1-mpVopa9+ZXuEYqbp1TKHQ1YM7/Y=" }, - "q": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", - "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", - "dev": true - }, "qs": { - "version": "6.5.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.1.tgz", - "integrity": "sha1-NJzfbu+J7EXBLX1es/wMhwNDptg=" + "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", @@ -2611,32 +2286,50 @@ } }, "request": { - "version": "2.83.0", - "resolved": "https://registry.npmjs.org/request/-/request-2.83.0.tgz", - "integrity": "sha1-ygtl2gLtYpNYh4COb1EDgQNOM1Y=", + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", "requires": { "aws-sign2": "~0.7.0", - "aws4": "^1.6.0", + "aws4": "^1.8.0", "caseless": "~0.12.0", - "combined-stream": "~1.0.5", - "extend": "~3.0.1", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", "forever-agent": "~0.6.1", - "form-data": "~2.3.1", - "har-validator": "~5.0.3", - "hawk": "~6.0.2", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", "http-signature": "~1.2.0", "is-typedarray": "~1.0.0", "isstream": "~0.1.2", "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.17", - "oauth-sign": "~0.8.2", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", "performance-now": "^2.1.0", - "qs": "~6.5.1", - "safe-buffer": "^5.1.1", - "stringstream": "~0.0.5", - "tough-cookie": "~2.3.3", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", "tunnel-agent": "^0.6.0", - "uuid": "^3.1.0" + "uuid": "^3.3.2" + }, + "dependencies": { + "mime-db": { + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" + }, + "mime-types": { + "version": "2.1.22", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", + "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", + "requires": { + "mime-db": "~1.38.0" + } + }, + "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==" + } } }, "require-directory": { @@ -2692,6 +2385,11 @@ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.1.tgz", "integrity": "sha1-iTMSr2myEj3vcfV4iQAWce6yyFM=" }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, "sanitize-filename": { "version": "1.6.1", "resolved": "https://registry.npmjs.org/sanitize-filename/-/sanitize-filename-1.6.1.tgz", @@ -2750,14 +2448,6 @@ "string-width": "^1.0.1" } }, - "sntp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/sntp/-/sntp-2.1.0.tgz", - "integrity": "sha1-LGzsFP7cIiJznK+bXD2F0cxaLMg=", - "requires": { - "hoek": "4.x.x" - } - }, "sort-keys": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-1.1.2.tgz", @@ -2824,9 +2514,9 @@ "dev": true }, "sshpk": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.13.1.tgz", - "integrity": "sha1-US322mKHFEMW3EwY/hzx2UBzm+M=", + "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", @@ -2835,6 +2525,7 @@ "ecc-jsbn": "~0.1.1", "getpass": "^0.1.1", "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", "tweetnacl": "~0.14.0" } }, @@ -2869,11 +2560,6 @@ "safe-buffer": "~5.1.0" } }, - "stringstream": { - "version": "0.0.5", - "resolved": "https://registry.npmjs.org/stringstream/-/stringstream-0.0.5.tgz", - "integrity": "sha1-TkhM1N5aC7vuGORjB3EKioFiGHg=" - }, "strip-ansi": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", @@ -2996,48 +2682,33 @@ "integrity": "sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=" }, "tmp": { - "version": "0.0.28", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.28.tgz", - "integrity": "sha1-Fyc1t/YU6nrzlmT6hM8N5OUV0SA=", + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", "dev": true, "requires": { - "os-tmpdir": "~1.0.1" + "os-tmpdir": "~1.0.2" } }, - "touch": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/touch/-/touch-0.0.3.tgz", - "integrity": "sha1-Ua7z1ElXHU8oel2Hyci0kYGg2x0=", + "tmp-promise": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/tmp-promise/-/tmp-promise-1.0.5.tgz", + "integrity": "sha512-hOabTz9Tp49wCozFwuJe5ISrOqkECm6kzw66XTP23DuzNU7QS/KiZq5LC9Y7QSy8f1rPSLy4bKaViP0OwGI1cA==", "dev": true, "requires": { - "nopt": "~1.0.10" - }, - "dependencies": { - "nopt": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-1.0.10.tgz", - "integrity": "sha1-bd0hvSoxQXuScn3Vhfim83YI6+4=", - "dev": true, - "requires": { - "abbrev": "1" - } - } + "bluebird": "^3.5.0", + "tmp": "0.0.33" } }, "tough-cookie": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.3.3.tgz", - "integrity": "sha1-C2GKVWW23qkL80JdBNVe3EdadWE=", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", "requires": { + "psl": "^1.1.24", "punycode": "^1.4.1" } }, - "traverse": { - "version": "0.3.9", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", - "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=", - "dev": true - }, "trim": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/trim/-/trim-0.0.1.tgz", @@ -3075,8 +2746,7 @@ "tweetnacl": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=", - "optional": true + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" }, "typedarray": { "version": "0.0.6", @@ -3134,9 +2804,9 @@ "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" }, "uuid": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.2.1.tgz", - "integrity": "sha1-EsUou51Y0LkmXZovbw/ovhf/HxQ=" + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, "validate-npm-package-license": { "version": "3.0.4", diff --git a/app/package.json b/app/package.json index 76f062fc..3756ab1d 100644 --- a/app/package.json +++ b/app/package.json @@ -97,8 +97,7 @@ }, "devDependencies": { "electron": "^4.0.6", - "electron-packager": "^13.0.1", - "electron-prebuilt": "^1.4.13", + "electron-packager": "^13.1.1", "electron-rebuild": "^1.8.4" } } diff --git a/app/view/make/index.sample.html b/app/view/make/index.sample.html index c9503230..edf0641a 100644 --- a/app/view/make/index.sample.html +++ b/app/view/make/index.sample.html @@ -360,7 +360,6 @@ var tlid=0;