cloudcmd 19.21.2 → 19.21.4
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 +10 -0
- package/HELP.md +3 -1
- package/README.md +1 -1
- package/dist/modules/menu.js +55 -55
- package/dist/modules/menu.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist-dev/modules/menu.js +77 -59
- package/dist-dev/sw.js +1 -1
- package/package.json +2 -2
- package/server/cloudcmd.js +4 -2
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 = \"Sun Oct 25 2026 14:11:57 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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcmd",
|
|
3
|
-
"version": "19.21.
|
|
3
|
+
"version": "19.21.4",
|
|
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",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
"mime-types": "^3.0.1",
|
|
125
125
|
"montag": "^2.0.1",
|
|
126
126
|
"nano-memoize": "^3.0.16",
|
|
127
|
-
"nomine": "^
|
|
127
|
+
"nomine": "^5.0.2",
|
|
128
128
|
"once": "^1.4.0",
|
|
129
129
|
"onezip": "^7.0.0",
|
|
130
130
|
"open": "^11.0.0",
|
package/server/cloudcmd.js
CHANGED
|
@@ -13,7 +13,7 @@ import {edward} from 'edward';
|
|
|
13
13
|
import {dword} from 'dword';
|
|
14
14
|
import {deepword} from 'deepword';
|
|
15
15
|
import {qword} from 'qword';
|
|
16
|
-
import nomine from 'nomine';
|
|
16
|
+
import {nomine} from 'nomine';
|
|
17
17
|
import {fileop} from '@cloudcmd/fileop';
|
|
18
18
|
import * as cloudfunc from '#common/cloudfunc';
|
|
19
19
|
import authentication from './auth.js';
|
|
@@ -251,11 +251,13 @@ function cloudcmdMiddle({modules, config}) {
|
|
|
251
251
|
dropboxToken,
|
|
252
252
|
}),
|
|
253
253
|
fileop(),
|
|
254
|
-
nomine(),
|
|
255
254
|
setUrl,
|
|
256
255
|
setSW,
|
|
257
256
|
logout,
|
|
258
257
|
authentication(config),
|
|
258
|
+
nomine({
|
|
259
|
+
root: root(),
|
|
260
|
+
}),
|
|
259
261
|
config.middle,
|
|
260
262
|
modules && modulas(modules),
|
|
261
263
|
config('dropbox') && restbox({
|