gritty 6.1.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,8 +1,10 @@
1
1
  {
2
2
  "name": "gritty",
3
- "version": "6.1.0",
3
+ "version": "7.0.0",
4
+ "type": "commonjs",
4
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
5
6
  "description": "Web terminal emulator",
7
+ "commitType": "colon",
6
8
  "bin": {
7
9
  "gritty": "bin/gritty.js"
8
10
  },
@@ -50,43 +52,42 @@
50
52
  "squad": "^3.0.0",
51
53
  "string-to-argv": "^1.0.0",
52
54
  "wraptile": "^3.0.0",
53
- "yargs-parser": "^20.0.0"
55
+ "yargs-parser": "^21.0.1"
54
56
  },
55
57
  "devDependencies": {
56
58
  "@babel/core": "^7.0.0",
57
59
  "@babel/preset-env": "^7.0.0",
58
- "@cloudcmd/stub": "^3.0.0",
59
- "@iocmd/wait": "^1.0.0",
60
+ "@iocmd/wait": "^2.1.0",
60
61
  "babel-loader": "^8.0.0",
61
62
  "c8": "^7.6.0",
62
63
  "clean-css-loader": "^4.1.1",
63
64
  "coveralls": "^3.0.0",
64
65
  "css-loader": "^6.2.0",
65
- "css-minimizer-webpack-plugin": "^3.0.2",
66
+ "css-minimizer-webpack-plugin": "^4.0.0",
66
67
  "css-modules-require-hook": "^4.0.6",
67
68
  "es6-promisify": "^7.0.0",
68
69
  "eslint": "^8.0.0-beta.0",
69
70
  "eslint-plugin-node": "^11.0.0",
70
- "eslint-plugin-putout": "^11.0.0",
71
+ "eslint-plugin-putout": "^16.0.0",
71
72
  "json-loader": "^0.5.4",
72
- "madrun": "^8.6.0",
73
+ "madrun": "^9.0.6",
73
74
  "mock-require": "^3.0.2",
74
75
  "nodemon": "^2.0.1",
75
76
  "optimize-css-assets-webpack-plugin": "^6.0.1",
76
- "putout": "^21.1.0",
77
+ "putout": "^27.0.1",
77
78
  "request": "^2.81.0",
78
79
  "serve-once": "^2.0.0",
79
80
  "socket.io-client": "^4.0.0",
80
81
  "style-loader": "^3.2.1",
81
- "supertape": "^6.10.0",
82
+ "supertape": "^7.6.0",
82
83
  "webpack": "^5.1.3",
83
84
  "webpack-cli": "^4.0.0",
84
85
  "xterm": "^4.14.1",
85
86
  "xterm-addon-fit": "^0.5.0",
86
- "xterm-addon-webgl": "^0.11.1"
87
+ "xterm-addon-webgl": "^0.12.0"
87
88
  },
88
89
  "engines": {
89
- "node": ">=12"
90
+ "node": ">=16"
90
91
  },
91
92
  "license": "MIT",
92
93
  "publishConfig": {
package/server/gritty.js CHANGED
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- const DIR_ROOT = __dirname + '/..';
3
+ const isBool = (a) => typeof a === 'boolean';
4
4
 
5
5
  const path = require('path');
6
6
  const log = require('debug')('gritty');
@@ -11,6 +11,8 @@ const wraptile = require('wraptile');
11
11
  const pty = require('node-pty');
12
12
  const stringArgv = require('string-to-argv');
13
13
 
14
+ const DIR_ROOT = __dirname + '/..';
15
+
14
16
  const terminalFn = currify(_terminalFn);
15
17
  const connectionWraped = wraptile(connection);
16
18
 
@@ -25,10 +27,10 @@ const getDist = () => {
25
27
  };
26
28
 
27
29
  const choose = (a, b, options) => {
28
- if (typeof a === 'boolean')
30
+ if (isBool(a))
29
31
  return a;
30
32
 
31
- if (typeof b === 'boolean')
33
+ if (isBool(b))
32
34
  return b;
33
35
 
34
36
  return options.default;