qumra-cli 1.1.24 → 1.1.26
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/build/cli.cjs +1 -1
- package/build/cli.cjs.map +1 -1
- package/package.json +1 -1
package/build/cli.cjs
CHANGED
|
@@ -69,7 +69,7 @@ var _O=T,xO=YA,wO=Tk,EO=function(e){if(!(this instanceof EO))return new EO(e);"o
|
|
|
69
69
|
* @ignore
|
|
70
70
|
* @license [MIT]{@link https://github.com/archiverjs/node-archiver/blob/master/LICENSE}
|
|
71
71
|
* @copyright (c) 2012-2014 Chris Talkington, contributors.
|
|
72
|
-
*/MO.create=function(e,t){if(BO[e]){var n=new FO(e,t);return n.setFormat(e),n.setModule(new BO[e](t)),n}throw new Error("create("+e+"): format not registered")},MO.registerFormat=function(e,t){if(BO[e])throw new Error("register("+e+"): format already registered");if("function"!=typeof t)throw new Error("register("+e+"): format module invalid");if("function"!=typeof t.prototype.append||"function"!=typeof t.prototype.finalize)throw new Error("register("+e+"): format module missing methods");BO[e]=t},MO.isRegisteredFormat=function(e){return!!BO[e]},MO.registerFormat("zip",KA),MO.registerFormat("tar",SO),MO.registerFormat("json",jO);var UO=q(MO);const qO=async(e,t="")=>{let n={};try{const r=await s.promises.readdir(e,{withFileTypes:!0});for(const i of r){const r=o.join(e,i.name),s=o.join(t,i.name);i.isDirectory()?n={...n,...await qO(r,s)}:i.isFile()&&(n[s]=r)}}catch(t){console.error(`Error reading directory ${e} - ${t.message}`)}return n};async function HO(e,t){try{const r=await of.post("/themes/check",{paths:e});return t.succeed("Check complete!"),(n=r.data).success?(console.log(_t.green.bold("✔ All files are valid!")),n.paths.forEach((e=>{console.log(_t.green(`- ${e}`))}))):(console.log(_t.red.bold("✘ Some issues were found:")),n.invalidExtensions&&n.invalidExtensions.length>0&&(console.log(_t.red("\nInvalid Extensions:")),n.invalidExtensions.forEach((e=>{console.log(_t.red(`- ${e}`))}))),n.missingPaths&&n.missingPaths.length>0&&(console.log(_t.yellow("\nMissing Required Paths:")),n.missingPaths.forEach((e=>{console.log(_t.yellow(`- ${e}`))}))),n.duplicates&&n.duplicates.length>0&&(console.log(_t.blue("\nDuplicated Files:")),n.duplicates.forEach((e=>{console.log(_t.blue(`- ${e}`))})))),r.data}catch(e){throw console.log("🚀 ~ checkFilesRequest ~ error:",e),t.fail("Failed to complete the check"),function(e){if(console.log(_t.red.bold("✘ Error occurred during file check:")),e.response&&e.response.data){const t=e.response.data;t.invalidExtensions&&t.invalidExtensions.length>0&&(console.log(_t.red("\nInvalid Extensions:")),t.invalidExtensions.forEach((e=>{console.log(_t.red(`- ${e}`))}))),t.missingPaths&&t.missingPaths.length>0&&(console.log(_t.yellow("\nMissing Required Paths:")),t.missingPaths.forEach((e=>{console.log(_t.yellow(`- ${e}`))}))),t.duplicates&&t.duplicates.length>0&&(console.log(_t.blue("\nDuplicated Files:")),t.duplicates.forEach((e=>{console.log(_t.blue(`- ${e}`))})))}else console.error(_t.red(`Failed to upload file - Error: ${e.message}`))}(e),e}var n}const $O=Xd.create({baseURL:"https://collector.qumra.cloud/v1",headers:{"Content-Type":"multipart/form-data"}});$O.interceptors.request.use((async e=>{const t=await sf("token");return t&&(e.headers.Authorization=`${t}`),e}),(e=>Promise.reject(e)));const zO=Xd.create({baseURL:tf,headers:{"Content-Type":"multipart/form-data"}});zO.interceptors.request.use((async e=>{const t=await sf("token");return t&&(e.headers.Authorization=`${t}`),e}),(e=>Promise.reject(e)));const WO=process.cwd(),GO=o.join(WO,"dist"),VO=o.join(WO,"src","views"),KO=o.join(WO,"src","locals"),YO=o.join(WO,"qumra.config.json");var ZO={exports:{}},QO={exports:{}},JO=o.relative,XO=function(e){if(!e)throw new TypeError("argument namespace is required");var t=iL(lL()[1])[0];function n(e){rL.call(n,e)}return n._file=t,n._ignored=function(e){if(process.noDeprecation)return!0;return tL(process.env.NO_DEPRECATION||"",e)}(e),n._namespace=e,n._traced=function(e){if(process.traceDeprecation)return!0;return tL(process.env.TRACE_DEPRECATION||"",e)}(e),n._warned=Object.create(null),n.function=pL,n.property=hL,n},eL=process.cwd();function tL(e,t){for(var n=e.split(/[ ,]+/),r=String(t).toLowerCase(),i=0;i<n.length;i++){var s=n[i];if(s&&("*"===s||s.toLowerCase()===r))return!0}return!1}function nL(e){var t=this.name+": "+this.namespace;this.message&&(t+=" deprecated "+this.message);for(var n=0;n<e.length;n++)t+="\n at "+e[n].toString();return t}function rL(e,t){var n=function(e,t){return("function"!=typeof e.listenerCount?e.listeners(t).length:e.listenerCount(t))>0}(process,"deprecation");if(n||!this._ignored){var r,i,s,o,a=0,c=!1,l=lL(),u=this._file;for(t?(o=t,(s=iL(l[1])).name=o.name,u=s[0]):s=o=iL(l[a=2]);a<l.length;a++)if((i=(r=iL(l[a]))[0])===u)c=!0;else if(i===this._file)u=this._file;else if(c)break;var p=r?o.join(":")+"__"+r.join(":"):void 0;if(void 0===p||!(p in this._warned)){this._warned[p]=!0;var h=e;if(h||(h=s!==o&&s.name?sL(s):sL(o)),n){var d=dL(this._namespace,h,l.slice(a));process.emit("deprecation",d)}else{var f=(process.stderr.isTTY?aL:oL).call(this,h,r,l.slice(a));process.stderr.write(f+"\n","utf8")}}}}function iL(e){var t=e.getFileName()||"<anonymous>",n=e.getLineNumber(),r=e.getColumnNumber();e.isEval()&&(t=e.getEvalOrigin()+", "+t);var i=[t,n,r];return i.callSite=e,i.name=e.getFunctionName(),i}function sL(e){var t=e.callSite,n=e.name;n||(n="<anonymous@"+cL(e)+">");var r=t.getThis(),i=r&&t.getTypeName();return"Object"===i&&(i=void 0),"Function"===i&&(i=r.name||i),i&&t.getMethodName()?i+"."+n:n}function oL(e,t,n){var r=(new Date).toUTCString()+" "+this._namespace+" deprecated "+e;if(this._traced){for(var i=0;i<n.length;i++)r+="\n at "+n[i].toString();return r}return t&&(r+=" at "+cL(t)),r}function aL(e,t,n){var r="[36;1m"+this._namespace+"[22;39m [33;1mdeprecated[22;39m [0m"+e+"[39m";if(this._traced){for(var i=0;i<n.length;i++)r+="\n [36mat "+n[i].toString()+"[39m";return r}return t&&(r+=" [36m"+cL(t)+"[39m"),r}function cL(e){return JO(eL,e[0])+":"+e[1]+":"+e[2]}function lL(){var e=Error.stackTraceLimit,t={},n=Error.prepareStackTrace;Error.prepareStackTrace=uL,Error.stackTraceLimit=Math.max(10,e),Error.captureStackTrace(t);var r=t.stack.slice(1);return Error.prepareStackTrace=n,Error.stackTraceLimit=e,r}function uL(e,t){return t}function pL(e,t){if("function"!=typeof e)throw new TypeError("argument fn must be a function");var n=function(e){for(var t="",n=0;n<e;n++)t+=", arg"+n;return t.substr(2)}(e.length),r=iL(lL()[1]);return r.name=e.name,new Function("fn","log","deprecate","message","site",'"use strict"\nreturn function ('+n+") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}")(e,rL,this,t,r)}function hL(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("argument obj must be object");var r=Object.getOwnPropertyDescriptor(e,t);if(!r)throw new TypeError("must call property on owner object");if(!r.configurable)throw new TypeError("property must be configurable");var i=this,s=iL(lL()[1]);s.name=t,"value"in r&&(r=function(e,t){var n=Object.getOwnPropertyDescriptor(e,t),r=n.value;return n.get=function(){return r},n.writable&&(n.set=function(e){return r=e}),delete n.value,delete n.writable,Object.defineProperty(e,t,n),n}(e,t));var o=r.get,a=r.set;"function"==typeof o&&(r.get=function(){return rL.call(i,n,s),o.apply(this,arguments)}),"function"==typeof a&&(r.set=function(){return rL.call(i,n,s),a.apply(this,arguments)}),Object.defineProperty(e,t,r)}function dL(e,t,n){var r,i=new Error;return Object.defineProperty(i,"constructor",{value:dL}),Object.defineProperty(i,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(i,"name",{enumerable:!1,configurable:!0,value:"DeprecationError",writable:!0}),Object.defineProperty(i,"namespace",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(i,"stack",{configurable:!0,enumerable:!1,get:function(){return void 0!==r?r:r=nL.call(this,n)},set:function(e){r=e}}),i}var fL,mL={exports:{}};
|
|
72
|
+
*/MO.create=function(e,t){if(BO[e]){var n=new FO(e,t);return n.setFormat(e),n.setModule(new BO[e](t)),n}throw new Error("create("+e+"): format not registered")},MO.registerFormat=function(e,t){if(BO[e])throw new Error("register("+e+"): format already registered");if("function"!=typeof t)throw new Error("register("+e+"): format module invalid");if("function"!=typeof t.prototype.append||"function"!=typeof t.prototype.finalize)throw new Error("register("+e+"): format module missing methods");BO[e]=t},MO.isRegisteredFormat=function(e){return!!BO[e]},MO.registerFormat("zip",KA),MO.registerFormat("tar",SO),MO.registerFormat("json",jO);var UO=q(MO);const qO=async(e,t="")=>{let n={};try{const r=await s.promises.readdir(e,{withFileTypes:!0});for(const i of r){const r=o.join(e,i.name),s=o.posix.join(t,i.name);i.isDirectory()?n={...n,...await qO(r,s)}:i.isFile()&&(n[s]=r)}}catch(t){console.error(`Error reading directory ${e} - ${t.message}`)}return n};async function HO(e,t){try{const r=await of.post("/themes/check",{paths:e});return t.succeed("Check complete!"),(n=r.data).success?(console.log(_t.green.bold("✔ All files are valid!")),n.paths.forEach((e=>{console.log(_t.green(`- ${e}`))}))):(console.log(_t.red.bold("✘ Some issues were found:")),n.invalidExtensions&&n.invalidExtensions.length>0&&(console.log(_t.red("\nInvalid Extensions:")),n.invalidExtensions.forEach((e=>{console.log(_t.red(`- ${e}`))}))),n.missingPaths&&n.missingPaths.length>0&&(console.log(_t.yellow("\nMissing Required Paths:")),n.missingPaths.forEach((e=>{console.log(_t.yellow(`- ${e}`))}))),n.duplicates&&n.duplicates.length>0&&(console.log(_t.blue("\nDuplicated Files:")),n.duplicates.forEach((e=>{console.log(_t.blue(`- ${e}`))})))),r.data}catch(e){throw console.log("🚀 ~ checkFilesRequest ~ error:",e),t.fail("Failed to complete the check"),function(e){if(console.log(_t.red.bold("✘ Error occurred during file check:")),e.response&&e.response.data){const t=e.response.data;t.invalidExtensions&&t.invalidExtensions.length>0&&(console.log(_t.red("\nInvalid Extensions:")),t.invalidExtensions.forEach((e=>{console.log(_t.red(`- ${e}`))}))),t.missingPaths&&t.missingPaths.length>0&&(console.log(_t.yellow("\nMissing Required Paths:")),t.missingPaths.forEach((e=>{console.log(_t.yellow(`- ${e}`))}))),t.duplicates&&t.duplicates.length>0&&(console.log(_t.blue("\nDuplicated Files:")),t.duplicates.forEach((e=>{console.log(_t.blue(`- ${e}`))})))}else console.error(_t.red(`Failed to upload file - Error: ${e.message}`))}(e),e}var n}const $O=Xd.create({baseURL:"https://collector.qumra.cloud/v1",headers:{"Content-Type":"multipart/form-data"}});$O.interceptors.request.use((async e=>{const t=await sf("token");return t&&(e.headers.Authorization=`${t}`),e}),(e=>Promise.reject(e)));const zO=Xd.create({baseURL:tf,headers:{"Content-Type":"multipart/form-data"}});zO.interceptors.request.use((async e=>{const t=await sf("token");return t&&(e.headers.Authorization=`${t}`),e}),(e=>Promise.reject(e)));const WO=process.cwd(),GO=o.join(WO,"dist"),VO=o.join(WO,"src","views"),KO=o.join(WO,"src","locals"),YO=o.join(WO,"qumra.config.json");var ZO={exports:{}},QO={exports:{}},JO=o.relative,XO=function(e){if(!e)throw new TypeError("argument namespace is required");var t=iL(lL()[1])[0];function n(e){rL.call(n,e)}return n._file=t,n._ignored=function(e){if(process.noDeprecation)return!0;return tL(process.env.NO_DEPRECATION||"",e)}(e),n._namespace=e,n._traced=function(e){if(process.traceDeprecation)return!0;return tL(process.env.TRACE_DEPRECATION||"",e)}(e),n._warned=Object.create(null),n.function=pL,n.property=hL,n},eL=process.cwd();function tL(e,t){for(var n=e.split(/[ ,]+/),r=String(t).toLowerCase(),i=0;i<n.length;i++){var s=n[i];if(s&&("*"===s||s.toLowerCase()===r))return!0}return!1}function nL(e){var t=this.name+": "+this.namespace;this.message&&(t+=" deprecated "+this.message);for(var n=0;n<e.length;n++)t+="\n at "+e[n].toString();return t}function rL(e,t){var n=function(e,t){return("function"!=typeof e.listenerCount?e.listeners(t).length:e.listenerCount(t))>0}(process,"deprecation");if(n||!this._ignored){var r,i,s,o,a=0,c=!1,l=lL(),u=this._file;for(t?(o=t,(s=iL(l[1])).name=o.name,u=s[0]):s=o=iL(l[a=2]);a<l.length;a++)if((i=(r=iL(l[a]))[0])===u)c=!0;else if(i===this._file)u=this._file;else if(c)break;var p=r?o.join(":")+"__"+r.join(":"):void 0;if(void 0===p||!(p in this._warned)){this._warned[p]=!0;var h=e;if(h||(h=s!==o&&s.name?sL(s):sL(o)),n){var d=dL(this._namespace,h,l.slice(a));process.emit("deprecation",d)}else{var f=(process.stderr.isTTY?aL:oL).call(this,h,r,l.slice(a));process.stderr.write(f+"\n","utf8")}}}}function iL(e){var t=e.getFileName()||"<anonymous>",n=e.getLineNumber(),r=e.getColumnNumber();e.isEval()&&(t=e.getEvalOrigin()+", "+t);var i=[t,n,r];return i.callSite=e,i.name=e.getFunctionName(),i}function sL(e){var t=e.callSite,n=e.name;n||(n="<anonymous@"+cL(e)+">");var r=t.getThis(),i=r&&t.getTypeName();return"Object"===i&&(i=void 0),"Function"===i&&(i=r.name||i),i&&t.getMethodName()?i+"."+n:n}function oL(e,t,n){var r=(new Date).toUTCString()+" "+this._namespace+" deprecated "+e;if(this._traced){for(var i=0;i<n.length;i++)r+="\n at "+n[i].toString();return r}return t&&(r+=" at "+cL(t)),r}function aL(e,t,n){var r="[36;1m"+this._namespace+"[22;39m [33;1mdeprecated[22;39m [0m"+e+"[39m";if(this._traced){for(var i=0;i<n.length;i++)r+="\n [36mat "+n[i].toString()+"[39m";return r}return t&&(r+=" [36m"+cL(t)+"[39m"),r}function cL(e){return JO(eL,e[0])+":"+e[1]+":"+e[2]}function lL(){var e=Error.stackTraceLimit,t={},n=Error.prepareStackTrace;Error.prepareStackTrace=uL,Error.stackTraceLimit=Math.max(10,e),Error.captureStackTrace(t);var r=t.stack.slice(1);return Error.prepareStackTrace=n,Error.stackTraceLimit=e,r}function uL(e,t){return t}function pL(e,t){if("function"!=typeof e)throw new TypeError("argument fn must be a function");var n=function(e){for(var t="",n=0;n<e;n++)t+=", arg"+n;return t.substr(2)}(e.length),r=iL(lL()[1]);return r.name=e.name,new Function("fn","log","deprecate","message","site",'"use strict"\nreturn function ('+n+") {log.call(deprecate, message, site)\nreturn fn.apply(this, arguments)\n}")(e,rL,this,t,r)}function hL(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("argument obj must be object");var r=Object.getOwnPropertyDescriptor(e,t);if(!r)throw new TypeError("must call property on owner object");if(!r.configurable)throw new TypeError("property must be configurable");var i=this,s=iL(lL()[1]);s.name=t,"value"in r&&(r=function(e,t){var n=Object.getOwnPropertyDescriptor(e,t),r=n.value;return n.get=function(){return r},n.writable&&(n.set=function(e){return r=e}),delete n.value,delete n.writable,Object.defineProperty(e,t,n),n}(e,t));var o=r.get,a=r.set;"function"==typeof o&&(r.get=function(){return rL.call(i,n,s),o.apply(this,arguments)}),"function"==typeof a&&(r.set=function(){return rL.call(i,n,s),a.apply(this,arguments)}),Object.defineProperty(e,t,r)}function dL(e,t,n){var r,i=new Error;return Object.defineProperty(i,"constructor",{value:dL}),Object.defineProperty(i,"message",{configurable:!0,enumerable:!1,value:t,writable:!0}),Object.defineProperty(i,"name",{enumerable:!1,configurable:!0,value:"DeprecationError",writable:!0}),Object.defineProperty(i,"namespace",{configurable:!0,enumerable:!1,value:e,writable:!0}),Object.defineProperty(i,"stack",{configurable:!0,enumerable:!1,get:function(){return void 0!==r?r:r=nL.call(this,n)},set:function(e){r=e}}),i}var fL,mL={exports:{}};
|
|
73
73
|
/*!
|
|
74
74
|
* bytes
|
|
75
75
|
* Copyright(c) 2012-2014 TJ Holowaychuk
|