diff --git a/js/kiri-work.js b/js/kiri-work.js index c5a6adf2..ee6fb534 100644 --- a/js/kiri-work.js +++ b/js/kiri-work.js @@ -8,8 +8,9 @@ let loc = self.location, host = loc.hostname, port = loc.port, proto = loc.protocol, - pre = host.indexOf(".space") > 0 || host === "localhost" ? - proto + "//" + host + ":" + port : "", + pre = '', + // pre = host.indexOf(".space") > 0 || host === "localhost" ? + // proto + "//" + host + ":" + port : "", time = function() { return new Date().getTime() }, KIRI = self.kiri, BASE = self.base, @@ -22,7 +23,8 @@ let loc = self.location, // console.log({body:body}); // let blob = new Blob([body], {type : 'application/json'}); // worker = new Worker(URL.createObjectURL(blob)); -// }).request(pre + "/code/worker.js/"); +// console.log({worker}) +// }).request(pre + "/code/worker.js/123"); function send(fn, data, onreply, async, zerocopy) { let seq = seqid++; diff --git a/js/kiri-worker.js b/js/kiri-worker.js index 29464751..091c632e 100644 --- a/js/kiri-worker.js +++ b/js/kiri-worker.js @@ -8,9 +8,9 @@ let loc = self.location, ver = exports.VERSION, time = function() { return new Date().getTime() }; host = loc.hostname, - debug = (host !== 'grid.space' && host !== 'debug'); + debug = host === 'debug'; -console.log("kiri | init work | " + ver); +console.log(`kiri | init work | ${ver}${debug ? ' | debug' : ''}`); // when running the server in 'web' mode, the obfuscated code is served as a // unified ball via /code/work.js -- otherwise, map "localhost" to "debug" @@ -43,10 +43,10 @@ if (debug) { "kiri-print", "kiri-codec" ].forEach(function(scr) { - importScripts(["/js/",scr,".js","/v"+ver].join('')); + importScripts(`/js/${scr}.js/${ver}`); }) } catch (e) { - console.log("unable to load worker scripts. kiri is likely in debug mode."); + console.log("unable to load worker scripts. server is in production mode."); } } else { importScripts("/code/work.js/"+ver); diff --git a/js/license.js b/js/license.js index 99f77928..3826f816 100644 --- a/js/license.js +++ b/js/license.js @@ -1,7 +1,7 @@ var exports = { COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen - All Rights Reserved", LICENSE:"See the license.md file included with the source distribution", - VERSION:"1.6.5" + VERSION:"1.6.6" }; if (!module) var module = {}; module.exports = exports; diff --git a/js/web-server.js b/js/web-server.js index b5147b5a..eb27d6db 100644 --- a/js/web-server.js +++ b/js/web-server.js @@ -738,7 +738,6 @@ let ver = require('../js/license.js'), moment = require('moment'), uglify = require('uglify-es'), connect = require('connect'), - request = require('request'), serveStatic = require('serve-static'), compression = require('compression')(), querystring = require('querystring'), diff --git a/package.json b/package.json index 0468c987..02bed032 100644 --- a/package.json +++ b/package.json @@ -36,7 +36,6 @@ "moment": "^2.24.0", "n3d-threejs": "^72.0.0", "pixi.js": "^4.8.7", - "request": "^2.88.0", "serve-static": "^1.13.2", "three": "^0.96.0", "tween.js": "^0.14.0",