UNPKG

fa-toolkit

Version:

a devtool for fast app

1 lines 10 kB
"use strict";function _0x1d44(t,r){var n=_0xfdd1();return(_0x1d44=function(t,r){return n[t-=218]})(t,r)}var _0x42159c=_0x1d44;function _typeof(t){var n=_0x1d44;return(_typeof=n(287)==typeof Symbol&&n(231)==typeof Symbol.iterator?function(t){return typeof t}:function(t){var r=n;return t&&r(287)==typeof Symbol&&t[r(259)]===Symbol&&t!==Symbol[r(223)]?"symbol":typeof t})(t)}function _regeneratorRuntime(){var f=_0x1d44;_regeneratorRuntime=function(){return u};var u={},t=Object[f(223)],s=t[f(265)],h=Object[f(283)]||function(t,r,n){t[r]=n[f(222)]},r=f(287)==typeof Symbol?Symbol:{},i=r[f(297)]||f(306),n=r[f(277)]||f(220),e=r[f(320)]||f(276);function o(t,r,n){return Object[f(283)](t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{o({},"")}catch(t){o=function(t,r,n){return t[r]=n}}function c(t,r,n,e){var i,a,u,c,s,o=f,r=r&&r[o(223)]instanceof p?r:p,r=Object[o(219)](r[o(223)]),e=new x(e||[]);return h(r,o(290),{value:(i=t,a=n,u=e,s=(c=f)(264),function(t,r){var n=c;if(n(226)===s)throw new Error(n(300));if(n(288)===s){if("throw"===t)throw r;return L()}for(u.method=t,u[n(269)]=r;;){var e=u[n(221)];if(e){var o=function t(r,n){var e=f,o=n.method,i=r.iterator[o];if(void 0===i)return n.delegate=null,e(296)===o&&r[e(297)][e(235)]&&(n.method=e(235),n[e(269)]=void 0,t(r,n),e(296)===n.method)||e(235)!==o&&(n[e(270)]=e(296),n[e(269)]=new TypeError(e(241)+o+e(238))),v;i=l(i,r[e(297)],n[e(269)]);if(e(296)===i[e(278)])return n.method=e(296),n[e(269)]=i[e(269)],n[e(221)]=null,v;var i=i[e(269)];return i?i[e(267)]?(n[r[e(279)]]=i[e(222)],n.next=r[e(308)],e(235)!==n[e(270)]&&(n[e(270)]=e(254),n[e(269)]=void 0),n.delegate=null,v):i:(n[e(270)]=e(296),n.arg=new TypeError(e(312)),n.delegate=null,v)}(e,u);if(o){if(o===v)continue;return o}}if(n(254)===u[n(270)])u[n(293)]=u._sent=u[n(269)];else if(n(296)===u[n(270)]){if(n(264)===s)throw s=n(288),u[n(269)];u[n(244)](u[n(269)])}else"return"===u[n(270)]&&u.abrupt(n(235),u.arg);s="executing";o=l(i,a,u);if(n(271)===o[n(278)]){if(s=u.done?n(288):n(218),o[n(269)]===v)continue;return{value:o[n(269)],done:u[n(267)]}}n(296)===o[n(278)]&&(s=n(288),u.method=n(296),u[n(269)]=o[n(269)])}})}),r}function l(t,r,n){var e=f;try{return{type:e(271),arg:t[e(295)](r,n)}}catch(t){return{type:e(296),arg:t}}}u[f(291)]=c;var v={};function p(){}function a(){}function d(){}var y={};o(y,i,function(){return this});r=Object[f(292)],r=r&&r(r(O([])));r&&r!==t&&s[f(295)](r,i)&&(y=r);var g=d[f(223)]=p[f(223)]=Object[f(219)](y);function m(t){var r=f;[r(254),r(296),r(235)][r(285)](function(r){o(t,r,function(t){return this[_0x1d44(290)](r,t)})})}function _(u,c){var r;h(this,f(290),{value:function(n,e){function t(){return new c(function(t,r){!function r(t,n,e,o){var i=_0x1d44,t=l(u[t],u,n);if(i(296)!==t[i(278)]){var a=t[i(269)],n=a[i(222)];return n&&i(266)==_typeof(n)&&s[i(295)](n,i(227))?c[i(314)](n.__await)[i(319)](function(t){r(i(254),t,e,o)},function(t){r(i(296),t,e,o)}):c[i(314)](n)[i(319)](function(t){a.value=t,e(a)},function(t){return r(i(296),t,e,o)})}o(t[i(269)])}(n,e,t,r)})}return r=r?r.then(t,t):t()}})}function b(t){var r=f,n={tryLoc:t[0]};1 in t&&(n.catchLoc=t[1]),2 in t&&(n[r(282)]=t[2],n.afterLoc=t[3]),this[r(268)].push(n)}function w(t){var r=f,n=t.completion||{};n[r(278)]=r(271),delete n.arg,t[r(228)]=n}function x(t){var r=f;this.tryEntries=[{tryLoc:"root"}],t.forEach(b,this),this[r(251)](!0)}function O(n){var e=f;if(n){var t=n[i];if(t)return t[e(295)](n);if(e(287)==typeof n[e(254)])return n;if(!isNaN(n[e(281)])){var o=-1,t=function t(){for(var r=e;++o<n.length;)if(s[r(295)](n,o))return t.value=n[o],t[r(267)]=!1,t;return t.value=void 0,t[r(267)]=!0,t};return t.next=t}}return{next:L}}function L(){return{value:void 0,done:!0}}return a[f(223)]=d,h(g,f(259),{value:d,configurable:!0}),h(d,"constructor",{value:a,configurable:!0}),a[f(263)]=o(d,e,f(275)),u[f(322)]=function(t){var r=f,t=r(287)==typeof t&&t[r(259)];return!!t&&(t===a||r(275)===(t.displayName||t[r(304)]))},u[f(246)]=function(t){var r=f;return Object.setPrototypeOf?Object[r(253)](t,d):(t[r(255)]=d,o(t,e,"GeneratorFunction")),t[r(223)]=Object[r(219)](g),t},u[f(239)]=function(t){return{__await:t}},m(_[f(223)]),o(_[f(223)],n,function(){return this}),u[f(286)]=_,u[f(284)]=function(t,r,n,e,o){var i=f;void 0===o&&(o=Promise);var a=new _(c(t,r,n,e),o);return u[i(322)](r)?a:a[i(254)]().then(function(t){var r=i;return t.done?t[r(222)]:a[r(254)]()})},m(g),o(g,e,"Generator"),o(g,i,function(){return this}),o(g,"toString",function(){return f(303)}),u[f(260)]=function(t){var r,e=f,o=Object(t),i=[];for(r in o)i.push(r);return i[e(252)](),function t(){for(var r=e;i.length;){var n=i[r(250)]();if(n in o)return t.value=n,t.done=!1,t}return t[r(267)]=!0,t}},u[f(225)]=O,x.prototype={constructor:x,reset:function(t){var r=f;if(this[r(243)]=0,this[r(254)]=0,this[r(293)]=this._sent=void 0,this[r(267)]=!1,this.delegate=null,this.method="next",this.arg=void 0,this[r(268)][r(285)](w),!t)for(var n in this)"t"===n[r(245)](0)&&s[r(295)](this,n)&&!isNaN(+n[r(310)](1))&&(this[n]=void 0)},stop:function(){var t=f;this[t(267)]=!0;var r=this[t(268)][0][t(228)];if(t(296)===r.type)throw r[t(269)];return this[t(249)]},dispatchException:function(e){var o=f;if(this[o(267)])throw e;var i=this;function t(t,r){var n=o;return a.type=n(296),a[n(269)]=e,i[n(254)]=t,r&&(i[n(270)]="next",i[n(269)]=void 0),!!r}for(var r=this[o(268)].length-1;0<=r;--r){var n=this[o(268)][r],a=n[o(228)];if(o(237)===n[o(313)])return t(o(307));if(n[o(313)]<=this[o(243)]){var u=s.call(n,"catchLoc"),c=s.call(n,o(282));if(u&&c){if(this[o(243)]<n[o(309)])return t(n.catchLoc,!0);if(this[o(243)]<n.finallyLoc)return t(n.finallyLoc)}else if(u){if(this[o(243)]<n[o(309)])return t(n[o(309)],!0)}else{if(!c)throw new Error(o(230));if(this[o(243)]<n[o(282)])return t(n[o(282)])}}}},abrupt:function(t,r){for(var n=f,e=this[n(268)][n(281)]-1;0<=e;--e){var o=this.tryEntries[e];if(o[n(313)]<=this[n(243)]&&s[n(295)](o,n(282))&&this[n(243)]<o[n(282)]){var i=o;break}}var a=(i=i&&(n(262)===t||n(234)===t)&&i[n(313)]<=r&&r<=i[n(282)]?null:i)?i[n(228)]:{};return a[n(278)]=t,a.arg=r,i?(this.method="next",this[n(254)]=i[n(282)],v):this.complete(a)},complete:function(t,r){var n=f;if(n(296)===t[n(278)])throw t[n(269)];return n(262)===t[n(278)]||n(234)===t[n(278)]?this[n(254)]=t[n(269)]:"return"===t[n(278)]?(this[n(249)]=this[n(269)]=t.arg,this[n(270)]=n(235),this[n(254)]="end"):n(271)===t[n(278)]&&r&&(this.next=r),v},finish:function(t){for(var r=f,n=this[r(268)][r(281)]-1;0<=n;--n){var e=this[r(268)][n];if(e.finallyLoc===t)return this[r(272)](e[r(228)],e[r(274)]),w(e),v}},catch:function(t){for(var r=f,n=this[r(268)][r(281)]-1;0<=n;--n){var e=this[r(268)][n];if(e[r(313)]===t){var o,i=e.completion;return r(296)===i[r(278)]&&(o=i[r(269)],w(e)),o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){var e=f;return this[e(221)]={iterator:O(t),resultName:r,nextLoc:n},"next"===this[e(270)]&&(this[e(269)]=void 0),v}},u}function asyncGeneratorStep(t,r,n,e,o,i,a){var u=_0x1d44;try{var c=t[i](a),s=c[u(222)]}catch(t){return void n(t)}c[u(267)]?r(s):Promise.resolve(s).then(e,o)}function _asyncToGenerator(c){return function(){var t=this,u=arguments;return new Promise(function(r,n){var e=_0x1d44,o=c[e(299)](t,u);function i(t){asyncGeneratorStep(o,r,n,i,a,"next",t)}function a(t){asyncGeneratorStep(o,r,n,i,a,e(296),t)}i(void 0)})}}function _0xfdd1(){var t=["[object Generator]","name","2194836TNEgwO","@@iterator","end","nextLoc","catchLoc","slice","447vscGLw","iterator result is not an object","tryLoc","resolve","657AVaFKC","error","warning","filter","then","toStringTag","debug","isGeneratorFunction","suspendedYield","create","@@asyncIterator","delegate","value","prototype","1265288mRDpxH","values","executing","__await","completion","run","try statement without catch or finally","symbol","errors","exports","continue","return","../common/logger-plugin","root","' method","awrap","14915SgxbOK","The iterator does not provide a '","compilation","prev","dispatchException","charAt","mark","versionType","plugins","rval","pop","reset","reverse","setPrototypeOf","next","__proto__","env","getBuildMsg","17497620EhXnEo","constructor","keys","hasErrors","break","displayName","suspendedStart","hasOwnProperty","object","done","tryEntries","arg","method","normal","complete","26598uMpUvO","afterLoc","GeneratorFunction","@@toStringTag","asyncIterator","type","resultName","cwd","length","finallyLoc","defineProperty","async","forEach","AsyncIterator","function","completed","651ymgzSv","_invoke","wrap","getPrototypeOf","sent","17692XkDing","call","throw","iterator","webpack","apply","Generator is already running","4488Agozom","projectRoot"];return(_0xfdd1=function(){return t})()}!function(){for(var t=_0x1d44,r=_0xfdd1();;)try{if(741076==+parseInt(t(224))+-parseInt(t(294))/2*(-parseInt(t(311))/3)+-parseInt(t(305))/4+parseInt(t(240))/5+parseInt(t(273))/6*(parseInt(t(289))/7)+parseInt(t(301))/8*(parseInt(t(315))/9)+-parseInt(t(258))/10)break;r.push(r.shift())}catch(t){r.push(r.shift())}}();var webpack=require(_0x42159c(298)),BuildLogOutputPlugin=require(_0x42159c(236));function initEnv(t){var r=_0x42159c,n=t.projectRoot,t=t[r(247)];process[r(256)][r(302)]=n||process[r(280)](),process[r(256)][r(247)]=t||r(321)}function build(){var e,n,t=_0x42159c;return initEnv(0<arguments[t(281)]&&void 0!==arguments[0]?arguments[0]:{}),new Promise((e=t,n=_asyncToGenerator(_regeneratorRuntime()[e(246)](function t(s,f){var r,n=e;return _regeneratorRuntime()[n(291)](function(t){for(var c=n;;)switch(t[c(243)]=t[c(254)]){case 0:return r=require("../webpack.config"),t[c(254)]=3,r();case 3:(r=t.sent)[c(248)]=r[c(248)][c(318)](function(t){return!(t instanceof BuildLogOutputPlugin)}),webpack(r)[c(229)](function(t,r){var n=c;t&&f(t);var e=r[n(242)],o=e[n(232)],i=e.warnings,a=new BuildLogOutputPlugin,u=r[n(261)](),t=r.hasWarnings(),e=[],r=[];u&&(e=a[n(257)](o,n(316))),t&&(r=a[n(257)](i,n(317))),s({errors:e,warnings:r})});case 7:case c(307):return t.stop()}},t)})),function(t,r){return n[e(299)](this,arguments)}))}module[_0x42159c(233)]={build:build};