From c5cfe68c8aee4cfd09718ef0bcecf0afcf0f6905 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 25 Jan 2024 11:54:06 +0200 Subject: [PATCH 001/415] feature: cloudcmd: c8 v9.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8d049dd2..4188bce6 100644 --- a/package.json +++ b/package.json @@ -160,7 +160,7 @@ "auto-globals": "^3.0.0", "babel-loader": "^8.0.0", "babel-plugin-macros": "^3.0.0", - "c8": "^8.0.0", + "c8": "^9.1.0", "cheerio": "^1.0.0-rc.5", "clean-css-loader": "^2.0.0", "codegen.macro": "^4.0.0", From 5ab5576e68b0e9fc8b1928b8b820df8714baa64c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 25 Jan 2024 11:54:30 +0200 Subject: [PATCH 002/415] feature: cloudcmd: open v10.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 4188bce6..c69afc03 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ "object.omit": "^3.0.0", "once": "^1.4.0", "onezip": "^5.0.0", - "open": "^9.1.0", + "open": "^10.0.3", "package-json": "^8.1.0", "ponse": "^7.0.0", "pullout": "^4.0.0", From 8d92aa91e9ce830f732c5a504ae1545ade61c358 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 25 Jan 2024 11:54:47 +0200 Subject: [PATCH 003/415] feature: cloudcmd: package-json v9.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c69afc03..ef777280 100644 --- a/package.json +++ b/package.json @@ -125,7 +125,7 @@ "once": "^1.4.0", "onezip": "^5.0.0", "open": "^10.0.3", - "package-json": "^8.1.0", + "package-json": "^9.0.0", "ponse": "^7.0.0", "pullout": "^4.0.0", "putout": "^34.0.7", From d79a577611918925680cb2a9440e4d75ac72df34 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 25 Jan 2024 11:56:36 +0200 Subject: [PATCH 004/415] feature: cloudcmd: putout v35.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ef777280..b63fe3f0 100644 --- a/package.json +++ b/package.json @@ -128,7 +128,7 @@ "package-json": "^9.0.0", "ponse": "^7.0.0", "pullout": "^4.0.0", - "putout": "^34.0.7", + "putout": "^35.0.0", "redzip": "^3.0.0", "rendy": "^4.1.3", "restafary": "^11.0.0", From a0c398264c80aa442c45c881a29d7477cd4367ba Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 25 Jan 2024 12:00:28 +0200 Subject: [PATCH 005/415] chore: cloudcmd: v17.0.1 --- ChangeLog | 8 ++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 63fe0200..a3242784 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024.01.25, v17.0.1 + +feature: +- d79a5776 cloudcmd: putout v35.0.0 +- 8d92aa91 cloudcmd: package-json v9.0.0 +- 5ab5576e cloudcmd: open v10.0.3 +- c5cfe68c cloudcmd: c8 v9.1.0 + 2023.12.12, v17.0.0 feature: diff --git a/HELP.md b/HELP.md index 8e954c1e..8ba4e90b 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.0 +# Cloud Commander v17.0.1 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.01.25*, **[v17.0.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.1)** - *2023.12.12*, **[v17.0.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.0)** - *2023.12.08*, **[v16.18.0](//github.com/coderaiser/cloudcmd/releases/tag/v16.18.0)** - *2023.12.04*, **[v16.17.9](//github.com/coderaiser/cloudcmd/releases/tag/v16.17.9)** diff --git a/README.md b/README.md index 1f8fdb69..725bd701 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.0.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index b63fe3f0..89d3035e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.0.0", + "version": "17.0.1", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 4f25500351daee06e4467df123cac0910ecec27f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 25 Jan 2024 10:02:20 +0000 Subject: [PATCH 006/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/query.css | 52 ++++++++++++++++++++++++------------------------ css/supports.css | 2 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --git a/css/query.css b/css/query.css index f1734ef6..d1101404 100644 --- a/css/query.css +++ b/css/query.css @@ -2,19 +2,19 @@ .name { width: 40%; } - + .size { width: 10%; } - + .date { width: 15%; } - + .owner { width: 12%; } - + .mode { width: 15%; } @@ -24,7 +24,7 @@ .fm { height: 85%; } - + .files { height: 90%; } @@ -34,7 +34,7 @@ .fm { height: 80%; } - + .files { height: 90%; } @@ -80,7 +80,7 @@ .fm { height: 85%; } - + .files { height: 90%; } @@ -96,7 +96,7 @@ .fm { height: 75%; } - + .files { height: 90%; } @@ -108,7 +108,7 @@ .fm { height: 55%; } - + .files { height: 60%; } @@ -118,7 +118,7 @@ .panel { font-size: 26px; } - + /* текущий файл под курсором */ .current-file { background-color: var(--color-transparent); @@ -128,18 +128,18 @@ .current-file a { color: white; } - + .file::before, .file-link::before { color: rgb(26 224 124 / 56%); content: '\e80d'; } - + .current-file .file::before, .file-link::before { color: white; } - + /* меняем иконки на шрифтовые */ .mini-icon { color: rgb(246 224 124 / 56%); @@ -147,45 +147,45 @@ background-image: none; padding: 1%; } - + .size, .date, .owner, .mode { display: none; } - + .name { width: 90%; display: inline-block; } - + .directory::before, .directory-link::before { content: '\e807'; } - + .file, .file-link { background-image: none; } - + .archive, .archive-link { background-image: none; } - + .archive::before, .archive-link { color: rgb(26 224 124 / 56%); content: '\e81d'; } - + /* убираем заголовок */ .fm-header { display: none; } - + /* выводим заголовки рядом с полями */ .cmd-button { width: 20%; @@ -223,24 +223,24 @@ padding: 0; border: none; } - + .keyspanel, .panel-right { display: none; } - + .files { overflow-y: visible; } - + .current-file { box-shadow: 0 0; } - + .path-icon { display: none; } - + .mini-icon { display: none; } diff --git a/css/supports.css b/css/supports.css index cfb8cbf6..bf470c2d 100644 --- a/css/supports.css +++ b/css/supports.css @@ -2,7 +2,7 @@ .files { overflow-y: overlay; } - + .fm-header { overflow-y: hidden; } From 1ac4191c660f9dc63ffe4546dfa4b022a22797fd Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 30 Jan 2024 09:31:19 +0200 Subject: [PATCH 007/415] docs: LICENSE: 2024 --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 23edaaaa..58e890a6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ (The MIT License) -Copyright (c) 2012-2022 Coderaiser +Copyright (c) 2012-2024 Coderaiser Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the From 71b915bed3e2a2a7ac54698ee704bdeb991d6715 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 1 Feb 2024 12:11:37 +0200 Subject: [PATCH 008/415] feature: cloudcmd: @cloudcmd/fileop v8.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 89d3035e..19852e29 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "@babel/core": "^7.22.9", "@babel/plugin-transform-optional-chaining": "^7.21.0", "@cloudcmd/dropbox": "^4.0.1", - "@cloudcmd/fileop": "^7.0.0", + "@cloudcmd/fileop": "^8.0.0", "@cloudcmd/move-files": "^7.0.0", "@cloudcmd/read-files-sync": "^2.0.0", "@putout/cli-validate-args": "^1.0.1", From d453a1b29113a7f63dce703a1260e98c2fe88a01 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 1 Feb 2024 12:11:41 +0200 Subject: [PATCH 009/415] feature: cloudcmd: onezip v6.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 19852e29..891c6c84 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "nomine": "^4.0.0", "object.omit": "^3.0.0", "once": "^1.4.0", - "onezip": "^5.0.0", + "onezip": "^6.0.1", "open": "^10.0.3", "package-json": "^9.0.0", "ponse": "^7.0.0", From 5324a41abd1b6752846e2fd254d996deb328baed Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 1 Feb 2024 12:13:02 +0200 Subject: [PATCH 010/415] feature: cloudcmd: supertape v10.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 891c6c84..6b68741b 100644 --- a/package.json +++ b/package.json @@ -200,7 +200,7 @@ "smalltalk": "^4.0.0", "style-loader": "^2.0.0", "supermenu": "^4.0.1", - "supertape": "^9.0.0", + "supertape": "^10.0.0", "tar-stream": "^3.0.0", "unionfs": "^4.0.0", "url-loader": "^4.0.0", From ed95dec964c7bef4279011af5448a42096393622 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 1 Feb 2024 12:44:28 +0200 Subject: [PATCH 011/415] chore: cloudcmd: v17.0.2 --- ChangeLog | 7 +++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index a3242784..78d9f7ba 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024.02.01, v17.0.2 + +feature: +- 5324a41a cloudcmd: supertape v10.0.0 +- d453a1b2 cloudcmd: onezip v6.0.1 +- 71b915be cloudcmd: @cloudcmd/fileop v8.0.0 + 2024.01.25, v17.0.1 feature: diff --git a/HELP.md b/HELP.md index 8ba4e90b..9e135b5a 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.1 +# Cloud Commander v17.0.2 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.02.01*, **[v17.0.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.2)** - *2024.01.25*, **[v17.0.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.1)** - *2023.12.12*, **[v17.0.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.0)** - *2023.12.08*, **[v16.18.0](//github.com/coderaiser/cloudcmd/releases/tag/v16.18.0)** diff --git a/README.md b/README.md index 725bd701..3bfc0879 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.0.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 6b68741b..6d3491cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.0.1", + "version": "17.0.2", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From aca4119fb19c5f7fcb8d7e89d6ca0a52b33cd142 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 1 Feb 2024 14:14:37 +0200 Subject: [PATCH 012/415] feature: cloudcmd: inly v5.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6d3491cb..add8615e 100644 --- a/package.json +++ b/package.json @@ -113,7 +113,7 @@ "format-io": "^2.0.0", "fullstore": "^3.0.0", "http-auth": "4.1.2 || >4.1.3", - "inly": "^4.0.0", + "inly": "^5.0.0", "jaguar": "^6.0.0", "jju": "^1.3.0", "jonny": "^3.0.0", From 796ee627e7051f9579fbb5e28e7c4bb0dd72b675 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 1 Feb 2024 14:23:33 +0200 Subject: [PATCH 013/415] chore: lint --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index add8615e..bdc3f4f7 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "for-each-key": "^2.0.0", "format-io": "^2.0.0", "fullstore": "^3.0.0", - "http-auth": "4.1.2 || >4.1.3", + "http-auth": "4.1.2 || > 4.1.3", "inly": "^5.0.0", "jaguar": "^6.0.0", "jju": "^1.3.0", From e84c7dcbab755152d067cfd7346872917d3a10d1 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 1 Feb 2024 14:43:33 +0200 Subject: [PATCH 014/415] chore: cloudcmd: v17.0.3 --- ChangeLog | 5 +++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 78d9f7ba..ac8ab453 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.02.01, v17.0.3 + +feature: +- aca4119f cloudcmd: inly v5.0.0 + 2024.02.01, v17.0.2 feature: diff --git a/HELP.md b/HELP.md index 9e135b5a..2126e065 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.2 +# Cloud Commander v17.0.3 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.02.01*, **[v17.0.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.3)** - *2024.02.01*, **[v17.0.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.2)** - *2024.01.25*, **[v17.0.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.1)** - *2023.12.12*, **[v17.0.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.0)** diff --git a/README.md b/README.md index 3bfc0879..62be2e1e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.0.3 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index bdc3f4f7..3ac03243 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.0.2", + "version": "17.0.3", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From f0a6109a7db32e48ffb363479eda9449f87ca99d Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 2 Feb 2024 11:53:14 +0200 Subject: [PATCH 015/415] feature: cloudcmd: restafary v12.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3ac03243..9de4d87e 100644 --- a/package.json +++ b/package.json @@ -131,7 +131,7 @@ "putout": "^35.0.0", "redzip": "^3.0.0", "rendy": "^4.1.3", - "restafary": "^11.0.0", + "restafary": "^12.0.0", "restbox": "^3.0.0", "shortdate": "^2.0.0", "simport": "^1.0.1", From da967f080c4c665ced774650e8be4452233c0bd8 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 2 Feb 2024 12:09:28 +0200 Subject: [PATCH 016/415] feature: cloudcmd: dword v15.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9de4d87e..ff20a39b 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "currify": "^4.0.0", "deepmerge": "^4.0.0", "deepword": "^8.0.0", - "dword": "^14.0.0", + "dword": "^15.0.0", "edward": "^14.2.0", "es6-promisify": "^7.0.0", "execon": "^1.2.0", From 1c73e525ff1f6ae2458cb264a9f7d0eb8927f6b3 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 2 Feb 2024 12:13:32 +0200 Subject: [PATCH 017/415] feature: cloudcmd: edward v15.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ff20a39b..0dbb18ad 100644 --- a/package.json +++ b/package.json @@ -103,7 +103,7 @@ "deepmerge": "^4.0.0", "deepword": "^8.0.0", "dword": "^15.0.0", - "edward": "^14.2.0", + "edward": "^15.0.0", "es6-promisify": "^7.0.0", "execon": "^1.2.0", "express": "^4.13.0", From 7ce954503c558c03816b65c3bec89ed7a7148fd9 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 2 Feb 2024 18:20:57 +0200 Subject: [PATCH 018/415] feature: cloudcmd: deepword v9.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0dbb18ad..151ea8d8 100644 --- a/package.json +++ b/package.json @@ -101,7 +101,7 @@ "criton": "^2.0.0", "currify": "^4.0.0", "deepmerge": "^4.0.0", - "deepword": "^8.0.0", + "deepword": "^9.0.0", "dword": "^15.0.0", "edward": "^15.0.0", "es6-promisify": "^7.0.0", From 5ced36b0d687cc67e0d50dc82cea9a50ce318400 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 2 Feb 2024 18:22:45 +0200 Subject: [PATCH 019/415] chore: cloudcmd: v17.0.4 --- ChangeLog | 8 ++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ac8ab453..e71b152a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024.02.02, v17.0.4 + +feature: +- 7ce95450 cloudcmd: deepword v9.0.0 +- 1c73e525 cloudcmd: edward v15.0.0 +- da967f08 cloudcmd: dword v15.0.0 +- f0a6109a cloudcmd: restafary v12.0.0 + 2024.02.01, v17.0.3 feature: diff --git a/HELP.md b/HELP.md index 2126e065..5f5937a4 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.3 +# Cloud Commander v17.0.4 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.02.02*, **[v17.0.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.4)** - *2024.02.01*, **[v17.0.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.3)** - *2024.02.01*, **[v17.0.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.2)** - *2024.01.25*, **[v17.0.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.1)** diff --git a/README.md b/README.md index 62be2e1e..d1756d23 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.3 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.0.4 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 151ea8d8..0885f3aa 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.0.3", + "version": "17.0.4", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 33201dade23444ad32ba76ba1c8a881cf428bfe1 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 11 Mar 2024 16:02:35 +0200 Subject: [PATCH 020/415] fix: cloudcmd: docker: alpine (#406) --- docker/Dockerfile.alpine | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine index b00d3a21..5a1e9214 100644 --- a/docker/Dockerfile.alpine +++ b/docker/Dockerfile.alpine @@ -1,4 +1,4 @@ -FROM node:lts-buster-slim +FROM node:alpine LABEL maintainer="Coderaiser" RUN mkdir -p /usr/src/app @@ -8,12 +8,12 @@ COPY package.json /usr/src/app/ RUN npm config set package-lock false && \ npm install --production && \ - apt update && \ - apt install -y make g++ python3 && \ + apk update && \ + apk add --no-cache bash make g++ python3 && \ npm i gritty && \ npm cache clean --force && \ - apt remove -y make g++ python3 && \ - rm -rf /usr/include /tmp/* /var/cache/apt/* + apk del make g++ python3 && \ + rm -rf /usr/include /tmp/* /var/cache/apk/* COPY . /usr/src/app From 1d3567f3a371bef8e3de956d434f65fdbec3841c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 11 Mar 2024 16:07:05 +0200 Subject: [PATCH 021/415] chore: cloudcmd: v17.0.5 --- ChangeLog | 5 +++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e71b152a..c9266456 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.03.11, v17.0.5 + +fix: +- 33201dad cloudcmd: docker: alpine (#406) + 2024.02.02, v17.0.4 feature: diff --git a/HELP.md b/HELP.md index 5f5937a4..078a7977 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.4 +# Cloud Commander v17.0.5 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.11*, **[v17.0.5](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.5)** - *2024.02.02*, **[v17.0.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.4)** - *2024.02.01*, **[v17.0.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.3)** - *2024.02.01*, **[v17.0.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.2)** diff --git a/README.md b/README.md index d1756d23..30ad54a9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.4 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.0.5 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 0885f3aa..f53cb0bd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.0.4", + "version": "17.0.5", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From d928c0b83d4ad2b346e3e9db2392a5fa2311d353 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 11 Mar 2024 22:31:13 +0200 Subject: [PATCH 022/415] fix: cloudcmd: ocker: revert alpine (#406) This reverts commit 33201dade23444ad32ba76ba1c8a881cf428bfe1. --- docker/Dockerfile.alpine | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine index 5a1e9214..b00d3a21 100644 --- a/docker/Dockerfile.alpine +++ b/docker/Dockerfile.alpine @@ -1,4 +1,4 @@ -FROM node:alpine +FROM node:lts-buster-slim LABEL maintainer="Coderaiser" RUN mkdir -p /usr/src/app @@ -8,12 +8,12 @@ COPY package.json /usr/src/app/ RUN npm config set package-lock false && \ npm install --production && \ - apk update && \ - apk add --no-cache bash make g++ python3 && \ + apt update && \ + apt install -y make g++ python3 && \ npm i gritty && \ npm cache clean --force && \ - apk del make g++ python3 && \ - rm -rf /usr/include /tmp/* /var/cache/apk/* + apt remove -y make g++ python3 && \ + rm -rf /usr/include /tmp/* /var/cache/apt/* COPY . /usr/src/app From b795a1f5dd8ed0250a25d762a0eaceacc19a63bd Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 11 Mar 2024 22:32:40 +0200 Subject: [PATCH 023/415] chore: cloudcmd: v17.0.6 --- ChangeLog | 5 +++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index c9266456..d68aa2e8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.03.11, v17.0.6 + +fix: +- d928c0b8 cloudcmd: ocker: revert alpine (#406) + 2024.03.11, v17.0.5 fix: diff --git a/HELP.md b/HELP.md index 078a7977..181cd4a7 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.5 +# Cloud Commander v17.0.6 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.11*, **[v17.0.6](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.6)** - *2024.03.11*, **[v17.0.5](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.5)** - *2024.02.02*, **[v17.0.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.4)** - *2024.02.01*, **[v17.0.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.3)** diff --git a/README.md b/README.md index 30ad54a9..ccc13b39 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.5 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.0.6 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index f53cb0bd..83d62c0a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.0.5", + "version": "17.0.6", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 683c865edaa4443e6bad535239f5e8b8af15d7c5 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 12 Mar 2024 17:08:35 +0200 Subject: [PATCH 024/415] feature: cloudcmd: gritty v8.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 83d62c0a..e3357279 100644 --- a/package.json +++ b/package.json @@ -172,7 +172,7 @@ "eslint-plugin-n": "^16.0.1", "eslint-plugin-putout": "^22.0.0", "extract-text-webpack-plugin": "^4.0.0-alpha.0", - "gritty": "^7.0.0", + "gritty": "^8.0.0", "gunzip-maybe": "^1.3.1", "html-looks-like": "^1.0.2", "html-webpack-plugin": "^4.0.1", From 97627dc2ffa4c91c41fff0d86acda67887750da1 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 12 Mar 2024 17:24:51 +0200 Subject: [PATCH 025/415] feature: cloudcmd: auto-globals v4.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e3357279..8ef6893c 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,7 @@ "@cloudcmd/olark": "^3.0.2", "@cloudcmd/stub": "^4.0.1", "@putout/babel": "^2.0.0", - "auto-globals": "^3.0.0", + "auto-globals": "^4.0.0", "babel-loader": "^8.0.0", "babel-plugin-macros": "^3.0.0", "c8": "^9.1.0", From a407e0c3fad08f7a46bfac522b254d9660e40fbc Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 12 Mar 2024 17:39:58 +0200 Subject: [PATCH 026/415] chore: lint --- .github/workflows/nodejs.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index c70b7db5..9dc3035e 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -26,7 +26,7 @@ jobs: run: yarn --no-lockfile - name: Lint run: redrun fix:lint - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: | ~/.cargo/bin/ From 266aff4ffbdac64278a440283ba55fb5fab85255 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 12 Mar 2024 17:40:33 +0200 Subject: [PATCH 027/415] chore: cloudcmd: v17.0.7 --- ChangeLog | 6 ++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d68aa2e8..20c6c68d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024.03.12, v17.0.7 + +feature: +- 97627dc2 cloudcmd: auto-globals v4.0.0 +- 683c865e cloudcmd: gritty v8.0.0 + 2024.03.11, v17.0.6 fix: diff --git a/HELP.md b/HELP.md index 181cd4a7..c1a15366 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.6 +# Cloud Commander v17.0.7 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.12*, **[v17.0.7](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.7)** - *2024.03.11*, **[v17.0.6](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.6)** - *2024.03.11*, **[v17.0.5](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.5)** - *2024.02.02*, **[v17.0.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.4)** diff --git a/README.md b/README.md index ccc13b39..f1274884 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.6 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.0.7 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 8ef6893c..32daa8c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.0.6", + "version": "17.0.7", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From dc2d3146a16cbf3f3f27ed5ab2df1b9a8bbd56eb Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 15 Mar 2024 12:29:43 +0200 Subject: [PATCH 028/415] Update ISSUE_TEMPLATE.md --- .github/ISSUE_TEMPLATE.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 76725507..482ca3f7 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -9,3 +9,5 @@ about something, just do as best as you're able. - **Browser name/version**: - **Used Command Line Parameters**: - **Changed Config**: +- [ ] **I'm ready to donate 🎁** +- [ ] **I'm willing to work on this issue 💪** From 0ecd1853d066c6a222d33f56be63f70fd28ee622 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 16 Mar 2024 11:58:19 +0200 Subject: [PATCH 029/415] Update ISSUE_TEMPLATE.md --- .github/ISSUE_TEMPLATE.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md index 482ca3f7..45635a3c 100644 --- a/.github/ISSUE_TEMPLATE.md +++ b/.github/ISSUE_TEMPLATE.md @@ -9,5 +9,5 @@ about something, just do as best as you're able. - **Browser name/version**: - **Used Command Line Parameters**: - **Changed Config**: -- [ ] **I'm ready to donate 🎁** +- [ ] **I'm ready to donate on [Patreon](https://patreon.com/coderaiser) 🎁** - [ ] **I'm willing to work on this issue 💪** From bc617c17ef570e7944750eddeebd5846d18dd9b6 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 16 Mar 2024 14:28:37 +0200 Subject: [PATCH 030/415] feature: cloudcmd: serve-once v3.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 32daa8c6..c38d3237 100644 --- a/package.json +++ b/package.json @@ -195,7 +195,7 @@ "request": "^2.76.0", "rimraf": "^5.0.1", "scroll-into-view-if-needed": "^3.0.4", - "serve-once": "^2.0.0", + "serve-once": "^3.0.1", "serviceworker-webpack-plugin": "^1.0.1", "smalltalk": "^4.0.0", "style-loader": "^2.0.0", From 5fa9fcc57cec82a69d93193aab541c8c1d1f6ef0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 16 Mar 2024 14:28:46 +0200 Subject: [PATCH 031/415] feature: cloudcmd: pullout v5.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c38d3237..a1b79b73 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "open": "^10.0.3", "package-json": "^9.0.0", "ponse": "^7.0.0", - "pullout": "^4.0.0", + "pullout": "^5.0.0", "putout": "^35.0.0", "redzip": "^3.0.0", "rendy": "^4.1.3", From 6b793cca04a11571e6a155c06751fa2c78cd17b3 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 11 Mar 2024 16:02:35 +0200 Subject: [PATCH 032/415] feature: cloudcmd: docker: alpine --- docker/Dockerfile.alpine | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine index b00d3a21..da6ea8ea 100644 --- a/docker/Dockerfile.alpine +++ b/docker/Dockerfile.alpine @@ -1,4 +1,4 @@ -FROM node:lts-buster-slim +FROM node:alpine LABEL maintainer="Coderaiser" RUN mkdir -p /usr/src/app @@ -8,12 +8,9 @@ COPY package.json /usr/src/app/ RUN npm config set package-lock false && \ npm install --production && \ - apt update && \ - apt install -y make g++ python3 && \ npm i gritty && \ npm cache clean --force && \ - apt remove -y make g++ python3 && \ - rm -rf /usr/include /tmp/* /var/cache/apt/* + rm -rf /usr/include /tmp/* /var/cache/apk/* COPY . /usr/src/app From 2047cb7ad8ef991ade60279d0e737725b7979068 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 16 Mar 2024 15:18:46 +0200 Subject: [PATCH 033/415] feature: cloudcmd: @cloudcmd/dropbox v5.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a1b79b73..fecced6b 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "dependencies": { "@babel/core": "^7.22.9", "@babel/plugin-transform-optional-chaining": "^7.21.0", - "@cloudcmd/dropbox": "^4.0.1", + "@cloudcmd/dropbox": "^5.0.1", "@cloudcmd/fileop": "^8.0.0", "@cloudcmd/move-files": "^7.0.0", "@cloudcmd/read-files-sync": "^2.0.0", From 10d6d2e2471fb2b60d1e3ca310212cc1615ff699 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 16 Mar 2024 15:21:23 +0200 Subject: [PATCH 034/415] feature: cloudcmd: @types/node-fetch v2.6.11 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index fecced6b..9a82bed3 100644 --- a/package.json +++ b/package.json @@ -157,6 +157,7 @@ "@cloudcmd/olark": "^3.0.2", "@cloudcmd/stub": "^4.0.1", "@putout/babel": "^2.0.0", + "@types/node-fetch": "^2.6.11", "auto-globals": "^4.0.0", "babel-loader": "^8.0.0", "babel-plugin-macros": "^3.0.0", From 0bcff30faaa69451b5700f898efcce72a4d511e2 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 16 Mar 2024 15:26:09 +0200 Subject: [PATCH 035/415] chore: lint --- .github/workflows/docker.yml | 3 ++- .madrun.mjs | 5 +---- bin/cloudcmd.mjs | 5 +---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index db80dd17..05af8387 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -27,7 +27,8 @@ jobs: run: > redrun build - echo "::set-output name=version::$(grep '"version":' package.json -m1 | cut -d\" -f4)" + echo "::set-output name=version::$(grep '"version":' package.json -m1 + | cut -d\" -f4)" - name: Set up QEMU uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx diff --git a/.madrun.mjs b/.madrun.mjs index 66d3fe0c..bda4dcdf 100644 --- a/.madrun.mjs +++ b/.madrun.mjs @@ -1,7 +1,4 @@ -import { - run, - cutEnv, -} from 'madrun'; +import {run, cutEnv} from 'madrun'; import process from 'node:process'; const testEnv = { diff --git a/bin/cloudcmd.mjs b/bin/cloudcmd.mjs index 3dd4efd7..4bd88610 100755 --- a/bin/cloudcmd.mjs +++ b/bin/cloudcmd.mjs @@ -7,10 +7,7 @@ import {createSimport} from 'simport'; import parse from 'yargs-parser'; import process from 'node:process'; import exit from '../server/exit.js'; -import { - createConfig, - configPath, -} from '../server/config.js'; +import {createConfig, configPath} from '../server/config.js'; import env from '../server/env.js'; import prefixer from '../server/prefixer.js'; From a57833aaf8acbae82d9e884cb48504f23e49377f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 16 Mar 2024 15:27:16 +0200 Subject: [PATCH 036/415] chore: cloudcmd: v17.1.0 --- ChangeLog | 9 +++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 20c6c68d..6d3c5e1f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2024.03.16, v17.1.0 + +feature: +- 10d6d2e2 cloudcmd: @types/node-fetch v2.6.11 +- 2047cb7a cloudcmd: @cloudcmd/dropbox v5.0.1 +- 6b793cca cloudcmd: docker: alpine +- 5fa9fcc5 cloudcmd: pullout v5.0.0 +- bc617c17 cloudcmd: serve-once v3.0.1 + 2024.03.12, v17.0.7 feature: diff --git a/HELP.md b/HELP.md index c1a15366..8082b1f1 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.7 +# Cloud Commander v17.1.0 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.16*, **[v17.1.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.0)** - *2024.03.12*, **[v17.0.7](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.7)** - *2024.03.11*, **[v17.0.6](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.6)** - *2024.03.11*, **[v17.0.5](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.5)** diff --git a/README.md b/README.md index f1274884..8a47a9aa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.0.7 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.1.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 9a82bed3..16a5451d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.0.7", + "version": "17.1.0", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From c51ba1d8f65632933bcdfbfb187887925839b3de Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 16 Mar 2024 17:21:57 +0200 Subject: [PATCH 037/415] feature: docker: drop arm v7 --- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 05af8387..5b5e5612 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -53,7 +53,7 @@ jobs: with: context: . file: docker/Dockerfile.alpine - platforms: linux/amd64,linux/arm/v7,linux/arm64 + platforms: linux/amd64,linux/arm64 push: true tags: | coderaiser/cloudcmd:latest-alpine From a92a5a0d3432c3df48f47943036d9583b43e5294 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 16 Mar 2024 17:58:18 +0200 Subject: [PATCH 038/415] feature: cloudcmd: restbox v4.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 16a5451d..8d51a6f5 100644 --- a/package.json +++ b/package.json @@ -132,7 +132,7 @@ "redzip": "^3.0.0", "rendy": "^4.1.3", "restafary": "^12.0.0", - "restbox": "^3.0.0", + "restbox": "^4.0.0", "shortdate": "^2.0.0", "simport": "^1.0.1", "socket.io": "^4.0.0", From 3c5ca3dca462544b095e5f0f229510b4e711b5c6 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 16 Mar 2024 18:45:42 +0200 Subject: [PATCH 039/415] chore: cloudcmd: v17.1.1 --- ChangeLog | 6 ++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6d3c5e1f..918f42e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024.03.16, v17.1.1 + +feature: +- a92a5a0d cloudcmd: restbox v4.0.0 +- c51ba1d8 docker: drop arm v7 + 2024.03.16, v17.1.0 feature: diff --git a/HELP.md b/HELP.md index 8082b1f1..4ffdf5e0 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.0 +# Cloud Commander v17.1.1 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.16*, **[v17.1.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.1)** - *2024.03.16*, **[v17.1.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.0)** - *2024.03.12*, **[v17.0.7](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.7)** - *2024.03.11*, **[v17.0.6](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.6)** diff --git a/README.md b/README.md index 8a47a9aa..b4ab72b5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.1.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 8d51a6f5..d1a8c7e1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.1.0", + "version": "17.1.1", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From b2478a81455bdf37d11181e2491a35be122c8694 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 18 Mar 2024 07:51:49 +0200 Subject: [PATCH 040/415] docs: README: rm arm v7 --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index b4ab72b5..c7bb89e7 100644 --- a/README.md +++ b/README.md @@ -126,10 +126,8 @@ The docker images are provided for multiple architectures and types. The followi | Architecture | Type | |----------------|--------------| | amd64 | linux | -| arm/v7 | linux | | arm64 (arm/v8) | linux | | amd64 | linux-alpine | -| arm/v7 | linux-alpine | | arm64 (arm/v8) | linux-alpine | `Cloud Commander` could be used as a [docker container](https://hub.docker.com/r/coderaiser/cloudcmd/ "Docker container") this way: From 857c97006ddd44046e691e797efbeeb8a37dbea0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 18 Mar 2024 11:44:33 +0200 Subject: [PATCH 041/415] fix: docker: alpine --- docker/Dockerfile.alpine | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/Dockerfile.alpine b/docker/Dockerfile.alpine index da6ea8ea..5a1e9214 100644 --- a/docker/Dockerfile.alpine +++ b/docker/Dockerfile.alpine @@ -8,8 +8,11 @@ COPY package.json /usr/src/app/ RUN npm config set package-lock false && \ npm install --production && \ + apk update && \ + apk add --no-cache bash make g++ python3 && \ npm i gritty && \ npm cache clean --force && \ + apk del make g++ python3 && \ rm -rf /usr/include /tmp/* /var/cache/apk/* COPY . /usr/src/app From bf614e1dc95965d246573524063c5dec32e6cf9d Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 18 Mar 2024 11:58:36 +0200 Subject: [PATCH 042/415] feature: cloudcmd: redlint v3.13.1 --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index d1a8c7e1..99124f0d 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "type": "git", "url": "git://github.com/coderaiser/cloudcmd.git" }, + "main": "server/cloudcmd.js", "keywords": [ "console", "terminal", @@ -193,6 +194,7 @@ "philip": "^3.0.0", "place": "^1.1.4", "readjson": "^2.0.1", + "redlint": "^3.13.1", "request": "^2.76.0", "rimraf": "^5.0.1", "scroll-into-view-if-needed": "^3.0.4", @@ -214,7 +216,6 @@ "node": ">=18" }, "license": "MIT", - "main": "server/cloudcmd.js", "publishConfig": { "access": "public" } From 4503237ac492faa3ff1f0fbaf940bf753286ca09 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 18 Mar 2024 15:04:56 +0200 Subject: [PATCH 043/415] chore: cloudcmd: v17.1.2 --- ChangeLog | 8 ++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 918f42e3..35cc08bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024.03.18, v17.1.2 + +fix: +- 857c9700 docker: alpine + +feature: +- bf614e1d cloudcmd: redlint v3.13.1 + 2024.03.16, v17.1.1 feature: diff --git a/HELP.md b/HELP.md index 4ffdf5e0..c9116a17 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.1 +# Cloud Commander v17.1.2 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.18*, **[v17.1.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.2)** - *2024.03.16*, **[v17.1.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.1)** - *2024.03.16*, **[v17.1.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.0)** - *2024.03.12*, **[v17.0.7](//github.com/coderaiser/cloudcmd/releases/tag/v17.0.7)** diff --git a/README.md b/README.md index c7bb89e7..5974f220 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.1.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 99124f0d..d791677c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.1.1", + "version": "17.1.2", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From eff34215ee764360ccc35c8c395e033ac2afcc66 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 18 Mar 2024 16:46:11 +0200 Subject: [PATCH 044/415] chore: lint --- .github/workflows/docker.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5b5e5612..5a932ac7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -30,16 +30,16 @@ jobs: echo "::set-output name=version::$(grep '"version":' package.json -m1 | cut -d\" -f4)" - name: Set up QEMU - uses: docker/setup-qemu-action@v2 + uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Login to DockerHub - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} - name: Build and push base-image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: docker/Dockerfile @@ -49,7 +49,7 @@ jobs: coderaiser/cloudcmd:latest coderaiser/cloudcmd:${{ steps.build.outputs.version }} - name: Build and push alpine-image - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: context: . file: docker/Dockerfile.alpine From e080a54022dc1178e2376b1f38ac8ef4db345bca Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 18 Mar 2024 18:29:13 +0200 Subject: [PATCH 045/415] feature: server: cloudcmd: get rid of mock-require --- server/cloudcmd.js | 9 ++-- server/cloudcmd.spec.js | 99 ++++++++++++++++------------------------- 2 files changed, 45 insertions(+), 63 deletions(-) diff --git a/server/cloudcmd.js b/server/cloudcmd.js index 8991b969..382a6780 100644 --- a/server/cloudcmd.js +++ b/server/cloudcmd.js @@ -1,5 +1,6 @@ 'use strict'; +const fullstore = require('fullstore'); const process = require('process'); const DIR = `${__dirname}/`; const DIR_COMMON = `${DIR}../common/`; @@ -34,11 +35,12 @@ const nomine = require('nomine'); const fileop = require('@cloudcmd/fileop'); const DIR_ROOT = `${DIR}../`; -const isDev = process.env.NODE_ENV === 'development'; const getDist = (isDev) => isDev ? 'dist-dev' : 'dist'; +const isDev = fullstore(process.env.NODE_ENV === 'development'); + const getIndexPath = (isDev) => path.join(DIR, '..', `${getDist(isDev)}/index.html`); -const html = fs.readFileSync(getIndexPath(isDev), 'utf8'); +const html = fs.readFileSync(getIndexPath(isDev()), 'utf8'); const initAuth = currify(_initAuth); const notEmpty = (a) => a; @@ -255,9 +257,10 @@ function logout(req, res, next) { res.sendStatus(401); } +module.exports._isDev = isDev; module.exports._replaceDist = replaceDist; function replaceDist(url) { - if (!isDev) + if (!isDev()) return url; return url.replace(/^\/dist\//, '/dist-dev/'); diff --git a/server/cloudcmd.spec.js b/server/cloudcmd.spec.js index ca4d49cc..f2c6e1a7 100644 --- a/server/cloudcmd.spec.js +++ b/server/cloudcmd.spec.js @@ -1,16 +1,9 @@ 'use strict'; -const process = require('process'); const path = require('path'); - const {test, stub} = require('supertape'); +const cloudcmd = require('./cloudcmd.js'); -const {reRequire} = require('mock-require'); - -const DIR = './'; -const cloudcmdPath = `${DIR}cloudcmd`; - -const cloudcmd = require(cloudcmdPath); const {request} = require('serve-once')(cloudcmd, { config: { auth: false, @@ -19,6 +12,8 @@ const {request} = require('serve-once')(cloudcmd, { }); const { + _isDev, + _replaceDist, createConfigManager, _getPrefix, _initAuth, @@ -26,13 +21,13 @@ const { test('cloudcmd: defaults: config', (t) => { const configManager = createConfigManager(); - + configManager('configDialog', false); - + cloudcmd({ configManager, }); - + t.notOk(configManager('configDialog'), 'should not override config with defaults'); t.end(); }); @@ -40,11 +35,11 @@ test('cloudcmd: defaults: config', (t) => { test('cloudcmd: defaults: console', (t) => { const configManager = createConfigManager(); configManager('console', false); - + cloudcmd({ configManager, }); - + t.notOk(configManager('console'), 'should not override config with defaults'); t.end(); }); @@ -52,7 +47,7 @@ test('cloudcmd: defaults: console', (t) => { test('cloudcmd: getPrefix', (t) => { const value = 'hello'; const result = _getPrefix(value); - + t.equal(result, value); t.end(); }); @@ -61,7 +56,7 @@ test('cloudcmd: getPrefix: function', (t) => { const value = 'hello'; const fn = () => value; const result = _getPrefix(fn); - + t.equal(result, value); t.end(); }); @@ -70,38 +65,34 @@ test('cloudcmd: getPrefix: function: empty', (t) => { const value = null; const fn = () => value; const result = _getPrefix(fn); - + t.equal(result, ''); t.end(); }); test('cloudcmd: replaceDist', (t) => { - const {NODE_ENV} = process.env; - - process.env.NODE_ENV = 'development'; - - const {_replaceDist} = reRequire(cloudcmdPath); - + const currentIsDev = _isDev(); + + _isDev(true); const url = '/dist/hello'; const result = _replaceDist(url); const expected = '/dist-dev/hello'; - - process.env.NODE_ENV = NODE_ENV; - + + _isDev(currentIsDev); + t.equal(result, expected); t.end(); }); test('cloudcmd: replaceDist: !isDev', (t) => { const url = '/dist/hello'; - const cloudcmdPath = `${DIR}cloudcmd`; - - const reset = cleanNodeEnv(); - const {_replaceDist} = reRequire(cloudcmdPath); + + const currentIsDev = _isDev(); + _isDev(false); const result = _replaceDist(url); - - reset(); - + + _isDev(currentIsDev); + t.equal(result, url); t.end(); }); @@ -109,18 +100,18 @@ test('cloudcmd: replaceDist: !isDev', (t) => { test('cloudcmd: auth: reject', (t) => { const accept = stub(); const reject = stub(); - + const config = createConfigManager(); - + const username = 'root'; const password = 'toor'; - + config('auth', true); config('username', username); config('password', password); - + _initAuth(config, accept, reject, username, 'abc'); - + t.ok(reject.called, 'should reject'); t.end(); }); @@ -128,18 +119,18 @@ test('cloudcmd: auth: reject', (t) => { test('cloudcmd: auth: accept', (t) => { const accept = stub(); const reject = stub(); - + const username = 'root'; const password = 'toor'; const auth = true; - + const config = createConfigManager(); config('username', username); config('password', password); config('auth', auth); - + _initAuth(config, accept, reject, username, password); - + t.ok(accept.called, 'should accept'); t.end(); }); @@ -147,18 +138,18 @@ test('cloudcmd: auth: accept', (t) => { test('cloudcmd: auth: accept: no auth', (t) => { const accept = stub(); const reject = stub(); - + const auth = false; const username = 'root'; const password = 'toor'; - + const config = createConfigManager(); config('username', username); config('password', password); config('auth', auth); - + _initAuth(config, accept, reject, username, password); - + t.ok(accept.called, 'should accept'); t.end(); }); @@ -166,7 +157,7 @@ test('cloudcmd: auth: accept: no auth', (t) => { test('cloudcmd: getIndexPath: production', (t) => { const isDev = false; const name = path.join(__dirname, '..', 'dist', 'index.html'); - + t.equal(cloudcmd._getIndexPath(isDev), name); t.end(); }); @@ -174,26 +165,14 @@ test('cloudcmd: getIndexPath: production', (t) => { test('cloudcmd: getIndexPath: development', (t) => { const isDev = true; const name = path.join(__dirname, '..', 'dist-dev', 'index.html'); - + t.equal(cloudcmd._getIndexPath(isDev), name); t.end(); }); test('cloudcmd: sw', async (t) => { const {status} = await request.get('/sw.js'); - + t.equal(status, 200, 'should return sw'); t.end(); }); - -function cleanNodeEnv() { - const {NODE_ENV} = process.env; - - process.env.NODE_ENV = ''; - - const reset = () => { - process.env.NODE_ENV = NODE_ENV; - }; - - return reset; -} From 57d2f8e93d6b3b596dcd0d84e2554de4a766aa03 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 18 Mar 2024 18:30:17 +0200 Subject: [PATCH 046/415] chore: cloudcmd: v17.1.3 --- ChangeLog | 5 +++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 35cc08bc..1dd375a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.03.18, v17.1.3 + +feature: +- e080a540 server: cloudcmd: get rid of mock-require + 2024.03.18, v17.1.2 fix: diff --git a/HELP.md b/HELP.md index c9116a17..5b74d16c 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.2 +# Cloud Commander v17.1.3 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.18*, **[v17.1.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.3)** - *2024.03.18*, **[v17.1.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.2)** - *2024.03.16*, **[v17.1.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.1)** - *2024.03.16*, **[v17.1.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.0)** diff --git a/README.md b/README.md index 5974f220..804d0e68 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.1.3 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index d791677c..420dac17 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.1.2", + "version": "17.1.3", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 46c8accd848160fa5b7fb7393ddacf05d6b2b5e8 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 18 Mar 2024 16:32:23 +0000 Subject: [PATCH 047/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/cloudcmd.spec.js | 60 ++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/server/cloudcmd.spec.js b/server/cloudcmd.spec.js index f2c6e1a7..d44047cc 100644 --- a/server/cloudcmd.spec.js +++ b/server/cloudcmd.spec.js @@ -21,13 +21,13 @@ const { test('cloudcmd: defaults: config', (t) => { const configManager = createConfigManager(); - + configManager('configDialog', false); - + cloudcmd({ configManager, }); - + t.notOk(configManager('configDialog'), 'should not override config with defaults'); t.end(); }); @@ -35,11 +35,11 @@ test('cloudcmd: defaults: config', (t) => { test('cloudcmd: defaults: console', (t) => { const configManager = createConfigManager(); configManager('console', false); - + cloudcmd({ configManager, }); - + t.notOk(configManager('console'), 'should not override config with defaults'); t.end(); }); @@ -47,7 +47,7 @@ test('cloudcmd: defaults: console', (t) => { test('cloudcmd: getPrefix', (t) => { const value = 'hello'; const result = _getPrefix(value); - + t.equal(result, value); t.end(); }); @@ -56,7 +56,7 @@ test('cloudcmd: getPrefix: function', (t) => { const value = 'hello'; const fn = () => value; const result = _getPrefix(fn); - + t.equal(result, value); t.end(); }); @@ -65,34 +65,34 @@ test('cloudcmd: getPrefix: function: empty', (t) => { const value = null; const fn = () => value; const result = _getPrefix(fn); - + t.equal(result, ''); t.end(); }); test('cloudcmd: replaceDist', (t) => { const currentIsDev = _isDev(); - + _isDev(true); const url = '/dist/hello'; const result = _replaceDist(url); const expected = '/dist-dev/hello'; - + _isDev(currentIsDev); - + t.equal(result, expected); t.end(); }); test('cloudcmd: replaceDist: !isDev', (t) => { const url = '/dist/hello'; - + const currentIsDev = _isDev(); _isDev(false); const result = _replaceDist(url); - + _isDev(currentIsDev); - + t.equal(result, url); t.end(); }); @@ -100,18 +100,18 @@ test('cloudcmd: replaceDist: !isDev', (t) => { test('cloudcmd: auth: reject', (t) => { const accept = stub(); const reject = stub(); - + const config = createConfigManager(); - + const username = 'root'; const password = 'toor'; - + config('auth', true); config('username', username); config('password', password); - + _initAuth(config, accept, reject, username, 'abc'); - + t.ok(reject.called, 'should reject'); t.end(); }); @@ -119,18 +119,18 @@ test('cloudcmd: auth: reject', (t) => { test('cloudcmd: auth: accept', (t) => { const accept = stub(); const reject = stub(); - + const username = 'root'; const password = 'toor'; const auth = true; - + const config = createConfigManager(); config('username', username); config('password', password); config('auth', auth); - + _initAuth(config, accept, reject, username, password); - + t.ok(accept.called, 'should accept'); t.end(); }); @@ -138,18 +138,18 @@ test('cloudcmd: auth: accept', (t) => { test('cloudcmd: auth: accept: no auth', (t) => { const accept = stub(); const reject = stub(); - + const auth = false; const username = 'root'; const password = 'toor'; - + const config = createConfigManager(); config('username', username); config('password', password); config('auth', auth); - + _initAuth(config, accept, reject, username, password); - + t.ok(accept.called, 'should accept'); t.end(); }); @@ -157,7 +157,7 @@ test('cloudcmd: auth: accept: no auth', (t) => { test('cloudcmd: getIndexPath: production', (t) => { const isDev = false; const name = path.join(__dirname, '..', 'dist', 'index.html'); - + t.equal(cloudcmd._getIndexPath(isDev), name); t.end(); }); @@ -165,14 +165,14 @@ test('cloudcmd: getIndexPath: production', (t) => { test('cloudcmd: getIndexPath: development', (t) => { const isDev = true; const name = path.join(__dirname, '..', 'dist-dev', 'index.html'); - + t.equal(cloudcmd._getIndexPath(isDev), name); t.end(); }); test('cloudcmd: sw', async (t) => { const {status} = await request.get('/sw.js'); - + t.equal(status, 200, 'should return sw'); t.end(); }); From 98d3a4cc56af1d0f32dc0d005a14d4f8b80a2f1a Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 20 Mar 2024 12:13:17 +0200 Subject: [PATCH 048/415] feature: server: columns: get rid of mock-require --- .eslintrc.js | 1 + .webpack/css.js | 4 +- .webpack/js.js | 2 +- client/client.js | 2 +- client/cloudcmd.js | 2 +- client/key/vim/index.spec.js | 2 +- client/modules/view/types.js | 2 +- client/sw/sw.js | 2 +- common/cloudfunc.spec.js | 4 +- package.json | 3 +- server/cloudcmd.spec.js | 2 +- server/columns.js | 33 ++++++++----- server/columns.spec.js | 37 ++++++++++++++ server/config.js | 8 +-- server/distribute/export.spec.js | 2 +- server/distribute/import.spec.js | 2 +- server/env.spec.js | 2 +- server/exit.js | 2 +- server/exit.spec.js | 2 +- server/markdown/index.js | 4 +- server/markdown/index.spec.js | 6 +-- server/repl.js | 6 +-- server/rest/index.js | 6 +-- server/rest/info.js | 2 +- server/rest/info.spec.js | 2 +- server/route.js | 84 ++++++++++++++++---------------- server/route.spec.js | 6 +-- server/template.js | 2 +- server/user-menu.spec.js | 4 +- server/validate.js | 20 ++++---- server/validate.spec.js | 75 ++++++++++++++-------------- test/before.js | 6 +-- test/common/cloudfunc.js | 2 +- test/rest/copy.js | 4 +- test/rest/move.js | 2 +- test/rest/pack.js | 6 +-- test/rest/rename.js | 56 ++++++++++----------- test/server/columns.js | 33 ------------- test/server/console.js | 4 +- test/server/env.js | 2 +- test/server/modulas.js | 2 +- 41 files changed, 233 insertions(+), 215 deletions(-) create mode 100644 server/columns.spec.js delete mode 100644 test/server/columns.js diff --git a/.eslintrc.js b/.eslintrc.js index 330fc27f..9576e79c 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -10,6 +10,7 @@ module.exports = { ], rules: { 'key-spacing': 'off', + 'n/prefer-node-protocol': 'error', }, overrides: [{ files: ['bin/release.js'], diff --git a/.webpack/css.js b/.webpack/css.js index 8ec50444..dde07112 100644 --- a/.webpack/css.js +++ b/.webpack/css.js @@ -1,11 +1,11 @@ 'use strict'; -const fs = require('fs'); +const fs = require('node:fs'); const { basename, extname, join, -} = require('path'); +} = require('node:path'); const ExtractTextPlugin = require('extract-text-webpack-plugin'); const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); diff --git a/.webpack/js.js b/.webpack/js.js index 1353efdc..15e8f1fe 100644 --- a/.webpack/js.js +++ b/.webpack/js.js @@ -4,7 +4,7 @@ const { resolve, sep, join, -} = require('path'); +} = require('node:path'); const {EnvironmentPlugin} = require('webpack'); const WebpackBar = require('webpackbar'); diff --git a/client/client.js b/client/client.js index 3cbe344e..9038a758 100644 --- a/client/client.js +++ b/client/client.js @@ -1,6 +1,6 @@ 'use strict'; -const process = require('process'); +const process = require('node:process'); /* global DOM */ const Emitify = require('emitify'); diff --git a/client/cloudcmd.js b/client/cloudcmd.js index b3f4afd2..59ebfe4e 100644 --- a/client/cloudcmd.js +++ b/client/cloudcmd.js @@ -1,6 +1,6 @@ 'use strict'; -const process = require('process'); +const process = require('node:process'); require('../css/main.css'); require('../css/nojs.css'); require('../css/columns/name-size-date.css'); diff --git a/client/key/vim/index.spec.js b/client/key/vim/index.spec.js index db385959..245e21cc 100644 --- a/client/key/vim/index.spec.js +++ b/client/key/vim/index.spec.js @@ -1,6 +1,6 @@ 'use strict'; -const {join} = require('path'); +const {join} = require('node:path'); const {test, stub} = require('supertape'); const mockRequire = require('mock-require'); diff --git a/client/modules/view/types.js b/client/modules/view/types.js index c5f6c99c..0ea9aef9 100644 --- a/client/modules/view/types.js +++ b/client/modules/view/types.js @@ -1,6 +1,6 @@ 'use strict'; -const {extname} = require('path'); +const {extname} = require('node:path'); const currify = require('currify'); const testRegExp = currify((name, reg) => reg.test(name)); const getRegExp = (ext) => RegExp(`\\.${ext}$`, 'i'); diff --git a/client/sw/sw.js b/client/sw/sw.js index 58d27f7d..15f3e0ad 100644 --- a/client/sw/sw.js +++ b/client/sw/sw.js @@ -1,6 +1,6 @@ 'use strict'; -const process = require('process'); +const process = require('node:process'); const codegen = require('codegen.macro'); const tryToCatch = require('try-to-catch'); const currify = require('currify'); diff --git a/common/cloudfunc.spec.js b/common/cloudfunc.spec.js index 561838c1..b5aceb7b 100644 --- a/common/cloudfunc.spec.js +++ b/common/cloudfunc.spec.js @@ -1,7 +1,7 @@ 'use strict'; -const {join} = require('path'); -const {readFileSync} = require('fs'); +const {join} = require('node:path'); +const {readFileSync} = require('node:fs'); const test = require('supertape'); const montag = require('montag'); diff --git a/package.json b/package.json index 420dac17..9507a0b4 100644 --- a/package.json +++ b/package.json @@ -121,6 +121,7 @@ "just-snake-case": "^1.1.0", "markdown-it": "^14.0.0", "mellow": "^3.0.0", + "nano-memoize": "^3.0.16", "nomine": "^4.0.0", "object.omit": "^3.0.0", "once": "^1.4.0", @@ -171,7 +172,7 @@ "domtokenlist-shim": "^1.2.0", "emitify": "^4.0.1", "eslint": "^8.0.1", - "eslint-plugin-n": "^16.0.1", + "eslint-plugin-n": "^17.0.0-4", "eslint-plugin-putout": "^22.0.0", "extract-text-webpack-plugin": "^4.0.0-alpha.0", "gritty": "^8.0.0", diff --git a/server/cloudcmd.spec.js b/server/cloudcmd.spec.js index d44047cc..f5ef2624 100644 --- a/server/cloudcmd.spec.js +++ b/server/cloudcmd.spec.js @@ -1,6 +1,6 @@ 'use strict'; -const path = require('path'); +const path = require('node:path'); const {test, stub} = require('supertape'); const cloudcmd = require('./cloudcmd.js'); diff --git a/server/columns.js b/server/columns.js index fd01e6b8..7f236cb3 100644 --- a/server/columns.js +++ b/server/columns.js @@ -1,9 +1,13 @@ 'use strict'; +const fullstore = require('fullstore'); const process = require('process'); const path = require('path'); const fs = require('fs'); + +const {nanomemoize} = require('nano-memoize'); const readFilesSync = require('@cloudcmd/read-files-sync'); + const isMap = (a) => /\.map$/.test(a); const not = (fn) => (a) => !fn(a); @@ -12,19 +16,26 @@ const defaultColumns = { 'name-size-date-owner-mode': '', }; -const isDev = process.env.NODE_ENV === 'development'; +const _isDev = fullstore(process.env.NODE_ENV === 'development'); const getDist = (isDev) => isDev ? 'dist-dev' : 'dist'; -const dist = getDist(isDev); -const columnsDir = path.join(__dirname, '..', dist, 'columns'); +module.exports.isDev = _isDev; -const names = fs - .readdirSync(columnsDir) - .filter(not(isMap)); +module.exports.getColumns = ({isDev = _isDev()} = {}) => { + const columns = readFilesSyncMemo(isDev); -const columns = readFilesSync(columnsDir, names, 'utf8'); - -module.exports = { - ...columns, - ...defaultColumns, + return { + ...columns, + ...defaultColumns, + }; }; + +const readFilesSyncMemo = nanomemoize((isDev) => { + const dist = getDist(isDev); + const columnsDir = path.join(__dirname, '..', dist, 'columns'); + const names = fs + .readdirSync(columnsDir) + .filter(not(isMap)); + + return readFilesSync(columnsDir, names, 'utf8'); +}); diff --git a/server/columns.spec.js b/server/columns.spec.js new file mode 100644 index 00000000..53ab7c2b --- /dev/null +++ b/server/columns.spec.js @@ -0,0 +1,37 @@ +'use strict'; + +const test = require('supertape'); +const fs = require('fs'); +const {getColumns, isDev} = require('./columns'); + +test('columns: prod', (t) => { + const columns = getColumns({ + isDev: false, + }); + + t.equal(columns[''], ''); + t.end(); +}); + +test('columns: dev', (t) => { + const columns = getColumns({ + isDev: true, + }); + + const css = fs.readFileSync(`${__dirname}/../css/columns/name-size-date.css`, 'utf8'); + + t.equal(columns['name-size-date'], css); + t.end(); +}); + +test('columns: no args', (t) => { + const currentIsDev = isDev(); + isDev(true); + const columns = getColumns(); + + const css = fs.readFileSync(`${__dirname}/../css/columns/name-size-date.css`, 'utf8'); + isDev(currentIsDev); + + t.equal(columns['name-size-date'], css); + t.end(); +}); diff --git a/server/config.js b/server/config.js index af0a514b..e16b2ea3 100644 --- a/server/config.js +++ b/server/config.js @@ -2,11 +2,11 @@ const DIR_SERVER = `${__dirname}/`; const DIR_COMMON = '../common/'; -const path = require('path'); +const path = require('node:path'); -const fs = require('fs'); -const Emitter = require('events'); -const {homedir} = require('os'); +const fs = require('node:fs'); +const Emitter = require('node:events'); +const {homedir} = require('node:os'); const exit = require(`${DIR_SERVER}exit`); const CloudFunc = require(`${DIR_COMMON}cloudfunc`); diff --git a/server/distribute/export.spec.js b/server/distribute/export.spec.js index df1f6911..e7806b37 100644 --- a/server/distribute/export.spec.js +++ b/server/distribute/export.spec.js @@ -1,6 +1,6 @@ 'use strict'; -const {once} = require('events'); +const {once} = require('node:events'); const test = require('supertape'); const io = require('socket.io-client'); diff --git a/server/distribute/import.spec.js b/server/distribute/import.spec.js index c171bf07..13e1979b 100644 --- a/server/distribute/import.spec.js +++ b/server/distribute/import.spec.js @@ -1,6 +1,6 @@ 'use strict'; -const process = require('process'); +const process = require('node:process'); const test = require('supertape'); const {promisify} = require('util'); const tryToCatch = require('try-to-catch'); diff --git a/server/env.spec.js b/server/env.spec.js index e29c937b..36843cb2 100644 --- a/server/env.spec.js +++ b/server/env.spec.js @@ -1,6 +1,6 @@ 'use strict'; -const process = require('process'); +const process = require('node:process'); const test = require('supertape'); const env = require('./env'); diff --git a/server/exit.js b/server/exit.js index 7c02d35b..e7dabfb9 100644 --- a/server/exit.js +++ b/server/exit.js @@ -1,6 +1,6 @@ 'use strict'; -const process = require('process'); +const process = require('node:process'); const getMessage = (a) => a?.message || a; module.exports = (...args) => { diff --git a/server/exit.spec.js b/server/exit.spec.js index 5208c147..db081e0e 100644 --- a/server/exit.spec.js +++ b/server/exit.spec.js @@ -1,6 +1,6 @@ 'use strict'; -const process = require('process'); +const process = require('node:process'); const {test, stub} = require('supertape'); const exit = require('./exit'); diff --git a/server/markdown/index.js b/server/markdown/index.js index 856cb677..cb6096ac 100644 --- a/server/markdown/index.js +++ b/server/markdown/index.js @@ -1,7 +1,7 @@ 'use strict'; -const {join} = require('path'); -const {callbackify} = require('util'); +const {join} = require('node:path'); +const {callbackify} = require('node:util'); const pullout = require('pullout'); const ponse = require('ponse'); diff --git a/server/markdown/index.spec.js b/server/markdown/index.spec.js index 31817ec3..f6700b0a 100644 --- a/server/markdown/index.spec.js +++ b/server/markdown/index.spec.js @@ -1,8 +1,8 @@ 'use strict'; -const fs = require('fs'); -const {join} = require('path'); -const {promisify} = require('util'); +const fs = require('node:fs'); +const {join} = require('node:path'); +const {promisify} = require('node:util'); const tryToCatch = require('try-to-catch'); const serveOnce = require('serve-once'); diff --git a/server/repl.js b/server/repl.js index 469a3d93..04d415e4 100644 --- a/server/repl.js +++ b/server/repl.js @@ -1,8 +1,8 @@ 'use strict'; -const process = require('process'); -const net = require('net'); -const repl = require('repl'); +const process = require('node:process'); +const net = require('node:net'); +const repl = require('node:repl'); module.exports = net .createServer((socket) => { diff --git a/server/rest/index.js b/server/rest/index.js index 65ccd628..72660309 100644 --- a/server/rest/index.js +++ b/server/rest/index.js @@ -1,11 +1,11 @@ 'use strict'; -const process = require('process'); +const process = require('node:process'); const DIR = '../'; const DIR_COMMON = `${DIR}../common/`; -const path = require('path'); -const fs = require('fs'); +const path = require('node:path'); +const fs = require('node:fs'); const root = require(`${DIR}root`); const CloudFunc = require(`${DIR_COMMON}cloudfunc`); diff --git a/server/rest/info.js b/server/rest/info.js index 0a7e9f52..6b4fb2ec 100644 --- a/server/rest/info.js +++ b/server/rest/info.js @@ -1,6 +1,6 @@ 'use strict'; -const process = require('process'); +const process = require('node:process'); const format = require('format-io'); const {version} = require('../../package'); diff --git a/server/rest/info.spec.js b/server/rest/info.spec.js index 0d778ac7..7f3a6935 100644 --- a/server/rest/info.spec.js +++ b/server/rest/info.spec.js @@ -1,6 +1,6 @@ 'use strict'; -const process = require('process'); +const process = require('node:process'); const {test, stub} = require('supertape'); const info = require('./info'); diff --git a/server/route.js b/server/route.js index 5c113db5..b9f03dc0 100644 --- a/server/route.js +++ b/server/route.js @@ -1,9 +1,6 @@ 'use strict'; -const DIR_SERVER = './'; -const DIR_COMMON = '../common/'; - -const {extname} = require('path'); +const {extname} = require('node:path'); const {read} = require('win32'); const ponse = require('ponse'); @@ -16,12 +13,13 @@ const once = require('once'); const pipe = require('pipe-io'); const {contentType} = require('mime-types'); -const root = require(`${DIR_SERVER}root`); -const prefixer = require(`${DIR_SERVER}prefixer`); -const CloudFunc = require(`${DIR_COMMON}cloudfunc`); -const Columns = require(`${DIR_SERVER}/columns`); -const Template = require(`${DIR_SERVER}/template`); +const root = require(`./root`); +const prefixer = require(`./prefixer`); +const CloudFunc = require(`../common/cloudfunc`); +const {getColumns} = require(`./columns`); +const Template = require(`./template`); +const {stringify} = JSON; const {FS} = CloudFunc; const sendIndex = (params, data) => { @@ -29,7 +27,7 @@ const sendIndex = (params, data) => { ...params, name: 'index.html', }; - + ponse.send(data, ponseParams); }; @@ -39,9 +37,9 @@ const getPrefix = (config) => prefixer(config('prefix')); const getReadDir = (config) => { if (!config('dropbox')) return read; - + const {readDir} = onceRequire('@cloudcmd/dropbox'); - + return wraptile(readDir, config('dropboxToken')); }; @@ -51,10 +49,10 @@ const getReadDir = (config) => { module.exports = currify((config, options, request, response, next) => { const name = ponse.getPathName(request); const isFS = RegExp(`^/$|^${FS}`).test(name); - + if (!isFS) return next(); - + route({ config, options, @@ -74,36 +72,36 @@ async function route({config, options, request, response}) { gzip, name, }; - + config('prefix', prefixer(request.baseUrl)); - + const rootName = name.replace(CloudFunc.FS, '') || '/'; const fullPath = root(rootName, config('root')); - + const read = getReadDir(config); const [error, stream] = await tryToCatch(read, fullPath, { root: config('root'), }); - + const {html} = options; - + if (error) return ponse.sendError(error, p); - + if (stream.type === 'directory') { const {files} = stream; - + return sendIndex(p, buildIndex(config, html, { files, path: format.addSlashToEnd(rootName), })); } - + const {contentLength} = stream; - + response.setHeader('Content-Length', contentLength); response.setHeader('Content-Type', contentType(extname(fullPath))); - + await pipe([stream, response]); } @@ -118,56 +116,56 @@ function indexProcessing(config, options) { const noConsole = !config('console'); const noTerminal = !config('terminal'); const {panel} = options; - + let {data} = options; - + if (noKeysPanel) data = hideKeysPanel(data); - + if (oneFilePanel) data = data .replace('icon-move', 'icon-move none') .replace('icon-copy', 'icon-copy none'); - + if (noContact) data = data.replace('icon-contact', 'icon-contact none'); - + if (noConfig) data = data.replace('icon-config', 'icon-config none'); - + if (noConsole) data = data.replace('icon-console', 'icon-console none'); - + if (noTerminal) data = data.replace('icon-terminal', 'icon-terminal none'); - + const left = rendy(Template.panel, { side: 'left', content: panel, className: !oneFilePanel ? '' : 'panel-single', }); - + let right = ''; - + if (!oneFilePanel) right = rendy(Template.panel, { side: 'right', content: panel, className: '', }); - + const name = config('name'); - + data = rendy(data, { title: CloudFunc.getTitle({ name, }), fm: left + right, prefix: getPrefix(config), - config: JSON.stringify(config('*')), - columns: Columns[config('columns')], + config: stringify(config('*')), + columns: getColumns()[config('columns')], }); - + return data; } @@ -177,7 +175,7 @@ function buildIndex(config, html, data) { prefix: getPrefix(config), template: Template, }); - + return indexProcessing(config, { panel, data: html, @@ -188,14 +186,14 @@ module.exports._hideKeysPanel = hideKeysPanel; function hideKeysPanel(html) { const keysPanel = '
typeof a === 'string'; module.exports.root = (dir, config) => { if (!isString(dir)) throw Error('dir should be a string'); - + if (dir === '/') return; - + if (config('dropbox')) return; - + const {statSync} = require('fs'); const [error] = tryCatch(statSync, dir); - + if (error) return exit('cloudcmd --root: %s', error.message); }; module.exports.editor = (name) => { const reg = /^(dword|edward|deepword)$/; - + if (!reg.test(name)) exit('cloudcmd --editor: could be "dword", "edward" or "deepword" only'); }; module.exports.packer = (name) => { const reg = /^(tar|zip)$/; - + if (!reg.test(name)) exit('cloudcmd --packer: could be "tar" or "zip" only'); }; @@ -40,14 +40,14 @@ module.exports.packer = (name) => { module.exports.columns = (type) => { const addQuotes = (a) => `"${a}"`; const all = Object - .keys(columns) + .keys(getColumns()) .concat(''); - + const names = all .filter(Boolean) .map(addQuotes) .join(', '); - + if (!all.includes(type)) exit(`cloudcmd --columns: can be only one of: ${names}`); }; diff --git a/server/validate.spec.js b/server/validate.spec.js index 64ebb922..c41e2e61 100644 --- a/server/validate.spec.js +++ b/server/validate.spec.js @@ -1,6 +1,6 @@ 'use strict'; -const fs = require('fs'); +const fs = require('node:fs'); const {test, stub} = require('supertape'); @@ -22,20 +22,20 @@ test('validate: root: bad', (t) => { const config = { root: Math.random(), }; - + const [e] = tryCatch(cloudcmd, { config, }); - + t.equal(e.message, 'dir should be a string', 'should throw'); t.end(); }); test('validate: root: config', (t) => { const config = stub().returns(true); - + validate.root('/hello', config); - + t.calledWith(config, ['dropbox'], 'should call config'); t.end(); }); @@ -43,7 +43,7 @@ test('validate: root: config', (t) => { test('validate: root: /', (t) => { const fn = stub(); validate.root('/', fn); - + t.notCalled(fn, 'should not call fn'); t.end(); }); @@ -51,57 +51,57 @@ test('validate: root: /', (t) => { test('validate: root: stat', (t) => { const fn = stub(); const {statSync} = fs; - + const error = 'ENOENT'; - + fs.statSync = () => { throw Error(error); }; - + mockRequire(exitPath, fn); - + const {root} = reRequire(validatePath); - + root('hello', fn); - + const msg = 'cloudcmd --root: %s'; - + fs.statSync = statSync; - + stopAll(); - + t.calledWith(fn, [msg, error], 'should call fn'); t.end(); }); test('validate: packer: not valid', (t) => { const fn = stub(); - + mockRequire(exitPath, fn); - + const {packer} = reRequire(validatePath); const msg = 'cloudcmd --packer: could be "tar" or "zip" only'; - + packer('hello'); - + stopAll(); - + t.calledWith(fn, [msg], 'should call fn'); t.end(); }); test('validate: editor: not valid', (t) => { const fn = stub(); - + mockRequire(exitPath, fn); - + const {editor} = reRequire(validatePath); const msg = 'cloudcmd --editor: could be "dword", "edward" or "deepword" only'; - + editor('hello'); - + stopAll(); - + t.calledWith(fn, [msg], 'should call fn'); t.end(); }); @@ -109,33 +109,36 @@ test('validate: editor: not valid', (t) => { test('validate: columns', (t) => { const fn = stub(); mockRequire(exitPath, fn); - + const {columns} = require(validatePath); - + columns('name-size-date'); - + stopAll(); - + t.notCalled(fn, 'should not call exit'); t.end(); }); test('validate: columns: wrong', (t) => { const fn = stub(); - - mockRequire(exitPath, fn); - mockRequire(columnsPath, { + const getColumns = stub().returns({ 'name-size-date': '', 'name-size': '', }); - + + mockRequire(exitPath, fn); + mockRequire(columnsPath, { + getColumns, + }); + const {columns} = reRequire(validatePath); const msg = 'cloudcmd --columns: can be only one of: "name-size-date", "name-size"'; - + columns('hello'); - + stopAll(); - + t.calledWith(fn, [msg], 'should call exit'); t.end(); }); diff --git a/test/before.js b/test/before.js index e3e1deff..fd9045b7 100644 --- a/test/before.js +++ b/test/before.js @@ -1,8 +1,8 @@ 'use strict'; -const process = require('process'); -const http = require('http'); -const os = require('os'); +const process = require('node:process'); +const http = require('node:http'); +const os = require('node:os'); const express = require('express'); const io = require('socket.io'); diff --git a/test/common/cloudfunc.js b/test/common/cloudfunc.js index f1365ee3..ee942b59 100644 --- a/test/common/cloudfunc.js +++ b/test/common/cloudfunc.js @@ -1,6 +1,6 @@ 'use strict'; -const fs = require('fs'); +const fs = require('node:fs'); const tryCatch = require('try-catch'); const DIR = `${__dirname}/../../`; diff --git a/test/rest/copy.js b/test/rest/copy.js index 424e9164..cb5ce337 100644 --- a/test/rest/copy.js +++ b/test/rest/copy.js @@ -1,7 +1,7 @@ 'use strict'; -const {mkdirSync} = require('fs'); -const {join} = require('path'); +const {mkdirSync} = require('node:fs'); +const {join} = require('node:path'); const test = require('supertape'); const rimraf = require('rimraf'); diff --git a/test/rest/move.js b/test/rest/move.js index 2f1a01b7..769546fe 100644 --- a/test/rest/move.js +++ b/test/rest/move.js @@ -1,6 +1,6 @@ 'use strict'; -const fs = require('fs'); +const fs = require('node:fs'); const test = require('supertape'); const {Volume} = require('memfs'); diff --git a/test/rest/pack.js b/test/rest/pack.js index 3c083a5d..7c413ed1 100644 --- a/test/rest/pack.js +++ b/test/rest/pack.js @@ -1,8 +1,8 @@ 'use strict'; -const fs = require('fs'); -const {join} = require('path'); -const {promisify} = require('util'); +const fs = require('node:fs'); +const {join} = require('node:path'); +const {promisify} = require('node:util'); const {reRequire} = require('mock-require'); const test = require('supertape'); diff --git a/test/rest/rename.js b/test/rest/rename.js index bd5cec32..4fac2f2c 100644 --- a/test/rest/rename.js +++ b/test/rest/rename.js @@ -1,6 +1,6 @@ 'use strict'; -const fs = require('fs'); +const fs = require('node:fs'); const test = require('supertape'); const {Volume} = require('memfs'); @@ -19,45 +19,45 @@ test('cloudcmd: rest: rename', async (t) => { '/fixture/mv.txt': 'hello', '/fixture/tmp/a.txt': 'a', }; - + const vol = Volume.fromJSON(volume, '/'); - + const unionFS = ufs .use(vol) .use(fs); - - mockRequire('fs', unionFS); - + + mockRequire('node:fs', unionFS); + reRequire('@cloudcmd/rename-files'); reRequire('@cloudcmd/move-files'); reRequire(restPath); - + const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; const configManager = createConfigManager(); - + configManager('auth', false); configManager('root', '/'); - + const {request} = serveOnce(cloudcmd, { configManager, }); - + const files = { from: '/fixture/mv.txt', to: '/fixture/tmp/mv.txt', }; - + const {body} = await request.put(`/api/v1/rename`, { body: files, }); - - mockRequire.stop('fs'); - + + mockRequire.stopAll(); + const expected = 'rename: ok("{"from":"/fixture/mv.txt","to":"/fixture/tmp/mv.txt"}")'; - + stopAll(); - + t.equal(body, expected, 'should move'); t.end(); }); @@ -65,23 +65,23 @@ test('cloudcmd: rest: rename', async (t) => { test('cloudcmd: rest: rename: no from', async (t) => { const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; - + const configManager = createConfigManager(); configManager('auth', false); configManager('root', '/'); - + const {request} = serveOnce(cloudcmd, { configManager, }); - + const files = {}; - + const {body} = await request.put(`/api/v1/rename`, { body: files, }); - + const expected = '"from" should be filled'; - + t.equal(body, expected); t.end(); }); @@ -89,25 +89,25 @@ test('cloudcmd: rest: rename: no from', async (t) => { test('cloudcmd: rest: rename: no to', async (t) => { const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; - + const configManager = createConfigManager(); configManager('auth', false); configManager('root', '/'); - + const {request} = serveOnce(cloudcmd, { configManager, }); - + const files = { from: '/', }; - + const {body} = await request.put(`/api/v1/rename`, { body: files, }); - + const expected = '"to" should be filled'; - + t.equal(body, expected); t.end(); }); diff --git a/test/server/columns.js b/test/server/columns.js deleted file mode 100644 index 9e409ffb..00000000 --- a/test/server/columns.js +++ /dev/null @@ -1,33 +0,0 @@ -'use strict'; - -const process = require('process'); -const test = require('supertape'); -const fs = require('fs'); -const {reRequire} = require('mock-require'); -const columnsPath = '../../server/columns'; - -test('columns: prod', (t) => { - const {NODE_ENV} = process.env; - - process.env.NODE_ENV = ''; - const columns = reRequire(columnsPath); - - process.env.NODE_ENV = NODE_ENV; - - t.equal(columns[''], ''); - t.end(); -}); - -test('columns: dev', (t) => { - const {NODE_ENV} = process.env; - - process.env.NODE_ENV = 'development'; - - const columns = reRequire(columnsPath); - const css = fs.readFileSync(`${__dirname}/../../css/columns/name-size-date.css`, 'utf8'); - - process.env.NODE_ENV = NODE_ENV; - - t.equal(columns['name-size-date'], css); - t.end(); -}); diff --git a/test/server/console.js b/test/server/console.js index c0e9ce58..49b3cb1e 100644 --- a/test/server/console.js +++ b/test/server/console.js @@ -1,7 +1,7 @@ 'use strict'; -const path = require('path'); -const {once} = require('events'); +const path = require('node:path'); +const {once} = require('node:events'); const test = require('supertape'); const io = require('socket.io-client'); diff --git a/test/server/env.js b/test/server/env.js index fa9c421d..d794f945 100644 --- a/test/server/env.js +++ b/test/server/env.js @@ -1,6 +1,6 @@ 'use strict'; -const process = require('process'); +const process = require('node:process'); const test = require('supertape'); const env = require('../../server/env'); diff --git a/test/server/modulas.js b/test/server/modulas.js index a511c874..3e724c14 100644 --- a/test/server/modulas.js +++ b/test/server/modulas.js @@ -1,6 +1,6 @@ 'use strict'; -const {join} = require('path'); +const {join} = require('node:path'); const {test, stub} = require('supertape'); const cloudcmdPath = join(__dirname, '..', '..'); From 95c36b0a37bbbdce3c91b723d4ad152324e555fd Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 20 Mar 2024 12:30:40 +0200 Subject: [PATCH 049/415] chore: lint --- .webpack/css.js | 2 +- .webpack/html.js | 2 +- .webpack/js.js | 21 +++------- common/callbackify.spec.js | 2 +- server/cloudcmd.js | 6 +-- server/columns.js | 10 ++--- server/columns.spec.js | 12 +++--- server/distribute/import.spec.js | 2 +- server/env.js | 2 +- server/route.js | 64 +++++++++++++++---------------- server/user-menu.js | 6 +-- server/validate.js | 18 ++++----- server/validate.spec.js | 66 ++++++++++++++++---------------- test/before.js | 2 +- test/rest/rename.js | 50 ++++++++++++------------ 15 files changed, 127 insertions(+), 138 deletions(-) diff --git a/.webpack/css.js b/.webpack/css.js index dde07112..773a3da2 100644 --- a/.webpack/css.js +++ b/.webpack/css.js @@ -10,7 +10,7 @@ const { const ExtractTextPlugin = require('extract-text-webpack-plugin'); const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); -const {env} = require('process'); +const {env} = require('node:process'); const isDev = env.NODE_ENV === 'development'; const extractCSS = (a) => new ExtractTextPlugin(`${a}.css`); diff --git a/.webpack/html.js b/.webpack/html.js index ef17b4f6..2bb2b98c 100644 --- a/.webpack/html.js +++ b/.webpack/html.js @@ -1,7 +1,7 @@ 'use strict'; const HtmlWebpackPlugin = require('html-webpack-plugin'); -const {env} = require('process'); +const {env} = require('node:process'); const isDev = env.NODE_ENV === 'development'; diff --git a/.webpack/js.js b/.webpack/js.js index 15e8f1fe..cc5f4632 100644 --- a/.webpack/js.js +++ b/.webpack/js.js @@ -11,7 +11,7 @@ const WebpackBar = require('webpackbar'); const ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin'); -const {env} = require('process'); +const {env} = require('node:process'); const modules = './modules'; const dirModules = './client/modules'; const dir = './client'; @@ -27,8 +27,6 @@ const notEmpty = (a) => a; const clean = (array) => array.filter(notEmpty); const noParse = (a) => /\.spec\.js$/.test(a); -const convertToWebpack5Externals = (fn) => (context, request, cb) => fn({context, request}, cb); - const options = { babelrc: true, }; @@ -66,6 +64,10 @@ const splitChunks = { module.exports = { resolve: { symlinks: false, + alias: { + 'node:process': 'process', + 'node:path': 'path', + }, }, devtool, optimization: { @@ -101,7 +103,6 @@ module.exports = { devtoolModuleFilenameTemplate, publicPath: '/dist/', }, - externals: [convertToWebpack5Externals(externals)], module: { rules, noParse, @@ -113,18 +114,6 @@ module.exports = { }, }; -function externals({request}, fn) { - if (!isDev) - return fn(); - - const list = []; - - if (list.includes(request)) - return fn(null, request); - - fn(); -} - function devtoolModuleFilenameTemplate(info) { const resource = info.absoluteResourcePath.replace(rootDir + sep, ''); return `file://cloudcmd/${resource}`; diff --git a/common/callbackify.spec.js b/common/callbackify.spec.js index b5823293..56d557f9 100644 --- a/common/callbackify.spec.js +++ b/common/callbackify.spec.js @@ -5,7 +5,7 @@ const tryToCatch = require('try-to-catch'); const {test, stub} = require('supertape'); const callbackify = require('./callbackify'); -const {promisify} = require('util'); +const {promisify} = require('node:util'); test('cloudcmd: common: callbackify: error', async (t) => { const promise = stub().rejects(Error('hello')); diff --git a/server/cloudcmd.js b/server/cloudcmd.js index 382a6780..0a88be9f 100644 --- a/server/cloudcmd.js +++ b/server/cloudcmd.js @@ -1,12 +1,12 @@ 'use strict'; const fullstore = require('fullstore'); -const process = require('process'); +const process = require('node:process'); const DIR = `${__dirname}/`; const DIR_COMMON = `${DIR}../common/`; -const path = require('path'); +const path = require('node:path'); -const fs = require('fs'); +const fs = require('node:fs'); const cloudfunc = require(`${DIR_COMMON}cloudfunc`); const authentication = require(`${DIR}auth`); diff --git a/server/columns.js b/server/columns.js index 7f236cb3..8cd91114 100644 --- a/server/columns.js +++ b/server/columns.js @@ -1,9 +1,9 @@ 'use strict'; const fullstore = require('fullstore'); -const process = require('process'); -const path = require('path'); -const fs = require('fs'); +const process = require('node:process'); +const path = require('node:path'); +const fs = require('node:fs'); const {nanomemoize} = require('nano-memoize'); const readFilesSync = require('@cloudcmd/read-files-sync'); @@ -23,7 +23,7 @@ module.exports.isDev = _isDev; module.exports.getColumns = ({isDev = _isDev()} = {}) => { const columns = readFilesSyncMemo(isDev); - + return { ...columns, ...defaultColumns, @@ -36,6 +36,6 @@ const readFilesSyncMemo = nanomemoize((isDev) => { const names = fs .readdirSync(columnsDir) .filter(not(isMap)); - + return readFilesSync(columnsDir, names, 'utf8'); }); diff --git a/server/columns.spec.js b/server/columns.spec.js index 53ab7c2b..cdf7a6ab 100644 --- a/server/columns.spec.js +++ b/server/columns.spec.js @@ -1,14 +1,14 @@ 'use strict'; const test = require('supertape'); -const fs = require('fs'); +const fs = require('node:fs'); const {getColumns, isDev} = require('./columns'); test('columns: prod', (t) => { const columns = getColumns({ isDev: false, }); - + t.equal(columns[''], ''); t.end(); }); @@ -17,9 +17,9 @@ test('columns: dev', (t) => { const columns = getColumns({ isDev: true, }); - + const css = fs.readFileSync(`${__dirname}/../css/columns/name-size-date.css`, 'utf8'); - + t.equal(columns['name-size-date'], css); t.end(); }); @@ -28,10 +28,10 @@ test('columns: no args', (t) => { const currentIsDev = isDev(); isDev(true); const columns = getColumns(); - + const css = fs.readFileSync(`${__dirname}/../css/columns/name-size-date.css`, 'utf8'); isDev(currentIsDev); - + t.equal(columns['name-size-date'], css); t.end(); }); diff --git a/server/distribute/import.spec.js b/server/distribute/import.spec.js index 13e1979b..3323b530 100644 --- a/server/distribute/import.spec.js +++ b/server/distribute/import.spec.js @@ -2,7 +2,7 @@ const process = require('node:process'); const test = require('supertape'); -const {promisify} = require('util'); +const {promisify} = require('node:util'); const tryToCatch = require('try-to-catch'); const {connect} = require('../../test/before'); diff --git a/server/env.js b/server/env.js index 0d365ac8..62c31b57 100644 --- a/server/env.js +++ b/server/env.js @@ -2,7 +2,7 @@ const snake = require('just-snake-case'); -const {env} = require('process'); +const {env} = require('node:process'); const up = (a) => a.toUpperCase(); module.exports = parse; diff --git a/server/route.js b/server/route.js index b9f03dc0..3acc63d4 100644 --- a/server/route.js +++ b/server/route.js @@ -27,7 +27,7 @@ const sendIndex = (params, data) => { ...params, name: 'index.html', }; - + ponse.send(data, ponseParams); }; @@ -37,9 +37,9 @@ const getPrefix = (config) => prefixer(config('prefix')); const getReadDir = (config) => { if (!config('dropbox')) return read; - + const {readDir} = onceRequire('@cloudcmd/dropbox'); - + return wraptile(readDir, config('dropboxToken')); }; @@ -49,10 +49,10 @@ const getReadDir = (config) => { module.exports = currify((config, options, request, response, next) => { const name = ponse.getPathName(request); const isFS = RegExp(`^/$|^${FS}`).test(name); - + if (!isFS) return next(); - + route({ config, options, @@ -72,36 +72,36 @@ async function route({config, options, request, response}) { gzip, name, }; - + config('prefix', prefixer(request.baseUrl)); - + const rootName = name.replace(CloudFunc.FS, '') || '/'; const fullPath = root(rootName, config('root')); - + const read = getReadDir(config); const [error, stream] = await tryToCatch(read, fullPath, { root: config('root'), }); - + const {html} = options; - + if (error) return ponse.sendError(error, p); - + if (stream.type === 'directory') { const {files} = stream; - + return sendIndex(p, buildIndex(config, html, { files, path: format.addSlashToEnd(rootName), })); } - + const {contentLength} = stream; - + response.setHeader('Content-Length', contentLength); response.setHeader('Content-Type', contentType(extname(fullPath))); - + await pipe([stream, response]); } @@ -116,46 +116,46 @@ function indexProcessing(config, options) { const noConsole = !config('console'); const noTerminal = !config('terminal'); const {panel} = options; - + let {data} = options; - + if (noKeysPanel) data = hideKeysPanel(data); - + if (oneFilePanel) data = data .replace('icon-move', 'icon-move none') .replace('icon-copy', 'icon-copy none'); - + if (noContact) data = data.replace('icon-contact', 'icon-contact none'); - + if (noConfig) data = data.replace('icon-config', 'icon-config none'); - + if (noConsole) data = data.replace('icon-console', 'icon-console none'); - + if (noTerminal) data = data.replace('icon-terminal', 'icon-terminal none'); - + const left = rendy(Template.panel, { side: 'left', content: panel, className: !oneFilePanel ? '' : 'panel-single', }); - + let right = ''; - + if (!oneFilePanel) right = rendy(Template.panel, { side: 'right', content: panel, className: '', }); - + const name = config('name'); - + data = rendy(data, { title: CloudFunc.getTitle({ name, @@ -165,7 +165,7 @@ function indexProcessing(config, options) { config: stringify(config('*')), columns: getColumns()[config('columns')], }); - + return data; } @@ -175,7 +175,7 @@ function buildIndex(config, html, data) { prefix: getPrefix(config), template: Template, }); - + return indexProcessing(config, { panel, data: html, @@ -186,14 +186,14 @@ module.exports._hideKeysPanel = hideKeysPanel; function hideKeysPanel(html) { const keysPanel = '
typeof a === 'string'; module.exports.root = (dir, config) => { if (!isString(dir)) throw Error('dir should be a string'); - + if (dir === '/') return; - + if (config('dropbox')) return; - - const {statSync} = require('fs'); + + const {statSync} = require('node:fs'); const [error] = tryCatch(statSync, dir); - + if (error) return exit('cloudcmd --root: %s', error.message); }; module.exports.editor = (name) => { const reg = /^(dword|edward|deepword)$/; - + if (!reg.test(name)) exit('cloudcmd --editor: could be "dword", "edward" or "deepword" only'); }; module.exports.packer = (name) => { const reg = /^(tar|zip)$/; - + if (!reg.test(name)) exit('cloudcmd --packer: could be "tar" or "zip" only'); }; @@ -42,12 +42,12 @@ module.exports.columns = (type) => { const all = Object .keys(getColumns()) .concat(''); - + const names = all .filter(Boolean) .map(addQuotes) .join(', '); - + if (!all.includes(type)) exit(`cloudcmd --columns: can be only one of: ${names}`); }; diff --git a/server/validate.spec.js b/server/validate.spec.js index c41e2e61..b9bfa727 100644 --- a/server/validate.spec.js +++ b/server/validate.spec.js @@ -22,20 +22,20 @@ test('validate: root: bad', (t) => { const config = { root: Math.random(), }; - + const [e] = tryCatch(cloudcmd, { config, }); - + t.equal(e.message, 'dir should be a string', 'should throw'); t.end(); }); test('validate: root: config', (t) => { const config = stub().returns(true); - + validate.root('/hello', config); - + t.calledWith(config, ['dropbox'], 'should call config'); t.end(); }); @@ -43,7 +43,7 @@ test('validate: root: config', (t) => { test('validate: root: /', (t) => { const fn = stub(); validate.root('/', fn); - + t.notCalled(fn, 'should not call fn'); t.end(); }); @@ -51,57 +51,57 @@ test('validate: root: /', (t) => { test('validate: root: stat', (t) => { const fn = stub(); const {statSync} = fs; - + const error = 'ENOENT'; - + fs.statSync = () => { throw Error(error); }; - + mockRequire(exitPath, fn); - + const {root} = reRequire(validatePath); - + root('hello', fn); - + const msg = 'cloudcmd --root: %s'; - + fs.statSync = statSync; - + stopAll(); - + t.calledWith(fn, [msg, error], 'should call fn'); t.end(); }); test('validate: packer: not valid', (t) => { const fn = stub(); - + mockRequire(exitPath, fn); - + const {packer} = reRequire(validatePath); const msg = 'cloudcmd --packer: could be "tar" or "zip" only'; - + packer('hello'); - + stopAll(); - + t.calledWith(fn, [msg], 'should call fn'); t.end(); }); test('validate: editor: not valid', (t) => { const fn = stub(); - + mockRequire(exitPath, fn); - + const {editor} = reRequire(validatePath); const msg = 'cloudcmd --editor: could be "dword", "edward" or "deepword" only'; - + editor('hello'); - + stopAll(); - + t.calledWith(fn, [msg], 'should call fn'); t.end(); }); @@ -109,13 +109,13 @@ test('validate: editor: not valid', (t) => { test('validate: columns', (t) => { const fn = stub(); mockRequire(exitPath, fn); - + const {columns} = require(validatePath); - + columns('name-size-date'); - + stopAll(); - + t.notCalled(fn, 'should not call exit'); t.end(); }); @@ -126,19 +126,19 @@ test('validate: columns: wrong', (t) => { 'name-size-date': '', 'name-size': '', }); - + mockRequire(exitPath, fn); mockRequire(columnsPath, { getColumns, }); - + const {columns} = reRequire(validatePath); const msg = 'cloudcmd --columns: can be only one of: "name-size-date", "name-size"'; - + columns('hello'); - + stopAll(); - + t.calledWith(fn, [msg], 'should call exit'); t.end(); }); diff --git a/test/before.js b/test/before.js index fd9045b7..d413cd29 100644 --- a/test/before.js +++ b/test/before.js @@ -8,7 +8,7 @@ const express = require('express'); const io = require('socket.io'); const writejson = require('writejson'); const readjson = require('readjson'); -const {promisify} = require('util'); +const {promisify} = require('node:util'); process.env.NODE_ENV = 'development'; diff --git a/test/rest/rename.js b/test/rest/rename.js index 4fac2f2c..f0b6316b 100644 --- a/test/rest/rename.js +++ b/test/rest/rename.js @@ -19,45 +19,45 @@ test('cloudcmd: rest: rename', async (t) => { '/fixture/mv.txt': 'hello', '/fixture/tmp/a.txt': 'a', }; - + const vol = Volume.fromJSON(volume, '/'); - + const unionFS = ufs .use(vol) .use(fs); - + mockRequire('node:fs', unionFS); - + reRequire('@cloudcmd/rename-files'); reRequire('@cloudcmd/move-files'); reRequire(restPath); - + const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; const configManager = createConfigManager(); - + configManager('auth', false); configManager('root', '/'); - + const {request} = serveOnce(cloudcmd, { configManager, }); - + const files = { from: '/fixture/mv.txt', to: '/fixture/tmp/mv.txt', }; - + const {body} = await request.put(`/api/v1/rename`, { body: files, }); - + mockRequire.stopAll(); - + const expected = 'rename: ok("{"from":"/fixture/mv.txt","to":"/fixture/tmp/mv.txt"}")'; - + stopAll(); - + t.equal(body, expected, 'should move'); t.end(); }); @@ -65,23 +65,23 @@ test('cloudcmd: rest: rename', async (t) => { test('cloudcmd: rest: rename: no from', async (t) => { const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; - + const configManager = createConfigManager(); configManager('auth', false); configManager('root', '/'); - + const {request} = serveOnce(cloudcmd, { configManager, }); - + const files = {}; - + const {body} = await request.put(`/api/v1/rename`, { body: files, }); - + const expected = '"from" should be filled'; - + t.equal(body, expected); t.end(); }); @@ -89,25 +89,25 @@ test('cloudcmd: rest: rename: no from', async (t) => { test('cloudcmd: rest: rename: no to', async (t) => { const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; - + const configManager = createConfigManager(); configManager('auth', false); configManager('root', '/'); - + const {request} = serveOnce(cloudcmd, { configManager, }); - + const files = { from: '/', }; - + const {body} = await request.put(`/api/v1/rename`, { body: files, }); - + const expected = '"to" should be filled'; - + t.equal(body, expected); t.end(); }); From 043ba29b32301f50be8e21903debc17b2048d40f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 20 Mar 2024 13:13:28 +0200 Subject: [PATCH 050/415] chore: cloudcmd: v17.1.4 --- ChangeLog | 5 +++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1dd375a3..475e1fcb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.03.20, v17.1.4 + +feature: +- 98d3a4cc server: columns: get rid of mock-require + 2024.03.18, v17.1.3 feature: diff --git a/HELP.md b/HELP.md index 5b74d16c..3985e114 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.3 +# Cloud Commander v17.1.4 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.20*, **[v17.1.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.4)** - *2024.03.18*, **[v17.1.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.3)** - *2024.03.18*, **[v17.1.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.2)** - *2024.03.16*, **[v17.1.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.1)** diff --git a/README.md b/README.md index 804d0e68..2a969500 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.3 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.1.4 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 9507a0b4..50bb3737 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.1.3", + "version": "17.1.4", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From bf90bf2295e29393e07a45143c29af0425ede58f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 20 Mar 2024 13:25:44 +0200 Subject: [PATCH 051/415] feature: server: validate: get rid of mock-require --- server/validate.js | 30 ++++----- server/validate.spec.js | 131 ++++++++++++++-------------------------- 2 files changed, 62 insertions(+), 99 deletions(-) diff --git a/server/validate.js b/server/validate.js index 1332ce0c..e44cdfbe 100644 --- a/server/validate.js +++ b/server/validate.js @@ -1,53 +1,53 @@ 'use strict'; +const {statSync: _statSync} = require('node:fs'); const tryCatch = require('try-catch'); -const exit = require('./exit'); -const {getColumns} = require('./columns'); +const _exit = require('./exit'); +const {getColumns: _getColumns} = require('./columns'); const isString = (a) => typeof a === 'string'; -module.exports.root = (dir, config) => { +module.exports.root = (dir, config, {exit = _exit, statSync = _statSync} = {}) => { if (!isString(dir)) throw Error('dir should be a string'); - + if (dir === '/') return; - + if (config('dropbox')) return; - - const {statSync} = require('node:fs'); + const [error] = tryCatch(statSync, dir); - + if (error) return exit('cloudcmd --root: %s', error.message); }; -module.exports.editor = (name) => { +module.exports.editor = (name, {exit = _exit} = {}) => { const reg = /^(dword|edward|deepword)$/; - + if (!reg.test(name)) exit('cloudcmd --editor: could be "dword", "edward" or "deepword" only'); }; -module.exports.packer = (name) => { +module.exports.packer = (name, {exit = _exit} = {}) => { const reg = /^(tar|zip)$/; - + if (!reg.test(name)) exit('cloudcmd --packer: could be "tar" or "zip" only'); }; -module.exports.columns = (type) => { +module.exports.columns = (type, {exit = _exit, getColumns = _getColumns} = {}) => { const addQuotes = (a) => `"${a}"`; const all = Object .keys(getColumns()) .concat(''); - + const names = all .filter(Boolean) .map(addQuotes) .join(', '); - + if (!all.includes(type)) exit(`cloudcmd --columns: can be only one of: ${names}`); }; diff --git a/server/validate.spec.js b/server/validate.spec.js index b9bfa727..14869907 100644 --- a/server/validate.spec.js +++ b/server/validate.spec.js @@ -1,41 +1,29 @@ 'use strict'; -const fs = require('node:fs'); - const {test, stub} = require('supertape'); - const tryCatch = require('try-catch'); -const mockRequire = require('mock-require'); -const dir = '..'; -const validatePath = `${dir}/server/validate`; - -const cloudcmdPath = `${dir}/server/cloudcmd`; -const validate = require(validatePath); -const cloudcmd = require(cloudcmdPath); -const columnsPath = `${dir}/server/columns`; - -const exitPath = `${dir}/server/exit`; -const {reRequire, stopAll} = mockRequire; +const validate = require('./validate'); +const cloudcmd = require('./cloudcmd'); test('validate: root: bad', (t) => { const config = { root: Math.random(), }; - + const [e] = tryCatch(cloudcmd, { config, }); - + t.equal(e.message, 'dir should be a string', 'should throw'); t.end(); }); test('validate: root: config', (t) => { const config = stub().returns(true); - + validate.root('/hello', config); - + t.calledWith(config, ['dropbox'], 'should call config'); t.end(); }); @@ -43,102 +31,77 @@ test('validate: root: config', (t) => { test('validate: root: /', (t) => { const fn = stub(); validate.root('/', fn); - + t.notCalled(fn, 'should not call fn'); t.end(); }); test('validate: root: stat', (t) => { - const fn = stub(); - const {statSync} = fs; - + const config = stub(); const error = 'ENOENT'; - - fs.statSync = () => { - throw Error(error); - }; - - mockRequire(exitPath, fn); - - const {root} = reRequire(validatePath); - - root('hello', fn); - + const statSync = stub().throws(Error(error)); + const exit = stub(); + + validate.root('hello', config, { + statSync, + exit, + }); + const msg = 'cloudcmd --root: %s'; - - fs.statSync = statSync; - - stopAll(); - - t.calledWith(fn, [msg, error], 'should call fn'); + + t.calledWith(exit, [msg, error], 'should call fn'); t.end(); }); test('validate: packer: not valid', (t) => { - const fn = stub(); - - mockRequire(exitPath, fn); - - const {packer} = reRequire(validatePath); + const exit = stub(); const msg = 'cloudcmd --packer: could be "tar" or "zip" only'; - - packer('hello'); - - stopAll(); - - t.calledWith(fn, [msg], 'should call fn'); + + validate.packer('hello', { + exit, + }); + + t.calledWith(exit, [msg], 'should call fn'); t.end(); }); test('validate: editor: not valid', (t) => { - const fn = stub(); - - mockRequire(exitPath, fn); - - const {editor} = reRequire(validatePath); + const exit = stub(); const msg = 'cloudcmd --editor: could be "dword", "edward" or "deepword" only'; - - editor('hello'); - - stopAll(); - - t.calledWith(fn, [msg], 'should call fn'); + + validate.editor('hello', { + exit, + }); + + t.calledWith(exit, [msg], 'should call fn'); t.end(); }); test('validate: columns', (t) => { - const fn = stub(); - mockRequire(exitPath, fn); - - const {columns} = require(validatePath); - - columns('name-size-date'); - - stopAll(); - - t.notCalled(fn, 'should not call exit'); + const exit = stub(); + + validate.columns('name-size-date', { + exit, + }); + + t.notCalled(exit, 'should not call exit'); t.end(); }); test('validate: columns: wrong', (t) => { - const fn = stub(); const getColumns = stub().returns({ 'name-size-date': '', 'name-size': '', }); - - mockRequire(exitPath, fn); - mockRequire(columnsPath, { + + const exit = stub(); + const msg = 'cloudcmd --columns: can be only one of: "name-size-date", "name-size"'; + + validate.columns('hello', { + exit, getColumns, }); - - const {columns} = reRequire(validatePath); - const msg = 'cloudcmd --columns: can be only one of: "name-size-date", "name-size"'; - - columns('hello'); - - stopAll(); - - t.calledWith(fn, [msg], 'should call exit'); + + t.calledWith(exit, [msg], 'should call exit'); t.end(); }); From 3f83f6f09aba436cd1230a8af80dcecb2c73abff Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 20 Mar 2024 13:26:21 +0200 Subject: [PATCH 052/415] chore: cloudcmd: v17.1.5 --- ChangeLog | 5 +++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 475e1fcb..e1632309 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.03.20, v17.1.5 + +feature: +- bf90bf22 server: validate: get rid of mock-require + 2024.03.20, v17.1.4 feature: diff --git a/HELP.md b/HELP.md index 3985e114..ceb6457d 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.4 +# Cloud Commander v17.1.5 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.20*, **[v17.1.5](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.5)** - *2024.03.20*, **[v17.1.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.4)** - *2024.03.18*, **[v17.1.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.3)** - *2024.03.18*, **[v17.1.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.2)** diff --git a/README.md b/README.md index 2a969500..70453a02 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.4 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.1.5 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 50bb3737..366c47a9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.1.4", + "version": "17.1.5", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 6e99c7e3c573d4144e1affaa28e02c72ea1bb0c1 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 20 Mar 2024 11:28:14 +0000 Subject: [PATCH 053/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/validate.js | 16 ++++++++-------- server/validate.spec.js | 34 +++++++++++++++++----------------- 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/server/validate.js b/server/validate.js index e44cdfbe..082dbd90 100644 --- a/server/validate.js +++ b/server/validate.js @@ -10,29 +10,29 @@ const isString = (a) => typeof a === 'string'; module.exports.root = (dir, config, {exit = _exit, statSync = _statSync} = {}) => { if (!isString(dir)) throw Error('dir should be a string'); - + if (dir === '/') return; - + if (config('dropbox')) return; - + const [error] = tryCatch(statSync, dir); - + if (error) return exit('cloudcmd --root: %s', error.message); }; module.exports.editor = (name, {exit = _exit} = {}) => { const reg = /^(dword|edward|deepword)$/; - + if (!reg.test(name)) exit('cloudcmd --editor: could be "dword", "edward" or "deepword" only'); }; module.exports.packer = (name, {exit = _exit} = {}) => { const reg = /^(tar|zip)$/; - + if (!reg.test(name)) exit('cloudcmd --packer: could be "tar" or "zip" only'); }; @@ -42,12 +42,12 @@ module.exports.columns = (type, {exit = _exit, getColumns = _getColumns} = {}) = const all = Object .keys(getColumns()) .concat(''); - + const names = all .filter(Boolean) .map(addQuotes) .join(', '); - + if (!all.includes(type)) exit(`cloudcmd --columns: can be only one of: ${names}`); }; diff --git a/server/validate.spec.js b/server/validate.spec.js index 14869907..e0871e95 100644 --- a/server/validate.spec.js +++ b/server/validate.spec.js @@ -10,20 +10,20 @@ test('validate: root: bad', (t) => { const config = { root: Math.random(), }; - + const [e] = tryCatch(cloudcmd, { config, }); - + t.equal(e.message, 'dir should be a string', 'should throw'); t.end(); }); test('validate: root: config', (t) => { const config = stub().returns(true); - + validate.root('/hello', config); - + t.calledWith(config, ['dropbox'], 'should call config'); t.end(); }); @@ -31,7 +31,7 @@ test('validate: root: config', (t) => { test('validate: root: /', (t) => { const fn = stub(); validate.root('/', fn); - + t.notCalled(fn, 'should not call fn'); t.end(); }); @@ -41,14 +41,14 @@ test('validate: root: stat', (t) => { const error = 'ENOENT'; const statSync = stub().throws(Error(error)); const exit = stub(); - + validate.root('hello', config, { statSync, exit, }); - + const msg = 'cloudcmd --root: %s'; - + t.calledWith(exit, [msg, error], 'should call fn'); t.end(); }); @@ -56,11 +56,11 @@ test('validate: root: stat', (t) => { test('validate: packer: not valid', (t) => { const exit = stub(); const msg = 'cloudcmd --packer: could be "tar" or "zip" only'; - + validate.packer('hello', { exit, }); - + t.calledWith(exit, [msg], 'should call fn'); t.end(); }); @@ -68,22 +68,22 @@ 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'; - + validate.editor('hello', { exit, }); - + t.calledWith(exit, [msg], 'should call fn'); t.end(); }); test('validate: columns', (t) => { const exit = stub(); - + validate.columns('name-size-date', { exit, }); - + t.notCalled(exit, 'should not call exit'); t.end(); }); @@ -93,15 +93,15 @@ test('validate: columns: wrong', (t) => { 'name-size-date': '', 'name-size': '', }); - + const exit = stub(); const msg = 'cloudcmd --columns: can be only one of: "name-size-date", "name-size"'; - + validate.columns('hello', { exit, getColumns, }); - + t.calledWith(exit, [msg], 'should call exit'); t.end(); }); From fcce26d4e1a4116f702dcecaa8be746311abfb29 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 21 Mar 2024 08:36:05 +0200 Subject: [PATCH 054/415] feature: cloudfunc: get rid of mock-require --- .../common/entity.js => common/entity.spec.js | 8 +- test/common/cloudfunc.js | 83 +++++++++---------- 2 files changed, 42 insertions(+), 49 deletions(-) rename test/common/entity.js => common/entity.spec.js (91%) diff --git a/test/common/entity.js b/common/entity.spec.js similarity index 91% rename from test/common/entity.js rename to common/entity.spec.js index 168318e8..59fe68f0 100644 --- a/test/common/entity.js +++ b/common/entity.spec.js @@ -1,12 +1,12 @@ 'use strict'; const test = require('supertape'); -const entity = require('../../common/entity'); +const entity = require('./entity'); test('cloudcmd: entity: encode', (t) => { const result = entity.encode(' '); const expected = '<hello> '; - + t.equal(result, expected, 'should encode entity'); t.end(); }); @@ -14,7 +14,7 @@ test('cloudcmd: entity: encode', (t) => { test('cloudcmd: entity: decode', (t) => { const result = entity.decode('<hello> '); const expected = ' '; - + t.equal(result, expected, 'should decode entity'); t.end(); }); @@ -22,7 +22,7 @@ test('cloudcmd: entity: decode', (t) => { test('cloudcmd: entity: encode quote', (t) => { const result = entity.encode('"hello"'); const expected = '"hello"'; - + t.equal(result, expected, 'should encode entity'); t.end(); }); diff --git a/test/common/cloudfunc.js b/test/common/cloudfunc.js index ee942b59..ae5b0063 100644 --- a/test/common/cloudfunc.js +++ b/test/common/cloudfunc.js @@ -1,23 +1,17 @@ 'use strict'; const fs = require('node:fs'); + const tryCatch = require('try-catch'); +const test = require('supertape'); +const htmlLooksLike = require('html-looks-like'); +const readFilesSync = require('@cloudcmd/read-files-sync'); + +const {time, timeEnd} = require(`../../common/util`); +const CloudFunc = require('../../common/cloudfunc.js'); const DIR = `${__dirname}/../../`; -const COMMONDIR = `${DIR}common/`; - -const {time, timeEnd} = require(`${COMMONDIR}util`); - -const CloudFuncPath = `${COMMONDIR}cloudfunc`; - -const CloudFunc = require(CloudFuncPath); - -const test = require('supertape'); - -const {reRequire} = require('mock-require'); -const htmlLooksLike = require('html-looks-like'); - -const readFilesSync = require('@cloudcmd/read-files-sync'); +const CloudFuncPath = `cloudfunc`; const TMPLDIR = `${DIR}tmpl/`; const FS_DIR = `${TMPLDIR}fs/`; @@ -66,40 +60,40 @@ let Expect = '
' + test('cloudfunc: render', (t) => { const template = readFilesSync(FS_DIR, TMPL, 'utf8'); - + time('CloudFunc.buildFromJSON'); const result = CloudFunc.buildFromJSON({ prefix: '', data, template, }); - + Expect += fs.readFileSync(EXPECT_PATH, 'utf8'); - + let i; const isNotOk = Expect .split('') .some((item, number) => { const ret = result[number] !== item; - + if (ret) i = number; - + return ret; }); - + timeEnd('CloudFunc.buildFromJSON'); - + if (isNotOk) { console.log(`Error in char number: ${i}\n`, `Expect: ${Expect.substr(i)}\n`, `Result: ${result.substr(i)}`); - + console.log('buildFromJSON: Not OK'); } - + t.equal(result, Expect, 'should be equal rendered json data'); - + htmlLooksLike(result, Expect); - + t.end(); }); @@ -107,9 +101,9 @@ test('cloudfunc: formatMsg', (t) => { const msg = 'hello'; const name = 'name'; const status = 'ok'; - + const result = CloudFunc.formatMsg(msg, name, status); - + t.equal(result, 'hello: ok("name")'); t.end(); }); @@ -118,44 +112,42 @@ test('cloudfunc: formatMsg: no name', (t) => { const msg = 'hello'; const name = null; const status = 'ok'; - + const result = CloudFunc.formatMsg(msg, name, status); - + t.equal(result, 'hello: ok'); t.end(); }); test('cloudfunc: getTitle', (t) => { - const CloudFunc = reRequire(CloudFuncPath); - - const result = CloudFunc.getTitle(); - + const result = CloudFunc.getTitle({ + path: '/', + }); + t.equal(result, 'Cloud Commander - /'); t.end(); }); test('cloudfunc: getTitle: no name', (t) => { - const CloudFunc = reRequire(CloudFuncPath); const path = '/hello/world'; - + const result = CloudFunc.getTitle({ path, }); - + t.equal(result, 'Cloud Commander - /hello/world'); t.end(); }); test('cloudfunc: getTitle: name, path', (t) => { - const CloudFunc = reRequire(CloudFuncPath); const name = 'hello'; const path = '/hello/world'; - + const result = CloudFunc.getTitle({ name, path, }); - + t.equal(result, 'hello - /hello/world'); t.end(); }); @@ -164,17 +156,17 @@ test('cloudfunc: getHeaderField', (t) => { const sort = 'name'; const order = 'desc'; const name = 'name'; - + const result = CloudFunc.getHeaderField(sort, order, name); const expected = 'name↓'; - + t.equal(result, expected, 'should set desc arrow'); t.end(); }); test('cloudfunc: getPathLink: no url', (t) => { const [error] = tryCatch(CloudFunc.getPathLink); - + t.ok(error, 'should throw when no url'); t.end(); }); @@ -183,21 +175,22 @@ test('cloudfunc: getPathLink: no template', (t) => { const url = 'http://abc.com'; const prefix = ''; const [error] = tryCatch(CloudFunc.getPathLink, url, prefix); - + t.ok(error, 'should throw when no template'); t.end(); }); test('cloudfunc: getDotDot', (t) => { const dotDot = CloudFunc.getDotDot('/home'); - + t.equal(dotDot, '/', 'should return root'); t.end(); }); test('cloudfunc: getDotDot: two levels deep', (t) => { const dotDot = CloudFunc.getDotDot('/home/coderaiser/'); - + t.equal(dotDot, '/home', 'should return up level'); t.end(); }); + From 1bef0d4381d38c7ccafcf8d6fa0733096440ca2d Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 21 Mar 2024 08:46:12 +0200 Subject: [PATCH 055/415] chore: lint --- .eslintrc.js | 8 +------- client/client.js | 16 ++++++++-------- client/dom/buffer.js | 20 ++++++++++---------- client/dom/current-file.js | 2 +- client/dom/events/index.js | 20 ++++++++++---------- client/dom/load-remote.js | 16 ++++++++-------- client/dom/upload-files.js | 2 +- common/cloudfunc.js | 10 +++++----- common/entity.spec.js | 6 +++--- server/config.js | 2 +- server/repl.js | 6 +++--- server/user-menu.js | 4 ++-- test/common/cloudfunc.js | 3 +-- 13 files changed, 54 insertions(+), 61 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 9576e79c..ab62820d 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -2,7 +2,7 @@ module.exports = { extends: [ - 'plugin:putout/safe', + 'plugin:putout/safe+align', ], plugins: [ 'putout', @@ -18,9 +18,6 @@ module.exports = { 'no-console': 'off', 'n/shebang': 'off', }, - extends: [ - 'plugin:n/recommended', - ], }, { files: ['client/dom/index.js'], rules: { @@ -31,9 +28,6 @@ module.exports = { rules: { 'no-console': 'off', }, - extends: [ - 'plugin:n/recommended', - ], }, { files: ['{client,common,static}/**/*.js'], env: { diff --git a/client/client.js b/client/client.js index 9038a758..58f4ae83 100644 --- a/client/client.js +++ b/client/client.js @@ -103,7 +103,7 @@ function CloudCmdProto(DOM) { currentName, }, panel); }; - + /** * Конструктор CloudClient, который * выполняет весь функционал по @@ -148,7 +148,7 @@ function CloudCmdProto(DOM) { await load.css(name); } - + this.route = (path) => { const query = path.split('/'); @@ -216,7 +216,7 @@ function CloudCmdProto(DOM) { async function saveCurrentName(currentName) { await Storage.set('current-name', currentName); } - + async function baseInit() { const files = DOM.getFiles(); @@ -253,7 +253,7 @@ function CloudCmdProto(DOM) { if (!data) await Storage.setJson(dirPath, getJsonFromFileTable()); } - + function getPanels() { const panels = ['left']; @@ -265,7 +265,7 @@ function CloudCmdProto(DOM) { 'right', ]; } - + this.execFromModule = async (moduleName, funcName, ...args) => { await CloudCmd[moduleName](); @@ -290,7 +290,7 @@ function CloudCmdProto(DOM) { currentName, }); }; - + /** * Функция загружает json-данные о Файловой Системе * через ajax-запрос. @@ -343,7 +343,7 @@ function CloudCmdProto(DOM) { Storage.setJson(path, newObj); } - + /** * Функция строит файловую таблицу * @param json - данные о файлах @@ -409,7 +409,7 @@ function CloudCmdProto(DOM) { CloudCmd.emit('active-dir', Info.dirPath); } } - + this.goToParentDir = async () => { const { dir, diff --git a/client/dom/buffer.js b/client/dom/buffer.js index 8c4be473..afa78dd7 100644 --- a/client/dom/buffer.js +++ b/client/dom/buffer.js @@ -23,13 +23,13 @@ function BufferProto() { function showMessage(msg) { DOM.Dialog.alert(msg); } - + function getNames() { const files = DOM.getActiveFiles(); return DOM.getFilenames(files); } - + function addCutClass() { const files = DOM.getActiveFiles(); @@ -37,7 +37,7 @@ function BufferProto() { element.classList.add(CLASS); } } - + function rmCutClass() { const files = DOM.getByClassAll(CLASS); @@ -45,7 +45,7 @@ function BufferProto() { element.classList.remove(CLASS); } } - + function callIfEnabled(callback) { const is = CloudCmd.config('buffer'); @@ -54,7 +54,7 @@ function BufferProto() { showMessage('Buffer disabled in config!'); } - + async function readBuffer() { const [e, cp, ct] = await tryToPromiseAll([ Storage.getJson(COPY), @@ -67,7 +67,7 @@ function BufferProto() { ct, ]; } - + async function copy() { const names = getNames(); const from = Info.dirPath; @@ -83,7 +83,7 @@ function BufferProto() { names, }); } - + async function cut() { const names = getNames(); const from = Info.dirPath; @@ -100,14 +100,14 @@ function BufferProto() { names, }); } - + async function clear() { await Storage.remove(COPY); await Storage.remove(CUT); rmCutClass(); } - + async function paste() { const [error, cp, ct] = await readBuffer(); @@ -130,6 +130,6 @@ function BufferProto() { await clear(); } - + return Buffer; } diff --git a/client/dom/current-file.js b/client/dom/current-file.js index 1785a4c8..ca7be146 100644 --- a/client/dom/current-file.js +++ b/client/dom/current-file.js @@ -196,7 +196,7 @@ module.exports.setCurrentFile = (currentFile, options) => { name, path, })); - + /* history could be present * but it should be false * to prevent default behavior diff --git a/client/dom/events/index.js b/client/dom/events/index.js index 551a9a93..a879fdc1 100644 --- a/client/dom/events/index.js +++ b/client/dom/events/index.js @@ -75,7 +75,7 @@ function EventsProto() { break; } } - + /** * safe add event listener * @@ -95,7 +95,7 @@ function EventsProto() { return Events; }; - + /** * safe add event listener * @@ -118,7 +118,7 @@ function EventsProto() { return Events; }; - + /** * safe remove event listener * @@ -135,7 +135,7 @@ function EventsProto() { return Events; }; - + /** * remove all added event listeners * @@ -149,7 +149,7 @@ function EventsProto() { EventStore.clear(); }; - + /** * safe add event keydown listener * @@ -164,7 +164,7 @@ function EventsProto() { return Events.add(...args); }; - + /** * safe remove event click listener * @@ -179,7 +179,7 @@ function EventsProto() { return Events.remove(...args); }; - + /** * safe add event click listener * @@ -194,7 +194,7 @@ function EventsProto() { return Events.add(...args); }; - + /** * safe remove event click listener * @@ -219,7 +219,7 @@ function EventsProto() { return Events.add(...args); }; - + /** * safe add event click listener * @@ -234,7 +234,7 @@ function EventsProto() { return Events.add(...args); }; - + /** * safe add load click listener * diff --git a/client/dom/load-remote.js b/client/dom/load-remote.js index dac84a62..0def5f00 100644 --- a/client/dom/load-remote.js +++ b/client/dom/load-remote.js @@ -22,13 +22,13 @@ module.exports = (name, options, callback = options) => { .then(async (modules) => { const online = config('online') && navigator.onLine; const module = findObjByNameInArr(modules.remote, name); - + const isArray = itype.array(module.local); const {version} = module; - + let remoteTmpls; let local; - + if (isArray) { remoteTmpls = module.remote; local = module.local; @@ -36,22 +36,22 @@ module.exports = (name, options, callback = options) => { remoteTmpls = [module.remote]; local = [module.local]; } - + const localURL = local.map((url) => prefix + url); - + const remoteURL = remoteTmpls.map((tmpl) => { return rendy(tmpl, { version, }); }); - + if (online) { const [e] = await tryToCatch(load.parallel, remoteURL); - + if (!e) return callback(); } - + const [e] = await tryToCatch(load.parallel, localURL); callback(e); }); diff --git a/client/dom/upload-files.js b/client/dom/upload-files.js index 61ccff5d..7ac460ea 100644 --- a/client/dom/upload-files.js +++ b/client/dom/upload-files.js @@ -61,7 +61,7 @@ function _loadFile(dir, n, file, callback) { .on('progress', (count) => { const max = step(n); const value = (i - 1) * max + percent(count, 100, max); - + Images.show.load('top'); Images.setProgress(Math.round(value)); }); diff --git a/common/cloudfunc.js b/common/cloudfunc.js index 5d61258e..39e422e7 100644 --- a/common/cloudfunc.js +++ b/common/cloudfunc.js @@ -165,7 +165,7 @@ module.exports.buildFromJSON = (params) => { Path(path); fileTable += `${header}
    `; - + /* Если мы не в корне */ if (path !== '/') { const dotDot = getDotDot(path); @@ -199,7 +199,7 @@ module.exports.buildFromJSON = (params) => { .map((file) => { const name = encode(file.name); const link = prefix + FS + path + name; - + const { type, mode, @@ -207,17 +207,17 @@ module.exports.buildFromJSON = (params) => { owner, size, } = file; - + const linkResult = rendy(templateLink, { link, title: name, name, attribute: getAttribute(file.type), }); - + const dataName = getDataName(file.name); const attribute = `draggable="true" ${dataName}`; - + return rendy(templateFile, { tag: 'li', attribute, diff --git a/common/entity.spec.js b/common/entity.spec.js index 59fe68f0..e83b75df 100644 --- a/common/entity.spec.js +++ b/common/entity.spec.js @@ -6,7 +6,7 @@ const entity = require('./entity'); test('cloudcmd: entity: encode', (t) => { const result = entity.encode(' '); const expected = '<hello> '; - + t.equal(result, expected, 'should encode entity'); t.end(); }); @@ -14,7 +14,7 @@ test('cloudcmd: entity: encode', (t) => { test('cloudcmd: entity: decode', (t) => { const result = entity.decode('<hello> '); const expected = ' '; - + t.equal(result, expected, 'should decode entity'); t.end(); }); @@ -22,7 +22,7 @@ test('cloudcmd: entity: decode', (t) => { test('cloudcmd: entity: encode quote', (t) => { const result = entity.encode('"hello"'); const expected = '"hello"'; - + t.equal(result, expected, 'should encode entity'); t.end(); }); diff --git a/server/config.js b/server/config.js index e16b2ea3..40be286a 100644 --- a/server/config.js +++ b/server/config.js @@ -153,7 +153,7 @@ function listen(manage, sock, auth) { .on('connection', (socket) => { if (!manage('auth')) return connection(manage, socket); - + const reject = () => socket.emit('reject'); socket.on('auth', auth(connectionWraped(manage, socket), reject)); }); diff --git a/server/repl.js b/server/repl.js index 04d415e4..0c4d5279 100644 --- a/server/repl.js +++ b/server/repl.js @@ -9,7 +9,7 @@ module.exports = net const {pid} = process; const addr = socket.remoteAddress; const port = socket.remotePort; - + const r = repl.start({ prompt: `[${pid} ${addr}:${port}>`, input: socket, @@ -17,11 +17,11 @@ module.exports = net terminal: true, useGlobal: false, }); - + r.on('exit', () => { socket.end(); }); - + r.context.socket = socket; }) .listen(1337); diff --git a/server/user-menu.js b/server/user-menu.js index 08044429..2beb8079 100644 --- a/server/user-menu.js +++ b/server/user-menu.js @@ -84,9 +84,9 @@ function getError(error, source) { source, highlightCode: false, })}\`); - + e.code = 'frame'; - + throw e; `; } diff --git a/test/common/cloudfunc.js b/test/common/cloudfunc.js index ae5b0063..43ca09c7 100644 --- a/test/common/cloudfunc.js +++ b/test/common/cloudfunc.js @@ -11,7 +11,7 @@ const {time, timeEnd} = require(`../../common/util`); const CloudFunc = require('../../common/cloudfunc.js'); const DIR = `${__dirname}/../../`; -const CloudFuncPath = `cloudfunc`; + const TMPLDIR = `${DIR}tmpl/`; const FS_DIR = `${TMPLDIR}fs/`; @@ -193,4 +193,3 @@ test('cloudfunc: getDotDot: two levels deep', (t) => { t.equal(dotDot, '/home', 'should return up level'); t.end(); }); - From c7f90901266c6990a4081049cfcc86a915ac484c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 21 Mar 2024 08:49:14 +0200 Subject: [PATCH 056/415] feature: root: get rid of mock-require --- server/root.js | 4 ++-- server/root.spec.js | 30 +++++++----------------------- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/server/root.js b/server/root.js index 32c2b9dd..0d405d3c 100644 --- a/server/root.js +++ b/server/root.js @@ -2,6 +2,6 @@ const mellow = require('mellow'); -module.exports = (dir, root) => { - return mellow.webToWin(dir, root || '/'); +module.exports = (dir, root, {webToWin = mellow.webToWin} = {}) => { + return webToWin(dir, root || '/'); }; diff --git a/server/root.spec.js b/server/root.spec.js index 9af58e18..56c08a36 100644 --- a/server/root.spec.js +++ b/server/root.spec.js @@ -3,34 +3,18 @@ const {test, stub} = require('supertape'); const mockRequire = require('mock-require'); -const {reRequire, stopAll} = mockRequire; - -const pathConfig = './config'; -const pathRoot = './root'; +const root = require('./root'); test('cloudcmd: root: mellow', (t) => { - const config = stub().returns(''); const webToWin = stub(); - - const mellow = { - webToWin, - }; - - mockRequire('mellow', mellow); - mockRequire(pathConfig, config); - - const root = reRequire(pathRoot); + const dir = 'hello'; const dirRoot = '/'; - - root(dir); - - mockRequire.stop('mellow'); - mockRequire.stopAll(pathConfig); - reRequire(pathRoot); - - stopAll(); - + + root(dir, '', { + webToWin, + }); + t.calledWith(webToWin, [dir, dirRoot], 'should call mellow'); t.end(); }); From 0655988ed7bd5c85792d37f79890d531ec39d12a Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 21 Mar 2024 08:50:25 +0200 Subject: [PATCH 057/415] chore: lint --- server/root.spec.js | 7 +++--- test/common/cloudfunc.js | 52 ++++++++++++++++++++-------------------- 2 files changed, 29 insertions(+), 30 deletions(-) diff --git a/server/root.spec.js b/server/root.spec.js index 56c08a36..6bbd5ff6 100644 --- a/server/root.spec.js +++ b/server/root.spec.js @@ -2,19 +2,18 @@ const {test, stub} = require('supertape'); -const mockRequire = require('mock-require'); const root = require('./root'); test('cloudcmd: root: mellow', (t) => { const webToWin = stub(); - + const dir = 'hello'; const dirRoot = '/'; - + root(dir, '', { webToWin, }); - + t.calledWith(webToWin, [dir, dirRoot], 'should call mellow'); t.end(); }); diff --git a/test/common/cloudfunc.js b/test/common/cloudfunc.js index 43ca09c7..91ae5d57 100644 --- a/test/common/cloudfunc.js +++ b/test/common/cloudfunc.js @@ -60,40 +60,40 @@ let Expect = '
    ' + test('cloudfunc: render', (t) => { const template = readFilesSync(FS_DIR, TMPL, 'utf8'); - + time('CloudFunc.buildFromJSON'); const result = CloudFunc.buildFromJSON({ prefix: '', data, template, }); - + Expect += fs.readFileSync(EXPECT_PATH, 'utf8'); - + let i; const isNotOk = Expect .split('') .some((item, number) => { const ret = result[number] !== item; - + if (ret) i = number; - + return ret; }); - + timeEnd('CloudFunc.buildFromJSON'); - + if (isNotOk) { console.log(`Error in char number: ${i}\n`, `Expect: ${Expect.substr(i)}\n`, `Result: ${result.substr(i)}`); - + console.log('buildFromJSON: Not OK'); } - + t.equal(result, Expect, 'should be equal rendered json data'); - + htmlLooksLike(result, Expect); - + t.end(); }); @@ -101,9 +101,9 @@ test('cloudfunc: formatMsg', (t) => { const msg = 'hello'; const name = 'name'; const status = 'ok'; - + const result = CloudFunc.formatMsg(msg, name, status); - + t.equal(result, 'hello: ok("name")'); t.end(); }); @@ -112,9 +112,9 @@ test('cloudfunc: formatMsg: no name', (t) => { const msg = 'hello'; const name = null; const status = 'ok'; - + const result = CloudFunc.formatMsg(msg, name, status); - + t.equal(result, 'hello: ok'); t.end(); }); @@ -123,18 +123,18 @@ test('cloudfunc: getTitle', (t) => { const result = CloudFunc.getTitle({ path: '/', }); - + t.equal(result, 'Cloud Commander - /'); t.end(); }); test('cloudfunc: getTitle: no name', (t) => { const path = '/hello/world'; - + const result = CloudFunc.getTitle({ path, }); - + t.equal(result, 'Cloud Commander - /hello/world'); t.end(); }); @@ -142,12 +142,12 @@ test('cloudfunc: getTitle: no name', (t) => { test('cloudfunc: getTitle: name, path', (t) => { const name = 'hello'; const path = '/hello/world'; - + const result = CloudFunc.getTitle({ name, path, }); - + t.equal(result, 'hello - /hello/world'); t.end(); }); @@ -156,17 +156,17 @@ test('cloudfunc: getHeaderField', (t) => { const sort = 'name'; const order = 'desc'; const name = 'name'; - + const result = CloudFunc.getHeaderField(sort, order, name); const expected = 'name↓'; - + t.equal(result, expected, 'should set desc arrow'); t.end(); }); test('cloudfunc: getPathLink: no url', (t) => { const [error] = tryCatch(CloudFunc.getPathLink); - + t.ok(error, 'should throw when no url'); t.end(); }); @@ -175,21 +175,21 @@ test('cloudfunc: getPathLink: no template', (t) => { const url = 'http://abc.com'; const prefix = ''; const [error] = tryCatch(CloudFunc.getPathLink, url, prefix); - + t.ok(error, 'should throw when no template'); t.end(); }); test('cloudfunc: getDotDot', (t) => { const dotDot = CloudFunc.getDotDot('/home'); - + t.equal(dotDot, '/', 'should return root'); t.end(); }); test('cloudfunc: getDotDot: two levels deep', (t) => { const dotDot = CloudFunc.getDotDot('/home/coderaiser/'); - + t.equal(dotDot, '/home', 'should return up level'); t.end(); }); From 564de89333dfd10320b35c828536ba8ebacd7bae Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 21 Mar 2024 09:00:56 +0200 Subject: [PATCH 058/415] chore: server: cloudcmd: lint --- server/cloudcmd.js | 104 ++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 53 deletions(-) diff --git a/server/cloudcmd.js b/server/cloudcmd.js index 0a88be9f..b79ec208 100644 --- a/server/cloudcmd.js +++ b/server/cloudcmd.js @@ -2,27 +2,10 @@ const fullstore = require('fullstore'); const process = require('node:process'); -const DIR = `${__dirname}/`; -const DIR_COMMON = `${DIR}../common/`; const path = require('node:path'); - const fs = require('node:fs'); -const cloudfunc = require(`${DIR_COMMON}cloudfunc`); -const authentication = require(`${DIR}auth`); -const {createConfig, configPath} = require(`${DIR}config`); - -const modulas = require(`${DIR}modulas`); - -const userMenu = require(`${DIR}user-menu`); -const rest = require(`${DIR}rest`); -const route = require(`${DIR}route`); -const validate = require(`${DIR}validate`); -const prefixer = require(`${DIR}prefixer`); -const terminal = require(`${DIR}terminal`); -const distribute = require(`${DIR}distribute`); const currify = require('currify'); - const apart = require('apart'); const ponse = require('ponse'); const restafary = require('restafary'); @@ -33,8 +16,23 @@ const dword = require('dword'); const deepword = require('deepword'); const nomine = require('nomine'); const fileop = require('@cloudcmd/fileop'); -const DIR_ROOT = `${DIR}../`; +const cloudfunc = require('../common/cloudfunc'); + +const authentication = require('./auth'); +const {createConfig, configPath} = require(`./config`); + +const modulas = require(`./modulas`); + +const userMenu = require(`./user-menu`); +const rest = require(`./rest`); +const route = require(`./route`); +const validate = require(`./validate`); +const prefixer = require(`./prefixer`); +const terminal = require(`./terminal`); +const distribute = require(`./distribute`); +const DIR_ROOT = `../`; +const DIR = `${__dirname}/`; const getDist = (isDev) => isDev ? 'dist-dev' : 'dist'; const isDev = fullstore(process.env.NODE_ENV === 'development'); @@ -55,38 +53,37 @@ module.exports = (params) => { const config = p.configManager || createConfig({ configPath, }); - + const {modules} = p; - const keys = Object.keys(options); - + for (const name of keys) { let value = options[name]; - + if (/root/.test(name)) validate.root(value, config); - + if (/editor|packer|columns/.test(name)) validate[name](value); - + if (/prefix/.test(name)) value = prefixer(value); - + config(name, value); } - + config('console', defaultValue(config, 'console', options)); config('configDialog', defaultValue(config, 'configDialog', options)); - + const prefixSocket = prefixer(options.prefixSocket); - + if (p.socket) listen({ prefixSocket, config, socket: p.socket, }); - + return cloudcmd({ modules, config, @@ -101,10 +98,10 @@ module.exports._getIndexPath = getIndexPath; function defaultValue(config, name, options) { const value = options[name]; const previous = config(name); - + if (isUndefined(value)) return previous; - + return value; } @@ -112,7 +109,7 @@ module.exports._getPrefix = getPrefix; function getPrefix(prefix) { if (isFn(prefix)) return prefix() || ''; - + return prefix || ''; } @@ -120,59 +117,59 @@ module.exports._initAuth = _initAuth; function _initAuth(config, accept, reject, username, password) { if (!config('auth')) return accept(); - + const isName = username === config('username'); const isPass = password === config('password'); - + if (isName && isPass) return accept(); - + reject(); } function listen({prefixSocket, socket, config}) { const root = apart(config, 'root'); const auth = initAuth(config); - + prefixSocket = getPrefix(prefixSocket); config.listen(socket, auth); - + edward.listen(socket, { root, auth, prefixSocket: `${prefixSocket}/edward`, }); - + dword.listen(socket, { root, auth, prefixSocket: `${prefixSocket}/dword`, }); - + deepword.listen(socket, { root, auth, prefixSocket: `${prefixSocket}/deepword`, }); - + config('console') && konsole.listen(socket, { auth, prefixSocket: `${prefixSocket}/console`, }); - + fileop.listen(socket, { root, auth, prefix: `${prefixSocket}/fileop`, }); - + config('terminal') && terminal(config).listen(socket, { auth, prefix: `${prefixSocket}/gritty`, command: config('terminalCommand'), autoRestart: config('terminalAutoRestart'), }); - + distribute.export(config, socket); } @@ -182,15 +179,15 @@ function cloudcmd({modules, config}) { const diff = apart(config, 'diff'); const zip = apart(config, 'zip'); const root = apart(config, 'root'); - + const ponseStatic = ponse.static({ cache, root: DIR_ROOT, }); - + const dropbox = config('dropbox'); const dropboxToken = config('dropboxToken'); - + const funcs = clean([ config('console') && konsole({ online, @@ -246,14 +243,14 @@ function cloudcmd({modules, config}) { }), ponseStatic, ]); - + return funcs; } function logout(req, res, next) { if (req.url !== '/logout') return next(); - + res.sendStatus(401); } @@ -262,25 +259,26 @@ module.exports._replaceDist = replaceDist; function replaceDist(url) { if (!isDev()) return url; - + return url.replace(/^\/dist\//, '/dist-dev/'); } function setUrl(req, res, next) { if (/^\/cloudcmd\.js(\.map)?$/.test(req.url)) req.url = `/dist${req.url}`; - + req.url = replaceDist(req.url); - + next(); } function setSW(req, res, next) { const {url} = req; const isSW = /^\/sw\.js(\.map)?$/.test(url); - + if (isSW) req.url = replaceDist(`/dist${url}`); - + next(); } + From a03185e14ea6aaa6bc683cea0ae150dfa4a56b7e Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 21 Mar 2024 07:02:53 +0000 Subject: [PATCH 059/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/cloudcmd.js | 69 +++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 35 deletions(-) diff --git a/server/cloudcmd.js b/server/cloudcmd.js index b79ec208..efa7936d 100644 --- a/server/cloudcmd.js +++ b/server/cloudcmd.js @@ -53,37 +53,37 @@ module.exports = (params) => { const config = p.configManager || createConfig({ configPath, }); - + const {modules} = p; const keys = Object.keys(options); - + for (const name of keys) { let value = options[name]; - + if (/root/.test(name)) validate.root(value, config); - + if (/editor|packer|columns/.test(name)) validate[name](value); - + if (/prefix/.test(name)) value = prefixer(value); - + config(name, value); } - + config('console', defaultValue(config, 'console', options)); config('configDialog', defaultValue(config, 'configDialog', options)); - + const prefixSocket = prefixer(options.prefixSocket); - + if (p.socket) listen({ prefixSocket, config, socket: p.socket, }); - + return cloudcmd({ modules, config, @@ -98,10 +98,10 @@ module.exports._getIndexPath = getIndexPath; function defaultValue(config, name, options) { const value = options[name]; const previous = config(name); - + if (isUndefined(value)) return previous; - + return value; } @@ -109,7 +109,7 @@ module.exports._getPrefix = getPrefix; function getPrefix(prefix) { if (isFn(prefix)) return prefix() || ''; - + return prefix || ''; } @@ -117,59 +117,59 @@ module.exports._initAuth = _initAuth; function _initAuth(config, accept, reject, username, password) { if (!config('auth')) return accept(); - + const isName = username === config('username'); const isPass = password === config('password'); - + if (isName && isPass) return accept(); - + reject(); } function listen({prefixSocket, socket, config}) { const root = apart(config, 'root'); const auth = initAuth(config); - + prefixSocket = getPrefix(prefixSocket); config.listen(socket, auth); - + edward.listen(socket, { root, auth, prefixSocket: `${prefixSocket}/edward`, }); - + dword.listen(socket, { root, auth, prefixSocket: `${prefixSocket}/dword`, }); - + deepword.listen(socket, { root, auth, prefixSocket: `${prefixSocket}/deepword`, }); - + config('console') && konsole.listen(socket, { auth, prefixSocket: `${prefixSocket}/console`, }); - + fileop.listen(socket, { root, auth, prefix: `${prefixSocket}/fileop`, }); - + config('terminal') && terminal(config).listen(socket, { auth, prefix: `${prefixSocket}/gritty`, command: config('terminalCommand'), autoRestart: config('terminalAutoRestart'), }); - + distribute.export(config, socket); } @@ -179,15 +179,15 @@ function cloudcmd({modules, config}) { const diff = apart(config, 'diff'); const zip = apart(config, 'zip'); const root = apart(config, 'root'); - + const ponseStatic = ponse.static({ cache, root: DIR_ROOT, }); - + const dropbox = config('dropbox'); const dropboxToken = config('dropboxToken'); - + const funcs = clean([ config('console') && konsole({ online, @@ -243,14 +243,14 @@ function cloudcmd({modules, config}) { }), ponseStatic, ]); - + return funcs; } function logout(req, res, next) { if (req.url !== '/logout') return next(); - + res.sendStatus(401); } @@ -259,26 +259,25 @@ module.exports._replaceDist = replaceDist; function replaceDist(url) { if (!isDev()) return url; - + return url.replace(/^\/dist\//, '/dist-dev/'); } function setUrl(req, res, next) { if (/^\/cloudcmd\.js(\.map)?$/.test(req.url)) req.url = `/dist${req.url}`; - + req.url = replaceDist(req.url); - + next(); } function setSW(req, res, next) { const {url} = req; const isSW = /^\/sw\.js(\.map)?$/.test(url); - + if (isSW) req.url = replaceDist(`/dist${url}`); - + next(); } - From e01ee4575b68530d2cfdce48f4101be831820c1f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 21 Mar 2024 09:56:12 +0200 Subject: [PATCH 060/415] feature: server: route: get rid of mock-require --- .editorconfig | 2 +- server/cloudcmd.js | 22 +++++++++++++++++----- server/depstore.js | 15 +++++++++++++++ server/route.js | 14 ++++++++------ server/route.spec.js | 43 +++++++++++-------------------------------- 5 files changed, 52 insertions(+), 44 deletions(-) create mode 100644 server/depstore.js diff --git a/.editorconfig b/.editorconfig index 09fa9422..439abfd0 100644 --- a/.editorconfig +++ b/.editorconfig @@ -9,7 +9,7 @@ root = true charset = utf-8 end_of_line = lf insert_final_newline = true -trim_trailing_whitespace = true +trim_trailing_whitespace = false indent_style = space indent_size = 4 diff --git a/server/cloudcmd.js b/server/cloudcmd.js index efa7936d..f8aa9425 100644 --- a/server/cloudcmd.js +++ b/server/cloudcmd.js @@ -1,5 +1,6 @@ 'use strict'; +const {join} = require('node:path'); const fullstore = require('fullstore'); const process = require('node:process'); const path = require('node:path'); @@ -31,8 +32,10 @@ const validate = require(`./validate`); const prefixer = require(`./prefixer`); const terminal = require(`./terminal`); const distribute = require(`./distribute`); -const DIR_ROOT = `../`; +const {createDepStore} = require('./depstore'); +const {assign} = Object; const DIR = `${__dirname}/`; +const DIR_ROOT = join(DIR, '..'); const getDist = (isDev) => isDev ? 'dist-dev' : 'dist'; const isDev = fullstore(process.env.NODE_ENV === 'development'); @@ -47,7 +50,9 @@ const clean = (a) => a.filter(notEmpty); const isUndefined = (a) => typeof a === 'undefined'; const isFn = (a) => typeof a === 'function'; -module.exports = (params) => { +module.exports = cloudcmd; + +function cloudcmd(params) { const p = params || {}; const options = p.config || {}; const config = p.configManager || createConfig({ @@ -84,11 +89,17 @@ module.exports = (params) => { socket: p.socket, }); - return cloudcmd({ + return cloudcmdMiddle({ modules, config, }); -}; +} + +const depStore = createDepStore(); + +assign(cloudcmd, { + depStore, +}); module.exports.createConfigManager = createConfig; module.exports.configPath = configPath; @@ -173,7 +184,7 @@ function listen({prefixSocket, socket, config}) { distribute.export(config, socket); } -function cloudcmd({modules, config}) { +function cloudcmdMiddle({modules, config}) { const online = apart(config, 'online'); const cache = false; const diff = apart(config, 'diff'); @@ -240,6 +251,7 @@ function cloudcmd({modules, config}) { rest(config), route(config, { html, + win32: depStore('win32'), }), ponseStatic, ]); diff --git a/server/depstore.js b/server/depstore.js new file mode 100644 index 00000000..2ab395f1 --- /dev/null +++ b/server/depstore.js @@ -0,0 +1,15 @@ +'use strict'; + +module.exports.createDepStore = () => { + let deps = {}; + + return (name, value) => { + if (!name) + return deps = {}; + + if (!value) + return deps[name]; + + deps[name] = value; + }; +}; diff --git a/server/route.js b/server/route.js index 3acc63d4..ab5ea491 100644 --- a/server/route.js +++ b/server/route.js @@ -2,7 +2,7 @@ const {extname} = require('node:path'); -const {read} = require('win32'); +const _win32 = require('win32'); const ponse = require('ponse'); const rendy = require('rendy'); const format = require('format-io'); @@ -34,9 +34,9 @@ const sendIndex = (params, data) => { const onceRequire = once(require); const getPrefix = (config) => prefixer(config('prefix')); -const getReadDir = (config) => { +const getReadDir = (config, {win32 = _win32} = {}) => { if (!config('dropbox')) - return read; + return win32.read; const {readDir} = onceRequire('@cloudcmd/dropbox'); @@ -78,13 +78,15 @@ async function route({config, options, request, response}) { const rootName = name.replace(CloudFunc.FS, '') || '/'; const fullPath = root(rootName, config('root')); - const read = getReadDir(config); + const {html, win32} = options; + const read = getReadDir(config, { + win32, + }); + const [error, stream] = await tryToCatch(read, fullPath, { root: config('root'), }); - const {html} = options; - if (error) return ponse.sendError(error, p); diff --git a/server/route.spec.js b/server/route.spec.js index 2c552509..2a70a66d 100644 --- a/server/route.spec.js +++ b/server/route.spec.js @@ -7,18 +7,14 @@ const fs = require('node:fs'); const tryToCatch = require('try-to-catch'); const {test, stub} = require('supertape'); -const mockRequire = require('mock-require'); -const cloudcmdPath = './cloudcmd'; -const cloudcmd = require(cloudcmdPath); +const cloudcmd = require('./cloudcmd'); const serveOnce = require('serve-once'); -const {createConfigManager} = cloudcmd; -const routePath = './route'; +const {_getReadDir} = require('./route'); const fixtureDir = path.join(__dirname, '..', 'test', 'fixture'); - -const {reRequire, stopAll} = mockRequire; +const {createConfigManager} = cloudcmd; const defaultConfig = { auth: false, @@ -231,20 +227,17 @@ test('cloudcmd: route: sendIndex: encode', async (t) => { const read = stub().resolves(stream); - mockRequire('win32', { + cloudcmd.depStore('win32', { read, }); - reRequire(routePath); - const cloudcmd = reRequire(cloudcmdPath); - const {request} = serveOnce(cloudcmd, { configManager: createConfigManager(), }); const {body} = await request.get('/'); - stopAll(); + cloudcmd.depStore(); t.match(body, nameEncoded, 'should encode name'); t.end(); @@ -270,17 +263,14 @@ test('cloudcmd: route: sendIndex: encode: not encoded', async (t) => { const read = stub().resolves(stream); - mockRequire('win32', { + cloudcmd.depStore('win32', { read, }); - reRequire(routePath); - const cloudcmd = reRequire(cloudcmdPath); - const {request} = serveOnce(cloudcmd); const {body} = await request.get('/'); - stopAll(); + cloudcmd.depStore(); t.notOk(body.includes(name), 'should not put not encoded name'); t.end(); @@ -306,20 +296,16 @@ test('cloudcmd: route: sendIndex: ddos: render', async (t) => { const read = stub().resolves(stream); - mockRequire('win32', { + cloudcmd.depStore('win32', { read, }); - - reRequire(routePath); - const cloudcmd = reRequire(cloudcmdPath); - const {request} = serveOnce(cloudcmd, { config: defaultConfig, }); const {status} = await request.get('/'); - stopAll(); + cloudcmd.depStore(); t.equal(status, 200, 'should not hang up'); t.end(); @@ -422,8 +408,6 @@ test('cloudcmd: route: dropbox', async (t) => { config('dropbox', true); config('dropboxToken', ''); - const {_getReadDir} = reRequire(routePath); - const readdir = _getReadDir(config); const [e] = await tryToCatch(readdir, '/root'); @@ -452,14 +436,10 @@ test('cloudcmd: route: read: root', async (t) => { stream.contentLength = 5; const read = stub().returns(stream); - - mockRequire('win32', { + cloudcmd.depStore('win32', { read, }); - reRequire(routePath); - - const cloudcmd = reRequire(cloudcmdPath); const configManager = createConfigManager(); const root = '/hello'; @@ -470,13 +450,12 @@ test('cloudcmd: route: read: root', async (t) => { }); await request.get('/fs/route.js'); + cloudcmd.depStore(); const expected = ['/hello/route.js', { root, }]; - stopAll(); - t.calledWith(read, expected); t.end(); }); From cfa3d6953821ca66915bdb613ac864b487578cb9 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 21 Mar 2024 09:58:31 +0200 Subject: [PATCH 061/415] chore: cloudcmd: v17.1.6 --- ChangeLog | 7 +++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e1632309..0b905314 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2024.03.21, v17.1.6 + +feature: +- e01ee457 server: route: get rid of mock-require +- c7f90901 root: get rid of mock-require +- fcce26d4 cloudfunc: get rid of mock-require + 2024.03.20, v17.1.5 feature: diff --git a/HELP.md b/HELP.md index ceb6457d..40f1dda3 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.5 +# Cloud Commander v17.1.6 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.21*, **[v17.1.6](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.6)** - *2024.03.20*, **[v17.1.5](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.5)** - *2024.03.20*, **[v17.1.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.4)** - *2024.03.18*, **[v17.1.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.3)** diff --git a/README.md b/README.md index 70453a02..aaaf39e6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.5 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.1.6 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 366c47a9..ed6fefa0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.1.5", + "version": "17.1.6", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 4e32241d8382cc92b3d627aa81929ee42ffa33bc Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Mar 2024 10:52:25 +0200 Subject: [PATCH 062/415] feature: terminal: get rid of mock-require --- server/terminal.js | 8 ++++++-- server/terminal.spec.js | 25 +++++++++---------------- 2 files changed, 15 insertions(+), 18 deletions(-) diff --git a/server/terminal.js b/server/terminal.js index 5dae26bc..7a291b31 100644 --- a/server/terminal.js +++ b/server/terminal.js @@ -8,11 +8,15 @@ const noop = (req, res, next) => { noop.listen = noop; -module.exports = (config, arg) => { +function _getModule(a) { + return require(a); +} + +module.exports = (config, arg, {getModule = _getModule} = {}) => { if (!config('terminal')) return noop; - const [e, terminalModule] = tryCatch(require, config('terminalPath')); + const [e, terminalModule] = tryCatch(getModule, config('terminalPath')); if (!e && !arg) return terminalModule; diff --git a/server/terminal.spec.js b/server/terminal.spec.js index 71abca17..e857aaab 100644 --- a/server/terminal.spec.js +++ b/server/terminal.spec.js @@ -2,13 +2,8 @@ const {test, stub} = require('supertape'); -const mockRequire = require('mock-require'); - const terminal = require('./terminal'); const {createConfigManager} = require('./cloudcmd'); -const terminalPath = './terminal'; - -const {stopAll} = mockRequire; test('cloudcmd: terminal: disabled', (t) => { const config = createConfigManager(); @@ -33,13 +28,12 @@ test('cloudcmd: terminal: disabled: listen', (t) => { test('cloudcmd: terminal: enabled', (t) => { const term = stub(); const arg = 'hello'; + const config = stub().returns(true); + const getModule = stub().returns(term); - mockRequire(terminalPath, term); - - const terminal = require(terminalPath); - terminal(arg); - - stopAll(); + terminal(config, arg, { + getModule, + }); t.calledWith(term, [arg], 'should call terminal'); t.end(); @@ -67,16 +61,15 @@ test('cloudcmd: terminal: enabled: no string', (t) => { test('cloudcmd: terminal: no arg', (t) => { const gritty = {}; - - mockRequire('gritty', gritty); + const getModule = stub().returns(gritty); const config = createConfigManager(); config('terminal', true); config('terminalPath', 'gritty'); - const result = terminal(config); - - stopAll(); + const result = terminal(config, '', { + getModule, + }); t.equal(result, gritty); t.end(); From 401a669aca7c30f80a43963e0c9dd2fa026b266c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Mar 2024 16:57:29 +0200 Subject: [PATCH 063/415] feature: user-menu: get rid of mock-require --- package.json | 1 + server/user-menu.js | 11 ++++++++--- server/user-menu.spec.js | 22 ++++------------------ 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index ed6fefa0..be4840c6 100644 --- a/package.json +++ b/package.json @@ -188,6 +188,7 @@ "memfs": "^4.2.0", "minor": "^1.2.2", "mock-require": "^3.0.1", + "montag": "^1.2.1", "morgan": "^1.6.1", "multi-rename": "^2.0.0", "nodemon": "^3.0.1", diff --git a/server/user-menu.js b/server/user-menu.js index 2beb8079..eb7f210f 100644 --- a/server/user-menu.js +++ b/server/user-menu.js @@ -1,7 +1,8 @@ 'use strict'; +const once = require('once'); const {homedir} = require('node:os'); -const {readFile} = require('node:fs/promises'); +const {readFile: _readFile, readFile} = require('node:fs/promises'); const {join} = require('node:path'); @@ -13,13 +14,14 @@ const {codeframe} = require('putout'); const putout = threadIt(require.resolve('putout')); threadIt.init(); + // warm up worker cache transpile(''); const URL = '/api/v1/user-menu'; const DEFAULT_MENU_PATH = join(__dirname, '../static/user-menu.js'); -module.exports = currify(async ({menuName}, req, res, next) => { +module.exports = currify(async ({menuName, readFile = _readFile}, req, res, next) => { if (req.url.indexOf(URL)) return next(); @@ -30,12 +32,13 @@ module.exports = currify(async ({menuName}, req, res, next) => { req, res, menuName, + readFile, }); next(); }); -async function onGET({req, res, menuName}) { +async function onGET({req, res, menuName, readFile}) { const {dir} = req.query; const url = req.url.replace(URL, ''); @@ -65,6 +68,7 @@ async function onGET({req, res, menuName}) { if (e) return sendDefaultMenu(res); + debugger; const [parseError, result] = await transpile(source); if (parseError) @@ -108,3 +112,4 @@ async function transpile(source) { ], }); } + diff --git a/server/user-menu.spec.js b/server/user-menu.spec.js index d1718d45..ea60ba30 100644 --- a/server/user-menu.spec.js +++ b/server/user-menu.spec.js @@ -7,11 +7,9 @@ const {test, stub} = require('supertape'); const serveOnce = require('serve-once'); const threadIt = require('thread-it'); -const {reRequire} = require('mock-require'); const userMenu = require('./user-menu'); const {request} = serveOnce(userMenu); - const {readFileSync} = fs; const userMenuPath = join(__dirname, '..', '.cloudcmd.menu.js'); @@ -37,51 +35,39 @@ test('cloudcmd: user menu', async (t) => { options, }); - threadIt.terminate(); - t.equal(userMenuFile, body); t.end(); }); test('cloudcmd: user menu: io.mv', async (t) => { + const readFile = stub().returns(fixtureMove); const options = { menuName: '.cloudcmd.menu.js', + readFile, }; - const {readFile} = fs.promises; - - fs.promises.readFile = stub().returns(fixtureMove); - const userMenu = reRequire('./user-menu'); const {request} = serveOnce(userMenu); - const {body} = await request.get(`/api/v1/user-menu?dir=${__dirname}`, { options, }); - threadIt.terminate(); - fs.promises.readFile = readFile; - t.equal(body, fixtureMoveFix); t.end(); }); test('cloudcmd: user menu: io.cp', async (t) => { + const readFile = stub().returns(fixtureCopy); const options = { menuName: '.cloudcmd.menu.js', + readFile, }; - const {readFile} = fs.promises; - - fs.promises.readFile = stub().returns(fixtureCopy); - const userMenu = reRequire('./user-menu'); const {request} = serveOnce(userMenu); - const {body} = await request.get(`/api/v1/user-menu?dir=${__dirname}`, { options, }); threadIt.terminate(); - fs.promises.readFile = readFile; t.equal(body, fixtureCopyFix); t.end(); From 98e0011e8e1cb54a2b5e69754967d8b54c9e53e6 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Mar 2024 14:59:40 +0000 Subject: [PATCH 064/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/user-menu.js | 6 +----- server/user-menu.spec.js | 7 ++++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/server/user-menu.js b/server/user-menu.js index eb7f210f..4632bfcd 100644 --- a/server/user-menu.js +++ b/server/user-menu.js @@ -1,8 +1,7 @@ 'use strict'; -const once = require('once'); const {homedir} = require('node:os'); -const {readFile: _readFile, readFile} = require('node:fs/promises'); +const {readFile: _readFile} = require('node:fs/promises'); const {join} = require('node:path'); @@ -14,7 +13,6 @@ const {codeframe} = require('putout'); const putout = threadIt(require.resolve('putout')); threadIt.init(); - // warm up worker cache transpile(''); @@ -68,7 +66,6 @@ async function onGET({req, res, menuName, readFile}) { if (e) return sendDefaultMenu(res); - debugger; const [parseError, result] = await transpile(source); if (parseError) @@ -112,4 +109,3 @@ async function transpile(source) { ], }); } - diff --git a/server/user-menu.spec.js b/server/user-menu.spec.js index ea60ba30..48a58ca6 100644 --- a/server/user-menu.spec.js +++ b/server/user-menu.spec.js @@ -1,6 +1,5 @@ 'use strict'; -const fs = require('node:fs'); const {join} = require('node:path'); const {test, stub} = require('supertape'); @@ -9,9 +8,9 @@ const serveOnce = require('serve-once'); const threadIt = require('thread-it'); const userMenu = require('./user-menu'); -const {request} = serveOnce(userMenu); -const {readFileSync} = fs; +const {readFileSync} = require('node:fs'); +const {request} = serveOnce(userMenu); const userMenuPath = join(__dirname, '..', '.cloudcmd.menu.js'); const userMenuFile = readFileSync(userMenuPath, 'utf8'); @@ -47,6 +46,7 @@ test('cloudcmd: user menu: io.mv', async (t) => { }; const {request} = serveOnce(userMenu); + const {body} = await request.get(`/api/v1/user-menu?dir=${__dirname}`, { options, }); @@ -63,6 +63,7 @@ test('cloudcmd: user menu: io.cp', async (t) => { }; const {request} = serveOnce(userMenu); + const {body} = await request.get(`/api/v1/user-menu?dir=${__dirname}`, { options, }); From 25d8faea63651a0b90fd7779616fe37dbc22e50d Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Mar 2024 17:31:32 +0200 Subject: [PATCH 065/415] feature: rest: get rid of mock-require --- server/cloudcmd.js | 8 ++++++-- server/rest/index.js | 39 +++++++++++++++++++++------------------ test/rest/move.js | 39 +++++++++++++++------------------------ test/rest/rename.js | 18 ++++-------------- 4 files changed, 46 insertions(+), 58 deletions(-) diff --git a/server/cloudcmd.js b/server/cloudcmd.js index f8aa9425..7d68af01 100644 --- a/server/cloudcmd.js +++ b/server/cloudcmd.js @@ -26,7 +26,7 @@ const {createConfig, configPath} = require(`./config`); const modulas = require(`./modulas`); const userMenu = require(`./user-menu`); -const rest = require(`./rest`); +const rest = require(`./rest/index.js`); const route = require(`./route`); const validate = require(`./validate`); const prefixer = require(`./prefixer`); @@ -248,7 +248,11 @@ function cloudcmdMiddle({modules, config}) { userMenu({ menuName: '.cloudcmd.menu.js', }), - rest(config), + rest({ + config, + fs: depStore('fs'), + moveFiles: depStore('moveFiles'), + }), route(config, { html, win32: depStore('win32'), diff --git a/server/rest/index.js b/server/rest/index.js index 72660309..f4cae656 100644 --- a/server/rest/index.js +++ b/server/rest/index.js @@ -1,16 +1,9 @@ 'use strict'; -const process = require('node:process'); -const DIR = '../'; -const DIR_COMMON = `${DIR}../common/`; - const path = require('node:path'); -const fs = require('node:fs'); +const _fs = require('node:fs'); -const root = require(`${DIR}root`); -const CloudFunc = require(`${DIR_COMMON}cloudfunc`); -const markdown = require(`${DIR}markdown`); -const info = require('./info'); +const process = require('node:process'); const jaguar = require('jaguar'); const onezip = require('onezip'); @@ -22,7 +15,13 @@ const json = require('jonny'); const ponse = require('ponse'); const copymitter = require('copymitter'); -const moveFiles = require('@cloudcmd/move-files'); +const _moveFiles = require('@cloudcmd/move-files'); + +const root = require(`../root`); +const CloudFunc = require(`../../common/cloudfunc`); +const markdown = require(`../markdown/index.js`); +const info = require('./info'); + const isString = (a) => typeof a === 'string'; const isFn = (a) => typeof a === 'function'; const swap = wraptile((fn, a, b) => fn(b, a)); @@ -37,7 +36,7 @@ const UserError = (msg) => { return error; }; -module.exports = currify((config, request, response, next) => { +module.exports = currify(({config, fs = _fs, moveFiles = _moveFiles}, request, response, next) => { const name = ponse.getPathName(request); const regExp = RegExp(`^${apiURL}`); const is = regExp.test(name); @@ -45,10 +44,10 @@ module.exports = currify((config, request, response, next) => { if (!is) return next(); - rest(config, request, response); + rest({fs, config, moveFiles}, request, response); }); -function rest(config, request, response) { +function rest({fs, config, moveFiles}, request, response) { const name = ponse.getPathName(request); const params = { request, @@ -56,7 +55,7 @@ function rest(config, request, response) { name: name.replace(apiURL, '') || '/', }; - sendData(params, config, (error, options, data) => { + sendData(params, {fs, config, moveFiles}, (error, options, data) => { params.gzip = !error; if (!data) { @@ -87,8 +86,10 @@ function rest(config, request, response) { * getting data on method and command * * @param params {name, method, body, requrest, response} + * @param config {} + * @param callback */ -function sendData(params, config, callback) { +function sendData(params, {fs, config, moveFiles}, callback) { const p = params; const isMD = p.name.startsWith('/markdown'); const rootDir = config('root'); @@ -107,6 +108,8 @@ function sendData(params, config, callback) { .then((body) => { onPUT({ name: p.name, + fs, + moveFiles, config, body, }, callback); @@ -185,7 +188,7 @@ const getRenameMsg = (from, to) => { }; module.exports._onPUT = onPUT; -function onPUT({name, config, body}, callback) { +function onPUT({name, fs, moveFiles, config, body}, callback) { checkPut(name, body, callback); const cmd = getCMD(name); @@ -221,7 +224,7 @@ function onPUT({name, config, body}, callback) { } case 'rename': - return rename(rootDir, files.from, files.to, callback); + return rename(rootDir, files.from, files.to, fs, callback); case 'copy': if (!files.from || !files.names || !files.to) @@ -260,7 +263,7 @@ function onPUT({name, config, body}, callback) { } } -function rename(rootDir, from, to, callback) { +function rename(rootDir, from, to, fs, callback) { if (!from) return callback(UserError('"from" should be filled')); diff --git a/test/rest/move.js b/test/rest/move.js index 769546fe..8e65fe3d 100644 --- a/test/rest/move.js +++ b/test/rest/move.js @@ -1,20 +1,15 @@ 'use strict'; +const wait = require('@iocmd/wait'); +const {EventEmitter} = require('node:events'); const fs = require('node:fs'); -const test = require('supertape'); +const {test, stub} = require('supertape'); const {Volume} = require('memfs'); const {ufs} = require('unionfs'); - -const mockRequire = require('mock-require'); const serveOnce = require('serve-once'); -const {reRequire, stopAll} = mockRequire; -const cloudcmdPath = '../../'; -const dir = `${cloudcmdPath}server/`; -const restPath = `${dir}rest`; - -const {assign} = Object; +const cloudcmd = require('../../server/cloudcmd.js'); test('cloudcmd: rest: move', async (t) => { const volume = { @@ -28,17 +23,11 @@ test('cloudcmd: rest: move', async (t) => { .use(vol) .use(fs); - assign(unionFS, { - promises: fs.promises, - }); - mockRequire('fs', unionFS); + const move = new EventEmitter(); + const moveFiles = stub().returns(move); - reRequire('@cloudcmd/rename-files'); - reRequire('@cloudcmd/move-files'); - reRequire(restPath); - - const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; + cloudcmd.depStore('moveFiles', moveFiles); const configManager = createConfigManager(); configManager('auth', false); @@ -54,18 +43,20 @@ test('cloudcmd: rest: move', async (t) => { names: ['move.txt'], }; - const {body} = await request.put(`/api/v1/move`, { - body: files, - }); + const emit = move.emit.bind(move); - stopAll(); + const [{body}] = await Promise.all([ + request.put(`/api/v1/move`, { + body: files, + }), + wait(1000, emit, 'end'), + ]); t.equal(body, 'move: ok("["move.txt"]")', 'should move'); t.end(); }); test('cloudcmd: rest: move: no from', async (t) => { - const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; const configManager = createConfigManager(); @@ -89,7 +80,6 @@ test('cloudcmd: rest: move: no from', async (t) => { }); test('cloudcmd: rest: move: no to', async (t) => { - const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; const configManager = createConfigManager(); @@ -113,3 +103,4 @@ test('cloudcmd: rest: move: no to', async (t) => { t.equal(body, expected); t.end(); }); + diff --git a/test/rest/rename.js b/test/rest/rename.js index f0b6316b..74dea5d1 100644 --- a/test/rest/rename.js +++ b/test/rest/rename.js @@ -6,10 +6,9 @@ const test = require('supertape'); const {Volume} = require('memfs'); const {ufs} = require('unionfs'); -const mockRequire = require('mock-require'); const serveOnce = require('serve-once'); -const {reRequire, stopAll} = mockRequire; +const cloudcmd = require('../../server/cloudcmd.js'); const cloudcmdPath = '../../'; const dir = `${cloudcmdPath}server/`; const restPath = `${dir}rest`; @@ -26,19 +25,13 @@ test('cloudcmd: rest: rename', async (t) => { .use(vol) .use(fs); - mockRequire('node:fs', unionFS); - - reRequire('@cloudcmd/rename-files'); - reRequire('@cloudcmd/move-files'); - reRequire(restPath); - - const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; const configManager = createConfigManager(); configManager('auth', false); configManager('root', '/'); + cloudcmd.depStore('fs', unionFS); const {request} = serveOnce(cloudcmd, { configManager, }); @@ -52,18 +45,15 @@ test('cloudcmd: rest: rename', async (t) => { body: files, }); - mockRequire.stopAll(); + cloudcmd.depStore(); const expected = 'rename: ok("{"from":"/fixture/mv.txt","to":"/fixture/tmp/mv.txt"}")'; - stopAll(); - t.equal(body, expected, 'should move'); t.end(); }); test('cloudcmd: rest: rename: no from', async (t) => { - const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; const configManager = createConfigManager(); @@ -87,7 +77,6 @@ test('cloudcmd: rest: rename: no from', async (t) => { }); test('cloudcmd: rest: rename: no to', async (t) => { - const cloudcmd = reRequire(cloudcmdPath); const {createConfigManager} = cloudcmd; const configManager = createConfigManager(); @@ -111,3 +100,4 @@ test('cloudcmd: rest: rename: no to', async (t) => { t.equal(body, expected); t.end(); }); + From 770a0812aad67918857f6dee9efd32061984bdc9 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Mar 2024 17:42:04 +0200 Subject: [PATCH 066/415] feature: pack: get rid of mock-require --- test/rest/pack.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/test/rest/pack.js b/test/rest/pack.js index 7c413ed1..4ef63825 100644 --- a/test/rest/pack.js +++ b/test/rest/pack.js @@ -1,19 +1,18 @@ 'use strict'; +const mockRequire = require('mock-require'); const fs = require('node:fs'); const {join} = require('node:path'); const {promisify} = require('node:util'); -const {reRequire} = require('mock-require'); const test = require('supertape'); const tar = require('tar-stream'); const gunzip = require('gunzip-maybe'); const pullout = require('pullout'); -const cloudcmdPath = '../..'; -const cloudcmd = require(cloudcmdPath); +const cloudcmd = require('../../server/cloudcmd.js'); const serveOnce = require('serve-once'); - +const {reRequire} = mockRequire; const pathZipFixture = join(__dirname, '..', 'fixture/pack.zip'); const pathTarFixture = join(__dirname, '..', 'fixture/pack.tar.gz'); @@ -39,6 +38,7 @@ const once = promisify((name, extract, fn) => { }); test('cloudcmd: rest: pack: tar: get', async (t) => { + debugger; const config = { packer: 'tar', auth: false, @@ -48,7 +48,6 @@ test('cloudcmd: rest: pack: tar: get', async (t) => { config, }; - const cloudcmd = reRequire(cloudcmdPath); const {request} = serveOnce(cloudcmd, defaultOptions); const {body} = await request.get(`/api/v1/pack/fixture/pack`, { @@ -68,7 +67,7 @@ test('cloudcmd: rest: pack: tar: get', async (t) => { t.equal(file, data, 'should pack data'); t.end(); -}); +}, {timeout: 7000}); test('cloudcmd: rest: pack: tar: put: file', async (t) => { const config = { @@ -234,3 +233,4 @@ function getPackOptions(to, names = ['pack']) { from: '/fixture', }; } + From 3e565109b347a7ba01e6c9f342370385dce9a8f0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Mar 2024 18:24:17 +0200 Subject: [PATCH 067/415] feature: convert to ESM --- .madrun.mjs | 2 +- ChangeLog | 2 +- HELP.md | 2 +- package.json | 2 +- server/{cloudcmd.js => cloudcmd.mjs} | 94 +++++++++---------- .../{cloudcmd.spec.js => cloudcmd.spec.mjs} | 36 +++---- server/{config.spec.js => config.spec.mjs} | 19 ++-- .../{export.spec.js => export.spec.mjs} | 14 ++- .../{import.spec.js => import.spec.mjs} | 16 ++-- .../{index.spec.js => index.spec.mjs} | 28 +++--- server/{route.spec.js => route.spec.mjs} | 25 +++-- server/server.mjs | 12 +-- .../{terminal.spec.js => terminal.spec.mjs} | 9 +- server/{user-menu.js => user-menu.mjs} | 31 +++--- .../{user-menu.spec.js => user-menu.spec.mjs} | 21 ++--- .../{validate.spec.js => validate.spec.mjs} | 11 +-- test/{before.js => before.mjs} | 31 +++--- test/rest/{config.js => config.mjs} | 10 +- test/rest/{copy.js => copy.mjs} | 23 +++-- test/rest/{fs.js => fs.mjs} | 9 +- test/rest/{move.js => move.mjs} | 29 +----- test/rest/{pack.js => pack.mjs} | 34 ++++--- test/rest/{rename.js => rename.mjs} | 21 ++--- test/server/{console.js => console.mjs} | 18 ++-- test/server/{modulas.js => modulas.mjs} | 21 +++-- test/{static.js => static.mjs} | 13 +-- 26 files changed, 242 insertions(+), 291 deletions(-) rename server/{cloudcmd.js => cloudcmd.mjs} (79%) rename server/{cloudcmd.spec.js => cloudcmd.spec.mjs} (89%) rename server/{config.spec.js => config.spec.mjs} (85%) rename server/distribute/{export.spec.js => export.spec.mjs} (85%) rename server/distribute/{import.spec.js => import.spec.mjs} (95%) rename server/markdown/{index.spec.js => index.spec.mjs} (84%) rename server/{route.spec.js => route.spec.mjs} (95%) rename server/{terminal.spec.js => terminal.spec.mjs} (91%) rename server/{user-menu.js => user-menu.mjs} (74%) rename server/{user-menu.spec.js => user-menu.spec.mjs} (80%) rename server/{validate.spec.js => validate.spec.mjs} (92%) rename test/{before.js => before.mjs} (63%) rename test/rest/{config.js => config.mjs} (92%) rename test/rest/{copy.js => copy.mjs} (58%) rename test/rest/{fs.js => fs.mjs} (64%) rename test/rest/{move.js => move.mjs} (77%) rename test/rest/{pack.js => pack.mjs} (90%) rename test/rest/{rename.js => rename.mjs} (85%) rename test/server/{console.js => console.mjs} (72%) rename test/server/{modulas.js => modulas.mjs} (74%) rename test/{static.js => static.mjs} (94%) diff --git a/.madrun.mjs b/.madrun.mjs index bda4dcdf..428eec7a 100644 --- a/.madrun.mjs +++ b/.madrun.mjs @@ -33,7 +33,7 @@ export default { 'lint:fresh': () => run('lint', '--fresh'), 'fix:lint': () => run('lint', '--fix'), 'lint:stream': () => run('lint', '-f stream'), - 'test': () => [testEnv, `tape 'test/**/*.js' '{client,static,common,server}/**/*.spec.js' -f fail`], + 'test': () => [testEnv, `tape 'test/**/*.{js,mjs}' '{client,static,common,server}/**/*.spec.{js,mjs}' -f fail`], 'test:client': () => `tape 'test/client/**/*.js'`, 'test:server': () => `tape 'test/**/*.js' 'server/**/*.spec.js' 'common/**/*.spec.js'`, 'wisdom': () => run(['lint:all', 'build', 'test']), diff --git a/ChangeLog b/ChangeLog index 0b905314..36c2ef7c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5587,7 +5587,7 @@ fix: - (rest) onDelete: func(null, body) -> func - (rest) onStat: add var - (cloudcmd) change index path -- (server) start: url -> URL +- (server) start: url -> PREFIX - (server) start: SSLPort -> sslPort - (server) start: Port -> port - (dom) getCurrentDirPath: "," -> ";" diff --git a/HELP.md b/HELP.md index 40f1dda3..b908fcbf 100644 --- a/HELP.md +++ b/HELP.md @@ -133,7 +133,7 @@ Cloud Commander supports the following command-line parameters: For options not specified by command-line parameters, Cloud Commander then reads configuration data from `~/.cloudcmd.json`. It uses port `8000` by default. -To begin using the web client, go to this URL in your browser: +To begin using the web client, go to this PREFIX in your browser: ``` http://localhost:8000 diff --git a/package.json b/package.json index be4840c6..93f54dff 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "type": "git", "url": "git://github.com/coderaiser/cloudcmd.git" }, - "main": "server/cloudcmd.js", + "main": "server/cloudcmd.mjs", "keywords": [ "console", "terminal", diff --git a/server/cloudcmd.js b/server/cloudcmd.mjs similarity index 79% rename from server/cloudcmd.js rename to server/cloudcmd.mjs index 7d68af01..74c55d20 100644 --- a/server/cloudcmd.js +++ b/server/cloudcmd.mjs @@ -1,38 +1,34 @@ -'use strict'; +import path, {dirname, join} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import fullstore from 'fullstore'; +import process from 'node:process'; +import fs from 'node:fs'; +import currify from 'currify'; +import apart from 'apart'; +import ponse from 'ponse'; +import restafary from 'restafary'; +import restbox from 'restbox'; +import konsole from 'console-io'; +import edward from 'edward'; +import dword from 'dword'; +import deepword from 'deepword'; +import nomine from 'nomine'; +import fileop from '@cloudcmd/fileop'; +import cloudfunc from '../common/cloudfunc.js'; +import authentication from './auth.js'; +import {createConfig, configPath} from './config.js'; +import modulas from './modulas.js'; +import userMenu from './user-menu.mjs'; +import rest from './rest/index.js'; +import route from './route.js'; +import validate from './validate.js'; +import prefixer from './prefixer.js'; +import terminal from './terminal.js'; +import distribute from './distribute/index.js'; +import {createDepStore} from './depstore.js'; -const {join} = require('node:path'); -const fullstore = require('fullstore'); -const process = require('node:process'); -const path = require('node:path'); -const fs = require('node:fs'); - -const currify = require('currify'); -const apart = require('apart'); -const ponse = require('ponse'); -const restafary = require('restafary'); -const restbox = require('restbox'); -const konsole = require('console-io'); -const edward = require('edward'); -const dword = require('dword'); -const deepword = require('deepword'); -const nomine = require('nomine'); -const fileop = require('@cloudcmd/fileop'); - -const cloudfunc = require('../common/cloudfunc'); - -const authentication = require('./auth'); -const {createConfig, configPath} = require(`./config`); - -const modulas = require(`./modulas`); - -const userMenu = require(`./user-menu`); -const rest = require(`./rest/index.js`); -const route = require(`./route`); -const validate = require(`./validate`); -const prefixer = require(`./prefixer`); -const terminal = require(`./terminal`); -const distribute = require(`./distribute`); -const {createDepStore} = require('./depstore'); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); const {assign} = Object; const DIR = `${__dirname}/`; const DIR_ROOT = join(DIR, '..'); @@ -50,7 +46,7 @@ const clean = (a) => a.filter(notEmpty); const isUndefined = (a) => typeof a === 'undefined'; const isFn = (a) => typeof a === 'function'; -module.exports = cloudcmd; +export default cloudcmd; function cloudcmd(params) { const p = params || {}; @@ -97,14 +93,12 @@ function cloudcmd(params) { const depStore = createDepStore(); -assign(cloudcmd, { - depStore, -}); +export const createConfigManager = createConfig; +export { + configPath, +}; -module.exports.createConfigManager = createConfig; -module.exports.configPath = configPath; - -module.exports._getIndexPath = getIndexPath; +export const _getIndexPath = getIndexPath; function defaultValue(config, name, options) { const value = options[name]; @@ -116,7 +110,8 @@ function defaultValue(config, name, options) { return value; } -module.exports._getPrefix = getPrefix; +export const _getPrefix = getPrefix; + function getPrefix(prefix) { if (isFn(prefix)) return prefix() || ''; @@ -124,8 +119,7 @@ function getPrefix(prefix) { return prefix || ''; } -module.exports._initAuth = _initAuth; -function _initAuth(config, accept, reject, username, password) { +export function _initAuth(config, accept, reject, username, password) { if (!config('auth')) return accept(); @@ -270,8 +264,9 @@ function logout(req, res, next) { res.sendStatus(401); } -module.exports._isDev = isDev; -module.exports._replaceDist = replaceDist; +export const _isDev = isDev; +export const _replaceDist = replaceDist; + function replaceDist(url) { if (!isDev()) return url; @@ -297,3 +292,8 @@ function setSW(req, res, next) { next(); } + +assign(cloudcmd, { + depStore, + createConfigManager, +}); diff --git a/server/cloudcmd.spec.js b/server/cloudcmd.spec.mjs similarity index 89% rename from server/cloudcmd.spec.js rename to server/cloudcmd.spec.mjs index f5ef2624..96b865b4 100644 --- a/server/cloudcmd.spec.js +++ b/server/cloudcmd.spec.mjs @@ -1,23 +1,25 @@ -'use strict'; - -const path = require('node:path'); -const {test, stub} = require('supertape'); -const cloudcmd = require('./cloudcmd.js'); - -const {request} = require('serve-once')(cloudcmd, { - config: { - auth: false, - dropbox: false, - }, -}); - -const { +import path, {dirname} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import serveOnce from 'serve-once'; +import {test, stub} from 'supertape'; +import cloudcmd, { _isDev, _replaceDist, createConfigManager, _getPrefix, _initAuth, -} = cloudcmd; + _getIndexPath, +} from './cloudcmd.mjs'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +const {request} = serveOnce(cloudcmd, { + config: { + auth: false, + dropbox: false, + }, +}); test('cloudcmd: defaults: config', (t) => { const configManager = createConfigManager(); @@ -158,7 +160,7 @@ test('cloudcmd: getIndexPath: production', (t) => { const isDev = false; const name = path.join(__dirname, '..', 'dist', 'index.html'); - t.equal(cloudcmd._getIndexPath(isDev), name); + t.equal(_getIndexPath(isDev), name); t.end(); }); @@ -166,7 +168,7 @@ test('cloudcmd: getIndexPath: development', (t) => { const isDev = true; const name = path.join(__dirname, '..', 'dist-dev', 'index.html'); - t.equal(cloudcmd._getIndexPath(isDev), name); + t.equal(_getIndexPath(isDev), name); t.end(); }); diff --git a/server/config.spec.js b/server/config.spec.mjs similarity index 85% rename from server/config.spec.js rename to server/config.spec.mjs index 6732a174..21cea8c0 100644 --- a/server/config.spec.js +++ b/server/config.spec.mjs @@ -1,17 +1,12 @@ -'use strict'; +import {createRequire} from 'node:module'; +import {test, stub} from 'supertape'; +import {createConfig, _cryptoPass} from './config.js'; +import {apiURL} from '../common/cloudfunc.js'; +import {connect} from '../test/before.mjs'; -const {test, stub} = require('supertape'); +const require = createRequire(import.meta.url); +const fixture = require('./config.fixture.json'); -const root = '../'; -const configPath = './config'; - -const {createConfig, _cryptoPass} = require(configPath); - -const {apiURL} = require(`${root}common/cloudfunc`); - -const fixture = require('./config.fixture'); - -const {connect} = require('../test/before'); const config = createConfig(); test('config: manage', (t) => { diff --git a/server/distribute/export.spec.js b/server/distribute/export.spec.mjs similarity index 85% rename from server/distribute/export.spec.js rename to server/distribute/export.spec.mjs index e7806b37..db65638d 100644 --- a/server/distribute/export.spec.js +++ b/server/distribute/export.spec.mjs @@ -1,12 +1,10 @@ -'use strict'; +import Config from '../config.js'; +import {once} from 'node:events'; +import test from 'supertape'; +import io from 'socket.io-client'; +import {connect} from '../../test/before.mjs'; -const {once} = require('node:events'); - -const test = require('supertape'); -const io = require('socket.io-client'); - -const {connect} = require('../../test/before'); -const config = require('../config').createConfig(); +const config = Config.createConfig(); test('distribute: export', async (t) => { const defaultConfig = { diff --git a/server/distribute/import.spec.js b/server/distribute/import.spec.mjs similarity index 95% rename from server/distribute/import.spec.js rename to server/distribute/import.spec.mjs index 3323b530..caf9080a 100644 --- a/server/distribute/import.spec.js +++ b/server/distribute/import.spec.mjs @@ -1,12 +1,12 @@ -'use strict'; +import {createRequire} from 'node:module'; +import process from 'node:process'; +import test from 'supertape'; +import {promisify} from 'node:util'; +import tryToCatch from 'try-to-catch'; +import {connect} from '../../test/before.mjs'; +import {createConfigManager} from '../cloudcmd.mjs'; -const process = require('node:process'); -const test = require('supertape'); -const {promisify} = require('node:util'); -const tryToCatch = require('try-to-catch'); - -const {connect} = require('../../test/before'); -const {createConfigManager} = require('../cloudcmd'); +const require = createRequire(import.meta.url); const distribute = { import: promisify(require('./import')), diff --git a/server/markdown/index.spec.js b/server/markdown/index.spec.mjs similarity index 84% rename from server/markdown/index.spec.js rename to server/markdown/index.spec.mjs index f6700b0a..2f51262e 100644 --- a/server/markdown/index.spec.js +++ b/server/markdown/index.spec.mjs @@ -1,28 +1,24 @@ -'use strict'; +import fs from 'node:fs'; +import {join} from 'node:path'; +import {promisify} from 'node:util'; +import tryToCatch from 'try-to-catch'; +import test from 'supertape'; +import serveOnce from 'serve-once'; +import markdown from './index.js'; +import cloudcmd from '../cloudcmd.mjs'; -const fs = require('node:fs'); -const {join} = require('node:path'); -const {promisify} = require('node:util'); - -const tryToCatch = require('try-to-catch'); -const serveOnce = require('serve-once'); -const test = require('supertape'); - -const markdown = require('.'); - -const cloudcmd = require('../..'); const config = { auth: false, }; const configManager = cloudcmd.createConfigManager(); -const {request} = require('serve-once')(cloudcmd, { +const {request} = serveOnce(cloudcmd, { config, configManager, }); -const fixtureDir = join(__dirname, 'fixture'); +const fixtureDir = new URL('fixture', import.meta.url).pathname; const _markdown = promisify(markdown); @@ -93,7 +89,7 @@ test('cloudcmd: markdown: no request', async (t) => { test('cloudcmd: markdown', async (t) => { const configManager = cloudcmd.createConfigManager(); - const fixtureDir = join(__dirname, 'fixture'); + const fixtureDir = new URL('fixture', import.meta.url).pathname; const config = { auth: false, root: fixtureDir, @@ -112,7 +108,7 @@ test('cloudcmd: markdown', async (t) => { test('cloudcmd: markdown: zip', async (t) => { const configManager = cloudcmd.createConfigManager(); - const fixtureDir = join(__dirname, 'fixture'); + const fixtureDir = new URL('fixture', import.meta.url).pathname; const config = { auth: false, root: fixtureDir, diff --git a/server/route.spec.js b/server/route.spec.mjs similarity index 95% rename from server/route.spec.js rename to server/route.spec.mjs index 2a70a66d..7d9e625d 100644 --- a/server/route.spec.js +++ b/server/route.spec.mjs @@ -1,18 +1,15 @@ -'use strict'; +import path, {dirname} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import {Readable} from 'node:stream'; +import fs from 'node:fs'; +import tryToCatch from 'try-to-catch'; +import {test, stub} from 'supertape'; +import serveOnce from 'serve-once'; +import cloudcmd from './cloudcmd.mjs'; +import {_getReadDir} from './route.js'; -const {Readable} = require('node:stream'); - -const path = require('node:path'); -const fs = require('node:fs'); - -const tryToCatch = require('try-to-catch'); -const {test, stub} = require('supertape'); - -const cloudcmd = require('./cloudcmd'); - -const serveOnce = require('serve-once'); - -const {_getReadDir} = require('./route'); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); const fixtureDir = path.join(__dirname, '..', 'test', 'fixture'); const {createConfigManager} = cloudcmd; diff --git a/server/server.mjs b/server/server.mjs index 09cabb69..9bdd1f3f 100644 --- a/server/server.mjs +++ b/server/server.mjs @@ -1,18 +1,18 @@ -import cloudcmd from './cloudcmd.js'; import http from 'node:http'; import {promisify} from 'node:util'; +import process from 'node:process'; import currify from 'currify'; import squad from 'squad'; import tryToCatch from 'try-to-catch'; -import wraptile from 'wraptile'; -import compression from 'compression'; -import threadIt from 'thread-it'; -import exit from './exit.js'; import opn from 'open'; import express from 'express'; import {Server} from 'socket.io'; import tryRequire from 'tryrequire'; -import process from 'node:process'; +import wraptile from 'wraptile'; +import compression from 'compression'; +import threadIt from 'thread-it'; +import exit from './exit.js'; +import cloudcmd from './cloudcmd.mjs'; const bind = (f, self) => f.bind(self); diff --git a/server/terminal.spec.js b/server/terminal.spec.mjs similarity index 91% rename from server/terminal.spec.js rename to server/terminal.spec.mjs index e857aaab..50292234 100644 --- a/server/terminal.spec.js +++ b/server/terminal.spec.mjs @@ -1,9 +1,6 @@ -'use strict'; - -const {test, stub} = require('supertape'); - -const terminal = require('./terminal'); -const {createConfigManager} = require('./cloudcmd'); +import {test, stub} from 'supertape'; +import terminal from './terminal.js'; +import {createConfigManager} from './cloudcmd.mjs'; test('cloudcmd: terminal: disabled', (t) => { const config = createConfigManager(); diff --git a/server/user-menu.js b/server/user-menu.mjs similarity index 74% rename from server/user-menu.js rename to server/user-menu.mjs index 4632bfcd..1265e896 100644 --- a/server/user-menu.js +++ b/server/user-menu.mjs @@ -1,26 +1,25 @@ -'use strict'; +import {createRequire} from 'node:module'; +import {homedir} from 'node:os'; +import {readFile as _readFile} from 'node:fs/promises'; +import {join} from 'node:path'; +import montag from 'montag'; +import tryToCatch from 'try-to-catch'; +import currify from 'currify'; +import threadIt from 'thread-it'; +import {codeframe} from 'putout'; -const {homedir} = require('node:os'); -const {readFile: _readFile} = require('node:fs/promises'); - -const {join} = require('node:path'); - -const montag = require('montag'); -const tryToCatch = require('try-to-catch'); -const currify = require('currify'); -const threadIt = require('thread-it'); -const {codeframe} = require('putout'); +const require = createRequire(import.meta.url); const putout = threadIt(require.resolve('putout')); threadIt.init(); // warm up worker cache transpile(''); -const URL = '/api/v1/user-menu'; -const DEFAULT_MENU_PATH = join(__dirname, '../static/user-menu.js'); +const PREFIX = '/api/v1/user-menu'; +const DEFAULT_MENU_PATH = new URL('../static/user-menu.js', import.meta.url).pathname; -module.exports = currify(async ({menuName, readFile = _readFile}, req, res, next) => { - if (req.url.indexOf(URL)) +export default currify(async ({menuName, readFile = _readFile}, req, res, next) => { + if (!req.url.startsWith(PREFIX)) return next(); const {method} = req; @@ -38,7 +37,7 @@ module.exports = currify(async ({menuName, readFile = _readFile}, req, res, next async function onGET({req, res, menuName, readFile}) { const {dir} = req.query; - const url = req.url.replace(URL, ''); + const url = req.url.replace(PREFIX, ''); if (url === '/default') return sendDefaultMenu(res); diff --git a/server/user-menu.spec.js b/server/user-menu.spec.mjs similarity index 80% rename from server/user-menu.spec.js rename to server/user-menu.spec.mjs index 48a58ca6..7ac64f97 100644 --- a/server/user-menu.spec.js +++ b/server/user-menu.spec.mjs @@ -1,20 +1,19 @@ -'use strict'; +import {dirname, join} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import {test, stub} from 'supertape'; +import serveOnce from 'serve-once'; +import threadIt from 'thread-it'; +import userMenu from './user-menu.mjs'; +import {readFileSync} from 'node:fs'; -const {join} = require('node:path'); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); -const {test, stub} = require('supertape'); - -const serveOnce = require('serve-once'); -const threadIt = require('thread-it'); - -const userMenu = require('./user-menu'); - -const {readFileSync} = require('node:fs'); const {request} = serveOnce(userMenu); const userMenuPath = join(__dirname, '..', '.cloudcmd.menu.js'); const userMenuFile = readFileSync(userMenuPath, 'utf8'); -const fixtureDir = join(__dirname, 'fixture-user-menu'); +const fixtureDir = new URL('fixture-user-menu', import.meta.url).pathname; const fixtureMoveName = join(fixtureDir, 'io-mv.js'); const fixtureMoveFixName = join(fixtureDir, 'io-mv-fix.js'); const fixtureCopyName = join(fixtureDir, 'io-cp.js'); diff --git a/server/validate.spec.js b/server/validate.spec.mjs similarity index 92% rename from server/validate.spec.js rename to server/validate.spec.mjs index e0871e95..50f87f57 100644 --- a/server/validate.spec.js +++ b/server/validate.spec.mjs @@ -1,10 +1,7 @@ -'use strict'; - -const {test, stub} = require('supertape'); -const tryCatch = require('try-catch'); - -const validate = require('./validate'); -const cloudcmd = require('./cloudcmd'); +import {test, stub} from 'supertape'; +import tryCatch from 'try-catch'; +import validate from './validate.js'; +import cloudcmd from './cloudcmd.mjs'; test('validate: root: bad', (t) => { const config = { diff --git a/test/before.js b/test/before.mjs similarity index 63% rename from test/before.js rename to test/before.mjs index d413cd29..2c15bdd3 100644 --- a/test/before.js +++ b/test/before.mjs @@ -1,24 +1,25 @@ -'use strict'; +import process from 'node:process'; +import http from 'node:http'; +import os from 'node:os'; +import express from 'express'; +import {Server} from 'socket.io'; +import writejson from 'writejson'; +import readjson from 'readjson'; +import {promisify} from 'node:util'; +import {fileURLToPath} from 'node:url'; +import {dirname} from 'node:path'; +import cloudcmd from '../server/cloudcmd.mjs'; -const process = require('node:process'); -const http = require('node:http'); -const os = require('node:os'); - -const express = require('express'); -const io = require('socket.io'); -const writejson = require('writejson'); -const readjson = require('readjson'); -const {promisify} = require('node:util'); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); process.env.NODE_ENV = 'development'; - -const cloudcmd = require('../server/cloudcmd'); const {assign} = Object; const pathConfig = os.homedir() + '/.cloudcmd.json'; const currentConfig = readjson.sync.try(pathConfig); -module.exports = before; +export default before; function before(options, fn = options) { const { @@ -38,7 +39,7 @@ function before(options, fn = options) { server.close(cb); }; - const socket = io(server); + const socket = new Server(server); app.use(cloudcmd({ socket, @@ -54,7 +55,7 @@ function before(options, fn = options) { }); } -module.exports.connect = promisify((options, fn = options) => { +export const connect = promisify((options, fn = options) => { before(options, (port, done) => { fn(null, { port, diff --git a/test/rest/config.js b/test/rest/config.mjs similarity index 92% rename from test/rest/config.js rename to test/rest/config.mjs index 020ef9e7..b31c65af 100644 --- a/test/rest/config.js +++ b/test/rest/config.mjs @@ -1,11 +1,9 @@ -'use strict'; +import serveOnce from 'serve-once'; +import test from 'supertape'; +import cloudcmd from '../../server/cloudcmd.mjs'; -const test = require('supertape'); - -const cloudcmd = require('../..'); const configManager = cloudcmd.createConfigManager(); - -const {request} = require('serve-once')(cloudcmd, { +const {request} = serveOnce(cloudcmd, { config: { auth: false, }, diff --git a/test/rest/copy.js b/test/rest/copy.mjs similarity index 58% rename from test/rest/copy.js rename to test/rest/copy.mjs index cb5ce337..99e766ce 100644 --- a/test/rest/copy.js +++ b/test/rest/copy.mjs @@ -1,24 +1,23 @@ -'use strict'; - -const {mkdirSync} = require('node:fs'); -const {join} = require('node:path'); -const test = require('supertape'); -const rimraf = require('rimraf'); +import {dirname, join} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import serveOnce from 'serve-once'; +import {mkdirSync} from 'node:fs'; +import test from 'supertape'; +import {rimraf} from 'rimraf'; +import cloudcmd from '../../server/cloudcmd.mjs'; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); const config = { - root: join(__dirname, '..'), + root: new URL('..', import.meta.url).pathname, }; - -const cloudcmd = require('../..'); const configManager = cloudcmd.createConfigManager(); configManager('auth', false); - -const {request} = require('serve-once')(cloudcmd, { +const {request} = serveOnce(cloudcmd, { config, configManager, }); - const fixtureDir = join(__dirname, '..', 'fixture') + '/'; test('cloudcmd: rest: copy', async (t) => { diff --git a/test/rest/fs.js b/test/rest/fs.mjs similarity index 64% rename from test/rest/fs.js rename to test/rest/fs.mjs index 016b1341..7557ede0 100644 --- a/test/rest/fs.js +++ b/test/rest/fs.mjs @@ -1,9 +1,8 @@ -'use strict'; +import serveOnce from 'serve-once'; +import test from 'supertape'; +import cloudcmd from '../../server/cloudcmd.mjs'; -const test = require('supertape'); - -const cloudcmd = require('../..'); -const {request} = require('serve-once')(cloudcmd, { +const {request} = serveOnce(cloudcmd, { config: { auth: false, }, diff --git a/test/rest/move.js b/test/rest/move.mjs similarity index 77% rename from test/rest/move.js rename to test/rest/move.mjs index 8e65fe3d..ee7d1637 100644 --- a/test/rest/move.js +++ b/test/rest/move.mjs @@ -1,28 +1,10 @@ -'use strict'; - -const wait = require('@iocmd/wait'); -const {EventEmitter} = require('node:events'); -const fs = require('node:fs'); - -const {test, stub} = require('supertape'); -const {Volume} = require('memfs'); -const {ufs} = require('unionfs'); -const serveOnce = require('serve-once'); - -const cloudcmd = require('../../server/cloudcmd.js'); +import wait from '@iocmd/wait'; +import {EventEmitter} from 'node:events'; +import {test, stub} from 'supertape'; +import serveOnce from 'serve-once'; +import cloudcmd from '../../server/cloudcmd.mjs'; test('cloudcmd: rest: move', async (t) => { - const volume = { - '/fixture/move.txt': 'hello', - '/fixture/tmp/a.txt': 'a', - }; - - const vol = Volume.fromJSON(volume, '/'); - - const unionFS = ufs - .use(vol) - .use(fs); - const move = new EventEmitter(); const moveFiles = stub().returns(move); @@ -103,4 +85,3 @@ test('cloudcmd: rest: move: no to', async (t) => { t.equal(body, expected); t.end(); }); - diff --git a/test/rest/pack.js b/test/rest/pack.mjs similarity index 90% rename from test/rest/pack.js rename to test/rest/pack.mjs index 4ef63825..61332949 100644 --- a/test/rest/pack.js +++ b/test/rest/pack.mjs @@ -1,18 +1,16 @@ -'use strict'; +import fs from 'node:fs'; +import {join, dirname} from 'node:path'; +import {promisify} from 'node:util'; +import test from 'supertape'; +import tar from 'tar-stream'; +import gunzip from 'gunzip-maybe'; +import pullout from 'pullout'; +import cloudcmd from '../../server/cloudcmd.mjs'; +import serveOnce from 'serve-once'; +import {fileURLToPath} from 'node:url'; -const mockRequire = require('mock-require'); -const fs = require('node:fs'); -const {join} = require('node:path'); -const {promisify} = require('node:util'); - -const test = require('supertape'); -const tar = require('tar-stream'); -const gunzip = require('gunzip-maybe'); -const pullout = require('pullout'); - -const cloudcmd = require('../../server/cloudcmd.js'); -const serveOnce = require('serve-once'); -const {reRequire} = mockRequire; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); const pathZipFixture = join(__dirname, '..', 'fixture/pack.zip'); const pathTarFixture = join(__dirname, '..', 'fixture/pack.tar.gz'); @@ -20,7 +18,7 @@ const pathTarFixture = join(__dirname, '..', 'fixture/pack.tar.gz'); const defaultOptions = { config: { auth: false, - root: join(__dirname, '..'), + root: new URL('..', import.meta.url).pathname, }, }; @@ -38,7 +36,6 @@ const once = promisify((name, extract, fn) => { }); test('cloudcmd: rest: pack: tar: get', async (t) => { - debugger; const config = { packer: 'tar', auth: false, @@ -67,7 +64,9 @@ test('cloudcmd: rest: pack: tar: get', async (t) => { t.equal(file, data, 'should pack data'); t.end(); -}, {timeout: 7000}); +}, { + timeout: 7000, +}); test('cloudcmd: rest: pack: tar: put: file', async (t) => { const config = { @@ -233,4 +232,3 @@ function getPackOptions(to, names = ['pack']) { from: '/fixture', }; } - diff --git a/test/rest/rename.js b/test/rest/rename.mjs similarity index 85% rename from test/rest/rename.js rename to test/rest/rename.mjs index 74dea5d1..1dd14b63 100644 --- a/test/rest/rename.js +++ b/test/rest/rename.mjs @@ -1,17 +1,9 @@ -'use strict'; - -const fs = require('node:fs'); - -const test = require('supertape'); -const {Volume} = require('memfs'); -const {ufs} = require('unionfs'); - -const serveOnce = require('serve-once'); - -const cloudcmd = require('../../server/cloudcmd.js'); -const cloudcmdPath = '../../'; -const dir = `${cloudcmdPath}server/`; -const restPath = `${dir}rest`; +import fs from 'node:fs'; +import test from 'supertape'; +import {Volume} from 'memfs'; +import {ufs} from 'unionfs'; +import serveOnce from 'serve-once'; +import cloudcmd from '../../server/cloudcmd.mjs'; test('cloudcmd: rest: rename', async (t) => { const volume = { @@ -100,4 +92,3 @@ test('cloudcmd: rest: rename: no to', async (t) => { t.equal(body, expected); t.end(); }); - diff --git a/test/server/console.js b/test/server/console.mjs similarity index 72% rename from test/server/console.js rename to test/server/console.mjs index 49b3cb1e..cf42d5bd 100644 --- a/test/server/console.js +++ b/test/server/console.mjs @@ -1,12 +1,14 @@ -'use strict'; +import path, {dirname} from 'node:path'; +import {once} from 'node:events'; +import test from 'supertape'; +import {fileURLToPath} from 'node:url'; +import {createRequire} from 'node:module'; +import io from 'socket.io-client'; +import {connect} from '../before.mjs'; -const path = require('node:path'); -const {once} = require('node:events'); - -const test = require('supertape'); -const io = require('socket.io-client'); - -const {connect} = require('../before'); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const require = createRequire(import.meta.url); const configPath = path.join(__dirname, '../..', 'server', 'config'); const configFn = require(configPath).createConfig(); diff --git a/test/server/modulas.js b/test/server/modulas.mjs similarity index 74% rename from test/server/modulas.js rename to test/server/modulas.mjs index 3e724c14..7716787e 100644 --- a/test/server/modulas.js +++ b/test/server/modulas.mjs @@ -1,16 +1,21 @@ -'use strict'; +import {createRequire} from 'node:module'; +import {dirname, join} from 'node:path'; +import {fileURLToPath} from 'node:url'; -const {join} = require('node:path'); -const {test, stub} = require('supertape'); +import serveOnce from 'serve-once'; +import {test, stub} from 'supertape'; +import cloudcmd from '../../server/cloudcmd.mjs'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const require = createRequire(import.meta.url); const cloudcmdPath = join(__dirname, '..', '..'); + const modulesPath = join(cloudcmdPath, 'json', 'modules.json'); - const localModules = require(modulesPath); -const modulas = require(`${cloudcmdPath}/server/modulas`); - -const cloudcmd = require(cloudcmdPath); -const {request} = require('serve-once')(cloudcmd, { +const modulas = require(`../../server/modulas`); +const {request} = serveOnce(cloudcmd, { config: { auth: false, dropbox: false, diff --git a/test/static.js b/test/static.mjs similarity index 94% rename from test/static.js rename to test/static.mjs index a821a80b..3033e4e6 100644 --- a/test/static.js +++ b/test/static.mjs @@ -1,17 +1,14 @@ -'use strict'; +import serveOnce from 'serve-once'; +import test from 'supertape'; +import criton from 'criton'; +import cloudcmd from '../server/cloudcmd.mjs'; -const test = require('supertape'); -const criton = require('criton'); - -const cloudcmd = require('..'); const config = { auth: false, }; - -const {request} = require('serve-once')(cloudcmd, { +const {request} = serveOnce(cloudcmd, { config, }); - const configFn = cloudcmd.createConfigManager(); test('cloudcmd: static', async (t) => { From 04e5d5b7e09b1057b9c75e7dbea1e7efb88a7cf0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Mar 2024 23:00:58 +0200 Subject: [PATCH 068/415] chore: cloudcmd: v17.2.0 --- ChangeLog | 9 +++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 36c2ef7c..1d1e4b06 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2024.03.22, v17.2.0 + +feature: +- 3e565109 convert to ESM +- 770a0812 pack: get rid of mock-require +- 25d8faea rest: get rid of mock-require +- 401a669a user-menu: get rid of mock-require +- 4e32241d terminal: get rid of mock-require + 2024.03.21, v17.1.6 feature: diff --git a/HELP.md b/HELP.md index b908fcbf..0f27576f 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.6 +# Cloud Commander v17.2.0 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.22*, **[v17.2.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.2.0)** - *2024.03.21*, **[v17.1.6](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.6)** - *2024.03.20*, **[v17.1.5](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.5)** - *2024.03.20*, **[v17.1.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.4)** diff --git a/README.md b/README.md index aaaf39e6..8aa2e77e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.1.6 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.2.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 93f54dff..9717df94 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.1.6", + "version": "17.2.0", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From f5f34a85ea989655640c4a15893e0ed8d7b000d2 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Mar 2024 23:01:42 +0200 Subject: [PATCH 069/415] chore: server: cloudcmd: sort imports --- server/cloudcmd.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/cloudcmd.mjs b/server/cloudcmd.mjs index 74c55d20..95f2f66b 100644 --- a/server/cloudcmd.mjs +++ b/server/cloudcmd.mjs @@ -1,8 +1,8 @@ import path, {dirname, join} from 'node:path'; import {fileURLToPath} from 'node:url'; -import fullstore from 'fullstore'; import process from 'node:process'; import fs from 'node:fs'; +import fullstore from 'fullstore'; import currify from 'currify'; import apart from 'apart'; import ponse from 'ponse'; From bf2e8f9a7dab89e74c32b512682a57a9360b7c03 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 22 Mar 2024 21:03:18 +0000 Subject: [PATCH 070/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/route.spec.mjs | 2 +- test/rest/copy.mjs | 3 +++ test/server/modulas.mjs | 3 +-- test/static.mjs | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/server/route.spec.mjs b/server/route.spec.mjs index 7d9e625d..696c4d18 100644 --- a/server/route.spec.mjs +++ b/server/route.spec.mjs @@ -325,7 +325,7 @@ test('cloudcmd: route: buttons: no terminal', async (t) => { t.end(); }); -test('cloudcmd: route: no termianl: /fs', async (t) => { +test('cloudcmd: route: no terminal: /fs', async (t) => { const config = { terminal: false, }; diff --git a/test/rest/copy.mjs b/test/rest/copy.mjs index 99e766ce..3c673b7b 100644 --- a/test/rest/copy.mjs +++ b/test/rest/copy.mjs @@ -8,9 +8,11 @@ import cloudcmd from '../../server/cloudcmd.mjs'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); + const config = { root: new URL('..', import.meta.url).pathname, }; + const configManager = cloudcmd.createConfigManager(); configManager('auth', false); @@ -18,6 +20,7 @@ const {request} = serveOnce(cloudcmd, { config, configManager, }); + const fixtureDir = join(__dirname, '..', 'fixture') + '/'; test('cloudcmd: rest: copy', async (t) => { diff --git a/test/server/modulas.mjs b/test/server/modulas.mjs index 7716787e..ed2f736f 100644 --- a/test/server/modulas.mjs +++ b/test/server/modulas.mjs @@ -1,10 +1,8 @@ import {createRequire} from 'node:module'; import {dirname, join} from 'node:path'; import {fileURLToPath} from 'node:url'; - import serveOnce from 'serve-once'; import {test, stub} from 'supertape'; - import cloudcmd from '../../server/cloudcmd.mjs'; const __filename = fileURLToPath(import.meta.url); @@ -15,6 +13,7 @@ const cloudcmdPath = join(__dirname, '..', '..'); const modulesPath = join(cloudcmdPath, 'json', 'modules.json'); const localModules = require(modulesPath); const modulas = require(`../../server/modulas`); + const {request} = serveOnce(cloudcmd, { config: { auth: false, diff --git a/test/static.mjs b/test/static.mjs index 3033e4e6..8d65c384 100644 --- a/test/static.mjs +++ b/test/static.mjs @@ -6,9 +6,11 @@ import cloudcmd from '../server/cloudcmd.mjs'; const config = { auth: false, }; + const {request} = serveOnce(cloudcmd, { config, }); + const configFn = cloudcmd.createConfigManager(); test('cloudcmd: static', async (t) => { From b1f74c00577f732795e8f833c9ebec39470a8870 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 28 Mar 2024 14:39:26 +0200 Subject: [PATCH 071/415] feature: css: add vars --- css/main.css | 1 + css/query.css | 2 +- css/style.css | 13 ++++--------- css/user-menu.css | 2 +- css/vars.css | 4 ++++ 5 files changed, 11 insertions(+), 11 deletions(-) create mode 100644 css/vars.css diff --git a/css/main.css b/css/main.css index b30c0ed3..dc24e51b 100644 --- a/css/main.css +++ b/css/main.css @@ -1,3 +1,4 @@ +@import url(./vars.css); @import url(./urls.css); @import url(./reset.css); @import url(./style.css); diff --git a/css/query.css b/css/query.css index d1101404..6b7c98a4 100644 --- a/css/query.css +++ b/css/query.css @@ -121,7 +121,7 @@ /* текущий файл под курсором */ .current-file { - background-color: var(--color-transparent); + background-color: var(--border-color); color: white; } /* делаем иконки под курсом белыми */ diff --git a/css/style.css b/css/style.css index 5836ec95..e9d374a2 100644 --- a/css/style.css +++ b/css/style.css @@ -1,8 +1,3 @@ -:root { - --color: rgb(49 123 249); - --color-transparent: rgb(49 123 249 / 40%); -} - html { height: 94%; } @@ -51,7 +46,7 @@ code { .panel, .cmd-button { border: 1px solid; - border-color: var(--color-transparent); + border-color: var(--border-color); } .icon { @@ -98,7 +93,7 @@ code { bottom: 5px; left: 16px; font-size: 10px; - color: var(--color); + color: var(--icon-color); content: attr(data-progress); } @@ -118,7 +113,7 @@ code { .cmd-button:active { color: white; - background-color: var(--color); + background-color: var(--icon-color); transition: ease 0.1s; } @@ -169,7 +164,7 @@ a:active { } .current-file { - box-shadow: 0 0 0 1px var(--color-transparent) inset; + box-shadow: 0 0 0 1px var(--border-color) inset; } .cut-file { diff --git a/css/user-menu.css b/css/user-menu.css index 9b8fe7bb..93eff00a 100644 --- a/css/user-menu.css +++ b/css/user-menu.css @@ -9,7 +9,7 @@ } .cloudcmd-user-menu > option:checked { - box-shadow: 20px -20px 0 2px var(--color) inset; + box-shadow: 20px -20px 0 2px var(--icon-color) inset; } .cloudcmd-user-menu-button { diff --git a/css/vars.css b/css/vars.css new file mode 100644 index 00000000..0f8c9579 --- /dev/null +++ b/css/vars.css @@ -0,0 +1,4 @@ +:root { + --icon-color: rgb(49 123 249); + --border-color: rgb(49 123 249 / 40%); +} From c45b23fe5590da34b161fcd019da2c672b384721 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 28 Mar 2024 15:02:44 +0200 Subject: [PATCH 072/415] feature: css: vars: add --- css/main.css | 5 ++++- css/style.css | 15 ++++++++++++--- css/themes/dark.css | 6 ++++++ css/themes/light.css | 6 ++++++ css/user-menu.css | 2 +- css/vars.css | 2 +- 6 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 css/themes/dark.css create mode 100644 css/themes/light.css diff --git a/css/main.css b/css/main.css index dc24e51b..58ac7d9c 100644 --- a/css/main.css +++ b/css/main.css @@ -1,6 +1,9 @@ -@import url(./vars.css); +/*@import url(./themes/dark.css);*/ +@import url(./themes/light.css); + @import url(./urls.css); @import url(./reset.css); + @import url(./style.css); @import url(./icons.css); @import url(./help.css); diff --git a/css/style.css b/css/style.css index e9d374a2..ad45e44e 100644 --- a/css/style.css +++ b/css/style.css @@ -6,7 +6,7 @@ body { width: 100%; height: 95%; overflow: hidden; - background-color: white; + background-color: var(--background-color); } body, @@ -93,7 +93,7 @@ code { bottom: 5px; left: 16px; font-size: 10px; - color: var(--icon-color); + color: var(--text-color); content: attr(data-progress); } @@ -113,7 +113,7 @@ code { .cmd-button:active { color: white; - background-color: var(--icon-color); + background-color: var(--text-color); transition: ease 0.1s; } @@ -157,6 +157,7 @@ a:active { .fm-header { font-weight: bold; + color: var(--column-color); } .panel-left { @@ -203,6 +204,10 @@ a:active { width: 26%; } +.name a { + color: var(--text-color); +} + .name a:hover { cursor: default; } @@ -212,11 +217,13 @@ a:active { width: 12%; margin-right: 27px; text-align: right; + color: var(--column-color); } .date { float: left; width: 19%; + color: var(--column-color); } .owner { @@ -228,11 +235,13 @@ a:active { * spaces behind lines */ vertical-align: top; + color: var(--column-color); } .mode { float: right; width: 18%; + color: var(--column-color); } .reduce-text { diff --git a/css/themes/dark.css b/css/themes/dark.css new file mode 100644 index 00000000..fc4461bf --- /dev/null +++ b/css/themes/dark.css @@ -0,0 +1,6 @@ +:root { + --text-color: #317bf9; + --border-color: rgb(49 123 249 / 40%); + --background-color: #22272e; + --column-color: #c6d1df; +} diff --git a/css/themes/light.css b/css/themes/light.css new file mode 100644 index 00000000..aaf3ebd9 --- /dev/null +++ b/css/themes/light.css @@ -0,0 +1,6 @@ +:root { + --text-color: blue; + --border-color: rgb(49 123 249 / 40%); + --background-color: white; + --column-color: black; +} diff --git a/css/user-menu.css b/css/user-menu.css index 93eff00a..3f78f63c 100644 --- a/css/user-menu.css +++ b/css/user-menu.css @@ -9,7 +9,7 @@ } .cloudcmd-user-menu > option:checked { - box-shadow: 20px -20px 0 2px var(--icon-color) inset; + box-shadow: 20px -20px 0 2px var(--text-color) inset; } .cloudcmd-user-menu-button { diff --git a/css/vars.css b/css/vars.css index 0f8c9579..ee64b015 100644 --- a/css/vars.css +++ b/css/vars.css @@ -1,4 +1,4 @@ :root { - --icon-color: rgb(49 123 249); + --text-color: rgb(49 123 249); --border-color: rgb(49 123 249 / 40%); } From e3f89e88456fc397084e69e30d9b9d9980de4c16 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 10:08:41 +0200 Subject: [PATCH 073/415] feature: dark mode: add --- css/config.css | 3 ++- css/style.css | 14 +++++++------- css/themes/dark.css | 45 +++++++++++++++++++++++++++++++++++++++++--- css/themes/light.css | 7 +++++-- css/user-menu.css | 2 +- 5 files changed, 57 insertions(+), 14 deletions(-) diff --git a/css/config.css b/css/config.css index ba6a1e3c..4804374a 100644 --- a/css/config.css +++ b/css/config.css @@ -18,7 +18,8 @@ padding: 0 12px; font-size: 16px; line-height: 1.5; - color: #555; + color: var(--column-color); + background: var(--internal-background); border: 1px solid #ccc; -webkit-box-shadow: inset 0 1px 1px rgb(0 0 0 / 7.5%); -moz-box-shadow: inset 0 1px 1px rgb(0 0 0 / 7.5%); diff --git a/css/style.css b/css/style.css index ad45e44e..d5d2ffff 100644 --- a/css/style.css +++ b/css/style.css @@ -6,7 +6,7 @@ body { width: 100%; height: 95%; overflow: hidden; - background-color: var(--background-color); + background-color: var(--background); } body, @@ -60,7 +60,7 @@ code { .path-icon { position: relative; - color: #222; + color: var(--icon-color); } .path-icon:active { @@ -93,7 +93,7 @@ code { bottom: 5px; left: 16px; font-size: 10px; - color: var(--text-color); + color: var(--link-color); content: attr(data-progress); } @@ -101,8 +101,8 @@ code { width: 5%; height: 30px; margin: 20px 2px 0; - color: #222; - background-color: white; + color: var(--icon-color); + background-color: var(--button-background); transition: ease 0.1s; } @@ -113,7 +113,7 @@ code { .cmd-button:active { color: white; - background-color: var(--text-color); + background-color: var(--link-color); transition: ease 0.1s; } @@ -205,7 +205,7 @@ a:active { } .name a { - color: var(--text-color); + color: var(--link-color); } .name a:hover { diff --git a/css/themes/dark.css b/css/themes/dark.css index fc4461bf..5008cc20 100644 --- a/css/themes/dark.css +++ b/css/themes/dark.css @@ -1,6 +1,45 @@ :root { - --text-color: #317bf9; + --link-color: #317bf9; --border-color: rgb(49 123 249 / 40%); - --background-color: #22272e; - --column-color: #c6d1df; + --background: #22272e; + --column-color: #727e8c; + --icon-color: #478be6; + --button-background: #22272e; + --internal-background: #373e47; +} + +.view { + background: var(--internal-background) !important; + color: var(--column-color) !important; +} +.view a { + color: var(--link-color) !important; +} + +.smalltalk .page, .smalltalk header, .smalltalk .button-strip button, .smalltalk input{ + background: var(--internal-background) !important; + color: var(--link-color) !important; + text-shadow: none !important; +} + +.cloudcmd-user-menu, .cloudcmd-user-menu-button { + background: var(--internal-background) !important; + color: var(--link-color) !important; +} + +.jqconsole { + background: #373e47 !important; +} + +.jqconsole-prompt { + color: var(--column-color) !important; +} + +.log-msg { + color: var(--column-color) !important; +} + +.menu { + color: var(--link-color) !important; + background: var(--internal-background) !important; } diff --git a/css/themes/light.css b/css/themes/light.css index aaf3ebd9..e95eb441 100644 --- a/css/themes/light.css +++ b/css/themes/light.css @@ -1,6 +1,9 @@ :root { - --text-color: blue; + --link-color: blue; + --selected-menu-item-color: #317bf9; --border-color: rgb(49 123 249 / 40%); - --background-color: white; + --background: white; --column-color: black; + --icon-color: #222; + --button-background: white; } diff --git a/css/user-menu.css b/css/user-menu.css index 3f78f63c..792747f4 100644 --- a/css/user-menu.css +++ b/css/user-menu.css @@ -9,7 +9,7 @@ } .cloudcmd-user-menu > option:checked { - box-shadow: 20px -20px 0 2px var(--text-color) inset; + box-shadow: 20px -20px 0 2px var(--selected-menu-item-color) inset; } .cloudcmd-user-menu-button { From cc134464a40cf07f4a92627504a471e4698d6478 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 10:31:23 +0200 Subject: [PATCH 074/415] fix: client: vim: space --- client/key/vim/vim.js | 5 ++++- client/key/vim/vim.spec.js | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/client/key/vim/vim.js b/client/key/vim/vim.js index ef454442..99fe2acf 100644 --- a/client/key/vim/vim.js +++ b/client/key/vim/vim.js @@ -21,7 +21,7 @@ const rmFirst = (a) => { const noop = () => {}; -module.exports = (key, operations) => { +module.exports = (key, operations = {}) => { const prevStore = store(); const isVisual = visual(); const value = store(prevStore.concat(key)); @@ -169,6 +169,9 @@ module.exports = (key, operations) => { findPrevious(); return end(); } + + if (key === ' ') + return end(); }; function handleDelete(prevStore) { diff --git a/client/key/vim/vim.spec.js b/client/key/vim/vim.spec.js index d0213369..f4ea0683 100644 --- a/client/key/vim/vim.spec.js +++ b/client/key/vim/vim.spec.js @@ -11,6 +11,24 @@ test('vim: no operations', (t) => { t.end(); }); +test('vim: space', (t) => { + const moveNext = stub(); + + vim(' '); + vim('j', { + moveNext, + }); + + const args = [{ + count: 1, + isDelete: false, + isVisual: false, + }]; + + t.calledWith(moveNext, args); + t.end(); +}); + test('vim: ^', (t) => { const movePrevious = stub(); From cf9ed97c3e0b7e50ea7c6c01d9fa6a3c673d576f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 10:31:42 +0200 Subject: [PATCH 075/415] chore: lint --- css/main.css | 4 +--- css/style.css | 26 +++++++++++++------------- css/themes/dark.css | 8 ++++++-- 3 files changed, 20 insertions(+), 18 deletions(-) diff --git a/css/main.css b/css/main.css index 58ac7d9c..e742316e 100644 --- a/css/main.css +++ b/css/main.css @@ -1,9 +1,7 @@ -/*@import url(./themes/dark.css);*/ +/* @import url(./themes/dark.css); */ @import url(./themes/light.css); - @import url(./urls.css); @import url(./reset.css); - @import url(./style.css); @import url(./icons.css); @import url(./help.css); diff --git a/css/style.css b/css/style.css index d5d2ffff..1aa3a55a 100644 --- a/css/style.css +++ b/css/style.css @@ -172,6 +172,19 @@ a:active { opacity: 0.7; } +.name { + float: left; + width: 26%; +} + +.name a { + color: var(--link-color); +} + +.name a:hover { + cursor: default; +} + .selected-file, .selected-file .name > a { color: rgb(254 159 224); @@ -199,19 +212,6 @@ a:active { text-align: center; } -.name { - float: left; - width: 26%; -} - -.name a { - color: var(--link-color); -} - -.name a:hover { - cursor: default; -} - .size { float: left; width: 12%; diff --git a/css/themes/dark.css b/css/themes/dark.css index 5008cc20..311a8093 100644 --- a/css/themes/dark.css +++ b/css/themes/dark.css @@ -16,13 +16,17 @@ color: var(--link-color) !important; } -.smalltalk .page, .smalltalk header, .smalltalk .button-strip button, .smalltalk input{ +.smalltalk .page, +.smalltalk header, +.smalltalk .button-strip button, +.smalltalk input { background: var(--internal-background) !important; color: var(--link-color) !important; text-shadow: none !important; } -.cloudcmd-user-menu, .cloudcmd-user-menu-button { +.cloudcmd-user-menu, +.cloudcmd-user-menu-button { background: var(--internal-background) !important; color: var(--link-color) !important; } From 65cf97a7bea1caa966ff8b7e9f7c54ba0870dd84 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 10:33:09 +0200 Subject: [PATCH 076/415] chore: cloudcmd: v17.2.1 --- ChangeLog | 10 ++++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1d1e4b06..18dcfedc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2024.03.29, v17.2.1 + +fix: +- cc134464 client: vim: space + +feature: +- e3f89e88 dark mode: add +- c45b23fe css: vars: add +- b1f74c00 css: add vars + 2024.03.22, v17.2.0 feature: diff --git a/HELP.md b/HELP.md index 0f27576f..b9120dc5 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.2.0 +# Cloud Commander v17.2.1 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.29*, **[v17.2.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.2.1)** - *2024.03.22*, **[v17.2.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.2.0)** - *2024.03.21*, **[v17.1.6](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.6)** - *2024.03.20*, **[v17.1.5](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.5)** diff --git a/README.md b/README.md index 8aa2e77e..dcc9e596 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.2.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.2.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 9717df94..65f60d68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.2.0", + "version": "17.2.1", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 35622082a952073190d75256641b86d84863e64b Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 11:24:25 +0200 Subject: [PATCH 077/415] feature: route: convert to ESM --- server/cloudcmd.mjs | 2 +- server/{route.js => route.mjs} | 45 +++++++++++++++++----------------- server/route.spec.mjs | 2 +- 3 files changed, 24 insertions(+), 25 deletions(-) rename server/{route.js => route.mjs} (84%) diff --git a/server/cloudcmd.mjs b/server/cloudcmd.mjs index 95f2f66b..76f9e937 100644 --- a/server/cloudcmd.mjs +++ b/server/cloudcmd.mjs @@ -20,7 +20,7 @@ import {createConfig, configPath} from './config.js'; import modulas from './modulas.js'; import userMenu from './user-menu.mjs'; import rest from './rest/index.js'; -import route from './route.js'; +import route from './route.mjs'; import validate from './validate.js'; import prefixer from './prefixer.js'; import terminal from './terminal.js'; diff --git a/server/route.js b/server/route.mjs similarity index 84% rename from server/route.js rename to server/route.mjs index ab5ea491..60fd70f1 100644 --- a/server/route.js +++ b/server/route.mjs @@ -1,24 +1,22 @@ -'use strict'; - -const {extname} = require('node:path'); - -const _win32 = require('win32'); -const ponse = require('ponse'); -const rendy = require('rendy'); -const format = require('format-io'); -const currify = require('currify'); -const wraptile = require('wraptile'); -const tryToCatch = require('try-to-catch'); -const once = require('once'); -const pipe = require('pipe-io'); -const {contentType} = require('mime-types'); - -const root = require(`./root`); -const prefixer = require(`./prefixer`); -const CloudFunc = require(`../common/cloudfunc`); -const {getColumns} = require(`./columns`); -const Template = require(`./template`); +import {createRequire} from 'node:module'; +import {extname} from 'node:path'; +import _win32 from 'win32'; +import ponse from 'ponse'; +import rendy from 'rendy'; +import format from 'format-io'; +import currify from 'currify'; +import wraptile from 'wraptile'; +import tryToCatch from 'try-to-catch'; +import once from 'once'; +import pipe from 'pipe-io'; +import {contentType} from 'mime-types'; +import root from './root.js'; +import prefixer from './prefixer.js'; +import CloudFunc from '../common/cloudfunc.js'; +import {getColumns} from './columns.js'; +import Template from './template.js'; +const require = createRequire(import.meta.url); const {stringify} = JSON; const {FS} = CloudFunc; @@ -46,7 +44,7 @@ const getReadDir = (config, {win32 = _win32} = {}) => { /** * routing of server queries */ -module.exports = currify((config, options, request, response, next) => { +export default currify((config, options, request, response, next) => { const name = ponse.getPathName(request); const isFS = RegExp(`^/$|^${FS}`).test(name); @@ -61,7 +59,7 @@ module.exports = currify((config, options, request, response, next) => { }).catch(next); }); -module.exports._getReadDir = getReadDir; +export const _getReadDir = getReadDir; async function route({config, options, request, response}) { const name = ponse.getPathName(request); @@ -184,7 +182,8 @@ function buildIndex(config, html, data) { }); } -module.exports._hideKeysPanel = hideKeysPanel; +export const _hideKeysPanel = hideKeysPanel; + function hideKeysPanel(html) { const keysPanel = '
    Date: Fri, 29 Mar 2024 13:25:23 +0200 Subject: [PATCH 078/415] feature: dark theme: add (#332) --- .webpack/css.js | 5 +-- .webpack/html.js | 2 +- HELP.md | 8 ++--- bin/cloudcmd.mjs | 15 ++++++--- client/cloudcmd.js | 5 +-- client/css.js | 8 +++++ client/modules/config/index.js | 2 ++ css/main.css | 2 -- css/style.css | 1 + css/vars.css | 4 --- html/index.html | 3 ++ json/config.json | 1 + json/help.json | 1 + man/cloudcmd.1 | 1 + server/cloudcmd.mjs | 4 +-- server/{columns.js => columns.mjs} | 23 ++++++------- server/{columns.spec.js => columns.spec.mjs} | 11 ++++--- server/route.mjs | 4 ++- server/theme.mjs | 33 +++++++++++++++++++ server/themes.spec.mjs | 31 ++++++++++++++++++ server/{validate.js => validate.mjs} | 34 ++++++++++++++------ server/validate.spec.mjs | 31 +++++++++++++++++- tmpl/config.hbs | 8 ++++- 23 files changed, 186 insertions(+), 51 deletions(-) create mode 100644 client/css.js delete mode 100644 css/vars.css rename server/{columns.js => columns.mjs} (58%) rename server/{columns.spec.js => columns.spec.mjs} (72%) create mode 100644 server/theme.mjs create mode 100644 server/themes.spec.mjs rename server/{validate.js => validate.mjs} (51%) diff --git a/.webpack/css.js b/.webpack/css.js index 773a3da2..e1d6552d 100644 --- a/.webpack/css.js +++ b/.webpack/css.js @@ -1,5 +1,6 @@ 'use strict'; +const {env} = require('node:process'); const fs = require('node:fs'); const { basename, @@ -10,7 +11,6 @@ const { const ExtractTextPlugin = require('extract-text-webpack-plugin'); const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); -const {env} = require('node:process'); const isDev = env.NODE_ENV === 'development'; const extractCSS = (a) => new ExtractTextPlugin(`${a}.css`); @@ -23,6 +23,7 @@ const cssNames = [ 'terminal', 'user-menu', ...getCSSList('columns'), + ...getCSSList('themes'), ]; const cssPlugins = cssNames.map(extractCSS); @@ -36,7 +37,7 @@ const plugins = clean([ const rules = [{ test: /\.css$/, - exclude: /css\/(nojs|view|config|terminal|user-menu|columns.*)\.css/, + exclude: /css\/(nojs|view|config|terminal|user-menu|columns.*|themes.*)\.css/, use: extractMain.extract(['css-loader']), }, ...cssPlugins.map(extract), { test: /\.(png|gif|svg|woff|woff2|eot|ttf)$/, diff --git a/.webpack/html.js b/.webpack/html.js index 2bb2b98c..3717bcc9 100644 --- a/.webpack/html.js +++ b/.webpack/html.js @@ -1,7 +1,7 @@ 'use strict'; -const HtmlWebpackPlugin = require('html-webpack-plugin'); const {env} = require('node:process'); +const HtmlWebpackPlugin = require('html-webpack-plugin'); const isDev = env.NODE_ENV === 'development'; diff --git a/HELP.md b/HELP.md index b9120dc5..49ffb0ea 100644 --- a/HELP.md +++ b/HELP.md @@ -93,7 +93,7 @@ Cloud Commander supports the following command-line parameters: | `--terminal-command` | set command to run in terminal (shell by default) | `--terminal-auto-restart` | restart command on exit | `--vim` | enable vim hot keys -| `--columns` | set visible columns +| `--themes` | set visible themes | `--export` | enable export of config through a server | `--export-token` | authorization token used by export server | `--import` | enable import of config @@ -122,7 +122,7 @@ Cloud Commander supports the following command-line parameters: | `--no-terminal-command` | set default shell to run in terminal | `--no-terminal-auto-restart` | do not restart command on exit | `--no-vim` | disable vim hot keys -| `--no-columns` | set default visible columns +| `--no-themes` | set default visible themes | `--no-export` | disable export config through a server | `--no-import` | disable import of config | `--no-import-listen` | disable listen on config updates from import server @@ -408,7 +408,7 @@ Here's a description of all options: "terminalCommand": "", // set command to run in terminal "terminalAutoRestart": true, // restart command on exit "vim": false, // disable vim hot keys - "columns": "name-size-date-owner-mode", // set visible columns + "themes": "name-size-date-owner-mode", // set visible themes "export": false, // enable export of config through a server "exportToken": "root", // token used by export server "import": false, // enable import of config @@ -428,7 +428,7 @@ Some config options can be overridden with environment variables, such as: - `CLOUDCMD_NAME` - set tab name in web browser - `CLOUDCMD_OPEN` - open web browser when server started - `CLOUDCMD_EDITOR` - set editor -- `CLOUDCMD_COLUMNS` - set visible columns +- `CLOUDCMD_COLUMNS` - set visible themes - `CLOUDCMD_CONTACT` - enable contact - `CLOUDCMD_CONFIG_DIALOG` - enable config dialog - `CLOUDCMD_CONFIG_AUTH` - enable auth change in config dialog diff --git a/bin/cloudcmd.mjs b/bin/cloudcmd.mjs index 4bd88610..6ec0ec40 100755 --- a/bin/cloudcmd.mjs +++ b/bin/cloudcmd.mjs @@ -1,15 +1,16 @@ #!/usr/bin/env node +import process from 'node:process'; import {createRequire} from 'node:module'; import {promisify} from 'node:util'; import tryToCatch from 'try-to-catch'; import {createSimport} from 'simport'; import parse from 'yargs-parser'; -import process from 'node:process'; import exit from '../server/exit.js'; import {createConfig, configPath} from '../server/config.js'; import env from '../server/env.js'; import prefixer from '../server/prefixer.js'; +import * as validate from '../server/validate.mjs'; process.on('unhandledRejection', exit); @@ -61,6 +62,7 @@ const yargsOptions = { 'terminal-path', 'terminal-command', 'columns', + 'theme', 'import-url', 'import-token', 'export-token', @@ -112,6 +114,7 @@ const yargsOptions = { 'contact': choose(env.bool('contact'), config('contact')), 'terminal': choose(env.bool('terminal'), config('terminal')), 'columns': env('columns') || config('columns') || '', + 'theme': env('theme') || config('theme') || '', 'vim': choose(env.bool('vim'), config('vim')), 'log': config('log'), @@ -174,6 +177,9 @@ async function main() { if (args.repl) repl(); + validate.columns(args.columns); + validate.theme(args.theme); + port(args.port); config('name', args.name); @@ -194,6 +200,7 @@ async function main() { config('prefixSocket', prefixer(args.prefixSocket)); config('root', args.root || '/'); config('vim', args.vim); + config('theme', args.theme); config('columns', args.columns); config('log', args.log); config('confirmCopy', args.confirmCopy); @@ -221,6 +228,7 @@ async function main() { prefix: config('prefix'), prefixSocket: config('prefixSocket'), columns: config('columns'), + theme: config('theme'), }; const password = env('password') || args.password; @@ -228,7 +236,7 @@ async function main() { if (password) config('password', await getPassword(password)); - await validateRoot(options.root, config); + validateRoot(options.root, config); if (args.showConfig) await showConfig(); @@ -245,8 +253,7 @@ async function main() { await importConfig(config); } -async function validateRoot(root, config) { - const validate = await simport(`${DIR_SERVER}validate.js`); +function validateRoot(root, config) { validate.root(root, config); if (root === '/') diff --git a/client/cloudcmd.js b/client/cloudcmd.js index 59ebfe4e..937f6d77 100644 --- a/client/cloudcmd.js +++ b/client/cloudcmd.js @@ -1,10 +1,7 @@ 'use strict'; const process = require('node:process'); -require('../css/main.css'); -require('../css/nojs.css'); -require('../css/columns/name-size-date.css'); -require('../css/columns/name-size.css'); +require('./css'); const wraptile = require('wraptile'); const load = require('load.js'); diff --git a/client/css.js b/client/css.js new file mode 100644 index 00000000..e404bf94 --- /dev/null +++ b/client/css.js @@ -0,0 +1,8 @@ +'use strict'; + +require('../css/main.css'); +require('../css/nojs.css'); +require('../css/columns/name-size-date.css'); +require('../css/columns/name-size.css'); +require('../css/themes/light.css'); +require('../css/themes/dark.css'); diff --git a/client/modules/config/index.js b/client/modules/config/index.js index 76fed60b..cdd18da1 100644 --- a/client/modules/config/index.js +++ b/client/modules/config/index.js @@ -137,6 +137,7 @@ async function fillTemplate() { editor, packer, columns, + theme, configAuth, ...obj } = input.convert(config); @@ -144,6 +145,7 @@ async function fillTemplate() { obj[`${editor}-selected`] = 'selected'; obj[`${packer}-selected`] = 'selected'; obj[`${columns}-selected`] = 'selected'; + obj[`${theme}-selected`] = 'selected'; obj.configAuth = configAuth ? '' : 'hidden'; const innerHTML = rendy(Template, obj); diff --git a/css/main.css b/css/main.css index e742316e..b30c0ed3 100644 --- a/css/main.css +++ b/css/main.css @@ -1,5 +1,3 @@ -/* @import url(./themes/dark.css); */ -@import url(./themes/light.css); @import url(./urls.css); @import url(./reset.css); @import url(./style.css); diff --git a/css/style.css b/css/style.css index 1aa3a55a..5a1f04b7 100644 --- a/css/style.css +++ b/css/style.css @@ -41,6 +41,7 @@ code { -ms-user-select: initial; -o-user-select: initial; user-select: text; + color: var(--column-color); } .panel, diff --git a/css/vars.css b/css/vars.css deleted file mode 100644 index ee64b015..00000000 --- a/css/vars.css +++ /dev/null @@ -1,4 +0,0 @@ -:root { - --text-color: rgb(49 123 249); - --border-color: rgb(49 123 249 / 40%); -} diff --git a/html/index.html b/html/index.html index 00ae977e..51fa8893 100644 --- a/html/index.html +++ b/html/index.html @@ -15,6 +15,9 @@ +
    {{ fm }}
    diff --git a/json/config.json b/json/config.json index 7387e158..fd66580f 100644 --- a/json/config.json +++ b/json/config.json @@ -34,6 +34,7 @@ "showFileName": false, "vim": false, "columns": "name-size-date-owner-mode", + "theme": "light", "export": false, "exportToken": "root", "import": false, diff --git a/json/help.json b/json/help.json index 8efa9e60..056713ff 100644 --- a/json/help.json +++ b/json/help.json @@ -32,6 +32,7 @@ "--terminal-auto-restart ": "restart command on exit", "--vim ": "enable vim hot keys", "--columns ": "set visible columns", + "--theme ": "set theme 'light' or 'dark'", "--export ": "enable export of config through a server", "--export-token ": "authorization token used by export server", "--import ": "enable import of config", diff --git a/man/cloudcmd.1 b/man/cloudcmd.1 index 781e01e1..9ce86c60 100644 --- a/man/cloudcmd.1 +++ b/man/cloudcmd.1 @@ -55,6 +55,7 @@ programs in browser from any computer, mobile or tablet device. --terminal-auto-restart restart command on exit --vim enable vim hot keys --columns set visible columns + --theme set theme 'light' or 'dark' --export enable export of config through a server --export-token authorization token used by export server --import enable import of config diff --git a/server/cloudcmd.mjs b/server/cloudcmd.mjs index 76f9e937..5c2c9eef 100644 --- a/server/cloudcmd.mjs +++ b/server/cloudcmd.mjs @@ -21,7 +21,7 @@ import modulas from './modulas.js'; import userMenu from './user-menu.mjs'; import rest from './rest/index.js'; import route from './route.mjs'; -import validate from './validate.js'; +import * as validate from './validate.mjs'; import prefixer from './prefixer.js'; import terminal from './terminal.js'; import distribute from './distribute/index.js'; @@ -64,7 +64,7 @@ function cloudcmd(params) { if (/root/.test(name)) validate.root(value, config); - if (/editor|packer|columns/.test(name)) + if (/editor|packer|themes/.test(name)) validate[name](value); if (/prefix/.test(name)) diff --git a/server/columns.js b/server/columns.mjs similarity index 58% rename from server/columns.js rename to server/columns.mjs index 8cd91114..f1fe7868 100644 --- a/server/columns.js +++ b/server/columns.mjs @@ -1,13 +1,14 @@ -'use strict'; - -const fullstore = require('fullstore'); -const process = require('node:process'); -const path = require('node:path'); -const fs = require('node:fs'); - -const {nanomemoize} = require('nano-memoize'); -const readFilesSync = require('@cloudcmd/read-files-sync'); +import path, {dirname} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import process from 'node:process'; +import fs from 'node:fs'; +import fullstore from 'fullstore'; +import nanomemoizeDefault from 'nano-memoize'; +import readFilesSync from '@cloudcmd/read-files-sync'; +const {nanomemoize} = nanomemoizeDefault; +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); const isMap = (a) => /\.map$/.test(a); const not = (fn) => (a) => !fn(a); @@ -19,9 +20,9 @@ const defaultColumns = { const _isDev = fullstore(process.env.NODE_ENV === 'development'); const getDist = (isDev) => isDev ? 'dist-dev' : 'dist'; -module.exports.isDev = _isDev; +export const isDev = _isDev; -module.exports.getColumns = ({isDev = _isDev()} = {}) => { +export const getColumns = ({isDev = _isDev()} = {}) => { const columns = readFilesSyncMemo(isDev); return { diff --git a/server/columns.spec.js b/server/columns.spec.mjs similarity index 72% rename from server/columns.spec.js rename to server/columns.spec.mjs index cdf7a6ab..1e62f5f7 100644 --- a/server/columns.spec.js +++ b/server/columns.spec.mjs @@ -1,8 +1,11 @@ -'use strict'; +import {dirname} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import test from 'supertape'; +import fs from 'node:fs'; +import {getColumns, isDev} from './columns.mjs'; -const test = require('supertape'); -const fs = require('node:fs'); -const {getColumns, isDev} = require('./columns'); +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); test('columns: prod', (t) => { const columns = getColumns({ diff --git a/server/route.mjs b/server/route.mjs index 60fd70f1..5397c27f 100644 --- a/server/route.mjs +++ b/server/route.mjs @@ -13,8 +13,9 @@ import {contentType} from 'mime-types'; import root from './root.js'; import prefixer from './prefixer.js'; import CloudFunc from '../common/cloudfunc.js'; -import {getColumns} from './columns.js'; import Template from './template.js'; +import {getColumns} from './columns.mjs'; +import {getThemes} from './theme.mjs'; const require = createRequire(import.meta.url); const {stringify} = JSON; @@ -164,6 +165,7 @@ function indexProcessing(config, options) { prefix: getPrefix(config), config: stringify(config('*')), columns: getColumns()[config('columns')], + themes: getThemes()[config('theme')], }); return data; diff --git a/server/theme.mjs b/server/theme.mjs new file mode 100644 index 00000000..1102e4e7 --- /dev/null +++ b/server/theme.mjs @@ -0,0 +1,33 @@ +import path, {dirname} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import process from 'node:process'; +import fs from 'node:fs'; +import fullstore from 'fullstore'; +import nanomemoizeDefault from 'nano-memoize'; +import readFilesSync from '@cloudcmd/read-files-sync'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); +const isMap = (a) => /\.map$/.test(a); +const not = (fn) => (a) => !fn(a); + +const _isDev = fullstore(process.env.NODE_ENV === 'development'); +const getDist = (isDev) => isDev ? 'dist-dev' : 'dist'; + +export const isDev = _isDev; + +export const getThemes = ({isDev = _isDev()} = {}) => { + return readFilesSyncMemo(isDev); +}; + +const {nanomemoize} = nanomemoizeDefault; + +const readFilesSyncMemo = nanomemoize((isDev) => { + const dist = getDist(isDev); + const themesDir = path.join(__dirname, '..', dist, 'themes'); + const names = fs + .readdirSync(themesDir) + .filter(not(isMap)); + + return readFilesSync(themesDir, names, 'utf8'); +}); diff --git a/server/themes.spec.mjs b/server/themes.spec.mjs new file mode 100644 index 00000000..6c828343 --- /dev/null +++ b/server/themes.spec.mjs @@ -0,0 +1,31 @@ +import {dirname} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import test from 'supertape'; +import fs from 'node:fs'; +import {getThemes, isDev} from './theme.mjs'; + +const __filename = fileURLToPath(import.meta.url); +const __dirname = dirname(__filename); + +test('themes: dev', (t) => { + const themes = getThemes({ + isDev: true, + }); + + const css = fs.readFileSync(`${__dirname}/../css/themes/dark.css`, 'utf8'); + + t.equal(themes.dark, css); + t.end(); +}); + +test('themes: no args', (t) => { + const currentIsDev = isDev(); + isDev(true); + const themes = getThemes(); + + const css = fs.readFileSync(`${__dirname}/../css/themes/light.css`, 'utf8'); + isDev(currentIsDev); + + t.equal(themes.light, css); + t.end(); +}); diff --git a/server/validate.js b/server/validate.mjs similarity index 51% rename from server/validate.js rename to server/validate.mjs index 082dbd90..bf825e85 100644 --- a/server/validate.js +++ b/server/validate.mjs @@ -1,13 +1,12 @@ -'use strict'; +import {statSync as _statSync} from 'node:fs'; +import tryCatch from 'try-catch'; +import _exit from './exit.js'; +import {getColumns as _getColumns} from './columns.mjs'; +import {getThemes as _getThemes} from './theme.mjs'; -const {statSync: _statSync} = require('node:fs'); -const tryCatch = require('try-catch'); - -const _exit = require('./exit'); -const {getColumns: _getColumns} = require('./columns'); const isString = (a) => typeof a === 'string'; -module.exports.root = (dir, config, {exit = _exit, statSync = _statSync} = {}) => { +export const root = (dir, config, {exit = _exit, statSync = _statSync} = {}) => { if (!isString(dir)) throw Error('dir should be a string'); @@ -23,21 +22,21 @@ module.exports.root = (dir, config, {exit = _exit, statSync = _statSync} = {}) = return exit('cloudcmd --root: %s', error.message); }; -module.exports.editor = (name, {exit = _exit} = {}) => { +export const editor = (name, {exit = _exit} = {}) => { const reg = /^(dword|edward|deepword)$/; if (!reg.test(name)) exit('cloudcmd --editor: could be "dword", "edward" or "deepword" only'); }; -module.exports.packer = (name, {exit = _exit} = {}) => { +export const packer = (name, {exit = _exit} = {}) => { const reg = /^(tar|zip)$/; if (!reg.test(name)) exit('cloudcmd --packer: could be "tar" or "zip" only'); }; -module.exports.columns = (type, {exit = _exit, getColumns = _getColumns} = {}) => { +export const columns = (type, {exit = _exit, getColumns = _getColumns} = {}) => { const addQuotes = (a) => `"${a}"`; const all = Object .keys(getColumns()) @@ -51,3 +50,18 @@ module.exports.columns = (type, {exit = _exit, getColumns = _getColumns} = {}) = if (!all.includes(type)) exit(`cloudcmd --columns: can be only one of: ${names}`); }; + +export const theme = (type, {exit = _exit, getThemes = _getThemes} = {}) => { + const addQuotes = (a) => `"${a}"`; + const all = Object + .keys(getThemes()) + .concat(''); + + const names = all + .filter(Boolean) + .map(addQuotes) + .join(', '); + + if (!all.includes(type)) + exit(`cloudcmd --theme: can be only one of: ${names}`); +}; diff --git a/server/validate.spec.mjs b/server/validate.spec.mjs index 50f87f57..800b4395 100644 --- a/server/validate.spec.mjs +++ b/server/validate.spec.mjs @@ -1,6 +1,6 @@ import {test, stub} from 'supertape'; import tryCatch from 'try-catch'; -import validate from './validate.js'; +import * as validate from './validate.mjs'; import cloudcmd from './cloudcmd.mjs'; test('validate: root: bad', (t) => { @@ -102,3 +102,32 @@ test('validate: columns: wrong', (t) => { t.calledWith(exit, [msg], 'should call exit'); t.end(); }); + +test('validate: theme', (t) => { + const exit = stub(); + + validate.theme('dark', { + exit, + }); + + t.notCalled(exit, 'should not call exit'); + t.end(); +}); + +test('validate: theme: wrong', (t) => { + const getThemes = stub().returns({ + light: '', + dark: '', + }); + + const exit = stub(); + const msg = 'cloudcmd --theme: can be only one of: "light", "dark"'; + + validate.theme('hello', { + exit, + getThemes, + }); + + t.calledWith(exit, [msg], 'should call exit'); + t.end(); +}); diff --git a/tmpl/config.hbs b/tmpl/config.hbs index 058815e7..dfcc4c09 100644 --- a/tmpl/config.hbs +++ b/tmpl/config.hbs @@ -43,8 +43,14 @@ Zip +
  • + +
  • - From 7f5e5c682500fedcd591fccb42434a9859a7eead Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 13:28:57 +0200 Subject: [PATCH 079/415] chore: cloudcmd: v17.3.0 --- ChangeLog | 6 ++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 18dcfedc..ead05ad1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024.03.29, v17.3.0 + +feature: +- 6bc4f3ec dark theme: add (#332) +- 35622082 route: convert to ESM + 2024.03.29, v17.2.1 fix: diff --git a/HELP.md b/HELP.md index 49ffb0ea..8ab50774 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.2.1 +# Cloud Commander v17.3.0 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1093,6 +1093,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.29*, **[v17.3.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.0)** - *2024.03.29*, **[v17.2.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.2.1)** - *2024.03.22*, **[v17.2.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.2.0)** - *2024.03.21*, **[v17.1.6](//github.com/coderaiser/cloudcmd/releases/tag/v17.1.6)** diff --git a/README.md b/README.md index dcc9e596..f5657def 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.2.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.3.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 65f60d68..8d27f51a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.2.1", + "version": "17.3.0", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 29914c09f1982921a66365e0fe9657bf7359ed14 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 13:30:50 +0200 Subject: [PATCH 080/415] docs: Special Thanks: link --- HELP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HELP.md b/HELP.md index 8ab50774..035ec30e 100644 --- a/HELP.md +++ b/HELP.md @@ -1546,7 +1546,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Special Thanks -- [Olena Zalitok](http://www.linkedin.com/in/olena-zalitok-ux-designer "Olena Zalitok") for **logo** and **favicon**. +- [Olena Zalitok](https://www.linkedin.com/in/ozalitok-ux-ui/ "Olena Zalitok") for **logo** and **favicon**. - [TarZak](https://github.com/tarzak "TarZak") - Russian and Ukrainian translations; - config template and style; From faa2cb3f9038edb5dd4acaed527730756c360c0f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 14:28:55 +0200 Subject: [PATCH 081/415] docs: help --- HELP.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/HELP.md b/HELP.md index 035ec30e..e6204f42 100644 --- a/HELP.md +++ b/HELP.md @@ -93,7 +93,8 @@ Cloud Commander supports the following command-line parameters: | `--terminal-command` | set command to run in terminal (shell by default) | `--terminal-auto-restart` | restart command on exit | `--vim` | enable vim hot keys -| `--themes` | set visible themes +| `--columns` | set visible columns +| `--theme` | set theme 'light' or 'dark'" | `--export` | enable export of config through a server | `--export-token` | authorization token used by export server | `--import` | enable import of config From d75818297bd0d9deae1cc8a5dd9821209f368381 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 14:58:38 +0200 Subject: [PATCH 082/415] feature: distribute: convert to ESM --- bin/cloudcmd.mjs | 4 +- server/cloudcmd.mjs | 4 +- server/distribute/{export.js => export.mjs} | 19 +++---- server/distribute/{import.js => import.mjs} | 22 ++++---- server/distribute/import.spec.mjs | 6 +-- server/distribute/index.js | 4 -- server/distribute/log.js | 41 --------------- server/distribute/log.mjs | 52 +++++++++++++++++++ .../distribute/{log.spec.js => log.spec.mjs} | 8 ++- 9 files changed, 78 insertions(+), 82 deletions(-) rename server/distribute/{export.js => export.mjs} (91%) rename server/distribute/{import.js => import.mjs} (91%) delete mode 100644 server/distribute/index.js delete mode 100644 server/distribute/log.js create mode 100644 server/distribute/log.mjs rename server/distribute/{log.spec.js => log.spec.mjs} (83%) diff --git a/bin/cloudcmd.mjs b/bin/cloudcmd.mjs index 6ec0ec40..4ea301ac 100755 --- a/bin/cloudcmd.mjs +++ b/bin/cloudcmd.mjs @@ -241,8 +241,8 @@ async function main() { if (args.showConfig) await showConfig(); - const distribute = await simport('../server/distribute/index.js'); - const importConfig = promisify(distribute.import); + const {distributeImport} = await simport('../server/distribute/import.mjs'); + const importConfig = promisify(distributeImport); await start(options, config); diff --git a/server/cloudcmd.mjs b/server/cloudcmd.mjs index 5c2c9eef..62414a83 100644 --- a/server/cloudcmd.mjs +++ b/server/cloudcmd.mjs @@ -24,7 +24,7 @@ import route from './route.mjs'; import * as validate from './validate.mjs'; import prefixer from './prefixer.js'; import terminal from './terminal.js'; -import distribute from './distribute/index.js'; +import {distributeExport} from './distribute/export.mjs'; import {createDepStore} from './depstore.js'; const __filename = fileURLToPath(import.meta.url); @@ -175,7 +175,7 @@ function listen({prefixSocket, socket, config}) { autoRestart: config('terminalAutoRestart'), }); - distribute.export(config, socket); + distributeExport(config, socket); } function cloudcmdMiddle({modules, config}) { diff --git a/server/distribute/export.js b/server/distribute/export.mjs similarity index 91% rename from server/distribute/export.js rename to server/distribute/export.mjs index abd057a3..02149ca5 100644 --- a/server/distribute/export.js +++ b/server/distribute/export.mjs @@ -1,13 +1,8 @@ -'use strict'; - -const currify = require('currify'); -const wraptile = require('wraptile'); -const squad = require('squad'); -const omit = require('object.omit'); - -const log = require('./log'); - -const { +import currify from 'currify'; +import wraptile from 'wraptile'; +import squad from 'squad'; +import omit from 'object.omit'; +import log, { exportStr, connectedStr, disconnectedStr, @@ -16,7 +11,7 @@ const { getMessage, getDescription, logWraped, -} = log; +} from './log.mjs'; const omitList = [ 'auth', @@ -38,7 +33,7 @@ const omitList = [ const omitConfig = (config) => omit(config, omitList); -module.exports = (config, socket) => { +export const distributeExport = (config, socket) => { if (!config('export')) return; diff --git a/server/distribute/import.js b/server/distribute/import.mjs similarity index 91% rename from server/distribute/import.js rename to server/distribute/import.mjs index 7a88e89d..57d215b8 100644 --- a/server/distribute/import.js +++ b/server/distribute/import.mjs @@ -1,16 +1,14 @@ -'use strict'; +import currify from 'currify'; +import wraptile from 'wraptile'; +import squad from 'squad'; +import fullstore from 'fullstore'; +import io from 'socket.io-client'; +import log from './log.mjs'; +import env from '../env.js'; +import _forEachKey from 'for-each-key'; -const currify = require('currify'); -const wraptile = require('wraptile'); -const squad = require('squad'); -const fullstore = require('fullstore'); - -const io = require('socket.io-client'); -const log = require('./log'); - -const env = require('../env'); const noop = () => {}; -const forEachKey = currify(require('for-each-key')); +const forEachKey = currify(_forEachKey); const { importStr, @@ -67,7 +65,7 @@ const updateConfig = currify((config, data) => { } }); -module.exports = (config, options, fn) => { +export const distributeImport = (config, options, fn) => { fn = fn || options; if (!config('import')) diff --git a/server/distribute/import.spec.mjs b/server/distribute/import.spec.mjs index caf9080a..9df6f846 100644 --- a/server/distribute/import.spec.mjs +++ b/server/distribute/import.spec.mjs @@ -1,15 +1,13 @@ -import {createRequire} from 'node:module'; import process from 'node:process'; import test from 'supertape'; import {promisify} from 'node:util'; import tryToCatch from 'try-to-catch'; import {connect} from '../../test/before.mjs'; import {createConfigManager} from '../cloudcmd.mjs'; - -const require = createRequire(import.meta.url); +import {distributeImport} from './import.mjs'; const distribute = { - import: promisify(require('./import')), + import: promisify(distributeImport), }; const config = createConfigManager(); diff --git a/server/distribute/index.js b/server/distribute/index.js deleted file mode 100644 index 9fae4b04..00000000 --- a/server/distribute/index.js +++ /dev/null @@ -1,4 +0,0 @@ -'use strict'; - -module.exports.import = require('./import'); -module.exports.export = require('./export'); diff --git a/server/distribute/log.js b/server/distribute/log.js deleted file mode 100644 index 515933f1..00000000 --- a/server/distribute/log.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -const wraptile = require('wraptile'); -const chalk = require('chalk'); - -const datetime = require('../../common/datetime'); - -const log = (isLog, name, msg) => isLog && console.log(`${datetime()} -> ${name}: ${msg}`); -const makeColor = (a) => chalk.blue(a); -const getMessage = (e) => e.message || e; -const getDescription = (e) => e.message; - -module.exports = log; -module.exports.logWraped = wraptile(log); -module.exports.stringToRGB = stringToRGB; -module.exports.makeColor = makeColor; -module.exports.getMessage = getMessage; -module.exports.getDescription = getDescription; - -module.exports.importStr = 'import'; -module.exports.exportStr = 'export'; -module.exports.connectedStr = chalk.green('connected'); -module.exports.disconnectedStr = chalk.red('disconnected'); -module.exports.tokenRejectedStr = chalk.red('token rejected'); -module.exports.authTryStr = chalk.yellow('try to auth'); - -function stringToRGB(a) { - return [ - a.charCodeAt(0), - a.length, - crc(a), - ]; -} - -const add = (a, b) => a + b.charCodeAt(0); - -function crc(a) { - return a - .split('') - .reduce(add, 0); -} diff --git a/server/distribute/log.mjs b/server/distribute/log.mjs new file mode 100644 index 00000000..feb79c8c --- /dev/null +++ b/server/distribute/log.mjs @@ -0,0 +1,52 @@ +import wraptile from 'wraptile'; +import chalk from 'chalk'; +import datetime from '../../common/datetime.js'; + +const {assign} = Object; + +const log = (isLog, name, msg) => isLog && console.log(`${datetime()} -> ${name}: ${msg}`); + +export const makeColor = (a) => chalk.blue(a); +export const getMessage = (e) => e.message || e; +export const getDescription = (e) => e.message; + +export default log; + +export const logWraped = wraptile(log); + +export const importStr = 'import'; +export const exportStr = 'export'; +export const connectedStr = chalk.green('connected'); +export const disconnectedStr = chalk.red('disconnected'); +export const tokenRejectedStr = chalk.red('token rejected'); +export const authTryStr = chalk.yellow('try to auth'); + +export function stringToRGB(a) { + return [ + a.charCodeAt(0), + a.length, + crc(a), + ]; +} + +const add = (a, b) => a + b.charCodeAt(0); + +function crc(a) { + return a + .split('') + .reduce(add, 0); +} + +assign(log, { + getMessage, + makeColor, + getDescription, + authTryStr, + stringToRGB, + logWraped, + importStr, + exportStr, + connectedStr, + disconnectedStr, + tokenRejectedStr, +}); diff --git a/server/distribute/log.spec.js b/server/distribute/log.spec.mjs similarity index 83% rename from server/distribute/log.spec.js rename to server/distribute/log.spec.mjs index 462b9875..50e4df11 100644 --- a/server/distribute/log.spec.js +++ b/server/distribute/log.spec.mjs @@ -1,8 +1,6 @@ -'use strict'; - -const test = require('supertape'); -const log = require('./log'); -const {createConfig} = require('../config'); +import test from 'supertape'; +import log from './log.mjs'; +import {createConfig} from '../config.js'; test('distribute: log: getMessage', (t) => { const e = 'hello'; From 2d37f6c6e98f89d51c56b0df6e3d7581a52b7a38 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 15:00:27 +0200 Subject: [PATCH 083/415] docs: env: theme --- HELP.md | 1 + 1 file changed, 1 insertion(+) diff --git a/HELP.md b/HELP.md index e6204f42..108b43cc 100644 --- a/HELP.md +++ b/HELP.md @@ -430,6 +430,7 @@ Some config options can be overridden with environment variables, such as: - `CLOUDCMD_OPEN` - open web browser when server started - `CLOUDCMD_EDITOR` - set editor - `CLOUDCMD_COLUMNS` - set visible themes +- `CLOUDCMD_THEME` - set themes "light" or "dark" - `CLOUDCMD_CONTACT` - enable contact - `CLOUDCMD_CONFIG_DIALOG` - enable config dialog - `CLOUDCMD_CONFIG_AUTH` - enable auth change in config dialog From 91de9b3d278fcdf54e078b6479f36cd40c3aa2d6 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 15:03:21 +0200 Subject: [PATCH 084/415] chore: cloudcmd: v17.3.1 --- ChangeLog | 5 +++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ead05ad1..0dedb4bc 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.03.29, v17.3.1 + +feature: +- d7581829 distribute: convert to ESM + 2024.03.29, v17.3.0 feature: diff --git a/HELP.md b/HELP.md index 108b43cc..742f0707 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.3.0 +# Cloud Commander v17.3.1 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1095,6 +1095,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.29*, **[v17.3.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.1)** - *2024.03.29*, **[v17.3.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.0)** - *2024.03.29*, **[v17.2.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.2.1)** - *2024.03.22*, **[v17.2.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.2.0)** diff --git a/README.md b/README.md index f5657def..6724da67 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.3.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.3.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 8d27f51a..eb8d2459 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.3.0", + "version": "17.3.1", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From f7a6a36696c09ca5b00b35999435820fc961ad81 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 16:01:13 +0200 Subject: [PATCH 085/415] fix: typo: Wraped -> Wrapped --- server/config.js | 4 ++-- server/distribute/export.mjs | 6 +++--- server/distribute/import.mjs | 18 +++++++++--------- server/distribute/log.mjs | 4 ++-- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/server/config.js b/server/config.js index 40be286a..5c1352a2 100644 --- a/server/config.js +++ b/server/config.js @@ -35,7 +35,7 @@ const ConfigPath = path.join(DIR, 'json/config.json'); const ConfigHome = path.join(HOME, '.cloudcmd.json'); const connection = currify(_connection); -const connectionWraped = wraptile(_connection); +const connectionWrapped = wraptile(_connection); const middle = currify(_middle); const readjsonSync = (name) => { @@ -155,7 +155,7 @@ function listen(manage, sock, auth) { return connection(manage, socket); const reject = () => socket.emit('reject'); - socket.on('auth', auth(connectionWraped(manage, socket), reject)); + socket.on('auth', auth(connectionWrapped(manage, socket), reject)); }); } diff --git a/server/distribute/export.mjs b/server/distribute/export.mjs index 02149ca5..aa0dbc1e 100644 --- a/server/distribute/export.mjs +++ b/server/distribute/export.mjs @@ -10,7 +10,7 @@ import log, { makeColor, getMessage, getDescription, - logWraped, + logWrapped, } from './log.mjs'; const omitList = [ @@ -41,9 +41,9 @@ export const distributeExport = (config, socket) => { const distributePrefix = `${prefix}/distribute`; const isLog = config('log'); - const onError = squad(logWraped(isLog, exportStr), getMessage); + const onError = squad(logWrapped(isLog, exportStr), getMessage); - const onConnectError = squad(logWraped(isLog, exportStr), getDescription); + const onConnectError = squad(logWrapped(isLog, exportStr), getDescription); socket .of(distributePrefix) diff --git a/server/distribute/import.mjs b/server/distribute/import.mjs index 57d215b8..72ce438d 100644 --- a/server/distribute/import.mjs +++ b/server/distribute/import.mjs @@ -18,7 +18,7 @@ const { authTryStr, getMessage, getDescription, - logWraped, + logWrapped, } = log; const {entries} = Object; @@ -94,23 +94,23 @@ export const distributeImport = (config, options, fn) => { const close = closeIfNot(socket, importListen); const statusStore = fullstore(); - const statusStoreWraped = wraptile(statusStore); + const statusStoreWrapped = wraptile(statusStore); - const onConfig = squad(close, logWraped(isLog, importStr, `config received from ${colorUrl}`), statusStoreWraped('received'), updateConfig(config)); + const onConfig = squad(close, logWrapped(isLog, importStr, `config received from ${colorUrl}`), statusStoreWrapped('received'), updateConfig(config)); - const onError = squad(superFn('error'), logWraped(isLog, config, importStr), addUrl(colorUrl), getMessage); + const onError = squad(superFn('error'), logWrapped(isLog, config, importStr), addUrl(colorUrl), getMessage); - const onConnectError = squad(superFn('connect_error'), logWraped(isLog, importStr), addUrl(colorUrl), getDescription); + const onConnectError = squad(superFn('connect_error'), logWrapped(isLog, importStr), addUrl(colorUrl), getDescription); const onConnect = emitAuth(importUrl, config, socket); - const onAccept = logWraped(isLog, importStr, `${connectedStr} to ${colorUrl}`); + const onAccept = logWrapped(isLog, importStr, `${connectedStr} to ${colorUrl}`); const onDisconnect = squad( done( fn, statusStore, ), - logWraped( + logWrapped( isLog, importStr, `${disconnectedStr} from ${colorUrl}`, @@ -125,9 +125,9 @@ export const distributeImport = (config, options, fn) => { ), ); - const onChange = squad(logWraped(isLog, importStr), config); + const onChange = squad(logWrapped(isLog, importStr), config); - const onReject = squad(superFn('reject'), logWraped( + const onReject = squad(superFn('reject'), logWrapped( isLog, importStr, tokenRejectedStr, diff --git a/server/distribute/log.mjs b/server/distribute/log.mjs index feb79c8c..acea5759 100644 --- a/server/distribute/log.mjs +++ b/server/distribute/log.mjs @@ -12,7 +12,7 @@ export const getDescription = (e) => e.message; export default log; -export const logWraped = wraptile(log); +export const logWrapped = wraptile(log); export const importStr = 'import'; export const exportStr = 'export'; @@ -43,7 +43,7 @@ assign(log, { getDescription, authTryStr, stringToRGB, - logWraped, + logWrapped, importStr, exportStr, connectedStr, From fceddc20f8a415fd3ace514c306f5f875b0b9cbd Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 29 Mar 2024 16:01:48 +0200 Subject: [PATCH 086/415] chore: cloudcmd: v17.3.2 --- ChangeLog | 5 +++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0dedb4bc..8a12957a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.03.29, v17.3.2 + +fix: +- f7a6a366 typo: Wraped -> Wrapped + 2024.03.29, v17.3.1 feature: diff --git a/HELP.md b/HELP.md index 742f0707..95044a11 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.3.1 +# Cloud Commander v17.3.2 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1095,6 +1095,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.03.29*, **[v17.3.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.2)** - *2024.03.29*, **[v17.3.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.1)** - *2024.03.29*, **[v17.3.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.0)** - *2024.03.29*, **[v17.2.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.2.1)** diff --git a/README.md b/README.md index 6724da67..46b7e62b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.3.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.3.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index eb8d2459..e8da058e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.3.1", + "version": "17.3.2", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From b088b84eb1b3276da995466f75465db16be4a7e0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 3 Apr 2024 09:36:32 +0300 Subject: [PATCH 087/415] feature: cloudcmd: deepword v10.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e8da058e..fae2306a 100644 --- a/package.json +++ b/package.json @@ -102,7 +102,7 @@ "criton": "^2.0.0", "currify": "^4.0.0", "deepmerge": "^4.0.0", - "deepword": "^9.0.0", + "deepword": "^10.0.0", "dword": "^15.0.0", "edward": "^15.0.0", "es6-promisify": "^7.0.0", From d061aa82ea3ff6b7ad992194178e35a7e3de45d3 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 3 Apr 2024 09:37:44 +0300 Subject: [PATCH 088/415] chore: cloudcmd: v17.3.3 --- ChangeLog | 5 +++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8a12957a..38e91267 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.04.03, v17.3.3 + +feature: +- b088b84e cloudcmd: deepword v10.0.0 + 2024.03.29, v17.3.2 fix: diff --git a/HELP.md b/HELP.md index 95044a11..5f2da049 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.3.2 +# Cloud Commander v17.3.3 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1095,6 +1095,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.04.03*, **[v17.3.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.3)** - *2024.03.29*, **[v17.3.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.2)** - *2024.03.29*, **[v17.3.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.1)** - *2024.03.29*, **[v17.3.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.0)** diff --git a/README.md b/README.md index 46b7e62b..0de495f2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.3.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.3.3 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index fae2306a..98f5d890 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.3.2", + "version": "17.3.3", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 37ab7068d9090d599fc97e06af3e08d156c1b251 Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Tue, 16 Apr 2024 00:47:40 -0400 Subject: [PATCH 089/415] feature: publish container image to GHCR (#409) * feat: publish container image to GHCR Fixes: #408 * add permissions to workflow --- .github/workflows/docker.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5a932ac7..d0f8c6eb 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -6,6 +6,9 @@ on: jobs: buildx: runs-on: ubuntu-latest + permissions: + contents: read + packages: write steps: - name: Checkout uses: actions/checkout@v4 @@ -38,6 +41,12 @@ jobs: with: username: ${{ secrets.DOCKER_USERNAME }} password: ${{ secrets.DOCKER_TOKEN }} + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push base-image uses: docker/build-push-action@v5 with: @@ -48,6 +57,8 @@ jobs: tags: | coderaiser/cloudcmd:latest coderaiser/cloudcmd:${{ steps.build.outputs.version }} + ghcr.io/${{ github.repository }}:latest + ghcr.io/${{ github.repository }}:${{ steps.build.outputs.version }} - name: Build and push alpine-image uses: docker/build-push-action@v5 with: @@ -58,3 +69,5 @@ jobs: tags: | coderaiser/cloudcmd:latest-alpine coderaiser/cloudcmd:${{ steps.build.outputs.version }}-alpine + ghcr.io/${{ github.repository }}:latest-alpine + ghcr.io/${{ github.repository }}:${{ steps.build.outputs.version }}-alpine From 6fb2102099e1287136c2ba9e40795dd54579452c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 16 Apr 2024 23:04:46 +0300 Subject: [PATCH 090/415] fix: server: route: path traversal --- server/route.mjs | 4 ++++ test/rest/fs.mjs | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/server/route.mjs b/server/route.mjs index 5397c27f..d6917ec5 100644 --- a/server/route.mjs +++ b/server/route.mjs @@ -77,7 +77,11 @@ async function route({config, options, request, response}) { const rootName = name.replace(CloudFunc.FS, '') || '/'; const fullPath = root(rootName, config('root')); + if (fullPath.indexOf(config('root'))) + return ponse.sendError(Error(`Path '${fullPath}' beyond root '${config('root')}'`), p); + const {html, win32} = options; + const read = getReadDir(config, { win32, }); diff --git a/test/rest/fs.mjs b/test/rest/fs.mjs index 7557ede0..07f4b7f6 100644 --- a/test/rest/fs.mjs +++ b/test/rest/fs.mjs @@ -18,3 +18,10 @@ test('cloudcmd: rest: fs: path', async (t) => { t.equal(path, '/', 'should dir path be "/"'); t.end(); }); + +test('cloudcmd: path traversal beyond root', async (t) => { + const {body} = await request.get('/fs..%2f..%2fetc/passwd'); + + t.match(body, 'beyond root', 'should return beyond root message'); + t.end(); +}); From 24288536135c15bc6f4cab8837cfae6ae4901f24 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 17 Apr 2024 00:04:02 +0300 Subject: [PATCH 091/415] chore: lint --- .npmignore | 1 + .nycrc.json | 3 ++- client/modules/polyfill.spec.js | 8 +++++--- server/config.js | 10 ++++++---- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.npmignore b/.npmignore index de3559c7..0ecde705 100644 --- a/.npmignore +++ b/.npmignore @@ -30,3 +30,4 @@ webpack.config.js *.cdr *.eps +*.config.* diff --git a/.nycrc.json b/.nycrc.json index df171b24..bd520eb6 100644 --- a/.nycrc.json +++ b/.nycrc.json @@ -4,7 +4,8 @@ "exclude": [ "**/*.spec.js", "**/fixture", - "**/*.*.js" + "**/*.*.js", + "**/*.config.*" ], "branches": 100, "lines": 100, diff --git a/client/modules/polyfill.spec.js b/client/modules/polyfill.spec.js index ea4524a7..02686c1d 100644 --- a/client/modules/polyfill.spec.js +++ b/client/modules/polyfill.spec.js @@ -23,9 +23,11 @@ test('cloudcmd: client: polyfill: scrollIntoViewIfNeaded', (t) => { mockRequire.stop('scroll-into-view-if-neaded'); global.DOM = DOM; - const args = [el, { - block: 'nearest', - }]; + const args = [ + el, { + block: 'nearest', + }, + ]; stopAll(); diff --git a/server/config.js b/server/config.js index 5c1352a2..5d20af30 100644 --- a/server/config.js +++ b/server/config.js @@ -242,8 +242,10 @@ function cryptoPass(manage, json) { const password = criton(json.password, algo); - return [manage, { - ...json, - password, - }]; + return [ + manage, { + ...json, + password, + }, + ]; } From 52df5bfcf49ac8b72b04a6a712737a529d05e5da Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 17 Apr 2024 00:05:05 +0300 Subject: [PATCH 092/415] chore: cloudcmd: v17.4.0 --- ChangeLog | 8 ++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 38e91267..75b23217 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024.04.17, v17.4.0 + +fix: +- 6fb21020 server: route: path traversal + +feature: +- 37ab7068 publish container image to GHCR (#409) + 2024.04.03, v17.3.3 feature: diff --git a/HELP.md b/HELP.md index 5f2da049..13b1a36c 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.3.3 +# Cloud Commander v17.4.0 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1095,6 +1095,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.04.17*, **[v17.4.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.0)** - *2024.04.03*, **[v17.3.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.3)** - *2024.03.29*, **[v17.3.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.2)** - *2024.03.29*, **[v17.3.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.1)** diff --git a/README.md b/README.md index 0de495f2..5290718d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.3.3 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.4.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 98f5d890..0e9ec0df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.3.3", + "version": "17.4.0", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From c409a2db82180123c4acaa54474cee8b2fbede28 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 6 May 2024 12:20:55 +0300 Subject: [PATCH 093/415] feature: cloudcmd: copymitter v9.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0e9ec0df..0b24b57b 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "chalk": "^4.0.0", "compression": "^1.7.4", "console-io": "^14.0.0", - "copymitter": "^8.0.1", + "copymitter": "^9.0.0", "criton": "^2.0.0", "currify": "^4.0.0", "deepmerge": "^4.0.0", From 154b4bd6274334afeb240459a615c057fa14552a Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 6 May 2024 12:21:01 +0300 Subject: [PATCH 094/415] feature: cloudcmd: @cloudcmd/move-files v8.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0b24b57b..17526989 100644 --- a/package.json +++ b/package.json @@ -90,7 +90,7 @@ "@babel/plugin-transform-optional-chaining": "^7.21.0", "@cloudcmd/dropbox": "^5.0.1", "@cloudcmd/fileop": "^8.0.0", - "@cloudcmd/move-files": "^7.0.0", + "@cloudcmd/move-files": "^8.0.0", "@cloudcmd/read-files-sync": "^2.0.0", "@putout/cli-validate-args": "^1.0.1", "@putout/plugin-cloudcmd": "^3.1.1", From 610ba8827f9f1a2bf1761df3f90af9fe93b45d63 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 6 May 2024 14:48:47 +0300 Subject: [PATCH 095/415] chore: lint --- .github/workflows/docker.yml | 6 ++---- client/client.js | 15 ++++++++------- client/dom/current-file.spec.js | 20 +++++++++++--------- server/terminal.js | 6 +++++- server/validate.mjs | 19 ++++++++++++++++--- 5 files changed, 42 insertions(+), 24 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d0f8c6eb..f26b3755 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -27,11 +27,9 @@ jobs: run: redrun lint - name: Build id: build - run: > + run: | redrun build - - echo "::set-output name=version::$(grep '"version":' package.json -m1 - | cut -d\" -f4)" + echo "::set-output name=version::$(grep '"version":' package.json -m1 | cut -d\" -f4)" - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx diff --git a/client/client.js b/client/client.js index 58f4ae83..d1bdbcff 100644 --- a/client/client.js +++ b/client/client.js @@ -74,13 +74,14 @@ function CloudCmdProto(DOM) { right: 'asc', }; - this.changeDir = async (path, { - isRefresh, - panel, - history = true, - noCurrent, - currentName, - } = {}) => { + this.changeDir = async (path, overrides = {}) => { + const { + isRefresh, + panel, + history = true, + noCurrent, + currentName, + } = overrides; const refresh = isRefresh; let panelChanged; diff --git a/client/dom/current-file.spec.js b/client/dom/current-file.spec.js index 3c907fcd..3d822206 100644 --- a/client/dom/current-file.spec.js +++ b/client/dom/current-file.spec.js @@ -285,15 +285,17 @@ test('current-file: parseHrefAttribute', (t) => { t.end(); }); -function getDOM({ - link = {}, - getCurrentDirPath = stub(), - getCurrentDirName = stub(), - getByDataName = stub(), - isContainClass = stub(), - getCurrentType = stub(), - getCurrentPath = stub(), -} = {}) { +function getDOM(overrides = {}) { + const { + link = {}, + getCurrentDirPath = stub(), + getCurrentDirName = stub(), + getByDataName = stub(), + isContainClass = stub(), + getCurrentType = stub(), + getCurrentPath = stub(), + } = overrides; + return { getCurrentDirPath, getCurrentDirName, diff --git a/server/terminal.js b/server/terminal.js index 7a291b31..d10cdc8b 100644 --- a/server/terminal.js +++ b/server/terminal.js @@ -12,7 +12,11 @@ function _getModule(a) { return require(a); } -module.exports = (config, arg, {getModule = _getModule} = {}) => { +module.exports = (config, arg, overrides = {}) => { + const { + getModule = _getModule, + } = overrides; + if (!config('terminal')) return noop; diff --git a/server/validate.mjs b/server/validate.mjs index bf825e85..6b928e7b 100644 --- a/server/validate.mjs +++ b/server/validate.mjs @@ -6,7 +6,12 @@ import {getThemes as _getThemes} from './theme.mjs'; const isString = (a) => typeof a === 'string'; -export const root = (dir, config, {exit = _exit, statSync = _statSync} = {}) => { +export const root = (dir, config, overrides = {}) => { + const { + exit = _exit, + statSync = _statSync, + } = overrides; + if (!isString(dir)) throw Error('dir should be a string'); @@ -36,7 +41,11 @@ export const packer = (name, {exit = _exit} = {}) => { exit('cloudcmd --packer: could be "tar" or "zip" only'); }; -export const columns = (type, {exit = _exit, getColumns = _getColumns} = {}) => { +export const columns = (type, overrides = {}) => { + const { + exit = _exit, + getColumns = _getColumns, + } = overrides; const addQuotes = (a) => `"${a}"`; const all = Object .keys(getColumns()) @@ -51,7 +60,11 @@ export const columns = (type, {exit = _exit, getColumns = _getColumns} = {}) => exit(`cloudcmd --columns: can be only one of: ${names}`); }; -export const theme = (type, {exit = _exit, getThemes = _getThemes} = {}) => { +export const theme = (type, overrides = {}) => { + const { + exit = _exit, + getThemes = _getThemes, + } = overrides; const addQuotes = (a) => `"${a}"`; const all = Object .keys(getThemes()) From 25872c3b11c07aa99e3b812a6899881f09944575 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 6 May 2024 14:49:44 +0300 Subject: [PATCH 096/415] chore: cloudcmd: v17.4.1 --- ChangeLog | 6 ++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 75b23217..bae03a7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024.05.06, v17.4.1 + +feature: +- 154b4bd6 cloudcmd: @cloudcmd/move-files v8.0.0 +- c409a2db cloudcmd: copymitter v9.0.0 + 2024.04.17, v17.4.0 fix: diff --git a/HELP.md b/HELP.md index 13b1a36c..1d44b4b0 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.4.0 +# Cloud Commander v17.4.1 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1095,6 +1095,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.05.06*, **[v17.4.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.1)** - *2024.04.17*, **[v17.4.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.0)** - *2024.04.03*, **[v17.3.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.3)** - *2024.03.29*, **[v17.3.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.2)** diff --git a/README.md b/README.md index 5290718d..63158df4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.4.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.4.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 17526989..75da1b5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.4.0", + "version": "17.4.1", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 14d46c007b84f7dc63523a07bca9b6f6818132f0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 6 May 2024 11:52:34 +0000 Subject: [PATCH 097/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/client.js | 1 + server/validate.mjs | 2 ++ 2 files changed, 3 insertions(+) diff --git a/client/client.js b/client/client.js index d1bdbcff..4c4555ff 100644 --- a/client/client.js +++ b/client/client.js @@ -82,6 +82,7 @@ function CloudCmdProto(DOM) { noCurrent, currentName, } = overrides; + const refresh = isRefresh; let panelChanged; diff --git a/server/validate.mjs b/server/validate.mjs index 6b928e7b..fa67a321 100644 --- a/server/validate.mjs +++ b/server/validate.mjs @@ -46,6 +46,7 @@ export const columns = (type, overrides = {}) => { exit = _exit, getColumns = _getColumns, } = overrides; + const addQuotes = (a) => `"${a}"`; const all = Object .keys(getColumns()) @@ -65,6 +66,7 @@ export const theme = (type, overrides = {}) => { exit = _exit, getThemes = _getThemes, } = overrides; + const addQuotes = (a) => `"${a}"`; const all = Object .keys(getThemes()) From 9c8c0533a4a84af50565af63c0b801d58d0f9566 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Thu, 13 Jun 2024 09:11:36 +0300 Subject: [PATCH 098/415] Update CONTRIBUTING.md --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 453cbc03..b6b6b4ef 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -26,5 +26,5 @@ For example util, console, view, edit, style etc... **Examples**: -- [fix(style) .name{width}: 37% -> 35%](https://github.com/coderaiser/cloudcmd/commit/94b0642e3990c17b3a0ee3efeb75f343e1e7c050) -- [fix(console) dispatch: focus -> mouseup](https://github.com/coderaiser/cloudcmd/commit/f41ec5058d1411e86a881f8e8077e0572e0409ec) +- [fix: style: .name{width}: 37% -> 35%](https://github.com/coderaiser/cloudcmd/commit/94b0642e3990c17b3a0ee3efeb75f343e1e7c050) +- [fix: console: dispatch: focus -> mouseup](https://github.com/coderaiser/cloudcmd/commit/f41ec5058d1411e86a881f8e8077e0572e0409ec) From 883eee96a2c2fb4829198e2d620caca518110747 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 14 Jun 2024 22:26:27 +0300 Subject: [PATCH 099/415] chore: lint --- client/sort.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/client/sort.js b/client/sort.js index fdcfaf65..863c8379 100644 --- a/client/sort.js +++ b/client/sort.js @@ -4,11 +4,8 @@ const DOM = require('./dom'); const Info = DOM.CurrentInfo; - const {sort, order} = CloudCmd; - const position = DOM.getPanelPosition(); - let sortPrevious = sort[position]; const {getPanel} = DOM; From 05ef0ae4522503900f279da652856c0eb580151b Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 14 Jun 2024 22:32:50 +0300 Subject: [PATCH 100/415] feature: cloudcmd: c8 v10.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 75da1b5c..9e6ac9bd 100644 --- a/package.json +++ b/package.json @@ -163,7 +163,7 @@ "auto-globals": "^4.0.0", "babel-loader": "^8.0.0", "babel-plugin-macros": "^3.0.0", - "c8": "^9.1.0", + "c8": "^10.1.2", "cheerio": "^1.0.0-rc.5", "clean-css-loader": "^2.0.0", "codegen.macro": "^4.0.0", From 14d9618a6439f2ff39dc75bb5f4c8a868baf3c3a Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 14 Jun 2024 22:33:14 +0300 Subject: [PATCH 101/415] chore: lint --- client/modules/config/index.js | 3 ++- client/modules/edit-names.js | 4 ++-- client/sort.js | 4 ++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/client/modules/config/index.js b/client/modules/config/index.js index cdd18da1..0ec5b100 100644 --- a/client/modules/config/index.js +++ b/client/modules/config/index.js @@ -225,7 +225,8 @@ function onAuthChange(checked) { const elUsername = input.getElementByName('username', Element); const elPassword = input.getElementByName('password', Element); - elUsername.disabled = elPassword.disabled = !checked; + elUsername.disabled = !checked; + elPassword.disabled = !checked; } function onNameChange(name) { diff --git a/client/modules/edit-names.js b/client/modules/edit-names.js index e1cc3cbe..c0b9ae84 100644 --- a/client/modules/edit-names.js +++ b/client/modules/edit-names.js @@ -63,9 +63,9 @@ async function keyListener(event) { const ctrlMeta = ctrl || meta; const {Key} = CloudCmd; - if (ctrlMeta && event.keyCode === Key.S) + if (ctrlMeta && event.keyCode === Key.S) { hide(); - else if (ctrlMeta && event.keyCode === Key.P) { + } else if (ctrlMeta && event.keyCode === Key.P) { const [, pattern] = await Dialog.prompt('Apply pattern:', '[n][e]'); pattern && applyPattern(pattern); } diff --git a/client/sort.js b/client/sort.js index 863c8379..cf9fb4a4 100644 --- a/client/sort.js +++ b/client/sort.js @@ -20,8 +20,8 @@ CloudCmd.sortPanel = (name, panel = getPanel()) => { else order[position] = 'asc'; - sortPrevious = sort[position] = name; - + sortPrevious = name; + sort[position] = name; const noCurrent = position !== Info.panelPosition; CloudCmd.refresh({ From 2ae6ad34fc7e238b56796694c0cbba5059973be0 Mon Sep 17 00:00:00 2001 From: zilion2000 Date: Wed, 3 Jul 2024 13:57:56 +0200 Subject: [PATCH 102/415] feature: docker: Dockerimage update Debian12 (#414) --- docker/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 701a4199..e056e946 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -1,4 +1,4 @@ -FROM node:lts-buster +FROM node:lts-bookworm LABEL maintainer="Coderaiser" RUN mkdir -p /usr/src/app @@ -15,9 +15,9 @@ COPY . /usr/src/app WORKDIR / -ENV cloudcmd_terminal true -ENV cloudcmd_terminal_path gritty -ENV cloudcmd_open false +ENV cloudcmd_terminal=true +ENV cloudcmd_terminal_path=gritty +ENV cloudcmd_open=false EXPOSE 8000 From 79fb49479e38240109a55708902d47788a9d5031 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 3 Jul 2024 12:01:49 +0000 Subject: [PATCH 103/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .madrun.mjs | 2 +- bin/release.mjs | 2 +- client/cloudcmd.js | 3 ++- server/columns.spec.mjs | 2 +- server/distribute/export.spec.mjs | 2 +- server/distribute/import.mjs | 2 +- server/distribute/import.spec.mjs | 2 +- server/themes.spec.mjs | 2 +- server/user-menu.spec.mjs | 2 +- test/before.mjs | 6 +++--- test/rest/copy.mjs | 2 +- test/rest/move.mjs | 2 +- test/rest/pack.mjs | 4 ++-- test/server/console.mjs | 2 +- 14 files changed, 18 insertions(+), 17 deletions(-) diff --git a/.madrun.mjs b/.madrun.mjs index 428eec7a..0cc7a5ec 100644 --- a/.madrun.mjs +++ b/.madrun.mjs @@ -1,5 +1,5 @@ -import {run, cutEnv} from 'madrun'; import process from 'node:process'; +import {run, cutEnv} from 'madrun'; const testEnv = { THREAD_IT_COUNT: 0, diff --git a/bin/release.mjs b/bin/release.mjs index e9ac53d9..1c12c20e 100755 --- a/bin/release.mjs +++ b/bin/release.mjs @@ -1,13 +1,13 @@ #!/usr/bin/env node import {promisify} from 'node:util'; +import process from 'node:process'; import tryToCatch from 'try-to-catch'; import {createSimport} from 'simport'; import minor from 'minor'; import _place from 'place'; import rendy from 'rendy'; import shortdate from 'shortdate'; -import process from 'node:process'; const simport = createSimport(import.meta.url); const place = promisify(_place); diff --git a/client/cloudcmd.js b/client/cloudcmd.js index 937f6d77..47019e55 100644 --- a/client/cloudcmd.js +++ b/client/cloudcmd.js @@ -10,7 +10,7 @@ const {registerSW, listenSW} = require('./sw/register'); const isDev = process.env.NODE_ENV === 'development'; -module.exports = window.CloudCmd = async (config) => { +module.exports = async (config) => { window.Util = require('../common/util'); window.CloudFunc = require('../common/cloudfunc'); @@ -27,6 +27,7 @@ module.exports = window.CloudCmd = async (config) => { window.CloudCmd.init(prefix, config); }; +window.CloudCmd = module.exports; function getPrefix(prefix) { if (!prefix) diff --git a/server/columns.spec.mjs b/server/columns.spec.mjs index 1e62f5f7..8ddcd54c 100644 --- a/server/columns.spec.mjs +++ b/server/columns.spec.mjs @@ -1,7 +1,7 @@ import {dirname} from 'node:path'; import {fileURLToPath} from 'node:url'; -import test from 'supertape'; import fs from 'node:fs'; +import test from 'supertape'; import {getColumns, isDev} from './columns.mjs'; const __filename = fileURLToPath(import.meta.url); diff --git a/server/distribute/export.spec.mjs b/server/distribute/export.spec.mjs index db65638d..e6dd1f8a 100644 --- a/server/distribute/export.spec.mjs +++ b/server/distribute/export.spec.mjs @@ -1,7 +1,7 @@ -import Config from '../config.js'; import {once} from 'node:events'; import test from 'supertape'; import io from 'socket.io-client'; +import Config from '../config.js'; import {connect} from '../../test/before.mjs'; const config = Config.createConfig(); diff --git a/server/distribute/import.mjs b/server/distribute/import.mjs index 72ce438d..f776abc0 100644 --- a/server/distribute/import.mjs +++ b/server/distribute/import.mjs @@ -3,9 +3,9 @@ import wraptile from 'wraptile'; import squad from 'squad'; import fullstore from 'fullstore'; import io from 'socket.io-client'; +import _forEachKey from 'for-each-key'; import log from './log.mjs'; import env from '../env.js'; -import _forEachKey from 'for-each-key'; const noop = () => {}; const forEachKey = currify(_forEachKey); diff --git a/server/distribute/import.spec.mjs b/server/distribute/import.spec.mjs index 9df6f846..9823aaff 100644 --- a/server/distribute/import.spec.mjs +++ b/server/distribute/import.spec.mjs @@ -1,6 +1,6 @@ import process from 'node:process'; -import test from 'supertape'; import {promisify} from 'node:util'; +import test from 'supertape'; import tryToCatch from 'try-to-catch'; import {connect} from '../../test/before.mjs'; import {createConfigManager} from '../cloudcmd.mjs'; diff --git a/server/themes.spec.mjs b/server/themes.spec.mjs index 6c828343..e88a3ec9 100644 --- a/server/themes.spec.mjs +++ b/server/themes.spec.mjs @@ -1,7 +1,7 @@ import {dirname} from 'node:path'; import {fileURLToPath} from 'node:url'; -import test from 'supertape'; import fs from 'node:fs'; +import test from 'supertape'; import {getThemes, isDev} from './theme.mjs'; const __filename = fileURLToPath(import.meta.url); diff --git a/server/user-menu.spec.mjs b/server/user-menu.spec.mjs index 7ac64f97..0125bd9e 100644 --- a/server/user-menu.spec.mjs +++ b/server/user-menu.spec.mjs @@ -1,10 +1,10 @@ import {dirname, join} from 'node:path'; import {fileURLToPath} from 'node:url'; +import {readFileSync} from 'node:fs'; import {test, stub} from 'supertape'; import serveOnce from 'serve-once'; import threadIt from 'thread-it'; import userMenu from './user-menu.mjs'; -import {readFileSync} from 'node:fs'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); diff --git a/test/before.mjs b/test/before.mjs index 2c15bdd3..6e6e3f99 100644 --- a/test/before.mjs +++ b/test/before.mjs @@ -1,13 +1,13 @@ import process from 'node:process'; import http from 'node:http'; import os from 'node:os'; +import {promisify} from 'node:util'; +import {fileURLToPath} from 'node:url'; +import {dirname} from 'node:path'; import express from 'express'; import {Server} from 'socket.io'; import writejson from 'writejson'; import readjson from 'readjson'; -import {promisify} from 'node:util'; -import {fileURLToPath} from 'node:url'; -import {dirname} from 'node:path'; import cloudcmd from '../server/cloudcmd.mjs'; const __filename = fileURLToPath(import.meta.url); diff --git a/test/rest/copy.mjs b/test/rest/copy.mjs index 3c673b7b..98e8ea4d 100644 --- a/test/rest/copy.mjs +++ b/test/rest/copy.mjs @@ -1,7 +1,7 @@ import {dirname, join} from 'node:path'; import {fileURLToPath} from 'node:url'; -import serveOnce from 'serve-once'; import {mkdirSync} from 'node:fs'; +import serveOnce from 'serve-once'; import test from 'supertape'; import {rimraf} from 'rimraf'; import cloudcmd from '../../server/cloudcmd.mjs'; diff --git a/test/rest/move.mjs b/test/rest/move.mjs index ee7d1637..e962e5f0 100644 --- a/test/rest/move.mjs +++ b/test/rest/move.mjs @@ -1,5 +1,5 @@ -import wait from '@iocmd/wait'; import {EventEmitter} from 'node:events'; +import wait from '@iocmd/wait'; import {test, stub} from 'supertape'; import serveOnce from 'serve-once'; import cloudcmd from '../../server/cloudcmd.mjs'; diff --git a/test/rest/pack.mjs b/test/rest/pack.mjs index 61332949..5b9c2210 100644 --- a/test/rest/pack.mjs +++ b/test/rest/pack.mjs @@ -1,13 +1,13 @@ import fs from 'node:fs'; import {join, dirname} from 'node:path'; import {promisify} from 'node:util'; +import {fileURLToPath} from 'node:url'; import test from 'supertape'; import tar from 'tar-stream'; import gunzip from 'gunzip-maybe'; import pullout from 'pullout'; -import cloudcmd from '../../server/cloudcmd.mjs'; import serveOnce from 'serve-once'; -import {fileURLToPath} from 'node:url'; +import cloudcmd from '../../server/cloudcmd.mjs'; const __filename = fileURLToPath(import.meta.url); const __dirname = dirname(__filename); diff --git a/test/server/console.mjs b/test/server/console.mjs index cf42d5bd..266cce14 100644 --- a/test/server/console.mjs +++ b/test/server/console.mjs @@ -1,8 +1,8 @@ import path, {dirname} from 'node:path'; import {once} from 'node:events'; -import test from 'supertape'; import {fileURLToPath} from 'node:url'; import {createRequire} from 'node:module'; +import test from 'supertape'; import io from 'socket.io-client'; import {connect} from '../before.mjs'; From 6abf327d0d25f88a709a35ce2a4360a04b62f185 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 3 Jul 2024 15:02:39 +0300 Subject: [PATCH 104/415] feature: cloudcmd: package-json v10.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9e6ac9bd..01df5b74 100644 --- a/package.json +++ b/package.json @@ -127,7 +127,7 @@ "once": "^1.4.0", "onezip": "^6.0.1", "open": "^10.0.3", - "package-json": "^9.0.0", + "package-json": "^10.0.0", "ponse": "^7.0.0", "pullout": "^5.0.0", "putout": "^35.0.0", From d8451e56aaa0a0cafae23720e4669a6254fe0a2b Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 3 Jul 2024 15:03:42 +0300 Subject: [PATCH 105/415] feature: cloudcmd: just-pascal-case v3.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 01df5b74..d204d2e0 100644 --- a/package.json +++ b/package.json @@ -181,7 +181,7 @@ "html-webpack-plugin": "^4.0.1", "inherits": "^2.0.3", "just-capitalize": "^1.0.0", - "just-pascal-case": "^1.1.0", + "just-pascal-case": "^3.2.0", "limier": "^3.0.0", "load.js": "^3.0.0", "madrun": "^10.0.0", From 4cc47e30de98712f7991a0c4f08f0a34a2643b56 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 3 Jul 2024 15:03:54 +0300 Subject: [PATCH 106/415] feature: cloudcmd: just-capitalize v3.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d204d2e0..7ac0f511 100644 --- a/package.json +++ b/package.json @@ -180,7 +180,7 @@ "html-looks-like": "^1.0.2", "html-webpack-plugin": "^4.0.1", "inherits": "^2.0.3", - "just-capitalize": "^1.0.0", + "just-capitalize": "^3.2.0", "just-pascal-case": "^3.2.0", "limier": "^3.0.0", "load.js": "^3.0.0", From ba2d0b36af8ceff7f37795e9fa1115d46071a9a0 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 3 Jul 2024 15:03:59 +0300 Subject: [PATCH 107/415] feature: cloudcmd: just-snake-case v3.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 7ac0f511..12ea387b 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "jaguar": "^6.0.0", "jju": "^1.3.0", "jonny": "^3.0.0", - "just-snake-case": "^1.1.0", + "just-snake-case": "^3.2.0", "markdown-it": "^14.0.0", "mellow": "^3.0.0", "nano-memoize": "^3.0.16", From b5e9ae5ad9ec57b70e4c183586ee29ae9f10e66d Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 3 Jul 2024 16:09:41 +0300 Subject: [PATCH 108/415] chore: cloudcmd: v17.4.2 --- ChangeLog | 10 ++++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 14 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index bae03a7f..82b6bf51 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2024.07.03, v17.4.2 + +feature: +- ba2d0b36 cloudcmd: just-snake-case v3.2.0 +- 4cc47e30 cloudcmd: just-capitalize v3.2.0 +- d8451e56 cloudcmd: just-pascal-case v3.2.0 +- 6abf327d cloudcmd: package-json v10.0.0 +- 2ae6ad34 docker: Dockerimage update Debian12 (#414) +- 05ef0ae4 cloudcmd: c8 v10.1.2 + 2024.05.06, v17.4.1 feature: diff --git a/HELP.md b/HELP.md index 1d44b4b0..d5477ce2 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.4.1 +# Cloud Commander v17.4.2 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1095,6 +1095,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.07.03*, **[v17.4.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.2)** - *2024.05.06*, **[v17.4.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.1)** - *2024.04.17*, **[v17.4.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.0)** - *2024.04.03*, **[v17.3.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.3)** diff --git a/README.md b/README.md index 63158df4..34bc9fa5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.4.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.4.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 12ea387b..c4a9b04a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.4.1", + "version": "17.4.2", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 61ca7f36a449cdd5f97659467aeafde856bab9e1 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 19 Jul 2024 17:34:06 +0300 Subject: [PATCH 109/415] feature: cloudcmd: putout v36.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c4a9b04a..5fd6f969 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "package-json": "^10.0.0", "ponse": "^7.0.0", "pullout": "^5.0.0", - "putout": "^35.0.0", + "putout": "^36.0.2", "redzip": "^3.0.0", "rendy": "^4.1.3", "restafary": "^12.0.0", From 6e8348b8437a4cf997652b84a5b9399097615725 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 19 Jul 2024 17:34:34 +0300 Subject: [PATCH 110/415] feature: cloudcmd: rimraf v6.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5fd6f969..5a5bab1b 100644 --- a/package.json +++ b/package.json @@ -198,7 +198,7 @@ "readjson": "^2.0.1", "redlint": "^3.13.1", "request": "^2.76.0", - "rimraf": "^5.0.1", + "rimraf": "^6.0.1", "scroll-into-view-if-needed": "^3.0.4", "serve-once": "^3.0.1", "serviceworker-webpack-plugin": "^1.0.1", From d70362fbf13654135b56d0e821044856bd56216a Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 19 Jul 2024 18:15:40 +0300 Subject: [PATCH 111/415] chore: npmvrc: add --- .nvmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .nvmrc diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..1efe0ac6 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +v20.15.1 From 3140b7f99866a8c6b3277991f8c61e232fb756e1 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Sat, 27 Jul 2024 15:54:10 +0300 Subject: [PATCH 112/415] chore: cloudcmd: v17.4.3 --- ChangeLog | 6 ++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 82b6bf51..0d84fe2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024.07.27, v17.4.3 + +feature: +- 6e8348b8 cloudcmd: rimraf v6.0.1 +- 61ca7f36 cloudcmd: putout v36.0.2 + 2024.07.03, v17.4.2 feature: diff --git a/HELP.md b/HELP.md index d5477ce2..d2d40555 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.4.2 +# Cloud Commander v17.4.3 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1095,6 +1095,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.07.27*, **[v17.4.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.3)** - *2024.07.03*, **[v17.4.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.2)** - *2024.05.06*, **[v17.4.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.1)** - *2024.04.17*, **[v17.4.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.0)** diff --git a/README.md b/README.md index 34bc9fa5..a98e59aa 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.4.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.4.3 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 5a5bab1b..5eb9ecd8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.4.2", + "version": "17.4.3", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From a6aa9bbc4481d2a9f0d060d6215d9c4b34fbb71e Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 11:46:51 +0300 Subject: [PATCH 113/415] fix: revert rimraf v6.0.1 This reverts commit 6e8348b8437a4cf997652b84a5b9399097615725. --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5eb9ecd8..5c1c6804 100644 --- a/package.json +++ b/package.json @@ -198,7 +198,7 @@ "readjson": "^2.0.1", "redlint": "^3.13.1", "request": "^2.76.0", - "rimraf": "^6.0.1", + "rimraf": "^5.0.1", "scroll-into-view-if-needed": "^3.0.4", "serve-once": "^3.0.1", "serviceworker-webpack-plugin": "^1.0.1", From 282b3d5cca7dad3c20e50ab4d465ff8b6d3da19e Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 11:47:20 +0300 Subject: [PATCH 114/415] feature: cloudcmd: @putout/cli-validate-args v2.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 5c1c6804..3dd3e152 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@cloudcmd/fileop": "^8.0.0", "@cloudcmd/move-files": "^8.0.0", "@cloudcmd/read-files-sync": "^2.0.0", - "@putout/cli-validate-args": "^1.0.1", + "@putout/cli-validate-args": "^2.0.0", "@putout/plugin-cloudcmd": "^3.1.1", "apart": "^2.0.0", "chalk": "^4.0.0", From 544e30dbf8d0f04842797ea177b61213526809b9 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 11:48:11 +0300 Subject: [PATCH 115/415] chore: cloudcmd: v17.4.4 --- ChangeLog | 8 ++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0d84fe2d..996c17f4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024.08.16, v17.4.4 + +fix: +- a6aa9bbc revert rimraf v6.0.1 + +feature: +- 282b3d5c cloudcmd: @putout/cli-validate-args v2.0.0 + 2024.07.27, v17.4.3 feature: diff --git a/HELP.md b/HELP.md index d2d40555..28bc97b5 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.4.3 +# Cloud Commander v17.4.4 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1095,6 +1095,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.08.16*, **[v17.4.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.4)** - *2024.07.27*, **[v17.4.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.3)** - *2024.07.03*, **[v17.4.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.2)** - *2024.05.06*, **[v17.4.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.1)** diff --git a/README.md b/README.md index a98e59aa..e7b0cee2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.4.3 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v17.4.4 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 3dd3e152..f53f42f7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.4.3", + "version": "17.4.4", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 74d1eb7e2859032b9536f176993a6e83b5d601a7 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 12:05:52 +0300 Subject: [PATCH 116/415] feature: drop support of node < 20 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f53f42f7..6ba787b5 100644 --- a/package.json +++ b/package.json @@ -215,7 +215,7 @@ "webpackbar": "^5.0.0-3" }, "engines": { - "node": ">=18" + "node": ">=20" }, "license": "MIT", "publishConfig": { From 5e93bcca1e31bd4e2b87aa610cdd0a25c1e34d0f Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 12:06:47 +0300 Subject: [PATCH 117/415] feature: cloudcmd: rimraf v6.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 6ba787b5..f6eedc46 100644 --- a/package.json +++ b/package.json @@ -198,7 +198,7 @@ "readjson": "^2.0.1", "redlint": "^3.13.1", "request": "^2.76.0", - "rimraf": "^5.0.1", + "rimraf": "^6.0.1", "scroll-into-view-if-needed": "^3.0.4", "serve-once": "^3.0.1", "serviceworker-webpack-plugin": "^1.0.1", From 88df2f05185b7dc74ddb3b03a510ec422b90afbe Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 12:08:02 +0300 Subject: [PATCH 118/415] chore: actions: node v22 --- .github/workflows/docker.yml | 4 ++-- .github/workflows/nodejs.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index f26b3755..6e22e4f0 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -15,10 +15,10 @@ jobs: - uses: oven-sh/setup-bun@v1 with: bun-version: latest - - name: Use Node.js 18.x + - name: Use Node.js 22.x uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 22.x - name: Install Redrun run: bun i yarn redrun -g --no-save - name: NPM Install diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 9dc3035e..8bdc6cc0 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -9,8 +9,8 @@ jobs: strategy: matrix: node-version: - - 18.x - 20.x + - 22.x steps: - uses: actions/checkout@v4 - uses: oven-sh/setup-bun@v1 From b63d6fccdebae3ecb2d55560b48a08ffcc38502e Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 12:12:56 +0300 Subject: [PATCH 119/415] chore: lint --- .putout.json | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.putout.json b/.putout.json index 1d2b1379..fa70da30 100644 --- a/.putout.json +++ b/.putout.json @@ -7,13 +7,7 @@ "fontello.json" ], "rules": { - "github/convert-npm-to-bun": "off", - "github/set-node-versions": ["on", { - "versions": [ - "18.x", - "20.x" - ] - }] + "github/convert-npm-to-bun": "off" }, "match": { "base64": { From 9109511e95bb9e9bbc8504c48b2abed616fd6a94 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 12:15:19 +0300 Subject: [PATCH 120/415] chore: lint --- .putout.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.putout.json b/.putout.json index fa70da30..9d6789b6 100644 --- a/.putout.json +++ b/.putout.json @@ -1,5 +1,7 @@ { - "plugins": ["cloudcmd"], + "plugins": [ + "cloudcmd" + ], "ignore": [ "html", "fixture*", @@ -7,7 +9,8 @@ "fontello.json" ], "rules": { - "github/convert-npm-to-bun": "off" + "github/convert-npm-to-bun": "off", + "github/set-node-versions": "off" }, "match": { "base64": { @@ -47,4 +50,4 @@ "merge-duplicate-functions": "off" } } -} +} \ No newline at end of file From ac3f20c5d1129da99b237e135a638806edffcc60 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 12:15:44 +0300 Subject: [PATCH 121/415] chore: cloudcmd: v18.0.0 --- ChangeLog | 6 ++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 996c17f4..08ce9e43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2024.08.16, v18.0.0 + +feature: +- 5e93bcca cloudcmd: rimraf v6.0.1 +- 74d1eb7e drop support of node < 20 + 2024.08.16, v17.4.4 fix: diff --git a/HELP.md b/HELP.md index 28bc97b5..3c9cea75 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.4.4 +# Cloud Commander v18.0.0 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1095,6 +1095,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.08.16*, **[v18.0.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.0.0)** - *2024.08.16*, **[v17.4.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.4)** - *2024.07.27*, **[v17.4.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.3)** - *2024.07.03*, **[v17.4.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.2)** diff --git a/README.md b/README.md index e7b0cee2..e2f26870 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v17.4.4 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v18.0.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index f6eedc46..419de4d4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "17.4.4", + "version": "18.0.0", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 75a75365cf5859af30f33b6c8075ab78b037b37f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 16 Aug 2024 09:17:21 +0000 Subject: [PATCH 122/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .putout.json | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.putout.json b/.putout.json index 9d6789b6..dcaac97f 100644 --- a/.putout.json +++ b/.putout.json @@ -1,7 +1,5 @@ { - "plugins": [ - "cloudcmd" - ], + "plugins": ["cloudcmd"], "ignore": [ "html", "fixture*", @@ -50,4 +48,4 @@ "merge-duplicate-functions": "off" } } -} \ No newline at end of file +} From 62ed8411ae0c1d454b75b7a73ef1840711ee934b Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 14:53:03 +0300 Subject: [PATCH 123/415] fix: bin: validateArgs is not a function (#147) --- bin/cloudcmd.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/cloudcmd.mjs b/bin/cloudcmd.mjs index 4ea301ac..6551c50b 100755 --- a/bin/cloudcmd.mjs +++ b/bin/cloudcmd.mjs @@ -164,7 +164,7 @@ else main(); async function main() { - const validateArgs = await simport('@putout/cli-validate-args'); + const {validateArgs} = await simport('@putout/cli-validate-args'); const error = await validateArgs(args, [ ...yargsOptions.boolean, From 9ec94dee158587666db17b9d00f50dc1f1625cd6 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 14:54:05 +0300 Subject: [PATCH 124/415] feature: cloudcmd: chalk v5.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 419de4d4..dd5b848d 100644 --- a/package.json +++ b/package.json @@ -95,7 +95,7 @@ "@putout/cli-validate-args": "^2.0.0", "@putout/plugin-cloudcmd": "^3.1.1", "apart": "^2.0.0", - "chalk": "^4.0.0", + "chalk": "^5.3.0", "compression": "^1.7.4", "console-io": "^14.0.0", "copymitter": "^9.0.0", From a522c49c1f9f5cbc2bfb7bdb16b98f232b9c38e0 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 14:54:54 +0300 Subject: [PATCH 125/415] chore: cloudcmd: v18.0.1 --- ChangeLog | 8 ++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 08ce9e43..5e7d4433 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2024.08.16, v18.0.1 + +fix: +- 62ed8411 bin: validateArgs is not a function (#147) + +feature: +- 9ec94dee cloudcmd: chalk v5.3.0 + 2024.08.16, v18.0.0 feature: diff --git a/HELP.md b/HELP.md index 3c9cea75..50d01d0f 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.0.0 +# Cloud Commander v18.0.1 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1095,6 +1095,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.08.16*, **[v18.0.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.0.1)** - *2024.08.16*, **[v18.0.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.0.0)** - *2024.08.16*, **[v17.4.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.4)** - *2024.07.27*, **[v17.4.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.3)** diff --git a/README.md b/README.md index e2f26870..f2a7d93b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.0.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v18.0.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index dd5b848d..bd7e40d3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "18.0.0", + "version": "18.0.1", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 3d03efbe63509f5aa34977b2c004f6f0aa65cc1f Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 16 Aug 2024 17:17:44 +0300 Subject: [PATCH 126/415] feature: css: show links in one small screens --- css/query.css | 14 ++++++++------ font/fontello.eot | Bin 14436 -> 14284 bytes font/fontello.json | 12 ++++++++++++ font/fontello.svg | 8 +++++--- font/fontello.ttf | Bin 14268 -> 14116 bytes font/fontello.woff | Bin 8796 -> 8716 bytes font/fontello.woff2 | Bin 7360 -> 7272 bytes 7 files changed, 25 insertions(+), 9 deletions(-) diff --git a/css/query.css b/css/query.css index 6b7c98a4..6e07a0c7 100644 --- a/css/query.css +++ b/css/query.css @@ -129,15 +129,14 @@ color: white; } - .file::before, - .file-link::before { + .file::before { color: rgb(26 224 124 / 56%); content: '\e80d'; } - .current-file .file::before, .file-link::before { - color: white; + color: rgb(26 224 124 / 56%); + content: '\e81d'; } /* меняем иконки на шрифтовые */ @@ -160,11 +159,14 @@ display: inline-block; } - .directory::before, - .directory-link::before { + .directory::before { content: '\e807'; } + .directory-link::before { + content: '\e81e'; + } + .file, .file-link { background-image: none; diff --git a/font/fontello.eot b/font/fontello.eot index c6b5875af90f3191bb1f67a76c6b4daa763f52e6..99e28f3eeb1447890525b7be9bb7cf15c795b07c 100644 GIT binary patch delta 1012 zcmYjQQD{?F829Gl$1o`%9;>|uyA(AT~AG%6??J`Bg$+#rrIHqZw}6aNz(+kyZ7=ljn8 zpa1{PIrq29=90SU09Y4QN4b(3yLB;pzGjW@1HefDI5t;yD}NNMZwX%o;Ktl?HAXy* zREa*p6P03lcGtuA2%jYwD7vRB#CH%rPTpTEojEbF_=O)pxegE&3-j*rLC2-N`ZsAk zvp|IZlJY&kc7?FDP_C{VU7l&(BO*n_T4`y{U3Hen2!BQRVA)-%pd0*&@SlWZr`+=V zjn8``lp6qGH!4e~tLt~(_yHh!hnilmyfa@}-PpT9wa$5$ahfZokruR2f zy`Q<*@;=4L(O3VAFQV3n%GfqOsvd~csATIQZ}2G?fc=oqzM4W5VPxp+VhW3+swjC7 zDAqw?DpS-oP&rfiD%E5PvZCyjzX_bfjO=^jrJlrSCNbg@y*qH5A-2c+lcQlf@Sny>k8 z!p4k+HxstzxBS{|GosHnKUF)FtPoh5)y*LGh78PKYv-7II@!E@9b~u0 zQded|`yN1uHzfV*?;-jPp83|J)=71eE}MQ4DHgmVRuW_0S?i4Vk98;({4ylpp4=%0 zAApa%Jd_w5hL31=!JA4vK-)W<+(5hDN{%Dtj;CH>7_Xm8>Dc8jojmpS(ELg@@b6^E MEmfg@`NiwOr&;sNd;kCd delta 1152 zcmcIiPi)&{6o1clY^QPTBu(s=wOKN^$<~CjHh+v*DVa2I)^s$q(pUg#WLcV~YN*v! zrJK5>w}BXchLPZc;D9PltW~5Q5EoR~i6K;RLBIte)LjrrR2ov(@{)}M5;w%t_r9Nh zzxTfH`PuKQ`JXMv#YX`?yWuc6ZR_gw8<|%d;nP0?U>*R@mTE<7;`3i^;vWOBd}(Ph zL^|0qjy8GPs?;tF{&|JCpQuzRUb0B{036*T6f1L=r@ue3u>`=a0|al)l#3U86XTNr z`ZC4SGbD%~aNEQw4t+DV#pQDgFCW|?;ad_`=H^Sq`Q*|r#qz{6wc@gc8}dH!w}^*c zD%Q%k-|y-sP8Tq@t@%rfXV5^-lcnx{JuE|Sn@bIwTN##h`mB;D=SXe(bhS5p`F9E^qpS&9p((B@b>S_-M3kn zB2f^q)n&_q&AaR@Hs>5Cdm2uFgITsfrCAWb1q$de00xY~6uy>m^&v<&ehPh<%dI=} z=Q1z4Nns>d00t$-($K*RyhB*^b}@pF7kqVa$|!+Tsss>$W09+Ls0`~u-of$}@PWV6 z=dV75o#0VAJ=I1xDx#=7OQ4A7K~%(vL%DSy6)OIt5Z3=|rGF`ux!`Wx?}k}zxAT8g zDHJlN#&fZlB#9zNKQTX%n;M@wZ9etn=;JY?5i`=MWMX(|Fdpd-2fI~Ckrdf2x(_J6u6Vk?yaG{rO1P$%wxx8MgP=1Zp!<=sXZz!8qC&AlV88OrJYwsc0plxTJ!ot zi7Wh#_ItX4hwX3l%l4VRlRZkQedsV;1Da$q2GUT4*Xij?`;)$19I`*^-^8Kj^N}&6 fb8FGj<}Xnfx~1vrT>0VRLTRSDRBnpLzL5U{YQ5D) diff --git a/font/fontello.json b/font/fontello.json index 354b93cc..22f82f33 100644 --- a/font/fontello.json +++ b/font/fontello.json @@ -180,6 +180,18 @@ "code": 59420, "src": "fontawesome" }, + { + "uid": "e15f0d620a7897e2035c18c80142f6d9", + "css": "link-ext", + "code": 59421, + "src": "fontawesome" + }, + { + "uid": "e35de5ea31cd56970498e33efbcb8e36", + "css": "link-ext-alt", + "code": 59422, + "src": "fontawesome" + }, { "uid": "60617c8adc1e7eb3c444a5491dd13f57", "css": "attention-circled-1", diff --git a/font/fontello.svg b/font/fontello.svg index 4564f981..d12c9f1e 100644 --- a/font/fontello.svg +++ b/font/fontello.svg @@ -1,7 +1,7 @@ -Copyright (C) 2021 by original authors @ fontello.com +Copyright (C) 2024 by original authors @ fontello.com @@ -64,7 +64,9 @@ - + + + - \ No newline at end of file + diff --git a/font/fontello.ttf b/font/fontello.ttf index 4fc26184e1cd73e9158c547a0f354069f042bb85..2499b12693af1766c6fabf8e515a8d4ed73118da 100644 GIT binary patch delta 985 zcmYjQU1$?a6h3EWcN2GG($sZZX__W&{;1ZLbes5ltp-IU(kg=1htzGYsWoYXhFV3M zK3M!gxn6SNK3(obMMPB8K%WF(d=dpk@j(>CABf_kf(j;{iHZ)KJ@b8Y&Ybhj%-))~ zFn-ow2y9*jfc*fldpK+5-lYP!310```tW4lM?8&4hCa@{xpa1D>E|Paj}mmGt%Et@ z>j>{5Z%=0q@9i5qZwHX>0C<(r5o=F-+@if&@6mc}lnDEO(j$O2iEv;vo1fY_Iaqy5 zM1+W$%*3!Y9iLoA_!8lDS!*hXmh(B`_k?}pR(9n6zfB&>bpWvYxru}M*=O4y1B9MY z)3dn)Bf06hm2*_<#9yBVxWr4v?YL&Z%ePg>U>Cmv|Iju__G>Vj%4D2u2^n>UXMe<; zB348%A+OeW2~xEfN$_QF@ilJ2mQoj+kMoYvf*38O4SWpMvR4Gu@O5der$BY8pLv;Y zgD|XtWbdX3qT)t|@uf^+ev~CC2?{E+ATgOq@(jqF$$Xj$F$q~(G{|=V=P)Rm?OV|l z?1=@tZA$ZET&OE;{?<^B+lHB*Iw*3G~n1Q7>ZpQ@XtyKrAA7!4yM6{Dv7H~iQ^h$go8y8 zB@wZ?rBeS=?IEWqhx{nFfGlx{a*0TCOAjcQs_msGB2`rmMQSAi89V8rQg2m9Z{D}x zH}l@??9S~A59hB1Yrzx00AL0HPUXwF%EY7JE#mh8SU$hB7$BYOU5+++x>78kANcDs zaSu_cn7ddZ-38FMODGoSE=~V*WPJ&MTLbVvohjr#?~IO50_e*WPt1@Y-sHB3QyjWy z%8Scq7QWbjLBewqR_5mOx%t@A4#hIWljYoU1=r<0;@5}=F67FEXE)l~iPHtlv&#I% z#Zz}TuLAV0(o0{iEEFo$jUyWXM&SEDvn;af)+hMk$DQot{w#dTPQrD%2Fc%;jesSO zkW+{F?c3Owq&Bi5ge^^-gU^~dTtnaPw0^^nD22Z@%AiUCi5#%eWW)UR3_FYU$J}T~ z%?_|X%Vw!G3j#Pm0Ui3mfH9cDuab^#1PRBFqKfJCnmuzSdCo}+Bf$bNC@~cu+IWGt z39IflMo@V{t%6-f3G7nQiwGQxT(L!CSO@YpmM?+|o>tXUdIwvR;W@_(OEDv*;>Pf~X8D_+( zrv3f>!+lJISuxF2DrGkJA6>DwSJmbf>R&mw^YZKK+t)M<4A_ z^36jB;VRH1lQEEh5`05XPb|KB2M4X)?hPEQ*L%j0&h3Rp>La}lbV}2uxx#z7h5Sru LsZc-H_gH=nirmf1 diff --git a/font/fontello.woff b/font/fontello.woff index 16fa9d71203ef2b7d396e36e65551d2e5d8ecccf..0b73db1b01f1306ead83088bd13ba51ef2112d89 100644 GIT binary patch delta 6566 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 diff --git a/font/fontello.woff2 b/font/fontello.woff2 index 8b7b62f023217c7ff1966dbd151c423110fa5453..23125c95c06acb6ec8cc8187494fdcebe5b01fb7 100644 GIT binary patch literal 7272 zcmV-u9GByFPew8T0RR91032ul4*&oF05>E602~ki0RR9100000000000000000000 z0000SR0d!Gh7<@637iZO2nxIivQ-O000A}vBm;o}1Rw>4O$UPo41pXQCNTxv7<$+^ z0FNKNEQ-<~DiPJ1X|w+`j*}sSUB-63Ruv>cX@{nSqM}B@w~};8(Oh_-UGoUKCKih& zn%MBz&B^C8%!r?K9}ipFJ5 zA&q$Eo^gm&l1w~^L<=C`f9Ibi7 zi8--nMFlyjC8?OetHShE7S1A$)I^Y){C@hh5q0NC<${mXNPi&bGEh-YUs8D zsk6P1g`@rCNtkQ$E=f<2`RL0Nw5`Bet^gy0vWl{ZvTDI9jA+Eh#JXtw!i(ZBBDjdg z8zmhs+<#uDxxV*pB}#Gy_IM1#f@5*pe!eV4|4YhQ@_}L>*go>Hq>>Jh=OT=xu#-c( zz_indTj$Q5hOYAs+uCVrH2{Hvcs|9XYAW>oKb-bHD;4E5U7Zr*XdrT;Svb*Gg8-zk zjs=)QE1HM6zDp0I3)~Dm5LvL^@wRg5$wLH}&1S=3fLUYko>t$HM{&U1Y~BZ48U6I~ zEt5q616PngebWi09`0jByLKXhGwjx!k;UPng1`70`7k%i*07XiasZgbcqfUb+E!uSG(gO()k%5ckF6f~W z1+jEDjiIqL9*s{E(1bJ*O-z%bNz-I#vNSoGJWYY7NK>LI(^P1xG&LGWQ>SUrG-+Bi zZJG{Em!{{V>!AybWCjTE7Punz#+dJ5Qd07TOm}=qy9nXYg-{I;c5)59xoAnP#^mXC z?pcbzt*?zBP3!-kJh8;XJmE)(Qja6B0H9qxImZcVDWJTDZD_#;8#JCg(V+|N zk*r|lrWnh*fjCtTfx7^l&$zX9LrE*xI?w-@44IMtM5$t|a|Dx7g@^bK;!u5bh>)H@ zJ=cQFy?`7%O7Oyb3Ulk|EUyY_EXaa;OkNSEzINk4hz} z3-BE8r&AYorlD0wg+2e$It^6TcOtWz!!{b&BKLlY#%cRwoqWQ zbF3R`1+aMZ6y;e++?U1@SqPj}LGVcw-36iUn_pIBp0%w0qa97d0#YxOburT5prfQd zvH?qNiv3PmK(1*QB(UA0>gsK?F;=J@9tDixrAIw@Y5~Yz(qC_WTqee@jd|~t2P+yZ z#p+M|PD_s>^*AUn^U8or5IjP_Cjtb7LP$i2hy+a{LyIWTChE)~)buSP<;|m@Qh}c> zg?8JH?o>PR-?7KlS^V#D>tKw0QgIGgelHlTry6$Au!n{*8YXC%qG5)HIT{vd*hj+w z+UyBr!CB$LpYXDD^v(Q%XX7yO*Hnp&p86-I<(NWbAT?RgJfofZrZa_69A?RRq11a1 zy{$E-ts?47FT9NkT65iOGJEy{@=53!ON_xz4$C_^n8aYT0?b|kS)se6Gi9MOYCbM2 z$bt++cLBD)AjcZjtp&#>ULNGIG`vM2GW$fTCIf_)Qe1C-9fy5kmT+cz+;H&iMs?=; zOX}YNn8jUe>W31?Eme6(R`}|?nFNuAW`ptU(^Ab`LGm=tjPRj93G>@oR%NX<~DS`nG+VFk);5Siv1_c2D zB^)%#L@02L@?`Rep2Y@ZWT3GE#JQlzeoNAV8})RxrbKY}#`8`wyt<~-2|Ia& zHT$|8TEh%TMQN8|&m6=c3$ZGtPQS{Gd+nwNW^d=$(`_>M{k{QqsW9(Nuun~AWd3!C z%_g1?i4|ov+)Bf&Z<^8QZl*dU^bV9*Q5&+unW3UC=PUfi zJga^A^hRS~OH{K(g^{M}(S@82c&X_v8dCG&daY+mJ^cziL+S6&59IoKdm|sPv*LW3 z^JKF$fb;?p>zZ0ih!;jRG>EF%2=QFc&#W11*l&>R}>4Od0(`ha9ib z0&Ab_t!L^JP@7Hn-2~QFZgHI9IQ>HYo+HsJew)8l6(Z_l_n-DvMw4oJ2oI<7>TX9A zmEG@f`MlE_!n9Imx6`CJ&Cgd`HqZF>ji_B_iTSSf=mkX{iqON=?ssx}I5fPcmxW>`+BFT4L=wML z7fDH{i=Nqb0|%e%NJ|ZAeGQ!65hD@K{ozcXWt{xiqLJK<2c1EmR2M+z%oI+V$w_4S zG5L(cd{Qoa>G}*vlPbDmGY}42tXdIUVkCNO6q%0N58iY0pS$6i^KN7~Ls{RpH|5jdq!1PpnE5g~ zST-m2J{LhgZ$kC55_TgW!+D8eP7=q4D(5FZWdg)24)XLr}x74Gv7 zc>^8|73U+R9ZCM(1x|3ai$xdjU69hET|wY2e?+xn=9ryugf5bzvaGawg@*phQf|*x zHS4GA4~7A7s!>dedF+P7r+(UZuj3V8S$N_l@iKa4Pm}TXQhObL@H1I#HNF0it{8e2 zRBfy0ipOrniioa+;Mi%DMjc_)FWn(-0Uf>R1i3D$n~xN_@~2uaf0B+6I+Ir#4P?UR z(+K0CE3M%_?@TycA+0h%Xo1{0px7g3%o=s1J*#60HPej$et_{;gxh&Bq)nRzt(zT_ zhZU@RvF4{QJNQQc(Pu9_bP0LMdd|Mf7x!a$1bV*5f#QhuiacsdEy#&OEU5qr@wkK} zEVUpNDvRe8%WeLR}c zPHZ{ndSMq1|ADXOyp#O1Wp59v%h1#O(`D*koqFcrkz@buhKa&UIy%0zl|#9}Bp=n? z0FwZ#ff1O%hBJ+^xPpx>`?fi~ZG>L+)%BNFF>6{&H*S}k zUx=E{?#C(>8yy|F>-XO+#`$HI{Ql52b+RzK_@Knh@_|i+;&^E-)9JT|e~Z5o9xgKy zko&QgsXk^mT@`Cz)>Te_>`B~qR;+td)>?wV}8VN1P|5yg)>GQPXGBy5v%;5G;nwUlR3#4$Tf`vqekhI8Pm6XQxcoS&YYM49USKCE>3?Xz5VMOR>DAfw!w- z=)~rinlWmSSsrg8&V~dKFclS^{o>j3@;PyVtF>5cy*}>0ZQGPc8v7x&`j6D_aBG{K zv2UM9nz>Mqv;OI)pE$MGuVxQ}t3prjI8Nz3im zdXG{ybLUIaT~Ykz zzR&yJEtl#0SlD4vru<+1E#iVP>Xw$Ne=09yHRaz{r|NidP5%w~hc6N;I?&a?1-Ys^ zd^zF!%1O=d#U5CtawY9zemQrwxepsGp<~}N+3jyBx?%9PS8OpMTePQV67lwk#MXoK zW&P=vQ{O`(kKqQmWCZ5NVt*)WWY!hm5hP!QLx~6WFMnUEbmcmSBCgeEwaZq8-?R|Q5c3K zFRAKzy?c_}?K*8x;XK|j$b$+`(teUFg>s-IjwEsMarf2L;0zLw%afR_Z^}9nc7xIuorQeet(X96*CzWLe|%4 zEiEYry||rawDc`8xsHi9h|hiJByu|BFzNJt)O!wxoK_sn@fL@^zu%?B8pP^%$Wg(w zg%Lp}BNU>Dc~NxR|FGM_OMz4V{M_H#vGKT?nmEY8;gArrqe`g>F$M0oZ7Yuvq*>5P zaDFV7pK}@+nN&tR8yO{=RLJlM94pHpI`k}<$Gq%iSRv&1!mpA)x#=+yKC$O7y|qo# z^&hF3DCMxNMti%k#hZi%Op=fj#r~U6(i0SBKfVOhw1Yor9a+x`912d&fWI z?zzU_>($pN}50$I!t@BPup9}x7AOAbBuMr z6!!|3Esf->cm7y86x0SAZ(m2Nz8L!AXz#-((4+oLh@uaH2RdU9lS}dTc!yFFeV}%P z97plBNN9UU*+k!@2VN9sqw4e%cU-!6I9 z-PG?Ve5EJXP`_`$26#Wz1-$1Q`SYyRpSZeU+t#h7A1b;%+-<9U|2pr3dP@I)f5o$B z>#sJPHGzj-Mwu56RrPM_R`{tnm+@B>vD2&g^zw4o==(y8tN9PWc9kdlXZ2}RS@P4d8)^~GEN(tGNhemcg zm1!h{cc(cIB2%DsYBPkOkjE^6>_PiXf#;ZK-wWGiuxC6s8 zdexXQmKT^JCcT7;1OSu;5pa@#SV#xDv&FzmIDOnXiDi3^9JARo6!Y|+3Bm;1B!rZU z@y3(BxawxTK;C-OWHsm#`bC=bx`A8o$pdp`PR^m^ zx^qD+5p!MBraFi{V!4kzmtxjfUL^37T`MMYMNP{>Jx_)c zN9SEZPXPFYcOb+l9Zc0)nCTJJbiCZ^TV9xj$FEX3r$*Lc9pG4UmpP)4HpMy#=0~6l zM--7k8=zkvBFK^#PJoCV;DTYjnD~=@%Oqu6605RI2&AY$ip;?(r<%{`R7_(NFeU_Sd-l6N3t{ZK;mQm7^2@IbAk z4z0RZTGT=k4w>&8r)x`djB)fmKDJ_X7sI(|mlEsridCaKdi(yeD`wf~9S;HknA z6^gQkNth-{At@#SMj=(i=q)6-$Scg|{Gd9gzv?yhgP8e+rl zsG6eTB`LB+dlxwm0EfQskWP0^wfjfw-V$qH- zjp!8hI`2HpYw}pDZcSgBBa~{qANTX$!GPDeqTOd%0nllO0XSUIT+VgXAxrq{y*))E z4<*Zp>avqOYEFz;8C(FuaO*^ff67>eslm_`RZPv;-==+H$0v3?;#(iMI6i1MLd2L` z@;$5BkTEF2trLjJd~vgqV01BYF|TnI*UA2uBC9}03TO=$qjSP^xk~4~$lL2NR1vU5 zKnQCLFop`MvIVJalsYj9Zn;scRkx_ay<$gsJe zLBeisW6~k+K`Q(CC~ztdAhr9Yu#ywcoW>Nchk}*^oWd*6j~I~teu6&EfL|+Cq!e zF<&#Mlk#%C5dPqg`=S3QIvBZS-DYY(*k2tlvtC&*8F!E?xRRT=nhq5gaV_&0#Zs2j zX9{cc3Ld<8htAMha!~4DK+Nb`ephXbs2qZ41s_;^5#jwTpFNM>t!rsciO0J! z!)*|bPHvoM-!#=G6Oe1c@I%lwC^QC(!xM-kGI9z^s>P+{mDROwePeTLduMlV{{VkT zz6E|YBd5n2lCPZzb|}Vn;I9i?NbEoLNh2R_L+UNNkTzUDO&Nq91j*0jkuy#pxv8QFDyL`Bf1n|-o`qkStY8iUj1jPy zCoGge&;wwUUm=7F7Ea*>-R=Voc1Zv(H;}waY*LETDNG->Q&C2>0>CGqHv;1r1T8Q^ zfSI~yDxV(3g#&9J09w2|L;zF=q~Yt_xR@rIJ6AZ Cu>2SR literal 7360 zcmV;x96#fCPew8T0RR91035&o4*&oF05`k<032oj0RR9100000000000000000000 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 Date: Fri, 16 Aug 2024 17:18:24 +0300 Subject: [PATCH 127/415] chore: cloudcmd: v18.0.2 --- ChangeLog | 5 +++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5e7d4433..a0cf7422 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.08.16, v18.0.2 + +feature: +- 3d03efbe css: show links in one small screens + 2024.08.16, v18.0.1 fix: diff --git a/HELP.md b/HELP.md index 50d01d0f..ee18c39a 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.0.1 +# Cloud Commander v18.0.2 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1095,6 +1095,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2024.08.16*, **[v18.0.2](//github.com/coderaiser/cloudcmd/releases/tag/v18.0.2)** - *2024.08.16*, **[v18.0.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.0.1)** - *2024.08.16*, **[v18.0.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.0.0)** - *2024.08.16*, **[v17.4.4](//github.com/coderaiser/cloudcmd/releases/tag/v17.4.4)** diff --git a/README.md b/README.md index f2a7d93b..f7281055 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.0.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v18.0.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index bd7e40d3..91d7d7c6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "18.0.1", + "version": "18.0.2", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From ddf4542b75a42ba9dce2eab6142c1b6323842cc3 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Sat, 17 Aug 2024 13:10:43 +0300 Subject: [PATCH 128/415] feature: cloudcmd: add ability to hide dot files (#307) --- HELP.md | 245 ++++++++++++++++++++------------------- bin/cloudcmd.mjs | 3 + client/client.js | 14 ++- client/key/index.js | 13 +++ common/cloudfunc.js | 9 ++ common/cloudfunc.spec.js | 33 ++++++ json/config.json | 1 + json/help.json | 2 + man/cloudcmd.1 | 2 + server/route.mjs | 1 + tmpl/config.hbs | 6 + 11 files changed, 203 insertions(+), 126 deletions(-) diff --git a/HELP.md b/HELP.md index ee18c39a..fa3eae4b 100644 --- a/HELP.md +++ b/HELP.md @@ -59,78 +59,79 @@ cloudcmd Cloud Commander supports the following command-line parameters: -|Parameter |Operation -|:------------------------------|:------------------------------ -| `-h, --help` | display help and exit -| `-v, --version` | display version and exit -| `-s, --save` | save configuration -| `-o, --online` | load scripts from remote servers -| `-a, --auth` | enable authorization -| `-u, --username` | set username -| `-p, --password` | set password -| `-c, --config` | configuration file path -| `--show-config` | show config values -| `--show-file-name` | show file name in view and edit -| `--editor` | set editor: "dword", "edward" or "deepword" -| `--packer` | set packer: "tar" or "zip" -| `--root` | set root directory -| `--prefix` | set url prefix -| `--prefix-socket` | set prefix for url connection -| `--port` | set port number -| `--confirm-copy` | confirm copy -| `--confirm-move` | confirm move -| `--open` | open web browser when server starts -| `--name` | set tab name in web browser -| `--one-file-panel` | show one file panel -| `--keys-panel` | show keys panel -| `--contact` | enable contact -| `--config-dialog` | enable config dialog -| `--config-auth` | enable auth change in config dialog -| `--console` | enable console -| `--sync-console-path` | sync console path -| `--terminal` | enable terminal -| `--terminal-path` | set terminal path -| `--terminal-command` | set command to run in terminal (shell by default) -| `--terminal-auto-restart` | restart command on exit -| `--vim` | enable vim hot keys -| `--columns` | set visible columns -| `--theme` | set theme 'light' or 'dark'" -| `--export` | enable export of config through a server -| `--export-token` | authorization token used by export server -| `--import` | enable import of config -| `--import-token` | authorization token used to connect to export server -| `--import-url` | url of an import server -| `--import-listen` | enable listen on config updates from import server -| `--dropbox` | enable dropbox integration -| `--dropbox-token` | set dropbox token -| `--log` | enable logging -| `--no-show-config` | do not show config values -| `--no-server` | do not start server -| `--no-auth` | disable authorization -| `--no-online` | load scripts from local server -| `--no-open` | do not open web browser when server started -| `--no-name` | set default tab name in web browser -| `--no-keys-panel` | hide keys panel -| `--no-one-file-panel` | show two file panels -| `--no-confirm-copy` | do not confirm copy -| `--no-confirm-move` | do not confirm move -| `--no-config-dialog` | disable config dialog -| `--no-config-auth` | disable auth change in config dialog -| `--no-console` | disable console -| `--no-sync-console-path` | do not sync console path -| `--no-contact` | disable contact -| `--no-terminal` | disable terminal -| `--no-terminal-command` | set default shell to run in terminal -| `--no-terminal-auto-restart` | do not restart command on exit -| `--no-vim` | disable vim hot keys +| Parameter |Operation +|:-----------------------------|:------------------------------ +| `-h, --help` | display help and exit +| `-v, --version` | display version and exit +| `-s, --save` | save configuration +| `-o, --online` | load scripts from remote servers +| `-a, --auth` | enable authorization +| `-u, --username` | set username +| `-p, --password` | set password +| `-c, --config` | configuration file path +| `--show-config` | show config values +| `--show-dot-files` | show dot files +| `--show-file-name` | show file name in view and edit +| `--editor` | set editor: "dword", "edward" or "deepword" +| `--packer` | set packer: "tar" or "zip" +| `--root` | set root directory +| `--prefix` | set url prefix +| `--prefix-socket` | set prefix for url connection +| `--port` | set port number +| `--confirm-copy` | confirm copy +| `--confirm-move` | confirm move +| `--open` | open web browser when server starts +| `--name` | set tab name in web browser +| `--one-file-panel` | show one file panel +| `--keys-panel` | show keys panel +| `--contact` | enable contact +| `--config-dialog` | enable config dialog +| `--config-auth` | enable auth change in config dialog +| `--console` | enable console +| `--sync-console-path` | sync console path +| `--terminal` | enable terminal +| `--terminal-path` | set terminal path +| `--terminal-command` | set command to run in terminal (shell by default) +| `--terminal-auto-restart` | restart command on exit +| `--vim` | enable vim hot keys +| `--columns` | set visible columns +| `--theme` | set theme 'light' or 'dark'" +| `--export` | enable export of config through a server +| `--export-token` | authorization token used by export server +| `--import` | enable import of config +| `--import-token` | authorization token used to connect to export server +| `--import-url` | url of an import server +| `--import-listen` | enable listen on config updates from import server +| `--dropbox` | enable dropbox integration +| `--dropbox-token` | set dropbox token +| `--log` | enable logging +| `--no-show-config` | do not show config values +| `--no-server` | do not start server +| `--no-auth` | disable authorization +| `--no-online` | load scripts from local server +| `--no-open` | do not open web browser when server started +| `--no-name` | set default tab name in web browser +| `--no-keys-panel` | hide keys panel +| `--no-one-file-panel` | show two file panels +| `--no-confirm-copy` | do not confirm copy +| `--no-confirm-move` | do not confirm move +| `--no-config-dialog` | disable config dialog +| `--no-config-auth` | disable auth change in config dialog +| `--no-console` | disable console +| `--no-sync-console-path` | do not sync console path +| `--no-contact` | disable contact +| `--no-terminal` | disable terminal +| `--no-terminal-command` | set default shell to run in terminal +| `--no-terminal-auto-restart` | do not restart command on exit +| `--no-vim` | disable vim hot keys | `--no-themes` | set default visible themes -| `--no-export` | disable export config through a server -| `--no-import` | disable import of config -| `--no-import-listen` | disable listen on config updates from import server -| `--no-show-file-name` | do not show file name in view and edit -| `--no-dropbox` | disable dropbox integration -| `--no-dropbox-token` | unset dropbox token -| `--no-log` | disable logging +| `--no-export` | disable export config through a server +| `--no-import` | disable import of config +| `--no-import-listen` | disable listen on config updates from import server +| `--no-show-file-name` | do not show file name in view and edit +| `--no-dropbox` | disable dropbox integration +| `--no-dropbox-token` | unset dropbox token +| `--no-log` | disable logging For options not specified by command-line parameters, Cloud Commander then reads configuration data from `~/.cloudcmd.json`. It uses port `8000` by default. @@ -152,56 +153,57 @@ Then, start the server again with `cloudcmd` and reload the page. ## Hot keys -|Key |Operation -|:----------------------|:-------------------------------------------- -| `F1` | help -| `F2` | show `user menu` -| `F3` | view, change directory -| `Shift + F3` | view raw file, change directory -| `F4` | edit -| `F5` | copy -| `Alt` + `F5` | pack -| `F6` | rename/move -| `Shift` + `F6` | rename current file -| `F7` | new directory -| `Shift + F7` | new file -| `F8`, `Delete` | remove -| `Shift + Delete` | remove without prompt -| `F9` | menu -| `Alt` + `F9` | extract -| `F10` | config -| `*` | select/unselect all -| `+` | expand selection -| `-` | shrink selection -| `:` | open Command Line -| `Ctrl + X` | cut to buffer -| `Ctrl + C` | copy to buffer -| `Ctrl + V` | paste from buffer -| `Ctrl + Z` | clear buffer -| `Ctrl + P` | copy path -| `Ctrl + R` | refresh -| `Ctrl + D` | clear local storage -| `Ctrl + A` | select all files in a panel -| `Ctrl + M` | [rename selected files](https://github.com/coderaiser/cloudcmd/releases/tag/v12.1.0) in editor -| `Ctrl + U` | swap panels -| `Ctrl + F3` | sort by name -| `Ctrl + F5` | sort by date -| `Ctrl + F6` | sort by size -| `Up`, `Down` | file system navigation -| `Enter` | change directory/view file -| `Alt + Left/Right` | show content of directory under cursor in target panel -| `Alt + G` | go to directory -| `Ctrl + \` | go to the root directory -| `Tab` | move via panels -| `Page Up` | up on one page -| `Page Down` | down on one page -| `Home` | to begin of list -| `End` | to end of list -| `Space` | select current file (and get size of directory) -| `Insert` | select current file (and move to next) -| `F9` | context menu -| `~` | console -| `Esc` | toggle vim hotkeys (`file manager`, `editor`) +| Key |Operation +|:---------------------|:-------------------------------------------- +| `F1` | help +| `F2` | show `user menu` +| `F3` | view, change directory +| `Shift + F3` | view raw file, change directory +| `F4` | edit +| `F5` | copy +| `Alt` + `F5` | pack +| `F6` | rename/move +| `Shift` + `F6` | rename current file +| `F7` | new directory +| `Shift + F7` | new file +| `F8`, `Delete` | remove +| `Shift + Delete` | remove without prompt +| `F9` | menu +| `Alt` + `F9` | extract +| `F10` | config +| `*` | select/unselect all +| `+` | expand selection +| `-` | shrink selection +| `:` | open Command Line +| `Ctrl + X` | cut to buffer +| `Ctrl + C` | copy to buffer +| `Ctrl + V` | paste from buffer +| `Ctrl + Z` | clear buffer +| `Ctrl + P` | copy path +| `Ctrl + R` | refresh +| `Ctrl + D` | clear local storage +| `Ctrl + A` | select all files in a panel +| `Ctrl + M` | [rename selected files](https://github.com/coderaiser/cloudcmd/releases/tag/v12.1.0) in editor +| `Ctrl + U` | swap panels +| `Ctrl + F3` | sort by name +| `Ctrl + F5` | sort by date +| `Ctrl + F6` | sort by size +| `Ctrl + Command + .` | show/hide dot files +| `Up`, `Down` | file system navigation +| `Enter` | change directory/view file +| `Alt + Left/Right` | show content of directory under cursor in target panel +| `Alt + G` | go to directory +| `Ctrl + \` | go to the root directory +| `Tab` | move via panels +| `Page Up` | up on one page +| `Page Down` | down on one page +| `Home` | to begin of list +| `End` | to end of list +| `Space` | select current file (and get size of directory) +| `Insert` | select current file (and move to next) +| `F9` | context menu +| `~` | console +| `Esc` | toggle vim hotkeys (`file manager`, `editor`) ### Vim @@ -398,6 +400,7 @@ Here's a description of all options: "confirmCopy": true, // confirm copy "confirmMove": true, // confirm move "showConfig": false, // show config at startup + "showDotFiles": true, // show dot files "showFileName": false, // do not show file name in view and edit "contact": true, // enable contact "configDialog": true, // enable config dialog diff --git a/bin/cloudcmd.mjs b/bin/cloudcmd.mjs index 6551c50b..0a7ec042 100755 --- a/bin/cloudcmd.mjs +++ b/bin/cloudcmd.mjs @@ -86,6 +86,7 @@ const yargsOptions = { 'confirm-copy', 'confirm-move', 'show-config', + 'show-dot-files', 'show-file-name', 'vim', 'keys-panel', @@ -124,6 +125,7 @@ const yargsOptions = { 'export': choose(env.bool('export'), config('export')), 'prefix-socket': config('prefixSocket'), + 'show-dot-files': choose(env.bool('show_dot_files'), config('showDotFiles')), 'show-file-name': choose(env.bool('show_file_name'), config('showFileName')), 'sync-console-path': choose(env.bool('sync_console_path'), config('syncConsolePath')), 'config-dialog': choose(env.bool('config_dialog'), config('configDialog')), @@ -189,6 +191,7 @@ async function main() { config('username', args.username); config('console', args.console); config('syncConsolePath', args.syncConsolePath); + config('showDotFiles', args.showDotFiles); config('showFileName', args.showFileName); config('contact', args.contact); config('terminal', args.terminal); diff --git a/client/client.js b/client/client.js index 4c4555ff..139dd002 100644 --- a/client/client.js +++ b/client/client.js @@ -103,6 +103,7 @@ function CloudCmdProto(DOM) { history, noCurrent, currentName, + showDotFiles: CloudCmd.config('showDotFiles'), }, panel); }; @@ -300,7 +301,6 @@ function CloudCmdProto(DOM) { * @param options * { refresh, history } - необходимость обновить данные о каталоге * @param panel - * @param callback * */ async function ajaxLoad(path, options = {}, panel) { @@ -348,13 +348,16 @@ function CloudCmdProto(DOM) { /** * Функция строит файловую таблицу - * @param json - данные о файлах + * @param data - данные о файлах * @param panelParam - * @param history - * @param callback + * @param options - history, noCurrent, showDotFiles */ async function createFileTable(data, panelParam, options) { - const {history, noCurrent} = options; + const { + history, + noCurrent, + showDotFiles, + } = options; const names = [ 'file', @@ -385,6 +388,7 @@ function CloudCmdProto(DOM) { data, id: panel.id, prefix, + showDotFiles, template: { file, path, diff --git a/client/key/index.js b/client/key/index.js index d7d455af..b0678601 100644 --- a/client/key/index.js +++ b/client/key/index.js @@ -509,6 +509,19 @@ async function switchKey(event) { event.preventDefault(); } + break; + + case KEY.DOT: + if (meta && shift) { + const showDotFiles = !CloudCmd.config('showDotFiles'); + CloudCmd._config('showDotFiles', showDotFiles); + CloudCmd.refresh(); + await DOM.RESTful.Config.write({ + showDotFiles, + }); + } + break; } } + diff --git a/common/cloudfunc.js b/common/cloudfunc.js index 39e422e7..4e4e09d7 100644 --- a/common/cloudfunc.js +++ b/common/cloudfunc.js @@ -16,6 +16,13 @@ const Path = store(); Path('/'); +const filterOutDotFiles = ({showDotFiles}) => ({name}) => { + if (showDotFiles) + return true; + + return !name.startsWith('.'); +}; + module.exports.FS = FS; module.exports.apiURL = '/api/v1'; module.exports.MAX_FILE_SIZE = 500 * 1024; @@ -118,6 +125,7 @@ module.exports.buildFromJSON = (params) => { template, sort = 'name', order = 'asc', + showDotFiles, } = params; const templateFile = template.file; @@ -195,6 +203,7 @@ module.exports.buildFromJSON = (params) => { } fileTable += files + .filter(filterOutDotFiles({showDotFiles})) .map(updateField) .map((file) => { const name = encode(file.name); diff --git a/common/cloudfunc.spec.js b/common/cloudfunc.spec.js index b5aceb7b..e4e06dd7 100644 --- a/common/cloudfunc.spec.js +++ b/common/cloudfunc.spec.js @@ -142,3 +142,36 @@ test('cloudfunc: getSize: file', (t) => { t.equal(result, expected); t.end(); }); + +test('cloudfunc: buildFromJSON: showDotFiles: false', (t) => { + const data = { + path: '/media/', + files: [{ + date: '30.08.2016', + mode: 'rwx rwx rwx', + name: '.floppy', + owner: 'root', + size: '7b', + type: 'directory-link', + }], + }; + + const html = buildFromJSON({ + prefix: '', + template, + data, + showDotFiles: false, + }); + + const $ = cheerio.load(html); + const el = $('[data-name="js-file-LmZsb3BweQ=="]'); + + const result = el + .find('[data-name="js-name"]') + .text(); + + const expected = ''; + + t.equal(result, expected); + t.end(); +}); diff --git a/json/config.json b/json/config.json index fd66580f..e65f41ee 100644 --- a/json/config.json +++ b/json/config.json @@ -30,6 +30,7 @@ "terminalPath": "", "terminalCommand": "", "terminalAutoRestart": true, + "showDotFiles": true, "showConfig": false, "showFileName": false, "vim": false, diff --git a/json/help.json b/json/help.json index 056713ff..6289a2d2 100644 --- a/json/help.json +++ b/json/help.json @@ -8,6 +8,7 @@ "-p, --password ": "set password", "-c, --config ": "configuration file path", "--show-config ": "show config values", + "--show-dot-files ": "show dot files", "--show-file-name ": "show file name in view and edit", "--editor ": "set editor: \"dword\", \"edward\" or \"deepword\"", "--packer ": "set packer: \"tar\" or \"zip\"", @@ -65,6 +66,7 @@ "--no-export ": "disable export config through a server", "--no-import ": "disable import of config", "--no-import-listen ": "disable listen on config updates from import server", + "--no-show-dot-files ": "do not show dot files", "--no-show-file-name ": "do not show file name in view and edit", "--no-dropbox ": "disable dropbox integration", "--no-dropbox-token ": "unset dropbox token", diff --git a/man/cloudcmd.1 b/man/cloudcmd.1 index 9ce86c60..607ff241 100644 --- a/man/cloudcmd.1 +++ b/man/cloudcmd.1 @@ -31,6 +31,7 @@ programs in browser from any computer, mobile or tablet device. -p, --password set password -c, --config configuration file path --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" --packer set packer: "tar" or "zip" @@ -66,6 +67,7 @@ programs in browser from any computer, mobile or tablet device. --dropbox-token set dropbox token --log enable logging --no-show-config do not show config values + --no-show-dot-files do not show dot files --no-server do not start server --no-auth disable authorization --no-online load scripts from local server diff --git a/server/route.mjs b/server/route.mjs index d6917ec5..675a0b7a 100644 --- a/server/route.mjs +++ b/server/route.mjs @@ -180,6 +180,7 @@ function buildIndex(config, html, data) { data, prefix: getPrefix(config), template: Template, + showDotFiles: config('showDotFiles'), }); return indexProcessing(config, { diff --git a/tmpl/config.hbs b/tmpl/config.hbs index dfcc4c09..a05db1e6 100644 --- a/tmpl/config.hbs +++ b/tmpl/config.hbs @@ -135,6 +135,12 @@ placeholder="Port" class="form-control">
  • +
  • + +
  • - From 2fc503f71f363af6b6754b9f2709c71c3e0506fe Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 20 Jan 2025 18:05:22 +0200 Subject: [PATCH 155/415] feature: cloudcmd: @putout/babel v3.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3e689170..1584c2cc 100644 --- a/package.json +++ b/package.json @@ -158,7 +158,7 @@ "@cloudcmd/modal": "^3.0.0", "@cloudcmd/olark": "^3.0.2", "@cloudcmd/stub": "^4.0.1", - "@putout/babel": "^2.0.0", + "@putout/babel": "^3.0.0", "@types/node-fetch": "^2.6.11", "auto-globals": "^4.0.0", "babel-loader": "^8.0.0", From d8da7922d90563fbba0e59f0bdd73391737deb4b Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 20 Jan 2025 18:18:52 +0200 Subject: [PATCH 156/415] chore: client: lint --- client/dom/current-file.spec.js | 10 ++--- client/dom/directory.js | 12 ++---- client/dom/images.js | 4 +- client/dom/load-remote.js | 70 ++++++++++++++++----------------- client/modules/edit.js | 5 +-- client/modules/konsole.js | 18 ++++----- client/modules/menu.js | 4 +- client/modules/terminal-run.js | 18 ++++----- client/modules/terminal.js | 18 ++++----- client/modules/view/get-type.js | 4 +- client/modules/view/index.js | 5 ++- client/modules/view/types.js | 4 +- 12 files changed, 71 insertions(+), 101 deletions(-) diff --git a/client/dom/current-file.spec.js b/client/dom/current-file.spec.js index 3d822206..de1ba2af 100644 --- a/client/dom/current-file.spec.js +++ b/client/dom/current-file.spec.js @@ -261,12 +261,10 @@ test('current-file: isCurrentIsDir: file', (t) => { t.end(); }); -function getCloudCmd({emit} = {}) { - return { - prefix: '', - emit: emit || stub(), - }; -} +const getCloudCmd = ({emit} = {}) => ({ + prefix: '', + emit: emit || stub(), +}); test('current-file: parseNameAttribute', (t) => { const result = currentFile._parseNameAttribute('js-file-aGVsbG8mbmJzcDt3b3JsZA=='); diff --git a/client/dom/directory.js b/client/dom/directory.js index 88802d40..c7cfa386 100644 --- a/client/dom/directory.js +++ b/client/dom/directory.js @@ -63,14 +63,8 @@ module.exports = (items) => { uploader.on('end', CloudCmd.refresh); }; -function percent(i, n, per = 100) { - return Math.round(i * per / n); -} +const percent = (i, n, per = 100) => Math.round(i * per / n); -function uploadFile(url, data) { - return DOM.load.put(url, data); -} +const uploadFile = (url, data) => DOM.load.put(url, data); -function uploadDir(url) { - return DOM.load.put(`${url}?dir`); -} +const uploadDir = (url) => DOM.load.put(`${url}?dir`); diff --git a/client/dom/images.js b/client/dom/images.js index 382da9e8..bb5579c1 100644 --- a/client/dom/images.js +++ b/client/dom/images.js @@ -10,9 +10,7 @@ const LOADING = 'loading'; const HIDDEN = 'hidden'; const ERROR = 'error'; -function getLoadingType() { - return isSVG() ? '-svg' : '-gif'; -} +const getLoadingType = () => isSVG() ? '-svg' : '-gif'; module.exports.get = getElement; /** diff --git a/client/dom/load-remote.js b/client/dom/load-remote.js index 0def5f00..72fb9db9 100644 --- a/client/dom/load-remote.js +++ b/client/dom/load-remote.js @@ -17,42 +17,40 @@ module.exports = (name, options, callback = options) => { if (o.name && window[o.name]) return callback(); - Files - .get('modules') - .then(async (modules) => { - const online = config('online') && navigator.onLine; - const module = findObjByNameInArr(modules.remote, name); - - const isArray = itype.array(module.local); - const {version} = module; - - let remoteTmpls; - let local; - - if (isArray) { - remoteTmpls = module.remote; - local = module.local; - } else { - remoteTmpls = [module.remote]; - local = [module.local]; - } - - const localURL = local.map((url) => prefix + url); - - const remoteURL = remoteTmpls.map((tmpl) => { - return rendy(tmpl, { - version, - }); + Files.get('modules').then(async (modules) => { + const online = config('online') && navigator.onLine; + const module = findObjByNameInArr(modules.remote, name); + + const isArray = itype.array(module.local); + const {version} = module; + + let remoteTmpls; + let local; + + if (isArray) { + remoteTmpls = module.remote; + local = module.local; + } else { + remoteTmpls = [module.remote]; + local = [module.local]; + } + + const localURL = local.map((url) => prefix + url); + + const remoteURL = remoteTmpls.map((tmpl) => { + return rendy(tmpl, { + version, }); - - if (online) { - const [e] = await tryToCatch(load.parallel, remoteURL); - - if (!e) - return callback(); - } - - const [e] = await tryToCatch(load.parallel, localURL); - callback(e); }); + + if (online) { + const [e] = await tryToCatch(load.parallel, remoteURL); + + if (!e) + return callback(); + } + + const [e] = await tryToCatch(load.parallel, localURL); + callback(e); + }); }; diff --git a/client/modules/edit.js b/client/modules/edit.js index a62535b7..441aaf62 100644 --- a/client/modules/edit.js +++ b/client/modules/edit.js @@ -11,6 +11,7 @@ const load = require('load.js'); const {MAX_FILE_SIZE: maxSize} = require('../../common/cloudfunc'); const {time, timeEnd} = require('../../common/util'); +const getEditor = () => editor; const isFn = (a) => typeof a === 'function'; const loadJS = load.js; @@ -91,10 +92,6 @@ module.exports.show = (options) => { module.exports.getEditor = getEditor; -function getEditor() { - return editor; -} - module.exports.getElement = () => Element; module.exports.hide = () => { diff --git a/client/modules/konsole.js b/client/modules/konsole.js index 41936486..6993380d 100644 --- a/client/modules/konsole.js +++ b/client/modules/konsole.js @@ -46,22 +46,18 @@ module.exports.clear = () => { konsole.clear(); }; -function getPrefix() { - return CloudCmd.prefix + '/console'; -} +const getPrefix = () => CloudCmd.prefix + '/console'; function getPrefixSocket() { return CloudCmd.prefixSocket + '/console'; } -function getEnv() { - return { - ACTIVE_DIR: DOM.getCurrentDirPath.bind(DOM), - PASSIVE_DIR: DOM.getNotCurrentDirPath.bind(DOM), - CURRENT_NAME: DOM.getCurrentName.bind(DOM), - CURRENT_PATH: () => Info.path, - }; -} +const getEnv = () => ({ + ACTIVE_DIR: DOM.getCurrentDirPath.bind(DOM), + PASSIVE_DIR: DOM.getNotCurrentDirPath.bind(DOM), + CURRENT_NAME: DOM.getCurrentName.bind(DOM), + CURRENT_PATH: () => Info.path, +}); async function onPath(path) { if (Info.dirPath === path) diff --git a/client/modules/menu.js b/client/modules/menu.js index 150bb186..8f739164 100644 --- a/client/modules/menu.js +++ b/client/modules/menu.js @@ -226,9 +226,7 @@ function beforeShow(callback, params) { return isShow; } -function beforeClick(name) { - return MenuShowedName !== name; -} +const beforeClick = (name) => MenuShowedName !== name; async function _uploadTo(nameModule) { const [error, data] = await Info.getData(); diff --git a/client/modules/terminal-run.js b/client/modules/terminal-run.js index 01bd30a9..3e4b857d 100644 --- a/client/modules/terminal-run.js +++ b/client/modules/terminal-run.js @@ -75,22 +75,18 @@ function hide() { CloudCmd.View.hide(); } -function getPrefix() { - return CloudCmd.prefix + '/gritty'; -} +const getPrefix = () => CloudCmd.prefix + '/gritty'; function getPrefixSocket() { return CloudCmd.prefixSocket + '/gritty'; } -function getEnv() { - return { - ACTIVE_DIR: DOM.getCurrentDirPath, - PASSIVE_DIR: DOM.getNotCurrentDirPath, - CURRENT_NAME: DOM.getCurrentName, - CURRENT_PATH: DOM.getCurrentPath, - }; -} +const getEnv = () => ({ + ACTIVE_DIR: DOM.getCurrentDirPath, + PASSIVE_DIR: DOM.getNotCurrentDirPath, + CURRENT_NAME: DOM.getCurrentName, + CURRENT_PATH: DOM.getCurrentPath, +}); function create(createOptions) { const { diff --git a/client/modules/terminal.js b/client/modules/terminal.js index f94024d4..d36b700a 100644 --- a/client/modules/terminal.js +++ b/client/modules/terminal.js @@ -57,22 +57,18 @@ function hide() { CloudCmd.View.hide(); } -function getPrefix() { - return CloudCmd.prefix + '/gritty'; -} +const getPrefix = () => CloudCmd.prefix + '/gritty'; function getPrefixSocket() { return CloudCmd.prefixSocket + '/gritty'; } -function getEnv() { - return { - ACTIVE_DIR: DOM.getCurrentDirPath, - PASSIVE_DIR: DOM.getNotCurrentDirPath, - CURRENT_NAME: DOM.getCurrentName, - CURRENT_PATH: DOM.getCurrentPath, - }; -} +const getEnv = () => ({ + ACTIVE_DIR: DOM.getCurrentDirPath, + PASSIVE_DIR: DOM.getNotCurrentDirPath, + CURRENT_NAME: DOM.getCurrentName, + CURRENT_PATH: DOM.getCurrentPath, +}); function create() { const options = { diff --git a/client/modules/view/get-type.js b/client/modules/view/get-type.js index 80252aa1..3ac092e0 100644 --- a/client/modules/view/get-type.js +++ b/client/modules/view/get-type.js @@ -45,9 +45,7 @@ function isMedia(name) { return isAudio(name) || isVideo(name); } -function isAudio(name) { - return /\.(mp3|ogg|m4a)$/i.test(name); -} +const isAudio = (name) => /\.(mp3|ogg|m4a)$/i.test(name); function isVideo(name) { return /\.(mp4|avi|webm)$/i.test(name); diff --git a/client/modules/view/index.js b/client/modules/view/index.js index 0e79ab4e..17a3b1fa 100644 --- a/client/modules/view/index.js +++ b/client/modules/view/index.js @@ -55,7 +55,10 @@ CloudCmd[Name] = module.exports; const Info = DOM.CurrentInfo; const {Key} = CloudCmd; -const basename = (a) => a.split('/').pop(); + +const basename = (a) => a + .split('/') + .pop(); let El; let TemplateAudio; diff --git a/client/modules/view/types.js b/client/modules/view/types.js index 0ea9aef9..e36fec4d 100644 --- a/client/modules/view/types.js +++ b/client/modules/view/types.js @@ -2,6 +2,7 @@ const {extname} = require('node:path'); const currify = require('currify'); +const isAudio = (name) => /\.(mp3|ogg|m4a)$/i.test(name); const testRegExp = currify((name, reg) => reg.test(name)); const getRegExp = (ext) => RegExp(`\\.${ext}$`, 'i'); @@ -53,9 +54,6 @@ function isMedia(name) { } module.exports.isAudio = isAudio; -function isAudio(name) { - return /\.(mp3|ogg|m4a)$/i.test(name); -} function isVideo(name) { return /\.(mp4|avi|webm)$/i.test(name); From 907afc6e4aa5187b93ea389b0df7342a7eac372b Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 20 Jan 2025 18:19:13 +0200 Subject: [PATCH 157/415] chore: test: lint --- test/before.mjs | 10 ++++------ test/rest/pack.mjs | 12 +++++------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/test/before.mjs b/test/before.mjs index 6e6e3f99..ccb2399f 100644 --- a/test/before.mjs +++ b/test/before.mjs @@ -64,9 +64,7 @@ export const connect = promisify((options, fn = options) => { }); }); -function defaultConfig() { - return { - auth: false, - root: __dirname, - }; -} +const defaultConfig = () => ({ + auth: false, + root: __dirname, +}); diff --git a/test/rest/pack.mjs b/test/rest/pack.mjs index afbe0a0f..8dd40245 100644 --- a/test/rest/pack.mjs +++ b/test/rest/pack.mjs @@ -224,10 +224,8 @@ test('cloudcmd: rest: pack: zip: put: error', async (t) => { t.end(); }); -function getPackOptions(to, names = ['pack']) { - return { - to, - names, - from: '/fixture', - }; -} +const getPackOptions = (to, names = ['pack']) => ({ + to, + names, + from: '/fixture', +}); From ddd1722f39a2338ab826199a24d8475ce67de7ca Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 20 Jan 2025 18:22:07 +0200 Subject: [PATCH 158/415] chore: lint --- bin/cloudcmd.mjs | 4 ++-- common/cloudfunc.js | 14 ++++++-------- css/supports.css | 2 +- server/config.js | 8 +++++--- server/rest/index.js | 9 +++------ server/terminal.js | 4 +--- static/user-menu.spec.js | 14 ++++++-------- 7 files changed, 24 insertions(+), 31 deletions(-) diff --git a/bin/cloudcmd.mjs b/bin/cloudcmd.mjs index 0a7ec042..e6b4c1a9 100755 --- a/bin/cloudcmd.mjs +++ b/bin/cloudcmd.mjs @@ -17,11 +17,11 @@ process.on('unhandledRejection', exit); const require = createRequire(import.meta.url); const Info = require('../package.json'); - +const isUndefined = (a) => typeof a === 'undefined'; const simport = createSimport(import.meta.url); const choose = (a, b) => { - if (a === undefined) + if (isUndefined(a)) return b; return a; diff --git a/common/cloudfunc.js b/common/cloudfunc.js index c9a24c42..c906b548 100644 --- a/common/cloudfunc.js +++ b/common/cloudfunc.js @@ -248,14 +248,12 @@ module.exports.buildFromJSON = (params) => { return fileTable; }; -function updateField(file) { - return { - ...file, - date: file.date || '--.--.----', - owner: file.owner || 'root', - size: getSize(file), - }; -} +const updateField = (file) => ({ + ...file, + date: file.date || '--.--.----', + owner: file.owner || 'root', + size: getSize(file), +}); function getAttribute(type) { if (type === 'directory') diff --git a/css/supports.css b/css/supports.css index bf470c2d..ea2084d2 100644 --- a/css/supports.css +++ b/css/supports.css @@ -1,6 +1,6 @@ @supports (overflow: overlay) { .files { - overflow-y: overlay; + overflow-y: auto; } .fm-header { diff --git a/server/config.js b/server/config.js index a79e7165..3b180f09 100644 --- a/server/config.js +++ b/server/config.js @@ -22,7 +22,7 @@ const criton = require('criton'); const exit = require(`${DIR_SERVER}exit`); const CloudFunc = require(`${DIR_COMMON}cloudfunc`); - +const isUndefined = (a) => typeof a === 'undefined'; const DIR = `${DIR_SERVER}../`; const HOME = homedir(); @@ -31,7 +31,9 @@ const formatMsg = currify((a, b) => CloudFunc.formatMsg(a, b)); const {apiURL} = CloudFunc; -const key = (a) => Object.keys(a).pop(); +const key = (a) => Object + .keys(a) + .pop(); const ConfigPath = path.join(DIR, 'json/config.json'); const ConfigHome = path.join(HOME, '.cloudcmd.json'); @@ -90,7 +92,7 @@ function createConfig({configPath} = {}) { if (key === '*') return config; - if (value === undefined) + if (isUndefined(value)) return config[key]; config[key] = value; diff --git a/server/rest/index.js b/server/rest/index.js index f4cae656..c133e2dc 100644 --- a/server/rest/index.js +++ b/server/rest/index.js @@ -21,7 +21,8 @@ const root = require(`../root`); const CloudFunc = require(`../../common/cloudfunc`); const markdown = require(`../markdown/index.js`); const info = require('./info'); - +const isUndefined = (a) => typeof a === 'undefined'; +const isRootAll = (root, names) => names.some(isRootWin32(root)); const isString = (a) => typeof a === 'string'; const isFn = (a) => typeof a === 'function'; const swap = wraptile((fn, a, b) => fn(b, a)); @@ -66,7 +67,7 @@ function rest({fs, config, moveFiles}, request, response) { if (options.name) params.name = options.name; - if (options.gzip !== undefined) + if (!isUndefined(options.gzip)) params.gzip = options.gzip; if (options.query) @@ -370,10 +371,6 @@ const isRootWin32 = currify((root, path) => { module.exports._isRootWin32 = isRootWin32; module.exports._isRootAll = isRootAll; -function isRootAll(root, names) { - return names.some(isRootWin32(root)); -} - module.exports._getWin32RootMsg = getWin32RootMsg; function getWin32RootMsg() { diff --git a/server/terminal.js b/server/terminal.js index d10cdc8b..67613f0a 100644 --- a/server/terminal.js +++ b/server/terminal.js @@ -8,9 +8,7 @@ const noop = (req, res, next) => { noop.listen = noop; -function _getModule(a) { - return require(a); -} +const _getModule = (a) => require(a); module.exports = (config, arg, overrides = {}) => { const { diff --git a/static/user-menu.spec.js b/static/user-menu.spec.js index b10b5b15..9c42302a 100644 --- a/static/user-menu.spec.js +++ b/static/user-menu.spec.js @@ -337,11 +337,9 @@ function getDOM() { }; } -function getCloudCmd() { - return { - refresh: stub(), - EditFile: { - show: stub(), - }, - }; -} +const getCloudCmd = () => ({ + refresh: stub(), + EditFile: { + show: stub(), + }, +}); From 301252906f44758626b93ab25e2b2fc5c0b2ddd4 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 20 Jan 2025 18:48:58 +0200 Subject: [PATCH 159/415] chore: cloudcmd: v18.5.0 --- ChangeLog | 8 ++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2ca00c56..2c0ccdd7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2025.01.20, v18.5.0 + +fix: +- ad8e55d8 client: themes -> columns (#434) + +feature: +- 2fc503f7 cloudcmd: @putout/babel v3.0.0 + 2024.12.13, v18.4.1 feature: diff --git a/HELP.md b/HELP.md index 98282eb0..21aa8379 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.4.1 +# Cloud Commander v18.5.0 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1098,6 +1098,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2025.01.20*, **[v18.5.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.5.0)** - *2024.12.13*, **[v18.4.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.4.1)** - *2024.11.22*, **[v18.4.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.4.0)** - *2024.11.14*, **[v18.3.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.3.0)** diff --git a/README.md b/README.md index 8c0e0e97..0df3b1a3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.4.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v18.5.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 1584c2cc..e02fb1df 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "18.4.1", + "version": "18.5.0", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 161d4f952beb7630c123df382233cd300b0b34b6 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Tue, 21 Jan 2025 00:45:53 +0200 Subject: [PATCH 160/415] chore: lint --- .eslintrc.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.js b/.eslintrc.js index ab62820d..13d9e227 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -34,4 +34,5 @@ module.exports = { browser: true, }, }], + ignorePatterns: ['*.md{js}'], }; From b0be1194744c6bc8048ab438f5a4164e46547b76 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Tue, 21 Jan 2025 00:52:48 +0200 Subject: [PATCH 161/415] chore: actions: yarn -> bun --- .github/workflows/docker.yml | 4 ++-- .github/workflows/nodejs.yml | 4 ++-- .putout.json | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 6e22e4f0..e4877cb7 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -20,9 +20,9 @@ jobs: with: node-version: 22.x - name: Install Redrun - run: bun i yarn redrun -g --no-save + run: bun i redrun -g --no-save - name: NPM Install - run: yarn --no-lockfile + run: bun i --no-save - name: Lint run: redrun lint - name: Build diff --git a/.github/workflows/nodejs.yml b/.github/workflows/nodejs.yml index 8bdc6cc0..88fed4f0 100644 --- a/.github/workflows/nodejs.yml +++ b/.github/workflows/nodejs.yml @@ -21,9 +21,9 @@ jobs: with: node-version: ${{ matrix.node-version }} - name: Install Redrun - run: bun i yarn redrun -g --no-save + run: bun i redrun -g --no-save - name: Install - run: yarn --no-lockfile + run: bun i --no-save - name: Lint run: redrun fix:lint - uses: actions/cache@v4 diff --git a/.putout.json b/.putout.json index 99e64ec8..08b4f06e 100644 --- a/.putout.json +++ b/.putout.json @@ -7,7 +7,6 @@ "fontello.json" ], "rules": { - "github/convert-npm-to-bun": "off", "github/set-node-versions": "off" }, "match": { From 3ad6720f5f2148c6cc3372e2889ec323484e8621 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 24 Jan 2025 00:48:44 +0200 Subject: [PATCH 162/415] chore: lint --- server/distribute/import.mjs | 28 +++++++++------------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/server/distribute/import.mjs b/server/distribute/import.mjs index f776abc0..0a48d065 100644 --- a/server/distribute/import.mjs +++ b/server/distribute/import.mjs @@ -105,25 +105,15 @@ export const distributeImport = (config, options, fn) => { const onConnect = emitAuth(importUrl, config, socket); const onAccept = logWrapped(isLog, importStr, `${connectedStr} to ${colorUrl}`); - const onDisconnect = squad( - done( - fn, - statusStore, - ), - logWrapped( - isLog, - importStr, - `${disconnectedStr} from ${colorUrl}`, - ), - rmListeners( - socket, - { - onError, - onConnect, - onConfig, - }, - ), - ); + const onDisconnect = squad(...[ + done(fn, statusStore), + logWrapped(isLog, importStr, `${disconnectedStr} from ${colorUrl}`), + rmListeners(socket, { + onError, + onConnect, + onConfig, + }), + ]); const onChange = squad(logWrapped(isLog, importStr), config); From 8e98b778bd2e145cc63960f07664c99aee37b6f1 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 3 Feb 2025 14:49:43 +0200 Subject: [PATCH 163/415] feature: cloudcmd: eslint-plugin-putout v24.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e02fb1df..52246ebe 100644 --- a/package.json +++ b/package.json @@ -173,7 +173,7 @@ "emitify": "^4.0.1", "eslint": "^8.0.1", "eslint-plugin-n": "^17.0.0-4", - "eslint-plugin-putout": "^23.1.0", + "eslint-plugin-putout": "^24.0.0", "extract-text-webpack-plugin": "^4.0.0-alpha.0", "gritty": "^8.0.0", "gunzip-maybe": "^1.3.1", From 353a1fb6c114ae6b571603a16cc6f5965cfdad96 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 3 Feb 2025 14:49:47 +0200 Subject: [PATCH 164/415] feature: cloudcmd: putout v38.0.5 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 52246ebe..d4a5ccbc 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "package-json": "^10.0.0", "ponse": "^7.0.0", "pullout": "^5.0.0", - "putout": "^37.0.1", + "putout": "^38.0.5", "redzip": "^3.0.0", "rendy": "^4.1.3", "restafary": "^12.0.0", From 467f0a79c379a8f2fc14ed2a29e0fd629052f3b3 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 3 Feb 2025 14:50:27 +0200 Subject: [PATCH 165/415] feature: cloudcmd: webpack-merge v6.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d4a5ccbc..7fa52346 100644 --- a/package.json +++ b/package.json @@ -211,7 +211,7 @@ "url-loader": "^4.0.0", "webpack": "^4.0.0", "webpack-cli": "^3.0.1", - "webpack-merge": "^5.0.8", + "webpack-merge": "^6.0.1", "webpackbar": "^5.0.0-3" }, "engines": { From 2dea0a3b2de8d46a7ef05a1aa3ca90a634eb49bb Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 3 Feb 2025 14:51:27 +0200 Subject: [PATCH 166/415] chore: cloudcmd: v18.5.1 --- ChangeLog | 7 +++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2c0ccdd7..414c5329 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2025.02.03, v18.5.1 + +feature: +- 467f0a79 cloudcmd: webpack-merge v6.0.1 +- 353a1fb6 cloudcmd: putout v38.0.5 +- 8e98b778 cloudcmd: eslint-plugin-putout v24.0.0 + 2025.01.20, v18.5.0 fix: diff --git a/HELP.md b/HELP.md index 21aa8379..f002d2d9 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.5.0 +# Cloud Commander v18.5.1 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1098,6 +1098,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2025.02.03*, **[v18.5.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.5.1)** - *2025.01.20*, **[v18.5.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.5.0)** - *2024.12.13*, **[v18.4.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.4.1)** - *2024.11.22*, **[v18.4.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.4.0)** diff --git a/README.md b/README.md index 0df3b1a3..a1a4a2f4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.5.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v18.5.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 7fa52346..509170a8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "18.5.0", + "version": "18.5.1", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 4eaeccba1cb1ac2bd2aa425dd2dd9fdbad6d2b34 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 15:53:17 +0200 Subject: [PATCH 167/415] chore: github: issue template --- .github/ISSUE_TEMPLATE.md | 13 ------------- .github/ISSUE_TEMPLATE/config.yml | 4 ++++ 2 files changed, 4 insertions(+), 13 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md deleted file mode 100644 index 45635a3c..00000000 --- a/.github/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,13 +0,0 @@ - - -- **Version** (`cloudcmd -v`): -- **Node Version** `node -v`: -- **OS** (`uname -a` on Linux): -- **Browser name/version**: -- **Used Command Line Parameters**: -- **Changed Config**: -- [ ] **I'm ready to donate on [Patreon](https://patreon.com/coderaiser) 🎁** -- [ ] **I'm willing to work on this issue 💪** diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..aedb0578 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,4 @@ +contact_links: + - name: Stack Overflow + url: https://stackoverflow.com/search?q=cloudcmd + about: Please ask and answer questions here. From c68a3a7f077da4c15931fecec7a031b6f0baa526 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 15:54:10 +0200 Subject: [PATCH 168/415] chore: github: issue_template.md --- .github/ISSUE_TEMPLATE/issue_template.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/issue_template.md diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md new file mode 100644 index 00000000..c7ebcbed --- /dev/null +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -0,0 +1,8 @@ +- **Version** (`cloudcmd -v`): +- **Node Version** `node -v`: +- **OS** (`uname -a` on Linux): +- **Browser name/version**: +- **Used Command Line Parameters**: +- **Changed Config**: +- [ ] **I'm ready to donate on [Patreon](https://patreon.com/coderaiser) 🎁** +- [ ] **I'm willing to work on this issue 💪** From 3adfec81c2a6eb5d8553b4bddb5c8a4c7b8f5b0c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 15:54:49 +0200 Subject: [PATCH 169/415] chore: github: config: forbid blank issues --- .github/ISSUE_TEMPLATE/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index aedb0578..5f41e73a 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,3 +1,4 @@ +blank_issues_enabled: false contact_links: - name: Stack Overflow url: https://stackoverflow.com/search?q=cloudcmd From 7492b4bfc702a2afbd13bfef9b3e90d48dfda90e Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 15:56:47 +0200 Subject: [PATCH 170/415] chore: issue_template: configure --- .github/ISSUE_TEMPLATE/issue_template.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index c7ebcbed..3ce5705b 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -1,3 +1,11 @@ +--- +name: Tracking issue +about: Use this template for tracking new features. +title: "[DATE]: [FEATURE NAME]" +labels: needs triage +assignees: coderaiser +--- + - **Version** (`cloudcmd -v`): - **Node Version** `node -v`: - **OS** (`uname -a` on Linux): From 7ae60605bb36f21ccf6cb2df2f1b0d3735549e9c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 13:57:41 +0000 Subject: [PATCH 171/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/issue_template.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index 3ce5705b..f5402193 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -1,10 +1,11 @@ ---- +*** + name: Tracking issue about: Use this template for tracking new features. title: "[DATE]: [FEATURE NAME]" labels: needs triage assignees: coderaiser ---- +--------------------- - **Version** (`cloudcmd -v`): - **Node Version** `node -v`: From a38b3a79ceac3d55cf3f534515c0bbf3018d1584 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 15:58:38 +0200 Subject: [PATCH 172/415] chrome: issue_template.md --- .github/ISSUE_TEMPLATE/issue_template.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index f5402193..f51666e9 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -1,11 +1,10 @@ -*** - +--- name: Tracking issue -about: Use this template for tracking new features. -title: "[DATE]: [FEATURE NAME]" +about: Create an issue with bug report or feature request. +title: "" labels: needs triage assignees: coderaiser ---------------------- +--- - **Version** (`cloudcmd -v`): - **Node Version** `node -v`: From 56d621b1ffd85a6835b6dc74d8719f1b3a12db24 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 13:59:35 +0000 Subject: [PATCH 173/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/issue_template.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index f51666e9..32af23ac 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -1,10 +1,11 @@ ---- +*** + name: Tracking issue about: Create an issue with bug report or feature request. title: "" labels: needs triage assignees: coderaiser ---- +--------------------- - **Version** (`cloudcmd -v`): - **Node Version** `node -v`: From e71550d557509b091a3612693c45ce6880176ad5 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 16:04:53 +0200 Subject: [PATCH 174/415] chrome: issue_template: improve --- .github/ISSUE_TEMPLATE/issue_template.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index 32af23ac..a97748e2 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -13,5 +13,9 @@ assignees: coderaiser - **Browser name/version**: - **Used Command Line Parameters**: - **Changed Config**: -- [ ] **I'm ready to donate on [Patreon](https://patreon.com/coderaiser) 🎁** -- [ ] **I'm willing to work on this issue 💪** +```json +{} +``` +- [ ] 🎁 **I'm ready to donate on https://opencollective.com/cloudcmd** +- [ ] 🎁 **I'm ready to donate on https://ko-fi.com/coderaiser** +- [ ] 💪 **I'm willing to work on this issue** From a598ef3ed05bd1b11893fb75c8ee2146340651d8 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 14:05:53 +0000 Subject: [PATCH 175/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/issue_template.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index a97748e2..e0d6bfde 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -13,9 +13,11 @@ assignees: coderaiser - **Browser name/version**: - **Used Command Line Parameters**: - **Changed Config**: + ```json {} ``` + - [ ] 🎁 **I'm ready to donate on https://opencollective.com/cloudcmd** - [ ] 🎁 **I'm ready to donate on https://ko-fi.com/coderaiser** - [ ] 💪 **I'm willing to work on this issue** From 3d52ce80f28e94d50b189c7f67bce06927692c79 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 16:06:08 +0200 Subject: [PATCH 176/415] Update FUNDING.yml --- .github/FUNDING.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index 93b856e8..9fdb6d3c 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1,4 +1,3 @@ github: coderaiser -patreon: coderaiser open_collective: cloudcmd ko_fi: coderaiser From e2591061af10838b69e2ec99bc85754007f94de3 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 17:38:33 +0200 Subject: [PATCH 177/415] chore: issue_template: updated --- .github/ISSUE_TEMPLATE/issue_template.md | 56 ++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index e0d6bfde..e267a2ae 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -5,6 +5,62 @@ about: Create an issue with bug report or feature request. title: "" labels: needs triage assignees: coderaiser +body: + - type: markdown + attributes: + value: | + Thanks for taking the time to fill out this report! + - type: input + id: version + attributes: + label: **Version** (`cloudcmd -v`): + description: Version of used Cloud Commander + placeholder: version + validations: + required: true + - type: input + id: node-version + attributes: + label: **Node Version** (`node -v`): + description: Version of used Node.js + placeholder: version + validations: + required: false + - type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us, what did you expect to happen? + placeholder: Tell us what you see! + value: "A bug happened!" + validations: + required: true + - + validations: + required: true + - type: dropdown + id: browsers + attributes: + label: What browsers are you seeing the problem on? + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge + - type: textarea + id: changed-config + attributes: + label: Changed Config + description: Please copy and paste any relevant changed `~/.cloudcmd.json`. This will be automatically formatted into code, so no need for backticks. + render: json + - type: checkboxes + id: work-on-issue + attributes: + label: Work on this issue + options: + - label: 💪 **I'm willing to work on this issue** + required: false --------------------- - **Version** (`cloudcmd -v`): From 53acae1a631c4ddbc90547d3a2fdbaf6ea72375f Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 15:39:36 +0000 Subject: [PATCH 178/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/issue_template.md | 105 ++++++++++++----------- 1 file changed, 53 insertions(+), 52 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index e267a2ae..5a35c27c 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -6,62 +6,63 @@ title: "" labels: needs triage assignees: coderaiser body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this report! + +- type: markdown + attributes: + value: | + Thanks for taking the time to fill out this report! +- type: input + id: version + attributes: + label: **Version** (`cloudcmd -v`): + description: Version of used Cloud Commander + placeholder: version + validations: + required: true - type: input - id: version - attributes: - label: **Version** (`cloudcmd -v`): - description: Version of used Cloud Commander - placeholder: version - validations: - required: true - - type: input id: node-version attributes: - label: **Node Version** (`node -v`): - description: Version of used Node.js - placeholder: version + label: **Node Version** (`node -v`): + description: Version of used Node.js + placeholder: version validations: - required: false - - type: textarea - id: what-happened - attributes: - label: What happened? - description: Also tell us, what did you expect to happen? - placeholder: Tell us what you see! - value: "A bug happened!" - validations: - required: true - - - validations: - required: true - - type: dropdown - id: browsers - attributes: - label: What browsers are you seeing the problem on? - multiple: true - options: - - Firefox - - Chrome - - Safari - - Microsoft Edge - - type: textarea - id: changed-config - attributes: - label: Changed Config - description: Please copy and paste any relevant changed `~/.cloudcmd.json`. This will be automatically formatted into code, so no need for backticks. - render: json - - type: checkboxes - id: work-on-issue - attributes: - label: Work on this issue - options: - - label: 💪 **I'm willing to work on this issue** - required: false ---------------------- + required: false +- type: textarea + id: what-happened + attributes: + label: What happened? + description: Also tell us, what did you expect to happen? + placeholder: Tell us what you see! + value: "A bug happened!" + validations: + required: true +- validations: + required: true +- type: dropdown + id: browsers + attributes: + label: What browsers are you seeing the problem on? + multiple: true + options: + - Firefox + - Chrome + - Safari + - Microsoft Edge +- type: textarea + id: changed-config + attributes: + label: Changed Config + description: Please copy and paste any relevant changed `~/.cloudcmd.json`. This will be automatically formatted into code, so no need for backticks. + render: json +- type: checkboxes + id: work-on-issue + attributes: + label: Work on this issue + options: + - label: 💪 **I'm willing to work on this issue** + required: false + +*** - **Version** (`cloudcmd -v`): - **Node Version** `node -v`: From 38666cbb8b51982489c65db5da56b84450a731c7 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 17:40:55 +0200 Subject: [PATCH 179/415] Update issue_template.md --- .github/ISSUE_TEMPLATE/issue_template.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index 5a35c27c..2acfd7de 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -1,5 +1,3 @@ -*** - name: Tracking issue about: Create an issue with bug report or feature request. title: "" From 2e02ba46e807608e8727c0b277ed585354b076a2 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 15:41:51 +0000 Subject: [PATCH 180/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/issue_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index 2acfd7de..6ead6d89 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -58,7 +58,7 @@ body: label: Work on this issue options: - label: 💪 **I'm willing to work on this issue** - required: false + required: false *** From b2f113bf0a7ab68f9c1224942f90fbe02b1ccb17 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 17:43:12 +0200 Subject: [PATCH 181/415] Update issue_template.md --- .github/ISSUE_TEMPLATE/issue_template.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index 6ead6d89..47959bec 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -1,3 +1,5 @@ +--------------------- + name: Tracking issue about: Create an issue with bug report or feature request. title: "" @@ -59,9 +61,7 @@ body: options: - label: 💪 **I'm willing to work on this issue** required: false - -*** - +--------------------- - **Version** (`cloudcmd -v`): - **Node Version** `node -v`: - **OS** (`uname -a` on Linux): From 51a4cee6889bd1356558f86750003c0ac94d3e6a Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 17:43:54 +0200 Subject: [PATCH 182/415] Update issue_template.md --- .github/ISSUE_TEMPLATE/issue_template.md | 58 ------------------------ 1 file changed, 58 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index 47959bec..10b88bd9 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -1,66 +1,8 @@ ---------------------- - name: Tracking issue about: Create an issue with bug report or feature request. title: "" labels: needs triage assignees: coderaiser -body: - -- type: markdown - attributes: - value: | - Thanks for taking the time to fill out this report! -- type: input - id: version - attributes: - label: **Version** (`cloudcmd -v`): - description: Version of used Cloud Commander - placeholder: version - validations: - required: true - - type: input - id: node-version - attributes: - label: **Node Version** (`node -v`): - description: Version of used Node.js - placeholder: version - validations: - required: false -- type: textarea - id: what-happened - attributes: - label: What happened? - description: Also tell us, what did you expect to happen? - placeholder: Tell us what you see! - value: "A bug happened!" - validations: - required: true -- validations: - required: true -- type: dropdown - id: browsers - attributes: - label: What browsers are you seeing the problem on? - multiple: true - options: - - Firefox - - Chrome - - Safari - - Microsoft Edge -- type: textarea - id: changed-config - attributes: - label: Changed Config - description: Please copy and paste any relevant changed `~/.cloudcmd.json`. This will be automatically formatted into code, so no need for backticks. - render: json -- type: checkboxes - id: work-on-issue - attributes: - label: Work on this issue - options: - - label: 💪 **I'm willing to work on this issue** - required: false --------------------- - **Version** (`cloudcmd -v`): - **Node Version** `node -v`: From 716765104c1d6062cf09a1bd502c395b9a4ad992 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 17:44:25 +0200 Subject: [PATCH 183/415] Update config.yml --- .github/ISSUE_TEMPLATE/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 5f41e73a..aedb0578 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,4 +1,3 @@ -blank_issues_enabled: false contact_links: - name: Stack Overflow url: https://stackoverflow.com/search?q=cloudcmd From dbd8c6ab7c8f0fa163cc29e33095a06158b9d044 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 17:45:01 +0200 Subject: [PATCH 184/415] Update issue_template.md --- .github/ISSUE_TEMPLATE/issue_template.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index 10b88bd9..e7a2f6b6 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -3,7 +3,9 @@ about: Create an issue with bug report or feature request. title: "" labels: needs triage assignees: coderaiser + --------------------- + - **Version** (`cloudcmd -v`): - **Node Version** `node -v`: - **OS** (`uname -a` on Linux): From 34fb175d63c7e9092f31c4ac30bca0c1e0c3e02e Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 15:45:56 +0000 Subject: [PATCH 185/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/issue_template.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index e7a2f6b6..02a1cf86 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -4,7 +4,7 @@ title: "" labels: needs triage assignees: coderaiser ---------------------- +*** - **Version** (`cloudcmd -v`): - **Node Version** `node -v`: From 84719365b14d7436caccd0b1144c02c827edd9b0 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 18:12:28 +0200 Subject: [PATCH 186/415] Update issue templates --- .github/ISSUE_TEMPLATE/bug_report.md | 33 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature_request.md | 20 ++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..7cf2e8cb --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,33 @@ +--- +name: Bug report +about: Create a report to help us improve +title: '' +labels: needs clarification +assignees: coderaiser + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior: +1. Go to '...' +2. Click on '....' +3. Scroll down to '....' +4. See error + +**Expected behavior** +A clear and concise description of what you expected to happen. + +**Screenshots** +If applicable, add screenshots to help explain your problem. + +**Desktop (please complete the following information):** + - OS: [e.g. iOS] + - Browser [e.g. chrome, safari] + - Version [e.g. 22] +- Node.js version + +**Additional context** +Add any other context about the problem here. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..bbcbbe7d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,20 @@ +--- +name: Feature request +about: Suggest an idea for this project +title: '' +labels: '' +assignees: '' + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] + +**Describe the solution you'd like** +A clear and concise description of what you want to happen. + +**Describe alternatives you've considered** +A clear and concise description of any alternative solutions or features you've considered. + +**Additional context** +Add any other context or screenshots about the feature request here. From ac9a27b333eff98ec20e9b5a03ea3da029f48fbe Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 16:13:38 +0000 Subject: [PATCH 187/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/bug_report.md | 13 ++++++++----- .github/ISSUE_TEMPLATE/feature_request.md | 5 +++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 7cf2e8cb..04b3eb52 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,17 +1,19 @@ ---- +*** + name: Bug report about: Create a report to help us improve title: '' labels: needs clarification assignees: coderaiser ---- +*** **Describe the bug** A clear and concise description of what the bug is. **To Reproduce** Steps to reproduce the behavior: + 1. Go to '...' 2. Click on '....' 3. Scroll down to '....' @@ -24,9 +26,10 @@ A clear and concise description of what you expected to happen. If applicable, add screenshots to help explain your problem. **Desktop (please complete the following information):** - - OS: [e.g. iOS] - - Browser [e.g. chrome, safari] - - Version [e.g. 22] + +- OS: [e.g. iOS] +- Browser [e.g. chrome, safari] +- Version [e.g. 22] - Node.js version **Additional context** diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index bbcbbe7d..32531b98 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,11 +1,12 @@ ---- +*** + name: Feature request about: Suggest an idea for this project title: '' labels: '' assignees: '' ---- +*** **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] From 8ff0ee6a1a444d565ad1c60ce27ba5888300c41d Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 18:14:03 +0200 Subject: [PATCH 188/415] Update issue_template.md --- .github/ISSUE_TEMPLATE/issue_template.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index 02a1cf86..e2072f57 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -1,10 +1,11 @@ +--- name: Tracking issue about: Create an issue with bug report or feature request. title: "" labels: needs triage assignees: coderaiser -*** +--- - **Version** (`cloudcmd -v`): - **Node Version** `node -v`: From 99118e65a69c49b6296b1d7bc09c124305edd86c Mon Sep 17 00:00:00 2001 From: coderiaser Date: Tue, 4 Feb 2025 19:02:58 +0200 Subject: [PATCH 189/415] chore: lint --- .github/ISSUE_TEMPLATE/bug_report.md | 4 ++-- .github/ISSUE_TEMPLATE/feature_request.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 04b3eb52..dc08cbad 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,4 +1,4 @@ -*** +--- name: Bug report about: Create a report to help us improve @@ -6,7 +6,7 @@ title: '' labels: needs clarification assignees: coderaiser -*** +--- **Describe the bug** A clear and concise description of what the bug is. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index 32531b98..549a8874 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -1,4 +1,4 @@ -*** +--- name: Feature request about: Suggest an idea for this project @@ -6,7 +6,7 @@ title: '' labels: '' assignees: '' -*** +--- **Is your feature request related to a problem? Please describe.** A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] From 2d21001e5518aafa72b80fe1741fbbc2c04a7180 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 19:03:58 +0200 Subject: [PATCH 190/415] Update config.yml --- .github/ISSUE_TEMPLATE/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index aedb0578..5f41e73a 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,3 +1,4 @@ +blank_issues_enabled: false contact_links: - name: Stack Overflow url: https://stackoverflow.com/search?q=cloudcmd From f1193955fb9045ca57cfb9e1158da0047c654693 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Tue, 4 Feb 2025 17:04:57 +0000 Subject: [PATCH 191/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/ISSUE_TEMPLATE/issue_template.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/issue_template.md b/.github/ISSUE_TEMPLATE/issue_template.md index e2072f57..17bf5831 100644 --- a/.github/ISSUE_TEMPLATE/issue_template.md +++ b/.github/ISSUE_TEMPLATE/issue_template.md @@ -1,11 +1,12 @@ ---- +*** + name: Tracking issue about: Create an issue with bug report or feature request. title: "" labels: needs triage assignees: coderaiser ---- +*** - **Version** (`cloudcmd -v`): - **Node Version** `node -v`: From b0a7fc1648f94867175d4649b01f29e8677b90d6 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 28 Mar 2025 16:24:00 +0200 Subject: [PATCH 192/415] feature: cloudcmd: putout v39.3.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 509170a8..e4ae67c5 100644 --- a/package.json +++ b/package.json @@ -130,7 +130,7 @@ "package-json": "^10.0.0", "ponse": "^7.0.0", "pullout": "^5.0.0", - "putout": "^38.0.5", + "putout": "^39.3.0", "redzip": "^3.0.0", "rendy": "^4.1.3", "restafary": "^12.0.0", From f774d5b290087e1c24bf18badcfb544251028969 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 28 Mar 2025 16:24:36 +0200 Subject: [PATCH 193/415] feature: cloudcmd: eslint-plugin-putout v26.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e4ae67c5..58356917 100644 --- a/package.json +++ b/package.json @@ -173,7 +173,7 @@ "emitify": "^4.0.1", "eslint": "^8.0.1", "eslint-plugin-n": "^17.0.0-4", - "eslint-plugin-putout": "^24.0.0", + "eslint-plugin-putout": "^26.1.0", "extract-text-webpack-plugin": "^4.0.0-alpha.0", "gritty": "^8.0.0", "gunzip-maybe": "^1.3.1", From 43fd5ed6600e23bccd35473ca74416ed0a2025e2 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 28 Mar 2025 16:24:39 +0200 Subject: [PATCH 194/415] feature: cloudcmd: madrun v11.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 58356917..495cd5dd 100644 --- a/package.json +++ b/package.json @@ -184,7 +184,7 @@ "just-pascal-case": "^3.2.0", "limier": "^3.0.0", "load.js": "^3.0.0", - "madrun": "^10.0.0", + "madrun": "^11.0.0", "memfs": "^4.2.0", "minor": "^1.2.2", "mock-require": "^3.0.1", From 368c9bb814b8ead2c529a3aaceb00b29e1ee799a Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 28 Mar 2025 16:25:13 +0200 Subject: [PATCH 195/415] feature: cloudcmd: eslint v9.23.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 495cd5dd..ba36b747 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "css-modules-require-hook": "^4.2.3", "domtokenlist-shim": "^1.2.0", "emitify": "^4.0.1", - "eslint": "^8.0.1", + "eslint": "^9.23.0", "eslint-plugin-n": "^17.0.0-4", "eslint-plugin-putout": "^26.1.0", "extract-text-webpack-plugin": "^4.0.0-alpha.0", From e7cc9b92ae0fa45c65e0b80c0312726155060aa3 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 28 Mar 2025 16:25:16 +0200 Subject: [PATCH 196/415] feature: cloudcmd: redlint v4.1.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ba36b747..d50e7e8f 100644 --- a/package.json +++ b/package.json @@ -196,7 +196,7 @@ "philip": "^3.0.0", "place": "^1.1.4", "readjson": "^2.0.1", - "redlint": "^3.13.1", + "redlint": "^4.1.1", "request": "^2.76.0", "rimraf": "^6.0.1", "scroll-into-view-if-needed": "^3.0.4", From 08ab63d704fe829404c6275d73f41c95e09e979c Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 28 Mar 2025 16:25:19 +0200 Subject: [PATCH 197/415] feature: cloudcmd: supertape v11.0.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d50e7e8f..9d5ff285 100644 --- a/package.json +++ b/package.json @@ -205,7 +205,7 @@ "smalltalk": "^4.0.0", "style-loader": "^2.0.0", "supermenu": "^4.0.1", - "supertape": "^10.0.0", + "supertape": "^11.0.4", "tar-stream": "^3.0.0", "unionfs": "^4.0.0", "url-loader": "^4.0.0", From e87418adde461fb8c07ae04560662242a226a9d4 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 28 Mar 2025 16:25:36 +0200 Subject: [PATCH 198/415] chore: lint --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 9d5ff285..e82b2f00 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,6 @@ "@cloudcmd/move-files": "^8.0.0", "@cloudcmd/read-files-sync": "^2.0.0", "@putout/cli-validate-args": "^2.0.0", - "@putout/plugin-cloudcmd": "^3.1.1", "apart": "^2.0.0", "chalk": "^5.3.0", "compression": "^1.7.4", From 51f51b54de7df656eac5f58c3261d16b3884b3be Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 28 Mar 2025 16:36:51 +0200 Subject: [PATCH 199/415] feature: cloudcmd: @putout/plugin-cloudcmd v4.0.0 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index e82b2f00..b5dc2368 100644 --- a/package.json +++ b/package.json @@ -158,6 +158,7 @@ "@cloudcmd/olark": "^3.0.2", "@cloudcmd/stub": "^4.0.1", "@putout/babel": "^3.0.0", + "@putout/plugin-cloudcmd": "^4.0.0", "@types/node-fetch": "^2.6.11", "auto-globals": "^4.0.0", "babel-loader": "^8.0.0", From f7379c0562adcbb835f2b8bcd87c8032321766e9 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Sat, 29 Mar 2025 00:20:04 +0200 Subject: [PATCH 200/415] chore: lint --- client/client.js | 3 ++- client/dom/load-remote.js | 2 +- client/dom/load.js | 2 +- client/listeners/index.js | 2 +- client/modules/menu.js | 1 + client/modules/operation/index.js | 11 +++++++---- client/modules/user-menu/navigate.js | 7 +------ client/modules/user-menu/navigate.spec.js | 7 +------ 8 files changed, 15 insertions(+), 20 deletions(-) diff --git a/client/client.js b/client/client.js index f17e0b23..4d53c634 100644 --- a/client/client.js +++ b/client/client.js @@ -94,6 +94,7 @@ function CloudCmdProto(DOM) { imgPosition = 'top'; Images.show.load(imgPosition, panel); + /* загружаем содержимое каталога */ await ajaxLoad(addSlashToEnd(path), { refresh, @@ -237,7 +238,7 @@ function CloudCmdProto(DOM) { const dirPath = DOM.getCurrentDirPath(); - Listeners = CloudCmd.Listeners; + ({Listeners} = CloudCmd); Listeners.init(); const panels = getPanels(); diff --git a/client/dom/load-remote.js b/client/dom/load-remote.js index 72fb9db9..84c7e329 100644 --- a/client/dom/load-remote.js +++ b/client/dom/load-remote.js @@ -29,7 +29,7 @@ module.exports = (name, options, callback = options) => { if (isArray) { remoteTmpls = module.remote; - local = module.local; + ({local} = module); } else { remoteTmpls = [module.remote]; local = [module.local]; diff --git a/client/dom/load.js b/client/dom/load.js index 9148c1b8..03c25d73 100644 --- a/client/dom/load.js +++ b/client/dom/load.js @@ -63,7 +63,7 @@ module.exports.ajax = (params) => { if (!isArrayBuf && isObject || isArray) data = jonny.stringify(p.data); else - data = p.data; + ({data} = p); xhr.onreadystatechange = (event) => { const xhr = event.target; diff --git a/client/listeners/index.js b/client/listeners/index.js index 78342411..3bd0ce9c 100644 --- a/client/listeners/index.js +++ b/client/listeners/index.js @@ -216,7 +216,7 @@ async function onPathElementClick(panel, event) { function copyPath(el) { clipboard .writeText(el - .parentElement.title) + .parentElement.title) .then(CloudCmd.log) .catch(CloudCmd.log); } diff --git a/client/modules/menu.js b/client/modules/menu.js index 8f739164..6ab88453 100644 --- a/client/modules/menu.js +++ b/client/modules/menu.js @@ -276,6 +276,7 @@ function download(type) { const path = DOM.getCurrentPath(file); CloudCmd.log(`downloading file ${path}...`); + /* * if we send ajax request - * no need in hash so we escape # diff --git a/client/modules/operation/index.js b/client/modules/operation/index.js index 68d17a33..bf19bda8 100644 --- a/client/modules/operation/index.js +++ b/client/modules/operation/index.js @@ -343,10 +343,13 @@ async function _processFiles(options, data) { let names = []; if (data) { - from = data.from; - to = data.to; - names = data.names; - panel = Info.panel; + ({ + from, + to, + names, + } = data); + + ({panel} = Info); } else { from = Info.dirPath; to = DOM.getNotCurrentDirPath(); diff --git a/client/modules/user-menu/navigate.js b/client/modules/user-menu/navigate.js index 445d47d1..d3c89830 100644 --- a/client/modules/user-menu/navigate.js +++ b/client/modules/user-menu/navigate.js @@ -2,12 +2,7 @@ const fullstore = require('fullstore'); -const { - J, - K, - UP, - DOWN, -} = require('../../key/key.js'); +const {J, K, UP, DOWN} = require('../../key/key.js'); const store = fullstore(1); const isDigit = (a) => /^\d+$/.test(a); diff --git a/client/modules/user-menu/navigate.spec.js b/client/modules/user-menu/navigate.spec.js index abf95aab..5dbbfb81 100644 --- a/client/modules/user-menu/navigate.spec.js +++ b/client/modules/user-menu/navigate.spec.js @@ -3,12 +3,7 @@ const test = require('supertape'); const navigate = require('./navigate'); -const { - UP, - DOWN, - J, - K, -} = require('../../key/key.js'); +const {UP, DOWN, J, K} = require('../../key/key.js'); test('cloudcmd: user-menu: navigate: DOWN', (t) => { const el = { From 9f52ed795da399687a9731849030804ff5b7c8f7 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Sat, 29 Mar 2025 19:30:38 +0200 Subject: [PATCH 201/415] chore: package: postcss --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index b5dc2368..a102b349 100644 --- a/package.json +++ b/package.json @@ -195,6 +195,7 @@ "optimize-css-assets-webpack-plugin": "^5.0.0", "philip": "^3.0.0", "place": "^1.1.4", + "postcss": "^8.5.3", "readjson": "^2.0.1", "redlint": "^4.1.1", "request": "^2.76.0", From 84c6935ae43376b50f593ef49d44ec7d507ec6ac Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 29 Mar 2025 17:32:46 +0000 Subject: [PATCH 202/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/release.mjs | 3 +- common/cloudfunc.js | 71 ++++++++++++++++++++-------------------- server/repl.js | 36 ++++++++++---------- server/show-config.js | 6 ++-- server/user-menu.mjs | 8 ++--- test/common/cloudfunc.js | 17 +++++----- test/rest/pack.mjs | 4 +-- 7 files changed, 73 insertions(+), 72 deletions(-) diff --git a/bin/release.mjs b/bin/release.mjs index 1c12c20e..ee55509a 100755 --- a/bin/release.mjs +++ b/bin/release.mjs @@ -19,7 +19,8 @@ await main(); async function main() { const history = '## Version history\n\n'; const link = '//github.com/coderaiser/cloudcmd/releases/tag/'; - const template = '- *{{ date }}*, ' + + const template = + '- *{{ date }}*, ' + '**[v{{ version }}]' + '(' + link + 'v{{ version }})**\n'; diff --git a/common/cloudfunc.js b/common/cloudfunc.js index c906b548..66ec044f 100644 --- a/common/cloudfunc.js +++ b/common/cloudfunc.js @@ -173,7 +173,6 @@ module.exports.buildFromJSON = (params) => { Path(path); fileTable += `${header}
      `; - /* Если мы не в корне */ if (path !== '/') { const dotDot = getDotDot(path); @@ -204,43 +203,43 @@ module.exports.buildFromJSON = (params) => { fileTable += files .filter(filterOutDotFiles({ - showDotFiles, - })) + showDotFiles, + })) .map(updateField) .map((file) => { - const name = encode(file.name); - const link = prefix + FS + path + name; - - const { - type, - mode, - date, - owner, - size, - } = file; - - const linkResult = rendy(templateLink, { - link, - title: name, - name, - attribute: getAttribute(file.type), - }); - - const dataName = getDataName(file.name); - const attribute = `draggable="true" ${dataName}`; - - return rendy(templateFile, { - tag: 'li', - attribute, - className: '', - type, - name: linkResult, - size, - date, - owner, - mode, - }); - }) + const name = encode(file.name); + const link = prefix + FS + path + name; + + const { + type, + mode, + date, + owner, + size, + } = file; + + const linkResult = rendy(templateLink, { + link, + title: name, + name, + attribute: getAttribute(file.type), + }); + + const dataName = getDataName(file.name); + const attribute = `draggable="true" ${dataName}`; + + return rendy(templateFile, { + tag: 'li', + attribute, + className: '', + type, + name: linkResult, + size, + date, + owner, + mode, + }); + }) .join(''); fileTable += '
    '; diff --git a/server/repl.js b/server/repl.js index 0c4d5279..c1647f04 100644 --- a/server/repl.js +++ b/server/repl.js @@ -6,22 +6,22 @@ const repl = require('node:repl'); module.exports = net .createServer((socket) => { - const {pid} = process; - const addr = socket.remoteAddress; - const port = socket.remotePort; - - const r = repl.start({ - prompt: `[${pid} ${addr}:${port}>`, - input: socket, - output: socket, - terminal: true, - useGlobal: false, - }); - - r.on('exit', () => { - socket.end(); - }); - - r.context.socket = socket; - }) + const {pid} = process; + const addr = socket.remoteAddress; + const port = socket.remotePort; + + const r = repl.start({ + prompt: `[${pid} ${addr}:${port}>`, + input: socket, + output: socket, + terminal: true, + useGlobal: false, + }); + + r.on('exit', () => { + socket.end(); + }); + + r.context.socket = socket; +}) .listen(1337); diff --git a/server/show-config.js b/server/show-config.js index 065fd7dd..78180b79 100644 --- a/server/show-config.js +++ b/server/show-config.js @@ -11,9 +11,9 @@ module.exports = (config) => { const data = Object .keys(config) .map((name) => [ - name, - config[name], - ]); + name, + config[name], + ]); if (!data.length) return ''; diff --git a/server/user-menu.mjs b/server/user-menu.mjs index ead1b3e3..cad6f9b1 100644 --- a/server/user-menu.mjs +++ b/server/user-menu.mjs @@ -80,10 +80,10 @@ async function onGET({req, res, menuName, readFile}) { function getError(error, source) { return montag` const e = Error(\`
    ${codeframe({
    -            error,
    -            source,
    -            highlightCode: false,
    -        })}
    \`); + error, + source, + highlightCode: false, + })}\`); e.code = 'frame'; diff --git a/test/common/cloudfunc.js b/test/common/cloudfunc.js index 185ff7b5..c8acadea 100644 --- a/test/common/cloudfunc.js +++ b/test/common/cloudfunc.js @@ -44,7 +44,8 @@ const data = { }], }; -let Expect = '
    ' + +let Expect = + '
    ' + '' + '' + @@ -74,13 +75,13 @@ test('cloudfunc: render', (t) => { const isNotOk = Expect .split('') .some((item, number) => { - const ret = result[number] !== item; - - if (ret) - i = number; - - return ret; - }); + const ret = result[number] !== item; + + if (ret) + i = number; + + return ret; + }); timeEnd('CloudFunc.buildFromJSON'); diff --git a/test/rest/pack.mjs b/test/rest/pack.mjs index 8dd40245..9aefcb97 100644 --- a/test/rest/pack.mjs +++ b/test/rest/pack.mjs @@ -170,7 +170,7 @@ test('cloudcmd: rest: pack: zip: put: file', async (t) => { config, }; - const name = String(Math.random()) + '.zip'; + const name = `${Math.random()}.zip`; await request.put(`/api/v1/pack`, { options, @@ -192,7 +192,7 @@ test('cloudcmd: rest: pack: zip: put: response', async (t) => { config, }; - const name = String(Math.random()) + '.zip'; + const name = `${Math.random()}.zip`; const {body} = await request.put(`/api/v1/pack`, { options, From 8450bfa611e2bc9c3cbf4c440abb3c3957c00db5 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Thu, 10 Apr 2025 17:22:21 +0300 Subject: [PATCH 203/415] feature: cloudcmd: putout v40.0.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a102b349..d7f7b639 100644 --- a/package.json +++ b/package.json @@ -129,7 +129,7 @@ "package-json": "^10.0.0", "ponse": "^7.0.0", "pullout": "^5.0.0", - "putout": "^39.3.0", + "putout": "^40.0.3", "redzip": "^3.0.0", "rendy": "^4.1.3", "restafary": "^12.0.0", From 4b78d70b5c7270719aa69efc8c5cef3d0c85f167 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Thu, 10 Apr 2025 17:24:15 +0300 Subject: [PATCH 204/415] chore: cloudcmd: v18.5.2 --- ChangeLog | 12 ++++++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 414c5329..826f9ea3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2025.04.10, v18.5.2 + +feature: +- 8450bfa6 cloudcmd: putout v40.0.3 +- 51f51b54 cloudcmd: @putout/plugin-cloudcmd v4.0.0 +- 08ab63d7 cloudcmd: supertape v11.0.4 +- e7cc9b92 cloudcmd: redlint v4.1.1 +- 368c9bb8 cloudcmd: eslint v9.23.0 +- 43fd5ed6 cloudcmd: madrun v11.0.0 +- f774d5b2 cloudcmd: eslint-plugin-putout v26.1.0 +- b0a7fc16 cloudcmd: putout v39.3.0 + 2025.02.03, v18.5.1 feature: diff --git a/HELP.md b/HELP.md index f002d2d9..1e445be7 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.5.1 +# Cloud Commander v18.5.2 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1098,6 +1098,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2025.04.10*, **[v18.5.2](//github.com/coderaiser/cloudcmd/releases/tag/v18.5.2)** - *2025.02.03*, **[v18.5.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.5.1)** - *2025.01.20*, **[v18.5.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.5.0)** - *2024.12.13*, **[v18.4.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.4.1)** diff --git a/README.md b/README.md index a1a4a2f4..a7e5c744 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.5.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v18.5.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index d7f7b639..799c2ca2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "18.5.1", + "version": "18.5.2", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From b26c8bba3744a72e756df76e4264a434b16dacd6 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Thu, 24 Apr 2025 17:19:31 +0300 Subject: [PATCH 205/415] feature: cloudcmd: thread-it v3.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 799c2ca2..d147cfc8 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,7 @@ "socket.io-client": "^4.0.1", "squad": "^3.0.0", "table": "^6.0.1", - "thread-it": "^2.0.0", + "thread-it": "^3.0.0", "try-catch": "^3.0.0", "try-to-catch": "^3.0.0", "tryrequire": "^3.0.0", From 2a97ac66fb7e570355c2efc0841aadcb5b8b3417 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 2 Jul 2025 17:14:47 +0300 Subject: [PATCH 206/415] feature: cloudcmd: yargs-parser v22.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d147cfc8..8d2b91a1 100644 --- a/package.json +++ b/package.json @@ -147,7 +147,7 @@ "win32": "^7.0.0", "wraptile": "^3.0.0", "writejson": "^3.0.0", - "yargs-parser": "^21.0.0" + "yargs-parser": "^22.0.0" }, "devDependencies": { "@babel/code-frame": "^7.22.5", From 8ccec23d6c9a55e04a18f43d34c0623e74deadeb Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 2 Jul 2025 17:16:39 +0300 Subject: [PATCH 207/415] feature: cloudcmd: help: require -> import --- bin/cloudcmd.mjs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bin/cloudcmd.mjs b/bin/cloudcmd.mjs index e6b4c1a9..b82e887c 100755 --- a/bin/cloudcmd.mjs +++ b/bin/cloudcmd.mjs @@ -316,7 +316,11 @@ async function readConfig(name) { } async function help() { - const bin = require('../json/help.json'); + const {default: bin} = await import('../json/help.json', { + with: { + type: 'json' + } + }); const forEachKey = await simport('for-each-key'); const currify = await simport('currify'); From 99ad0c217d7fa03c3622d11a3800b0bb72a9460c Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 2 Jul 2025 17:16:50 +0300 Subject: [PATCH 208/415] feature: cloudcmd: rm @putout/babel --- package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/package.json b/package.json index 8d2b91a1..6e56f6d6 100644 --- a/package.json +++ b/package.json @@ -157,7 +157,6 @@ "@cloudcmd/modal": "^3.0.0", "@cloudcmd/olark": "^3.0.2", "@cloudcmd/stub": "^4.0.1", - "@putout/babel": "^3.0.0", "@putout/plugin-cloudcmd": "^4.0.0", "@types/node-fetch": "^2.6.11", "auto-globals": "^4.0.0", From 4ab4be124bc4e0d332ede37e0ca1ab46032b358c Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 2 Jul 2025 18:34:59 +0300 Subject: [PATCH 209/415] feature: thread-it: get rid (#438) --- package.json | 1 - server/markdown/index.js | 4 +--- server/server.mjs | 2 -- server/user-menu.mjs | 5 +---- 4 files changed, 2 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 6e56f6d6..e43f4de8 100644 --- a/package.json +++ b/package.json @@ -140,7 +140,6 @@ "socket.io-client": "^4.0.1", "squad": "^3.0.0", "table": "^6.0.1", - "thread-it": "^3.0.0", "try-catch": "^3.0.0", "try-to-catch": "^3.0.0", "tryrequire": "^3.0.0", diff --git a/server/markdown/index.js b/server/markdown/index.js index cb6096ac..bf8fa455 100644 --- a/server/markdown/index.js +++ b/server/markdown/index.js @@ -5,14 +5,12 @@ const {callbackify} = require('node:util'); const pullout = require('pullout'); const ponse = require('ponse'); -const threadIt = require('thread-it'); const {read} = require('redzip'); const root = require('../root'); const isString = (a) => typeof a === 'string'; -const parse = threadIt(join(__dirname, 'worker')); +const parse = require('./worker'); -threadIt.init(); // warm up parse(''); diff --git a/server/server.mjs b/server/server.mjs index 9bdd1f3f..096f9f40 100644 --- a/server/server.mjs +++ b/server/server.mjs @@ -10,7 +10,6 @@ import {Server} from 'socket.io'; import tryRequire from 'tryrequire'; import wraptile from 'wraptile'; import compression from 'compression'; -import threadIt from 'thread-it'; import exit from './exit.js'; import cloudcmd from './cloudcmd.mjs'; @@ -20,7 +19,6 @@ const two = currify((f, a, b) => f(a, b)); const shutdown = wraptile(async (promises) => { console.log('closing cloudcmd...'); await Promise.all(promises); - threadIt.terminate(); process.exit(0); }); diff --git a/server/user-menu.mjs b/server/user-menu.mjs index cad6f9b1..c7d85855 100644 --- a/server/user-menu.mjs +++ b/server/user-menu.mjs @@ -5,13 +5,10 @@ import {join} from 'node:path'; import montag from 'montag'; import tryToCatch from 'try-to-catch'; import currify from 'currify'; -import threadIt from 'thread-it'; -import {codeframe} from 'putout'; +import {putout, codeframe} from 'putout'; const require = createRequire(import.meta.url); -const putout = threadIt(require.resolve('putout')); -threadIt.init(); // warm up worker cache transpile(''); From f4b0f92f05b20ecc6e393087373b84ffbaade1c1 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 2 Jul 2025 18:40:04 +0300 Subject: [PATCH 210/415] feature: cloudcmd: express v5.1.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e43f4de8..27de7048 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ "edward": "^15.0.0", "es6-promisify": "^7.0.0", "execon": "^1.2.0", - "express": "^4.13.0", + "express": "^5.1.0", "files-io": "^4.0.0", "find-up": "^7.0.0", "for-each-key": "^2.0.0", From 9a4cf388d36af1052532c3ebe48d7f17b99b071b Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 2 Jul 2025 18:42:15 +0300 Subject: [PATCH 211/415] feature: cloudcmd: eslint-plugin-putout v27.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 27de7048..c4174c95 100644 --- a/package.json +++ b/package.json @@ -171,7 +171,7 @@ "emitify": "^4.0.1", "eslint": "^9.23.0", "eslint-plugin-n": "^17.0.0-4", - "eslint-plugin-putout": "^26.1.0", + "eslint-plugin-putout": "^27.2.1", "extract-text-webpack-plugin": "^4.0.0-alpha.0", "gritty": "^8.0.0", "gunzip-maybe": "^1.3.1", From 1679b788c230786b5bcc8707bcbd962230357c1c Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 2 Jul 2025 19:57:34 +0300 Subject: [PATCH 212/415] feature: cloudcmd: webpackbar v7.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c4174c95..0f3505a8 100644 --- a/package.json +++ b/package.json @@ -211,7 +211,7 @@ "webpack": "^4.0.0", "webpack-cli": "^3.0.1", "webpack-merge": "^6.0.1", - "webpackbar": "^5.0.0-3" + "webpackbar": "^7.0.0" }, "engines": { "node": ">=20" From 5f0391fc44b0507bf533ce6b61abc3765ba3fb27 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 2 Jul 2025 20:10:47 +0300 Subject: [PATCH 213/415] chore: lint --- .putout.json | 3 --- bin/cloudcmd.mjs | 5 +++-- client/key/vim/index.js | 3 ++- client/modules/operation/index.js | 24 ++++++++++++------------ common/base64.spec.js | 20 +++++++++++--------- server/markdown/index.js | 4 ++-- server/user-menu.mjs | 3 --- 7 files changed, 30 insertions(+), 32 deletions(-) diff --git a/.putout.json b/.putout.json index 08b4f06e..1afdcf8b 100644 --- a/.putout.json +++ b/.putout.json @@ -6,9 +6,6 @@ "app.json", "fontello.json" ], - "rules": { - "github/set-node-versions": "off" - }, "match": { "base64": { "types/convert-typeof-to-is-type": "off" diff --git a/bin/cloudcmd.mjs b/bin/cloudcmd.mjs index b82e887c..c8759719 100755 --- a/bin/cloudcmd.mjs +++ b/bin/cloudcmd.mjs @@ -318,9 +318,10 @@ async function readConfig(name) { async function help() { const {default: bin} = await import('../json/help.json', { with: { - type: 'json' - } + type: 'json', + }, }); + const forEachKey = await simport('for-each-key'); const currify = await simport('currify'); diff --git a/client/key/vim/index.js b/client/key/vim/index.js index e8b01558..6a209ea7 100644 --- a/client/key/vim/index.js +++ b/client/key/vim/index.js @@ -29,8 +29,9 @@ const getOperations = (event, deps) => { setCurrentFile, setCurrentByName, getCurrentName, + toggleSelectedFile, - Buffer = {}, + Buffer = {}, } = deps; return { diff --git a/client/modules/operation/index.js b/client/modules/operation/index.js index bf19bda8..8105e85f 100644 --- a/client/modules/operation/index.js +++ b/client/modules/operation/index.js @@ -59,19 +59,19 @@ module.exports.init = promisify((callback) => { exec.series([ DOM.loadSocket, async (callback) => { - if (config('dropbox')) - return callback(); - - const {prefix, prefixSocket} = CloudCmd; - - await loadAll(); - await initOperations(prefix, prefixSocket, callback); - }, + if (config('dropbox')) + return callback(); + + const {prefix, prefixSocket} = CloudCmd; + + await loadAll(); + await initOperations(prefix, prefixSocket, callback); + }, (callback) => { - Loaded = true; - Images.hide(); - callback(); - }, + Loaded = true; + Images.hide(); + callback(); + }, ], callback); }); diff --git a/common/base64.spec.js b/common/base64.spec.js index bc3ea2f5..cc096ee2 100644 --- a/common/base64.spec.js +++ b/common/base64.spec.js @@ -6,16 +6,16 @@ const {btoa, atob} = require('./base64'); test('btoa: browser', (t) => { const btoaOriginal = global.btoa; + const btoaStub = stub(); const str = 'hello'; - global.btoa = stub(); + global.btoa = btoaStub; btoa(str); - - t.calledWith(global.btoa, [str], 'should call global.btoa'); - t.end(); - global.btoa = btoaOriginal; + + t.calledWith(btoaStub, [str], 'should call global.btoa'); + t.end(); }); test('btoa: node', (t) => { @@ -30,16 +30,18 @@ test('btoa: node', (t) => { test('atob: browser', (t) => { const atobOriginal = global.atob; + const atobStub = stub(); + const str = 'hello'; - global.atob = stub(); + global.atob = atobStub; atob(str); - t.calledWith(global.atob, [str], 'should call global.btoa'); - t.end(); - global.atob = atobOriginal; + + t.calledWith(atobStub, [str], 'should call global.btoa'); + t.end(); }); test('atob: node', (t) => { diff --git a/server/markdown/index.js b/server/markdown/index.js index bf8fa455..639e219d 100644 --- a/server/markdown/index.js +++ b/server/markdown/index.js @@ -1,6 +1,5 @@ 'use strict'; -const {join} = require('node:path'); const {callbackify} = require('node:util'); const pullout = require('pullout'); @@ -8,8 +7,9 @@ const ponse = require('ponse'); const {read} = require('redzip'); const root = require('../root'); -const isString = (a) => typeof a === 'string'; + const parse = require('./worker'); +const isString = (a) => typeof a === 'string'; // warm up parse(''); diff --git a/server/user-menu.mjs b/server/user-menu.mjs index c7d85855..5ae51536 100644 --- a/server/user-menu.mjs +++ b/server/user-menu.mjs @@ -1,4 +1,3 @@ -import {createRequire} from 'node:module'; import {homedir} from 'node:os'; import {readFile as _readFile} from 'node:fs/promises'; import {join} from 'node:path'; @@ -7,8 +6,6 @@ import tryToCatch from 'try-to-catch'; import currify from 'currify'; import {putout, codeframe} from 'putout'; -const require = createRequire(import.meta.url); - // warm up worker cache transpile(''); From 2eb3dc669259c0bd3aa0470dadf14dc9cb66cbe9 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 2 Jul 2025 21:17:14 +0300 Subject: [PATCH 214/415] feature: cloudcmd: @iocmd/wait v2.1.0 --- package.json | 1 + server/user-menu.spec.mjs | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/package.json b/package.json index 0f3505a8..c36f415e 100644 --- a/package.json +++ b/package.json @@ -156,6 +156,7 @@ "@cloudcmd/modal": "^3.0.0", "@cloudcmd/olark": "^3.0.2", "@cloudcmd/stub": "^4.0.1", + "@iocmd/wait": "^2.1.0", "@putout/plugin-cloudcmd": "^4.0.0", "@types/node-fetch": "^2.6.11", "auto-globals": "^4.0.0", diff --git a/server/user-menu.spec.mjs b/server/user-menu.spec.mjs index 0125bd9e..635c7746 100644 --- a/server/user-menu.spec.mjs +++ b/server/user-menu.spec.mjs @@ -3,7 +3,6 @@ import {fileURLToPath} from 'node:url'; import {readFileSync} from 'node:fs'; import {test, stub} from 'supertape'; import serveOnce from 'serve-once'; -import threadIt from 'thread-it'; import userMenu from './user-menu.mjs'; const __filename = fileURLToPath(import.meta.url); @@ -67,8 +66,6 @@ test('cloudcmd: user menu: io.cp', async (t) => { options, }); - threadIt.terminate(); - t.equal(body, fixtureCopyFix); t.end(); }); From a87e5ceaf65fb095b63ba6507bc85009a8ed9fa8 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Wed, 2 Jul 2025 21:18:44 +0300 Subject: [PATCH 215/415] chore: cloudcmd: v18.6.0 --- ChangeLog | 13 +++++++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 826f9ea3..d916b549 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2025.07.02, v18.6.0 + +feature: +- 2eb3dc66 cloudcmd: @iocmd/wait v2.1.0 +- 1679b788 cloudcmd: webpackbar v7.0.0 +- 9a4cf388 cloudcmd: eslint-plugin-putout v27.2.1 +- f4b0f92f cloudcmd: express v5.1.0 +- 4ab4be12 thread-it: get rid (#438) +- 99ad0c21 cloudcmd: rm @putout/babel +- 8ccec23d cloudcmd: help: require -> import +- 2a97ac66 cloudcmd: yargs-parser v22.0.0 +- b26c8bba cloudcmd: thread-it v3.0.0 + 2025.04.10, v18.5.2 feature: diff --git a/HELP.md b/HELP.md index 1e445be7..fe68d6c2 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.5.2 +# Cloud Commander v18.6.0 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1098,6 +1098,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2025.07.02*, **[v18.6.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.6.0)** - *2025.04.10*, **[v18.5.2](//github.com/coderaiser/cloudcmd/releases/tag/v18.5.2)** - *2025.02.03*, **[v18.5.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.5.1)** - *2025.01.20*, **[v18.5.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.5.0)** diff --git a/README.md b/README.md index a7e5c744..8ef53740 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.5.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v18.6.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index c36f415e..b0930aef 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "18.5.2", + "version": "18.6.0", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 2057065dbfb6306effb19bb919d9f50df233620d Mon Sep 17 00:00:00 2001 From: coderiaser Date: Thu, 3 Jul 2025 23:20:53 +0300 Subject: [PATCH 216/415] feature: cloudcmd: @putout/eslint-flat v3.0.1 --- package.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b0930aef..e9b4ce09 100644 --- a/package.json +++ b/package.json @@ -157,6 +157,7 @@ "@cloudcmd/olark": "^3.0.2", "@cloudcmd/stub": "^4.0.1", "@iocmd/wait": "^2.1.0", + "@putout/eslint-flat": "^3.0.1", "@putout/plugin-cloudcmd": "^4.0.0", "@types/node-fetch": "^2.6.11", "auto-globals": "^4.0.0", @@ -215,7 +216,7 @@ "webpackbar": "^7.0.0" }, "engines": { - "node": ">=20" + "node": ">=20.19" }, "license": "MIT", "publishConfig": { From 4b476a6dff7bc42fea4de68e5c296be60e6eb8d3 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Thu, 3 Jul 2025 23:20:57 +0300 Subject: [PATCH 217/415] feature: cloudcmd: globals v16.3.0 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index e9b4ce09..ba5c5d4d 100644 --- a/package.json +++ b/package.json @@ -175,6 +175,7 @@ "eslint-plugin-n": "^17.0.0-4", "eslint-plugin-putout": "^27.2.1", "extract-text-webpack-plugin": "^4.0.0-alpha.0", + "globals": "^16.3.0", "gritty": "^8.0.0", "gunzip-maybe": "^1.3.1", "html-looks-like": "^1.0.2", From b77e9c91d4746bfc27beaae2cb498ab671173e0d Mon Sep 17 00:00:00 2001 From: coderiaser Date: Thu, 3 Jul 2025 23:21:05 +0300 Subject: [PATCH 218/415] feature: cloudcmd: pipe-io v4.0.1 --- package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/package.json b/package.json index ba5c5d4d..1ef5b304 100644 --- a/package.json +++ b/package.json @@ -127,6 +127,7 @@ "onezip": "^6.0.1", "open": "^10.0.3", "package-json": "^10.0.0", + "pipe-io": "^4.0.1", "ponse": "^7.0.0", "pullout": "^5.0.0", "putout": "^40.0.3", From e99d084728e9c7eebfa52752676495d912c5707f Mon Sep 17 00:00:00 2001 From: coderiaser Date: Thu, 3 Jul 2025 23:21:44 +0300 Subject: [PATCH 219/415] feature: cloudcmd: montag v1.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1ef5b304..3bbed088 100644 --- a/package.json +++ b/package.json @@ -120,6 +120,7 @@ "just-snake-case": "^3.2.0", "markdown-it": "^14.0.0", "mellow": "^3.0.0", + "montag": "^1.2.1", "nano-memoize": "^3.0.16", "nomine": "^4.0.0", "object.omit": "^3.0.0", @@ -190,7 +191,6 @@ "memfs": "^4.2.0", "minor": "^1.2.2", "mock-require": "^3.0.1", - "montag": "^1.2.1", "morgan": "^1.6.1", "multi-rename": "^2.0.0", "nodemon": "^3.0.1", From af77eeed8d33e5aaf8c466cab75da0efe98b002d Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 4 Jul 2025 12:51:42 +0300 Subject: [PATCH 220/415] chore: lint --- .npmignore | 4 +- bin/release.mjs | 4 +- client/key/vim/index.js | 2 +- client/listeners/index.js | 5 +- client/modules/operation/index.js | 24 ++++---- client/modules/user-menu/navigate.js | 7 ++- client/modules/user-menu/navigate.spec.js | 7 ++- common/cloudfunc.js | 71 ++++++++++++----------- eslint.config.mjs | 42 ++++++++++++++ package.json | 1 + server/repl.js | 36 ++++++------ server/show-config.js | 6 +- server/user-menu.mjs | 8 +-- test/common/cloudfunc.js | 17 +++--- 14 files changed, 143 insertions(+), 91 deletions(-) create mode 100644 eslint.config.mjs diff --git a/.npmignore b/.npmignore index 0ecde705..eb036c9d 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,5 @@ .* -*.spec.js +*.spec.* *.fixture.js* manifest.yml docker @@ -19,7 +19,7 @@ app.json bower.json manifest.yml -bin/release.js +bin/release.mjs client img/logo/cloudcmd-hq.png diff --git a/bin/release.mjs b/bin/release.mjs index ee55509a..694eb7da 100755 --- a/bin/release.mjs +++ b/bin/release.mjs @@ -19,8 +19,8 @@ await main(); async function main() { const history = '## Version history\n\n'; const link = '//github.com/coderaiser/cloudcmd/releases/tag/'; - const template = - '- *{{ date }}*, ' + + const template = '- ' + + '*{{ date }}*, ' + '**[v{{ version }}]' + '(' + link + 'v{{ version }})**\n'; diff --git a/client/key/vim/index.js b/client/key/vim/index.js index 6a209ea7..7c94f773 100644 --- a/client/key/vim/index.js +++ b/client/key/vim/index.js @@ -31,7 +31,7 @@ const getOperations = (event, deps) => { getCurrentName, toggleSelectedFile, - Buffer = {}, + Buffer = {}, } = deps; return { diff --git a/client/listeners/index.js b/client/listeners/index.js index 3bd0ce9c..8e948d67 100644 --- a/client/listeners/index.js +++ b/client/listeners/index.js @@ -215,8 +215,7 @@ async function onPathElementClick(panel, event) { function copyPath(el) { clipboard - .writeText(el - .parentElement.title) + .writeText(el.parentElement.title) .then(CloudCmd.log) .catch(CloudCmd.log); } @@ -422,7 +421,7 @@ function dragndrop() { }; /** - * In Mac OS Chrome dropEffect = 'none' + * In macOS Chrome dropEffect = 'none' * so drop do not firing up when try * to upload file from download bar */ diff --git a/client/modules/operation/index.js b/client/modules/operation/index.js index 8105e85f..bf19bda8 100644 --- a/client/modules/operation/index.js +++ b/client/modules/operation/index.js @@ -59,19 +59,19 @@ module.exports.init = promisify((callback) => { exec.series([ DOM.loadSocket, async (callback) => { - if (config('dropbox')) - return callback(); - - const {prefix, prefixSocket} = CloudCmd; - - await loadAll(); - await initOperations(prefix, prefixSocket, callback); - }, + if (config('dropbox')) + return callback(); + + const {prefix, prefixSocket} = CloudCmd; + + await loadAll(); + await initOperations(prefix, prefixSocket, callback); + }, (callback) => { - Loaded = true; - Images.hide(); - callback(); - }, + Loaded = true; + Images.hide(); + callback(); + }, ], callback); }); diff --git a/client/modules/user-menu/navigate.js b/client/modules/user-menu/navigate.js index d3c89830..445d47d1 100644 --- a/client/modules/user-menu/navigate.js +++ b/client/modules/user-menu/navigate.js @@ -2,7 +2,12 @@ const fullstore = require('fullstore'); -const {J, K, UP, DOWN} = require('../../key/key.js'); +const { + J, + K, + UP, + DOWN, +} = require('../../key/key.js'); const store = fullstore(1); const isDigit = (a) => /^\d+$/.test(a); diff --git a/client/modules/user-menu/navigate.spec.js b/client/modules/user-menu/navigate.spec.js index 5dbbfb81..abf95aab 100644 --- a/client/modules/user-menu/navigate.spec.js +++ b/client/modules/user-menu/navigate.spec.js @@ -3,7 +3,12 @@ const test = require('supertape'); const navigate = require('./navigate'); -const {UP, DOWN, J, K} = require('../../key/key.js'); +const { + UP, + DOWN, + J, + K, +} = require('../../key/key.js'); test('cloudcmd: user-menu: navigate: DOWN', (t) => { const el = { diff --git a/common/cloudfunc.js b/common/cloudfunc.js index 66ec044f..c906b548 100644 --- a/common/cloudfunc.js +++ b/common/cloudfunc.js @@ -173,6 +173,7 @@ module.exports.buildFromJSON = (params) => { Path(path); fileTable += `${header}
      `; + /* Если мы не в корне */ if (path !== '/') { const dotDot = getDotDot(path); @@ -203,43 +204,43 @@ module.exports.buildFromJSON = (params) => { fileTable += files .filter(filterOutDotFiles({ - showDotFiles, - })) + showDotFiles, + })) .map(updateField) .map((file) => { - const name = encode(file.name); - const link = prefix + FS + path + name; - - const { - type, - mode, - date, - owner, - size, - } = file; - - const linkResult = rendy(templateLink, { - link, - title: name, - name, - attribute: getAttribute(file.type), - }); - - const dataName = getDataName(file.name); - const attribute = `draggable="true" ${dataName}`; - - return rendy(templateFile, { - tag: 'li', - attribute, - className: '', - type, - name: linkResult, - size, - date, - owner, - mode, - }); - }) + const name = encode(file.name); + const link = prefix + FS + path + name; + + const { + type, + mode, + date, + owner, + size, + } = file; + + const linkResult = rendy(templateLink, { + link, + title: name, + name, + attribute: getAttribute(file.type), + }); + + const dataName = getDataName(file.name); + const attribute = `draggable="true" ${dataName}`; + + return rendy(templateFile, { + tag: 'li', + attribute, + className: '', + type, + name: linkResult, + size, + date, + owner, + mode, + }); + }) .join(''); fileTable += '
    '; diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 00000000..b7808852 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,42 @@ +import {safeAlign} from 'eslint-plugin-putout'; +import {defineConfig} from 'eslint/config'; +import n from 'eslint-plugin-n'; +import globals from 'globals'; +import {matchToFlat} from '@putout/eslint-flat'; + +export const match = { + 'bin/release.mjs': { + 'no-console': 'off', + 'n/hashbang': 'off', + }, + 'client/dom/index.js': { + 'no-multi-spaces': 'off', + }, + 'client/**/*.js': { + 'n/no-extraneous-require': 'off', + 'n/no-unsupported-features/node-builtins': 'off', + }, + 'bin/cloudcmd.js': { + 'no-console': 'off', + }, +}; +export default defineConfig([ + safeAlign, { + ignores: ['**/fixture'], + rules: { + 'key-spacing': 'off', + 'n/prefer-node-protocol': 'error', + }, + plugins: { + n, + }, + }, { + files: ['{client,common,static}/**/*.js'], + languageOptions: { + globals: { + ...globals.browser, + }, + }, + }, + ...matchToFlat(match), +]); diff --git a/package.json b/package.json index 3bbed088..7ee17729 100644 --- a/package.json +++ b/package.json @@ -120,6 +120,7 @@ "just-snake-case": "^3.2.0", "markdown-it": "^14.0.0", "mellow": "^3.0.0", + "mime-types": "^3.0.1", "montag": "^1.2.1", "nano-memoize": "^3.0.16", "nomine": "^4.0.0", diff --git a/server/repl.js b/server/repl.js index c1647f04..0c4d5279 100644 --- a/server/repl.js +++ b/server/repl.js @@ -6,22 +6,22 @@ const repl = require('node:repl'); module.exports = net .createServer((socket) => { - const {pid} = process; - const addr = socket.remoteAddress; - const port = socket.remotePort; - - const r = repl.start({ - prompt: `[${pid} ${addr}:${port}>`, - input: socket, - output: socket, - terminal: true, - useGlobal: false, - }); - - r.on('exit', () => { - socket.end(); - }); - - r.context.socket = socket; -}) + const {pid} = process; + const addr = socket.remoteAddress; + const port = socket.remotePort; + + const r = repl.start({ + prompt: `[${pid} ${addr}:${port}>`, + input: socket, + output: socket, + terminal: true, + useGlobal: false, + }); + + r.on('exit', () => { + socket.end(); + }); + + r.context.socket = socket; + }) .listen(1337); diff --git a/server/show-config.js b/server/show-config.js index 78180b79..065fd7dd 100644 --- a/server/show-config.js +++ b/server/show-config.js @@ -11,9 +11,9 @@ module.exports = (config) => { const data = Object .keys(config) .map((name) => [ - name, - config[name], - ]); + name, + config[name], + ]); if (!data.length) return ''; diff --git a/server/user-menu.mjs b/server/user-menu.mjs index 5ae51536..1100e1f3 100644 --- a/server/user-menu.mjs +++ b/server/user-menu.mjs @@ -74,10 +74,10 @@ async function onGET({req, res, menuName, readFile}) { function getError(error, source) { return montag` const e = Error(\`
    ${codeframe({
    -        error,
    -        source,
    -        highlightCode: false,
    -    })}
    \`); + error, + source, + highlightCode: false, + })}\`); e.code = 'frame'; diff --git a/test/common/cloudfunc.js b/test/common/cloudfunc.js index c8acadea..185ff7b5 100644 --- a/test/common/cloudfunc.js +++ b/test/common/cloudfunc.js @@ -44,8 +44,7 @@ const data = { }], }; -let Expect = - '
    ' + +let Expect = '
    ' + '' + '' + @@ -75,13 +74,13 @@ test('cloudfunc: render', (t) => { const isNotOk = Expect .split('') .some((item, number) => { - const ret = result[number] !== item; - - if (ret) - i = number; - - return ret; - }); + const ret = result[number] !== item; + + if (ret) + i = number; + + return ret; + }); timeEnd('CloudFunc.buildFromJSON'); From 0d61a972fbbdef6c95b4c3b8e5f7374d57ec4b13 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 4 Jul 2025 13:32:47 +0300 Subject: [PATCH 221/415] chore: lint --- .npmignore | 2 +- eslint.config.mjs | 2 +- package.json | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.npmignore b/.npmignore index eb036c9d..08137773 100644 --- a/.npmignore +++ b/.npmignore @@ -1,5 +1,6 @@ .* *.spec.* +*.config.* *.fixture.js* manifest.yml docker @@ -13,7 +14,6 @@ html yarn-error.log yarn.lock now.json -cssnano.config.js app.json bower.json diff --git a/eslint.config.mjs b/eslint.config.mjs index b7808852..d445c4a9 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -12,7 +12,7 @@ export const match = { 'client/dom/index.js': { 'no-multi-spaces': 'off', }, - 'client/**/*.js': { + '{client,static}/**/*.js': { 'n/no-extraneous-require': 'off', 'n/no-unsupported-features/node-builtins': 'off', }, diff --git a/package.json b/package.json index 7ee17729..fc54a917 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,7 @@ }, "subdomain": "cloudcmd", "dependencies": { - "@babel/core": "^7.22.9", + "@babel/core": "^8.0.0-beta.1", "@babel/plugin-transform-optional-chaining": "^7.21.0", "@cloudcmd/dropbox": "^5.0.1", "@cloudcmd/fileop": "^8.0.0", @@ -172,6 +172,7 @@ "codegen.macro": "^4.0.0", "css-loader": "^3.0.0", "css-modules-require-hook": "^4.2.3", + "cssnano-preset-default": "^7.0.7", "domtokenlist-shim": "^1.2.0", "emitify": "^4.0.1", "eslint": "^9.23.0", From baaf47e62f3d49079fe86fea11bbb1a5df0f7117 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 4 Jul 2025 10:34:29 +0000 Subject: [PATCH 222/415] =?UTF-8?q?chore:=20cloudcmd:=20actions:=20lint=20?= =?UTF-8?q?=E2=98=98=EF=B8=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/dom/current-file.js | 3 +-- client/modules/edit-file.js | 9 +++------ client/modules/edit-names-vim.js | 3 +-- client/modules/edit-names.js | 3 +-- client/modules/view/index.js | 3 +-- 5 files changed, 7 insertions(+), 14 deletions(-) diff --git a/client/dom/current-file.js b/client/dom/current-file.js index 3dd831c4..1150de2a 100644 --- a/client/dom/current-file.js +++ b/client/dom/current-file.js @@ -305,8 +305,7 @@ module.exports.isCurrentIsDir = (currentFile) => { module.exports.getCurrentType = (currentFile) => { const current = currentFile || DOM.getCurrentFile(); const el = DOM.getByDataName('js-type', current); - const type = el - .className + const type = el.className .split(' ') .pop(); diff --git a/client/modules/edit-file.js b/client/modules/edit-file.js index 5551a155..f631351a 100644 --- a/client/modules/edit-file.js +++ b/client/modules/edit-file.js @@ -61,8 +61,7 @@ module.exports.show = async (options) => { Images.show.load(); - CloudCmd - .Edit + CloudCmd.Edit .getEditor() .setOption('keyMap', 'default'); @@ -78,8 +77,7 @@ module.exports.show = async (options) => { setMsgChanged(name); - CloudCmd - .Edit + CloudCmd.Edit .getEditor() .setValueFirst(path, data) .setModeForPath(name) @@ -131,8 +129,7 @@ function setMenu(event) { }, afterClick: () => { - CloudCmd - .Edit + CloudCmd.Edit .getEditor() .focus(); }, diff --git a/client/modules/edit-names-vim.js b/client/modules/edit-names-vim.js index 540259e5..266dc9dc 100644 --- a/client/modules/edit-names-vim.js +++ b/client/modules/edit-names-vim.js @@ -21,8 +21,7 @@ module.exports.init = async () => { module.exports.show = () => { Events.addKey(listener); - CloudCmd - .EditNames + CloudCmd.EditNames .show(ConfigView) .getEditor() .setKeyMap('vim'); diff --git a/client/modules/edit-names.js b/client/modules/edit-names.js index c0b9ae84..c2eaac12 100644 --- a/client/modules/edit-names.js +++ b/client/modules/edit-names.js @@ -44,8 +44,7 @@ module.exports.show = (options) => { DOM.Events.addKey(keyListener); - CloudCmd - .Edit + CloudCmd.Edit .getEditor() .setValueFirst('edit-names', names) .setMode() diff --git a/client/modules/view/index.js b/client/modules/view/index.js index 17a3b1fa..e78d507b 100644 --- a/client/modules/view/index.js +++ b/client/modules/view/index.js @@ -263,8 +263,7 @@ function viewImage(path, prefixURL) { title: encode(basename(path)), }); - const names = Info - .files + const names = Info.files .map(DOM.getCurrentPath) .filter(isSupportedImage); From 9eafa189a801765d5e10cbd84aa4ab67b2ac7413 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 4 Jul 2025 13:33:37 +0300 Subject: [PATCH 223/415] feature: cloudcmd: http-auth v4.2.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index fc54a917..ef209655 100644 --- a/package.json +++ b/package.json @@ -112,7 +112,7 @@ "for-each-key": "^2.0.0", "format-io": "^2.0.0", "fullstore": "^3.0.0", - "http-auth": "4.1.2 || > 4.1.3", + "http-auth": "^4.2.1", "inly": "^5.0.0", "jaguar": "^6.0.0", "jju": "^1.3.0", From a54caa1d7cdb2b6d51ea979170614ef66a2f0c6c Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 4 Jul 2025 13:41:12 +0300 Subject: [PATCH 224/415] chore: lint --- .putout.json | 3 ++- eslint.config.mjs | 3 +++ package.json | 3 +-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.putout.json b/.putout.json index 1afdcf8b..239eb08d 100644 --- a/.putout.json +++ b/.putout.json @@ -4,7 +4,8 @@ "html", "fixture*", "app.json", - "fontello.json" + "fontello.json", + "*.md" ], "match": { "base64": { diff --git a/eslint.config.mjs b/eslint.config.mjs index d445c4a9..ad22cf4a 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -19,6 +19,9 @@ export const match = { 'bin/cloudcmd.js': { 'no-console': 'off', }, + 'cssnano.config.js': { + 'n/no-extraneous-require': 'off', + }, }; export default defineConfig([ safeAlign, { diff --git a/package.json b/package.json index ef209655..631104b7 100644 --- a/package.json +++ b/package.json @@ -86,7 +86,6 @@ }, "subdomain": "cloudcmd", "dependencies": { - "@babel/core": "^8.0.0-beta.1", "@babel/plugin-transform-optional-chaining": "^7.21.0", "@cloudcmd/dropbox": "^5.0.1", "@cloudcmd/fileop": "^8.0.0", @@ -152,6 +151,7 @@ "yargs-parser": "^22.0.0" }, "devDependencies": { + "@babel/core": "^7.22.5", "@babel/code-frame": "^7.22.5", "@babel/preset-env": "^7.0.0", "@cloudcmd/clipboard": "^2.0.0", @@ -172,7 +172,6 @@ "codegen.macro": "^4.0.0", "css-loader": "^3.0.0", "css-modules-require-hook": "^4.2.3", - "cssnano-preset-default": "^7.0.7", "domtokenlist-shim": "^1.2.0", "emitify": "^4.0.1", "eslint": "^9.23.0", From ef423308487cf4ced7fd06d7b4d04378a0868055 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 4 Jul 2025 13:41:56 +0300 Subject: [PATCH 225/415] chore: cloudcmd: v18.6.1 --- ChangeLog | 9 +++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index d916b549..f92a26ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2025.07.04, v18.6.1 + +feature: +- 9eafa189 cloudcmd: http-auth v4.2.1 +- e99d0847 cloudcmd: montag v1.2.1 +- b77e9c91 cloudcmd: pipe-io v4.0.1 +- 4b476a6d cloudcmd: globals v16.3.0 +- 2057065d cloudcmd: @putout/eslint-flat v3.0.1 + 2025.07.02, v18.6.0 feature: diff --git a/HELP.md b/HELP.md index fe68d6c2..7116cc2b 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.6.0 +# Cloud Commander v18.6.1 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1098,6 +1098,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2025.07.04*, **[v18.6.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.6.1)** - *2025.07.02*, **[v18.6.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.6.0)** - *2025.04.10*, **[v18.5.2](//github.com/coderaiser/cloudcmd/releases/tag/v18.5.2)** - *2025.02.03*, **[v18.5.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.5.1)** diff --git a/README.md b/README.md index 8ef53740..7c46ac5c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.6.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v18.6.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 631104b7..737665b7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "18.6.0", + "version": "18.6.1", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From ddc94adbf135de8988513a4dd327ad53971f6ffb Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 4 Jul 2025 14:23:05 +0300 Subject: [PATCH 226/415] feature: cloudcmd: eslint-plugin-putout v28.0.0 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 737665b7..1d69fc33 100644 --- a/package.json +++ b/package.json @@ -151,8 +151,8 @@ "yargs-parser": "^22.0.0" }, "devDependencies": { - "@babel/core": "^7.22.5", "@babel/code-frame": "^7.22.5", + "@babel/core": "^7.22.5", "@babel/preset-env": "^7.0.0", "@cloudcmd/clipboard": "^2.0.0", "@cloudcmd/create-element": "^2.0.0", @@ -176,7 +176,7 @@ "emitify": "^4.0.1", "eslint": "^9.23.0", "eslint-plugin-n": "^17.0.0-4", - "eslint-plugin-putout": "^27.2.1", + "eslint-plugin-putout": "^28.0.0", "extract-text-webpack-plugin": "^4.0.0-alpha.0", "globals": "^16.3.0", "gritty": "^8.0.0", From c93803190bd3afe38991a424b5399d81847da74f Mon Sep 17 00:00:00 2001 From: coderiaser Date: Thu, 3 Jul 2025 23:05:16 +0300 Subject: [PATCH 227/415] feature: webpack 5 --- .madrun.mjs | 2 + .webpack/cp.mjs | 17 ++++++++ .webpack/css.js | 74 +++++++++------------------------- .webpack/js.js | 59 +++++++++++++++++++++++---- client/client.js | 7 ---- client/cloudcmd.js | 2 +- client/css.js | 8 ---- client/modules/config/index.js | 4 +- css/main.css | 2 +- html/index.html | 2 +- package.json | 4 +- server/columns.mjs | 2 +- server/theme.mjs | 6 ++- 13 files changed, 99 insertions(+), 90 deletions(-) create mode 100644 .webpack/cp.mjs delete mode 100644 client/css.js diff --git a/.madrun.mjs b/.madrun.mjs index 0cc7a5ec..391eb946 100644 --- a/.madrun.mjs +++ b/.madrun.mjs @@ -16,6 +16,7 @@ const is20 = process.version.startsWith('v2'); // https://stackoverflow.com/a/69746937/4536327 const buildEnv = (is17 || is20) && { NODE_OPTIONS: '--openssl-legacy-provider', + NODE_ENV: 'production', }; export default { @@ -56,6 +57,7 @@ export default { 'watch:test:server': async () => `nodemon -w client -w test/client -x ${await run('test:server')}`, 'watch:coverage': async () => [testEnv, `nodemon -w server -w test -w common -x ${await cutEnv('coverage')}`], 'build': async () => run('6to5:*'), + 'postbuild': () => 'node .webpack/cp.mjs', 'build:dev': async () => run('build:client:dev'), 'build:client': () => run('6to5:client'), 'build:client:dev': () => run('6to5:client:dev'), diff --git a/.webpack/cp.mjs b/.webpack/cp.mjs new file mode 100644 index 00000000..1dacb044 --- /dev/null +++ b/.webpack/cp.mjs @@ -0,0 +1,17 @@ +import {cpSync} from 'node:fs'; + +cpSync('./css/columns', './dist-dev/columns', { + recursive: true, +}); + +cpSync('./css/themes', './dist-dev/themes', { + recursive: true, +}); + +cpSync('./css/columns', './dist/columns', { + recursive: true, +}); + +cpSync('./css/themes', './dist/themes', { + recursive: true, +}); diff --git a/.webpack/css.js b/.webpack/css.js index e1d6552d..7b4486e1 100644 --- a/.webpack/css.js +++ b/.webpack/css.js @@ -1,77 +1,39 @@ 'use strict'; -const {env} = require('node:process'); -const fs = require('node:fs'); -const { - basename, - extname, - join, -} = require('node:path'); +const {env} = require('node:process') -const ExtractTextPlugin = require('extract-text-webpack-plugin'); const OptimizeCssAssetsPlugin = require('optimize-css-assets-webpack-plugin'); +const MiniCssExtractPlugin = require("mini-css-extract-plugin"); const isDev = env.NODE_ENV === 'development'; -const extractCSS = (a) => new ExtractTextPlugin(`${a}.css`); -const extractMain = extractCSS('[name]'); - -const cssNames = [ - 'nojs', - 'view', - 'config', - 'terminal', - 'user-menu', - ...getCSSList('columns'), - ...getCSSList('themes'), -]; - -const cssPlugins = cssNames.map(extractCSS); const clean = (a) => a.filter(Boolean); const plugins = clean([ - ...cssPlugins, - extractMain, + new MiniCssExtractPlugin({ + filename: '[name].css', + }), !isDev && new OptimizeCssAssetsPlugin(), ]); const rules = [{ - test: /\.css$/, - exclude: /css\/(nojs|view|config|terminal|user-menu|columns.*|themes.*)\.css/, - use: extractMain.extract(['css-loader']), -}, ...cssPlugins.map(extract), { - test: /\.(png|gif|svg|woff|woff2|eot|ttf)$/, - use: { - loader: 'url-loader', + test: /\.css$/i, + use: [MiniCssExtractPlugin.loader, { + loader: "css-loader", options: { - limit: 100_000, + url: true, }, - }, -}]; + }], + }, { + test: /\.(png|gif|svg|woff|woff2|eot|ttf)$/, + type: 'asset/inline', +}] + module.exports = { plugins, - module: { - rules, - }, + module: { + rules, + }, }; -function getCSSList(dir) { - const base = (a) => basename(a, extname(a)); - const addDir = (name) => `${dir}/${name}`; - const rootDir = join(__dirname, '..'); - - return fs - .readdirSync(`${rootDir}/css/${dir}`) - .map(base) - .map(addDir); -} - -function extract(extractPlugin) { - const {filename} = extractPlugin; - - return { - test: RegExp(`css/${filename}`), - use: extractPlugin.extract(['css-loader']), - }; -} diff --git a/.webpack/js.js b/.webpack/js.js index d41f9941..1efe48b1 100644 --- a/.webpack/js.js +++ b/.webpack/js.js @@ -7,13 +7,17 @@ const { } = require('node:path'); const {env} = require('node:process'); -const {EnvironmentPlugin} = require('webpack'); +const { + EnvironmentPlugin, + NormalModuleReplacementPlugin, +} = require('webpack'); const WebpackBar = require('webpackbar'); -const ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin'); - const modules = './modules'; const dirModules = './client/modules'; +const dirCss = './css'; +const dirThemes = `${dirCss}/themes`; +const dirColumns = `${dirCss}/columns`; const dir = './client'; const {NODE_ENV} = env; const isDev = NODE_ENV === 'development'; @@ -46,19 +50,43 @@ const rules = clean([ ]); const plugins = [ + new NormalModuleReplacementPlugin(/^node:/, (resource) => { + resource.request = resource.request.replace(/^node:/, ''); + }), new EnvironmentPlugin({ NODE_ENV, }), - new ServiceWorkerWebpackPlugin({ - entry: join(__dirname, '..', 'client', 'sw', 'sw.js'), - excludes: ['*'], - }), new WebpackBar(), ]; const splitChunks = { - name: 'cloudcmd.common', chunks: 'all', + cacheGroups: { + abcCommon: { + name: 'cloudcmd.common', + chunks: (chunk) => { + const lazyChunks = [ + 'nojs', + 'view', + 'edit', + 'terminal', + 'config', + 'user-menu', + 'help', + 'themes/dark', + 'themes/light', + 'columns/name-size', + 'columns/name-size-date', + ]; + + return !lazyChunks.includes(chunk.name); + }, + minChunks: 1, + enforce: true, + priority: -1, + reuseExistingChunk: true, + }, + }, }; module.exports = { @@ -68,12 +96,27 @@ module.exports = { 'node:process': 'process', 'node:path': 'path', }, + fallback: { + 'path': require.resolve('path-browserify'), + 'process': require.resolve('process/browser'), + }, }, devtool, optimization: { splitChunks, }, entry: { + 'themes/dark': `${dirThemes}/dark.css`, + 'themes/light': `${dirThemes}/light.css`, + 'columns/name-size': `${dirColumns}/name-size.css`, + 'columns/name-size-date': `${dirColumns}/name-size-date.css`, + 'nojs': `${dirCss}/nojs.css`, + help: `${dirCss}/help.css`, + view: `${dirCss}/view.css`, + config: `${dirCss}/config.css`, + terminal: `${dirCss}/terminal.css`, + 'user-menu': `${dirCss}/user-menu.css`, + sw: `${dir}/sw/sw.js`, cloudcmd: `${dir}/cloudcmd.js`, [`${modules}/edit`]: `${dirModules}/edit.js`, [`${modules}/edit-file`]: `${dirModules}/edit-file.js`, diff --git a/client/client.js b/client/client.js index 4d53c634..ee164763 100644 --- a/client/client.js +++ b/client/client.js @@ -138,17 +138,10 @@ function CloudCmdProto(DOM) { await initModules(); await baseInit(); - await loadStyle(); CloudCmd.route(location.hash); }; - async function loadStyle() { - const {prefix} = CloudCmd; - const name = `${prefix}/dist/cloudcmd.common.css`; - - await load.css(name); - } this.route = (path) => { const query = path.split('/'); diff --git a/client/cloudcmd.js b/client/cloudcmd.js index 47019e55..9703c6b6 100644 --- a/client/cloudcmd.js +++ b/client/cloudcmd.js @@ -1,7 +1,7 @@ 'use strict'; const process = require('node:process'); -require('./css'); +require('../css/main.css'); const wraptile = require('wraptile'); const load = require('load.js'); diff --git a/client/css.js b/client/css.js deleted file mode 100644 index e404bf94..00000000 --- a/client/css.js +++ /dev/null @@ -1,8 +0,0 @@ -'use strict'; - -require('../css/main.css'); -require('../css/nojs.css'); -require('../css/columns/name-size-date.css'); -require('../css/columns/name-size.css'); -require('../css/themes/light.css'); -require('../css/themes/dark.css'); diff --git a/client/modules/config/index.js b/client/modules/config/index.js index 0ec5b100..f8f3e4f3 100644 --- a/client/modules/config/index.js +++ b/client/modules/config/index.js @@ -52,12 +52,12 @@ module.exports.init = async () => { showLoad(); - const {prefix} = CloudCmd; + const {DIR_DIST} = CloudCmd; [Template] = await Promise.all([ Files.get('config-tmpl'), loadSocket(), - loadCSS(`${prefix}/dist/config.css`), + loadCSS(`${DIR_DIST}/config.css`), CloudCmd.View(), ]); diff --git a/css/main.css b/css/main.css index b30c0ed3..6b901a8e 100644 --- a/css/main.css +++ b/css/main.css @@ -1,5 +1,5 @@ -@import url(./urls.css); @import url(./reset.css); +@import url(./urls.css); @import url(./style.css); @import url(./icons.css); @import url(./help.css); diff --git a/html/index.html b/html/index.html index 0c374b9c..4c4f3ebf 100644 --- a/html/index.html +++ b/html/index.html @@ -8,7 +8,7 @@ - +
  • +
  • + +
  • From c963ffefeec0d87635d5f20d147530b02bea7c37 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Sun, 14 Sep 2025 22:10:54 +0300 Subject: [PATCH 303/415] chore: cloudcmd: v19.0.1 --- ChangeLog | 8 ++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1ceaa937..11c4b5b9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2025.09.14, v19.0.1 + +fix: +- fc6304a1 tmpl: config: aleman, supermenu + +feature: +- a05ecdb4 cloudcmd: aleman v1.10.0 + 2025.09.14, v19.0.0 feature: diff --git a/HELP.md b/HELP.md index 3ea1adcc..4ab8fc6d 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v19.0.0 +# Cloud Commander v19.0.1 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1111,6 +1111,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2025.09.14*, **[v19.0.1](//github.com/coderaiser/cloudcmd/releases/tag/v19.0.1)** - *2025.09.14*, **[v19.0.0](//github.com/coderaiser/cloudcmd/releases/tag/v19.0.0)** - *2025.09.14*, **[v18.8.11](//github.com/coderaiser/cloudcmd/releases/tag/v18.8.11)** - *2025.09.14*, **[v18.8.10](//github.com/coderaiser/cloudcmd/releases/tag/v18.8.10)** diff --git a/README.md b/README.md index 406eec50..bf5cfd4b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v19.0.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v19.0.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index 87e7aae4..835266f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "19.0.0", + "version": "19.0.1", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 511347d3ef9803e05ef422b503af0fb0ac35fe6a Mon Sep 17 00:00:00 2001 From: coderiaser Date: Sun, 14 Sep 2025 22:22:04 +0300 Subject: [PATCH 304/415] feature: cloudcmd: aleman v1.11.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 835266f5..b3d66bcb 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@cloudcmd/move-files": "^8.0.0", "@cloudcmd/read-files-sync": "^2.0.0", "@putout/cli-validate-args": "^2.0.0", - "aleman": "^1.10.0", + "aleman": "^1.11.0", "apart": "^2.0.0", "chalk": "^5.3.0", "compression": "^1.7.4", From 1537fa73fc6d038aa6e24ac2017c91f331d7dbc9 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Sun, 14 Sep 2025 22:22:41 +0300 Subject: [PATCH 305/415] chore: cloudcmd: v19.0.2 --- ChangeLog | 5 +++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 11c4b5b9..f7d41318 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2025.09.14, v19.0.2 + +feature: +- 511347d3 cloudcmd: aleman v1.11.0 + 2025.09.14, v19.0.1 fix: diff --git a/HELP.md b/HELP.md index 4ab8fc6d..392387e6 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v19.0.1 +# Cloud Commander v19.0.2 ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] @@ -1111,6 +1111,7 @@ There are a lot of ways to be involved in `Cloud Commander` development: ## Version history +- *2025.09.14*, **[v19.0.2](//github.com/coderaiser/cloudcmd/releases/tag/v19.0.2)** - *2025.09.14*, **[v19.0.1](//github.com/coderaiser/cloudcmd/releases/tag/v19.0.1)** - *2025.09.14*, **[v19.0.0](//github.com/coderaiser/cloudcmd/releases/tag/v19.0.0)** - *2025.09.14*, **[v18.8.11](//github.com/coderaiser/cloudcmd/releases/tag/v18.8.11)** diff --git a/README.md b/README.md index bf5cfd4b..4873d9c3 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v19.0.1 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v19.0.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] ### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL] diff --git a/package.json b/package.json index b3d66bcb..0e15731c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "19.0.1", + "version": "19.0.2", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From c5aed16f630d48cac71517802da7e89842b2ba35 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 15 Sep 2025 17:48:40 +0300 Subject: [PATCH 306/415] feature: cloudcmd: aleman v1.12.2 --- html/index.html | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/html/index.html b/html/index.html index b2a735cb..439d4634 100644 --- a/html/index.html +++ b/html/index.html @@ -45,7 +45,7 @@