cloudcmd 19.22.0 → 19.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist-dev/sw.js CHANGED
@@ -23,7 +23,7 @@ eval("{// shim for using process in browser\nvar process = module.exports = {};\
23
23
  \*************************/
24
24
  (__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
25
25
  "use strict";
26
- eval("{__webpack_require__.r(__webpack_exports__);\n/* import */ var node_process__rspack_import_0 = __webpack_require__(/*! node:process */ \"./node_modules/process/browser.js\");\n/* import */ var try_to_catch__rspack_import_1 = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n/* import */ var currify__rspack_import_2 = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n\n\n\nconst isDev = \"development\" === 'development';\nconst isGet = a => a.method === 'GET';\nconst isBasic = a => a.type === 'basic';\nconst wait = currify__rspack_import_2((f, e) => e.waitUntil(f()));\nconst respondWith = currify__rspack_import_2((f, e) => {\n const {\n request\n } = e;\n const {\n url\n } = request;\n const pathname = getPathName(url);\n if (url.endsWith('/') || /\\^\\/fs/.test(pathname)) return;\n if (!isGet(request)) return;\n if (!isBasic(request)) return;\n if (pathname.startsWith('/api')) return;\n if (/^socket.io/.test(pathname)) return;\n e.respondWith(f(e));\n});\nconst getPathName = url => new URL(url).pathname;\nconst date = \"Sun Nov 08 2026 00:07:52 GMT+0200 (Eastern European Standard Time)\";\nconst NAME = `cloudcmd: ${date}`;\nconst createRequest = a => new Request(a, {\n credentials: 'same-origin'\n});\nconst getRequest = (a, request) => {\n if (a !== '/') return request;\n return createRequest('/');\n};\nglobalThis.addEventListener('install', wait(onInstall));\nglobalThis.addEventListener('fetch', respondWith(onFetch));\nglobalThis.addEventListener('activate', wait(onActivate));\nasync function onActivate() {\n console.info(`cloudcmd: sw: activate: ${NAME}`);\n await globalThis.clients.claim();\n const keys = await caches.keys();\n const deleteCache = caches.delete.bind(caches);\n await Promise.all(keys.map(deleteCache));\n}\nasync function onInstall() {\n console.info(`cloudcmd: sw: install: ${NAME}`);\n await globalThis.skipWaiting();\n}\nasync function onFetch(event) {\n const {\n request\n } = event;\n const {\n url\n } = request;\n const pathname = getPathName(url);\n const newRequest = getRequest(pathname, event.request);\n const cache = await caches.open(NAME);\n const response = await cache.match(request);\n if (!isDev && response) return response;\n const [e, resp] = await (0,try_to_catch__rspack_import_1.tryToCatch)(fetch, newRequest, {\n credentials: 'same-origin'\n });\n if (e) return new Response(e.message);\n await addToCache(request, resp.clone());\n return resp;\n}\nasync function addToCache(request, response) {\n const cache = await caches.open(NAME);\n return cache.put(request, response);\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/sw/sw.js\n}");
26
+ eval("{__webpack_require__.r(__webpack_exports__);\n/* import */ var node_process__rspack_import_0 = __webpack_require__(/*! node:process */ \"./node_modules/process/browser.js\");\n/* import */ var try_to_catch__rspack_import_1 = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n/* import */ var currify__rspack_import_2 = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n\n\n\nconst isDev = \"development\" === 'development';\nconst isGet = a => a.method === 'GET';\nconst isBasic = a => a.type === 'basic';\nconst wait = currify__rspack_import_2((f, e) => e.waitUntil(f()));\nconst respondWith = currify__rspack_import_2((f, e) => {\n const {\n request\n } = e;\n const {\n url\n } = request;\n const pathname = getPathName(url);\n if (url.endsWith('/') || /\\^\\/fs/.test(pathname)) return;\n if (!isGet(request)) return;\n if (!isBasic(request)) return;\n if (pathname.startsWith('/api')) return;\n if (/^socket.io/.test(pathname)) return;\n e.respondWith(f(e));\n});\nconst getPathName = url => new URL(url).pathname;\nconst date = \"Mon Nov 09 2026 22:52:58 GMT+0200 (Eastern European Standard Time)\";\nconst NAME = `cloudcmd: ${date}`;\nconst createRequest = a => new Request(a, {\n credentials: 'same-origin'\n});\nconst getRequest = (a, request) => {\n if (a !== '/') return request;\n return createRequest('/');\n};\nglobalThis.addEventListener('install', wait(onInstall));\nglobalThis.addEventListener('fetch', respondWith(onFetch));\nglobalThis.addEventListener('activate', wait(onActivate));\nasync function onActivate() {\n console.info(`cloudcmd: sw: activate: ${NAME}`);\n await globalThis.clients.claim();\n const keys = await caches.keys();\n const deleteCache = caches.delete.bind(caches);\n await Promise.all(keys.map(deleteCache));\n}\nasync function onInstall() {\n console.info(`cloudcmd: sw: install: ${NAME}`);\n await globalThis.skipWaiting();\n}\nasync function onFetch(event) {\n const {\n request\n } = event;\n const {\n url\n } = request;\n const pathname = getPathName(url);\n const newRequest = getRequest(pathname, event.request);\n const cache = await caches.open(NAME);\n const response = await cache.match(request);\n if (!isDev && response) return response;\n const [e, resp] = await (0,try_to_catch__rspack_import_1.tryToCatch)(fetch, newRequest, {\n credentials: 'same-origin'\n });\n if (e) return new Response(e.message);\n await addToCache(request, resp.clone());\n return resp;\n}\nasync function addToCache(request, response) {\n const cache = await caches.open(NAME);\n return cache.put(request, response);\n}\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/sw/sw.js\n}");
27
27
 
28
28
  },
29
29
  "./node_modules/try-to-catch/lib/try-to-catch.js"
package/json/config.json CHANGED
@@ -6,6 +6,7 @@
6
6
  "algo": "sha512WithRSAEncryption",
7
7
  "editor": "edward",
8
8
  "menu": "aleman",
9
+ "engine": "rendy",
9
10
  "packer": "tar",
10
11
  "diff": true,
11
12
  "zip": true,
package/json/help.json CHANGED
@@ -21,6 +21,7 @@
21
21
  "--open ": "open web browser when server started",
22
22
  "--name ": "set tab name in web browser",
23
23
  "--menu ": "set menu: \"supermenu\", \"aleman\" or \"lunes\"",
24
+ "--engine ": "set engine of the interface: \"rendy\" (default) or \"putout\"",
24
25
  "--one-file-panel ": "show one file panel",
25
26
  "--keys-panel ": "show keys panel",
26
27
  "--config-dialog ": "enable config dialog",
package/json/modules.json CHANGED
@@ -18,7 +18,9 @@
18
18
  "terminal",
19
19
  "terminal-run",
20
20
  "cloud",
21
- "user-menu"
21
+ "user-menu",
22
+ "putout",
23
+ "config-putout"
22
24
  ],
23
25
  "remote": [{
24
26
  "name": "socket",
package/man/cloudcmd.1 CHANGED
@@ -35,6 +35,7 @@ programs in browser from any computer, mobile or tablet device.
35
35
  --show-file-name show file name in view and edit modes
36
36
  --editor set editor: "dword", "edward", "deepword" or "qword"
37
37
  --menu set menu: "supermenu", "aleman" or "lunes"
38
+ --engine set engine of the interface: "rendy" (default) or "putout"
38
39
  --packer set packer: "tar" or "zip"
39
40
  --root set root directory
40
41
  --prefix set url prefix
@@ -99,6 +100,12 @@ programs in browser from any computer, mobile or tablet device.
99
100
  --no-dropbox-token unset dropbox token
100
101
  --no-log disable logging
101
102
 
103
+ .SH ENVIRONMENT
104
+
105
+ .TP
106
+ .B CLOUDCMD_ENGINE
107
+ set engine of the interface: "rendy" or "putout". Command-line option --engine wins over it, it wins over ~/.cloudcmd.json. The engine can also be chosen in the config dialog (F10) and works when the dialog opens again.
108
+
102
109
  .SH RESOURCES AND DOCUMENTATION
103
110
 
104
111
  General help using Cloud Commander: <http://cloudcmd.io>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudcmd",
3
- "version": "19.22.0",
3
+ "version": "19.23.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "File manager for the web with console and editor",
@@ -91,8 +91,11 @@
91
91
  "@cloudcmd/fileop": "^9.0.8",
92
92
  "@cloudcmd/move-files": "^9.0.1",
93
93
  "@cloudcmd/read-files-sync": "^2.0.0",
94
+ "@putout/bundle": "^5.6.4",
94
95
  "@putout/cli-validate-args": "^2.0.0",
95
96
  "@putout/plugin-cloudcmd": "^5.2.0",
97
+ "@putout/printer": "^18.49.1",
98
+ "@putout/processor-html": "^14.1.1",
96
99
  "apart": "^2.0.0",
97
100
  "chalk": "^6.0.0",
98
101
  "compression": "^1.7.4",
@@ -164,6 +167,7 @@
164
167
  "@iocmd/wait": "^2.1.0",
165
168
  "@playwright/test": "^1.63.0",
166
169
  "@putout/eslint-flat": "^4.0.0",
170
+ "@putout/test": "^15.9.0",
167
171
  "@rspack/cli": "^2.1.4",
168
172
  "@rspack/core": "^2.1.4",
169
173
  "@supertape/loader-css": "^1.0.0",
@@ -66,7 +66,7 @@ export function cloudcmd(params) {
66
66
  if (/root/.test(name))
67
67
  validate.root(value, config);
68
68
 
69
- if (/editor|packer|themes|menu/.test(name))
69
+ if (/editor|packer|themes|menu|engine/.test(name))
70
70
  validate[name](value);
71
71
 
72
72
  if (/prefix/.test(name))
@@ -41,6 +41,13 @@ export const menu = (name, {exit = _exit} = {}) => {
41
41
  exit('cloudcmd --menu: could be "supermenu", "aleman" or "lunes" only');
42
42
  };
43
43
 
44
+ export const engine = (name, {exit = _exit} = {}) => {
45
+ const reg = /^(rendy|putout)$/;
46
+
47
+ if (!reg.test(name))
48
+ exit('cloudcmd --engine: could be "rendy" or "putout" only');
49
+ };
50
+
44
51
  export const packer = (name, {exit = _exit} = {}) => {
45
52
  const reg = /^(tar|zip)$/;
46
53
 
package/tmpl/config.hbs CHANGED
@@ -7,6 +7,7 @@
7
7
  </li>
8
8
  <li {{ configAuth }}>
9
9
  <input
10
+ data-enabled-by="auth"
10
11
  data-name="js-username"
11
12
  type="text"
12
13
  class="form-control"
@@ -17,6 +18,7 @@
17
18
  </li>
18
19
  <li {{ configAuth }}>
19
20
  <input
21
+ data-enabled-by="auth"
20
22
  data-name="js-password"
21
23
  type="password"
22
24
  class="form-control"
@@ -81,6 +83,12 @@
81
83
  <option {{ lunes-selected }}>lunes</option>
82
84
  </select>
83
85
  </li>
86
+ <li title="Engine of the interface: rendy or putout (works when the window opens again)">
87
+ <select data-name="js-engine" class="form-control full-width" title="Engine">
88
+ <option {{ rendy-selected }}>rendy</option>
89
+ <option {{ putout-selected }}>putout</option>
90
+ </select>
91
+ </li>
84
92
  <li title="Inner buffer used to copy files">
85
93
  <label>
86
94
  <input data-name="js-buffer" type="checkbox" {{ buffer }}>