remove deprecated request package

This commit is contained in:
Stewart Allen 2020-03-03 08:22:04 -05:00
commit 15e63d49f5
5 changed files with 10 additions and 10 deletions

View file

@ -8,8 +8,9 @@ let loc = self.location,
host = loc.hostname, host = loc.hostname,
port = loc.port, port = loc.port,
proto = loc.protocol, proto = loc.protocol,
pre = host.indexOf(".space") > 0 || host === "localhost" ? pre = '',
proto + "//" + host + ":" + port : "", // pre = host.indexOf(".space") > 0 || host === "localhost" ?
// proto + "//" + host + ":" + port : "",
time = function() { return new Date().getTime() }, time = function() { return new Date().getTime() },
KIRI = self.kiri, KIRI = self.kiri,
BASE = self.base, BASE = self.base,
@ -22,7 +23,8 @@ let loc = self.location,
// console.log({body:body}); // console.log({body:body});
// let blob = new Blob([body], {type : 'application/json'}); // let blob = new Blob([body], {type : 'application/json'});
// worker = new Worker(URL.createObjectURL(blob)); // 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) { function send(fn, data, onreply, async, zerocopy) {
let seq = seqid++; let seq = seqid++;

View file

@ -8,9 +8,9 @@ let loc = self.location,
ver = exports.VERSION, ver = exports.VERSION,
time = function() { return new Date().getTime() }; time = function() { return new Date().getTime() };
host = loc.hostname, 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 // 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" // unified ball via /code/work.js -- otherwise, map "localhost" to "debug"
@ -43,10 +43,10 @@ if (debug) {
"kiri-print", "kiri-print",
"kiri-codec" "kiri-codec"
].forEach(function(scr) { ].forEach(function(scr) {
importScripts(["/js/",scr,".js","/v"+ver].join('')); importScripts(`/js/${scr}.js/${ver}`);
}) })
} catch (e) { } 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 { } else {
importScripts("/code/work.js/"+ver); importScripts("/code/work.js/"+ver);

View file

@ -1,7 +1,7 @@
var exports = { var exports = {
COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen <sa@grid.space> - All Rights Reserved", COPYRIGHT:"Copyright (C) 2014-2019 Stewart Allen <sa@grid.space> - All Rights Reserved",
LICENSE:"See the license.md file included with the source distribution", LICENSE:"See the license.md file included with the source distribution",
VERSION:"1.6.5" VERSION:"1.6.6"
}; };
if (!module) var module = {}; if (!module) var module = {};
module.exports = exports; module.exports = exports;

View file

@ -738,7 +738,6 @@ let ver = require('../js/license.js'),
moment = require('moment'), moment = require('moment'),
uglify = require('uglify-es'), uglify = require('uglify-es'),
connect = require('connect'), connect = require('connect'),
request = require('request'),
serveStatic = require('serve-static'), serveStatic = require('serve-static'),
compression = require('compression')(), compression = require('compression')(),
querystring = require('querystring'), querystring = require('querystring'),

View file

@ -36,7 +36,6 @@
"moment": "^2.24.0", "moment": "^2.24.0",
"n3d-threejs": "^72.0.0", "n3d-threejs": "^72.0.0",
"pixi.js": "^4.8.7", "pixi.js": "^4.8.7",
"request": "^2.88.0",
"serve-static": "^1.13.2", "serve-static": "^1.13.2",
"three": "^0.96.0", "three": "^0.96.0",
"tween.js": "^0.14.0", "tween.js": "^0.14.0",