feature: qword: add

This commit is contained in:
coderiaser 2026-05-13 00:22:57 +03:00
parent ccf608a52e
commit 68eacb916a
7 changed files with 24 additions and 6 deletions

View file

@ -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**.

View file

@ -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

View file

@ -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",

View file

@ -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,

View file

@ -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} = {}) => {

View file

@ -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,

View file

@ -57,11 +57,12 @@
<option {{ name-size-selected }}>name-size</option>
</select>
</li>
<li title="Editor: Edward(Ace-based), Dword(Codemirror-based), Deepword(Monaco-based)">
<li title="Editor: Edward(Ace-based), Dword(Codemirror-based), Deepword(Monaco-based), Qword(Codemirror6-based)">
<select data-name="js-editor" class="form-control full-width" title="Editor">
<option {{ edward-selected }}>edward</option>
<option {{ dword-selected }}>dword</option>
<option {{ deepword-selected }}>deepword</option>
<option {{ qword-selected }}>qword</option>
</select>
</li>
<li title="Navigate and edit files using hotkeys of legendary editor">