From 0e8e1edb8e6ecc164b744ec5a6f4c0ed3d855901 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 25 Aug 2018 13:48:33 +0300 Subject: [PATCH 0001/2016] docs(readme) add " " --- HELP.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/HELP.md b/HELP.md index 5da0a592..57c1815f 100644 --- a/HELP.md +++ b/HELP.md @@ -397,9 +397,9 @@ Here is description of options: "exportToken" : "root", /* token used by export server */ "import" : false, /* enable import of config */ "import-url" : "http://localhost:8000", /* url of an export server */ - "importToken" : "root", /* token used to connect to export server */ - "importListen" : false, /* listen on config updates from import server */ - "log" : true /* logging */ + "importToken" : "root", /* token used to connect to export server */ + "importListen" : false, /* listen on config updates */ + "log" : true /* logging */ } ``` From b1c4d5bad0045d03d1193079bc7b1326afaa7a54 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 25 Aug 2018 13:49:48 +0300 Subject: [PATCH 0002/2016] docs(help) add "--" --- HELP.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/HELP.md b/HELP.md index 57c1815f..7907b34d 100644 --- a/HELP.md +++ b/HELP.md @@ -436,7 +436,7 @@ Some config options can be overridden with `environment variables` such: Being able to configure `Cloud Commander` remotely opens the doors to using it as microservice and that's what distribute options set out to do. There is an `export server` and `import client` and they enabled with `--export` and `--import` accordingly. There is a `token` it should be the same -in `--import-token` and `export-token`. To use report you should provide `--import-url` to `import client` so it can connect to an `export server`. +in `--import-token` and `--export-token`. To use report you should provide `--import-url` to `import client` so it can connect to an `export server`. There is 2 ways `import client` can receive config from an `export server`: - full config at startup (default) From a0a85df55997d2cf7df8c2472acb55fc4bb00cec Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 7 Sep 2018 20:17:00 +0300 Subject: [PATCH 0003/2016] feature(package) babel-eslint v9.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8e27ef6a..b6320f6e 100644 --- a/package.json +++ b/package.json @@ -166,7 +166,7 @@ "@babel/plugin-transform-object-assign": "^7.0.0-beta.49", "@babel/preset-env": "^7.0.0-beta.49", "@cloudcmd/clipboard": "^1.0.2", - "babel-eslint": "^8.2.3", + "babel-eslint": "^9.0.0", "babel-loader": "^8.0.0-beta", "babel-plugin-macros": "^2.2.1", "clean-css-loader": "^1.0.1", From ed7255ea0e6632f9fa49e824a760847052e5ec89 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 7 Sep 2018 20:17:10 +0300 Subject: [PATCH 0004/2016] feature(package) nyc v13.0.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b6320f6e..d141ca6c 100644 --- a/package.json +++ b/package.json @@ -194,7 +194,7 @@ "mock-require": "^3.0.1", "morgan": "^1.6.1", "nodemon": "^1.9.1", - "nyc": "^12.0.1", + "nyc": "^13.0.1", "optimize-css-assets-webpack-plugin": "^5.0.0", "philip": "^2.0.0", "place": "^1.1.4", From 4981220d839ddd086922b9b3197ae5d88af1713c Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 7 Sep 2018 20:18:03 +0300 Subject: [PATCH 0005/2016] feature(package) style-loader v0.23.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index d141ca6c..0c522580 100644 --- a/package.json +++ b/package.json @@ -207,7 +207,7 @@ "sinon": "^6.0.4", "sinon-called-with-diff": "^2.0.0", "smalltalk": "^3.1.0", - "style-loader": "^0.22.0", + "style-loader": "^0.23.0", "stylelint": "^9.0.0", "stylelint-config-standard": "^18.0.0", "supermenu": "^2.0.0", From aaecb99d36e28e14771c92d5829cda34d6cf0374 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 7 Sep 2018 20:19:23 +0300 Subject: [PATCH 0006/2016] feature(package) table v5.0.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 0c522580..0e1a217d 100644 --- a/package.json +++ b/package.json @@ -153,7 +153,7 @@ "socket.io": "^2.0.3", "socket.io-client": "^2.1.1", "squad": "^2.0.0", - "table": "^4.0.1", + "table": "^5.0.2", "try-catch": "^2.0.0", "tryrequire": "^2.0.1", "wraptile": "^2.0.0", From 03977fb928300006612b394f328ff089a1c02ff2 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 7 Sep 2018 20:21:24 +0300 Subject: [PATCH 0007/2016] feature(package) babel v7.0.0 --- package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0e1a217d..1757e677 100644 --- a/package.json +++ b/package.json @@ -160,11 +160,11 @@ "writejson": "^2.0.0" }, "devDependencies": { - "@babel/core": "^7.0.0-beta.49", - "@babel/plugin-proposal-object-rest-spread": "^7.0.0-beta.49", - "@babel/plugin-syntax-dynamic-import": "^7.0.0-beta.51", - "@babel/plugin-transform-object-assign": "^7.0.0-beta.49", - "@babel/preset-env": "^7.0.0-beta.49", + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-object-rest-spread": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-transform-object-assign": "^7.0.0", + "@babel/preset-env": "^7.0.0", "@cloudcmd/clipboard": "^1.0.2", "babel-eslint": "^9.0.0", "babel-loader": "^8.0.0-beta", From 6cbdddcd618e1ee092f33ffdbc8642137155869d Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 7 Sep 2018 20:21:56 +0300 Subject: [PATCH 0008/2016] feature(package) babel-loader v8.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1757e677..4cec1215 100644 --- a/package.json +++ b/package.json @@ -167,7 +167,7 @@ "@babel/preset-env": "^7.0.0", "@cloudcmd/clipboard": "^1.0.2", "babel-eslint": "^9.0.0", - "babel-loader": "^8.0.0-beta", + "babel-loader": "^8.0.0", "babel-plugin-macros": "^2.2.1", "clean-css-loader": "^1.0.1", "clear-module": "^3.0.0", From 6e9acd781fabeec7e0c4e5d1c8633b2dea421278 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 7 Sep 2018 21:16:37 +0300 Subject: [PATCH 0009/2016] fix(sw) http auth --- client/sw/sw.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/client/sw/sw.js b/client/sw/sw.js index 28aa59de..a29a8001 100644 --- a/client/sw/sw.js +++ b/client/sw/sw.js @@ -57,9 +57,10 @@ async function onInstall() { } async function onFetch(event) { - const url = event.request.url; + const {request} = event; + const {url} = request; const pathname = getPathName(url); - const request = getRequest(pathname, event.request); + const newRequest = getRequest(pathname, event.request); const cache = await caches.open(NAME); const response = await cache.match(request); @@ -67,7 +68,7 @@ async function onFetch(event) { if (!isDev && response) return response; - const [e, resp] = await tryToCatch(fetch, request.clone(), { + const [e, resp] = await tryToCatch(fetch, newRequest, { credentials: 'same-origin' }); From ef0a14ba632081ef1881ad3940a4de5feabacae6 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 7 Sep 2018 23:09:54 +0300 Subject: [PATCH 0010/2016] chore(webpack) js: add support of spread in sw --- .webpack/js.js | 1 + 1 file changed, 1 insertion(+) diff --git a/.webpack/js.js b/.webpack/js.js index f9ce31b4..424fed9a 100644 --- a/.webpack/js.js +++ b/.webpack/js.js @@ -33,6 +33,7 @@ const babelDev = { babelrc: false, plugins: [ 'module:babel-plugin-macros', + '@babel/plugin-proposal-object-rest-spread', ] }; From 58986eb52eb8444dd81bdd2327774f44815a05be Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 7 Sep 2018 23:57:40 +0300 Subject: [PATCH 0011/2016] fix(sw) no auth dialog when serve by service worker --- client/sw/sw.js | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/client/sw/sw.js b/client/sw/sw.js index a29a8001..462940b6 100644 --- a/client/sw/sw.js +++ b/client/sw/sw.js @@ -7,7 +7,14 @@ const currify = require('currify/legacy'); const isDev = process.env.NODE_ENV === 'development'; const wait = currify((f, e) => e.waitUntil(f())); -const respondWith = currify((f, e) => e.respondWith(f(e))); +const respondWith = currify((f, e) => { + const {url} = e.requestl; + + if (/\/$/.test(url) || /\^\/fs/.test(url)) + return; + + e.respondWith(f(e)); +}); const getPathName = (url) => new URL(url).pathname; const date = codegen`module.exports = '"' + Date() + '"'`; @@ -73,7 +80,7 @@ async function onFetch(event) { }); if (e) - return console.error(e, response, pathname); + return new Response(e.message); if (!isGet(request) || !resp.ok || !isBasic(resp)) return resp; From 3778c80fd65ada75d15ffb1525382e81e4dc43b3 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Fri, 7 Sep 2018 20:57:49 +0300 Subject: [PATCH 0012/2016] test(config) before -> connect --- test/rest/config.js | 191 +++++++++++++++++++------------------------- 1 file changed, 81 insertions(+), 110 deletions(-) diff --git a/test/rest/config.js b/test/rest/config.js index 3d0c9d45..57a993b6 100644 --- a/test/rest/config.js +++ b/test/rest/config.js @@ -11,7 +11,7 @@ const readjson = require('readjson'); const writejson = require('writejson'); const manageConfig = require('../../server/config'); -const before = require('../before'); +const {connect} = require('../before'); const warp = (fn, ...a) => (...b) => fn(...b, ...a); @@ -27,134 +27,105 @@ const patch = promisify((url, json, fn) => { fn(null, request.patch({url, json})); }); -test('cloudcmd: rest: config: get', (t) => { - before((port, after) => { - get(`http://localhost:${port}/api/v1/config`) - .then(warp(_pullout, 'string')) - .then(JSON.parse) - .then((config) => { - t.notOk(config.auth, 'should config.auth to be false'); - t.end(); - after(); - }) - .catch((error) => { - console.log(error); - }); - }); +test('cloudcmd: rest: config: get', async (t) => { + const {port, done} = await connect(); + + const config = await get(`http://localhost:${port}/api/v1/config`) + .then(warp(_pullout, 'string')) + .then(JSON.parse) + .catch(console.error); + + await done(); + + t.notOk(config.auth, 'should config.auth to be false'); + t.end(); }); -test('cloudcmd: rest: config: patch', (t) => { +test('cloudcmd: rest: config: patch', async (t) => { const configDialog = true; + const config = { + configDialog, + }; - before({configDialog}, (port, after) => { - const json = { - auth: false, - }; - - patch(`http://localhost:${port}/api/v1/config`, json) - .then(warp(_pullout, 'string')) - .then((result) => { - t.equal(result, 'config: ok("auth")', 'should patch config'); - t.end(); - after(); - }) - .catch((error) => { - console.log(error); - }); - }); + const {port, done} = await connect({config}); + const json = { + auth: false, + }; + + const result = await patch(`http://localhost:${port}/api/v1/config`, json) + .then(warp(_pullout, 'string')) + .catch(console.error); + + await done(); + + t.equal(result, 'config: ok("auth")', 'should patch config'); + t.end(); }); -test('cloudcmd: rest: config: patch: no configDialog', (t) => { +test('cloudcmd: rest: config: patch: no configDialog', async (t) => { const config = { configDialog: false }; - before({config}, (port, after) => { - const json = { - ip: null - }; - - patch(`http://localhost:${port}/api/v1/config`, json) - .then(warp(_pullout, 'string')) - .then((result) => { - t.equal(result, 'Config is disabled', 'should return error'); - t.end(); - after(); - }) - .catch((error) => { - console.log(error); - }); - }); + const {port, done} = await connect({config}); + const json = { + ip: null + }; + + const result = await patch(`http://localhost:${port}/api/v1/config`, json) + .then(warp(_pullout, 'string')) + .catch(console.error); + + await done(); + + t.equal(result, 'Config is disabled', 'should return error'); + t.end(); }); -test('cloudcmd: rest: config: patch: no configDialog: statusCode', (t) => { +test('cloudcmd: rest: config: patch: no configDialog: statusCode', async (t) => { const config = { configDialog: false }; - before({config}, (port, after) => { - const json = { - ip: null - }; + const {port, done} = await connect({config}); + const json = { + ip: null, + }; + + const result = await patch(`http://localhost:${port}/api/v1/config`, json) + .catch((error) => { + console.log(error); + }); + + result.on('response', async (response) => { + manageConfig('configDialog', true); - patch(`http://localhost:${port}/api/v1/config`, json) - .then((result) => { - result.on('response', (response) => { - t.equal(response.statusCode, 404); - manageConfig('configDialog', true); - t.end(); - after(); - }); - }) - .catch((error) => { - console.log(error); - }); + await done(); + t.equal(response.statusCode, 404); + t.end(); }); }); -test('cloudcmd: rest: config: enabled by default', (t) => { - before({}, (port, after) => { - const json = { - auth: false, - }; - - patch(`http://localhost:${port}/api/v1/config`, json) - .then(warp(_pullout, 'string')) - .then((result) => { - t.equal(result, 'config: ok("auth")', 'should send message'); - t.end(); - after(); - }) - .catch((error) => { - console.log(error); - }); - }); -}); - -test('cloudcmd: rest: config: patch: save config', (t) => { - before({}, (port, after) => { - const json = { - editor: 'dword', - }; - - const originalConfig = readjson.sync.try(pathConfig); - - patch(`http://localhost:${port}/api/v1/config`, json) - .then(warp(_pullout, 'string')) - .then(() => { - const config = readjson.sync(pathConfig); - - t.equal(config.editor, 'dword', 'should change config file on patch'); - t.end(); - - if (originalConfig) - writejson.sync(pathConfig, originalConfig); - - after(); - }) - .catch((error) => { - console.log(error); - }); - }); +test('cloudcmd: rest: config: patch: save config', async (t) => { + const {port, done} = await connect(); + const json = { + editor: 'dword', + }; + + const originalConfig = readjson.sync.try(pathConfig); + + await patch(`http://localhost:${port}/api/v1/config`, json) + .then(warp(_pullout, 'string')) + .catch(console.error); + + const config = readjson.sync(pathConfig); + + await done(); + + t.equal(config.editor, 'dword', 'should change config file on patch'); + t.end(); + + if (originalConfig) + writejson.sync(pathConfig, originalConfig); }); From 98be918c0f7c289cdabb42f521f28480797c1629 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 8 Sep 2018 00:18:18 +0300 Subject: [PATCH 0013/2016] refactor(sw) move out url checks from fetch --- client/sw/sw.js | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/client/sw/sw.js b/client/sw/sw.js index 462940b6..0e2a0b16 100644 --- a/client/sw/sw.js +++ b/client/sw/sw.js @@ -8,13 +8,25 @@ const isDev = process.env.NODE_ENV === 'development'; const wait = currify((f, e) => e.waitUntil(f())); const respondWith = currify((f, e) => { - const {url} = e.requestl; + const {request} = e; + const {url} = request; + const pathname = getPathName(url); - if (/\/$/.test(url) || /\^\/fs/.test(url)) + if (/\/$/.test(url) || /\^\/fs/.test(pathname)) + return; + + if (!isGet(request)) + return; + + if (/^\/api/.test(pathname)) + return; + + if (/^socket.io/.test(pathname)) return; e.respondWith(f(e)); }); + const getPathName = (url) => new URL(url).pathname; const date = codegen`module.exports = '"' + Date() + '"'`; @@ -82,18 +94,6 @@ async function onFetch(event) { if (e) return new Response(e.message); - if (!isGet(request) || !resp.ok || !isBasic(resp)) - return resp; - - if (/\/$/.test(pathname)) - return resp; - - if (/^\/api/.test(pathname)) - return resp; - - if (/^socket.io/.test(pathname)) - return resp; - await addToCache(request, resp.clone()); return resp; From e337a34cd7d7f6b9ad2b3c7a509d8c007d459bb2 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 8 Sep 2018 20:53:14 +0300 Subject: [PATCH 0014/2016] chore(sw) rm unused isBasic --- client/sw/sw.js | 1 - 1 file changed, 1 deletion(-) diff --git a/client/sw/sw.js b/client/sw/sw.js index 0e2a0b16..12d7767a 100644 --- a/client/sw/sw.js +++ b/client/sw/sw.js @@ -33,7 +33,6 @@ const date = codegen`module.exports = '"' + Date() + '"'`; const NAME = `cloudcmd: ${date}`; const isGet = (a) => a.method === 'GET'; -const isBasic = (a) => a.type === 'basic'; const createRequest = (a) => new Request(a, { credentials: 'same-origin' From dd7e94cde81f6f8110ce6ebc33105e88d464d808 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 8 Sep 2018 20:49:52 +0300 Subject: [PATCH 0015/2016] fix(webpack) css: font resource ignores prefix setting (#185) --- .webpack/css.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.webpack/css.js b/.webpack/css.js index 49694282..398116b1 100644 --- a/.webpack/css.js +++ b/.webpack/css.js @@ -42,7 +42,7 @@ const rules = [{ }, ...cssPlugins.map(extract), { test: /\.(png|gif|svg|woff|woff2|eot|ttf)$/, - loader: 'url-loader?limit=50000', + loader: 'url-loader?limit=100000', }]; module.exports = { From adbfb95012646b7d2819596d5272a4c6623190fe Mon Sep 17 00:00:00 2001 From: coderaiser Date: Sat, 8 Sep 2018 21:35:48 +0300 Subject: [PATCH 0016/2016] chore(package) v10.5.3 --- ChangeLog | 16 ++++++++++++++++ HELP.md | 3 ++- README.md | 2 +- package.json | 2 +- 4 files changed, 20 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec910bf6..4ea7cc56 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2018.09.08, v10.5.3 + +fix: +- (webpack) css: font resource ignores prefix setting (#185) +- (sw) no auth dialog when serve by service worker +- (sw) http auth + +feature: +- (package) babel-loader v8.0.0 +- (package) babel v7.0.0 +- (package) table v5.0.2 +- (package) style-loader v0.23.0 +- (package) nyc v13.0.1 +- (package) babel-eslint v9.0.0 + + 2018.08.25, v10.5.2 fix: diff --git a/HELP.md b/HELP.md index 7907b34d..17edcf6b 100644 --- a/HELP.md +++ b/HELP.md @@ -1,4 +1,4 @@ -# Cloud Commander v10.5.2 +# Cloud Commander v10.5.3 ### [Main][MainURL] [Blog][BlogURL] Live(![Heroku][Heroku_LIVE_IMG] [Heroku][HerokuURL], ![Now][NOW_LIVE_IMG] [Now][NowURL]) @@ -774,6 +774,7 @@ There is a lot ways to be involved in `Cloud Commander` development: Version history --------------- +- *2018.09.08*, **[v10.5.3](//github.com/coderaiser/cloudcmd/releases/tag/v10.5.3)** - *2018.08.25*, **[v10.5.2](//github.com/coderaiser/cloudcmd/releases/tag/v10.5.2)** - *2018.08.25*, **[v10.5.1](//github.com/coderaiser/cloudcmd/releases/tag/v10.5.1)** - *2018.08.23*, **[v10.5.0](//github.com/coderaiser/cloudcmd/releases/tag/v10.5.0)** diff --git a/README.md b/README.md index 41b0c67e..69190cb0 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Cloud Commander v10.5.2 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Now status][BuildAppveyorIMGURL]][BuildAppveyorURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] [![OpenCollective](https://opencollective.com/cloudcmd/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/cloudcmd/sponsors/badge.svg)](#sponsors) +# Cloud Commander v10.5.3 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Now status][BuildAppveyorIMGURL]][BuildAppveyorURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL] [![OpenCollective](https://opencollective.com/cloudcmd/backers/badge.svg)](#backers) [![OpenCollective](https://opencollective.com/cloudcmd/sponsors/badge.svg)](#sponsors) ### [Main][MainURL] [Blog][BlogURL] Live([Heroku][HerokuURL], [Now][NowURL]) diff --git a/package.json b/package.json index 4cec1215..1f6a22e4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cloudcmd", - "version": "10.5.2", + "version": "10.5.3", "author": "coderaiser (https://github.com/coderaiser)", "description": "Orthodox web file manager with console and editor", "homepage": "http://cloudcmd.io", From c356bc76f400e4c20691245fa893a2b69c4f5ace Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 10 Sep 2018 11:00:04 +0300 Subject: [PATCH 0017/2016] fix(sw) navigation error --- client/sw/sw.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/client/sw/sw.js b/client/sw/sw.js index 12d7767a..de4c93d5 100644 --- a/client/sw/sw.js +++ b/client/sw/sw.js @@ -6,6 +6,9 @@ const currify = require('currify/legacy'); const isDev = process.env.NODE_ENV === 'development'; +const isGet = (a) => a.method === 'GET'; +const isBasic = (a) => a.type === 'basic'; + const wait = currify((f, e) => e.waitUntil(f())); const respondWith = currify((f, e) => { const {request} = e; @@ -18,6 +21,9 @@ const respondWith = currify((f, e) => { if (!isGet(request)) return; + if (!isBasic(request)) + return; + if (/^\/api/.test(pathname)) return; @@ -32,8 +38,6 @@ const getPathName = (url) => new URL(url).pathname; const date = codegen`module.exports = '"' + Date() + '"'`; const NAME = `cloudcmd: ${date}`; -const isGet = (a) => a.method === 'GET'; - const createRequest = (a) => new Request(a, { credentials: 'same-origin' }); From ce0938ea112db29702f95294bd3dd13064cf5bb2 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 10 Sep 2018 11:52:39 +0300 Subject: [PATCH 0018/2016] docs(readme) add --no-show-config --- HELP.md | 1 + json/help.json | 1 + man/cloudcmd.1 | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/HELP.md b/HELP.md index 17edcf6b..22dd0dee 100644 --- a/HELP.md +++ b/HELP.md @@ -101,6 +101,7 @@ Cloud Commander supports command line parameters: | `--import-url` | url of an import server | `--import-listen` | enable listen on config updates from import server | `--log` | enable logging +| `--no-show-config` | do not show config values | `--no-server` | do not start server | `--no-auth` | disable authorization | `--no-online` | load scripts from local server diff --git a/json/help.json b/json/help.json index dab34446..7bbb0121 100644 --- a/json/help.json +++ b/json/help.json @@ -35,6 +35,7 @@ "--import-token ": "authorization token used to connect to export server", "--import-listen ": "enable listen on config updates from import server", "--log ": "enable logging", + "--no-show-config ": "do not show config values", "--no-server ": "do not start server", "--no-auth ": "disable authorization", "--no-online ": "load scripts from local server", diff --git a/man/cloudcmd.1 b/man/cloudcmd.1 index f9e1ca22..667953f2 100644 --- a/man/cloudcmd.1 +++ b/man/cloudcmd.1 @@ -58,8 +58,9 @@ programs in browser from any computer, mobile or tablet device. --import-token authorization token used to connect to export server --import-listen enable listen on config updates from import server --log enable logging - --no-auth disable authorization + --no-show-config do not show config values --no-server do not start server + --no-auth disable authorization --no-online load scripts from local server --no-open do not open web browser when server started --no-name set default tab name in web browser From f04808c709ecb953518c8127124d05b197aacca9 Mon Sep 17 00:00:00 2001 From: coderaiser Date: Mon, 10 Sep 2018 11:58:01 +0300 Subject: [PATCH 0019/2016] feature(cloudcmd) add --show-file-name to add file name title in view and edit (#183) --- HELP.md | 4 ++++ app.json | 5 +++++ bin/cloudcmd.js | 3 +++ client/modules/edit-file.js | 7 +++++-- client/modules/view.js | 35 +++++++++++++++++++++++------------ json/config.json | 1 + json/help.json | 4 +++- man/cloudcmd.1 | 2 ++ tmpl/config.hbs | 8 +++++++- 9 files changed, 53 insertions(+), 16 deletions(-) diff --git a/HELP.md b/HELP.md index 22dd0dee..6fa0a008 100644 --- a/HELP.md +++ b/HELP.md @@ -74,6 +74,7 @@ Cloud Commander supports command line parameters: | `-p, --password` | set password | `-c, --config` | configuration file path | `--show-config` | show config values +| `--show-file-name` | show file name in view and edit | `--editor` | set editor: "dword", "edward" or "deepword" | `--packer` | set packer: "tar" or "zip" | `--root` | set root directory @@ -123,6 +124,7 @@ Cloud Commander supports command line parameters: | `--no-import` | disable import of config | `--no-import-listen` | disable listen on config updates from import server | `--no-log` | disable logging +| `--no-show-file-name` | do not show file name in view and edit If no parameters given Cloud Commander reads information from `~/.cloudcmd.json` and use port from it (`8000` default). if port variables `PORT` or `VCAP_APP_PORT` isn't exist. @@ -386,6 +388,7 @@ Here is description of options: "confirmCopy" : true, /* confirm copy */ "confirmMove" : true, /* confirm move */ "showConfig" : false, /* show config at startap */ + "showFileName" : false /* do not show file name in view and edit */ "contact" : true, /* enable contact */ "configDialog" : true, /* enable config dialog */ "console" : true, /* enable console */ @@ -426,6 +429,7 @@ Some config options can be overridden with `environment variables` such: - `CLOUDCMD_VIM` - enable vim hot keys - `CLOUDCMD_CONFIRM_COPY` - confirm copy - `CLOUDCMD_CONFIRM_MOVE` - confirm move +- `CLOUDCMD_SHOW_FILE_NAME` - show file name in view and edit - `CLOUDCMD_EXPORT` - enable export of config through a server - `CLOUDCMD_EXPORT_TOKEN` - authorization token used by export server - `CLOUDCMD_IMPORT` - enable import of config diff --git a/app.json b/app.json index 59a92d86..fa1a368f 100644 --- a/app.json +++ b/app.json @@ -112,6 +112,11 @@ "value": "true", "required": false }, + "CLOUDCMD_SHOW_FILE_NAME": { + "description": "show file name in view and edit", + "value": "false", + "required": false + }, "CLOUDCMD_EXPORT": { "description": "enable export of config through a server", "value": "false", diff --git a/bin/cloudcmd.js b/bin/cloudcmd.js index 4e9fb485..deb0f78a 100755 --- a/bin/cloudcmd.js +++ b/bin/cloudcmd.js @@ -56,6 +56,7 @@ const args = require('minimist')(argv.slice(2), { 'confirm-copy', 'confirm-move', 'show-config', + 'show-file-name', 'vim', 'keys-panel', 'color', @@ -90,6 +91,7 @@ const args = require('minimist')(argv.slice(2), { import : choose(env.bool('import'), config('import')), export : choose(env.bool('export'), config('export')), + 'show-file-name': choose(env.bool('show_file_name'), config('showFileName')), 'sync-console-path': choose(env.bool('sync_console_path'), config('syncConsolePath')), 'config-dialog': choose(env.bool('config_dialog'), config('configDialog')), 'terminal-path': env('terminal_path') || config('terminalPath'), @@ -137,6 +139,7 @@ function main() { config('progress', args.progress); config('console', args.console); config('syncConsolePath', args['sync-console-path']); + config('showFileName', args['show-file-name']); config('contact', args.contact); config('terminal', args.terminal); config('terminalPath', args['terminal-path']); diff --git a/client/modules/edit-file.js b/client/modules/edit-file.js index 01dc124e..7fe98965 100644 --- a/client/modules/edit-file.js +++ b/client/modules/edit-file.js @@ -53,11 +53,14 @@ module.exports.show = (options) => { if (isLoading()) return; - const config = { + const optionsEdit = { ...ConfigView, ...options, }; + if (CloudCmd.config('showFileName')) + optionsEdit.title = Info.name; + Images.show.load(); CloudCmd.Edit @@ -79,7 +82,7 @@ module.exports.show = (options) => { .setModeForPath(name) .enableKey(); - CloudCmd.Edit.show(config); + CloudCmd.Edit.show(optionsEdit); }); return CloudCmd.Edit; diff --git a/client/modules/view.js b/client/modules/view.js index 3787be3a..d12b7d12 100644 --- a/client/modules/view.js +++ b/client/modules/view.js @@ -39,7 +39,7 @@ const basename = (a) => a.split('/').pop(); let El, TemplateAudio, Overlay; const Config = { - beforeShow: (callback) => { + beforeShow: function(callback) { Images.hide(); Key.unsetBind(); showOverlay(); @@ -72,7 +72,7 @@ const Config = { arrows : false, helpers : { overlay : null, - title : null + title : {}, } }; @@ -126,16 +126,7 @@ function show(data, options) { switch(type) { default: - return Info.getData((error, data) => { - if (error) - return Images.hide(); - - const element = document.createTextNode(data); - /* add margin only for view text documents */ - El.css('margin', '2%'); - - $.fancybox.open(El.append(element), Config); - }); + return showFile(); case 'image': return showImage(path, prefixUrl); @@ -169,6 +160,26 @@ function show(data, options) { } } +function showFile() { + Info.getData((error, data) => { + if (error) + return Images.hide(); + + const element = document.createTextNode(data); + /* add margin only for view text documents */ + El.css('margin', '2%'); + + const options = { + ...Config, + }; + + if (CloudCmd.config('showFileName')) + options.title = Info.name; + + $.fancybox.open(El.append(element), options); + }); +} + function initConfig(Config, options) { const config = Object.assign({}, Config); diff --git a/json/config.json b/json/config.json index 625f4a34..0bc70f29 100644 --- a/json/config.json +++ b/json/config.json @@ -28,6 +28,7 @@ "terminal": false, "terminalPath": "", "showConfig": false, + "showFileName": false, "vim": false, "columns": "name-size-date-owner-mode", "export": false, diff --git a/json/help.json b/json/help.json index 7bbb0121..3dcd7ada 100644 --- a/json/help.json +++ b/json/help.json @@ -8,6 +8,7 @@ "-p, --password ": "set password", "-c, --config ": "configuration file path", "--show-config ": "show config values", + "--show-file-name ": "show file name in view and edit", "--editor ": "set editor: \"dword\", \"edward\" or \"deepword\"", "--packer ": "set packer: \"tar\" or \"zip\"", "--root ": "set root directory", @@ -57,5 +58,6 @@ "--no-export ": "disable export config through a server", "--no-import ": "disable import of config", "--no-import-listen ": "disable listen on config updates from import server", - "--no-log ": "disable logging" + "--no-log ": "disable logging", + "--no-show-file-name ": "do not show file name in view and edit" } diff --git a/man/cloudcmd.1 b/man/cloudcmd.1 index 667953f2..0b8ef8b7 100644 --- a/man/cloudcmd.1 +++ b/man/cloudcmd.1 @@ -31,6 +31,7 @@ programs in browser from any computer, mobile or tablet device. -p, --password set password -c, --config configuration file path --show-config show config values + --show-file-name show file name in view and edit modes --editor set editor: "dword", "edward" or "deepword" --packer set packer: "tar" or "zip" --root set root directory @@ -81,6 +82,7 @@ programs in browser from any computer, mobile or tablet device. --no-import-url url of an import server --no-import-listen disable listen on config updates from import server --no-log disable logging + --no-show-file-name do not show file name in view and edit modes .SH RESOURCES AND DOCUMENTATION diff --git a/tmpl/config.hbs b/tmpl/config.hbs index c0997350..8acaa429 100644 --- a/tmpl/config.hbs +++ b/tmpl/config.hbs @@ -119,7 +119,7 @@ class="form-control">
  • -
  • +
  • + +
  • From c963ffefeec0d87635d5f20d147530b02bea7c37 Mon Sep 17 00:00:00 2001 From: coderiaser Date: Sun, 14 Sep 2025 22:10:54 +0300 Subject: [PATCH 1467/2016] 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 1468/2016] 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 1469/2016] 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 1470/2016] 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 @@