cloudcmd 17.2.0 → 17.3.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.
Files changed (78) hide show
  1. package/ChangeLog +16 -0
  2. package/HELP.md +7 -5
  3. package/README.md +1 -1
  4. package/bin/cloudcmd.mjs +11 -4
  5. package/dist/cloudcmd.common.js +3 -3
  6. package/dist/cloudcmd.common.js.map +1 -1
  7. package/dist/cloudcmd.css +1 -1
  8. package/dist/cloudcmd.js +1 -1
  9. package/dist/cloudcmd.js.map +1 -1
  10. package/dist/config.css +1 -1
  11. package/dist/index.html +1 -1
  12. package/dist/modules/cloud.js +1 -1
  13. package/dist/modules/cloud.js.map +1 -1
  14. package/dist/modules/command-line.js +1 -1
  15. package/dist/modules/command-line.js.map +1 -1
  16. package/dist/modules/config.js +1 -1
  17. package/dist/modules/config.js.map +1 -1
  18. package/dist/modules/contact.js +1 -1
  19. package/dist/modules/contact.js.map +1 -1
  20. package/dist/modules/edit-file-vim.js +1 -1
  21. package/dist/modules/edit-file-vim.js.map +1 -1
  22. package/dist/modules/edit-file.js +1 -1
  23. package/dist/modules/edit-file.js.map +1 -1
  24. package/dist/modules/edit-names-vim.js +1 -1
  25. package/dist/modules/edit-names-vim.js.map +1 -1
  26. package/dist/modules/edit-names.js +1 -1
  27. package/dist/modules/edit-names.js.map +1 -1
  28. package/dist/modules/edit.js +1 -1
  29. package/dist/modules/edit.js.map +1 -1
  30. package/dist/modules/help.js +1 -1
  31. package/dist/modules/help.js.map +1 -1
  32. package/dist/modules/konsole.js +1 -1
  33. package/dist/modules/konsole.js.map +1 -1
  34. package/dist/modules/markdown.js +1 -1
  35. package/dist/modules/markdown.js.map +1 -1
  36. package/dist/modules/menu.js +1 -1
  37. package/dist/modules/menu.js.map +1 -1
  38. package/dist/modules/operation.js +1 -1
  39. package/dist/modules/operation.js.map +1 -1
  40. package/dist/modules/polyfill.js +1 -1
  41. package/dist/modules/polyfill.js.map +1 -1
  42. package/dist/modules/terminal-run.js +1 -1
  43. package/dist/modules/terminal-run.js.map +1 -1
  44. package/dist/modules/terminal.js +1 -1
  45. package/dist/modules/terminal.js.map +1 -1
  46. package/dist/modules/upload.js +1 -1
  47. package/dist/modules/upload.js.map +1 -1
  48. package/dist/modules/user-menu.js +1 -1
  49. package/dist/modules/user-menu.js.map +1 -1
  50. package/dist/modules/view.js +1 -1
  51. package/dist/modules/view.js.map +1 -1
  52. package/dist/sw.js +4 -2
  53. package/dist/themes/dark.css +1 -0
  54. package/dist/themes/light.css +1 -0
  55. package/dist/user-menu.css +1 -1
  56. package/dist-dev/cloudcmd.css +28 -23
  57. package/dist-dev/cloudcmd.js +36 -2
  58. package/dist-dev/config.css +2 -1
  59. package/dist-dev/index.html +3 -0
  60. package/dist-dev/modules/config.js +1 -1
  61. package/dist-dev/sw.js +4 -2
  62. package/dist-dev/themes/dark.css +49 -0
  63. package/dist-dev/themes/light.css +9 -0
  64. package/dist-dev/user-menu.css +1 -1
  65. package/json/config.json +1 -0
  66. package/json/help.json +1 -0
  67. package/man/cloudcmd.1 +1 -0
  68. package/package.json +1 -1
  69. package/server/cloudcmd.mjs +3 -3
  70. package/server/{columns.js → columns.mjs} +13 -12
  71. package/server/columns.spec.mjs +40 -0
  72. package/server/{route.js → route.mjs} +24 -23
  73. package/server/route.spec.mjs +2 -2
  74. package/server/theme.mjs +33 -0
  75. package/server/themes.spec.mjs +31 -0
  76. package/server/{validate.js → validate.mjs} +24 -10
  77. package/server/validate.spec.mjs +30 -1
  78. package/tmpl/config.hbs +7 -1
package/ChangeLog CHANGED
@@ -1,3 +1,19 @@
1
+ 2024.03.29, v17.3.0
2
+
3
+ feature:
4
+ - 6bc4f3ec dark theme: add (#332)
5
+ - 35622082 route: convert to ESM
6
+
7
+ 2024.03.29, v17.2.1
8
+
9
+ fix:
10
+ - cc134464 client: vim: space
11
+
12
+ feature:
13
+ - e3f89e88 dark mode: add
14
+ - c45b23fe css: vars: add
15
+ - b1f74c00 css: add vars
16
+
1
17
  2024.03.22, v17.2.0
2
18
 
3
19
  feature:
package/HELP.md CHANGED
@@ -1,4 +1,4 @@
1
- # Cloud Commander v17.2.0
1
+ # Cloud Commander v17.3.0
2
2
 
3
3
  ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL]
4
4
 
@@ -93,7 +93,7 @@ Cloud Commander supports the following command-line parameters:
93
93
  | `--terminal-command` | set command to run in terminal (shell by default)
94
94
  | `--terminal-auto-restart` | restart command on exit
95
95
  | `--vim` | enable vim hot keys
96
- | `--columns` | set visible columns
96
+ | `--themes` | set visible themes
97
97
  | `--export` | enable export of config through a server
98
98
  | `--export-token` | authorization token used by export server
99
99
  | `--import` | enable import of config
@@ -122,7 +122,7 @@ Cloud Commander supports the following command-line parameters:
122
122
  | `--no-terminal-command` | set default shell to run in terminal
123
123
  | `--no-terminal-auto-restart` | do not restart command on exit
124
124
  | `--no-vim` | disable vim hot keys
125
- | `--no-columns` | set default visible columns
125
+ | `--no-themes` | set default visible themes
126
126
  | `--no-export` | disable export config through a server
127
127
  | `--no-import` | disable import of config
128
128
  | `--no-import-listen` | disable listen on config updates from import server
@@ -408,7 +408,7 @@ Here's a description of all options:
408
408
  "terminalCommand": "", // set command to run in terminal
409
409
  "terminalAutoRestart": true, // restart command on exit
410
410
  "vim": false, // disable vim hot keys
411
- "columns": "name-size-date-owner-mode", // set visible columns
411
+ "themes": "name-size-date-owner-mode", // set visible themes
412
412
  "export": false, // enable export of config through a server
413
413
  "exportToken": "root", // token used by export server
414
414
  "import": false, // enable import of config
@@ -428,7 +428,7 @@ Some config options can be overridden with environment variables, such as:
428
428
  - `CLOUDCMD_NAME` - set tab name in web browser
429
429
  - `CLOUDCMD_OPEN` - open web browser when server started
430
430
  - `CLOUDCMD_EDITOR` - set editor
431
- - `CLOUDCMD_COLUMNS` - set visible columns
431
+ - `CLOUDCMD_COLUMNS` - set visible themes
432
432
  - `CLOUDCMD_CONTACT` - enable contact
433
433
  - `CLOUDCMD_CONFIG_DIALOG` - enable config dialog
434
434
  - `CLOUDCMD_CONFIG_AUTH` - enable auth change in config dialog
@@ -1093,6 +1093,8 @@ There are a lot of ways to be involved in `Cloud Commander` development:
1093
1093
 
1094
1094
  ## Version history
1095
1095
 
1096
+ - *2024.03.29*, **[v17.3.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.0)**
1097
+ - *2024.03.29*, **[v17.2.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.2.1)**
1096
1098
  - *2024.03.22*, **[v17.2.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.2.0)**
1097
1099
  - *2024.03.21*, **[v17.1.6](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.6)**
1098
1100
  - *2024.03.20*, **[v17.1.5](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.5)**
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Cloud Commander v17.2.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL]
1
+ # Cloud Commander v17.3.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL]
2
2
 
3
3
  ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL]
4
4
 
package/bin/cloudcmd.mjs CHANGED
@@ -1,15 +1,16 @@
1
1
  #!/usr/bin/env node
2
2
 
3
+ import process from 'node:process';
3
4
  import {createRequire} from 'node:module';
4
5
  import {promisify} from 'node:util';
5
6
  import tryToCatch from 'try-to-catch';
6
7
  import {createSimport} from 'simport';
7
8
  import parse from 'yargs-parser';
8
- import process from 'node:process';
9
9
  import exit from '../server/exit.js';
10
10
  import {createConfig, configPath} from '../server/config.js';
11
11
  import env from '../server/env.js';
12
12
  import prefixer from '../server/prefixer.js';
13
+ import * as validate from '../server/validate.mjs';
13
14
 
14
15
  process.on('unhandledRejection', exit);
15
16
 
@@ -61,6 +62,7 @@ const yargsOptions = {
61
62
  'terminal-path',
62
63
  'terminal-command',
63
64
  'columns',
65
+ 'theme',
64
66
  'import-url',
65
67
  'import-token',
66
68
  'export-token',
@@ -112,6 +114,7 @@ const yargsOptions = {
112
114
  'contact': choose(env.bool('contact'), config('contact')),
113
115
  'terminal': choose(env.bool('terminal'), config('terminal')),
114
116
  'columns': env('columns') || config('columns') || '',
117
+ 'theme': env('theme') || config('theme') || '',
115
118
  'vim': choose(env.bool('vim'), config('vim')),
116
119
  'log': config('log'),
117
120
 
@@ -174,6 +177,9 @@ async function main() {
174
177
  if (args.repl)
175
178
  repl();
176
179
 
180
+ validate.columns(args.columns);
181
+ validate.theme(args.theme);
182
+
177
183
  port(args.port);
178
184
 
179
185
  config('name', args.name);
@@ -194,6 +200,7 @@ async function main() {
194
200
  config('prefixSocket', prefixer(args.prefixSocket));
195
201
  config('root', args.root || '/');
196
202
  config('vim', args.vim);
203
+ config('theme', args.theme);
197
204
  config('columns', args.columns);
198
205
  config('log', args.log);
199
206
  config('confirmCopy', args.confirmCopy);
@@ -221,6 +228,7 @@ async function main() {
221
228
  prefix: config('prefix'),
222
229
  prefixSocket: config('prefixSocket'),
223
230
  columns: config('columns'),
231
+ theme: config('theme'),
224
232
  };
225
233
 
226
234
  const password = env('password') || args.password;
@@ -228,7 +236,7 @@ async function main() {
228
236
  if (password)
229
237
  config('password', await getPassword(password));
230
238
 
231
- await validateRoot(options.root, config);
239
+ validateRoot(options.root, config);
232
240
 
233
241
  if (args.showConfig)
234
242
  await showConfig();
@@ -245,8 +253,7 @@ async function main() {
245
253
  await importConfig(config);
246
254
  }
247
255
 
248
- async function validateRoot(root, config) {
249
- const validate = await simport(`${DIR_SERVER}validate.js`);
256
+ function validateRoot(root, config) {
250
257
  validate.root(root, config);
251
258
 
252
259
  if (root === '/')