diff --git a/libraries/utilities.js b/libraries/utilities.js index 9af325569..fcc1fc1aa 100644 --- a/libraries/utilities.js +++ b/libraries/utilities.js @@ -641,7 +641,7 @@ exports.actionSender = function (action, timeToLive, beatport) { var HOST = '255.255.255.255'; var message; - message = new Buffer(JSON.stringify({action: action})); + message = Buffer.from(JSON.stringify({action: action})); // creating the datagram var client = dgram.createSocket('udp4'); diff --git a/package.json b/package.json index 7bc537618..6e038270a 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,23 @@ { "name": "vuforia-spatial-edge-server", - "version": "0.3.1", + "version": "0.3.2", "description": "Vuforia Spatial Edge Server", "main": "index.js", "dependencies": { + "animitter": "^3.0.0", "archiver": "^3.1.1", + "babel-preset-es2015": "^6.14.0", + "babelify": "^7.3.0", "body-parser": "^1.19.0", + "browserify": "^16.5.0", "cheerio": "^0.22.0", + "concurrently": "^3.1.0", "cors": "^2.8.5", + "dat.gui": "^0.7.2", "decompress-zip": "^0.3.2", "directory-tree": "^2.2.4", + "eases": "^1.0.8", + "eventemitter3": "^4.0.0", "express": "^4.17.1", "express-handlebars": "^4.0.4", "formidable": "^1.2.2", @@ -26,9 +34,15 @@ "simple-git": "^2.5.0", "socket.io": "~2.2.0", "socket.io-client": "~2.3.0", - "wedoboostpoweredup": "^2.1.2", + "three": "^0.89.0", + "three-fbx-loader": "^1.0.3", + "three-orbit-controls": "^82.1.0", + "three.meshline": "^1.2.0", + "watchify": "^3.11.1", + "wedoboostpoweredup": "^2.1.4", "winston": "^3.2.1", - "xml2js": "^0.4.23" + "xml2js": "^0.4.23", + "serialport": "^9.0.0" }, "repository": { "type": "git", @@ -44,15 +58,15 @@ "minami": "^1.2.3" }, "build": { - "appId": "com.vuforia.spatialtoolbox", - "productName": "Vuforia Spatial Edge Server", + "appId": "com.ptc.spatial.edgeServer", + "productName": "Edge Server", "copyright": "MPL 2.0 © 2020 PTC Reality Lab", + "files": "!electron-builder.env", "afterSign": "scripts/notarize.js", "dmg": { "sign": false }, "mac": { - "category": "public.app-category.developer-tools", "hardenedRuntime": true, "gatekeeperAssess": false, "entitlements": "build/entitlements.mac.plist", @@ -69,8 +83,8 @@ "lint": "eslint .", "generate-docs": "jsdoc -c .jsdoc.conf -r .", "start": "electron index.js", - "package-mac": "electron-packager . --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds", - "package-win": "electron-packager . electron-tutorial-app --overwrite --asar=true --platform=win32 --arch=ia32 --icon=assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"Vuforia Spatial Edge Server\"", + "package-mac": "electron-packager . --asar.unpack=*.node --overwrite --platform=darwin --arch=x64 --icon=assets/icons/mac/icon.icns --prune=true --out=release-builds", + "package-win": "electron-packager . electron-tutorial-app --overwrite --asar=true --platform=win32 --arch=ia32 --icon=assets/icons/win/icon.ico --prune=true --out=release-builds --version-string.CompanyName=CE --version-string.FileDescription=CE --version-string.ProductName=\"Edge Server\"", "package-linux": "electron-packager . electron-tutorial-app --overwrite --asar=true --platform=linux --arch=x64 --icon=assets/icons/png/icon.png --prune=true --out=release-builds", "pack": "electron-builder --dir", "dist": "electron-builder", diff --git a/server.js b/server.js index 83bfe6dcc..968456c5c 100644 --- a/server.js +++ b/server.js @@ -169,7 +169,7 @@ const objectInterfaceFolder = '/'; ******************************************** Requirements ************************************************************ **********************************************************************************************************************/ const storage = require('./libraries/storage'); -let dir = path.join(require('os').homedir(), 'vst-edge-server'); +let dir = path.join(require('os').homedir(), 'Documents/vst-edge-server'); //fs.mkdirSync('/Users/Anna/my-test-dir'); console.log('**** DIR: ', dir); @@ -1079,7 +1079,7 @@ function objectBeatSender(PORT, thisId, thisIp, oneTimeOnly) { services.ip = services.getIP(); - const message = new Buffer(JSON.stringify({ + const message = Buffer.from(JSON.stringify({ id: thisId, ip: services.ip, port: serverPort, @@ -1115,7 +1115,7 @@ function objectBeatSender(PORT, thisId, thisIp, oneTimeOnly) { services.ip = services.getIP(); - var message = new Buffer(JSON.stringify({ + var message = Buffer.from(JSON.stringify({ id: thisId, ip: services.ip, port: serverPort,