cloudcmd 19.20.4 → 19.20.6
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/ChangeLog +13 -0
- package/HELP.md +3 -1
- package/README.md +1 -1
- package/dist/cloudcmd.common.css.map +1 -1
- package/dist/cloudcmd.common.js +59 -72
- package/dist/cloudcmd.common.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist-dev/cloudcmd.common.css +7 -7
- package/dist-dev/cloudcmd.common.js +10 -10
- package/dist-dev/columns/name-size.js +1 -1
- package/dist-dev/config.js +1 -1
- package/dist-dev/nojs.js +1 -1
- package/dist-dev/sw.js +1 -1
- package/dist-dev/terminal.js +1 -1
- package/package.json +2 -2
- package/server/route.js +4 -3
|
@@ -32,7 +32,7 @@ eval("{\n\nconst identityLoginURL = 'static.olark.com/jsclient/loader.js';\n\nif
|
|
|
32
32
|
\************************/
|
|
33
33
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
34
34
|
"use strict";
|
|
35
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
35
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/config.css\n}");
|
|
36
36
|
|
|
37
37
|
},
|
|
38
38
|
"./css/main.css"
|
|
@@ -41,7 +41,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-
|
|
|
41
41
|
\**********************/
|
|
42
42
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
43
43
|
"use strict";
|
|
44
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
44
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/main.css\n}");
|
|
45
45
|
|
|
46
46
|
},
|
|
47
47
|
"./css/terminal.css"
|
|
@@ -50,7 +50,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-
|
|
|
50
50
|
\**************************/
|
|
51
51
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
52
52
|
"use strict";
|
|
53
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
53
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/terminal.css\n}");
|
|
54
54
|
|
|
55
55
|
},
|
|
56
56
|
"./css/user-menu.css"
|
|
@@ -59,7 +59,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-
|
|
|
59
59
|
\***************************/
|
|
60
60
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
61
61
|
"use strict";
|
|
62
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
62
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/user-menu.css\n}");
|
|
63
63
|
|
|
64
64
|
},
|
|
65
65
|
"./css/view.css"
|
|
@@ -68,7 +68,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-
|
|
|
68
68
|
\**********************/
|
|
69
69
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
70
70
|
"use strict";
|
|
71
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
71
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/view.css\n}");
|
|
72
72
|
|
|
73
73
|
},
|
|
74
74
|
"./node_modules/@cloudcmd/modal/css/modal.css"
|
|
@@ -77,7 +77,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-
|
|
|
77
77
|
\****************************************************/
|
|
78
78
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
79
79
|
"use strict";
|
|
80
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
80
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/@cloudcmd/modal/css/modal.css\n}");
|
|
81
81
|
|
|
82
82
|
},
|
|
83
83
|
"./node_modules/smalltalk/css/smalltalk.css"
|
|
@@ -86,7 +86,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-
|
|
|
86
86
|
\**************************************************/
|
|
87
87
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
88
88
|
"use strict";
|
|
89
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
89
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/smalltalk/css/smalltalk.css\n}");
|
|
90
90
|
|
|
91
91
|
},
|
|
92
92
|
"./node_modules/supermenu/css/supermenu.css"
|
|
@@ -95,7 +95,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-
|
|
|
95
95
|
\**************************************************/
|
|
96
96
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
97
97
|
"use strict";
|
|
98
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
98
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/node_modules/supermenu/css/supermenu.css\n}");
|
|
99
99
|
|
|
100
100
|
},
|
|
101
101
|
"./node_modules/apart/lib/apart.js"
|
|
@@ -1385,7 +1385,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
1385
1385
|
\****************************************/
|
|
1386
1386
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1387
1387
|
"use strict";
|
|
1388
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n convert: () => (convert),\n getElementByName: () => (getElementByName),\n getName: () => (getName),\n getValue: () => (getValue),\n setValue: () => (setValue)\n});\n/* import */ var _common_entity__rspack_import_0 = __webpack_require__(/*! #common/entity */ \"./common/entity.js\");\n\nconst isBool = (a)=>typeof a === 'boolean';\nconst isString = (a)=>typeof a === 'string';\nconst { keys } = Object;\nfunction getElementByName(selector, element) {\n const str = `[data-name=\"js-${selector}\"]`;\n return element.querySelector(str);\n}\nconst getName = (element)=>{\n const name = element.getAttribute('data-name').replace(/^js-/, '');\n return name;\n};\nconst convert = (config)=>{\n const result = config;\n for (const name of keys(config)){\n const item = config[name];\n if (isBool(item)) {\n result[name] = setState(item);\n continue;\n }\n if (isString(item)) {\n result[name] = (0,_common_entity__rspack_import_0.encode)(item);\n continue;\n }\n }\n return result;\n};\nfunction setState(state) {\n if (state) return ' checked';\n return '';\n}\nconst getValue = (name, element)=>{\n const el = getElementByName(name, element);\n const { type } = el;\n
|
|
1388
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n convert: () => (convert),\n getElementByName: () => (getElementByName),\n getName: () => (getName),\n getValue: () => (getValue),\n setValue: () => (setValue)\n});\n/* import */ var _common_entity__rspack_import_0 = __webpack_require__(/*! #common/entity */ \"./common/entity.js\");\n\nconst isBool = (a)=>typeof a === 'boolean';\nconst isString = (a)=>typeof a === 'string';\nconst { keys } = Object;\nfunction getElementByName(selector, element) {\n const str = `[data-name=\"js-${selector}\"]`;\n return element.querySelector(str);\n}\nconst getName = (element)=>{\n const name = element.getAttribute('data-name').replace(/^js-/, '');\n return name;\n};\nconst convert = (config)=>{\n const result = config;\n for (const name of keys(config)){\n const item = config[name];\n if (isBool(item)) {\n result[name] = setState(item);\n continue;\n }\n if (isString(item)) {\n result[name] = (0,_common_entity__rspack_import_0.encode)(item);\n continue;\n }\n }\n return result;\n};\nfunction setState(state) {\n if (state) return ' checked';\n return '';\n}\nconst getValue = (name, element)=>{\n const el = getElementByName(name, element);\n const { type } = el;\n if (type === 'checkbox') return el.checked;\n if (type === 'number') return Number(el.value);\n return el.value;\n};\nconst setValue = (name, value, element)=>{\n const el = getElementByName(name, element);\n const { type } = el;\n switch(type){\n case 'checkbox':\n el.checked = value;\n break;\n default:\n el.value = value;\n break;\n }\n};\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/config/input.js\n}");
|
|
1389
1389
|
|
|
1390
1390
|
},
|
|
1391
1391
|
"./client/modules/contact.js"
|
|
@@ -1628,7 +1628,7 @@ eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webp
|
|
|
1628
1628
|
\**************************************/
|
|
1629
1629
|
(__unused_rspack___webpack_module__, __webpack_exports__, __webpack_require__) {
|
|
1630
1630
|
"use strict";
|
|
1631
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n _Config: () => (_Config),\n _createIframe: () => (_createIframe),\n _initConfig: () => (_initConfig),\n _viewHtml: () => (_viewHtml),\n hide: () => (hide),\n init: () => (init),\n show: () => (show)\n});\n/* import */ var _css_view_css__rspack_import_0 = __webpack_require__(/*! #css/view.css */ \"./css/view.css\");\n/* import */ var rendy__rspack_import_1 = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\n/* import */ var currify__rspack_import_2 = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n/* import */ var wraptile__rspack_import_3 = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* import */ var try_to_catch__rspack_import_4 = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n/* import */ var load_js__rspack_import_5 = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\n/* import */ var _cloudcmd_modal__rspack_import_6 = __webpack_require__(/*! @cloudcmd/modal */ \"./node_modules/@cloudcmd/modal/lib/modal.js\");\n/* import */ var _cloudcmd_create_element__rspack_import_7 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _common_util__rspack_import_8 = __webpack_require__(/*! #common/util */ \"./common/util.js\");\n/* import */ var _dom_files__rspack_import_9 = __webpack_require__(/*! #dom/files */ \"./client/dom/files.js\");\n/* import */ var _dom_events__rspack_import_10 = __webpack_require__(/*! #dom/events */ \"./client/dom/events/index.js\");\n/* import */ var _common_cloudfunc__rspack_import_11 = __webpack_require__(/*! #common/cloudfunc */ \"./common/cloudfunc.js\");\n/* import */ var _dom_images__rspack_import_12 = __webpack_require__(/*! #dom/images */ \"./client/dom/images.js\");\n/* import */ var _common_entity__rspack_import_13 = __webpack_require__(/*! #common/entity */ \"./common/entity.js\");\n/* import */ var _types_js__rspack_import_14 = __webpack_require__(/*! ./types.js */ \"./client/modules/view/types.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst CloudCmd = globalThis.CloudCmd || {};\nconst DOM = globalThis.DOM || {};\nconst isString = (a)=>typeof a === 'string';\nconst { assign } = Object;\nconst { isArray } = Array;\nconst lifo = currify__rspack_import_2((fn, el, cb, name)=>fn(name, el, cb));\nconst series = wraptile__rspack_import_3((...a)=>{\n for (const f of a)f();\n});\nconst isFn = (a)=>typeof a === 'function';\nconst noop = ()=>{};\nconst addEvent = lifo(_dom_events__rspack_import_10.add);\nconst loadCSS = load_js__rspack_import_5.css;\nlet Loading = false;\nconst Name = 'View';\nCloudCmd[Name] = {\n init,\n show,\n hide\n};\nconst Info = DOM.CurrentInfo;\nconst { Key } = CloudCmd;\nconst basename = (a)=>a.split('/').pop();\nlet El;\nlet TemplateAudio;\nlet Overlay;\nconst Config = {\n beforeShow: ()=>{\n _dom_images__rspack_import_12.hide();\n Key.unsetBind();\n },\n beforeClose: ()=>{\n _dom_events__rspack_import_10.rmKey(listener);\n Key.setBind();\n },\n afterShow: ()=>{\n El.focus();\n },\n onOverlayClick,\n afterClose: noop,\n autoSize: false,\n helpers: {\n title: {}\n }\n};\nconst _Config = Config;\nasync function init() {\n await loadAll();\n const events = [\n 'click',\n 'contextmenu'\n ];\n events.forEach(addEvent(Overlay, onOverlayClick));\n}\nasync function show(data, options = {}) {\n const prefixURL = CloudCmd.prefixURL + _common_cloudfunc__rspack_import_11.FS;\n if (Loading) return;\n if (!options || options.bindKeys !== false) _dom_events__rspack_import_10.addKey(listener);\n El = _cloudcmd_create_element__rspack_import_7('div', {\n className: 'view',\n notAppend: true\n });\n El.tabIndex = 0;\n if (data) {\n if (isArray(data)) El.append(...data);\n else El.append(data);\n _cloudcmd_modal__rspack_import_6.open(El, initConfig(options));\n return;\n }\n _dom_images__rspack_import_12.show.load();\n const path = prefixURL + Info.path;\n const type = options.raw ? '' : await (0,_types_js__rspack_import_14.getType)(path);\n
|
|
1631
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n__webpack_require__.d(__webpack_exports__, {\n _Config: () => (_Config),\n _createIframe: () => (_createIframe),\n _initConfig: () => (_initConfig),\n _viewHtml: () => (_viewHtml),\n hide: () => (hide),\n init: () => (init),\n show: () => (show)\n});\n/* import */ var _css_view_css__rspack_import_0 = __webpack_require__(/*! #css/view.css */ \"./css/view.css\");\n/* import */ var rendy__rspack_import_1 = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\n/* import */ var currify__rspack_import_2 = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\n/* import */ var wraptile__rspack_import_3 = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\n/* import */ var try_to_catch__rspack_import_4 = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\n/* import */ var load_js__rspack_import_5 = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\n/* import */ var _cloudcmd_modal__rspack_import_6 = __webpack_require__(/*! @cloudcmd/modal */ \"./node_modules/@cloudcmd/modal/lib/modal.js\");\n/* import */ var _cloudcmd_create_element__rspack_import_7 = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\n/* import */ var _common_util__rspack_import_8 = __webpack_require__(/*! #common/util */ \"./common/util.js\");\n/* import */ var _dom_files__rspack_import_9 = __webpack_require__(/*! #dom/files */ \"./client/dom/files.js\");\n/* import */ var _dom_events__rspack_import_10 = __webpack_require__(/*! #dom/events */ \"./client/dom/events/index.js\");\n/* import */ var _common_cloudfunc__rspack_import_11 = __webpack_require__(/*! #common/cloudfunc */ \"./common/cloudfunc.js\");\n/* import */ var _dom_images__rspack_import_12 = __webpack_require__(/*! #dom/images */ \"./client/dom/images.js\");\n/* import */ var _common_entity__rspack_import_13 = __webpack_require__(/*! #common/entity */ \"./common/entity.js\");\n/* import */ var _types_js__rspack_import_14 = __webpack_require__(/*! ./types.js */ \"./client/modules/view/types.js\");\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\nconst CloudCmd = globalThis.CloudCmd || {};\nconst DOM = globalThis.DOM || {};\nconst isString = (a)=>typeof a === 'string';\nconst { assign } = Object;\nconst { isArray } = Array;\nconst lifo = currify__rspack_import_2((fn, el, cb, name)=>fn(name, el, cb));\nconst series = wraptile__rspack_import_3((...a)=>{\n for (const f of a)f();\n});\nconst isFn = (a)=>typeof a === 'function';\nconst noop = ()=>{};\nconst addEvent = lifo(_dom_events__rspack_import_10.add);\nconst loadCSS = load_js__rspack_import_5.css;\nlet Loading = false;\nconst Name = 'View';\nCloudCmd[Name] = {\n init,\n show,\n hide\n};\nconst Info = DOM.CurrentInfo;\nconst { Key } = CloudCmd;\nconst basename = (a)=>a.split('/').pop();\nlet El;\nlet TemplateAudio;\nlet Overlay;\nconst Config = {\n beforeShow: ()=>{\n _dom_images__rspack_import_12.hide();\n Key.unsetBind();\n },\n beforeClose: ()=>{\n _dom_events__rspack_import_10.rmKey(listener);\n Key.setBind();\n },\n afterShow: ()=>{\n El.focus();\n },\n onOverlayClick,\n afterClose: noop,\n autoSize: false,\n helpers: {\n title: {}\n }\n};\nconst _Config = Config;\nasync function init() {\n await loadAll();\n const events = [\n 'click',\n 'contextmenu'\n ];\n events.forEach(addEvent(Overlay, onOverlayClick));\n}\nasync function show(data, options = {}) {\n const prefixURL = CloudCmd.prefixURL + _common_cloudfunc__rspack_import_11.FS;\n if (Loading) return;\n if (!options || options.bindKeys !== false) _dom_events__rspack_import_10.addKey(listener);\n El = _cloudcmd_create_element__rspack_import_7('div', {\n className: 'view',\n notAppend: true\n });\n El.tabIndex = 0;\n if (data) {\n if (isArray(data)) El.append(...data);\n else El.append(data);\n _cloudcmd_modal__rspack_import_6.open(El, initConfig(options));\n return;\n }\n _dom_images__rspack_import_12.show.load();\n const path = prefixURL + Info.path;\n const type = options.raw ? '' : await (0,_types_js__rspack_import_14.getType)(path);\n if (type === 'markdown') return await CloudCmd.Markdown.show(Info.path);\n if (type === 'html') return viewHtml(path);\n if (type === 'image') return viewImage(Info.path, prefixURL);\n if (type === 'media') return await viewMedia(path);\n if (type === 'pdf') return viewPDF(path);\n return await viewFile();\n}\nconst _createIframe = createIframe;\nfunction createIframe(src, overrides = {}) {\n const { createElement = _cloudcmd_create_element__rspack_import_7 } = overrides;\n const element = createElement('iframe', {\n src,\n width: '100%',\n height: '100%'\n });\n element.addEventListener('load', ()=>{\n element.contentWindow.addEventListener('keydown', listener);\n });\n return element;\n}\nconst _viewHtml = viewHtml;\nfunction viewHtml(src, overrides = {}) {\n const { modal = _cloudcmd_modal__rspack_import_6 } = overrides;\n modal.open(createIframe(src), Config);\n}\nfunction viewPDF(src) {\n const element = createIframe(src);\n const options = assign({}, Config);\n if (CloudCmd.config('showFileName')) options.title = Info.name;\n _cloudcmd_modal__rspack_import_6.open(element, options);\n}\nasync function viewMedia(path) {\n const [e, element] = await getMediaElement(path);\n if (e) return alert(e);\n const allConfig = {\n ...Config,\n ...{\n autoSize: true,\n afterShow: ()=>{\n element.querySelector('audio, video').focus();\n }\n }\n };\n _cloudcmd_modal__rspack_import_6.open(element, allConfig);\n}\nasync function viewFile() {\n const [error, data] = await Info.getData();\n if (error) return _dom_images__rspack_import_12.hide();\n const element = document.createTextNode(data);\n const options = Config;\n if (CloudCmd.config('showFileName')) options.title = Info.name;\n El.append(element);\n _cloudcmd_modal__rspack_import_6.open(El, options);\n}\nconst copy = (a)=>assign({}, a);\nconst _initConfig = initConfig;\nfunction initConfig(options) {\n const config = copy(Config);\n if (!options) return config;\n const names = Object.keys(options);\n for (const name of names){\n const isConfig = Boolean(config[name]);\n const item = options[name];\n if (!isFn(item) || !isConfig) {\n config[name] = options[name];\n continue;\n }\n const fn = config[name];\n config[name] = series(fn, item);\n }\n return config;\n}\nfunction hide() {\n _cloudcmd_modal__rspack_import_6.close();\n}\nfunction viewImage(path, prefixURL) {\n const isSupportedImage = (a)=>(0,_types_js__rspack_import_14.isImage)(a) || a === path;\n const makeTitle = (path)=>({\n href: `${prefixURL}${path}`,\n title: (0,_common_entity__rspack_import_13.encode)(basename(path))\n });\n const names = Info.files.map(DOM.getCurrentPath).filter(isSupportedImage);\n const titles = names.map(makeTitle);\n const index = names.indexOf(Info.path);\n const imageConfig = {\n index,\n autoSize: true,\n arrows: true,\n keys: true,\n helpers: {\n title: {}\n }\n };\n const config = {\n ...Config,\n ...imageConfig\n };\n _cloudcmd_modal__rspack_import_6.open(titles, config);\n}\nasync function getMediaElement(src) {\n check(src);\n const [error, template] = await (0,try_to_catch__rspack_import_4.tryToCatch)(_dom_files__rspack_import_9.get, 'view/media-tmpl');\n if (error) return [\n error\n ];\n const { name } = Info;\n if (!TemplateAudio) TemplateAudio = template;\n const is = (0,_types_js__rspack_import_14.isAudio)(name);\n const type = is ? 'audio' : 'video';\n const innerHTML = (0,rendy__rspack_import_1.rendy)(TemplateAudio, {\n src,\n type,\n name\n });\n const element = _cloudcmd_create_element__rspack_import_7('div', {\n innerHTML\n });\n return [\n null,\n element\n ];\n}\nfunction check(src) {\n if (!isString(src)) throw Error('src should be a string!');\n}\nasync function loadAll() {\n const { DIR_DIST } = CloudCmd;\n (0,_common_util__rspack_import_8.time)(`${Name} load`);\n Loading = true;\n await loadCSS(`${DIR_DIST}/view.css`);\n Loading = false;\n}\nfunction onOverlayClick(event) {\n const position = {\n x: event.clientX,\n y: event.clientY\n };\n setCurrentByPosition(position);\n}\nfunction setCurrentByPosition(position) {\n const element = DOM.getCurrentByPosition(position);\n if (!element) return;\n const { files, filesPassive } = Info;\n const isFiles = files.includes(element);\n const isFilesPassive = filesPassive.includes(element);\n if (!isFiles && !isFilesPassive) return;\n const isCurrent = DOM.isCurrentFile(element);\n if (isCurrent) return;\n DOM.setCurrentFile(element);\n}\nfunction listener({ keyCode }) {\n if (keyCode === Key.ESC) hide();\n}\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/client/modules/view/index.js\n}");
|
|
1632
1632
|
|
|
1633
1633
|
},
|
|
1634
1634
|
"./client/modules/view/types.js"
|
|
@@ -6,7 +6,7 @@ var __webpack_modules__ = ({
|
|
|
6
6
|
!*** ./css/columns/name-size.css ***!
|
|
7
7
|
\***********************************/
|
|
8
8
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
9
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
9
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/columns/name-size.css\n}");
|
|
10
10
|
|
|
11
11
|
},
|
|
12
12
|
|
package/dist-dev/config.js
CHANGED
|
@@ -6,7 +6,7 @@ var __webpack_modules__ = ({
|
|
|
6
6
|
!*** ./css/config.css ***!
|
|
7
7
|
\************************/
|
|
8
8
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
9
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
9
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/config.css\n}");
|
|
10
10
|
|
|
11
11
|
},
|
|
12
12
|
|
package/dist-dev/nojs.js
CHANGED
|
@@ -6,7 +6,7 @@ var __webpack_modules__ = ({
|
|
|
6
6
|
!*** ./css/nojs.css ***!
|
|
7
7
|
\**********************/
|
|
8
8
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
9
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
9
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/nojs.css\n}");
|
|
10
10
|
|
|
11
11
|
},
|
|
12
12
|
|
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 = \"
|
|
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 = \"Tue Sep 15 2026 13:51:10 GMT+0300 (Eastern European Summer 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/dist-dev/terminal.js
CHANGED
|
@@ -6,7 +6,7 @@ var __webpack_modules__ = ({
|
|
|
6
6
|
!*** ./css/terminal.css ***!
|
|
7
7
|
\**************************/
|
|
8
8
|
(__unused_rspack_module, __webpack_exports__, __webpack_require__) {
|
|
9
|
-
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/
|
|
9
|
+
eval("{__webpack_require__.r(__webpack_exports__);\n// extracted by css-extract-rspack-plugin\n\n\n//# sourceURL=file://cloudcmd//Users/coderaiser/cloudcmd/css/terminal.css\n}");
|
|
10
10
|
|
|
11
11
|
},
|
|
12
12
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcmd",
|
|
3
|
-
"version": "19.20.
|
|
3
|
+
"version": "19.20.6",
|
|
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",
|
|
@@ -174,7 +174,7 @@
|
|
|
174
174
|
"codegen.macro": "^4.0.0",
|
|
175
175
|
"css-loader": "^7.1.2",
|
|
176
176
|
"css-modules-require-hook": "^4.2.3",
|
|
177
|
-
"cssnano-preset-default": "^
|
|
177
|
+
"cssnano-preset-default": "^9.0.1",
|
|
178
178
|
"domtokenlist-shim": "^1.2.0",
|
|
179
179
|
"emitify": "^4.0.1",
|
|
180
180
|
"eslint": "^10.0.0",
|
package/server/route.js
CHANGED
|
@@ -7,6 +7,7 @@ import format from 'format-io';
|
|
|
7
7
|
import currify from 'currify';
|
|
8
8
|
import wraptile from 'wraptile';
|
|
9
9
|
import {tryToCatch} from 'try-to-catch';
|
|
10
|
+
import {tryCatch} from 'try-catch';
|
|
10
11
|
import once from 'once';
|
|
11
12
|
import pipe from 'pipe-io';
|
|
12
13
|
import {contentType} from 'mime-types';
|
|
@@ -76,10 +77,10 @@ async function route({config, options, request, response}) {
|
|
|
76
77
|
config('prefix', prefixer(request.baseUrl));
|
|
77
78
|
|
|
78
79
|
const rootName = name.replace(CloudFunc.FS, '') || '/';
|
|
79
|
-
const fullPath = root
|
|
80
|
+
const [resolveError, fullPath] = tryCatch(root.resolve, rootName, config('root'));
|
|
80
81
|
|
|
81
|
-
if (
|
|
82
|
-
return ponse.sendError(
|
|
82
|
+
if (resolveError)
|
|
83
|
+
return ponse.sendError(resolveError, p);
|
|
83
84
|
|
|
84
85
|
const {html, win32} = options;
|
|
85
86
|
|