cloudcmd 17.4.0 → 17.4.2
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/CONTRIBUTING.md +2 -2
- package/ChangeLog +16 -0
- package/HELP.md +3 -1
- package/README.md +1 -1
- package/bin/release.mjs +1 -1
- package/dist/cloudcmd.common.js +2 -2
- package/dist/cloudcmd.common.js.map +1 -1
- package/dist/cloudcmd.js +1 -1
- package/dist/cloudcmd.js.map +1 -1
- package/dist/modules/config.js +1 -1
- package/dist/modules/config.js.map +1 -1
- package/dist/modules/edit-names.js.map +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/dist-dev/cloudcmd.common.js +13 -13
- package/dist-dev/cloudcmd.js +4 -4
- package/dist-dev/modules/config.js +1 -1
- package/dist-dev/modules/edit-names.js +1 -1
- package/dist-dev/sw.js +1 -1
- package/package.json +8 -8
- package/server/columns.spec.mjs +1 -1
- package/server/distribute/export.spec.mjs +1 -1
- package/server/distribute/import.mjs +1 -1
- package/server/distribute/import.spec.mjs +1 -1
- package/server/terminal.js +5 -1
- package/server/themes.spec.mjs +1 -1
- package/server/user-menu.spec.mjs +1 -1
- package/server/validate.mjs +18 -3
package/dist/modules/config.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(e){function t(t){for(var o,s,i=t[0],a=t[1],u=t[2],f=0,d=[];f<i.length;f++)s=i[f],Object.prototype.hasOwnProperty.call(c,s)&&c[s]&&d.push(c[s][0]),c[s]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);for(l&&l(t);d.length;)d.shift()();return r.push.apply(r,u||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],o=!0,i=1;i<n.length;i++){var a=n[i];0!==c[a]&&(o=!1)}o&&(r.splice(t--,1),e=s(s.s=n[0]))}return e}var o={},c={3:0},r=[];function s(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=e,s.c=o,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)s.d(n,o,function(t){return e[t]}.bind(null,o));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/dist/";var i=window.webpackJsonp=window.webpackJsonp||[],a=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=a;r.push([103,0]),n()}({103:function(e,t,n){"use strict";n(183);const o=n(13),c=n(0),r=n(8),s=n(37),{promisify:i}=n(14),a=n(3),u=n(4),l=n(2),f=n(104),d=n(1),p=n(17),g=n(16),{getTitle:m}=n(6),{Dialog:y,setTitle:h}=DOM;CloudCmd.Config=e.exports;const b=i(DOM.loadSocket),w=c((e,t)=>(p.addKey(t,e),t)),C=c((e,t)=>(p.add("change",t,e),t)),v={};let x;const k=u.css;e.exports.init=async()=>{if(!CloudCmd.config("configDialog"))return;d.show.load("top");const{prefix:e}=CloudCmd;[x]=await Promise.all([g.get("config-tmpl"),b(),k(e+"/dist/config.css"),CloudCmd.View()]),function(){const e=function(){const{host:e,origin:t,protocol:n}=location;return t||`${n}//${e}`}(),{prefixSocket:t,prefix:n}=CloudCmd,o=io.connect(e+t+"/config",{reconnectionAttempts:1/0,reconnectionDelay:6e4,path:n+"/socket.io"}),c=e=>{P(e),o.send(e)};(function(e){e.emit("auth",O("username"),O("password")),e.on("reject",r(y.alert,"Wrong credentials!"))})(o),o.on("connect",()=>{v.save=c}),o.on("message",P),o.on("log",CloudCmd.log),o.on("disconnect",()=>{v.save=D}),o.on("err",y.alert)}()};const{config:O,Key:j}=CloudCmd;let S;function M(){CloudCmd.View.hide()}async function N(e){const t={},n=f.getName(e),o=f.getValue(n,S);"name"===n?function(e){h(m({name:e}))}(o):"auth"===n&&E(o),t[n]=o,await v.save(t)}function P(e){for(const t of Object.keys(e)){const n=e[t];CloudCmd._config(t,n),f.setValue(t,n,S)}}async function D(e){const{RESTful:t}=DOM,[n]=await t.Config.write(e);n||P(e)}function E(e){const t=f.getElementByName("username",S),n=f.getElementByName("password",S);t.disabled
|
|
1
|
+
!function(e){function t(t){for(var o,s,i=t[0],a=t[1],u=t[2],f=0,d=[];f<i.length;f++)s=i[f],Object.prototype.hasOwnProperty.call(c,s)&&c[s]&&d.push(c[s][0]),c[s]=0;for(o in a)Object.prototype.hasOwnProperty.call(a,o)&&(e[o]=a[o]);for(l&&l(t);d.length;)d.shift()();return r.push.apply(r,u||[]),n()}function n(){for(var e,t=0;t<r.length;t++){for(var n=r[t],o=!0,i=1;i<n.length;i++){var a=n[i];0!==c[a]&&(o=!1)}o&&(r.splice(t--,1),e=s(s.s=n[0]))}return e}var o={},c={3:0},r=[];function s(t){if(o[t])return o[t].exports;var n=o[t]={i:t,l:!1,exports:{}};return e[t].call(n.exports,n,n.exports,s),n.l=!0,n.exports}s.m=e,s.c=o,s.d=function(e,t,n){s.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,t){if(1&t&&(e=s(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(s.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)s.d(n,o,function(t){return e[t]}.bind(null,o));return n},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,"a",t),t},s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.p="/dist/";var i=window.webpackJsonp=window.webpackJsonp||[],a=i.push.bind(i);i.push=t,i=i.slice();for(var u=0;u<i.length;u++)t(i[u]);var l=a;r.push([103,0]),n()}({103:function(e,t,n){"use strict";n(183);const o=n(13),c=n(0),r=n(8),s=n(37),{promisify:i}=n(14),a=n(3),u=n(4),l=n(2),f=n(104),d=n(1),p=n(17),g=n(16),{getTitle:m}=n(6),{Dialog:y,setTitle:h}=DOM;CloudCmd.Config=e.exports;const b=i(DOM.loadSocket),w=c((e,t)=>(p.addKey(t,e),t)),C=c((e,t)=>(p.add("change",t,e),t)),v={};let x;const k=u.css;e.exports.init=async()=>{if(!CloudCmd.config("configDialog"))return;d.show.load("top");const{prefix:e}=CloudCmd;[x]=await Promise.all([g.get("config-tmpl"),b(),k(e+"/dist/config.css"),CloudCmd.View()]),function(){const e=function(){const{host:e,origin:t,protocol:n}=location;return t||`${n}//${e}`}(),{prefixSocket:t,prefix:n}=CloudCmd,o=io.connect(e+t+"/config",{reconnectionAttempts:1/0,reconnectionDelay:6e4,path:n+"/socket.io"}),c=e=>{P(e),o.send(e)};(function(e){e.emit("auth",O("username"),O("password")),e.on("reject",r(y.alert,"Wrong credentials!"))})(o),o.on("connect",()=>{v.save=c}),o.on("message",P),o.on("log",CloudCmd.log),o.on("disconnect",()=>{v.save=D}),o.on("err",y.alert)}()};const{config:O,Key:j}=CloudCmd;let S;function M(){CloudCmd.View.hide()}async function N(e){const t={},n=f.getName(e),o=f.getValue(n,S);"name"===n?function(e){h(m({name:e}))}(o):"auth"===n&&E(o),t[n]=o,await v.save(t)}function P(e){for(const t of Object.keys(e)){const n=e[t];CloudCmd._config(t,n),f.setValue(t,n,S)}}async function D(e){const{RESTful:t}=DOM,[n]=await t.Config.write(e);n||P(e)}function E(e){const t=f.getElementByName("username",S),n=f.getElementByName("password",S);t.disabled=!e,n.disabled=!e}async function T({keyCode:e,target:t}){switch(e){case j.ESC:return M();case j.ENTER:return await N(t)}}v.save=D,e.exports.show=async function(){if(!CloudCmd.config("configDialog"))return;await async function(){const[e,t]=await a(g.get,"config");if(e)return y.alert("Could not load config!");const{editor:n,packer:c,columns:r,theme:i,configAuth:u,...d}=f.convert(t);d[n+"-selected"]="selected",d[c+"-selected"]="selected",d[r+"-selected"]="selected",d[i+"-selected"]="selected",d.configAuth=u?"":"hidden";const p=o(x,d);S=l("form",{className:"config",innerHTML:p});const m=document.querySelectorAll("input, select",S),[h]=m;let b;h&&(E(h.checked),b=h.focus.bind(h));const v=s(N,({target:e})=>e);Array.from(m).map(w(T)).map(C(v));CloudCmd.View.show(S,{autoSize:!0,afterShow:b})}()},e.exports.hide=M},104:function(e,t,n){"use strict";const o=n(0)((e,t,n)=>e===typeof t[n])("boolean");function c(e,t){const n=`[data-name="js-${e}"]`;return t.querySelector(n)}function r(e){return e?" checked":""}e.exports.getElementByName=c,e.exports.getName=e=>e.getAttribute("data-name").replace(/^js-/,""),e.exports.convert=e=>{const t=e,n=Object.keys(e).filter(o(e));for(const o of n){const n=e[o];t[o]=r(n)}return t},e.exports.getValue=(e,t)=>{const n=c(e,t),{type:o}=n;switch(o){case"checkbox":return n.checked;case"number":return Number(n.value);default:return n.value}},e.exports.setValue=(e,t,n)=>{const o=c(e,n),{type:r}=o;switch(r){case"checkbox":o.checked=t;break;default:o.value=t}}},183:function(e,t){}});
|
|
2
2
|
//# sourceMappingURL=config.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file://cloudcmd/modules/config.js"],"names":["modules","webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","3","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","103","rendy","currify","wraptile","squad","promisify","tryToCatch","load","createElement","input","Images","Events","Files","getTitle","Dialog","setTitle","DOM","CloudCmd","loadSocket","addKey","fn","addChange","add","Config","Template","loadCSS","css","init","async","config","show","prefix","Promise","all","View","href","host","origin","protocol","location","getHost","prefixSocket","socket","io","connect","reconnectionAttempts","Infinity","reconnectionDelay","path","save","onSave","send","emit","on","alert","authCheck","log","saveHttp","initSocket","Key","Element","hide","onChange","el","obj","getName","getValue","onNameChange","onAuthChange","keys","_config","setValue","RESTful","e","write","checked","elUsername","getElementByName","elPassword","disabled","onKey","keyCode","target","ESC","ENTER","error","editor","packer","columns","theme","configAuth","convert","innerHTML","className","inputs","document","querySelectorAll","inputFirst","afterShow","focus","handleChange","Array","from","map","autoSize","fillTemplate","104","isBool","type","isType","selector","element","str","querySelector","setState","state","getAttribute","replace","filtered","filter","item","Number","183"],"mappings":"CAAS,SAAUA,GAET,SAASC,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDH,EAAQG,GAAYG,EAAYH,IAKlC,IAFGc,GAAqBA,EAAoBf,GAEtCO,EAASC,QACdD,EAASS,OAATT,GAOD,OAHAU,EAAgBH,KAAKI,MAAMD,EAAiBZ,GAAkB,IAGvDc,IAER,SAASA,IAER,IADA,IAA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ASC,IACP5C,SAASiB,KAAK2B,OAEhBjC,eAAekC,EAASC,GACtB,MAAMC,EAAM,GACNzF,EAAOkC,EAAMwD,QAAQF,GACrB5H,EAAOsE,EAAMyD,SAAS3F,EAAMqF,GACrB,SAATrF,
|
|
1
|
+
{"version":3,"sources":["file://cloudcmd/modules/config.js"],"names":["modules","webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","3","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","103","rendy","currify","wraptile","squad","promisify","tryToCatch","load","createElement","input","Images","Events","Files","getTitle","Dialog","setTitle","DOM","CloudCmd","loadSocket","addKey","fn","addChange","add","Config","Template","loadCSS","css","init","async","config","show","prefix","Promise","all","View","href","host","origin","protocol","location","getHost","prefixSocket","socket","io","connect","reconnectionAttempts","Infinity","reconnectionDelay","path","save","onSave","send","emit","on","alert","authCheck","log","saveHttp","initSocket","Key","Element","hide","onChange","el","obj","getName","getValue","onNameChange","onAuthChange","keys","_config","setValue","RESTful","e","write","checked","elUsername","getElementByName","elPassword","disabled","onKey","keyCode","target","ESC","ENTER","error","editor","packer","columns","theme","configAuth","convert","innerHTML","className","inputs","document","querySelectorAll","inputFirst","afterShow","focus","handleChange","Array","from","map","autoSize","fillTemplate","104","isBool","type","isType","selector","element","str","querySelector","setState","state","getAttribute","replace","filtered","filter","item","Number","183"],"mappings":"CAAS,SAAUA,GAET,SAASC,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzB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J,EAAOD,QAAQ4G,iBAAmBA,EAKlC3G,EAAOD,QAAQgG,QAAU8C,GACVA,EAAQK,aAAa,aAAaC,QAAQ,OAAQ,IAGjEnJ,EAAOD,QAAQ0H,QAAU9D,IACvB,MAAMtE,EAASsE,EAETyF,EADQ1K,OAAOyH,KAAKxC,GACH0F,OAAOZ,EAAO9E,IACrC,IAAK,MAAMtD,KAAQ+I,EAAU,CAC3B,MAAME,EAAO3F,EAAOtD,GACpBhB,EAAOgB,GAAQ2I,EAASM,GAE1B,OAAOjK,GAMTW,EAAOD,QAAQiG,SAAW,CAAC3F,EAAMwI,KAC/B,MAAMhD,EAAKc,EAAiBtG,EAAMwI,IAC5BH,KACJA,GACE7C,EACJ,OAAQ6C,GACN,IAAK,WACH,OAAO7C,EAAGY,QACZ,IAAK,SACH,OAAO8C,OAAO1D,EAAG/E,OACnB,QACE,OAAO+E,EAAG/E,QAGhBd,EAAOD,QAAQsG,SAAW,CAAChG,EAAMS,EAAO+H,KACtC,MAAMhD,EAAKc,EAAiBtG,EAAMwI,IAC5BH,KACJA,GACE7C,EACJ,OAAQ6C,GACN,IAAK,WACH7C,EAAGY,QAAU3F,EACb,MACF,QACE+E,EAAG/E,MAAQA,KAOX0I,IACA,SAAUxJ,EAAQD","file":"./modules/config.js","sourceRoot":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["file://cloudcmd/modules/edit-names.js"],"names":["modules","webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","8","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","90","CloudCmd","EditNames","currify","exec","supermenu","multiRename","reject","Promise","Info","DOM","CurrentInfo","Dialog","refresh","to","nameIndex","res","status","text","then","currentName","rename","path","from","root","dir","getDir","prefix","fetch","method","credentials","body","JSON","stringify","Menu","ConfigView","beforeClose","async","ifExist","Events","remove","keyListener","isChanged","event","ctrl","ctrlKey","meta","metaKey","ctrlMeta","Key","keyCode","S","hide","P","pattern","prompt","newNames","getActiveNames","Edit","getEditor","setValue","join","applyPattern","getFilenames","getActiveFiles","applyNames","dirPath","indexOf","getValue","split","config","resolve","catch","alert","setMenu","position","x","clientX","y","clientY","preventDefault","editor","options","beforeShow","params","afterClick","focus","menuData","Save Ctrl+S","Go To Line Ctrl+G","goToLine","Cut Ctrl+X","cutToClipboard","Copy Ctrl+C","copyToClipboard","Paste Ctrl+V","pasteFromClipboard","Delete Del","Select All Ctrl+A","selectAll","Close Esc","element","getElement","addContextMenuListener","show","names","confirm","init","addOnce","setListeners","noFiles","addKey","setValueFirst","setMode","setOption","disableKey"],"mappings":"CAAS,SAAUA,GAET,SAASC,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDH,EAAQG,GAAYG,EAAYH,IAKlC,IAFGc,GAAqBA,EAAoBf,GAEtCO,EAASC,QACdD,EAASS,OAATT,GAOD,OAHAU,EAAgBH,KAAKI,MAAMD,EAAiBZ,GAAkB,IAGvDc,IAER,SAASA,IAER,IADA,IAAIC,EACId,EAAI,EAAGA,EAAIW,EAAgBT,OAAQF,IAAK,CAG/C,IAFA,IAAIe,EAAiBJ,EAAgBX,GACj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4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOnB,EAAoBS,EAAEc,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRvB,EAAoB2B,EAAI,SAAStB,GAChC,IAAIM,EAASN,GAAUA,EAAOiB,WAC7B,WAAwB,OAAOjB,EAAgB,SAC/C,WAA8B,OAAOA,GAEtC,OADAL,EAAoBS,EAAEE,EAAQ,IAAKA,GAC5BA,GAIRX,EAAoBY,EAAI,SAASgB,EAAQC,GAAY,OAAO9C,OAAOC,UAAUC,eAAeC,KAAK0C,EAAQC,IAGzG7B,EAAoB8B,EAAI,SAExB,IAAIC,EAAaC,OAAqB,aAAIA,OAAqB,cAAK,GAChEC,EAAmBF,EAAW3C,KAAKsC,KAAKK,GAC5CA,EAAW3C,KAAOf,EAClB0D,EAAaA,EAAWG,QACxB,IAAI,IAAItD,EAAI,EAAGA,EAAImD,EAAWjD,OAAQF,IAAKP,EAAqB0D,EAAWnD,IAC3E,IAAIS,EAAsB4C,EAI1B1C,EAAgBH,KAAK,CAAC,GAAG,IAElBK,IAxJR,CA2JC,CAEJ0C,GACA,SAAU9B,EAAQD,EAASJ,GAEjC,aAIAoC,SAASC,UAAYjC,EACrB,MAAMkC,EAAUtC,EAAoB,GAC9BuC,EAAOvC,EAAoB,GAC3BwC,EAAYxC,EAAoB,IAChCyC,EAAczC,EAAoB,IAClC0C,EAASC,QAAQD,OAAOhB,KAAKiB,SAC7BC,EAAOC,IAAIC,aACXC,OACJA,GACEF,IACEG,EAAUV,
|
|
1
|
+
{"version":3,"sources":["file://cloudcmd/modules/edit-names.js"],"names":["modules","webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","8","exports","module","l","m","c","d","name","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","p","jsonpArray","window","oldJsonpFunction","slice","90","CloudCmd","EditNames","currify","exec","supermenu","multiRename","reject","Promise","Info","DOM","CurrentInfo","Dialog","refresh","to","nameIndex","res","status","text","then","currentName","rename","path","from","root","dir","getDir","prefix","fetch","method","credentials","body","JSON","stringify","Menu","ConfigView","beforeClose","async","ifExist","Events","remove","keyListener","isChanged","event","ctrl","ctrlKey","meta","metaKey","ctrlMeta","Key","keyCode","S","hide","P","pattern","prompt","newNames","getActiveNames","Edit","getEditor","setValue","join","applyPattern","getFilenames","getActiveFiles","applyNames","dirPath","indexOf","getValue","split","config","resolve","catch","alert","setMenu","position","x","clientX","y","clientY","preventDefault","editor","options","beforeShow","params","afterClick","focus","menuData","Save Ctrl+S","Go To Line Ctrl+G","goToLine","Cut Ctrl+X","cutToClipboard","Copy Ctrl+C","copyToClipboard","Paste Ctrl+V","pasteFromClipboard","Delete Del","Select All Ctrl+A","selectAll","Close Esc","element","getElement","addContextMenuListener","show","names","confirm","init","addOnce","setListeners","noFiles","addKey","setValueFirst","setMode","setOption","disableKey"],"mappings":"CAAS,SAAUA,GAET,SAASC,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDH,EAAQG,GAAYG,EAAYH,IAKlC,IAFGc,GAAqBA,EAAoBf,GAEtCO,EAASC,QACdD,EAASS,OAATT,GAOD,OAHAU,EAAgBH,KAAKI,M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AASyD,OAwBlBxF,EAAOD,QAAQmF,KAAOA,EA0FtBlF,EAAOD,QAAQyE,UAAYA","file":"./modules/edit-names.js","sourceRoot":""}
|
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: Wed
|
|
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 Jul 03 2024 16:09:32 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,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AI/C,MAAM,mCAEpB5D,EAAQ4G,MAAQ,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,EAAoBk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C9B,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":""}
|
|
@@ -176,7 +176,7 @@ eval("\n\nconst itype = __webpack_require__(/*! itype */ \"./node_modules/itype/
|
|
|
176
176
|
/***/ (function(module, exports, __webpack_require__) {
|
|
177
177
|
|
|
178
178
|
"use strict";
|
|
179
|
-
eval("\n\n/* global CloudCmd */\nconst capitalize = __webpack_require__(/*! just-capitalize */ \"./node_modules/just-capitalize/index.
|
|
179
|
+
eval("\n\n/* global CloudCmd */\nconst capitalize = __webpack_require__(/*! just-capitalize */ \"./node_modules/just-capitalize/index.cjs\");\nconst Dialog = __webpack_require__(/*! ../dialog */ \"./client/dom/dialog.js\");\nconst Storage = __webpack_require__(/*! ../storage */ \"./client/dom/storage.js\");\nconst RESTful = __webpack_require__(/*! ../rest */ \"./client/dom/rest.js\");\nconst {\n isCurrentFile,\n getCurrentName,\n getCurrentFile,\n getCurrentByName,\n getCurrentType,\n getCurrentDirPath,\n setCurrentName\n} = __webpack_require__(/*! ../current-file */ \"./client/dom/current-file.js\");\nmodule.exports = async current => {\n if (!isCurrentFile(current)) current = getCurrentFile();\n const from = getCurrentName(current);\n if (from === '..') return Dialog.alert.noFiles();\n const [cancel, to] = await Dialog.prompt('Rename', from);\n if (cancel) return;\n const nextFile = getCurrentByName(to);\n if (nextFile) {\n const type = getCurrentType(nextFile);\n const msg = `${capitalize(type)} \"${to}\" already exists. Proceed?`;\n const [cancel] = await Dialog.confirm(msg);\n if (cancel) return;\n }\n if (from === to) return;\n const dirPath = getCurrentDirPath();\n const fromFull = `${dirPath}${from}`;\n const toFull = `${dirPath}${to}`;\n const [e] = await RESTful.rename(fromFull, toFull);\n if (e) return;\n setCurrentName(to, current);\n Storage.remove(dirPath);\n CloudCmd.refresh();\n};\n\n//# sourceURL=file://cloudcmd/client/dom/operations/rename-current.js");
|
|
180
180
|
|
|
181
181
|
/***/ }),
|
|
182
182
|
|
|
@@ -319,7 +319,7 @@ eval("// removed by extract-text-webpack-plugin\n\n//# sourceURL=file://cloudcmd
|
|
|
319
319
|
/***/ (function(module, exports, __webpack_require__) {
|
|
320
320
|
|
|
321
321
|
"use strict";
|
|
322
|
-
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.codeFrameColumns = codeFrameColumns;\nexports.default = _default;\nvar _highlight = __webpack_require__(/*! @babel/highlight */ \"./node_modules/@babel/highlight/lib/index.js\");\nvar _picocolors = _interopRequireWildcard(__webpack_require__(/*! picocolors */ \"./node_modules/picocolors/picocolors.browser.js\"), true);\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u &&
|
|
322
|
+
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.codeFrameColumns = codeFrameColumns;\nexports.default = _default;\nvar _highlight = __webpack_require__(/*! @babel/highlight */ \"./node_modules/@babel/highlight/lib/index.js\");\nvar _picocolors = _interopRequireWildcard(__webpack_require__(/*! picocolors */ \"./node_modules/picocolors/picocolors.browser.js\"), true);\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nconst colors = typeof process === \"object\" && (process.env.FORCE_COLOR === \"0\" || process.env.FORCE_COLOR === \"false\") ? (0, _picocolors.createColors)(false) : _picocolors.default;\nconst compose = (f, g) => v => f(g(v));\nlet pcWithForcedColor = undefined;\nfunction getColors(forceColor) {\n if (forceColor) {\n var _pcWithForcedColor;\n (_pcWithForcedColor = pcWithForcedColor) != null ? _pcWithForcedColor : pcWithForcedColor = (0, _picocolors.createColors)(true);\n return pcWithForcedColor;\n }\n return colors;\n}\nlet deprecationWarningShown = false;\nfunction getDefs(colors) {\n return {\n gutter: colors.gray,\n marker: compose(colors.red, colors.bold),\n message: compose(colors.red, colors.bold)\n };\n}\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nfunction getMarkerLines(loc, source, opts) {\n const startLoc = Object.assign({\n column: 0,\n line: -1\n }, loc.start);\n const endLoc = Object.assign({}, startLoc, loc.end);\n const {\n linesAbove = 2,\n linesBelow = 3\n } = opts || {};\n const startLine = startLoc.line;\n const startColumn = startLoc.column;\n const endLine = endLoc.line;\n const endColumn = endLoc.column;\n let start = Math.max(startLine - (linesAbove + 1), 0);\n let end = Math.min(source.length, endLine + linesBelow);\n if (startLine === -1) {\n start = 0;\n }\n if (endLine === -1) {\n end = source.length;\n }\n const lineDiff = endLine - startLine;\n const markerLines = {};\n if (lineDiff) {\n for (let i = 0; i <= lineDiff; i++) {\n const lineNumber = i + startLine;\n if (!startColumn) {\n markerLines[lineNumber] = true;\n } else if (i === 0) {\n const sourceLength = source[lineNumber - 1].length;\n markerLines[lineNumber] = [startColumn, sourceLength - startColumn + 1];\n } else if (i === lineDiff) {\n markerLines[lineNumber] = [0, endColumn];\n } else {\n const sourceLength = source[lineNumber - i].length;\n markerLines[lineNumber] = [0, sourceLength];\n }\n }\n } else {\n if (startColumn === endColumn) {\n if (startColumn) {\n markerLines[startLine] = [startColumn, 0];\n } else {\n markerLines[startLine] = true;\n }\n } else {\n markerLines[startLine] = [startColumn, endColumn - startColumn];\n }\n }\n return {\n start,\n end,\n markerLines\n };\n}\nfunction codeFrameColumns(rawLines, loc, opts = {}) {\n const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);\n const colors = getColors(opts.forceColor);\n const defs = getDefs(colors);\n const maybeHighlight = (fmt, string) => {\n return highlighted ? fmt(string) : string;\n };\n const lines = rawLines.split(NEWLINE);\n const {\n start,\n end,\n markerLines\n } = getMarkerLines(loc, lines, opts);\n const hasColumns = loc.start && typeof loc.start.column === \"number\";\n const numberMaxWidth = String(end).length;\n const highlightedLines = highlighted ? (0, _highlight.default)(rawLines, opts) : rawLines;\n let frame = highlightedLines.split(NEWLINE, end).slice(start, end).map((line, index) => {\n const number = start + 1 + index;\n const paddedNumber = ` ${number}`.slice(-numberMaxWidth);\n const gutter = ` ${paddedNumber} |`;\n const hasMarker = markerLines[number];\n const lastMarkerLine = !markerLines[number + 1];\n if (hasMarker) {\n let markerLine = \"\";\n if (Array.isArray(hasMarker)) {\n const markerSpacing = line.slice(0, Math.max(hasMarker[0] - 1, 0)).replace(/[^\\t]/g, \" \");\n const numberOfMarkers = hasMarker[1] || 1;\n markerLine = [\"\\n \", maybeHighlight(defs.gutter, gutter.replace(/\\d/g, \" \")), \" \", markerSpacing, maybeHighlight(defs.marker, \"^\").repeat(numberOfMarkers)].join(\"\");\n if (lastMarkerLine && opts.message) {\n markerLine += \" \" + maybeHighlight(defs.message, opts.message);\n }\n }\n return [maybeHighlight(defs.marker, \">\"), maybeHighlight(defs.gutter, gutter), line.length > 0 ? ` ${line}` : \"\", markerLine].join(\"\");\n } else {\n return ` ${maybeHighlight(defs.gutter, gutter)}${line.length > 0 ? ` ${line}` : \"\"}`;\n }\n }).join(\"\\n\");\n if (opts.message && !hasColumns) {\n frame = `${\" \".repeat(numberMaxWidth + 1)}${opts.message}\\n${frame}`;\n }\n if (highlighted) {\n return colors.reset(frame);\n } else {\n return frame;\n }\n}\nfunction _default(rawLines, lineNumber, colNumber, opts = {}) {\n if (!deprecationWarningShown) {\n deprecationWarningShown = true;\n const message = \"Passing lineNumber and colNumber is deprecated to @babel/code-frame. Please use `codeFrameColumns`.\";\n if (process.emitWarning) {\n process.emitWarning(message, \"DeprecationWarning\");\n } else {\n const deprecationError = new Error(message);\n deprecationError.name = \"DeprecationWarning\";\n console.warn(new Error(message));\n }\n }\n colNumber = Math.max(colNumber, 0);\n const location = {\n start: {\n column: colNumber,\n line: lineNumber\n }\n };\n return codeFrameColumns(rawLines, location, opts);\n}\n\n//# sourceMappingURL=index.js.map\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/code-frame/lib/index.js");
|
|
323
323
|
|
|
324
324
|
/***/ }),
|
|
325
325
|
|
|
@@ -367,7 +367,7 @@ eval("\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n
|
|
|
367
367
|
/***/ (function(module, exports, __webpack_require__) {
|
|
368
368
|
|
|
369
369
|
"use strict";
|
|
370
|
-
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = highlight;\nexports.shouldHighlight = shouldHighlight;\nvar _jsTokens = __webpack_require__(/*! js-tokens */ \"./node_modules/js-tokens/index.js\");\nvar _helperValidatorIdentifier = __webpack_require__(/*! @babel/helper-validator-identifier */ \"./node_modules/@babel/helper-validator-identifier/lib/index.js\");\nvar _picocolors = _interopRequireWildcard(__webpack_require__(/*! picocolors */ \"./node_modules/picocolors/picocolors.browser.js\"), true);\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u &&
|
|
370
|
+
eval("/* WEBPACK VAR INJECTION */(function(process) {\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = highlight;\nexports.shouldHighlight = shouldHighlight;\nvar _jsTokens = __webpack_require__(/*! js-tokens */ \"./node_modules/js-tokens/index.js\");\nvar _helperValidatorIdentifier = __webpack_require__(/*! @babel/helper-validator-identifier */ \"./node_modules/@babel/helper-validator-identifier/lib/index.js\");\nvar _picocolors = _interopRequireWildcard(__webpack_require__(/*! picocolors */ \"./node_modules/picocolors/picocolors.browser.js\"), true);\nfunction _getRequireWildcardCache(e) { if (\"function\" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }\nfunction _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || \"object\" != typeof e && \"function\" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if (\"default\" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }\nconst colors = typeof process === \"object\" && (process.env.FORCE_COLOR === \"0\" || process.env.FORCE_COLOR === \"false\") ? (0, _picocolors.createColors)(false) : _picocolors.default;\nconst compose = (f, g) => v => f(g(v));\nconst sometimesKeywords = new Set([\"as\", \"async\", \"from\", \"get\", \"of\", \"set\"]);\nfunction getDefs(colors) {\n return {\n keyword: colors.cyan,\n capitalized: colors.yellow,\n jsxIdentifier: colors.yellow,\n punctuator: colors.yellow,\n number: colors.magenta,\n string: colors.green,\n regex: colors.magenta,\n comment: colors.gray,\n invalid: compose(compose(colors.white, colors.bgRed), colors.bold)\n };\n}\nconst NEWLINE = /\\r\\n|[\\n\\r\\u2028\\u2029]/;\nconst BRACKET = /^[()[\\]{}]$/;\nlet tokenize;\n{\n const JSX_TAG = /^[a-z][\\w-]*$/i;\n const getTokenType = function (token, offset, text) {\n if (token.type === \"name\") {\n if ((0, _helperValidatorIdentifier.isKeyword)(token.value) || (0, _helperValidatorIdentifier.isStrictReservedWord)(token.value, true) || sometimesKeywords.has(token.value)) {\n return \"keyword\";\n }\n if (JSX_TAG.test(token.value) && (text[offset - 1] === \"<\" || text.slice(offset - 2, offset) === \"</\")) {\n return \"jsxIdentifier\";\n }\n if (token.value[0] !== token.value[0].toLowerCase()) {\n return \"capitalized\";\n }\n }\n if (token.type === \"punctuator\" && BRACKET.test(token.value)) {\n return \"bracket\";\n }\n if (token.type === \"invalid\" && (token.value === \"@\" || token.value === \"#\")) {\n return \"punctuator\";\n }\n return token.type;\n };\n tokenize = function* (text) {\n let match;\n while (match = _jsTokens.default.exec(text)) {\n const token = _jsTokens.matchToToken(match);\n yield {\n type: getTokenType(token, match.index, text),\n value: token.value\n };\n }\n };\n}\nfunction highlightTokens(defs, text) {\n let highlighted = \"\";\n for (const {\n type,\n value\n } of tokenize(text)) {\n const colorize = defs[type];\n if (colorize) {\n highlighted += value.split(NEWLINE).map(str => colorize(str)).join(\"\\n\");\n } else {\n highlighted += value;\n }\n }\n return highlighted;\n}\nfunction shouldHighlight(options) {\n return colors.isColorSupported || options.forceColor;\n}\nlet pcWithForcedColor = undefined;\nfunction getColors(forceColor) {\n if (forceColor) {\n var _pcWithForcedColor;\n (_pcWithForcedColor = pcWithForcedColor) != null ? _pcWithForcedColor : pcWithForcedColor = (0, _picocolors.createColors)(true);\n return pcWithForcedColor;\n }\n return colors;\n}\nfunction highlight(code, options = {}) {\n if (code !== \"\" && shouldHighlight(options)) {\n const defs = getDefs(getColors(options.forceColor));\n return highlightTokens(defs, code);\n } else {\n return code;\n }\n}\n{\n let chalk, chalkWithForcedColor;\n exports.getChalk = ({\n forceColor\n }) => {\n var _chalk;\n (_chalk = chalk) != null ? _chalk : chalk = __webpack_require__(/*! chalk */ \"./node_modules/@babel/highlight/node_modules/chalk/index.js\");\n if (forceColor) {\n var _chalkWithForcedColor;\n (_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new chalk.constructor({\n enabled: true,\n level: 1\n });\n return chalkWithForcedColor;\n }\n return chalk;\n };\n}\n\n//# sourceMappingURL=index.js.map\n\n/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../process/browser.js */ \"./node_modules/process/browser.js\")))\n\n//# sourceURL=file://cloudcmd/node_modules/@babel/highlight/lib/index.js");
|
|
371
371
|
|
|
372
372
|
/***/ }),
|
|
373
373
|
|
|
@@ -828,25 +828,25 @@ eval("// Copyright 2014, 2015, 2016, 2017, 2018 Simon Lydell\n// License: MIT. (
|
|
|
828
828
|
|
|
829
829
|
/***/ }),
|
|
830
830
|
|
|
831
|
-
/***/ "./node_modules/just-capitalize/index.
|
|
832
|
-
|
|
833
|
-
!*** ./node_modules/just-capitalize/index.
|
|
834
|
-
|
|
831
|
+
/***/ "./node_modules/just-capitalize/index.cjs":
|
|
832
|
+
/*!************************************************!*\
|
|
833
|
+
!*** ./node_modules/just-capitalize/index.cjs ***!
|
|
834
|
+
\************************************************/
|
|
835
835
|
/*! no static exports found */
|
|
836
836
|
/***/ (function(module, exports) {
|
|
837
837
|
|
|
838
|
-
eval("module.exports = capitalize;\n\n/*\n capitalize('capitals'); // 'Capitals'\n capitalize('Capitals'); // 'Capitals'\n capitalize('CapiTALS'); // 'Capitals'\n capitalize('many Words'); // 'Many words'\n capitalize('!exclaim'); // '!exclaim'\n*/\n\nfunction capitalize(str) {\n if (typeof str != 'string') {\n throw Error('just-capitalize expects a string argument');\n }\n return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();\n}\n\n\n//# sourceURL=file://cloudcmd/node_modules/just-capitalize/index.
|
|
838
|
+
eval("module.exports = capitalize;\n\n/*\n capitalize('capitals'); // 'Capitals'\n capitalize('Capitals'); // 'Capitals'\n capitalize('CapiTALS'); // 'Capitals'\n capitalize('many Words'); // 'Many words'\n capitalize('!exclaim'); // '!exclaim'\n*/\n\nfunction capitalize(str) {\n if (typeof str != 'string') {\n throw Error('just-capitalize expects a string argument');\n }\n return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();\n}\n\n\n//# sourceURL=file://cloudcmd/node_modules/just-capitalize/index.cjs");
|
|
839
839
|
|
|
840
840
|
/***/ }),
|
|
841
841
|
|
|
842
|
-
/***/ "./node_modules/just-pascal-case/index.
|
|
843
|
-
|
|
844
|
-
!*** ./node_modules/just-pascal-case/index.
|
|
845
|
-
|
|
842
|
+
/***/ "./node_modules/just-pascal-case/index.cjs":
|
|
843
|
+
/*!*************************************************!*\
|
|
844
|
+
!*** ./node_modules/just-pascal-case/index.cjs ***!
|
|
845
|
+
\*************************************************/
|
|
846
846
|
/*! no static exports found */
|
|
847
847
|
/***/ (function(module, exports) {
|
|
848
848
|
|
|
849
|
-
eval("module.exports = pascalCase;\n\n/*\n pascalCase('the quick brown fox'); // 'TheQuickBrownFox'\n pascalCase('the_quick_brown_fox'); // 'TheQuickBrownFox'\n pascalCase('the-quick-brown-fox'); // 'TheQuickBrownFox'\n pascalCase('theQuickBrownFox'); // 'TheQuickBrownFox'\n pascalCase('thequickbrownfox'); // 'Thequickbrownfox'\n pascalCase('the - quick * brown# fox'); // 'TheQuickBrownFox'\n pascalCase('theQUICKBrownFox'); // 'TheQUICKBrownFox'\n*/\n\n// any combination of spaces and punctuation characters\n// thanks to http://stackoverflow.com/a/25575009\nvar wordSeparators = /[\\s\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,\\-.\\/:;<=>?@\\[\\]^_`{|}~]+/;\n\nfunction pascalCase(str) {\n var words = str.split(wordSeparators);\n var len = words.length;\n var mappedWords = new Array(len);\n for (var i = 0; i < len; i++) {\n var word = words[i];\n if (word === '') {\n continue;\n }\n mappedWords[i] = word[0].toUpperCase() + word.slice(1);\n }\n return mappedWords.join('');\n}\n\n\n//# sourceURL=file://cloudcmd/node_modules/just-pascal-case/index.
|
|
849
|
+
eval("module.exports = pascalCase;\n\n/*\n pascalCase('the quick brown fox'); // 'TheQuickBrownFox'\n pascalCase('the_quick_brown_fox'); // 'TheQuickBrownFox'\n pascalCase('the-quick-brown-fox'); // 'TheQuickBrownFox'\n pascalCase('theQuickBrownFox'); // 'TheQuickBrownFox'\n pascalCase('thequickbrownfox'); // 'Thequickbrownfox'\n pascalCase('the - quick * brown# fox'); // 'TheQuickBrownFox'\n pascalCase('theQUICKBrownFox'); // 'TheQUICKBrownFox'\n*/\n\n// any combination of spaces and punctuation characters\n// thanks to http://stackoverflow.com/a/25575009\nvar wordSeparators = /[\\s\\u2000-\\u206F\\u2E00-\\u2E7F\\\\'!\"#$%&()*+,\\-.\\/:;<=>?@\\[\\]^_`{|}~]+/;\n\nfunction pascalCase(str) {\n var words = str.split(wordSeparators);\n var len = words.length;\n var mappedWords = new Array(len);\n for (var i = 0; i < len; i++) {\n var word = words[i];\n if (word === '') {\n continue;\n }\n mappedWords[i] = word[0].toUpperCase() + word.slice(1);\n }\n return mappedWords.join('');\n}\n\n\n//# sourceURL=file://cloudcmd/node_modules/just-pascal-case/index.cjs");
|
|
850
850
|
|
|
851
851
|
/***/ }),
|
|
852
852
|
|
package/dist-dev/cloudcmd.js
CHANGED
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
/***/ (function(module, exports, __webpack_require__) {
|
|
164
164
|
|
|
165
165
|
"use strict";
|
|
166
|
-
eval("\n\nconst process = __webpack_require__(/*! node:process */ \"./node_modules/process/browser.js\");\n\n/* global DOM */\nconst Emitify = __webpack_require__(/*! emitify */ \"./node_modules/emitify/lib/emitify.js\");\nconst inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\nconst rendy = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\nconst load = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst {\n addSlashToEnd\n} = __webpack_require__(/*! format-io */ \"./node_modules/format-io/lib/format.js\");\nconst pascalCase = __webpack_require__(/*! just-pascal-case */ \"./node_modules/just-pascal-case/index.js\");\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\nconst Images = __webpack_require__(/*! ./dom/images */ \"./client/dom/images.js\");\nconst {\n unregisterSW\n} = __webpack_require__(/*! ./sw/register */ \"./client/sw/register.js\");\nconst getJsonFromFileTable = __webpack_require__(/*! ./get-json-from-file-table */ \"./client/get-json-from-file-table.js\");\nconst Key = __webpack_require__(/*! ./key */ \"./client/key/index.js\");\nconst {\n apiURL,\n formatMsg,\n buildFromJSON\n} = __webpack_require__(/*! ../common/cloudfunc */ \"./common/cloudfunc.js\");\nconst loadModule = __webpack_require__(/*! ./load-module */ \"./client/load-module.js\");\nconst noJS = a => a.replace(/.js$/, '');\nconst isDev = process.env.NODE_ENV === 'development';\ninherits(CloudCmdProto, Emitify);\nmodule.exports = new CloudCmdProto(DOM);\nload.addErrorListener((e, src) => {\n const msg = `file ${src} could not be loaded`;\n Images.show.error(msg);\n});\nfunction CloudCmdProto(DOM) {\n let Listeners;\n Emitify.call(this);\n const CloudCmd = this;\n const Info = DOM.CurrentInfo;\n const {\n Storage,\n Files\n } = DOM;\n this.log = (...a) => {\n if (!isDev) return;\n console.log(...a);\n };\n this.prefix = '';\n this.prefixSocket = '';\n this.prefixURL = '';\n this.MIN_ONE_PANEL_WIDTH = 1155;\n this.HOST = location.origin || location.protocol + '//' + location.host;\n this.TITLE = 'Cloud Commander';\n this.sort = {\n left: 'name',\n right: 'name'\n };\n this.order = {\n left: 'asc',\n right: 'asc'\n };\n this.changeDir = async (path, {\n isRefresh,\n panel,\n history = true,\n noCurrent,\n currentName\n } = {}) => {\n const refresh = isRefresh;\n let panelChanged;\n if (!noCurrent && panel && panel !== Info.panel) {\n DOM.changePanel();\n panelChanged = true;\n }\n let imgPosition;\n if (panelChanged || refresh || !history) imgPosition = 'top';\n Images.show.load(imgPosition, panel);\n /* загружаем содержимое каталога */\n await ajaxLoad(addSlashToEnd(path), {\n refresh,\n history,\n noCurrent,\n currentName\n }, panel);\n };\n\n /**\n * Конструктор CloudClient, который\n * выполняет весь функционал по\n * инициализации\n */\n this.init = async (prefix, config) => {\n CloudCmd.prefix = prefix;\n CloudCmd.prefixURL = `${prefix}${apiURL}`;\n CloudCmd.prefixSocket = config.prefixSocket;\n CloudCmd.DIR_DIST = `${prefix}/dist`;\n CloudCmd.DIR_MODULES = `${this.DIR_DIST}/modules`;\n CloudCmd.config = key => config[key];\n CloudCmd.config.if = currify((key, fn, a) => config[key] && fn(a));\n CloudCmd._config = (key, value) => {\n /*\n * should be called from config.js only\n * after successful update on server\n */\n if (key === 'password') return;\n config[key] = value;\n };\n if (config.oneFilePanel) CloudCmd.MIN_ONE_PANEL_WIDTH = Infinity;\n if (!document.body.scrollIntoViewIfNeeded) await load.js(`${CloudCmd.DIR_MODULES}/polyfill.js`);\n await initModules();\n await baseInit();\n await loadStyle();\n CloudCmd.route(location.hash);\n };\n async function loadStyle() {\n const {\n prefix\n } = CloudCmd;\n const name = `${prefix}/dist/cloudcmd.common.css`;\n await load.css(name);\n }\n this.route = path => {\n const query = path.split('/');\n if (!path) return;\n const [kebabModule] = query;\n const module = noJS(pascalCase(kebabModule.slice(1)));\n const file = query[1];\n const current = DOM.getCurrentByName(file);\n if (file && !current) {\n const msg = formatMsg('set current file', file, 'error');\n CloudCmd.log(msg);\n return;\n }\n DOM.setCurrentFile(current);\n CloudCmd.execFromModule(module, 'show');\n };\n this.logOut = async () => {\n const url = CloudCmd.prefix + '/logout';\n const error = () => document.location.reload();\n const {\n prefix\n } = CloudCmd;\n await DOM.Storage.clear();\n unregisterSW(prefix);\n DOM.load.ajax({\n url,\n error\n });\n };\n const initModules = async () => {\n CloudCmd.Key = Key;\n CloudCmd.Key.bind();\n const [, modules] = await tryToCatch(Files.get, 'modules');\n const showLoad = Images.show.load;\n const doBefore = {\n edit: showLoad,\n menu: showLoad\n };\n const load = (name, path, dobefore) => {\n loadModule({\n name,\n path,\n dobefore\n });\n };\n if (!modules) return;\n for (const module of modules.local) {\n load(null, module, doBefore[module]);\n }\n };\n async function saveCurrentName(currentName) {\n await Storage.set('current-name', currentName);\n }\n async function baseInit() {\n const files = DOM.getFiles();\n CloudCmd.on('current-file', DOM.updateCurrentInfo);\n CloudCmd.on('current-name', saveCurrentName);\n const name = await Storage.get('current-name');\n const currentFile = name && DOM.getCurrentByName(name) || files[0];\n\n /* выделяем строку с первым файлом */\n if (files) DOM.setCurrentFile(currentFile, {\n // when hash is present\n // it should be handled with this.route\n // overwre otherwise\n history: !location.hash\n });\n const dirPath = DOM.getCurrentDirPath();\n Listeners = CloudCmd.Listeners;\n Listeners.init();\n const panels = getPanels();\n panels.forEach(Listeners.setOnPanel);\n Listeners.initKeysPanel();\n if (!CloudCmd.config('dirStorage')) return;\n const data = await Storage.get(dirPath);\n if (!data) await Storage.setJson(dirPath, getJsonFromFileTable());\n }\n function getPanels() {\n const panels = ['left'];\n if (CloudCmd.config('oneFilePanel')) return panels;\n return [...panels, 'right'];\n }\n this.execFromModule = async (moduleName, funcName, ...args) => {\n await CloudCmd[moduleName]();\n const func = CloudCmd[moduleName][funcName];\n func(...args);\n };\n this.refresh = async (options = {}) => {\n const {\n panel = Info.panel,\n currentName\n } = options;\n const path = DOM.getCurrentDirPath(panel);\n const isRefresh = true;\n const history = false;\n const noCurrent = options === null || options === void 0 ? void 0 : options.noCurrent;\n await CloudCmd.changeDir(path, {\n isRefresh,\n history,\n panel,\n noCurrent,\n currentName\n });\n };\n\n /**\n * Функция загружает json-данные о Файловой Системе\n * через ajax-запрос.\n * @param path - каталог для чтения\n * @param options\n * { refresh, history } - необходимость обновить данные о каталоге\n * @param panel\n * @param callback\n *\n */\n async function ajaxLoad(path, options = {}, panel) {\n const {\n RESTful\n } = DOM;\n CloudCmd.log(`reading dir: \"${path}\";`);\n const dirStorage = CloudCmd.config('dirStorage');\n const json = dirStorage && (await Storage.getJson(path));\n const name = options.currentName || Info.name;\n const {\n noCurrent,\n refresh\n } = options;\n if (!refresh && json) return await createFileTable(json, panel, options);\n const position = DOM.getPanelPosition(panel);\n const sort = CloudCmd.sort[position];\n const order = CloudCmd.order[position];\n const query = rendy('?sort={{ sort }}&order={{ order }}', {\n sort,\n order\n });\n const [, newObj] = await RESTful.read(path + query, 'json');\n if (!newObj)\n // that's OK, error handled by RESTful\n return;\n options.sort = sort;\n options.order = order;\n await createFileTable(newObj, panel, options);\n if (refresh && !noCurrent) DOM.setCurrentByName(name);\n if (!CloudCmd.config('dirStorage')) return;\n Storage.setJson(path, newObj);\n }\n\n /**\n * Функция строит файловую таблицу\n * @param json - данные о файлах\n * @param panelParam\n * @param history\n * @param callback\n */\n async function createFileTable(data, panelParam, options) {\n const {\n history,\n noCurrent\n } = options;\n const names = ['file', 'path', 'link', 'pathLink'];\n const [error, [file, path, link, pathLink]] = await tryToCatch(Files.get, names);\n if (error) return DOM.Dialog.alert(error.responseText);\n const panel = panelParam || DOM.getPanel();\n const {\n prefix\n } = CloudCmd;\n const {\n dir,\n name\n } = Info;\n const {\n childNodes\n } = panel;\n let i = childNodes.length;\n while (i--) panel.removeChild(panel.lastChild);\n panel.innerHTML = buildFromJSON({\n sort: options.sort,\n order: options.order,\n data,\n id: panel.id,\n prefix,\n template: {\n file,\n path,\n pathLink,\n link\n }\n });\n Listeners.setOnPanel(panel);\n if (!noCurrent) {\n let current;\n if (name === '..' && dir !== '/') current = DOM.getCurrentByName(dir);\n if (!current) [current] = DOM.getFiles(panel);\n DOM.setCurrentFile(current, {\n history\n });\n CloudCmd.emit('active-dir', Info.dirPath);\n }\n }\n this.goToParentDir = async () => {\n const {\n dir,\n dirPath,\n parentDirPath,\n panel\n } = Info;\n if (dirPath === parentDirPath) return;\n const path = parentDirPath;\n await CloudCmd.changeDir(path);\n const current = DOM.getCurrentByName(dir);\n const [first] = DOM.getFiles(panel);\n DOM.setCurrentFile(current || first, {\n history\n });\n };\n}\n\n//# sourceURL=file://cloudcmd/client/client.js");
|
|
166
|
+
eval("\n\nconst process = __webpack_require__(/*! node:process */ \"./node_modules/process/browser.js\");\n\n/* global DOM */\nconst Emitify = __webpack_require__(/*! emitify */ \"./node_modules/emitify/lib/emitify.js\");\nconst inherits = __webpack_require__(/*! inherits */ \"./node_modules/inherits/inherits_browser.js\");\nconst rendy = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\nconst load = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst {\n addSlashToEnd\n} = __webpack_require__(/*! format-io */ \"./node_modules/format-io/lib/format.js\");\nconst pascalCase = __webpack_require__(/*! just-pascal-case */ \"./node_modules/just-pascal-case/index.cjs\");\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\nconst Images = __webpack_require__(/*! ./dom/images */ \"./client/dom/images.js\");\nconst {\n unregisterSW\n} = __webpack_require__(/*! ./sw/register */ \"./client/sw/register.js\");\nconst getJsonFromFileTable = __webpack_require__(/*! ./get-json-from-file-table */ \"./client/get-json-from-file-table.js\");\nconst Key = __webpack_require__(/*! ./key */ \"./client/key/index.js\");\nconst {\n apiURL,\n formatMsg,\n buildFromJSON\n} = __webpack_require__(/*! ../common/cloudfunc */ \"./common/cloudfunc.js\");\nconst loadModule = __webpack_require__(/*! ./load-module */ \"./client/load-module.js\");\nconst noJS = a => a.replace(/.js$/, '');\nconst isDev = process.env.NODE_ENV === 'development';\ninherits(CloudCmdProto, Emitify);\nmodule.exports = new CloudCmdProto(DOM);\nload.addErrorListener((e, src) => {\n const msg = `file ${src} could not be loaded`;\n Images.show.error(msg);\n});\nfunction CloudCmdProto(DOM) {\n let Listeners;\n Emitify.call(this);\n const CloudCmd = this;\n const Info = DOM.CurrentInfo;\n const {\n Storage,\n Files\n } = DOM;\n this.log = (...a) => {\n if (!isDev) return;\n console.log(...a);\n };\n this.prefix = '';\n this.prefixSocket = '';\n this.prefixURL = '';\n this.MIN_ONE_PANEL_WIDTH = 1155;\n this.HOST = location.origin || location.protocol + '//' + location.host;\n this.TITLE = 'Cloud Commander';\n this.sort = {\n left: 'name',\n right: 'name'\n };\n this.order = {\n left: 'asc',\n right: 'asc'\n };\n this.changeDir = async (path, overrides = {}) => {\n const {\n isRefresh,\n panel,\n history = true,\n noCurrent,\n currentName\n } = overrides;\n const refresh = isRefresh;\n let panelChanged;\n if (!noCurrent && panel && panel !== Info.panel) {\n DOM.changePanel();\n panelChanged = true;\n }\n let imgPosition;\n if (panelChanged || refresh || !history) imgPosition = 'top';\n Images.show.load(imgPosition, panel);\n /* загружаем содержимое каталога */\n await ajaxLoad(addSlashToEnd(path), {\n refresh,\n history,\n noCurrent,\n currentName\n }, panel);\n };\n\n /**\n * Конструктор CloudClient, который\n * выполняет весь функционал по\n * инициализации\n */\n this.init = async (prefix, config) => {\n CloudCmd.prefix = prefix;\n CloudCmd.prefixURL = `${prefix}${apiURL}`;\n CloudCmd.prefixSocket = config.prefixSocket;\n CloudCmd.DIR_DIST = `${prefix}/dist`;\n CloudCmd.DIR_MODULES = `${this.DIR_DIST}/modules`;\n CloudCmd.config = key => config[key];\n CloudCmd.config.if = currify((key, fn, a) => config[key] && fn(a));\n CloudCmd._config = (key, value) => {\n /*\n * should be called from config.js only\n * after successful update on server\n */\n if (key === 'password') return;\n config[key] = value;\n };\n if (config.oneFilePanel) CloudCmd.MIN_ONE_PANEL_WIDTH = Infinity;\n if (!document.body.scrollIntoViewIfNeeded) await load.js(`${CloudCmd.DIR_MODULES}/polyfill.js`);\n await initModules();\n await baseInit();\n await loadStyle();\n CloudCmd.route(location.hash);\n };\n async function loadStyle() {\n const {\n prefix\n } = CloudCmd;\n const name = `${prefix}/dist/cloudcmd.common.css`;\n await load.css(name);\n }\n this.route = path => {\n const query = path.split('/');\n if (!path) return;\n const [kebabModule] = query;\n const module = noJS(pascalCase(kebabModule.slice(1)));\n const file = query[1];\n const current = DOM.getCurrentByName(file);\n if (file && !current) {\n const msg = formatMsg('set current file', file, 'error');\n CloudCmd.log(msg);\n return;\n }\n DOM.setCurrentFile(current);\n CloudCmd.execFromModule(module, 'show');\n };\n this.logOut = async () => {\n const url = CloudCmd.prefix + '/logout';\n const error = () => document.location.reload();\n const {\n prefix\n } = CloudCmd;\n await DOM.Storage.clear();\n unregisterSW(prefix);\n DOM.load.ajax({\n url,\n error\n });\n };\n const initModules = async () => {\n CloudCmd.Key = Key;\n CloudCmd.Key.bind();\n const [, modules] = await tryToCatch(Files.get, 'modules');\n const showLoad = Images.show.load;\n const doBefore = {\n edit: showLoad,\n menu: showLoad\n };\n const load = (name, path, dobefore) => {\n loadModule({\n name,\n path,\n dobefore\n });\n };\n if (!modules) return;\n for (const module of modules.local) {\n load(null, module, doBefore[module]);\n }\n };\n async function saveCurrentName(currentName) {\n await Storage.set('current-name', currentName);\n }\n async function baseInit() {\n const files = DOM.getFiles();\n CloudCmd.on('current-file', DOM.updateCurrentInfo);\n CloudCmd.on('current-name', saveCurrentName);\n const name = await Storage.get('current-name');\n const currentFile = name && DOM.getCurrentByName(name) || files[0];\n\n /* выделяем строку с первым файлом */\n if (files) DOM.setCurrentFile(currentFile, {\n // when hash is present\n // it should be handled with this.route\n // overwre otherwise\n history: !location.hash\n });\n const dirPath = DOM.getCurrentDirPath();\n Listeners = CloudCmd.Listeners;\n Listeners.init();\n const panels = getPanels();\n panels.forEach(Listeners.setOnPanel);\n Listeners.initKeysPanel();\n if (!CloudCmd.config('dirStorage')) return;\n const data = await Storage.get(dirPath);\n if (!data) await Storage.setJson(dirPath, getJsonFromFileTable());\n }\n function getPanels() {\n const panels = ['left'];\n if (CloudCmd.config('oneFilePanel')) return panels;\n return [...panels, 'right'];\n }\n this.execFromModule = async (moduleName, funcName, ...args) => {\n await CloudCmd[moduleName]();\n const func = CloudCmd[moduleName][funcName];\n func(...args);\n };\n this.refresh = async (options = {}) => {\n const {\n panel = Info.panel,\n currentName\n } = options;\n const path = DOM.getCurrentDirPath(panel);\n const isRefresh = true;\n const history = false;\n const noCurrent = options === null || options === void 0 ? void 0 : options.noCurrent;\n await CloudCmd.changeDir(path, {\n isRefresh,\n history,\n panel,\n noCurrent,\n currentName\n });\n };\n\n /**\n * Функция загружает json-данные о Файловой Системе\n * через ajax-запрос.\n * @param path - каталог для чтения\n * @param options\n * { refresh, history } - необходимость обновить данные о каталоге\n * @param panel\n * @param callback\n *\n */\n async function ajaxLoad(path, options = {}, panel) {\n const {\n RESTful\n } = DOM;\n CloudCmd.log(`reading dir: \"${path}\";`);\n const dirStorage = CloudCmd.config('dirStorage');\n const json = dirStorage && (await Storage.getJson(path));\n const name = options.currentName || Info.name;\n const {\n noCurrent,\n refresh\n } = options;\n if (!refresh && json) return await createFileTable(json, panel, options);\n const position = DOM.getPanelPosition(panel);\n const sort = CloudCmd.sort[position];\n const order = CloudCmd.order[position];\n const query = rendy('?sort={{ sort }}&order={{ order }}', {\n sort,\n order\n });\n const [, newObj] = await RESTful.read(path + query, 'json');\n if (!newObj)\n // that's OK, error handled by RESTful\n return;\n options.sort = sort;\n options.order = order;\n await createFileTable(newObj, panel, options);\n if (refresh && !noCurrent) DOM.setCurrentByName(name);\n if (!CloudCmd.config('dirStorage')) return;\n Storage.setJson(path, newObj);\n }\n\n /**\n * Функция строит файловую таблицу\n * @param json - данные о файлах\n * @param panelParam\n * @param history\n * @param callback\n */\n async function createFileTable(data, panelParam, options) {\n const {\n history,\n noCurrent\n } = options;\n const names = ['file', 'path', 'link', 'pathLink'];\n const [error, [file, path, link, pathLink]] = await tryToCatch(Files.get, names);\n if (error) return DOM.Dialog.alert(error.responseText);\n const panel = panelParam || DOM.getPanel();\n const {\n prefix\n } = CloudCmd;\n const {\n dir,\n name\n } = Info;\n const {\n childNodes\n } = panel;\n let i = childNodes.length;\n while (i--) panel.removeChild(panel.lastChild);\n panel.innerHTML = buildFromJSON({\n sort: options.sort,\n order: options.order,\n data,\n id: panel.id,\n prefix,\n template: {\n file,\n path,\n pathLink,\n link\n }\n });\n Listeners.setOnPanel(panel);\n if (!noCurrent) {\n let current;\n if (name === '..' && dir !== '/') current = DOM.getCurrentByName(dir);\n if (!current) [current] = DOM.getFiles(panel);\n DOM.setCurrentFile(current, {\n history\n });\n CloudCmd.emit('active-dir', Info.dirPath);\n }\n }\n this.goToParentDir = async () => {\n const {\n dir,\n dirPath,\n parentDirPath,\n panel\n } = Info;\n if (dirPath === parentDirPath) return;\n const path = parentDirPath;\n await CloudCmd.changeDir(path);\n const current = DOM.getCurrentByName(dir);\n const [first] = DOM.getFiles(panel);\n DOM.setCurrentFile(current || first, {\n history\n });\n };\n}\n\n//# sourceURL=file://cloudcmd/client/client.js");
|
|
167
167
|
|
|
168
168
|
/***/ }),
|
|
169
169
|
|
|
@@ -175,7 +175,7 @@ eval("\n\nconst process = __webpack_require__(/*! node:process */ \"./node_modul
|
|
|
175
175
|
/***/ (function(module, exports, __webpack_require__) {
|
|
176
176
|
|
|
177
177
|
"use strict";
|
|
178
|
-
eval("\n\nconst process = __webpack_require__(/*! node:process */ \"./node_modules/process/browser.js\");\n__webpack_require__(/*! ./css */ \"./client/css.js\");\nconst wraptile = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\nconst load = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\nconst {\n registerSW,\n listenSW\n} = __webpack_require__(/*! ./sw/register */ \"./client/sw/register.js\");\nconst isDev = process.env.NODE_ENV === 'development';\nmodule.exports =
|
|
178
|
+
eval("\n\nconst process = __webpack_require__(/*! node:process */ \"./node_modules/process/browser.js\");\n__webpack_require__(/*! ./css */ \"./client/css.js\");\nconst wraptile = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\nconst load = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\nconst {\n registerSW,\n listenSW\n} = __webpack_require__(/*! ./sw/register */ \"./client/sw/register.js\");\nconst isDev = process.env.NODE_ENV === 'development';\nmodule.exports = async config => {\n window.Util = __webpack_require__(/*! ../common/util */ \"./common/util.js\");\n window.CloudFunc = __webpack_require__(/*! ../common/cloudfunc */ \"./common/cloudfunc.js\");\n window.DOM = __webpack_require__(/*! ./dom */ \"./client/dom/index.js\");\n window.CloudCmd = __webpack_require__(/*! ./client */ \"./client/client.js\");\n await register(config);\n __webpack_require__(/*! ./listeners */ \"./client/listeners/index.js\");\n __webpack_require__(/*! ./key */ \"./client/key/index.js\");\n __webpack_require__(/*! ./sort */ \"./client/sort.js\");\n const prefix = getPrefix(config.prefix);\n window.CloudCmd.init(prefix, config);\n};\nwindow.CloudCmd = module.exports;\nfunction getPrefix(prefix) {\n if (!prefix) return '';\n if (!prefix.indexOf('/')) return prefix;\n return `/${prefix}`;\n}\nconst onUpdateFound = wraptile(async config => {\n if (isDev) return;\n const {\n DOM\n } = window;\n const prefix = getPrefix(config.prefix);\n await load.js(`${prefix}/dist/cloudcmd.common.js`);\n await load.js(`${prefix}/dist/cloudcmd.js`);\n console.log('cloudcmd: sw: updated');\n DOM.Events.removeAll();\n window.CloudCmd(config);\n});\nasync function register(config) {\n const {\n prefix\n } = config;\n const sw = await registerSW(prefix);\n listenSW(sw, 'updatefound', onUpdateFound(config));\n}\n\n//# sourceURL=file://cloudcmd/client/cloudcmd.js");
|
|
179
179
|
|
|
180
180
|
/***/ }),
|
|
181
181
|
|
|
@@ -331,7 +331,7 @@ eval("/* global DOM, CloudCmd */\n\n\n\nconst exec = __webpack_require__(/*! exe
|
|
|
331
331
|
/***/ (function(module, exports, __webpack_require__) {
|
|
332
332
|
|
|
333
333
|
"use strict";
|
|
334
|
-
eval("\n\n/* global CloudCmd */\nconst exec = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst loadJS = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\").js;\nconst pascalCase = __webpack_require__(/*! just-pascal-case */ \"./node_modules/just-pascal-case/index.
|
|
334
|
+
eval("\n\n/* global CloudCmd */\nconst exec = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst loadJS = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\").js;\nconst pascalCase = __webpack_require__(/*! just-pascal-case */ \"./node_modules/just-pascal-case/index.cjs\");\nconst noJS = a => a.replace(/.js$/, '');\n\n/**\n * function load modules\n * @params = {name, path, func, dobefore, arg}\n */\nmodule.exports = function loadModule(params) {\n if (!params) return;\n const {\n path\n } = params;\n const name = path && noJS(pascalCase(path));\n const doBefore = params.dobefore;\n if (CloudCmd[name]) return;\n CloudCmd[name] = async () => {\n exec(doBefore);\n const {\n DIR_MODULES\n } = CloudCmd;\n const pathFull = `${DIR_MODULES}/${path}.js`;\n await loadJS(pathFull);\n const newModule = async f => f && f();\n const module = CloudCmd[name];\n Object.assign(newModule, module);\n CloudCmd[name] = newModule;\n CloudCmd.log('init', name);\n await module.init();\n return newModule;\n };\n CloudCmd[name].show = async (...args) => {\n CloudCmd.log('show', name, args);\n const m = CloudCmd[name];\n const [e, a] = await tryToCatch(m);\n if (e) return console.error(e);\n return await a.show(...args);\n };\n};\n\n//# sourceURL=file://cloudcmd/client/load-module.js");
|
|
335
335
|
|
|
336
336
|
/***/ }),
|
|
337
337
|
|
|
@@ -343,7 +343,7 @@ eval("\n\n/* global CloudCmd */\nconst exec = __webpack_require__(/*! execon */
|
|
|
343
343
|
/***/ (function(module, exports, __webpack_require__) {
|
|
344
344
|
|
|
345
345
|
"use strict";
|
|
346
|
-
eval("\n\n/* global CloudCmd */\nconst DOM = __webpack_require__(/*! ./dom */ \"./client/dom/index.js\");\nconst Info = DOM.CurrentInfo;\nconst {\n sort,\n order\n} = CloudCmd;\nconst position = DOM.getPanelPosition();\nlet sortPrevious = sort[position];\nconst {\n getPanel\n} = DOM;\nCloudCmd.sortPanel = (name, panel = getPanel()) => {\n const position = panel.dataset.name.replace('js-', '');\n if (name !== sortPrevious) order[position] = 'asc';else if (order[position] === 'asc') order[position] = 'desc';else order[position] = 'asc';\n sortPrevious = sort[position] = name;\n const noCurrent = position !== Info.panelPosition;\n CloudCmd.refresh({\n panel,\n noCurrent\n });\n};\n\n//# sourceURL=file://cloudcmd/client/sort.js");
|
|
346
|
+
eval("\n\n/* global CloudCmd */\nconst DOM = __webpack_require__(/*! ./dom */ \"./client/dom/index.js\");\nconst Info = DOM.CurrentInfo;\nconst {\n sort,\n order\n} = CloudCmd;\nconst position = DOM.getPanelPosition();\nlet sortPrevious = sort[position];\nconst {\n getPanel\n} = DOM;\nCloudCmd.sortPanel = (name, panel = getPanel()) => {\n const position = panel.dataset.name.replace('js-', '');\n if (name !== sortPrevious) order[position] = 'asc';else if (order[position] === 'asc') order[position] = 'desc';else order[position] = 'asc';\n sortPrevious = name;\n sort[position] = name;\n const noCurrent = position !== Info.panelPosition;\n CloudCmd.refresh({\n panel,\n noCurrent\n });\n};\n\n//# sourceURL=file://cloudcmd/client/sort.js");
|
|
347
347
|
|
|
348
348
|
/***/ }),
|
|
349
349
|
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
/***/ (function(module, exports, __webpack_require__) {
|
|
164
164
|
|
|
165
165
|
"use strict";
|
|
166
|
-
eval("\n\n/* global CloudCmd, DOM, io */\n__webpack_require__(/*! ../../../css/config.css */ \"./css/config.css\");\nconst rendy = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\nconst wraptile = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\nconst squad = __webpack_require__(/*! squad */ \"./node_modules/squad/lib/squad.js\");\nconst {\n promisify\n} = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst load = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\nconst createElement = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\nconst input = __webpack_require__(/*! ./input */ \"./client/modules/config/input.js\");\nconst Images = __webpack_require__(/*! ../../dom/images */ \"./client/dom/images.js\");\nconst Events = __webpack_require__(/*! ../../dom/events */ \"./client/dom/events/index.js\");\nconst Files = __webpack_require__(/*! ../../dom/files */ \"./client/dom/files.js\");\nconst {\n getTitle\n} = __webpack_require__(/*! ../../../common/cloudfunc */ \"./common/cloudfunc.js\");\nconst {\n Dialog,\n setTitle\n} = DOM;\nconst Name = 'Config';\nCloudCmd[Name] = module.exports;\nconst loadSocket = promisify(DOM.loadSocket);\nconst showLoad = () => {\n Images.show.load('top');\n};\nconst addKey = currify((fn, input) => {\n Events.addKey(input, fn);\n return input;\n});\nconst addChange = currify((fn, input) => {\n Events.add('change', input, fn);\n return input;\n});\nconst Config = {};\nlet Template;\nconst loadCSS = load.css;\nmodule.exports.init = async () => {\n if (!CloudCmd.config('configDialog')) return;\n showLoad();\n const {\n prefix\n } = CloudCmd;\n [Template] = await Promise.all([Files.get('config-tmpl'), loadSocket(), loadCSS(`${prefix}/dist/config.css`), CloudCmd.View()]);\n initSocket();\n};\nconst {\n config,\n Key\n} = CloudCmd;\nlet Element;\nfunction getHost() {\n const {\n host,\n origin,\n protocol\n } = location;\n return origin || `${protocol}//${host}`;\n}\nfunction initSocket() {\n const href = getHost();\n const {\n prefixSocket,\n prefix\n } = CloudCmd;\n const ONE_MINUTE = 60 * 1000;\n const socket = io.connect(href + prefixSocket + '/config', {\n reconnectionAttempts: Infinity,\n reconnectionDelay: ONE_MINUTE,\n path: `${prefix}/socket.io`\n });\n const save = data => {\n onSave(data);\n socket.send(data);\n };\n authCheck(socket);\n socket.on('connect', () => {\n Config.save = save;\n });\n socket.on('message', onSave);\n socket.on('log', CloudCmd.log);\n socket.on('disconnect', () => {\n Config.save = saveHttp;\n });\n socket.on('err', Dialog.alert);\n}\nfunction authCheck(socket) {\n socket.emit('auth', config('username'), config('password'));\n socket.on('reject', wraptile(Dialog.alert, 'Wrong credentials!'));\n}\nConfig.save = saveHttp;\nmodule.exports.show = show;\nasync function show() {\n if (!CloudCmd.config('configDialog')) return;\n await fillTemplate();\n}\nasync function fillTemplate() {\n const [error, config] = await tryToCatch(Files.get, 'config');\n if (error) return Dialog.alert('Could not load config!');\n const {\n editor,\n packer,\n columns,\n theme,\n configAuth,\n ...obj\n } = input.convert(config);\n obj[`${editor}-selected`] = 'selected';\n obj[`${packer}-selected`] = 'selected';\n obj[`${columns}-selected`] = 'selected';\n obj[`${theme}-selected`] = 'selected';\n obj.configAuth = configAuth ? '' : 'hidden';\n const innerHTML = rendy(Template, obj);\n Element = createElement('form', {\n className: 'config',\n innerHTML\n });\n const inputs = document.querySelectorAll('input, select', Element);\n const [inputFirst] = inputs;\n let afterShow;\n if (inputFirst) {\n onAuthChange(inputFirst.checked);\n afterShow = inputFirst.focus.bind(inputFirst);\n }\n const getTarget = ({\n target\n }) => target;\n const handleChange = squad(onChange, getTarget);\n Array.from(inputs).map(addKey(onKey)).map(addChange(handleChange));\n const autoSize = true;\n CloudCmd.View.show(Element, {\n autoSize,\n afterShow\n });\n}\nmodule.exports.hide = hide;\nfunction hide() {\n CloudCmd.View.hide();\n}\nasync function onChange(el) {\n const obj = {};\n const name = input.getName(el);\n const data = input.getValue(name, Element);\n if (name === 'name') onNameChange(data);else if (name === 'auth') onAuthChange(data);\n obj[name] = data;\n await Config.save(obj);\n}\nfunction onSave(obj) {\n for (const name of Object.keys(obj)) {\n const data = obj[name];\n CloudCmd._config(name, data);\n input.setValue(name, data, Element);\n }\n}\nasync function saveHttp(obj) {\n const {\n RESTful\n } = DOM;\n const [e] = await RESTful.Config.write(obj);\n if (e) return;\n onSave(obj);\n}\nfunction onAuthChange(checked) {\n const elUsername = input.getElementByName('username', Element);\n const elPassword = input.getElementByName('password', Element);\n elUsername.disabled = elPassword.disabled = !checked;\n}\nfunction onNameChange(name) {\n setTitle(getTitle({\n name\n }));\n}\nasync function onKey({\n keyCode,\n target\n}) {\n switch (keyCode) {\n case Key.ESC:\n return hide();\n case Key.ENTER:\n return await onChange(target);\n }\n}\n\n//# sourceURL=file://cloudcmd/client/modules/config/index.js");
|
|
166
|
+
eval("\n\n/* global CloudCmd, DOM, io */\n__webpack_require__(/*! ../../../css/config.css */ \"./css/config.css\");\nconst rendy = __webpack_require__(/*! rendy */ \"./node_modules/rendy/lib/rendy.js\");\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\nconst wraptile = __webpack_require__(/*! wraptile */ \"./node_modules/wraptile/lib/wraptile.js\");\nconst squad = __webpack_require__(/*! squad */ \"./node_modules/squad/lib/squad.js\");\nconst {\n promisify\n} = __webpack_require__(/*! es6-promisify */ \"./node_modules/es6-promisify/dist/promisify.mjs\");\nconst tryToCatch = __webpack_require__(/*! try-to-catch */ \"./node_modules/try-to-catch/lib/try-to-catch.js\");\nconst load = __webpack_require__(/*! load.js */ \"./node_modules/load.js/lib/load.js\");\nconst createElement = __webpack_require__(/*! @cloudcmd/create-element */ \"./node_modules/@cloudcmd/create-element/lib/create-element.js\");\nconst input = __webpack_require__(/*! ./input */ \"./client/modules/config/input.js\");\nconst Images = __webpack_require__(/*! ../../dom/images */ \"./client/dom/images.js\");\nconst Events = __webpack_require__(/*! ../../dom/events */ \"./client/dom/events/index.js\");\nconst Files = __webpack_require__(/*! ../../dom/files */ \"./client/dom/files.js\");\nconst {\n getTitle\n} = __webpack_require__(/*! ../../../common/cloudfunc */ \"./common/cloudfunc.js\");\nconst {\n Dialog,\n setTitle\n} = DOM;\nconst Name = 'Config';\nCloudCmd[Name] = module.exports;\nconst loadSocket = promisify(DOM.loadSocket);\nconst showLoad = () => {\n Images.show.load('top');\n};\nconst addKey = currify((fn, input) => {\n Events.addKey(input, fn);\n return input;\n});\nconst addChange = currify((fn, input) => {\n Events.add('change', input, fn);\n return input;\n});\nconst Config = {};\nlet Template;\nconst loadCSS = load.css;\nmodule.exports.init = async () => {\n if (!CloudCmd.config('configDialog')) return;\n showLoad();\n const {\n prefix\n } = CloudCmd;\n [Template] = await Promise.all([Files.get('config-tmpl'), loadSocket(), loadCSS(`${prefix}/dist/config.css`), CloudCmd.View()]);\n initSocket();\n};\nconst {\n config,\n Key\n} = CloudCmd;\nlet Element;\nfunction getHost() {\n const {\n host,\n origin,\n protocol\n } = location;\n return origin || `${protocol}//${host}`;\n}\nfunction initSocket() {\n const href = getHost();\n const {\n prefixSocket,\n prefix\n } = CloudCmd;\n const ONE_MINUTE = 60 * 1000;\n const socket = io.connect(href + prefixSocket + '/config', {\n reconnectionAttempts: Infinity,\n reconnectionDelay: ONE_MINUTE,\n path: `${prefix}/socket.io`\n });\n const save = data => {\n onSave(data);\n socket.send(data);\n };\n authCheck(socket);\n socket.on('connect', () => {\n Config.save = save;\n });\n socket.on('message', onSave);\n socket.on('log', CloudCmd.log);\n socket.on('disconnect', () => {\n Config.save = saveHttp;\n });\n socket.on('err', Dialog.alert);\n}\nfunction authCheck(socket) {\n socket.emit('auth', config('username'), config('password'));\n socket.on('reject', wraptile(Dialog.alert, 'Wrong credentials!'));\n}\nConfig.save = saveHttp;\nmodule.exports.show = show;\nasync function show() {\n if (!CloudCmd.config('configDialog')) return;\n await fillTemplate();\n}\nasync function fillTemplate() {\n const [error, config] = await tryToCatch(Files.get, 'config');\n if (error) return Dialog.alert('Could not load config!');\n const {\n editor,\n packer,\n columns,\n theme,\n configAuth,\n ...obj\n } = input.convert(config);\n obj[`${editor}-selected`] = 'selected';\n obj[`${packer}-selected`] = 'selected';\n obj[`${columns}-selected`] = 'selected';\n obj[`${theme}-selected`] = 'selected';\n obj.configAuth = configAuth ? '' : 'hidden';\n const innerHTML = rendy(Template, obj);\n Element = createElement('form', {\n className: 'config',\n innerHTML\n });\n const inputs = document.querySelectorAll('input, select', Element);\n const [inputFirst] = inputs;\n let afterShow;\n if (inputFirst) {\n onAuthChange(inputFirst.checked);\n afterShow = inputFirst.focus.bind(inputFirst);\n }\n const getTarget = ({\n target\n }) => target;\n const handleChange = squad(onChange, getTarget);\n Array.from(inputs).map(addKey(onKey)).map(addChange(handleChange));\n const autoSize = true;\n CloudCmd.View.show(Element, {\n autoSize,\n afterShow\n });\n}\nmodule.exports.hide = hide;\nfunction hide() {\n CloudCmd.View.hide();\n}\nasync function onChange(el) {\n const obj = {};\n const name = input.getName(el);\n const data = input.getValue(name, Element);\n if (name === 'name') onNameChange(data);else if (name === 'auth') onAuthChange(data);\n obj[name] = data;\n await Config.save(obj);\n}\nfunction onSave(obj) {\n for (const name of Object.keys(obj)) {\n const data = obj[name];\n CloudCmd._config(name, data);\n input.setValue(name, data, Element);\n }\n}\nasync function saveHttp(obj) {\n const {\n RESTful\n } = DOM;\n const [e] = await RESTful.Config.write(obj);\n if (e) return;\n onSave(obj);\n}\nfunction onAuthChange(checked) {\n const elUsername = input.getElementByName('username', Element);\n const elPassword = input.getElementByName('password', Element);\n elUsername.disabled = !checked;\n elPassword.disabled = !checked;\n}\nfunction onNameChange(name) {\n setTitle(getTitle({\n name\n }));\n}\nasync function onKey({\n keyCode,\n target\n}) {\n switch (keyCode) {\n case Key.ESC:\n return hide();\n case Key.ENTER:\n return await onChange(target);\n }\n}\n\n//# sourceURL=file://cloudcmd/client/modules/config/index.js");
|
|
167
167
|
|
|
168
168
|
/***/ }),
|
|
169
169
|
|
|
@@ -163,7 +163,7 @@
|
|
|
163
163
|
/***/ (function(module, exports, __webpack_require__) {
|
|
164
164
|
|
|
165
165
|
"use strict";
|
|
166
|
-
eval("\n\n/* global CloudCmd, DOM */\nCloudCmd.EditNames = exports;\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\nconst exec = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\nconst supermenu = __webpack_require__(/*! supermenu */ \"./node_modules/supermenu/lib/supermenu.js\");\nconst multiRename = __webpack_require__(/*! multi-rename */ \"./node_modules/multi-rename/lib/multi-rename.js\");\nconst reject = Promise.reject.bind(Promise);\nconst Info = DOM.CurrentInfo;\nconst {\n Dialog\n} = DOM;\nconst refresh = currify(_refresh);\nconst rename = currify(_rename);\nlet Menu;\nconst ConfigView = {\n beforeClose: async () => {\n exec.ifExist(Menu, 'hide');\n DOM.Events.remove('keydown', keyListener);\n await isChanged();\n }\n};\nmodule.exports.init = async () => {\n await CloudCmd.Edit();\n setListeners();\n};\nmodule.exports.show = options => {\n const names = getActiveNames().join('\\n');\n const config = {\n ...ConfigView,\n ...options\n };\n if (Info.name === '..' && names.length === 1) return Dialog.alert.noFiles();\n DOM.Events.addKey(keyListener);\n CloudCmd.Edit.getEditor().setValueFirst('edit-names', names).setMode().setOption('keyMap', 'default').disableKey();\n CloudCmd.Edit.show(config);\n return CloudCmd.Edit;\n};\nasync function keyListener(event) {\n const ctrl = event.ctrlKey;\n const meta = event.metaKey;\n const ctrlMeta = ctrl || meta;\n const {\n Key\n } = CloudCmd;\n if (ctrlMeta && event.keyCode === Key.S) hide()
|
|
166
|
+
eval("\n\n/* global CloudCmd, DOM */\nCloudCmd.EditNames = exports;\nconst currify = __webpack_require__(/*! currify */ \"./node_modules/currify/lib/currify.js\");\nconst exec = __webpack_require__(/*! execon */ \"./node_modules/execon/lib/exec.js\");\nconst supermenu = __webpack_require__(/*! supermenu */ \"./node_modules/supermenu/lib/supermenu.js\");\nconst multiRename = __webpack_require__(/*! multi-rename */ \"./node_modules/multi-rename/lib/multi-rename.js\");\nconst reject = Promise.reject.bind(Promise);\nconst Info = DOM.CurrentInfo;\nconst {\n Dialog\n} = DOM;\nconst refresh = currify(_refresh);\nconst rename = currify(_rename);\nlet Menu;\nconst ConfigView = {\n beforeClose: async () => {\n exec.ifExist(Menu, 'hide');\n DOM.Events.remove('keydown', keyListener);\n await isChanged();\n }\n};\nmodule.exports.init = async () => {\n await CloudCmd.Edit();\n setListeners();\n};\nmodule.exports.show = options => {\n const names = getActiveNames().join('\\n');\n const config = {\n ...ConfigView,\n ...options\n };\n if (Info.name === '..' && names.length === 1) return Dialog.alert.noFiles();\n DOM.Events.addKey(keyListener);\n CloudCmd.Edit.getEditor().setValueFirst('edit-names', names).setMode().setOption('keyMap', 'default').disableKey();\n CloudCmd.Edit.show(config);\n return CloudCmd.Edit;\n};\nasync function keyListener(event) {\n const ctrl = event.ctrlKey;\n const meta = event.metaKey;\n const ctrlMeta = ctrl || meta;\n const {\n Key\n } = CloudCmd;\n if (ctrlMeta && event.keyCode === Key.S) {\n hide();\n } else if (ctrlMeta && event.keyCode === Key.P) {\n const [, pattern] = await Dialog.prompt('Apply pattern:', '[n][e]');\n pattern && applyPattern(pattern);\n }\n}\nfunction applyPattern(pattern) {\n const newNames = multiRename(pattern, getActiveNames());\n const editor = CloudCmd.Edit.getEditor();\n editor.setValue(newNames.join('\\n'));\n}\nfunction getActiveNames() {\n return DOM.getFilenames(DOM.getActiveFiles());\n}\nmodule.exports.hide = hide;\nfunction hide() {\n CloudCmd.Edit.hide();\n}\nfunction setListeners() {\n const element = CloudCmd.Edit.getElement();\n DOM.Events.addOnce('contextmenu', element, setMenu);\n}\nfunction applyNames() {\n const dir = Info.dirPath;\n const from = getActiveNames();\n const nameIndex = from.indexOf(Info.name);\n const editor = CloudCmd.Edit.getEditor();\n const to = editor.getValue().split('\\n');\n const root = CloudCmd.config('root');\n Promise.resolve(root).then(rename(dir, from, to)).then(refresh(to, nameIndex)).catch(alert);\n}\nfunction _refresh(to, nameIndex, res) {\n if (res.status === 404) return res.text().then(reject);\n const currentName = to[nameIndex];\n CloudCmd.refresh({\n currentName\n });\n}\nfunction getDir(root, dir) {\n if (root === '/') return dir;\n return root + dir;\n}\nfunction _rename(path, from, to, root) {\n const dir = getDir(root, path);\n const {\n prefix\n } = CloudCmd;\n return fetch(`${prefix}/rename`, {\n method: 'put',\n credentials: 'include',\n body: JSON.stringify({\n from,\n to,\n dir\n })\n });\n}\nfunction setMenu(event) {\n const position = {\n x: event.clientX,\n y: event.clientY\n };\n event.preventDefault();\n if (Menu) return;\n const editor = CloudCmd.Edit.getEditor();\n const options = {\n beforeShow: params => {\n params.x -= 18;\n params.y -= 27;\n },\n afterClick: () => {\n editor.focus();\n }\n };\n const menuData = {\n 'Save Ctrl+S': () => {\n applyNames();\n hide();\n },\n 'Go To Line Ctrl+G': () => {\n editor.goToLine();\n },\n 'Cut Ctrl+X': () => {\n editor.cutToClipboard();\n },\n 'Copy Ctrl+C': () => {\n editor.copyToClipboard();\n },\n 'Paste Ctrl+V': () => {\n editor.pasteFromClipboard();\n },\n 'Delete Del': () => {\n editor.remove('right');\n },\n 'Select All Ctrl+A': () => {\n editor.selectAll();\n },\n 'Close Esc': hide\n };\n const element = CloudCmd.Edit.getElement();\n Menu = supermenu(element, options, menuData);\n Menu.addContextMenuListener();\n Menu.show(position.x, position.y);\n}\nmodule.exports.isChanged = isChanged;\nasync function isChanged() {\n const editor = CloudCmd.Edit.getEditor();\n const msg = 'Apply new names?';\n if (!editor.isChanged()) return;\n const [, names] = await Dialog.confirm(msg);\n names && applyNames();\n}\n\n//# sourceURL=file://cloudcmd/client/modules/edit-names.js");
|
|
167
167
|
|
|
168
168
|
/***/ })
|
|
169
169
|
|