fa-toolkit
Version:
a devtool for fast app
1 lines • 10.4 kB
JavaScript
"use strict";var _0x145d74=_0x1219;function _0x2533(){var t=["toString","11493867IaDZDr","writeFileSync","slice","@@iterator","450AixUFf","end","concat","toStringTag","addResourceToPkg","pop","displayName","tryEntries","../../sign-tools/rpk-sign-utils","./repack","constructor","type","13496736iEqFjB","4860930srIouD","values","illegal catch attempt","9piLDGG","path","getPrototypeOf","executing","next","exports","__await","length","rpkBuffer","try statement without catch or finally","isGeneratorFunction","mainPkg","' method","[object Generator]","done","async","create","complete","5739900GqzTbc","root","abrupt","throw","completed","normal","GeneratorFunction","join","break","mark","signPkgs","_beta.rpk","asyncIterator","processFile","4bZhxNb","delegate","hasOwnProperty","continue","suspendedStart","afterLoc","charAt","package","prototype","defineProperty","completion","stop","function","arg","Generator is already running","method","dist","value","suspendedYield","@@toStringTag","then","call","catchLoc","AsyncIterator","tryLoc","getResources","_invoke","prev","sent","5604JPGqxe","_sent","__proto__","finallyLoc","apply","name","generatePkgDef","iterator","18917250WHfadF","iterator result is not an object","setPrototypeOf","The iterator does not provide a '","return","symbol","rval","resolve","forEach","879729dexLSp"];return(_0x2533=function(){return t})()}function _typeof(t){var e=_0x1219;return(_typeof="function"==typeof Symbol&&e(148)==typeof Symbol[e(142)]?function(t){return typeof t}:function(t){var r=e;return t&&r(218)==typeof Symbol&&t[r(168)]===Symbol&&t!==Symbol[r(214)]?r(148):typeof t})(t)}function _regeneratorRuntime(){var f=_0x1219;_regeneratorRuntime=function(){return u};var u={},t=Object[f(214)],s=t[f(208)],h=Object[f(215)]||function(t,r,e){t[r]=e.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||f(157),e=r[f(204)]||"@@asyncIterator",n=r[f(161)]||f(225);function i(t,r,e){return Object[f(215)](t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{i({},"")}catch(t){i=function(t,r,e){return t[r]=e}}function c(t,r,e,n){var o,a,u,c,s,i=f,r=r&&r[i(214)]instanceof l?r:l,i=Object.create(r[i(214)]),n=new w(n||[]);return h(i,"_invoke",{value:(o=t,a=e,u=n,s=(c=f)(210),function(t,r){var e=c;if("executing"===s)throw new Error(e(220));if("completed"===s){if(e(195)===t)throw r;return P()}for(u[e(221)]=t,u[e(219)]=r;;){var n=u.delegate;if(n){var i=function t(r,e){var n=f,i=e[n(221)],o=r[n(142)][i];if(void 0===o)return e[n(207)]=null,n(195)===i&&r[n(142)][n(147)]&&(e[n(221)]=n(147),e[n(219)]=void 0,t(r,e),n(195)===e[n(221)])||n(147)!==i&&(e[n(221)]=n(195),e[n(219)]=new TypeError(n(146)+i+n(186))),v;o=p(o,r[n(142)],e[n(219)]);if("throw"===o[n(169)])return e[n(221)]="throw",e.arg=o[n(219)],e.delegate=null,v;var o=o.arg;return o?o[n(188)]?(e[r.resultName]=o[n(223)],e[n(178)]=r.nextLoc,n(147)!==e[n(221)]&&(e[n(221)]=n(178),e[n(219)]=void 0),e[n(207)]=null,v):o:(e[n(221)]=n(195),e.arg=new TypeError(n(144)),e[n(207)]=null,v)}(n,u);if(i){if(i===v)continue;return i}}if("next"===u.method)u[e(134)]=u[e(136)]=u[e(219)];else if(e(195)===u.method){if(e(210)===s)throw s=e(196),u[e(219)];u.dispatchException(u.arg)}else"return"===u[e(221)]&&u[e(194)](e(147),u.arg);s=e(177);i=p(o,a,u);if(e(197)===i.type){if(s=u[e(188)]?e(196):e(224),i.arg===v)continue;return{value:i[e(219)],done:u.done}}"throw"===i[e(169)]&&(s="completed",u[e(221)]=e(195),u[e(219)]=i[e(219)])}})}),i}function p(t,r,e){var n=f;try{return{type:n(197),arg:t[n(227)](r,e)}}catch(t){return{type:n(195),arg:t}}}u.wrap=c;var v={};function l(){}function a(){}function y(){}var d={};i(d,o,function(){return this});r=Object[f(176)],r=r&&r(r(k([])));r&&r!==t&&s.call(r,o)&&(d=r);var _=y.prototype=l[f(214)]=Object[f(190)](d);function g(t){var r=f;[r(178),r(195),r(147)].forEach(function(r){i(t,r,function(t){return this[_0x1219(232)](r,t)})})}function m(u,c){var r;h(this,"_invoke",{value:function(e,n){function t(){return new c(function(t,r){!function r(t,e,n,i){var o=_0x1219,t=p(u[t],u,e);if(o(195)!==t.type){var a=t[o(219)],e=a[o(223)];return e&&"object"==_typeof(e)&&s[o(227)](e,o(180))?c.resolve(e[o(180)])[o(226)](function(t){r(o(178),t,n,i)},function(t){r(o(195),t,n,i)}):c[o(150)](e)[o(226)](function(t){a.value=t,n(a)},function(t){return r("throw",t,n,i)})}i(t[o(219)])}(e,n,t,r)})}return r=r?r.then(t,t):t()}})}function b(t){var r=f,e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e[r(138)]=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function x(t){var r=f,e=t[r(216)]||{};e.type=r(197),delete e[r(219)],t[r(216)]=e}function w(t){var r=f;this.tryEntries=[{tryLoc:"root"}],t[r(151)](b,this),this.reset(!0)}function k(e){var n=f;if(e){var t=e[o];if(t)return t[n(227)](e);if("function"==typeof e.next)return e;if(!isNaN(e[n(181)])){var i=-1,t=function t(){for(var r=n;++i<e[r(181)];)if(s[r(227)](e,i))return t[r(223)]=e[i],t[r(188)]=!1,t;return t[r(223)]=void 0,t[r(188)]=!0,t};return t[n(178)]=t}}return{next:P}}function P(){return{value:void 0,done:!0}}return a[f(214)]=y,h(_,f(168),{value:y,configurable:!0}),h(y,"constructor",{value:a,configurable:!0}),a.displayName=i(y,n,f(198)),u[f(184)]=function(t){var r=f,t=r(218)==typeof t&&t[r(168)];return!!t&&(t===a||r(198)===(t[r(164)]||t[r(140)]))},u.mark=function(t){var r=f;return Object[r(145)]?Object.setPrototypeOf(t,y):(t[r(137)]=y,i(t,n,r(198))),t[r(214)]=Object.create(_),t},u.awrap=function(t){return{__await:t}},g(m[f(214)]),i(m.prototype,e,function(){return this}),u[f(229)]=m,u[f(189)]=function(t,r,e,n,i){var o=f;void 0===i&&(i=Promise);var a=new m(c(t,r,e,n),i);return u[o(184)](r)?a:a[o(178)]()[o(226)](function(t){var r=o;return t[r(188)]?t[r(223)]:a.next()})},g(_),i(_,n,"Generator"),i(_,o,function(){return this}),i(_,f(153),function(){return f(187)}),u.keys=function(t){var r,n=Object(t),i=[];for(r in n)i.push(r);return i.reverse(),function t(){for(var r=_0x1219;i[r(181)];){var e=i[r(163)]();if(e in n)return t[r(223)]=e,t.done=!1,t}return t.done=!0,t}},u[f(172)]=k,w[f(214)]={constructor:w,reset:function(t){var r=f;if(this[r(133)]=0,this[r(178)]=0,this[r(134)]=this._sent=void 0,this[r(188)]=!1,this[r(207)]=null,this[r(221)]=r(178),this.arg=void 0,this[r(165)][r(151)](x),!t)for(var e in this)"t"===e[r(212)](0)&&s[r(227)](this,e)&&!isNaN(+e[r(156)](1))&&(this[e]=void 0)},stop:function(){var t=f;this[t(188)]=!0;var r=this[t(165)][0][t(216)];if("throw"===r[t(169)])throw r[t(219)];return this[t(149)]},dispatchException:function(n){var i=f;if(this[i(188)])throw n;var o=this;function t(t,r){var e=i;return a.type="throw",a[e(219)]=n,o[e(178)]=t,r&&(o[e(221)]=e(178),o.arg=void 0),!!r}for(var r=this[i(165)][i(181)]-1;0<=r;--r){var e=this[i(165)][r],a=e[i(216)];if(i(193)===e[i(230)])return t("end");if(e[i(230)]<=this[i(133)]){var u=s[i(227)](e,i(228)),c=s[i(227)](e,i(138));if(u&&c){if(this[i(133)]<e[i(228)])return t(e[i(228)],!0);if(this[i(133)]<e[i(138)])return t(e.finallyLoc)}else if(u){if(this[i(133)]<e.catchLoc)return t(e.catchLoc,!0)}else{if(!c)throw new Error(i(183));if(this[i(133)]<e[i(138)])return t(e[i(138)])}}}},abrupt:function(t,r){for(var e=f,n=this[e(165)][e(181)]-1;0<=n;--n){var i=this[e(165)][n];if(i[e(230)]<=this[e(133)]&&s[e(227)](i,e(138))&&this[e(133)]<i[e(138)]){var o=i;break}}var a=(o=o&&(e(200)===t||e(209)===t)&&o[e(230)]<=r&&r<=o[e(138)]?null:o)?o.completion:{};return a[e(169)]=t,a[e(219)]=r,o?(this[e(221)]=e(178),this[e(178)]=o[e(138)],v):this[e(191)](a)},complete:function(t,r){var e=f;if(e(195)===t.type)throw t[e(219)];return"break"===t[e(169)]||"continue"===t.type?this[e(178)]=t.arg:e(147)===t[e(169)]?(this[e(149)]=this.arg=t[e(219)],this[e(221)]="return",this[e(178)]=e(159)):e(197)===t.type&&r&&(this[e(178)]=r),v},finish:function(t){for(var r=f,e=this.tryEntries[r(181)]-1;0<=e;--e){var n=this[r(165)][e];if(n[r(138)]===t)return this[r(191)](n[r(216)],n[r(211)]),x(n),v}},catch:function(t){for(var r=f,e=this[r(165)][r(181)]-1;0<=e;--e){var n=this.tryEntries[e];if(n[r(230)]===t){var i,o=n[r(216)];return"throw"===o.type&&(i=o[r(219)],x(n)),i}}throw new Error(r(173))},delegateYield:function(t,r,e){var n=f;return this[n(207)]={iterator:k(t),resultName:r,nextLoc:e},n(178)===this.method&&(this[n(219)]=void 0),v}},u}function _0x1219(t,r){var e=_0x2533();return(_0x1219=function(t,r){return e[t-=133]})(t,r)}function asyncGeneratorStep(t,r,e,n,i,o,a){var u=_0x1219;try{var c=t[o](a),s=c[u(223)]}catch(t){return void e(t)}c.done?r(s):Promise[u(150)](s)[u(226)](n,i)}function _asyncToGenerator(c){return function(){var t=this,u=arguments;return new Promise(function(r,e){var n=_0x1219,i=c[n(139)](t,u);function o(t){asyncGeneratorStep(i,r,e,o,a,n(178),t)}function a(t){asyncGeneratorStep(i,r,e,o,a,"throw",t)}o(void 0)})}}!function(){for(var t=_0x1219,r=_0x2533();;)try{if(984715==-parseInt(t(158))*(parseInt(t(135))/2)+parseInt(t(152))/3+-parseInt(t(206))/4*(-parseInt(t(171))/5)+-parseInt(t(192))/6+-parseInt(t(154))/7+-parseInt(t(170))/8*(-parseInt(t(174))/9)+parseInt(t(143))/10)break;r.push(r.shift())}catch(t){r.push(r.shift())}}();var fs=require("fs"),path=require(_0x145d74(175)),signUtils=require(_0x145d74(166)),_require=require(_0x145d74(167)),processFile=_require[_0x145d74(205)],rpkOutPath="";function betaRpkHandler(o,a,u){var e,n;return new Promise((e=_0x1219,n=_asyncToGenerator(_regeneratorRuntime()[e(201)](function t(e,r){var n,i;return _regeneratorRuntime().wrap(function(t){for(var r=_0x1219;;)switch(t[r(133)]=t[r(178)]){case 0:return i=path.dirname(o),n=path[r(199)](i,"build"),i=path[r(199)](i,r(222)),t[r(178)]=5,processFile(n);case 5:return t[r(178)]=7,repackRpk(a,i,n,u);case 7:return t[r(194)]("return",e(rpkOutPath));case 8:case r(159):return t[r(217)]()}},t)})),function(t,r){return n[e(139)](this,arguments)}))}function repackRpk(t,r,e,n){return _repackRpk.apply(this,arguments)}function _repackRpk(){var t=_0x145d74;return(_repackRpk=_asyncToGenerator(_regeneratorRuntime()[t(201)](function t(e,n,i,o){var a,u,c,s;return _regeneratorRuntime().wrap(function(t){for(var r=_0x1219;;)switch(t[r(133)]=t[r(178)]){case 0:return a=e[r(213)],e.versionName,u=signUtils[r(231)](i),s=signUtils[r(141)]([]),c=s[r(185)],s=s.subPkgs,signUtils[r(162)](u,i,c,s),t[r(178)]=6,signUtils[r(202)](a,o,c,s);case 6:s=t.sent,s=s[r(182)],rpkOutPath=path[r(199)](n,""[r(160)](a,r(203))),fs[r(155)](rpkOutPath,s);case 10:case"end":return t[r(217)]()}},t)})))[t(139)](this,arguments)}module[_0x145d74(179)]={betaRpkHandler:betaRpkHandler};