cloudcmd 17.3.1 → 17.3.3
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/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist-dev/sw.js +1 -1
- package/package.json +2 -2
- package/server/config.js +2 -2
- package/server/distribute/export.mjs +3 -3
- package/server/distribute/import.mjs +9 -9
- package/server/distribute/log.mjs +2 -2
package/ChangeLog
CHANGED
package/HELP.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Cloud Commander v17.3.
|
|
1
|
+
# Cloud Commander v17.3.3
|
|
2
2
|
|
|
3
3
|
### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL]
|
|
4
4
|
|
|
@@ -1095,6 +1095,8 @@ There are a lot of ways to be involved in `Cloud Commander` development:
|
|
|
1095
1095
|
|
|
1096
1096
|
## Version history
|
|
1097
1097
|
|
|
1098
|
+
- *2024.04.03*, **[v17.3.3](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.3)**
|
|
1099
|
+
- *2024.03.29*, **[v17.3.2](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.2)**
|
|
1098
1100
|
- *2024.03.29*, **[v17.3.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.1)**
|
|
1099
1101
|
- *2024.03.29*, **[v17.3.0](//github.com/coderaiser/cloudcmd/releases/tag/v17.3.0)**
|
|
1100
1102
|
- *2024.03.29*, **[v17.2.1](//github.com/coderaiser/cloudcmd/releases/tag/v17.2.1)**
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Cloud Commander v17.3.
|
|
1
|
+
# Cloud Commander v17.3.3 [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Codacy][CodacyIMG]][CodacyURL] [![Gitter][GitterIMGURL]][GitterURL]
|
|
2
2
|
|
|
3
3
|
### [Main][MainURL] [Blog][BlogURL] [Support][SupportURL] [Demo][DemoURL]
|
|
4
4
|
|
package/dist/sw.js
CHANGED
|
@@ -7,5 +7,5 @@ var serviceWorkerOption = {
|
|
|
7
7
|
]
|
|
8
8
|
};
|
|
9
9
|
|
|
10
|
-
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=0)}([function(t,e,n){"use strict";const r=n(1),o=n(2),i=n(3),u="development"===r.env.NODE_ENV,c=i((t,e)=>e.waitUntil(t())),s=i((t,e)=>{const{request:n}=e,{url:r}=n,o=a(r);r.endsWith("/")||/\^\/fs/.test(o)||"GET"===n.method&&(t=>"basic"===t.type)(n)&&(o.startsWith("/api")||/^socket.io/.test(o)||e.respondWith(t(e)))}),a=t=>new URL(t).pathname,f="cloudcmd:
|
|
10
|
+
!function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/dist/",n(n.s=0)}([function(t,e,n){"use strict";const r=n(1),o=n(2),i=n(3),u="development"===r.env.NODE_ENV,c=i((t,e)=>e.waitUntil(t())),s=i((t,e)=>{const{request:n}=e,{url:r}=n,o=a(r);r.endsWith("/")||/\^\/fs/.test(o)||"GET"===n.method&&(t=>"basic"===t.type)(n)&&(o.startsWith("/api")||/^socket.io/.test(o)||e.respondWith(t(e)))}),a=t=>new URL(t).pathname,f="cloudcmd: Wed Apr 03 2024 09:37:25 GMT+0300 (Eastern European Summer Time)",l=(t,e)=>"/"!==t?e:(t=>new Request(t,{credentials:"same-origin"}))("/");self.addEventListener("install",c((async function(){console.info("cloudcmd: sw: install: "+f),await self.skipWaiting()}))),self.addEventListener("fetch",s((async function(t){const{request:e}=t,{url:n}=e,r=a(n),i=l(r,t.request),c=await caches.open(f),s=await c.match(e);if(!u&&s)return s;const[d,h]=await o(fetch,i,{credentials:"same-origin"});return d?new Response(d.message):(await async function(t,e){return(await caches.open(f)).put(t,e)}(e,h.clone()),h)}))),self.addEventListener("activate",c((async function(){console.info("cloudcmd: sw: activate: "+f),await self.clients.claim();const t=await caches.keys(),e=caches.delete.bind(caches);await Promise.all(t.map(e))})))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(t){r=u}}();var s,a=[],f=!1,l=-1;function d(){f&&s&&(f=!1,s.length?a=s.concat(a):l=-1,a.length&&h())}function h(){if(!f){var t=c(d);f=!0;for(var e=a.length;e;){for(s=a,a=[];++l<e;)s&&s[l].run();l=-1,e=a.length}s=null,f=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function m(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];a.push(new p(t,e)),1!==a.length||f||c(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=m,o.addListener=m,o.once=m,o.off=m,o.removeListener=m,o.removeAllListeners=m,o.emit=m,o.prependListener=m,o.prependOnceListener=m,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,n){"use strict";t.exports=async(t,...e)=>{!function(t){if("function"!=typeof t)throw Error("fn should be a function!")}(t);try{return[null,await t(...e)]}catch(t){return[t]}}},function(t,e,n){"use strict";const r=(t,...e)=>{if(function(t){if("function"!=typeof t)throw Error("fn should be function!")}(t),e.length>=t.length)return t(...e);const n=(...n)=>r(t,...e,...n),o=t.length-e.length-1;return(t=>[function(e){return t(...arguments)},function(e,n){return t(...arguments)},function(e,n,r){return t(...arguments)},function(e,n,r,o){return t(...arguments)},function(e,n,r,o,i){return t(...arguments)}])(n)[o]||n};t.exports=r}]);
|
|
11
11
|
//# sourceMappingURL=sw.js.map
|
package/dist/sw.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file://cloudcmd/webpack/bootstrap","file://cloudcmd/client/sw/sw.js","file://cloudcmd/node_modules/process/browser.js","file://cloudcmd/node_modules/try-to-catch/lib/try-to-catch.js","file://cloudcmd/node_modules/currify/lib/currify.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","process","require","tryToCatch","currify","isDev","env","NODE_ENV","wait","f","e","waitUntil","respondWith","request","url","pathname","getPathName","endsWith","test","method","a","type","isBasic","startsWith","URL","NAME","getRequest","Request","credentials","createRequest","self","addEventListener","async","console","info","skipWaiting","event","newRequest","cache","caches","open","response","match","resp","fetch","Response","message","put","addToCache","clone","clients","claim","keys","deleteCache","delete","Promise","all","map","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","setTimeout","this","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","length","concat","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","noop","nextTick","args","Array","arguments","push","apply","title","browser","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","fn","check","again","args2","count","b"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,G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,WAAa,OAAO,I,6BCrLpC7I,EAAOD,QAAUiE,MAAO8E,KAAOzB,MAU/B,SAAeyB,GACX,GAAkB,mBAAPA,EACP,MAAMjD,MAAM,4BAXhBkD,CAAMD,GAEN,IACI,MAAO,CAAC,WAAYA,KAAMzB,IAC5B,MAAM3E,GACJ,MAAO,CAACA,M,6BCNhB,MASMN,EAAU,CAAC0G,KAAOzB,KAGpB,GAeJ,SAAeyB,GACX,GAAkB,mBAAPA,EACP,MAAMjD,MAAM,0BAnBhBkD,CAAMD,GAEFzB,EAAKZ,QAAUqC,EAAGrC,OAClB,OAAOqC,KAAMzB,GAEjB,MAAM2B,EAAQ,IAAIC,IACP7G,EAAQ0G,KAAWzB,KAAS4B,GAGjCC,EAAQJ,EAAGrC,OAASY,EAAKZ,OAAS,EAGxC,MAtBM,CAACqC,GAAO,CAEd,SAAU1F,GAAI,OAAO0F,KAAMvB,YAC3B,SAAUnE,EAAG+F,GAAI,OAAOL,KAAMvB,YAC9B,SAAUnE,EAAG+F,EAAG7I,GAAI,OAAOwI,KAAMvB,YACjC,SAAUnE,EAAG+F,EAAG7I,EAAGC,GAAI,OAAOuI,KAAMvB,YACpC,SAAUnE,EAAG+F,EAAG7I,EAAGC,EAAGmC,GAAI,OAAOoG,KAAMvB,aAc1B9E,CAAEuG,GAAOE,IAEPF,GAGnBhJ,EAAOD,QAAUqC","file":"sw.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","'use strict';\n\nconst process = require('node:process');\nconst codegen = require('codegen.macro');\nconst tryToCatch = require('try-to-catch');\nconst currify = require('currify');\n\nconst isDev = process.env.NODE_ENV === 'development';\n\nconst isGet = (a) => a.method === 'GET';\nconst isBasic = (a) => a.type === 'basic';\n\nconst wait = currify((f, e) => e.waitUntil(f()));\nconst respondWith = currify((f, e) => {\n const {request} = e;\n const {url} = request;\n const pathname = getPathName(url);\n \n if (url.endsWith('/') || /\\^\\/fs/.test(pathname))\n return;\n \n if (!isGet(request))\n return;\n \n if (!isBasic(request))\n return;\n \n if (pathname.startsWith('/api'))\n return;\n \n if (/^socket.io/.test(pathname))\n return;\n \n e.respondWith(f(e));\n});\n\nconst getPathName = (url) => new URL(url).pathname;\n\nconst date = codegen`module.exports = '\"' + Date() + '\"'`;\nconst NAME = `cloudcmd: ${date}`;\n\nconst createRequest = (a) => new Request(a, {\n credentials: 'same-origin',\n});\n\nconst getRequest = (a, request) => {\n if (a !== '/')\n return request;\n \n return createRequest('/');\n};\n\nself.addEventListener('install', wait(onInstall));\nself.addEventListener('fetch', respondWith(onFetch));\nself.addEventListener('activate', wait(onActivate));\n\nasync function onActivate() {\n console.info(`cloudcmd: sw: activate: ${NAME}`);\n \n await self.clients.claim();\n const keys = await caches.keys();\n const deleteCache = caches.delete.bind(caches);\n \n await Promise.all(keys.map(deleteCache));\n}\n\nasync function onInstall() {\n console.info(`cloudcmd: sw: install: ${NAME}`);\n \n await self.skipWaiting();\n}\n\nasync function onFetch(event) {\n const {request} = event;\n const {url} = request;\n const pathname = getPathName(url);\n const newRequest = getRequest(pathname, event.request);\n \n const cache = await caches.open(NAME);\n const response = await cache.match(request);\n \n if (!isDev && response)\n return response;\n \n const [e, resp] = await tryToCatch(fetch, newRequest, {\n credentials: 'same-origin',\n });\n \n if (e)\n return new Response(e.message);\n \n await addToCache(request, resp.clone());\n \n return resp;\n}\n\nasync function addToCache(request, response) {\n const cache = await caches.open(NAME);\n return cache.put(request, response);\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict';\n\nmodule.exports = async (fn, ...args) => {\n check(fn);\n \n try {\n return [null, await fn(...args)];\n } catch(e) {\n return [e];\n }\n};\n\nfunction check(fn) {\n if (typeof fn !== 'function')\n throw Error('fn should be a function!');\n}\n\n","'use strict';\n\nconst f = (fn) => [\n /*eslint no-unused-vars: 0*/\n function (a) {return fn(...arguments);},\n function (a, b) {return fn(...arguments);},\n function (a, b, c) {return fn(...arguments);},\n function (a, b, c, d) {return fn(...arguments);},\n function (a, b, c, d, e) {return fn(...arguments);},\n];\n\nconst currify = (fn, ...args) => {\n check(fn);\n \n if (args.length >= fn.length)\n return fn(...args);\n \n const again = (...args2) => {\n return currify(fn, ...[...args, ...args2]);\n };\n \n const count = fn.length - args.length - 1;\n const func = f(again)[count];\n \n return func || again;\n};\n\nmodule.exports = currify;\n\nfunction check(fn) {\n if (typeof fn !== 'function')\n throw Error('fn should be function!');\n}\n\n"],"sourceRoot":""}
|
|
1
|
+
{"version":3,"sources":["file://cloudcmd/webpack/bootstrap","file://cloudcmd/client/sw/sw.js","file://cloudcmd/node_modules/process/browser.js","file://cloudcmd/node_modules/try-to-catch/lib/try-to-catch.js","file://cloudcmd/node_modules/currify/lib/currify.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","process","require","tryToCatch","currify","isDev","env","NODE_ENV","wait","f","e","waitUntil","respondWith","request","url","pathname","getPathName","endsWith","test","method","a","type","isBasic","startsWith","URL","NAME","getRequest","Request","credentials","createRequest","self","addEventListener","async","console","info","skipWaiting","event","newRequest","cache","caches","open","response","match","resp","fetch","Response","message","put","addToCache","clone","clients","claim","keys","deleteCache","delete","Promise","all","map","cachedSetTimeout","cachedClearTimeout","defaultSetTimout","Error","defaultClearTimeout","runTimeout","fun","setTimeout","this","clearTimeout","currentQueue","queue","draining","queueIndex","cleanUpNextTick","length","concat","drainQueue","timeout","len","run","marker","runClearTimeout","Item","array","noop","nextTick","args","Array","arguments","push","apply","title","browser","argv","version","versions","on","addListener","once","off","removeListener","removeAllListeners","emit","prependListener","prependOnceListener","listeners","binding","cwd","chdir","dir","umask","fn","check","again","args2","count","b"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,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OAAOwI,KAAMvB,YACjC,SAAUnE,EAAG+F,EAAG7I,EAAGC,GAAI,OAAOuI,KAAMvB,YACpC,SAAUnE,EAAG+F,EAAG7I,EAAGC,EAAGmC,GAAI,OAAOoG,KAAMvB,aAc1B9E,CAAEuG,GAAOE,IAEPF,GAGnBhJ,EAAOD,QAAUqC","file":"sw.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/dist/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 0);\n","'use strict';\n\nconst process = require('node:process');\nconst codegen = require('codegen.macro');\nconst tryToCatch = require('try-to-catch');\nconst currify = require('currify');\n\nconst isDev = process.env.NODE_ENV === 'development';\n\nconst isGet = (a) => a.method === 'GET';\nconst isBasic = (a) => a.type === 'basic';\n\nconst wait = currify((f, e) => e.waitUntil(f()));\nconst respondWith = currify((f, e) => {\n const {request} = e;\n const {url} = request;\n const pathname = getPathName(url);\n \n if (url.endsWith('/') || /\\^\\/fs/.test(pathname))\n return;\n \n if (!isGet(request))\n return;\n \n if (!isBasic(request))\n return;\n \n if (pathname.startsWith('/api'))\n return;\n \n if (/^socket.io/.test(pathname))\n return;\n \n e.respondWith(f(e));\n});\n\nconst getPathName = (url) => new URL(url).pathname;\n\nconst date = codegen`module.exports = '\"' + Date() + '\"'`;\nconst NAME = `cloudcmd: ${date}`;\n\nconst createRequest = (a) => new Request(a, {\n credentials: 'same-origin',\n});\n\nconst getRequest = (a, request) => {\n if (a !== '/')\n return request;\n \n return createRequest('/');\n};\n\nself.addEventListener('install', wait(onInstall));\nself.addEventListener('fetch', respondWith(onFetch));\nself.addEventListener('activate', wait(onActivate));\n\nasync function onActivate() {\n console.info(`cloudcmd: sw: activate: ${NAME}`);\n \n await self.clients.claim();\n const keys = await caches.keys();\n const deleteCache = caches.delete.bind(caches);\n \n await Promise.all(keys.map(deleteCache));\n}\n\nasync function onInstall() {\n console.info(`cloudcmd: sw: install: ${NAME}`);\n \n await self.skipWaiting();\n}\n\nasync function onFetch(event) {\n const {request} = event;\n const {url} = request;\n const pathname = getPathName(url);\n const newRequest = getRequest(pathname, event.request);\n \n const cache = await caches.open(NAME);\n const response = await cache.match(request);\n \n if (!isDev && response)\n return response;\n \n const [e, resp] = await tryToCatch(fetch, newRequest, {\n credentials: 'same-origin',\n });\n \n if (e)\n return new Response(e.message);\n \n await addToCache(request, resp.clone());\n \n return resp;\n}\n\nasync function addToCache(request, response) {\n const cache = await caches.open(NAME);\n return cache.put(request, response);\n}\n","// shim for using process in browser\nvar process = module.exports = {};\n\n// cached from whatever global is present so that test runners that stub it\n// don't break things. But we need to wrap it in a try catch in case it is\n// wrapped in strict mode code which doesn't define any globals. It's inside a\n// function because try/catches deoptimize in certain engines.\n\nvar cachedSetTimeout;\nvar cachedClearTimeout;\n\nfunction defaultSetTimout() {\n throw new Error('setTimeout has not been defined');\n}\nfunction defaultClearTimeout () {\n throw new Error('clearTimeout has not been defined');\n}\n(function () {\n try {\n if (typeof setTimeout === 'function') {\n cachedSetTimeout = setTimeout;\n } else {\n cachedSetTimeout = defaultSetTimout;\n }\n } catch (e) {\n cachedSetTimeout = defaultSetTimout;\n }\n try {\n if (typeof clearTimeout === 'function') {\n cachedClearTimeout = clearTimeout;\n } else {\n cachedClearTimeout = defaultClearTimeout;\n }\n } catch (e) {\n cachedClearTimeout = defaultClearTimeout;\n }\n} ())\nfunction runTimeout(fun) {\n if (cachedSetTimeout === setTimeout) {\n //normal enviroments in sane situations\n return setTimeout(fun, 0);\n }\n // if setTimeout wasn't available but was latter defined\n if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {\n cachedSetTimeout = setTimeout;\n return setTimeout(fun, 0);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedSetTimeout(fun, 0);\n } catch(e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedSetTimeout.call(null, fun, 0);\n } catch(e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error\n return cachedSetTimeout.call(this, fun, 0);\n }\n }\n\n\n}\nfunction runClearTimeout(marker) {\n if (cachedClearTimeout === clearTimeout) {\n //normal enviroments in sane situations\n return clearTimeout(marker);\n }\n // if clearTimeout wasn't available but was latter defined\n if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {\n cachedClearTimeout = clearTimeout;\n return clearTimeout(marker);\n }\n try {\n // when when somebody has screwed with setTimeout but no I.E. maddness\n return cachedClearTimeout(marker);\n } catch (e){\n try {\n // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally\n return cachedClearTimeout.call(null, marker);\n } catch (e){\n // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.\n // Some versions of I.E. have different rules for clearTimeout vs setTimeout\n return cachedClearTimeout.call(this, marker);\n }\n }\n\n\n\n}\nvar queue = [];\nvar draining = false;\nvar currentQueue;\nvar queueIndex = -1;\n\nfunction cleanUpNextTick() {\n if (!draining || !currentQueue) {\n return;\n }\n draining = false;\n if (currentQueue.length) {\n queue = currentQueue.concat(queue);\n } else {\n queueIndex = -1;\n }\n if (queue.length) {\n drainQueue();\n }\n}\n\nfunction drainQueue() {\n if (draining) {\n return;\n }\n var timeout = runTimeout(cleanUpNextTick);\n draining = true;\n\n var len = queue.length;\n while(len) {\n currentQueue = queue;\n queue = [];\n while (++queueIndex < len) {\n if (currentQueue) {\n currentQueue[queueIndex].run();\n }\n }\n queueIndex = -1;\n len = queue.length;\n }\n currentQueue = null;\n draining = false;\n runClearTimeout(timeout);\n}\n\nprocess.nextTick = function (fun) {\n var args = new Array(arguments.length - 1);\n if (arguments.length > 1) {\n for (var i = 1; i < arguments.length; i++) {\n args[i - 1] = arguments[i];\n }\n }\n queue.push(new Item(fun, args));\n if (queue.length === 1 && !draining) {\n runTimeout(drainQueue);\n }\n};\n\n// v8 likes predictible objects\nfunction Item(fun, array) {\n this.fun = fun;\n this.array = array;\n}\nItem.prototype.run = function () {\n this.fun.apply(null, this.array);\n};\nprocess.title = 'browser';\nprocess.browser = true;\nprocess.env = {};\nprocess.argv = [];\nprocess.version = ''; // empty string to avoid regexp issues\nprocess.versions = {};\n\nfunction noop() {}\n\nprocess.on = noop;\nprocess.addListener = noop;\nprocess.once = noop;\nprocess.off = noop;\nprocess.removeListener = noop;\nprocess.removeAllListeners = noop;\nprocess.emit = noop;\nprocess.prependListener = noop;\nprocess.prependOnceListener = noop;\n\nprocess.listeners = function (name) { return [] }\n\nprocess.binding = function (name) {\n throw new Error('process.binding is not supported');\n};\n\nprocess.cwd = function () { return '/' };\nprocess.chdir = function (dir) {\n throw new Error('process.chdir is not supported');\n};\nprocess.umask = function() { return 0; };\n","'use strict';\n\nmodule.exports = async (fn, ...args) => {\n check(fn);\n \n try {\n return [null, await fn(...args)];\n } catch(e) {\n return [e];\n }\n};\n\nfunction check(fn) {\n if (typeof fn !== 'function')\n throw Error('fn should be a function!');\n}\n\n","'use strict';\n\nconst f = (fn) => [\n /*eslint no-unused-vars: 0*/\n function (a) {return fn(...arguments);},\n function (a, b) {return fn(...arguments);},\n function (a, b, c) {return fn(...arguments);},\n function (a, b, c, d) {return fn(...arguments);},\n function (a, b, c, d, e) {return fn(...arguments);},\n];\n\nconst currify = (fn, ...args) => {\n check(fn);\n \n if (args.length >= fn.length)\n return fn(...args);\n \n const again = (...args2) => {\n return currify(fn, ...[...args, ...args2]);\n };\n \n const count = fn.length - args.length - 1;\n const func = f(again)[count];\n \n return func || again;\n};\n\nmodule.exports = currify;\n\nfunction check(fn) {\n if (typeof fn !== 'function')\n throw Error('fn should be function!');\n}\n\n"],"sourceRoot":""}
|
package/dist-dev/sw.js
CHANGED
|
@@ -103,7 +103,7 @@ var serviceWorkerOption = {
|
|
|
103
103
|
/***/ (function(module, exports, __webpack_require__) {
|
|
104
104
|
|
|
105
105
|
"use strict";
|
|
106
|
-
eval("\n\nconst process = __webpack_require__(/*! node:process */ \"./node_modules/process/browser.js\");\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\nconst isDev = process.env.NODE_ENV === 'development';\nconst isGet = a => a.method === 'GET';\nconst isBasic = a => a.type === 'basic';\nconst wait = currify((f, e) => e.waitUntil(f()));\nconst respondWith = currify((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 = \"
|
|
106
|
+
eval("\n\nconst process = __webpack_require__(/*! node:process */ \"./node_modules/process/browser.js\");\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\nconst isDev = process.env.NODE_ENV === 'development';\nconst isGet = a => a.method === 'GET';\nconst isBasic = a => a.type === 'basic';\nconst wait = currify((f, e) => e.waitUntil(f()));\nconst respondWith = currify((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 = \"Wed Apr 03 2024 09:37:36 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};\nself.addEventListener('install', wait(onInstall));\nself.addEventListener('fetch', respondWith(onFetch));\nself.addEventListener('activate', wait(onActivate));\nasync function onActivate() {\n console.info(`cloudcmd: sw: activate: ${NAME}`);\n await self.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 self.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 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/client/sw/sw.js");
|
|
107
107
|
|
|
108
108
|
/***/ }),
|
|
109
109
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cloudcmd",
|
|
3
|
-
"version": "17.3.
|
|
3
|
+
"version": "17.3.3",
|
|
4
4
|
"type": "commonjs",
|
|
5
5
|
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
|
|
6
6
|
"description": "File manager for the web with console and editor",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"criton": "^2.0.0",
|
|
103
103
|
"currify": "^4.0.0",
|
|
104
104
|
"deepmerge": "^4.0.0",
|
|
105
|
-
"deepword": "^
|
|
105
|
+
"deepword": "^10.0.0",
|
|
106
106
|
"dword": "^15.0.0",
|
|
107
107
|
"edward": "^15.0.0",
|
|
108
108
|
"es6-promisify": "^7.0.0",
|
package/server/config.js
CHANGED
|
@@ -35,7 +35,7 @@ const ConfigPath = path.join(DIR, 'json/config.json');
|
|
|
35
35
|
const ConfigHome = path.join(HOME, '.cloudcmd.json');
|
|
36
36
|
|
|
37
37
|
const connection = currify(_connection);
|
|
38
|
-
const
|
|
38
|
+
const connectionWrapped = wraptile(_connection);
|
|
39
39
|
const middle = currify(_middle);
|
|
40
40
|
|
|
41
41
|
const readjsonSync = (name) => {
|
|
@@ -155,7 +155,7 @@ function listen(manage, sock, auth) {
|
|
|
155
155
|
return connection(manage, socket);
|
|
156
156
|
|
|
157
157
|
const reject = () => socket.emit('reject');
|
|
158
|
-
socket.on('auth', auth(
|
|
158
|
+
socket.on('auth', auth(connectionWrapped(manage, socket), reject));
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
|
|
@@ -10,7 +10,7 @@ import log, {
|
|
|
10
10
|
makeColor,
|
|
11
11
|
getMessage,
|
|
12
12
|
getDescription,
|
|
13
|
-
|
|
13
|
+
logWrapped,
|
|
14
14
|
} from './log.mjs';
|
|
15
15
|
|
|
16
16
|
const omitList = [
|
|
@@ -41,9 +41,9 @@ export const distributeExport = (config, socket) => {
|
|
|
41
41
|
const distributePrefix = `${prefix}/distribute`;
|
|
42
42
|
const isLog = config('log');
|
|
43
43
|
|
|
44
|
-
const onError = squad(
|
|
44
|
+
const onError = squad(logWrapped(isLog, exportStr), getMessage);
|
|
45
45
|
|
|
46
|
-
const onConnectError = squad(
|
|
46
|
+
const onConnectError = squad(logWrapped(isLog, exportStr), getDescription);
|
|
47
47
|
|
|
48
48
|
socket
|
|
49
49
|
.of(distributePrefix)
|
|
@@ -18,7 +18,7 @@ const {
|
|
|
18
18
|
authTryStr,
|
|
19
19
|
getMessage,
|
|
20
20
|
getDescription,
|
|
21
|
-
|
|
21
|
+
logWrapped,
|
|
22
22
|
} = log;
|
|
23
23
|
|
|
24
24
|
const {entries} = Object;
|
|
@@ -94,23 +94,23 @@ export const distributeImport = (config, options, fn) => {
|
|
|
94
94
|
const close = closeIfNot(socket, importListen);
|
|
95
95
|
|
|
96
96
|
const statusStore = fullstore();
|
|
97
|
-
const
|
|
97
|
+
const statusStoreWrapped = wraptile(statusStore);
|
|
98
98
|
|
|
99
|
-
const onConfig = squad(close,
|
|
99
|
+
const onConfig = squad(close, logWrapped(isLog, importStr, `config received from ${colorUrl}`), statusStoreWrapped('received'), updateConfig(config));
|
|
100
100
|
|
|
101
|
-
const onError = squad(superFn('error'),
|
|
101
|
+
const onError = squad(superFn('error'), logWrapped(isLog, config, importStr), addUrl(colorUrl), getMessage);
|
|
102
102
|
|
|
103
|
-
const onConnectError = squad(superFn('connect_error'),
|
|
103
|
+
const onConnectError = squad(superFn('connect_error'), logWrapped(isLog, importStr), addUrl(colorUrl), getDescription);
|
|
104
104
|
|
|
105
105
|
const onConnect = emitAuth(importUrl, config, socket);
|
|
106
|
-
const onAccept =
|
|
106
|
+
const onAccept = logWrapped(isLog, importStr, `${connectedStr} to ${colorUrl}`);
|
|
107
107
|
|
|
108
108
|
const onDisconnect = squad(
|
|
109
109
|
done(
|
|
110
110
|
fn,
|
|
111
111
|
statusStore,
|
|
112
112
|
),
|
|
113
|
-
|
|
113
|
+
logWrapped(
|
|
114
114
|
isLog,
|
|
115
115
|
importStr,
|
|
116
116
|
`${disconnectedStr} from ${colorUrl}`,
|
|
@@ -125,9 +125,9 @@ export const distributeImport = (config, options, fn) => {
|
|
|
125
125
|
),
|
|
126
126
|
);
|
|
127
127
|
|
|
128
|
-
const onChange = squad(
|
|
128
|
+
const onChange = squad(logWrapped(isLog, importStr), config);
|
|
129
129
|
|
|
130
|
-
const onReject = squad(superFn('reject'),
|
|
130
|
+
const onReject = squad(superFn('reject'), logWrapped(
|
|
131
131
|
isLog,
|
|
132
132
|
importStr,
|
|
133
133
|
tokenRejectedStr,
|
|
@@ -12,7 +12,7 @@ export const getDescription = (e) => e.message;
|
|
|
12
12
|
|
|
13
13
|
export default log;
|
|
14
14
|
|
|
15
|
-
export const
|
|
15
|
+
export const logWrapped = wraptile(log);
|
|
16
16
|
|
|
17
17
|
export const importStr = 'import';
|
|
18
18
|
export const exportStr = 'export';
|
|
@@ -43,7 +43,7 @@ assign(log, {
|
|
|
43
43
|
getDescription,
|
|
44
44
|
authTryStr,
|
|
45
45
|
stringToRGB,
|
|
46
|
-
|
|
46
|
+
logWrapped,
|
|
47
47
|
importStr,
|
|
48
48
|
exportStr,
|
|
49
49
|
connectedStr,
|