Dependency bump (serve 12->13). Add dependency checks to local build pipeline, do not run on ci builds.

This commit is contained in:
Hexagon 2021-11-07 13:52:45 +01:00
parent 28a8cf8b31
commit 6e8816c467
6 changed files with 3556 additions and 3768 deletions

View File

@ -27,4 +27,4 @@ jobs:
node-version: ${{ matrix.node-version }} node-version: ${{ matrix.node-version }}
cache: 'npm' cache: 'npm'
- run: npm ci - run: npm ci
- run: npm run build - run: npm run build:ci

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -128,20 +128,6 @@ export default function(mediator,settings,templates, sounds) {
components.input[0].removeAttribute('disabled'); components.input[0].removeAttribute('disabled');
components.inputWrapper[0].className = ''; components.inputWrapper[0].className = '';
components.input.focus(); components.input.focus();
},
_require: function (filepath, done) {
commands.lockInput();
commands.post('info', 'Requiring ' + filepath + '...');
require([filepath], function () {
commands.post('info', 'Successfully required ' + filepath + '.');
commands.unlockInput();
done();
}, function (e) {
commands.post('error', 'An error occurred while trying to load "' + filepath + '":\n' + e);
commands.unlockInput();
done();
});
} }
}, },
@ -217,13 +203,11 @@ export default function(mediator,settings,templates, sounds) {
// Connect events // Connect events
for (var commandName in commands) { for (var commandName in commands) {
if (commandName !== '_require' && commandName !== 'post') { if (commandName !== 'post') {
mediator.on('console:' + commandName, commands[commandName]); mediator.on('console:' + commandName, commands[commandName]);
} }
} }
mediator.on('console:require', commands._require);
mediator.on('console:post', function (data) { mediator.on('console:post', function (data) {
commands.post(data.type, data.data, data.nick); commands.post(data.type, data.data, data.nick);
}); });

7293
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,13 +1,14 @@
{ {
"name": "cryptalk", "name": "cryptalk",
"version": "1.2.3", "version": "1.2.4",
"description": "Encrypted HTML5/Node.JS instant chat", "description": "Encrypted HTML5/Node.JS instant chat",
"main": "server/server.js", "main": "server/server.js",
"preferGlobal": true, "preferGlobal": true,
"private": false, "private": false,
"scripts": { "scripts": {
"test": "echo \"No tests written yet\" && exit 0", "test": "echo \"No tests written yet\" && exit 0",
"build": "npm run test:lint && npx rollup -c rollup.config.js && npm run build:minify && npm run build:cleanup", "build": "npm update && npm outdated && npm run test:lint && npx rollup -c rollup.config.js && npm run build:minify && npm run build:cleanup",
"build:ci": "npm run test:lint && npx rollup -c rollup.config.js && npm run build:minify && npm run build:cleanup",
"build:minify": "uglifyjs client/public/js/cryptalk.js --source-map -o client/public/js/cryptalk.min.js", "build:minify": "uglifyjs client/public/js/cryptalk.js --source-map -o client/public/js/cryptalk.min.js",
"build:cleanup": "(rm client/public/js/cryptalk.js || del client\\public\\js\\cryptalk.js)", "build:cleanup": "(rm client/public/js/cryptalk.js || del client\\public\\js\\cryptalk.js)",
"test:lint": "eslint ./client/source/**/*.js ./server/*.js", "test:lint": "eslint ./client/source/**/*.js ./server/*.js",
@ -38,7 +39,7 @@
}, },
"bin": "./server/server.js", "bin": "./server/server.js",
"dependencies": { "dependencies": {
"serve": "^12.0.1", "serve": "^13.0.2",
"socket.io": "^4.3.1" "socket.io": "^4.3.1"
}, },
"os": [ "os": [