Socket
Socket
Sign inDemoInstall

@neutralinojs/neu

Package Overview
Dependencies
Maintainers
1
Versions
94
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@neutralinojs/neu - npm Package Compare versions

Comparing version 7.1.0 to 8.0.0

src/modules/websocket.js

9

CHANGELOG.md

@@ -9,2 +9,11 @@ # Changelog

### Core: Bunlder
- Copy extensions to the app bundle.
- Rename `res.neu` to `resources.neu`.
### Core: Runner
- Use websocket connection to auto reload app.
## v7.1.0
### Core: Downloader

@@ -11,0 +20,0 @@ - Use server/client versions from config

8

package.json
{
"name": "@neutralinojs/neu",
"version": "7.1.0",
"version": "8.0.0",
"description": "neu cli for Neutralinojs",

@@ -34,9 +34,9 @@ "main": "./bin/neu.js",

"configstore": "^5.0.1",
"cors": "^2.8.5",
"edit-json-file": "^1.6.2",
"express": "^4.17.1",
"figlet": "^1.5.0",
"follow-redirects": "^1.13.1",
"fs-extra": "^9.0.1",
"unzipper": "^0.10.11"
"unzipper": "^0.10.11",
"uuid": "^8.3.2",
"websocket": "^1.0.34"
},

@@ -43,0 +43,0 @@ "bin": {

const chalk = require('chalk');
const logwatcher = require('../modules/logwatcher');
const filewatcher = require('../modules/filewatcher');
const websocket = require('../modules/websocket');
const runner = require('../modules/runner');

@@ -16,6 +17,6 @@ const commons = require('../commons');

let argsOpt = "";
if(!command.disableAutoReload)
argsOpt += "--debug-mode";
argsOpt += "--neu-dev-auto-reload";
if(command.mode)

@@ -28,2 +29,3 @@ argsOpt += ` --mode=${command.mode}`;

logwatcher.start();
websocket.start();
try {

@@ -37,4 +39,5 @@ await runner.runApp({argsOpt, arch: command.arch});

logwatcher.stop();
websocket.stop();
});
}

@@ -20,8 +20,7 @@ module.exports = {

clientLibrary: "neutralino.js",
resourceFile: "res.neu",
resourceFile: "resources.neu",
authFile: ".tmp/auth_info.json",
binaries: {
linux: {
x64: 'neutralino-linux_x64',
ia32: 'neutralino-linux_ia32',
arm: 'neutralino-linux_armhf'
},

@@ -38,6 +37,3 @@ darwin: {

}
},
settings: {
devServerPort: 5050
}
};

@@ -12,10 +12,18 @@ const fse = require('fs-extra');

const resourcesDir = configObj.cli.resourcesPath.replace(/^\//, "");
const extensionsDir = configObj.cli.extensionsPath.replace(/^\//, "");
const clientLibrary = configObj.cli.clientLibrary.replace(/^\//, "");
const icon = configObj.modes.window.icon.replace(/^\//, "");
let binaryName = configObj.cli.binaryName;
const binaryName = configObj.cli.binaryName;
fs.mkdirSync(`temp`, { recursive: true });
await fse.copy(`./${resourcesDir}`, `temp/${resourcesDir}`, {overwrite: true});
if(fs.existsSync(extensionsDir)) {
await fse.copy(`./${extensionsDir}`, `dist/${binaryName}/${extensionsDir}`, {overwrite: true});
}
await fse.copy(`${constants.files.configFile}`, `temp/${constants.files.configFile}`, {overwrite: true});
await fse.copy(`./${clientLibrary}`, `temp/${clientLibrary}`, {overwrite: true});
await fse.copy(`./${icon}`, `temp/${icon}`, {overwrite: true});
await asar.createPackage('temp', `dist/${binaryName}/${constants.files.resourceFile}`);

@@ -42,3 +50,3 @@ }

}
fse.copySync(`bin/${constants.files.dependencies.windows_webview2loader_x64}`,

@@ -45,0 +53,0 @@ `dist/${binaryName}/${constants.files.dependencies.windows_webview2loader_x64}`);

const fs = require('fs');
const chokidar = require('chokidar');
const devServer = require('./devserver');
const websocket = require('./websocket');
const bundler = require('../modules/bundler');

@@ -11,3 +11,2 @@ const APP_PATH = '.';

startFileWatcher();
devServer.start();
}

@@ -18,3 +17,2 @@

fileWatcher.close();
devServer.stop();
}

@@ -33,6 +31,5 @@

return;
devServer.setData({
needsReload: true
websocket.dispatch('neuDev_reloadApp');
});
});
}

@@ -35,3 +35,3 @@ const { exec } = require('child_process');

let binaryPath = `bin${path.sep}${binaryName}`;
let args = " --load-dir-res --path=.";
let args = " --load-dir-res --path=. --export-auth-info";
if(options.argsOpt)

@@ -42,3 +42,3 @@ args += " " + options.argsOpt;

fs.chmodSync(binaryPath, EXEC_PERMISSION);
console.log(`Starting process: ${binaryName} ${args}`);

@@ -45,0 +45,0 @@ exec(binaryPath + args, (err, stdout, stderr) => {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc