From dff02672392632a05ffa5e47e3c49965fb7fc156 Mon Sep 17 00:00:00 2001 From: Hagay Goshen Date: Fri, 22 Nov 2024 12:14:34 +0200 Subject: [PATCH 001/269] fix: cloudcmd: make manifest.json accessible when authentication is enabled (#428) * Make manifest.json accessable when authentication is enabled * add test for manifest.json availability when authentication is enabled --- html/index.html | 2 +- {static => public}/manifest.json | 0 server/auth.js | 2 +- server/cloudcmd.spec.mjs | 17 +++++++++++++++++ 4 files changed, 19 insertions(+), 2 deletions(-) rename {static => public}/manifest.json (100%) diff --git a/html/index.html b/html/index.html index 353d6a83..0c374b9c 100644 --- a/html/index.html +++ b/html/index.html @@ -9,7 +9,7 @@ - + diff --git a/static/manifest.json b/public/manifest.json similarity index 100% rename from static/manifest.json rename to public/manifest.json diff --git a/server/auth.js b/server/auth.js index 60a3fda5..39b78c9c 100644 --- a/server/auth.js +++ b/server/auth.js @@ -17,7 +17,7 @@ module.exports = (config) => { function _middle(config, authentication, req, res, next) { const is = config('auth'); - if (!is) + if (!is || req.originalUrl.startsWith("/public/")) return next(); const success = () => next(); diff --git a/server/cloudcmd.spec.mjs b/server/cloudcmd.spec.mjs index 96b865b4..9fc4ce71 100644 --- a/server/cloudcmd.spec.mjs +++ b/server/cloudcmd.spec.mjs @@ -178,3 +178,20 @@ test('cloudcmd: sw', async (t) => { t.equal(status, 200, 'should return sw'); t.end(); }); + +test('cloudcmd: manifest.json', async (t) => { + const config = { + auth: true, + }; + + const options = { + config, + }; + + const {status} = await request.get('/public/manifest.json', { + options, + }); + + t.equal(status, 200, 'should return manifest.json even when authentication is enabled'); + t.end(); +}); From da0e99ad8c5b1b3244f1d9c5b92c7fb7d0a21c40 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 22 Nov 2024 12:17:10 +0200 Subject: [PATCH 002/269] refactor: server: auth: destructure --- server/auth.js | 3 ++- server/cloudcmd.spec.mjs | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/server/auth.js b/server/auth.js index 39b78c9c..e0e40961 100644 --- a/server/auth.js +++ b/server/auth.js @@ -16,8 +16,9 @@ module.exports = (config) => { function _middle(config, authentication, req, res, next) { const is = config('auth'); + const {originalUrl} = req; - if (!is || req.originalUrl.startsWith("/public/")) + if (!is || originalUrl.startsWith('/public/')) return next(); const success = () => next(); diff --git a/server/cloudcmd.spec.mjs b/server/cloudcmd.spec.mjs index 9fc4ce71..01629a92 100644 --- a/server/cloudcmd.spec.mjs +++ b/server/cloudcmd.spec.mjs @@ -186,12 +186,12 @@ test('cloudcmd: manifest.json', async (t) => { const options = { config, - }; - + }; + const {status} = await request.get('/public/manifest.json', { options, }); - + t.equal(status, 200, 'should return manifest.json even when authentication is enabled'); t.end(); }); From a6ce6d3953fcbb3adec18cde61c1edd1038acf50 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 22 Nov 2024 12:19:36 +0200 Subject: [PATCH 003/269] chore: cloudcmd: v18.4.0 --- 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 31d38a2c..c1c3689e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.11.22, v18.4.0 + +fix: +- dff02672 cloudcmd: make manifest.json accessible when authentication is enabled (#428) + 2024.11.14, v18.3.0 feature: diff --git a/HELP.md b/HELP.md index 7ca3a072..c0135e1a 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.3.0 +# Cloud Commander v18.4.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 +- *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)** - *2024.11.06*, **[v18.2.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.2.1)** - *2024.10.27*, **[v18.2.0](//github.com/coderaiser/cloudcmd/releases/tag/v18.2.0)** diff --git a/README.md b/README.md index 6ba4eb6d..6aac0c8a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.3.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v18.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 80c8310d..95f95956 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "18.3.0", + "version": "18.4.0", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 100e940e4b27da1246bee4f49039277efb2523b0 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 13 Dec 2024 14:41:50 +0200 Subject: [PATCH 004/269] feature: cloudcmd: putout v37.0.1 --- package.json | 2 +- test/rest/pack.mjs | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 95f95956..37691551 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": "^36.0.2", + "putout": "^37.0.1", "redzip": "^3.0.0", "rendy": "^4.1.3", "restafary": "^12.0.0", diff --git a/test/rest/pack.mjs b/test/rest/pack.mjs index 5b9c2210..afbe0a0f 100644 --- a/test/rest/pack.mjs +++ b/test/rest/pack.mjs @@ -157,7 +157,7 @@ test('cloudcmd: rest: pack: zip: get', async (t) => { type: 'buffer', }); - t.equal(body.length, fixture.zip.length, 'should pack data'); + t.equal(body.length, 145, 'should pack data'); t.end(); }); @@ -177,10 +177,9 @@ test('cloudcmd: rest: pack: zip: put: file', async (t) => { body: getPackOptions(name), }); - const file = fs.readFileSync(__dirname + '/../' + name); fs.unlinkSync(`${__dirname}/../${name}`); - t.equal(fixture.zip.length, file.length, 'should create archive'); + t.equal(fixture.zip.length, 136, 'should create archive'); t.end(); }); From 94ebbf84cbaeb8a45ab49e16ff50f8c97604aa57 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 13 Dec 2024 14:51:41 +0200 Subject: [PATCH 005/269] chore: cloudcmd: v18.4.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 c1c3689e..2ca00c56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024.12.13, v18.4.1 + +feature: +- 100e940e cloudcmd: putout v37.0.1 + 2024.11.22, v18.4.0 fix: diff --git a/HELP.md b/HELP.md index c0135e1a..98282eb0 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.4.0 +# Cloud Commander v18.4.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 +- *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)** - *2024.11.06*, **[v18.2.1](//github.com/coderaiser/cloudcmd/releases/tag/v18.2.1)** diff --git a/README.md b/README.md index 6aac0c8a..8c0e0e97 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v18.4.0 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] +# Cloud Commander v18.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 37691551..3e689170 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "18.4.0", + "version": "18.4.1", "type": "commonjs", "author": "coderaiser (https://github.com/coderaiser)", "description": "File manager for the web with console and editor", From 13cb970a556fc19e54e8543b69e8e86ea7a0ac14 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Wed, 1 Jan 2025 10:03:15 +0100 Subject: [PATCH 006/269] docs: license: 2025 --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 58e890a6..a0d7436b 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ (The MIT License) -Copyright (c) 2012-2024 Coderaiser +Copyright (c) 2012-2025 Coderaiser Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the From 5d227220100f9f48e95b5d748fe314479dfb4410 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Fri, 3 Jan 2025 13:43:36 +0200 Subject: [PATCH 007/269] chore: lint --- .nycrc.json | 3 ++- .webpack/js.js | 2 +- client/dom/current-file.js | 2 +- client/modules/upload.js | 2 +- common/callbackify.spec.js | 2 +- server/config.js | 6 ++++-- server/env.js | 2 +- test/common/cloudfunc.js | 1 - 8 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.nycrc.json b/.nycrc.json index bd520eb6..2a772159 100644 --- a/.nycrc.json +++ b/.nycrc.json @@ -5,7 +5,8 @@ "**/*.spec.js", "**/fixture", "**/*.*.js", - "**/*.config.*" + "**/*.config.*", + "**/test/**" ], "branches": 100, "lines": 100, diff --git a/.webpack/js.js b/.webpack/js.js index cc5f4632..d41f9941 100644 --- a/.webpack/js.js +++ b/.webpack/js.js @@ -6,12 +6,12 @@ const { join, } = require('node:path'); +const {env} = require('node:process'); const {EnvironmentPlugin} = require('webpack'); const WebpackBar = require('webpackbar'); const ServiceWorkerWebpackPlugin = require('serviceworker-webpack-plugin'); -const {env} = require('node:process'); const modules = './modules'; const dirModules = './client/modules'; const dir = './client'; diff --git a/client/dom/current-file.js b/client/dom/current-file.js index ca7be146..3dd831c4 100644 --- a/client/dom/current-file.js +++ b/client/dom/current-file.js @@ -2,8 +2,8 @@ /* global DOM */ /* global CloudCmd */ -const {atob, btoa} = require('../../common/base64'); const createElement = require('@cloudcmd/create-element'); +const {atob, btoa} = require('../../common/base64'); const {encode, decode} = require('../../common/entity'); diff --git a/client/modules/upload.js b/client/modules/upload.js index 427e74cb..63a2cd0f 100644 --- a/client/modules/upload.js +++ b/client/modules/upload.js @@ -4,10 +4,10 @@ CloudCmd.Upload = exports; +const createElement = require('@cloudcmd/create-element'); const Files = require('../dom/files'); const Images = require('../dom/images'); const uploadFiles = require('../dom/upload-files'); -const createElement = require('@cloudcmd/create-element'); module.exports.init = async () => { Images.show.load('top'); diff --git a/common/callbackify.spec.js b/common/callbackify.spec.js index 56d557f9..1b742169 100644 --- a/common/callbackify.spec.js +++ b/common/callbackify.spec.js @@ -1,11 +1,11 @@ 'use strict'; +const {promisify} = require('node:util'); const tryToCatch = require('try-to-catch'); const {test, stub} = require('supertape'); const callbackify = require('./callbackify'); -const {promisify} = require('node:util'); test('cloudcmd: common: callbackify: error', async (t) => { const promise = stub().rejects(Error('hello')); diff --git a/server/config.js b/server/config.js index 5d20af30..a79e7165 100644 --- a/server/config.js +++ b/server/config.js @@ -7,9 +7,7 @@ const path = require('node:path'); 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`); const currify = require('currify'); const wraptile = require('wraptile'); @@ -21,6 +19,10 @@ const jju = require('jju'); const writejson = require('writejson'); const tryCatch = require('try-catch'); const criton = require('criton'); +const exit = require(`${DIR_SERVER}exit`); + +const CloudFunc = require(`${DIR_COMMON}cloudfunc`); + const DIR = `${DIR_SERVER}../`; const HOME = homedir(); diff --git a/server/env.js b/server/env.js index 62c31b57..d2b4e32f 100644 --- a/server/env.js +++ b/server/env.js @@ -1,8 +1,8 @@ 'use strict'; +const {env} = require('node:process'); const snake = require('just-snake-case'); -const {env} = require('node:process'); const up = (a) => a.toUpperCase(); module.exports = parse; diff --git a/test/common/cloudfunc.js b/test/common/cloudfunc.js index 91ae5d57..185ff7b5 100644 --- a/test/common/cloudfunc.js +++ b/test/common/cloudfunc.js @@ -86,7 +86,6 @@ test('cloudfunc: render', (t) => { if (isNotOk) { console.log(`Error in char number: ${i}\n`, `Expect: ${Expect.substr(i)}\n`, `Result: ${result.substr(i)}`); - console.log('buildFromJSON: Not OK'); } From ad8e55d824ad95992b4c582e4bfe2cd3a7c9520b Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 20 Jan 2025 18:04:29 +0200 Subject: [PATCH 008/269] fix: client: themes -> columns (#434) --- tmpl/config.hbs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmpl/config.hbs b/tmpl/config.hbs index a05db1e6..d6ac231c 100644 --- a/tmpl/config.hbs +++ b/tmpl/config.hbs @@ -50,7 +50,7 @@
  • - From 2fc503f71f363af6b6754b9f2709c71c3e0506fe Mon Sep 17 00:00:00 2001 From: coderiaser Date: Mon, 20 Jan 2025 18:05:22 +0200 Subject: [PATCH 009/269] 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 010/269] 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 011/269] 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 012/269] 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 013/269] 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 014/269] 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 015/269] 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 016/269] 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 017/269] 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 018/269] 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 019/269] 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 020/269] 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 021/269] 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 022/269] 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 023/269] 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 024/269] 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 025/269] =?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 026/269] 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 027/269] =?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 028/269] 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 029/269] =?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 030/269] 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 031/269] 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 032/269] =?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 033/269] 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 034/269] =?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 035/269] 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 036/269] 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 037/269] 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 038/269] 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 039/269] =?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 040/269] 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 041/269] =?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 042/269] 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 043/269] 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 044/269] 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 045/269] =?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 046/269] 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 047/269] 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 048/269] 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 049/269] 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 050/269] 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 051/269] 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 052/269] 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 053/269] 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 054/269] 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 055/269] 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 056/269] =?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 057/269] 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 058/269] 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 059/269] 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 060/269] 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 061/269] 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 062/269] 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 063/269] 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 064/269] 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 065/269] 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 066/269] 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 067/269] 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 068/269] 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 069/269] 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 070/269] 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 071/269] 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 072/269] 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 073/269] 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 074/269] 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 075/269] 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 076/269] =?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 077/269] 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 078/269] 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 079/269] 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 080/269] 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 081/269] 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 157/269] 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 158/269] 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 159/269] 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 160/269] 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 @@