diff --git a/HELP.md b/HELP.md index ceba0205..07bd72d4 100644 --- a/HELP.md +++ b/HELP.md @@ -9,6 +9,7 @@ [DWORD]: https://github.com/cloudcmd/dword "Editor based on CodeMirror" [EDWARD]: https://github.com/cloudcmd/edward "Editor based on Ace" [DEEPWORD]: https://github.com/cloudcmd/deepword "Editor based on Monaco" +[QWORD]: https://github.com/cloudcmd/qword "Editor based on CodeMirror 6" [EDWARD_KEYS]: https://github.com/cloudcmd/edward/#hot-keys "Edward Hot keys" [TERMUX]: https://termux.com "Termux" [INLY]: https://github.com/coderaiser/node-inly "Extract archive" @@ -26,7 +27,7 @@ - Server works on **Windows**, **Linux**, **Mac OS** and **Android** (with help of [Termux][TERMUX]). - Can be used local or remotely. - Adapts to screen size. -- **3 built-in editors** with support of **syntax highlighting**: [Dword][DWORD], [Edward][EDWARD] and [Deepword][DEEPWORD]. +- **3 built-in editors** with support of **syntax highlighting**: [Dword][DWORD], [Edward][EDWARD] [Deepword][DEEPWORD] and [Qword][QWORD]. - [Console](https://github.com/cloudcmd/console "Console") with support of the default OS command line. - Written in **JavaScript/Node.js**. - Built-in archives pack: **zip** and **tar.gz**. diff --git a/man/cloudcmd.1 b/man/cloudcmd.1 index 2bff72db..dab36a2c 100644 --- a/man/cloudcmd.1 +++ b/man/cloudcmd.1 @@ -33,7 +33,7 @@ programs in browser from any computer, mobile or tablet device. --show-config show config values --show-dot-files show dot files --show-file-name show file name in view and edit modes - --editor set editor: "dword", "edward" or "deepword" + --editor set editor: "dword", "edward", "deepword" or "qword" --menu set menu: "supermenu" or "aleman" --packer set packer: "tar" or "zip" --root set root directory diff --git a/package.json b/package.json index cc12fc52..42484fed 100644 --- a/package.json +++ b/package.json @@ -130,6 +130,7 @@ "ponse": "^8.0.0", "pullout": "^5.0.0", "putout": "^42.0.5", + "qword": "^1.0.0", "redzip": "^4.6.1", "rendy": "^5.0.0", "restafary": "^13.0.1", diff --git a/server/cloudcmd.js b/server/cloudcmd.js index cc91559b..2e751520 100644 --- a/server/cloudcmd.js +++ b/server/cloudcmd.js @@ -12,6 +12,7 @@ import {konsole} from 'console-io'; import {edward} from 'edward'; import {dword} from 'dword'; import {deepword} from 'deepword'; +import {qword} from 'qword'; import nomine from 'nomine'; import {fileop} from '@cloudcmd/fileop'; import * as cloudfunc from '#common/cloudfunc'; @@ -152,6 +153,12 @@ function listen({prefixSocket, socket, config}) { prefixSocket: `${prefixSocket}/dword`, }); + qword.listen(socket, { + root, + auth, + prefixSocket: `${prefixSocket}/qword`, + }); + deepword.listen(socket, { root, auth, @@ -215,6 +222,14 @@ function cloudcmdMiddle({modules, config}) { dropbox, dropboxToken, }), + qword({ + root, + online, + diff, + zip, + dropbox, + dropboxToken, + }), deepword({ root, online, diff --git a/server/validate.js b/server/validate.js index 233aebcd..38491774 100644 --- a/server/validate.js +++ b/server/validate.js @@ -28,10 +28,10 @@ export const root = (dir, config, overrides = {}) => { }; export const editor = (name, {exit = _exit} = {}) => { - const reg = /^(dword|edward|deepword)$/; + const reg = /^(dword|edward|deepword|qword)$/; if (!reg.test(name)) - exit('cloudcmd --editor: could be "dword", "edward" or "deepword" only'); + exit(`cloudcmd --editor: could be "dword", "edward", "deepword" or "qword" only, recieved: "${name}"`); }; export const menu = (name, {exit = _exit} = {}) => { diff --git a/server/validate.spec.js b/server/validate.spec.js index bb16fae1..1c4ca25b 100644 --- a/server/validate.spec.js +++ b/server/validate.spec.js @@ -64,7 +64,7 @@ test('validate: packer: not valid', (t) => { test('validate: editor: not valid', (t) => { const exit = stub(); - const msg = 'cloudcmd --editor: could be "dword", "edward" or "deepword" only'; + const msg = 'cloudcmd --editor: could be "dword", "edward", "deepword" or "qword" only, recieved: "hello"'; validate.editor('hello', { exit, diff --git a/tmpl/config.hbs b/tmpl/config.hbs index 4a82286a..6002cd8b 100644 --- a/tmpl/config.hbs +++ b/tmpl/config.hbs @@ -57,11 +57,12 @@ -