@atomicservice/ascf-toolkit 1.0.2 → 1.0.3-beta.6
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/lib/ascf-compiler/appjson-loader.js +1 -1
- package/lib/ascf-compiler/common/appjson-validator.js +1 -1
- package/lib/ascf-compiler/common/css-runtime-api.js +1 -1
- package/lib/ascf-compiler/common/exp-utils.js +1 -1
- package/lib/ascf-compiler/common/hash-sum.js +1 -1
- package/lib/ascf-compiler/common/hjs-utils.js +1 -1
- package/lib/ascf-compiler/common/hxml-validator.js +1 -1
- package/lib/ascf-compiler/common/logUndefined.js +1 -1
- package/lib/ascf-compiler/common/packoptions-utils.js +1 -1
- package/lib/ascf-compiler/common/parser-babel.js +1 -0
- package/lib/ascf-compiler/common/parser-swc.js +1 -0
- package/lib/ascf-compiler/common/parser.js +1 -0
- package/lib/ascf-compiler/common/utils.js +1 -1
- package/lib/ascf-compiler/css-process-loader.js +1 -1
- package/lib/ascf-compiler/extract-loader.js +1 -1
- package/lib/ascf-compiler/hcss-loader.js +1 -1
- package/lib/ascf-compiler/hjs-loader.js +1 -1
- package/lib/ascf-compiler/hxml-loader.js +1 -1
- package/lib/ascf-compiler/loader-utils.js +1 -1
- package/lib/ascf-compiler/path-process-loader.js +1 -1
- package/lib/ascf-compiler/plugin/copy-bundle-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/extConfig-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/html-generator-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/i18n-transform-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/manifest-generator-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/resource-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/index.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/jsonpChunkLoadingRuntimeModule.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/jsonpHelpers.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/jsonpTemplatePlugin.js +1 -1
- package/lib/ascf-compiler/swc-loader.js +1 -0
- package/lib/ascf-compiler/template/attr-utils.js +1 -1
- package/lib/ascf-compiler/template/node-name-utils.js +1 -1
- package/lib/ascf-compiler/trustlist-hxml-verify-loader.js +1 -1
- package/lib/ascf-compiler/trustlist-js-verify-loader.js +1 -1
- package/lib/ascf-compiler/trustlist-verify/config.js +1 -1
- package/lib/ascf-compiler/trustlist-verify/utils.js +1 -1
- package/lib/ascf-compiler/vue-compiler/vue.bundle.js +1 -1
- package/lib/ascf-compiler/watch/watch.js +1 -1
- package/lib/ascf-compiler/web.webpack.config.js +1 -1
- package/lib/ascf-converter/common/commonConfig.js +1 -1
- package/lib/ascf-converter/common/commonUtils.js +1 -1
- package/lib/ascf-converter/common/path-validator.js +1 -0
- package/lib/ascf-converter/common/textDocument.js +1 -1
- package/lib/ascf-converter/compiler-utils/parse5.bundle.js +1 -1
- package/lib/ascf-converter/features/converter.js +1 -1
- package/lib/ascf-converter/features/fileHandle.js +1 -1
- package/lib/ascf-converter/features/transformReport.js +1 -1
- package/lib/ascf-converter/lib/apiadapter4alipay.js +1 -1
- package/lib/ascf-converter/parse/babelParser.js +1 -1
- package/lib/ascf-converter/parse/importVisitor.js +1 -1
- package/lib/ascf-converter/parse/wxssParser.js +1 -1
- package/lib/bin/ascf.js +1 -1
- package/lib/common/config.js +1 -1
- package/lib/common/log4js.js +1 -0
- package/lib/common/logger-plugin.js +1 -1
- package/lib/common/remove-strict-mode-plugin.js +1 -1
- package/lib/common/utils.js +1 -1
- package/lib/common/version-check.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +6 -7
- package/lib/ascf-compiler/chalk/bundle.cjs.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var _0x502817=_0x16da;function _0x16da(t,r){var n=_0x2636();return(_0x16da=function(t,r){return n[t-=122]})(t,r)}function _typeof(t){var n=_0x16da;return(_typeof=n(183)==typeof Symbol&&"symbol"==typeof Symbol[n(129)]?function(t){return typeof t}:function(t){var r=n;return t&&r(183)==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?r(181):typeof t})(t)}function _regeneratorRuntime(){var s=_0x16da;_regeneratorRuntime=function(){return c};var f,c={},t=Object[s(211)],p=t[s(191)],h=Object[s(242)]||function(t,r,n){var e=s;t[r]=n[e(150)]},r="function"==typeof Symbol?Symbol:{},i=r[s(129)]||"@@iterator",n=r[s(239)]||s(245),e=r[s(209)]||s(236);function o(t,r,n){return Object.defineProperty(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 u(t,r,n,e){var o,i,a,c,u=s,r=r&&r[u(211)]instanceof g?r:g,r=Object[u(212)](r[u(211)]),u=new O(e||[]);return h(r,"_invoke",{value:(o=t,i=n,a=u,c=l,function(t,r){var n=_0x16da;if(c===_)throw Error(n(196));if(c===y){if(n(174)===t)throw r;return{value:f,done:!0}}for(a[n(178)]=t,a[n(182)]=r;;){var e=a[n(264)];if(e){e=function t(r,n){var e=s,o=n[e(178)],i=r.iterator[o];if(i===f)return n.delegate=null,"throw"===o&&r[e(129)][e(156)]&&(n[e(178)]=e(156),n[e(182)]=f,t(r,n),e(174)===n.method)||e(156)!==o&&(n.method=e(174),n.arg=new TypeError(e(206)+o+"' method")),d;o=m(i,r[e(129)],n[e(182)]);if("throw"===o[e(180)])return n[e(178)]="throw",n[e(182)]=o[e(182)],n[e(264)]=null,d;i=o[e(182)];return i?i[e(154)]?(n[r[e(197)]]=i[e(150)],n[e(157)]=r[e(173)],"return"!==n.method&&(n[e(178)]=e(157),n[e(182)]=f),n[e(264)]=null,d):i:(n[e(178)]="throw",n[e(182)]=new TypeError(e(124)),n[e(264)]=null,d)}(e,a);if(e){if(e===d)continue;return e}}if(n(157)===a[n(178)])a.sent=a._sent=a.arg;else if("throw"===a[n(178)]){if(c===l)throw c=y,a[n(182)];a[n(210)](a[n(182)])}else"return"===a.method&&a.abrupt(n(156),a[n(182)]);c=_;e=m(o,i,a);if("normal"===e.type){if(c=a[n(154)]?y:v,e[n(182)]===d)continue;return{value:e[n(182)],done:a[n(154)]}}"throw"===e[n(180)]&&(c=y,a[n(178)]=n(174),a.arg=e[n(182)])}})}),r}function m(t,r,n){var e=s;try{return{type:e(256),arg:t[e(158)](r,n)}}catch(t){return{type:e(174),arg:t}}}c[s(136)]=u;var l="suspendedStart",v=s(259),_=s(238),y=s(123),d={};function g(){}function a(){}function x(){}var r={},b=(o(r,i,function(){return this}),Object[s(217)]),b=b&&b(b(k([]))),w=(b&&b!==t&&p.call(b,i)&&(r=b),x[s(211)]=g.prototype=Object[s(212)](r));function C(t){var r=s;["next",r(174),"return"][r(145)](function(r){o(t,r,function(t){return this[_0x16da(257)](r,t)})})}function P(c,u){var r;h(this,"_invoke",{value:function(n,e){function t(){return new u(function(t,r){!function r(t,n,e,o){var i,a=_0x16da,t=m(c[t],c,n);if(a(174)!==t[a(180)])return(n=(i=t[a(182)])[a(150)])&&a(228)==_typeof(n)&&p.call(n,a(152))?u[a(149)](n.__await)[a(208)](function(t){r(a(157),t,e,o)},function(t){r("throw",t,e,o)}):u.resolve(n)[a(208)](function(t){i[a(150)]=t,e(i)},function(t){return r(a(174),t,e,o)});o(t.arg)}(n,e,t,r)})}return r=r?r[_0x16da(208)](t,t):t()}})}function j(t){var r=s,n={tryLoc:t[0]};1 in t&&(n[r(199)]=t[1]),2 in t&&(n[r(187)]=t[2],n.afterLoc=t[3]),this[r(207)][r(250)](n)}function S(t){var r=s,n=t[r(247)]||{};n.type=r(256),delete n[r(182)],t.completion=n}function O(t){var r=s;this[r(207)]=[{tryLoc:"root"}],t[r(145)](j,this),this.reset(!0)}function k(n){var e=s;if(n||""===n){var o,t=n[i];if(t)return t.call(n);if("function"==typeof n.next)return n;if(!isNaN(n[e(223)]))return o=-1,(t=function t(){for(var r=e;++o<n[r(223)];)if(p[r(158)](n,o))return t[r(150)]=n[o],t[r(154)]=!1,t;return t[r(150)]=f,t[r(154)]=!0,t}).next=t}throw new TypeError(_typeof(n)+e(237))}return a[s(211)]=x,h(w,s(190),{value:x,configurable:!0}),h(x,"constructor",{value:a,configurable:!0}),a[s(194)]=o(x,e,"GeneratorFunction"),c.isGeneratorFunction=function(t){var r=s,t=r(183)==typeof t&&t[r(190)];return!!t&&(t===a||r(215)===(t[r(194)]||t[r(192)]))},c.mark=function(t){var r=s;return Object[r(240)]?Object.setPrototypeOf(t,x):(t[r(193)]=x,o(t,e,r(215))),t.prototype=Object.create(w),t},c[s(133)]=function(t){return{__await:t}},C(P.prototype),o(P[s(211)],n,function(){return this}),c[s(233)]=P,c[s(261)]=function(t,r,n,e,o){var i=s,a=(void 0===o&&(o=Promise),new P(u(t,r,n,e),o));return c[i(200)](r)?a:a[i(157)]()[i(208)](function(t){var r=i;return t[r(154)]?t[r(150)]:a[r(157)]()})},C(w),o(w,e,s(230)),o(w,i,function(){return this}),o(w,s(266),function(){return"[object Generator]"}),c[s(179)]=function(t){var r,e=s,o=Object(t),i=[];for(r in o)i[e(250)](r);return i[e(142)](),function t(){for(var r=e;i[r(223)];){var n=i[r(214)]();if(n in o)return t.value=n,t[r(154)]=!1,t}return t[r(154)]=!0,t}},c[s(255)]=k,O.prototype={constructor:O,reset:function(t){var r=s;if(this[r(162)]=0,this[r(157)]=0,this[r(246)]=this._sent=f,this[r(154)]=!1,this[r(264)]=null,this[r(178)]=r(157),this[r(182)]=f,this[r(207)].forEach(S),!t)for(var n in this)"t"===n.charAt(0)&&p.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=f)},stop:function(){var t=s,r=(this.done=!0,this[t(207)][0][t(247)]);if(t(174)===r[t(180)])throw r[t(182)];return this[t(258)]},dispatchException:function(e){var o=s;if(this[o(154)])throw e;var i=this;function t(t,r){var n=o;return a.type="throw",a.arg=e,i.next=t,r&&(i[n(178)]=n(157),i[n(182)]=f),!!r}for(var r=this[o(207)].length-1;0<=r;--r){var n=this.tryEntries[r],a=n[o(247)];if("root"===n[o(167)])return t(o(135));if(n[o(167)]<=this[o(162)]){var c=p[o(158)](n,o(199)),u=p[o(158)](n,o(187));if(c&&u){if(this[o(162)]<n[o(199)])return t(n[o(199)],!0);if(this.prev<n[o(187)])return t(n[o(187)])}else if(c){if(this[o(162)]<n.catchLoc)return t(n.catchLoc,!0)}else{if(!u)throw Error(o(205));if(this[o(162)]<n[o(187)])return t(n[o(187)])}}}},abrupt:function(t,r){for(var n=s,e=this[n(207)][n(223)]-1;0<=e;--e){var o=this.tryEntries[e];if(o[n(167)]<=this[n(162)]&&p[n(158)](o,n(187))&&this[n(162)]<o.finallyLoc){var i=o;break}}var a=(i=i&&(n(232)===t||n(176)===t)&&i.tryLoc<=r&&r<=i[n(187)]?null:i)?i[n(247)]:{};return a.type=t,a[n(182)]=r,i?(this[n(178)]=n(157),this[n(157)]=i[n(187)],d):this[n(125)](a)},complete:function(t,r){var n=s;if(n(174)===t[n(180)])throw t[n(182)];return"break"===t.type||"continue"===t[n(180)]?this.next=t.arg:n(156)===t[n(180)]?(this[n(258)]=this.arg=t.arg,this.method="return",this[n(157)]=n(135)):"normal"===t[n(180)]&&r&&(this[n(157)]=r),d},finish:function(t){for(var r=s,n=this[r(207)][r(223)]-1;0<=n;--n){var e=this[r(207)][n];if(e[r(187)]===t)return this[r(125)](e[r(247)],e[r(186)]),S(e),d}},catch:function(t){for(var r=s,n=this[r(207)][r(223)]-1;0<=n;--n){var e,o,i=this.tryEntries[n];if(i[r(167)]===t)return"throw"===(e=i[r(247)]).type&&(o=e[r(182)],S(i)),o}throw Error(r(253))},delegateYield:function(t,r,n){var e=s;return this[e(264)]={iterator:k(t),resultName:r,nextLoc:n},e(157)===this[e(178)]&&(this[e(182)]=f),d}},c}function asyncGeneratorStep(t,r,n,e,o,i,a){var c=_0x16da;try{var u=t[i](a),s=u[c(150)]}catch(t){return void n(t)}u[c(154)]?r(s):Promise[c(149)](s)[c(208)](e,o)}function _asyncToGenerator(c){return function(){var t=this,a=arguments;return new Promise(function(r,n){var e=c[_0x16da(248)](t,a);function o(t){asyncGeneratorStep(e,r,n,o,i,"next",t)}function i(t){asyncGeneratorStep(e,r,n,o,i,"throw",t)}o(void 0)})}}(()=>{for(var t=_0x16da,r=_0x2636();;)try{if(535564==+parseInt(t(220))+-parseInt(t(201))/2*(parseInt(t(155))/3)+parseInt(t(160))/4+-parseInt(t(204))/5+-parseInt(t(168))/6+-parseInt(t(131))/7*(-parseInt(t(263))/8)+-parseInt(t(252))/9*(-parseInt(t(249))/10))break;r.push(r.shift())}catch(t){r.push(r.shift())}})(),Object.defineProperty(exports,_0x502817(147),{value:!0}),exports.checkInputPathFun=exports[_0x502817(251)]=exports[_0x502817(127)]=void 0;var commonConfig_1=require(_0x502817(137)),path=require(_0x502817(213)),fs=require("fs"),commonUtils_1=require(_0x502817(169)),_require=require("../../common/utils"),clearResource=_require[_0x502817(265)];function confirmConverterFun(t,r){return _confirmConverterFun.apply(this,arguments)}function _confirmConverterFun(){return(_confirmConverterFun=_asyncToGenerator(_regeneratorRuntime().mark(function t(n,e){var o,i,a=_0x16da;return _regeneratorRuntime()[a(136)](function(t){for(var r=a;;)switch(t.prev=t[r(157)]){case 0:if(t.prev=0,o=path.resolve(n[r(262)],r(225)),i=path[r(149)](n.inputPath,r(222)),fs.existsSync(i)||!fs[r(221)](o)||n[r(171)]){t[r(157)]=7;break}return t[r(172)](r(156),{command:r(216)});case 7:return t[r(157)]=9,doConvert(n,e);case 9:return t[r(172)]("return",t[r(246)]);case 10:t[r(157)]=16;break;case 12:return t[r(162)]=12,t.t0=t[r(165)](0),console[r(144)](t.t0),t[r(172)]("return",{command:"failedTransform",errorMessage:t.t0[r(202)]});case 16:case"end":return t[r(260)]()}},t,null,[[0,12]])}))).apply(this,arguments)}function confirmConverterH5Fun(t,r){var n=_0x502817,e=path.join(t[n(177)],t[n(151)]);try{return commonUtils_1.createDirs(e,n(189),!0),commonUtils_1[n(203)](path[n(218)](__filename,"../lib","src"),path[n(218)](e,n(189)),!1,!0),commonUtils_1[n(226)](t,path[n(218)](e,n(189))),{command:n(227)}}catch(t){return console[n(144)](t),{command:n(139),errorMessage:t[n(202)]}}}function checkConvertOutput(t,r){var n=_0x502817,t=path[n(149)](t),r=path[n(149)](r);if(fs[n(221)](r))throw new Error("Output path ".concat(r,n(234)));if(r[n(224)](t+path[n(126)]))throw new Error(n(143))}function doConvert(t,r){return _doConvert[_0x502817(248)](this,arguments)}function _doConvert(){var t=_0x502817;return(_doConvert=_asyncToGenerator(_regeneratorRuntime().mark(function t(n,r){var e,o,i;return _regeneratorRuntime().wrap(function(t){for(var r=_0x16da;;)switch(t[r(162)]=t[r(157)]){case 0:if(e=path[r(149)](n[r(177)],r(161)),process[r(163)][r(265)]===r(184))return t.next=4,clearResource([e]);t[r(157)]=4;break;case 4:return checkConvertOutput(n[r(262)],e),o=commonConfig_1[r(243)][r(188)],t.prev=6,commonUtils_1[r(219)](e,o),commonUtils_1.createTransformReportFile(e,n[r(262)]),i=path[r(218)](e,o),"./"===o||""===o?(commonUtils_1[r(164)](n[r(262)],i),commonUtils_1.copyDir(n[r(262)],i)):(commonUtils_1.setOriginPtahObject(path[r(218)](n[r(262)],o),i),commonUtils_1[r(203)](path[r(218)](n.inputPath,o),i),commonUtils_1[r(148)](path[r(218)](n[r(262)]),e)),commonUtils_1[r(231)](),commonUtils_1[r(254)](path[r(218)](e,o),n),commonUtils_1[r(141)](path[r(218)](e)),"my"===commonConfig_1[r(243)][r(241)]&&commonUtils_1[r(166)](e,path[r(218)](__filename,r(153))),t[r(172)](r(156),{command:r(227),folderUrl:e});case 18:return t[r(162)]=18,t.t0=t[r(165)](6),console[r(144)](t.t0),removePromise(e)[r(195)](),t.abrupt(r(156),{command:r(139),errorMessage:t.t0[r(202)]});case 23:case"end":return t[r(260)]()}},t,null,[[6,18]])})))[t(248)](this,arguments)}function removePromise(i){return new Promise(function(o,t){fs.stat(i,function(t,r){var e=_0x16da;r.isDirectory()?fs[e(146)](i,function(t,r){var n=e,r=(r=r[n(122)](function(t){return path[n(218)](i,t)}))[n(122)](function(t){return removePromise(t)});Promise[n(132)](r)[n(208)](function(){fs[n(175)](i,o)})}):fs[e(244)](i,o)})})}function checkInputPathFun(t){var r=_0x502817,t=path[r(149)](t),n=checkMiniProgram(t);return{command:r(198),data:{returnCode:n,outPath:path[r(235)](t)}}}function _0x2636(){var t=["8AAljJD","delegate","clearResource","toString","map","completed","iterator result is not an object","complete","sep","confirmConverterFun","hxml","iterator","pages","3062297uomwMq","all","awrap","miniprogramRoot","end","wrap","../common/commonConfig","parse","failedTransform","configBasenameArray","projectConfigFile","reverse","Output directory cannot be a subdirectory of the input directory.","error","forEach","readdir","__esModule","copyConfigFiles","resolve","value","packageName","__await","../../","done","784473czbyXz","return","next","call","readFileSync","2342684DfKVgv","ascf/ascf_src","prev","env","setOriginPtahObject","catch","adaptApiFile","tryLoc","1706082PbGXhQ","../common/commonUtils","smartProgramRoot","confirmAddConfig","abrupt","nextLoc","throw","rmdir","continue","outPath","method","keys","type","symbol","arg","function","yes","isArray","afterLoc","finallyLoc","srcRootPath","src","constructor","hasOwnProperty","name","__proto__","displayName","finally","Generator is already running","resultName","postInputPath","catchLoc","isGeneratorFunction","6nTrrnd","message","copyDir","4361185QWShAo","try statement without catch or finally","The iterator does not provide a '","tryEntries","then","toStringTag","dispatchException","prototype","create","path","pop","GeneratorFunction","notifyConfig","getPrototypeOf","join","createDirs","929125SGxuBj","existsSync","project.config.json","length","startsWith","app.json","handleConfigInfo","completeTransform","object","checkInputPathFun","Generator","transformNodeModuleComponent","break","AsyncIterator"," is exists. Use the -c parameter to clear.","dirname","@@toStringTag"," is not iterable","executing","asyncIterator","setPrototypeOf","appletType","defineProperty","Applets","unlink","@@asyncIterator","sent","completion","apply","113990SffDAj","push","confirmConverterH5Fun","414ONHTXI","illegal catch attempt","appJsonFile","values","normal","_invoke","rval","suspendedYield","stop","async","inputPath"];return(_0x2636=function(){return t})()}function checkMiniProgram(t){var r=_0x502817,n=!0,e=path[r(218)](t,"app.json");return n=fs[r(221)](e)&&identifyProgram(t)?n:!1}function identifyProgram(t){var r=_0x502817;try{var n=path[r(218)](t,"app.json"),e=JSON[r(138)](fs[r(159)](n)[r(266)]());if(e&&e.pages&&Array[r(185)](e[r(130)])&&0<e[r(130)].length)for(var o=getSrcRootPath(t),i=0,a=Object.keys(commonConfig_1.projectFileSuffix);i<a[r(223)];i++){var c=a[i],u=path[r(218)](t,o,e[r(130)][0]+commonConfig_1.projectFileSuffix[c][r(128)]);if(fs.existsSync(u))return"wx"===c?commonConfig_1.Applets[r(241)]="tt":commonConfig_1[r(243)][r(241)]=c,!0}return!1}catch(t){return!1}}function getSrcRootPath(t){var r=_0x502817;commonConfig_1[r(243)][r(188)]="./";for(var n=0;n<commonConfig_1[r(140)][r(223)];n++){var e=commonConfig_1.configBasenameArray[n],e=path[r(218)](t,e);fs[r(221)](e)&&((e=JSON[r(138)](fs[r(159)](e).toString()))[r(134)]?commonConfig_1[r(243)][r(188)]=e[r(134)]:e[r(170)]?commonConfig_1[r(243)][r(188)]=e[r(170)]:commonConfig_1.Applets[r(188)]="./")}return commonConfig_1[r(243)][r(188)]}exports[_0x502817(127)]=confirmConverterFun,exports[_0x502817(251)]=confirmConverterH5Fun,exports[_0x502817(229)]=checkInputPathFun;
|
|
1
|
+
var _0x2cf1e0=_0x104c;function _typeof(r){var e=_0x104c;return(_typeof=e(444)==typeof Symbol&&e(473)==typeof Symbol.iterator?function(r){return typeof r}:function(r){var t=e;return r&&t(444)==typeof Symbol&&r[t(423)]===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function _regeneratorRuntime(){var s=_0x104c;_regeneratorRuntime=function(){return c};var f,c={},r=Object[s(361)],h=r[s(394)],m=Object[s(458)]||function(r,t,e){var n=s;r[t]=e[n(469)]},t="function"==typeof Symbol?Symbol:{},i=t[s(403)]||s(474),e=t.asyncIterator||s(374),n=t[s(467)]||"@@toStringTag";function o(r,t,e){return Object[s(458)](r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{o({},"")}catch(r){o=function(r,t,e){return r[t]=e}}function u(r,t,e,n){var o,i,a,c,u=s,t=t&&t[u(361)]instanceof x?t:x,t=Object[u(365)](t[u(361)]),u=new O(n||[]);return m(t,"_invoke",{value:(o=r,i=e,a=u,c=l,function(r,t){var e=_0x104c;if(c===_)throw Error(e(352));if(c===y){if(e(419)===r)throw t;return{value:f,done:!0}}for(a[e(408)]=r,a[e(448)]=t;;){var n=a[e(354)];if(n){n=function r(t,e){var n=s,o=e[n(408)],i=t[n(403)][o];if(i===f)return e.delegate=null,n(419)===o&&t[n(403)][n(480)]&&(e[n(408)]="return",e[n(448)]=f,r(t,e),n(419)===e[n(408)])||"return"!==o&&(e.method=n(419),e[n(448)]=new TypeError(n(416)+o+"' method")),g;o=p(i,t.iterator,e.arg);if(n(419)===o[n(445)])return e[n(408)]="throw",e[n(448)]=o[n(448)],e.delegate=null,g;i=o[n(448)];return i?i[n(420)]?(e[t.resultName]=i[n(469)],e[n(388)]=t[n(341)],n(480)!==e.method&&(e.method="next",e.arg=f),e[n(354)]=null,g):i:(e[n(408)]=n(419),e[n(448)]=new TypeError("iterator result is not an object"),e[n(354)]=null,g)}(n,a);if(n){if(n===g)continue;return n}}if("next"===a[e(408)])a[e(443)]=a._sent=a.arg;else if(e(419)===a[e(408)]){if(c===l)throw c=y,a[e(448)];a[e(482)](a[e(448)])}else e(480)===a[e(408)]&&a[e(414)](e(480),a[e(448)]);c=_;n=p(o,i,a);if(e(349)===n[e(445)]){if(c=a[e(420)]?y:v,n[e(448)]===g)continue;return{value:n[e(448)],done:a[e(420)]}}e(419)===n.type&&(c=y,a[e(408)]="throw",a.arg=n[e(448)])}})}),t}function p(r,t,e){var n=s;try{return{type:n(349),arg:r.call(t,e)}}catch(r){return{type:"throw",arg:r}}}c[s(410)]=u;var l="suspendedStart",v=s(418),_="executing",y=s(350),g={};function x(){}function a(){}function d(){}var t={},b=(o(t,i,function(){return this}),Object[s(348)]),b=b&&b(b(S([]))),w=(b&&b!==r&&h[s(376)](b,i)&&(t=b),d[s(361)]=x[s(361)]=Object[s(365)](t));function C(r){var t=s;["next",t(419),t(480)].forEach(function(t){o(r,t,function(r){return this[_0x104c(460)](t,r)})})}function j(c,u){var t;m(this,s(460),{value:function(e,n){function r(){return new u(function(r,t){!function t(r,e,n,o){var i,a=_0x104c,r=p(c[r],c,e);if("throw"!==r[a(445)])return(e=(i=r.arg).value)&&a(384)==_typeof(e)&&h[a(376)](e,a(407))?u.resolve(e[a(407)]).then(function(r){t(a(388),r,n,o)},function(r){t(a(419),r,n,o)}):u[a(389)](e)[a(462)](function(r){i[a(469)]=r,n(i)},function(r){return t(a(419),r,n,o)});o(r[a(448)])}(e,n,r,t)})}return t=t?t.then(r,r):r()}})}function P(r){var t=s,e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e[t(440)]=r[3]),this[t(437)][t(391)](e)}function F(r){var t=s,e=r[t(345)]||{};e[t(445)]=t(349),delete e[t(448)],r[t(345)]=e}function O(r){var t=s;this[t(437)]=[{tryLoc:t(425)}],r.forEach(P,this),this[t(344)](!0)}function S(e){var n=s;if(e||""===e){var o,r=e[i];if(r)return r[n(376)](e);if("function"==typeof e[n(388)])return e;if(!isNaN(e.length))return o=-1,(r=function r(){for(var t=n;++o<e[t(412)];)if(h[t(376)](e,o))return r[t(469)]=e[o],r[t(420)]=!1,r;return r.value=f,r[t(420)]=!0,r}).next=r}throw new TypeError(_typeof(e)+" is not iterable")}return a[s(361)]=d,m(w,"constructor",{value:d,configurable:!0}),m(d,s(423),{value:a,configurable:!0}),a[s(429)]=o(d,n,s(360)),c.isGeneratorFunction=function(r){var t=s,r=t(444)==typeof r&&r[t(423)];return!!r&&(r===a||t(360)===(r[t(429)]||r.name))},c[s(405)]=function(r){var t=s;return Object[t(377)]?Object[t(377)](r,d):(r[t(362)]=d,o(r,n,t(360))),r[t(361)]=Object[t(365)](w),r},c[s(441)]=function(r){return{__await:r}},C(j[s(361)]),o(j.prototype,e,function(){return this}),c[s(379)]=j,c[s(432)]=function(r,t,e,n,o){var i=s,a=(void 0===o&&(o=Promise),new j(u(r,t,e,n),o));return c.isGeneratorFunction(t)?a:a[i(388)]()[i(462)](function(r){var t=i;return r[t(420)]?r[t(469)]:a[t(388)]()})},C(w),o(w,n,s(363)),o(w,i,function(){return this}),o(w,"toString",function(){return"[object Generator]"}),c[s(453)]=function(r){var t,n=s,o=Object(r),i=[];for(t in o)i.push(t);return i[n(392)](),function r(){for(var t=n;i[t(412)];){var e=i[t(370)]();if(e in o)return r[t(469)]=e,r[t(420)]=!1,r}return r[t(420)]=!0,r}},c[s(380)]=S,O.prototype={constructor:O,reset:function(r){var t=s;if(this.prev=0,this.next=0,this.sent=this._sent=f,this[t(420)]=!1,this[t(354)]=null,this.method=t(388),this.arg=f,this[t(437)][t(402)](F),!r)for(var e in this)"t"===e.charAt(0)&&h.call(this,e)&&!isNaN(+e[t(404)](1))&&(this[e]=f)},stop:function(){var r=s,t=(this.done=!0,this.tryEntries[0][r(345)]);if("throw"===t[r(445)])throw t[r(448)];return this[r(372)]},dispatchException:function(n){var o=s;if(this[o(420)])throw n;var i=this;function r(r,t){var e=o;return a[e(445)]=e(419),a[e(448)]=n,i[e(388)]=r,t&&(i[e(408)]=e(388),i[e(448)]=f),!!t}for(var t=this[o(437)].length-1;0<=t;--t){var e=this[o(437)][t],a=e[o(345)];if(o(425)===e[o(411)])return r(o(383));if(e[o(411)]<=this[o(434)]){var c=h.call(e,"catchLoc"),u=h[o(376)](e,o(478));if(c&&u){if(this[o(434)]<e.catchLoc)return r(e[o(401)],!0);if(this[o(434)]<e[o(478)])return r(e[o(478)])}else if(c){if(this[o(434)]<e[o(401)])return r(e[o(401)],!0)}else{if(!u)throw Error("try statement without catch or finally");if(this[o(434)]<e[o(478)])return r(e[o(478)])}}}},abrupt:function(r,t){for(var e=s,n=this[e(437)][e(412)]-1;0<=n;--n){var o=this[e(437)][n];if(o[e(411)]<=this[e(434)]&&h.call(o,"finallyLoc")&&this.prev<o[e(478)]){var i=o;break}}var a=(i=i&&("break"===r||"continue"===r)&&i.tryLoc<=t&&t<=i[e(478)]?null:i)?i[e(345)]:{};return a[e(445)]=r,a[e(448)]=t,i?(this[e(408)]=e(388),this[e(388)]=i.finallyLoc,g):this[e(471)](a)},complete:function(r,t){var e=s;if("throw"===r[e(445)])throw r[e(448)];return"break"===r[e(445)]||e(417)===r.type?this[e(388)]=r[e(448)]:"return"===r[e(445)]?(this.rval=this.arg=r[e(448)],this[e(408)]=e(480),this[e(388)]="end"):e(349)===r.type&&t&&(this[e(388)]=t),g},finish:function(r){for(var t=s,e=this.tryEntries.length-1;0<=e;--e){var n=this[t(437)][e];if(n.finallyLoc===r)return this.complete(n[t(345)],n.afterLoc),F(n),g}},catch:function(r){for(var t=s,e=this.tryEntries[t(412)]-1;0<=e;--e){var n,o,i=this.tryEntries[e];if(i.tryLoc===r)return n=i[t(345)],t(419)===n[t(445)]&&(o=n[t(448)],F(i)),o}throw Error(t(457))},delegateYield:function(r,t,e){var n=s;return this[n(354)]={iterator:S(r),resultName:t,nextLoc:e},"next"===this[n(408)]&&(this[n(448)]=f),g}},c}function asyncGeneratorStep(r,t,e,n,o,i,a){var c=_0x104c;try{var u=r[i](a),s=u[c(469)]}catch(r){return void e(r)}u[c(420)]?t(s):Promise[c(389)](s)[c(462)](n,o)}function _asyncToGenerator(c){return function(){var r=this,a=arguments;return new Promise(function(t,e){var n=c.apply(r,a);function o(r){asyncGeneratorStep(n,t,e,o,i,"next",r)}function i(r){asyncGeneratorStep(n,t,e,o,i,_0x104c(419),r)}o(void 0)})}}(()=>{for(var r=_0x104c,t=_0x3185();;)try{if(180643==-parseInt(r(456))*(parseInt(r(481))/2)+parseInt(r(364))/3*(-parseInt(r(422))/4)+-parseInt(r(340))/5+parseInt(r(438))/6+parseInt(r(397))/7*(parseInt(r(395))/8)+-parseInt(r(447))/9*(-parseInt(r(415))/10)+parseInt(r(359))/11)break;t.push(t.shift())}catch(r){t.push(t.shift())}})(),Object[_0x2cf1e0(458)](exports,"__esModule",{value:!0}),exports.checkInputPathFun=exports[_0x2cf1e0(459)]=exports[_0x2cf1e0(451)]=void 0;var commonConfig_1=require(_0x2cf1e0(387)),path=require(_0x2cf1e0(342)),fs=require("fs"),commonUtils_1=require(_0x2cf1e0(476)),_require=require(_0x2cf1e0(450)),clearResource=_require.clearResource,log4js=require("../../common/log4js.js"),logger=log4js[_0x2cf1e0(452)](_0x2cf1e0(472));function confirmConverterFun(r,t){return _confirmConverterFun[_0x2cf1e0(353)](this,arguments)}function _confirmConverterFun(){var r=_0x2cf1e0;return(_confirmConverterFun=_asyncToGenerator(_regeneratorRuntime()[r(405)](function r(e,n){var o,i;return _regeneratorRuntime().wrap(function(r){for(var t=_0x104c;;)switch(r[t(434)]=r[t(388)]){case 0:if(r[t(434)]=0,o=path[t(389)](e.inputPath,t(435)),i=path[t(389)](e[t(446)],t(455)),fs.existsSync(i)||!fs[t(477)](o)||e.confirmAddConfig){r[t(388)]=7;break}return r[t(414)]("return",{command:t(409)});case 7:return r[t(388)]=9,doConvert(e,n);case 9:return r[t(414)](t(480),r.sent);case 10:r[t(388)]=16;break;case 12:return r[t(434)]=12,r.t0=r[t(430)](0),logger[t(439)](r.t0),r[t(414)](t(480),{command:t(470),errorMessage:r.t0[t(413)]});case 16:case t(383):return r[t(406)]()}},r,null,[[0,12]])}))).apply(this,arguments)}function confirmConverterH5Fun(r,t){var e=_0x2cf1e0,n=path.join(r[e(449)],r[e(426)]);try{return commonUtils_1[e(358)](n,e(375),!0),commonUtils_1[e(390)](path[e(468)](__filename,e(343),e(375)),path[e(468)](n,e(375)),!1,!0),commonUtils_1[e(442)](r,path[e(468)](n,"src")),{command:e(378)}}catch(r){return logger.error(r),{command:"failedTransform",errorMessage:r[e(413)]}}}function _0x3185(){var r=["srcRootPath","Applets","end","object","miniprogramRoot","readFileSync","../common/commonConfig","next","resolve","copyDir","push","reverse","setOriginPtahObject","hasOwnProperty","4040ssavzs","clearResource","1897HFpILO","isArray","all","env","catchLoc","forEach","iterator","slice","mark","stop","__await","method","notifyConfig","wrap","tryLoc","length","message","abrupt","10fbiGAm","The iterator does not provide a '","continue","suspendedYield","throw","done","sep","5188cKVRAM","constructor","readdir","root","packageName","yes","unlink","displayName","catch","Output directory cannot be a subdirectory of the input directory.","async","projectConfigFile","prev","app.json","dirname","tryEntries","341514YlFhUZ","error","afterLoc","awrap","handleConfigInfo","sent","function","type","inputPath","1249983reeuRQ","arg","outPath","../../common/utils","confirmConverterFun","getLogger","keys","Output path ","project.config.json","81558xCjsxR","illegal catch attempt","defineProperty","confirmConverterH5Fun","_invoke","pages","then","appJsonFile","../../","toString","startsWith","toStringTag","join","value","failedTransform","complete","converter","symbol","@@iterator","transformNodeModuleComponent","../common/commonUtils","existsSync","finallyLoc","hxml","return","8qrOEGV","dispatchException","createTransformReportFile","265550jHLYEp","nextLoc","path","../lib","reset","completion","concat","rmdir","getPrototypeOf","normal","completed","isDirectory","Generator is already running","apply","delegate","smartProgramRoot","parse","ascf/ascf_src","createDirs","4369541MwGkCj","GeneratorFunction","prototype","__proto__","Generator","393JyZTZJ","create"," is exists. Use the -c parameter to clear.","appletType","projectFileSuffix","postInputPath","pop","map","rval","adaptApiFile","@@asyncIterator","src","call","setPrototypeOf","completeTransform","AsyncIterator","values"];return(_0x3185=function(){return r})()}function checkConvertOutput(r,t){var e=_0x2cf1e0,r=path[e(389)](r),t=path.resolve(t);if(fs[e(477)](t))throw new Error(e(454)[e(346)](t,e(366)));if(t[e(466)](r+path[e(421)]))throw new Error(e(431))}function doConvert(r,t){return _doConvert[_0x2cf1e0(353)](this,arguments)}function _0x104c(r,t){var e=_0x3185();return(_0x104c=function(r,t){return e[r-=339]})(r,t)}function _doConvert(){var r=_0x2cf1e0;return(_doConvert=_asyncToGenerator(_regeneratorRuntime()[r(405)](function r(e,t){var n,o,i;return _regeneratorRuntime().wrap(function(r){for(var t=_0x104c;;)switch(r[t(434)]=r.next){case 0:if(n=path[t(389)](e[t(449)],t(357)),process[t(400)][t(396)]===t(427))return r[t(388)]=4,clearResource([n]);r.next=4;break;case 4:return checkConvertOutput(e[t(446)],n),o=commonConfig_1[t(382)].srcRootPath,r[t(434)]=6,commonUtils_1[t(358)](n,o),commonUtils_1[t(339)](n,e[t(446)]),i=path[t(468)](n,o),"./"===o||""===o?(commonUtils_1[t(393)](e.inputPath,i),commonUtils_1[t(390)](e[t(446)],i)):(commonUtils_1[t(393)](path[t(468)](e[t(446)],o),i),commonUtils_1[t(390)](path.join(e[t(446)],o),i),commonUtils_1.copyConfigFiles(path[t(468)](e[t(446)]),n)),commonUtils_1[t(475)](),commonUtils_1[t(463)](path[t(468)](n,o),e),commonUtils_1[t(433)](path[t(468)](n)),"my"===commonConfig_1[t(382)][t(367)]&&commonUtils_1[t(373)](n,path[t(468)](__filename,t(464))),r[t(414)]("return",{command:t(378),folderUrl:n});case 18:return r[t(434)]=18,r.t0=r[t(430)](6),logger.error(r.t0),removePromise(n).finally(),r[t(414)]("return",{command:t(470),errorMessage:r.t0.message});case 23:case"end":return r.stop()}},r,null,[[6,18]])})))[r(353)](this,arguments)}function removePromise(i){return new Promise(function(o,r){fs.stat(i,function(r,t){var n=_0x104c;t[n(351)]()?fs[n(424)](i,function(r,t){var e=n,t=(t=t[e(371)](function(r){return path[e(468)](i,r)}))[e(371)](function(r){return removePromise(r)});Promise[e(399)](t)[e(462)](function(){fs[e(347)](i,o)})}):fs[n(428)](i,o)})})}function checkInputPathFun(r){var t=_0x2cf1e0,r=path[t(389)](r),e=checkMiniProgram(r);return{command:t(369),data:{returnCode:e,outPath:path[t(436)](r)}}}function checkMiniProgram(r){var t=_0x2cf1e0,e=!0,n=path[t(468)](r,t(435));return e=fs[t(477)](n)&&identifyProgram(r)?e:!1}function identifyProgram(r){var t=_0x2cf1e0;try{var e=path[t(468)](r,t(435)),n=JSON.parse(fs[t(386)](e)[t(465)]());if(n&&n[t(461)]&&Array[t(398)](n.pages)&&0<n[t(461)].length)for(var o=getSrcRootPath(r),i=0,a=Object.keys(commonConfig_1.projectFileSuffix);i<a[t(412)];i++){var c=a[i],u=path[t(468)](r,o,n[t(461)][0]+commonConfig_1[t(368)][c][t(479)]);if(fs[t(477)](u))return commonConfig_1[t(382)][t(367)]="wx"===c?"tt":c,!0}return!1}catch(r){return!1}}function getSrcRootPath(r){var t=_0x2cf1e0;commonConfig_1.Applets[t(381)]="./";for(var e=0;e<commonConfig_1.configBasenameArray[t(412)];e++){var n=commonConfig_1.configBasenameArray[e],n=path.join(r,n);fs.existsSync(n)&&((n=JSON[t(356)](fs[t(386)](n)[t(465)]())).miniprogramRoot?commonConfig_1[t(382)][t(381)]=n[t(385)]:n[t(355)]?commonConfig_1[t(382)].srcRootPath=n[t(355)]:commonConfig_1[t(382)][t(381)]="./")}return commonConfig_1[t(382)][t(381)]}exports[_0x2cf1e0(451)]=confirmConverterFun,exports.confirmConverterH5Fun=confirmConverterH5Fun,exports.checkInputPathFun=checkInputPathFun;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0xab64cf=_0x35a2;function _0x35a2(e,t){var r=_0x4d04();return(_0x35a2=function(e,t){return r[e-=221]})(e,t)}(()=>{for(var e=_0x35a2,t=_0x4d04();;)try{if(830676==-parseInt(e(286))*(-parseInt(e(283))/2)+parseInt(e(267))/3*(parseInt(e(284))/4)+-parseInt(e(221))/5+-parseInt(e(236))/6*(-parseInt(e(276))/7)+-parseInt(e(275))/8*(-parseInt(e(268))/9)+parseInt(e(225))/10*(-parseInt(e(253))/11)+-parseInt(e(294))/12*(parseInt(e(234))/13))break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object.defineProperty(exports,"__esModule",{value:!0}),exports[_0xab64cf(233)]=exports[_0xab64cf(248)]=exports[_0xab64cf(263)]=exports[_0xab64cf(290)]=exports.handleWxssImport=void 0;var globalDistanceCount,globalJsLine,path=require(_0xab64cf(255)),fs=require("fs"),_require=require(_0xab64cf(231)),create=_require.create,fileHandle_1=require(_0xab64cf(279)),commonConfig_1=require(_0xab64cf(251)),commonUtils_1=require(_0xab64cf(258)),importVisitor_1=require(_0xab64cf(240)),wxssParser_1=require(_0xab64cf(265)),commonConfig_2=require(_0xab64cf(251)),TransformReport=require(_0xab64cf(277)),parse5=require("../compiler-utils/parse5.bundle"),_require2=require("../../common/config"),configs=_require2[_0xab64cf(292)],insertedApiObj={},insertedApiCountObj={},excessOffsets={},DEST_API_NAME="has",DEST_API_LEN=DEST_API_NAME[_0xab64cf(274)];function handleWxssImport(e,r,n){var a=_0xab64cf,o=commonConfig_1[a(287)][n],e=create(e,r),e=(r=e.getText(),wxssParser_1[a(281)](r,e,o[a(259)],n)),s=0;return e[a(278)](function(e){var t=a;e[t(257)]===t(280)?(r=commonUtils_1.replacepos(r,e[t(264)]-o[t(259)][t(274)]-s,e[t(264)]-s,".css"),s+=o[t(259)][t(274)]-4):(r=commonUtils_1[t(273)](r,e.startOffset-s,e[t(230)]+n.length+1-s,""),s+=n.length+1)}),r}function handleWxmlFile(e,t,r,n){var a=_0xab64cf,t=create(e,t),t=parse5[a(282)](t[a(235)](),{});return parse5.serialize(t,{convertOptions:{filePath:e,srcPath:r,appType:n,utils:{commonConfig:commonConfig_1,importVisitor:importVisitor_1,textDocument:{create:create},fileHandle:fileHandle_1}}})}function transformWxSchemas(e,t,r){var n=_0xab64cf,a=e[n(246)].start,t=t[n(241)]({line:a.line-1,character:a.character+1});return r=commonUtils_1[n(273)](r,t+globalDistanceCount,t+e.module.length+globalDistanceCount,n(289)),globalDistanceCount-=e[n(296)][n(274)]-4,r}function transformWxmlWxsFilePath(e,t,r){var n=_0xab64cf,a=e[n(246)][n(293)],t=t[n(241)]({line:a.line-1,character:a[n(262)]});return r=commonUtils_1[n(273)](r,t+globalDistanceCount,t+globalDistanceCount+e[n(296)][n(274)]-1,4===e[n(296)][n(274)]?"hjs":n(228))}function transformWxsFilePath(e,s,i,c,t){var l=_0xab64cf,f=0,m=commonConfig_1.projectFileSuffix[t];return e[l(278)](function(e){var t=l;if(path.extname(e[t(296)])===m[t(297)]){var r=e[t(296)],n=e[t(246)].start,n=s.offsetAt({line:n[t(270)]-1,character:n[t(262)]-1})+f,a=e.module[t(229)](0,e[t(296)][t(274)]-(m[t(297)].length-1))+t(297);if(r&&!r.startsWith("./")&&!r[t(250)](t(261))){var o=path[t(223)](c,"..",r);if(!path[t(245)](o))return;fs.existsSync(o)&&(o=".",r[t(250)]("/")?f+=1:(o="./",f+=2),a=o+a)}i=commonUtils_1.replacepos(i,n,n+e[t(296)][t(274)],a)}}),i}function calProcessedApis(e,t){e[t]?e[t]++:e[t]=1}function notDealtWith(e,t){var r=_0xab64cf;return-1!==commonConfig_2[r(244)].indexOf(e[r(237)])&&!(-1!==Object[r(269)](insertedApiObj)[r(226)](t)&&insertedApiObj[t]===e[r(237)])}function _0x4d04(){var e=["63083prryjc","projectFileSuffix","insertStr","has:","handleWxmlFile","writeInfo","configs","start","8836644MuoxvL","notaddtodo","module","hjs","1141220qQxNyA","// ","join","api ","30LFWpwC","indexOf","wxSchema","hxml","substring","startOffset","../common/textDocument","wxInterface","transformJsPath","39yMPlym","getText","96QNcqkh","property","handleWxssImport","uri","../parse/importVisitor","offsetAt","concat",".js","invalidApis","extname","moduleRange","mixins","transformJsFile",' {"line":',"startsWith","../common/commonConfig","existsSync","3924514qpQmWl"," TODO","path","setLanguage","type","../common/commonUtils","css","getImportRules","../","character","transformWxsFilePath","endOffset","../parse/wxssParser","filePath","6213QUTzKC","36akbISP","keys","line",',"column":',"interfacesForTransform","replacepos","length","2928056BszNAw","513261hGBhul","./transformReport","forEach","../features/fileHandle","import","wxssParser","parseFragment","28ByTAyu","1580lsfvyI","behaviors"];return(_0x4d04=function(){return e})()}function insertTodoInline(e,t,r,n){var a=_0xab64cf,o=1,n=a(222)[a(242)](commonUtils_1[a(256)]("notSupport"),a(224))[a(242)](DEST_API_NAME,".")[a(242)](n[a(237)],a(254)),r=(1===insertedApiCountObj[t]&&(o=0,n+="\n",globalJsLine++),r+globalDistanceCount-excessOffsets[t]-o);return e=commonUtils_1.insertStr(e,r,n),globalDistanceCount+=n[a(274)],e}function transformWxInterface(e,t,r,n){var a=_0xab64cf,o=e.moduleRange[a(293)],s=t[a(239)]()+"-"+o.line,i=t.offsetAt({line:o[a(270)]-1,character:o[a(262)]}),c=i+globalDistanceCount;return r=commonUtils_1[a(273)](r,c,c+n[a(274)],DEST_API_NAME),globalDistanceCount+=DEST_API_LEN-n[a(274)],calProcessedApis(excessOffsets,s),commonConfig_2[a(272)][e[a(237)]]?(c=i+globalDistanceCount+n.length+1,r=commonUtils_1[a(273)](r,c,c+e[a(237)][a(274)],commonConfig_2.interfacesForTransform[e[a(237)]]),i=e[a(237)][a(274)]-commonConfig_2[a(272)][e[a(237)]].length,globalDistanceCount-=i,excessOffsets[s]-=i):notDealtWith(e,s)&&(calProcessedApis(insertedApiCountObj,s),n=t[a(241)]({line:o.line-1,character:0}),c=o[a(270)],configs[a(295)]||(r=insertTodoInline(r,s,n,e)),i=t[a(239)]()+a(249)+(c+globalJsLine)+a(271)+o[a(262)]+"}",TransformReport[a(291)](""[a(242)](commonUtils_1.setLanguage("notSupport"),a(224))[a(242)](DEST_API_NAME,".")[a(242)](e[a(237)]),i),insertedApiObj[s]=e[a(237)]),r}function transformJsFile(e,r,n,a){var o=_0xab64cf,s=create(e,n),e=(n=s[o(235)](),importVisitor_1[o(260)](n,null,null,a));return globalJsLine=globalDistanceCount=0,e[o(278)](function(e){var t=o;switch(e[t(257)]){case"fileImport":n=transformJsPath(e,r,n,s);break;case t(232):n=transformWxInterface(e,s,n,a);break;case t(266):n=transformWxmlWxsFilePath(e,s,n);break;case t(227):n=transformWxSchemas(e,s,n);break;case t(247):n=transformComponentMixins(e,s,n)}}),n}function transformComponentMixins(e,t,r){var n=_0xab64cf,a=e[n(246)].start,t=t[n(241)]({line:a[n(270)]-1,character:a.character});return r=commonUtils_1[n(273)](r,t+globalDistanceCount,t+e[n(296)].length+globalDistanceCount,n(285)),globalDistanceCount-=e[n(296)][n(274)]-9,r}function transformJsPath(e,t,r,n){var a=_0xab64cf,o=e.module;return!o||o[a(250)]("./")||o[a(250)](a(261))||(t=path[a(223)](t,"..",o),path[a(245)](t)||(t+=a(243)),fs[a(252)](t)&&(t=e.moduleRange[a(293)],e=n[a(241)]({line:t[a(270)]-1,character:t.character-1})+globalDistanceCount,n=".",o[a(250)]("/")?globalDistanceCount+=1:(n="./",globalDistanceCount+=2),r=commonUtils_1[a(288)](r,e,n))),r}exports[_0xab64cf(238)]=handleWxssImport,exports.handleWxmlFile=handleWxmlFile,exports[_0xab64cf(263)]=transformWxsFilePath,exports[_0xab64cf(248)]=transformJsFile,exports[_0xab64cf(233)]=transformJsPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0xa5ffbe=_0x2d17,commonUtils_1=((()=>{for(var t=_0x2d17,e=_0x1f28();;)try{if(426714==+parseInt(t(350))*(-parseInt(t(357))/2)+-parseInt(t(337))/3+parseInt(t(339))/4*(-parseInt(t(353))/5)+-parseInt(t(349))/6+-parseInt(t(355))/7+parseInt(t(352))/8*(parseInt(t(340))/9)+parseInt(t(348))/10*(parseInt(t(346))/11))break;e.push(e.shift())}catch(t){e.push(e.shift())}})(),Object[_0xa5ffbe(345)](exports,_0xa5ffbe(342),{value:!0}),exports.insertInfo=exports.writeInfo=void 0,require(_0xa5ffbe(356))),fs=require("fs");function writeInfo(t,e){var r=_0xa5ffbe;write(["Error: ",t,"\n",commonUtils_1[r(338)](r(343)),e,"\n\n\n"][r(344)](""))}function insertInfo(t){var e=_0xa5ffbe,e=fs[e(351)](commonUtils_1[e(336)]()).toString();fs.writeFileSync(commonUtils_1.getGlobleOutPutPath(),t),write(e)}function _0x2d17(t,e){var r=_0x1f28();return(_0x2d17=function(t,e){return r[t-=336]})(t,e)}function _0x1f28(){var t=["getGlobleOutPutPath","86580dwBqRO","setLanguage","1066136JDGDqb","9xzUhWO","appendFile","__esModule","position","join","defineProperty","1991xpCPuB","write","114030lrzeIr","2705388CXKDCK","389598CotyJE","readFileSync","1431544rRaqCB","15BNCBCj","writeInfo","1030498ZqVsVi","../common/commonUtils","2zjImZG"];return(_0x1f28=function(){return t})()}function write(t){var e=_0xa5ffbe;t&&fs[e(341)](commonUtils_1[e(336)](),t,function(t){if(t)throw t})}exports[_0xa5ffbe(354)]=writeInfo,exports.insertInfo=insertInfo,exports[_0xa5ffbe(347)]=write;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x1a61(){var a=["quality","eventName","success","chooseImage","apFilePaths","apFilePath","3wsjSFL","showLoading","callBack","params","isArray","brightness","saveImageToPhotosAlbum","level","concat","index","returnVal","apiName","toFixed","getClipboardData","compressImage","forEach","getSavedFileInfo","iterator","keys","removeSavedFile","default","156xDUXqo","downloadFile","__apiAdapterConverted","230hYBGfM","tempFilePath","66104paSGGs","1685604JsWtpH","filePath","call","src","3053636oigfrc","constructor","@@toPrimitive must return a primitive value.","onlyFromCamera","defaultImgVuality","sort","data","clearStorageSync","text","removeStorageSync","toPrimitive","759499dYPEYI","string","function","setScreenBrightness","apply","code","679lCJhzj","36vBiJHD","getStorageSync","object","1ryXlLo","7231477HjbSCc","length","phoneNumber","385455wldNyd","title","symbol","179964uegfzR"];return(_0x1a61=function(){return a})()}function _0x49ca(a,e){var t=_0x1a61();return(_0x49ca=function(a,e){return t[a-=461]})(a,e)}function _typeof(a){var t=_0x49ca;return(_typeof="function"==typeof Symbol&&t(473)==typeof Symbol[t(498)]?function(a){return typeof a}:function(a){var e=t;return a&&e(525)==typeof Symbol&&a[e(513)]===Symbol&&a!==Symbol.prototype?e(473):typeof a})(a)}function _defineProperty(a,e,t){return(e=_toPropertyKey(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function _toPropertyKey(a){a=_toPrimitive(a,"string");return"symbol"==_typeof(a)?a:a+""}function _toPrimitive(a,e){var t=_0x49ca;if("object"!=_typeof(a)||!a)return a;var r=a[Symbol[t(522)]];if(void 0===r)return(t(524)===e?String:Number)(a);r=r[t(510)](a,e||t(501));if(t(466)!=_typeof(r))return r;throw new TypeError(t(514))}(()=>{for(var a=_0x49ca,e=_0x1a61();;)try{if(609568==+parseInt(a(467))*(-parseInt(a(508))/2)+-parseInt(a(481))/3*(parseInt(a(512))/4)+-parseInt(a(471))/5*(parseInt(a(464))/6)+-parseInt(a(463))/7*(-parseInt(a(507))/8)+-parseInt(a(474))/9*(-parseInt(a(505))/10)+parseInt(a(468))/11+parseInt(a(502))/12*(parseInt(a(523))/13))break;e.push(e.shift())}catch(a){e.push(e.shift())}})(),(()=>{var a,e,s,n=_0x49ca;function i(e,t){var a=n;e&&Object[a(499)](e)[a(496)](function(a){t[a]&&(t[e[a]]=t[a],delete t[a])})}has[n(504)]||(has[n(504)]=!0,a=[{apiName:n(478),callBack:[{eventName:n(477),params:{tempFilePaths:n(479)}}]},{apiName:"saveFile",params:{apFilePath:n(506)},callBack:[{eventName:n(477),params:{savedFilePath:"apFilePath"}}]},{apiName:"getFileInfo",params:{apFilePath:n(509)}},{apiName:n(497),params:{apFilePath:"filePath"}},{apiName:n(500),params:{apFilePath:n(509)}},{apiName:"setClipboardData",params:{text:n(518)}},{apiName:n(494),callBack:[{eventName:"success",params:{data:n(520)}}]},{apiName:n(487),params:{url:n(509)}},{apiName:n(482),params:{content:n(472)}},{apiName:"showActionSheet",params:{items:"itemList"},callBack:[{eventName:n(477),params:{tapIndex:n(490)}}]},{apiName:"uploadFile",params:{fileName:"name"}},{apiName:n(526),params:{brightness:"value"}},{apiName:"getScreenBrightness",callBack:[{eventName:n(477),params:{value:n(486)}}]},{apiName:"scanCode",params:{hideAlbum:n(515)},callBack:[{eventName:n(477),params:{result:n(462)}}]},{apiName:"makePhoneCall",params:{number:n(470)}},{apiName:"showToast",params:{content:n(472)}},{apiName:n(503),callBack:[{eventName:n(477),params:{tempFilePath:n(480)}}]}],e=[{apiName:n(465),params:{key:1},returnVal:n(518)},{apiName:"setStorageSync",params:{key:1,data:2}},{apiName:n(521),params:{key:1}},{apiName:n(519)}],s={},a[n(489)](e)[n(496)](function(a){a=a[n(492)];s[a]=has[a]}),a[n(496)](function(e){var t=n,r=e[t(492)];has[r]=function(){var a=t,n=0<arguments[a(469)]&&void 0!==arguments[0]?arguments[0]:{};return i(e[a(484)],n),e[a(483)]&&e[a(483)][a(496)](function(e){var t=a,r=n[e[t(476)]];n[e[t(476)]]=function(a){i(e[t(484)],a),r(a)}}),s[r](n)}}),e[n(496)](function(i){var o=n,p=i[o(492)];has[p]=function(){var a=o,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=[],r=i[a(484)]&&Object[a(499)](i.params)||[],n=(r[a(517)](function(a,e){return r[a]-r[e]}),r[a(496)](function(a){e[a]&&t.push(e[a])}),s[p][a(461)](s,t));return i[a(491)]?_defineProperty({},i[a(491)],n):{}}}),s[n(495)]=has[n(495)],has[n(495)]=function(){var t=n,a=0<arguments[t(469)]&&void 0!==arguments[0]?arguments[0]:{},e=(a[t(511)]=Array[t(485)](a[t(479)])?a[t(479)][0]:"",Number(a[t(488)])),r=(e<=3?a.quality=(100/3*e)[t(493)](0):a[t(516)]=80,a.quality=Number(a[t(475)]),a[t(477)]);return a.success=function(a){var e=t;a[e(479)]=[a[e(506)]],r(a)},s.compressImage(a)})})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x5c9bbf=_0x54bc;function _0x54bc(r,e){var n=_0x4e27();return(_0x54bc=function(r,e){return n[r-=251]})(r,e)}(()=>{for(var r=_0x54bc,e=_0x4e27();;)try{if(256263==-parseInt(r(261))+parseInt(r(251))/2+-parseInt(r(258))/3+parseInt(r(256))/4*(parseInt(r(257))/5)+parseInt(r(255))/6*(-parseInt(r(266))/7)+parseInt(r(253))/8+parseInt(r(267))/9*(parseInt(r(264))/10))break;e.push(e.shift())}catch(r){e.push(e.shift())}})(),Object[_0x5c9bbf(254)](exports,_0x5c9bbf(268),{value:!0}),exports[_0x5c9bbf(259)]=void 0;var babelParser=require(_0x5c9bbf(252)),parseTryCount=0;function _0x4e27(){var r=["substring","138050cRuvFs","parse","28vqhQsB","423FVZsaG","__esModule","217708DoOrZf","@babel/parser","1865208vaLttC","defineProperty","608904KtWAUy","4QFnqDY","1092235QRXZmX","1512930yPjNZK","babelTransform","length","42778ubwnOr","unambiguous"];return(_0x4e27=function(){return r})()}function babelTransform(e,n){var t=_0x5c9bbf;try{var a=babelParser[t(265)](e,{sourceType:t(262),allowReturnOutsideFunction:!0,plugins:["classProperties"]});return parseTryCount=0,a}catch(r){if(n){if(0===parseTryCount)return a=e[t(263)](0,n-1)+e[t(263)](n,e[t(260)]),parseTryCount++,babelTransform(a,n);if(parseTryCount<3)return a=e.substring(0,n)+","+e.substring(n,e[t(260)]),parseTryCount++,babelTransform(a,n);parseTryCount=0}return null}}exports[_0x5c9bbf(259)]=babelTransform;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
var _0x29b49f=_0x1f55;function _0xd610(){var e=["test","10138xLjclf","1499113fNqHOM","42YaCazA","splice","concat","column","findParent","name","scope","property","extname","__esModule","push","ImportDeclaration","getOwnBinding","forEach","fileImport","path","hxml","line","length","MemberExpression","node","isIdentifier","types","properties","source","hjs","getImportRules","../common/commonConfig","filePath","@babel/traverse","key","CallExpression","end","5609624gjXWiv","isObjectExpression","object","start","7126446zNuDKr","3316855FtveIc","Identifier","Component","value","default","arguments","5785480KzUhiu","defineProperty","callee","mixins","loc","wxInterface","./babelParser","2588082hDQPop","://","getStatementParent"];return(_0xd610=function(){return e})()}(()=>{for(var e=_0x1f55,r=_0xd610();;)try{if(737266==-parseInt(e(222))*(-parseInt(e(224))/2)+-parseInt(e(218))/3+parseInt(e(200))/4+parseInt(e(205))/5+-parseInt(e(204))/6+-parseInt(e(223))/7+parseInt(e(211))/8)break;r.push(r.shift())}catch(e){r.push(r.shift())}})(),Object[_0x29b49f(212)](exports,_0x29b49f(233),{value:!0}),exports[_0x29b49f(193)]=void 0;var babelParser_1=require(_0x29b49f(217)),babel_traverse_1=require(_0x29b49f(196)),pathTool=require(_0x29b49f(239)),commonConfig_1=require(_0x29b49f(194)),babelTypes=require("@babel/core")[_0x29b49f(246)];function _0x1f55(e,r){var t=_0xd610();return(_0x1f55=function(e,r){return t[e-=191]})(e,r)}function getQaSchemasReg(e){var r=_0x29b49f;return new RegExp("^"[r(226)](e,r(219)))}var currentType,suffixs,importRules=[],visitor={ImportDeclaration:function(e){var r=_0x29b49f;importRules.push({type:r(238),module:e[r(244)][r(191)][r(208)],moduleRange:{start:{line:e.node[r(191)][r(215)].start[r(241)],character:e[r(244)][r(191)][r(215)][r(203)][r(227)]+2},end:{line:e[r(244)][r(191)].loc.end[r(241)],character:e[r(244)][r(191)][r(215)][r(199)][r(227)]+2}}})},CallExpression:function(e){var t=_0x29b49f;e.node[t(213)]&&e[t(244)].arguments&&"require"===e.node.callee[t(229)]&&1===e[t(244)][t(210)][t(242)]&&importRules[t(234)]({type:t(238),module:e[t(244)].arguments[0].value,moduleRange:{start:{line:e.node.arguments[0][t(215)].start.line,character:e[t(244)][t(210)][0][t(215)][t(203)].column+2},end:{line:e.node.arguments[0][t(215)][t(199)][t(241)],character:e[t(244)][t(210)][0].loc[t(199)][t(227)]+2}}}),e[t(244)].callee&&e[t(244)].arguments&&e[t(244)][t(213)][t(229)]===t(207)&&1===e.node[t(210)][t(242)]&&babelTypes[t(201)](e[t(244)][t(210)][0])&&e[t(244)][t(210)][0][t(247)]&&0<e.node[t(210)][0].properties[t(242)]&&e.node[t(210)][0][t(247)][t(237)](function(e){var r=t;babelTypes.isObjectProperty(e)&&babelTypes[r(245)](e[r(197)])&&"mixins"===e[r(197)].name&&importRules[r(234)]({type:r(214),module:e[r(197)][r(229)],moduleRange:{start:{line:e.loc[r(203)][r(241)],character:e[r(215)].start[r(227)]},end:{line:e.key[r(215)].end[r(241)],character:e[r(197)][r(215)][r(199)].column}}})})},MemberExpression:function(e){var r=_0x29b49f;e.node.object&&e[r(244)].property&&e[r(244)][r(202)][r(229)]===currentType&&!hasParent(e,e[r(244)].object.name)&&importRules[r(234)]({type:r(216),module:e.node[r(202)][r(229)],moduleRange:{start:{line:e[r(244)][r(202)][r(215)][r(203)].line,character:e[r(244)].object.loc[r(203)][r(227)]},end:{line:e[r(244)].object[r(215)].end[r(241)],character:e[r(244)].object[r(215)][r(199)][r(227)]}},property:e[r(244)][r(231)][r(229)]})},Identifier:function(e){var r=_0x29b49f;e.node.name!==currentType||0!==e[r(197)]||hasParent(e,e[r(244)][r(229)])||importRules.push({type:r(216),module:e[r(244)].name,moduleRange:{start:{line:e.node[r(215)].start[r(241)],character:e[r(244)][r(215)][r(203)].column},end:{line:e[r(244)][r(215)][r(199)].line,character:e[r(244)].loc[r(199)][r(227)]}},property:null})},StringLiteral:function(e){var r,t=_0x29b49f;!e[t(244)].value||pathTool.extname(e[t(244)][t(208)])!==suffixs[t(240)]&&pathTool.extname(e[t(244)].value)!==suffixs[t(192)]||(r=pathTool[t(232)](e[t(244)].value),importRules[t(234)]({type:t(195),module:r,moduleRange:{start:{line:e[t(244)].loc.end[t(241)],character:e[t(244)][t(215)][t(199)][t(227)]-r.length},end:{line:e[t(244)][t(215)][t(199)][t(241)],character:e[t(244)][t(215)][t(199)][t(227)]}}})),e[t(244)][t(208)]&&getQaSchemasReg(currentType)[t(221)](e[t(244)].value)&&importRules[t(234)]({type:"wxSchema",module:""[t(226)](currentType,":"),moduleRange:{start:{line:e[t(244)][t(215)][t(203)][t(241)],character:e[t(244)][t(215)][t(203)][t(227)]},end:{line:e.node.loc[t(203)][t(241)],character:e[t(244)][t(215)][t(203)][t(227)]+5}}})}};function hasParent(e,t){var n=_0x29b49f,a=!1;return e[n(220)]()[n(228)](function(e){var r=n;a||e[r(230)][r(236)](t)&&(a=!0)}),a}function clear(){var e=_0x29b49f;importRules[e(225)](0,importRules[e(242)])}function getImportRules(e,r){var t=_0x29b49f,n=2<arguments[t(242)]&&void 0!==arguments[2]&&arguments[2],a=3<arguments[t(242)]?arguments[3]:void 0,n=(currentType=a,suffixs=commonConfig_1.projectFileSuffix[a],a=n?{CallExpression:visitor[t(198)],ImportDeclaration:visitor[t(235)]}:{MemberExpression:visitor[t(243)],StringLiteral:visitor.StringLiteral,Identifier:visitor[t(206)],CallExpression:visitor[t(198)]},babelParser_1.babelTransform(e,r));return clear(),babel_traverse_1[t(209)](n,a),importRules}exports[_0x29b49f(193)]=getImportRules;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x37279f=_0x173e,postcss=((()=>{for(var e=_0x173e,t=_0x4c4a();;)try{if(117823==-parseInt(e(444))*(parseInt(e(423))/2)+parseInt(e(448))/3+-parseInt(e(432))/4*(-parseInt(e(414))/5)+-parseInt(e(402))/6*(-parseInt(e(410))/7)+parseInt(e(416))/8*(-parseInt(e(405))/9)+-parseInt(e(415))/10*(-parseInt(e(396))/11)+parseInt(e(421))/12*(-parseInt(e(413))/13))break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object[_0x37279f(398)](exports,_0x37279f(446),{value:!0}),exports[_0x37279f(438)]=exports[_0x37279f(406)]=exports[_0x37279f(434)]=void 0,require("postcss")),path=require(_0x37279f(422));function _0x173e(e,t){var r=_0x4c4a();return(_0x173e=function(e,t){return r[e-=396]})(e,t)}function _0x4c4a(){var e=["atrule","split","isInComment",".*(?:\\r|\\n|$)))","128GAawfx","positionAt","__esModule","indexOf","559608glkMWn","((?:^|\\n|\\r)\\s*\\/\\*[\\s\\S]*?","index","substring","import","70147FEqVSf","filter","defineProperty","end","position","restLength","10542txqAjC","match","getText","9JEdNYl","importFileReg","type","name","exec","805yfKsmi","rules","start","3146ZZxoig","5njCoKr","260VSZSUE","861368ngvluo","rule","map","test","source","15564TuvoBj","path","2028KaKNCS","selectors","extname","forEach","line","offsetAt","swan","selector","length","459068rtPpSX","uri","importReg","push","column","replace","wxssParser","concat"];return(_0x4c4a=function(){return e})()}function wxssParser(t,r,i,p){var c=_0x37279f,n=[];try{n=postcss.parse(t).nodes[c(397)](function(e){var t=c;return e[t(407)]===t(440)&&e[t(408)]===t(452)})[c(418)](function(e){var t=c;return{type:t(452),import:e.params,position:{start:e[t(420)][t(412)],end:e.source[t(399)]}}})}catch(e){for(var s=t[c(403)](exports[c(434)]),o=0,a=0;s=exports.importReg[c(409)](t);){var u,a=t[c(447)](s[0],a),f=checkIsInComment(s[0],t,o,s[c(450)]);f[c(442)]?(o=s[c(450)]+f[c(401)],a+=f[c(401)]):(o=s[c(450)]+s[0][c(431)],(f=s[0].match(exports[c(406)]))&&(u=r[c(445)](a+f[c(450)]),n.push({type:c(452),uri:r[c(433)],position:{start:{line:u[c(427)]+1,column:u.character},end:{line:u.line+1,column:u.character+f[0][c(431)]+2}},value:f?f[1]:"",import:f[0]})),a+=s[0][c(431)])}}var x=[];return n[c(426)](function(n){var s,e,o,a=c;n[a(407)]===a(452)?(e={line:n[a(400)][a(399)].line-1,character:n[a(400)][a(399)][a(436)]-2},s=r[a(428)](e),e=n[a(452)][a(437)](/[\r\n]/gi," ")[a(441)](" "),o=0,e[a(426)](function(e){var t,r=a,e=e.substring(1,e[r(431)]-1);path[r(425)](e)===i&&(t=n[r(452)][r(447)](e,o),o=t,x[r(435)]({type:"import",import:e,endOffset:s-(n.import[r(431)]-t-e[r(431)])+1}))})):p===a(429)&&getSelectorRule(n,r,p,x)}),x}function getSelectorRule(e,t,r,n){var s,o,a,i,p,c=_0x37279f;e[c(407)]===c(417)?(s=t[c(404)](),o=new RegExp("^"[c(439)](r,"-")),a=e[c(424)],i={line:e[c(400)][c(412)].line-1,character:e[c(400)][c(412)].column-1},p=t[c(428)](i),a&&a[c(426)](function(e){var r=c;e[r(441)](/\s+/)[r(426)](function(e){var t=r;p=s[t(447)](e,p),o[t(419)](e)&&n[t(435)]({type:t(430),selector:e,startOffset:p}),p+=e.length})})):"media"===e.type&&e[c(411)][c(426)](function(e){getSelectorRule(e,t,r,n)})}function checkIsInComment(e,t,r,n){for(var s,o=_0x37279f,a=new RegExp(o(449)[o(439)](e,"[\\s\\S]*?\\*\\/\\s*(?:\\r|\\n|$)|((?:^|\\n|\\r)\\s*\\/\\/.*")[o(439)](e,o(443)),"g");s=a[o(409)](t[o(451)](r));){if(s[o(450)]+r<n&&s[o(450)]+r+s[0][o(431)]>n)return{isInComment:!0,restLength:s[o(450)]+r+s[0][o(431)]-n};if(s[o(450)]+r>n)break}return{isInComment:!1,restLength:0}}exports[_0x37279f(434)]=/\@import\s+[\'\"].*[\'\"](\s+.*(\s*[and|not|only|or|\,]\s*\(.*\))*)?\s*\;?/g,exports[_0x37279f(406)]=/['"]\s*([^()]+?)\s*['"]/,exports[_0x37279f(438)]=wxssParser;
|
package/lib/bin/ascf.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var _global$_ascfCliProgr,_0x29576a=_0x17a3;function _0x5802(){var r=["Run command on changes been watched","executing","version","nextLoc","argv","completed","144590sqQVLL","reverse","abrupt","AsyncIterator","33CxZxgG","afterLoc","@@asyncIterator","done","setPrototypeOf","displayName","forEach","keys","Show build progress","convert","wrap","compile <projectRoot>","catchLoc","symbol","@@iterator","defineProperty","value","length","call","-c, --clear","return","break","../../package.json","resolve","then","Command","continue","end","type","next","slice","mark","_invoke","debug","prototype","19992BxFnjR","Generator is already running","function","apply","tryEntries","The iterator does not provide a '","-va, --validate","_sent","values","Watch for changes","Validate path","Clear convert output path","prev","toString"," is not iterable","../index","method","GeneratorFunction","8125392YORagm","Clear build resource","name","176742mudMbj","stop","-i, --input <input-directory>","iterator result is not an object","commander","' method","-w, --watch","action","enable debug logging","iterator","--debug","compile","asyncIterator","delegate","create","object","1wlcbFs","suspendedYield","awrap","requiredOption","illegal catch attempt","arg","completion","1742900LJSpkN","tryLoc","root","__await","notaddtodo","Generator","sent","configs","3838264TvaWbX","opts","normal","finallyLoc","throw","isGeneratorFunction","Environment is development","constructor","78VhnEce","command","-o, --output <output-directory>","complete","option","9AxmJps","-p, --progress","push","-r, --run [command]","rval","4887638leXqlo"];return(_0x5802=function(){return r})()}function _typeof(r){var e=_0x17a3;return(_typeof=e(292)==typeof Symbol&&e(268)==typeof Symbol[e(204)]?function(r){return typeof r}:function(r){var t=e;return r&&"function"==typeof Symbol&&r[t(233)]===Symbol&&r!==Symbol[t(289)]?t(268):typeof r})(r)}function _regeneratorRuntime(){var s=_0x17a3;_regeneratorRuntime=function(){return c};var f,c={},r=Object.prototype,l=r.hasOwnProperty,p=Object[s(270)]||function(r,t,e){var n=s;r[t]=e[n(271)]},t=s(292)==typeof Symbol?Symbol:{},a=t.iterator||s(269),e=t[s(207)]||s(257),n=t.toStringTag||"@@toStringTag";function o(r,t,e){return Object[s(270)](r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{o({},"")}catch(r){o=function(r,t,e){return r[t]=e}}function u(r,t,e,n){var o,a,i,c,u=s,t=t&&t.prototype instanceof m?t:m,t=Object[u(209)](t[u(289)]),u=new S(n||[]);return p(t,"_invoke",{value:(o=r,a=e,i=u,c=v,function(r,t){var e=_0x17a3;if(c===g)throw Error(e(291));if(c===d){if(e(230)===r)throw t;return{value:f,done:!0}}for(i[e(190)]=r,i[e(216)]=t;;){var n=i[e(208)];if(n){n=function r(t,e){var n=s,o=e[n(190)],a=t[n(204)][o];if(a===f)return e[n(208)]=null,n(230)===o&&t[n(204)][n(275)]&&(e[n(190)]=n(275),e[n(216)]=f,r(t,e),n(230)===e.method)||n(275)!==o&&(e[n(190)]="throw",e[n(216)]=new TypeError(n(295)+o+n(200))),y;o=h(a,t.iterator,e[n(216)]);if("throw"===o[n(283)])return e[n(190)]=n(230),e[n(216)]=o.arg,e[n(208)]=null,y;a=o[n(216)];return a?a[n(258)]?(e[t.resultName]=a[n(271)],e[n(284)]=t[n(248)],"return"!==e[n(190)]&&(e[n(190)]="next",e[n(216)]=f),e[n(208)]=null,y):a:(e[n(190)]="throw",e[n(216)]=new TypeError(n(198)),e[n(208)]=null,y)}(n,i);if(n){if(n===y)continue;return n}}if("next"===i[e(190)])i[e(224)]=i[e(297)]=i[e(216)];else if(e(230)===i.method){if(c===v)throw c=d,i[e(216)];i.dispatchException(i.arg)}else e(275)===i[e(190)]&&i[e(253)](e(275),i[e(216)]);c=g;n=h(o,a,i);if(e(228)===n[e(283)]){if(c=i[e(258)]?d:_,n[e(216)]===y)continue;return{value:n.arg,done:i.done}}e(230)===n[e(283)]&&(c=d,i[e(190)]=e(230),i.arg=n[e(216)])}})}),t}function h(r,t,e){var n=s;try{return{type:n(228),arg:r[n(273)](t,e)}}catch(r){return{type:"throw",arg:r}}}c[s(265)]=u;var v="suspendedStart",_=s(212),g=s(246),d=s(250),y={};function m(){}function i(){}function x(){}var t={},b=(o(t,a,function(){return this}),Object.getPrototypeOf),b=b&&b(b(I([]))),w=(b&&b!==r&&l[s(273)](b,a)&&(t=b),x[s(289)]=m[s(289)]=Object[s(209)](t));function j(r){var t=s;[t(284),t(230),t(275)][t(261)](function(t){o(r,t,function(r){return this[_0x17a3(287)](t,r)})})}function E(c,u){var t,o=s;p(this,o(287),{value:function(e,n){function r(){return new u(function(r,t){!function t(r,e,n,o){var a,i=_0x17a3,r=h(c[r],c,e);if(i(230)!==r[i(283)])return(e=(a=r[i(216)])[i(271)])&&i(210)==_typeof(e)&&l[i(273)](e,i(221))?u.resolve(e[i(221)]).then(function(r){t(i(284),r,n,o)},function(r){t("throw",r,n,o)}):u[i(278)](e)[i(279)](function(r){a[i(271)]=r,n(a)},function(r){return t(i(230),r,n,o)});o(r[i(216)])}(e,n,r,t)})}return t=t?t[o(279)](r,r):r()}})}function L(r){var t=s,e={tryLoc:r[0]};1 in r&&(e[t(267)]=r[1]),2 in r&&(e[t(229)]=r[2],e.afterLoc=r[3]),this[t(294)][t(241)](e)}function O(r){var t=s,e=r[t(217)]||{};e[t(283)]=t(228),delete e[t(216)],r[t(217)]=e}function S(r){var t=s;this[t(294)]=[{tryLoc:t(220)}],r[t(261)](L,this),this.reset(!0)}function I(e){var n=s;if(e||""===e){var o,r=e[a];if(r)return r[n(273)](e);if(n(292)==typeof e[n(284)])return e;if(!isNaN(e.length))return o=-1,(r=function r(){for(var t=n;++o<e.length;)if(l[t(273)](e,o))return r[t(271)]=e[o],r[t(258)]=!1,r;return r[t(271)]=f,r[t(258)]=!0,r})[n(284)]=r}throw new TypeError(_typeof(e)+n(188))}return i[s(289)]=x,p(w,s(233),{value:x,configurable:!0}),p(x,s(233),{value:i,configurable:!0}),i[s(260)]=o(x,n,s(191)),c.isGeneratorFunction=function(r){var t=s,r="function"==typeof r&&r[t(233)];return!!r&&(r===i||t(191)===(r[t(260)]||r[t(194)]))},c[s(286)]=function(r){var t=s;return Object.setPrototypeOf?Object[t(259)](r,x):(r.__proto__=x,o(r,n,t(191))),r[t(289)]=Object.create(w),r},c[s(213)]=function(r){return{__await:r}},j(E[s(289)]),o(E[s(289)],e,function(){return this}),c[s(254)]=E,c.async=function(r,t,e,n,o){var a=s,i=(void 0===o&&(o=Promise),new E(u(r,t,e,n),o));return c[a(231)](t)?i:i[a(284)]()[a(279)](function(r){var t=a;return r.done?r[t(271)]:i[t(284)]()})},j(w),o(w,n,s(223)),o(w,a,function(){return this}),o(w,s(187),function(){return"[object Generator]"}),c[s(262)]=function(r){var t,n=s,o=Object(r),a=[];for(t in o)a[n(241)](t);return a[n(252)](),function r(){for(var t=n;a[t(272)];){var e=a.pop();if(e in o)return r[t(271)]=e,r.done=!1,r}return r[t(258)]=!0,r}},c[s(298)]=I,S.prototype={constructor:S,reset:function(r){var t=s;if(this[t(302)]=0,this[t(284)]=0,this.sent=this[t(297)]=f,this[t(258)]=!1,this[t(208)]=null,this[t(190)]=t(284),this[t(216)]=f,this[t(294)].forEach(O),!r)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e[t(285)](1))&&(this[e]=f)},stop:function(){var r=s,t=(this[r(258)]=!0,this.tryEntries[0][r(217)]);if(r(230)===t[r(283)])throw t[r(216)];return this[r(243)]},dispatchException:function(n){var o=s;if(this[o(258)])throw n;var a=this;function r(r,t){var e=o;return i.type=e(230),i[e(216)]=n,a[e(284)]=r,t&&(a[e(190)]=e(284),a[e(216)]=f),!!t}for(var t=this[o(294)][o(272)]-1;0<=t;--t){var e=this.tryEntries[t],i=e[o(217)];if(o(220)===e[o(219)])return r("end");if(e.tryLoc<=this[o(302)]){var c=l[o(273)](e,o(267)),u=l[o(273)](e,o(229));if(c&&u){if(this[o(302)]<e[o(267)])return r(e[o(267)],!0);if(this[o(302)]<e[o(229)])return r(e[o(229)])}else if(c){if(this[o(302)]<e[o(267)])return r(e[o(267)],!0)}else{if(!u)throw Error("try statement without catch or finally");if(this[o(302)]<e[o(229)])return r(e[o(229)])}}}},abrupt:function(r,t){for(var e=s,n=this[e(294)].length-1;0<=n;--n){var o=this.tryEntries[n];if(o[e(219)]<=this.prev&&l.call(o,"finallyLoc")&&this[e(302)]<o[e(229)]){var a=o;break}}var i=(a=a&&(e(276)===r||e(281)===r)&&a.tryLoc<=t&&t<=a[e(229)]?null:a)?a[e(217)]:{};return i[e(283)]=r,i.arg=t,a?(this[e(190)]=e(284),this[e(284)]=a.finallyLoc,y):this[e(237)](i)},complete:function(r,t){var e=s;if(e(230)===r[e(283)])throw r[e(216)];return e(276)===r[e(283)]||e(281)===r.type?this[e(284)]=r.arg:e(275)===r[e(283)]?(this.rval=this[e(216)]=r.arg,this[e(190)]="return",this[e(284)]=e(282)):"normal"===r[e(283)]&&t&&(this.next=t),y},finish:function(r){for(var t=s,e=this[t(294)].length-1;0<=e;--e){var n=this.tryEntries[e];if(n[t(229)]===r)return this[t(237)](n[t(217)],n[t(256)]),O(n),y}},catch:function(r){for(var t=s,e=this[t(294)].length-1;0<=e;--e){var n,o,a=this.tryEntries[e];if(a[t(219)]===r)return n=a[t(217)],t(230)===n[t(283)]&&(o=n[t(216)],O(a)),o}throw Error(t(215))},delegateYield:function(r,t,e){var n=s;return this.delegate={iterator:I(r),resultName:t,nextLoc:e},"next"===this[n(190)]&&(this.arg=f),y}},c}function asyncGeneratorStep(r,t,e,n,o,a,i){var c=_0x17a3;try{var u=r[a](i),s=u[c(271)]}catch(r){return void e(r)}u[c(258)]?t(s):Promise[c(278)](s)[c(279)](n,o)}function _0x17a3(r,t){var e=_0x5802();return(_0x17a3=function(r,t){return e[r-=187]})(r,t)}function _asyncToGenerator(u){return function(){var r=this,c=arguments;return new Promise(function(t,e){var n=_0x17a3,o=u[n(293)](r,c);function a(r){asyncGeneratorStep(o,t,e,a,i,n(284),r)}function i(r){asyncGeneratorStep(o,t,e,a,i,n(230),r)}a(void 0)})}}(()=>{for(var r=_0x17a3,t=_0x5802();;)try{if(351970==-parseInt(r(211))*(-parseInt(r(195))/2)+parseInt(r(255))/3*(-parseInt(r(290))/4)+parseInt(r(251))/5*(-parseInt(r(234))/6)+-parseInt(r(244))/7+-parseInt(r(226))/8*(-parseInt(r(239))/9)+parseInt(r(218))/10+parseInt(r(192))/11)break;t.push(t.shift())}catch(r){t.push(t.shift())}})();var ascf=require(_0x29576a(189)),_require=require(_0x29576a(199)),Command=_require[_0x29576a(280)],pkg=require(_0x29576a(277)),_require2=require("../common/config"),configs=_require2[_0x29576a(225)],program=new Command;program[_0x29576a(247)](pkg[_0x29576a(247)]).description("ascf toolkit convert and compile ascf project").option(_0x29576a(205),_0x29576a(203)),program[_0x29576a(235)](_0x29576a(264)).description("Convert miniprogram project to ascf project")[_0x29576a(214)](_0x29576a(197))[_0x29576a(214)](_0x29576a(236)).option("-c, --clear",_0x29576a(301))[_0x29576a(238)](_0x29576a(296),_0x29576a(300)).option("-notaddtodo, --notaddtodo","Not add todo for not supported api.").action((()=>{var t=_0x29576a,e=_asyncToGenerator(_regeneratorRuntime()[t(286)](function r(e){var n=t;return _regeneratorRuntime()[n(265)](function(r){for(var t=n;;)switch(r[t(302)]=r[t(284)]){case 0:return configs[t(222)]=!!e[t(222)],r[t(284)]=3,ascf[t(264)](e);case 3:case"end":return r[t(196)]()}},r)}));return function(r){return e[t(293)](this,arguments)}})()),program[_0x29576a(235)](_0x29576a(266)).description("Compile ascf project")[_0x29576a(238)](_0x29576a(240),_0x29576a(263))[_0x29576a(238)](_0x29576a(201),_0x29576a(299))[_0x29576a(238)]("-m, --mode",_0x29576a(232))[_0x29576a(238)](_0x29576a(274),_0x29576a(193)).option(_0x29576a(242),_0x29576a(245))[_0x29576a(202)]((()=>{var a=_0x29576a,e=_asyncToGenerator(_regeneratorRuntime()[a(286)](function r(e,n){var o=a;return _regeneratorRuntime()[o(265)](function(r){for(var t=o;;)switch(r[t(302)]=r[t(284)]){case 0:return r[t(284)]=2,ascf[t(206)](e,n);case 2:case t(282):return r[t(196)]()}},r)}));return function(r,t){return e[a(293)](this,arguments)}})()),program.parse(process[_0x29576a(249)]),global._ascfCliProgram=program,global._ascfDebug=!(null==(_global$_ascfCliProgr=global._ascfCliProgram[_0x29576a(227)]())||!_global$_ascfCliProgr[_0x29576a(288)]);
|
|
2
|
+
var _global$_ascfCliProgr,_0x56f78e=_0x59d2;function _0x52be(){var e=["apply","asyncIterator","98287IENQLx","convert","dispatchException","commander","ascf toolkit convert and compile ascf project","_invoke","stop","prototype","call","create","_ascfCliProgram","Command","length","method","requiredOption","prev","awrap","getPrototypeOf","toStringTag","' method","function","symbol","constructor","../../package.json","iterator result is not an object","Compile ascf project","Not add todo for not supported api.","compile <projectRoot>","enable debug logging","__proto__","description","nextLoc","-notaddtodo, --notaddtodo","catchLoc","suspendedStart","complete","Clear convert output path","isGeneratorFunction","return","424kfgbIl","normal","Use swc parser","hasOwnProperty","-c, --clear","afterLoc","try statement without catch or finally","reset","push","finallyLoc","Validate path","end","--logging [level]","4LUAcGJ","AsyncIterator","defineProperty","rval","@@toStringTag","command","debug","type","throw","setLoggerConfig","action","slice","mark","break","--swc","tryLoc","logging","keys","opts","notaddtodo","continue","1916850kJGmcx","../common/log4js.js","suspendedYield","name","value","sent","toString","Generator is already running","../index","next","-r, --run [command]","displayName","10NYOLXI","delegate","tryEntries","arg","charAt","2974866KyYlYC","-m, --mode","done","iterator","507579vrbVqz","wrap","version","forEach","Clear build resource","18570233KfYFkf","515248RxyokU","Convert miniprogram project to ascf project","values","illegal catch attempt","object","pop","executing","then","compile","_sent","-p, --progress","Watch for changes","parse","option","_ascfDebug","10CKHKbA","resolve","../common/config","7619409hfJool","Setting the log level","__await","Environment is development","-w, --watch","reverse","GeneratorFunction","completion"];return(_0x52be=function(){return e})()}function _0x59d2(e,r){var t=_0x52be();return(_0x59d2=function(e,r){return t[e-=329]})(e,r)}function _typeof(e){var t=_0x59d2;return(_typeof=t(381)==typeof Symbol&&"symbol"==typeof Symbol[t(454)]?function(e){return typeof e}:function(e){var r=t;return e&&r(381)==typeof Symbol&&e[r(383)]===Symbol&&e!==Symbol[r(368)]?r(382):typeof e})(e)}function _regeneratorRuntime(){var u=_0x59d2;_regeneratorRuntime=function(){return f};var s,f={},e=Object[u(368)],p=e[u(403)],l=Object[u(415)]||function(e,r,t){var n=u;e[r]=t[n(438)]},r=u(381)==typeof Symbol?Symbol:{},i=r[u(454)]||"@@iterator",t=r[u(360)]||"@@asyncIterator",n=r[u(379)]||u(417);function o(e,r,t){return Object[u(415)](e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[r]}try{o({},"")}catch(e){o=function(e,r,t){return e[r]=t}}function c(e,r,t,n){var o,i,a,f,c=u,r=r&&r[c(368)]instanceof m?r:m,r=Object.create(r[c(368)]),n=new O(n||[]);return l(r,c(366),{value:(o=e,i=t,a=n,f=_,function(e,r){var t=_0x59d2;if(f===d)throw Error(t(441));if(f===g){if(t(421)===e)throw r;return{value:s,done:!0}}for(a[t(374)]=e,a[t(449)]=r;;){var n=a[t(447)];if(n){n=function e(r,t){var n=u,o=t.method,i=r[n(454)][o];if(i===s)return t[n(447)]=null,n(421)===o&&r[n(454)].return&&(t.method=n(399),t[n(449)]=s,e(r,t),n(421)===t[n(374)])||n(399)!==o&&(t[n(374)]=n(421),t[n(449)]=new TypeError("The iterator does not provide a '"+o+n(380))),x;o=h(i,r[n(454)],t.arg);if(n(421)===o.type)return t[n(374)]=n(421),t.arg=o.arg,t[n(447)]=null,x;i=o[n(449)];return i?i[n(453)]?(t[r.resultName]=i[n(438)],t[n(443)]=r[n(392)],n(399)!==t[n(374)]&&(t[n(374)]=n(443),t[n(449)]=s),t.delegate=null,x):i:(t[n(374)]="throw",t[n(449)]=new TypeError(n(385)),t[n(447)]=null,x)}(n,a);if(n){if(n===x)continue;return n}}if(t(443)===a[t(374)])a[t(439)]=a[t(342)]=a[t(449)];else if(t(421)===a[t(374)]){if(f===_)throw f=g,a[t(449)];a[t(363)](a.arg)}else"return"===a.method&&a.abrupt(t(399),a[t(449)]);f=d;n=h(o,i,a);if(t(401)===n[t(420)]){if(f=a.done?g:v,n[t(449)]===x)continue;return{value:n[t(449)],done:a.done}}t(421)===n[t(420)]&&(f=g,a[t(374)]=t(421),a[t(449)]=n[t(449)])}})}),r}function h(e,r,t){var n=u;try{return{type:n(401),arg:e[n(369)](r,t)}}catch(e){return{type:n(421),arg:e}}}f.wrap=c;var _=u(395),v=u(436),d=u(339),g="completed",x={};function m(){}function a(){}function y(){}var r={},b=(o(r,i,function(){return this}),Object[u(378)]),b=b&&b(b(k([]))),w=(b&&b!==e&&p[u(369)](b,i)&&(r=b),y.prototype=m.prototype=Object.create(r));function j(e){var r=u;[r(443),r(421),r(399)][r(330)](function(r){o(e,r,function(e){return this._invoke(r,e)})})}function L(f,c){var r,o=u;l(this,o(366),{value:function(t,n){function e(){return new c(function(e,r){!function r(e,t,n,o){var i,a=_0x59d2,e=h(f[e],f,t);if("throw"!==e[a(420)])return(t=(i=e[a(449)])[a(438)])&&a(337)==_typeof(t)&&p[a(369)](t,a(353))?c[a(349)](t[a(353)]).then(function(e){r(a(443),e,n,o)},function(e){r(a(421),e,n,o)}):c[a(349)](t).then(function(e){i[a(438)]=e,n(i)},function(e){return r(a(421),e,n,o)});o(e[a(449)])}(t,n,e,r)})}return r=r?r[o(340)](e,e):e()}})}function C(e){var r=u,t={tryLoc:e[0]};1 in e&&(t[r(394)]=e[1]),2 in e&&(t[r(409)]=e[2],t[r(405)]=e[3]),this[r(448)].push(t)}function I(e){var r=u,t=e.completion||{};t.type=r(401),delete t[r(449)],e[r(358)]=t}function O(e){var r=u;this[r(448)]=[{tryLoc:"root"}],e[r(330)](C,this),this[r(407)](!0)}function k(t){var n=u;if(t||""===t){var o,e=t[i];if(e)return e[n(369)](t);if(n(381)==typeof t.next)return t;if(!isNaN(t[n(373)]))return o=-1,(e=function e(){for(var r=n;++o<t[r(373)];)if(p.call(t,o))return e[r(438)]=t[o],e[r(453)]=!1,e;return e[r(438)]=s,e.done=!0,e})[n(443)]=e}throw new TypeError(_typeof(t)+" is not iterable")}return a.prototype=y,l(w,u(383),{value:y,configurable:!0}),l(y,u(383),{value:a,configurable:!0}),a[u(445)]=o(y,n,u(357)),f[u(398)]=function(e){var r=u,e=r(381)==typeof e&&e.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e[r(437)]))},f[u(425)]=function(e){var r=u;return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e[r(390)]=y,o(e,n,"GeneratorFunction")),e[r(368)]=Object[r(370)](w),e},f[u(377)]=function(e){return{__await:e}},j(L[u(368)]),o(L[u(368)],t,function(){return this}),f[u(414)]=L,f.async=function(e,r,t,n,o){var i=u,a=(void 0===o&&(o=Promise),new L(c(e,r,t,n),o));return f[i(398)](r)?a:a[i(443)]().then(function(e){var r=i;return e.done?e[r(438)]:a[r(443)]()})},j(w),o(w,n,"Generator"),o(w,i,function(){return this}),o(w,u(440),function(){return"[object Generator]"}),f[u(430)]=function(e){var r,n=u,o=Object(e),i=[];for(r in o)i[n(408)](r);return i[n(356)](),function e(){for(var r=n;i[r(373)];){var t=i[r(338)]();if(t in o)return e[r(438)]=t,e[r(453)]=!1,e}return e.done=!0,e}},f[u(335)]=k,O[u(368)]={constructor:O,reset:function(e){var r=u;if(this[r(376)]=0,this[r(443)]=0,this[r(439)]=this[r(342)]=s,this[r(453)]=!1,this[r(447)]=null,this[r(374)]=r(443),this[r(449)]=s,this[r(448)][r(330)](I),!e)for(var t in this)"t"===t[r(450)](0)&&p[r(369)](this,t)&&!isNaN(+t[r(424)](1))&&(this[t]=s)},stop:function(){var e=u,r=(this.done=!0,this[e(448)][0].completion);if(e(421)===r[e(420)])throw r[e(449)];return this[e(416)]},dispatchException:function(n){var o=u;if(this[o(453)])throw n;var i=this;function e(e,r){var t=o;return a[t(420)]=t(421),a[t(449)]=n,i[t(443)]=e,r&&(i[t(374)]=t(443),i.arg=s),!!r}for(var r=this[o(448)][o(373)]-1;0<=r;--r){var t=this[o(448)][r],a=t[o(358)];if("root"===t[o(428)])return e("end");if(t.tryLoc<=this[o(376)]){var f=p[o(369)](t,o(394)),c=p[o(369)](t,o(409));if(f&&c){if(this[o(376)]<t[o(394)])return e(t[o(394)],!0);if(this[o(376)]<t[o(409)])return e(t[o(409)])}else if(f){if(this[o(376)]<t[o(394)])return e(t.catchLoc,!0)}else{if(!c)throw Error(o(406));if(this.prev<t[o(409)])return e(t[o(409)])}}}},abrupt:function(e,r){for(var t=u,n=this.tryEntries[t(373)]-1;0<=n;--n){var o=this[t(448)][n];if(o[t(428)]<=this[t(376)]&&p[t(369)](o,t(409))&&this[t(376)]<o[t(409)]){var i=o;break}}var a=(i=i&&(t(426)===e||t(433)===e)&&i.tryLoc<=r&&r<=i[t(409)]?null:i)?i[t(358)]:{};return a[t(420)]=e,a.arg=r,i?(this.method=t(443),this.next=i.finallyLoc,x):this[t(396)](a)},complete:function(e,r){var t=u;if("throw"===e[t(420)])throw e[t(449)];return"break"===e.type||t(433)===e[t(420)]?this.next=e[t(449)]:t(399)===e[t(420)]?(this[t(416)]=this[t(449)]=e[t(449)],this.method=t(399),this[t(443)]=t(411)):t(401)===e[t(420)]&&r&&(this[t(443)]=r),x},finish:function(e){for(var r=u,t=this[r(448)][r(373)]-1;0<=t;--t){var n=this[r(448)][t];if(n.finallyLoc===e)return this[r(396)](n[r(358)],n[r(405)]),I(n),x}},catch:function(e){for(var r=u,t=this[r(448)].length-1;0<=t;--t){var n,o,i=this[r(448)][t];if(i[r(428)]===e)return n=i[r(358)],r(421)===n[r(420)]&&(o=n.arg,I(i)),o}throw Error(r(336))},delegateYield:function(e,r,t){var n=u;return this[n(447)]={iterator:k(e),resultName:r,nextLoc:t},n(443)===this[n(374)]&&(this[n(449)]=s),x}},f}function asyncGeneratorStep(e,r,t,n,o,i,a){var f=_0x59d2;try{var c=e[i](a),u=c[f(438)]}catch(e){return void t(e)}c.done?r(u):Promise[f(349)](u)[f(340)](n,o)}function _asyncToGenerator(c){return function(){var e=this,f=arguments;return new Promise(function(r,t){var n=_0x59d2,o=c[n(359)](e,f);function i(e){asyncGeneratorStep(o,r,t,i,a,n(443),e)}function a(e){asyncGeneratorStep(o,r,t,i,a,n(421),e)}i(void 0)})}}(()=>{for(var e=_0x59d2,r=_0x52be();;)try{if(505471==+parseInt(e(333))+parseInt(e(434))/2+parseInt(e(455))/3*(-parseInt(e(413))/4)+-parseInt(e(348))/5*(-parseInt(e(451))/6)+-parseInt(e(361))/7*(-parseInt(e(400))/8)+parseInt(e(351))/9*(-parseInt(e(446))/10)+-parseInt(e(332))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}})();var ascf=require(_0x56f78e(442)),_require=require(_0x56f78e(364)),Command=_require[_0x56f78e(372)],pkg=require(_0x56f78e(384)),_require2=require(_0x56f78e(350)),configs=_require2.configs,program=new Command,_require3=require(_0x56f78e(435)),setLoggerConfig=_require3[_0x56f78e(422)];program[_0x56f78e(329)](pkg.version).description(_0x56f78e(365))[_0x56f78e(346)]("--debug",_0x56f78e(389)),program.command(_0x56f78e(362))[_0x56f78e(391)](_0x56f78e(334))[_0x56f78e(375)]("-i, --input <input-directory>").requiredOption("-o, --output <output-directory>")[_0x56f78e(346)](_0x56f78e(404),_0x56f78e(397))[_0x56f78e(346)]("-va, --validate",_0x56f78e(410))[_0x56f78e(346)](_0x56f78e(393),_0x56f78e(387))[_0x56f78e(346)](_0x56f78e(412),_0x56f78e(352))[_0x56f78e(423)]((()=>{var r=_0x56f78e,t=_asyncToGenerator(_regeneratorRuntime()[r(425)](function e(t){var n=r;return _regeneratorRuntime()[n(456)](function(e){for(var r=n;;)switch(e.prev=e.next){case 0:return setLoggerConfig(t[r(429)]),configs[r(432)]=!!t[r(432)],e[r(443)]=4,ascf.convert(t);case 4:case"end":return e[r(367)]()}},e)}));return function(e){return t[r(359)](this,arguments)}})()),program[_0x56f78e(418)](_0x56f78e(388))[_0x56f78e(391)](_0x56f78e(386))[_0x56f78e(346)](_0x56f78e(343),"Show build progress").option(_0x56f78e(355),_0x56f78e(344)).option(_0x56f78e(452),_0x56f78e(354)).option(_0x56f78e(404),_0x56f78e(331))[_0x56f78e(346)](_0x56f78e(444),"Run command on changes been watched")[_0x56f78e(346)](_0x56f78e(412),_0x56f78e(352))[_0x56f78e(346)](_0x56f78e(427),_0x56f78e(402)).action((()=>{var i=_0x56f78e,t=_asyncToGenerator(_regeneratorRuntime()[i(425)](function e(t,n){var o=i;return _regeneratorRuntime()[o(456)](function(e){for(var r=o;;)switch(e[r(376)]=e.next){case 0:return setLoggerConfig(n[r(429)]),e[r(443)]=3,ascf[r(341)](t,n);case 3:case r(411):return e[r(367)]()}},e)}));return function(e,r){return t[i(359)](this,arguments)}})()),program[_0x56f78e(345)](process.argv),global[_0x56f78e(371)]=program,global[_0x56f78e(347)]=!(null==(_global$_ascfCliProgr=global[_0x56f78e(371)][_0x56f78e(431)]())||!_global$_ascfCliProgr[_0x56f78e(419)]);
|
package/lib/common/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x38f1a5=_0x3fc9;function _0x375a(){var r=["40KAHuDc","7468020tVbwUj","483934GgNOQr","128udoPom","1413122BfvlLq","14796sYktpe","2PMLKGG","18WAVIlo","710612wMYEIi","25426824FVSrKf","219DzuuMs","475715sfeNys","configs"];return(_0x375a=function(){return r})()}function _0x3fc9(r,t){var n=_0x375a();return(_0x3fc9=function(r,t){return n[r-=145]})(r,t)}(()=>{for(var r=_0x3fc9,t=_0x375a();;)try{if(820128==-parseInt(r(147))*(-parseInt(r(145))/2)+-parseInt(r(151))/3*(-parseInt(r(146))/4)+parseInt(r(152))/5*(parseInt(r(148))/6)+-parseInt(r(149))/7*(-parseInt(r(157))/8)+-parseInt(r(155))/9+-parseInt(r(154))/10*(-parseInt(r(156))/11)+-parseInt(r(150))/12)break;t.push(t.shift())}catch(r){t.push(t.shift())}})();var configs={notaddtodo:!1};exports[_0x38f1a5(153)]=configs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x516d(e,r){var t=_0x3d38();return(_0x516d=function(e,r){return t[e-=216]})(e,r)}var _0x2beb7a=_0x516d;function _typeof(e){var t=_0x516d;return(_typeof=t(254)==typeof Symbol&&"symbol"==typeof Symbol[t(263)]?function(e){return typeof e}:function(e){var r=t;return e&&r(254)==typeof Symbol&&e[r(255)]===Symbol&&e!==Symbol[r(258)]?r(244):typeof e})(e)}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=_0x516d,o=0;o<r[t(232)];o++){var a=r[o];a[t(262)]=a[t(262)]||!1,a[t(240)]=!0,t(228)in a&&(a.writable=!0),Object[t(219)](e,_toPropertyKey(a.key),a)}}function _createClass(e,r,t){var o=_0x516d;return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object[o(219)](e,o(258),{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,r){var t=_0x516d;if(t(241)!=_typeof(e)||!e)return e;var o=e[Symbol[t(242)]];if(void 0===o)return(t(243)===r?String:Number)(e);o=o[t(252)](e,r||t(247));if(t(241)!=_typeof(o))return o;throw new TypeError(t(226))}(()=>{for(var e=_0x516d,r=_0x3d38();;)try{if(547863==+parseInt(e(216))+parseInt(e(265))/2*(parseInt(e(234))/3)+-parseInt(e(260))/4+parseInt(e(259))/5+-parseInt(e(239))/6*(parseInt(e(250))/7)+-parseInt(e(227))/8+parseInt(e(229))/9*(-parseInt(e(217))/10))break;r.push(r.shift())}catch(e){r.push(r.shift())}})();var log4js=require(_0x2beb7a(233)),path=require(_0x2beb7a(264)),levelArr=["debug",_0x2beb7a(261),_0x2beb7a(218),_0x2beb7a(221),_0x2beb7a(256)],cachedir=require("cachedir"),ASCF_TOOLKIT=_0x2beb7a(235);function setLoggerConfig(e){var r=_0x2beb7a,e=getLevel(e);log4js.configure({appenders:{default:{type:"stdout",layout:{type:r(224),pattern:r(253)}},"debug-log-file":{type:r(246),filename:path[r(231)](cachedir(r(220)),r(251)),maxLogSize:10485760,backups:9,layout:{type:r(224),pattern:r(225)}}},categories:{default:{appenders:[r(247)],level:e},AscfToolkit:{appenders:[r(223)],level:r(238)}}})}function getLevel(e){var r=_0x2beb7a;return e&&levelArr[r(249)](e[r(230)]())?e[r(230)]():r(261)}function _0x3d38(){var e=["204fUWynB","configurable","object","toPrimitive","string","symbol","categories","fileSync","default","exit","includes","89173EuxJBj","build.log","call","> ascf-toolkit %p %c %[%m%]","function","constructor","fatal","exports","prototype","4754840mdSjxO","1887056itEnAj","info","enumerable","iterator","path","1662412cgoCel","apply","524057sVVrwg","875470cmozQE","warn","defineProperty","ascf-cache","error","setLoggerConfig","debug-log-file","pattern","%d{yyyy-MM-dd hh:mm:ss.SSS} > ascf-toolkit %p %c %m","@@toPrimitive must return a primitive value.","4726696JtPZur","value","27Ntuqlg","toLowerCase","resolve","length","log4js","3wcwwRO","AscfToolkit","getLogger","concat","debug"];return(_0x3d38=function(){return e})()}var Logger=(()=>{var s=_0x2beb7a;return _createClass(function e(r){var t=_0x516d;_classCallCheck(this,e),this[t(245)]=r},[{key:s(238),value:function(e){for(var r=s,t=log4js[r(236)](this.categories),o=log4js[r(236)](ASCF_TOOLKIT),a=arguments[r(232)],n=new Array(1<a?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];t[r(238)][r(266)](t,[e][r(237)](n)),o[r(238)][r(266)](o,[e][r(237)](n))}},{key:"info",value:function(e){for(var r=s,t=log4js[r(236)](this.categories),o=log4js[r(236)](ASCF_TOOLKIT),a=arguments[r(232)],n=new Array(1<a?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];t.info[r(266)](t,[e][r(237)](n)),o.info.apply(o,[e][r(237)](n))}},{key:"warn",value:function(e){for(var r=s,t=log4js[r(236)](this.categories),o=log4js[r(236)](ASCF_TOOLKIT),a=arguments[r(232)],n=new Array(1<a?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];t[r(218)][r(266)](t,[e][r(237)](n)),o[r(218)][r(266)](o,[e].concat(n))}},{key:s(221),value:function(e){for(var r=s,t=log4js[r(236)](this.categories),o=log4js[r(236)](ASCF_TOOLKIT),a=arguments[r(232)],n=new Array(1<a?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];t[r(221)][r(266)](t,[e][r(237)](n)),o[r(221)][r(266)](o,[e][r(237)](n))}},{key:s(256),value:function(e){for(var r=s,t=log4js[r(236)](this[r(245)]),o=log4js.getLogger(ASCF_TOOLKIT),a=arguments[r(232)],n=new Array(1<a?a-1:0),i=1;i<a;i++)n[i-1]=arguments[i];t[r(256)][r(266)](t,[e].concat(n)),o[r(256)].apply(o,[e].concat(n)),process[r(248)](1)}}])})();function getLogger(e){return new Logger(e)}module[_0x2beb7a(257)]={getLogger:getLogger},module.exports[_0x2beb7a(222)]=setLoggerConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x1a16b6=_0x1d48;function _typeof(r){var t=_0x1d48;return(_typeof=t(129)==typeof Symbol&&t(154)==typeof Symbol[t(156)]?function(r){return typeof r}:function(r){var e=t;return r&&"function"==typeof Symbol&&r[e(108)]===Symbol&&r!==Symbol[e(144)]?e(154):typeof r})(r)}function _classCallCheck(r,e){if(!(r instanceof e))throw new TypeError("Cannot call a class as a function")}function _defineProperties(r,e){for(var t=_0x1d48,n=0;n<e[t(107)];n++){var o=e[n];o.enumerable=o[t(122)]||!1,o.configurable=!0,t(187)in o&&(o.writable=!0),Object[t(151)](r,_toPropertyKey(o.key),o)}}function _createClass(r,e,t){var n=_0x1d48;return e&&_defineProperties(r[n(144)],e),t&&_defineProperties(r,t),Object[n(151)](r,n(144),{writable:!1}),r}function _toPropertyKey(r){var e=_0x1d48,r=_toPrimitive(r,"string");return e(154)==_typeof(r)?r:r+""}function _toPrimitive(r,e){var t=_0x1d48;if(t(165)!=_typeof(r)||!r)return r;var n=r[Symbol[t(185)]];if(void 0===n)return(t(101)===e?String:Number)(r);n=n[t(171)](r,e||t(172));if("object"!=_typeof(n))return n;throw new TypeError(t(174))}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,e){var t,n=_0x1d48;if(r)return"string"==typeof r?_arrayLikeToArray(r,e):"Map"===(t="Object"===(t={}.toString[n(171)](r)[n(119)](8,-1))&&r[n(108)]?r[n(108)].name:t)||"Set"===t?Array[n(181)](r):n(175)===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[n(136)](t)?_arrayLikeToArray(r,e):void 0}function _iterableToArray(r){var e=_0x1d48;if(e(102)!=typeof Symbol&&null!=r[Symbol[e(156)]]||null!=r[e(162)])return Array.from(r)}function _arrayWithoutHoles(r){if(Array.isArray(r))return _arrayLikeToArray(r)}function _arrayLikeToArray(r,e){var t=_0x1d48;(null==e||e>r.length)&&(e=r[t(107)]);for(var n=0,o=Array(e);n<e;n++)o[n]=r[n];return o}(()=>{for(var r=_0x1d48,e=_0x3b19();;)try{if(297393==-parseInt(r(130))*(parseInt(r(143))/2)+-parseInt(r(145))/3+parseInt(r(132))/4*(parseInt(r(118))/5)+parseInt(r(150))/6+parseInt(r(139))/7+parseInt(r(182))/8*(parseInt(r(148))/9)+-parseInt(r(173))/10*(-parseInt(r(127))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}})();var TYPE=_0x1a16b6(106),log4js=require("./log4js.js"),logger=log4js[_0x1a16b6(158)](_0x1a16b6(133));function defaultFormatter(r,e){return r.reduce(function(r,e){var t=_0x1d48;return[][t(137)](_toConsumableArray(r),["\n".concat(e[t(105)])])},[])}function babelSyntaxError(r){var e=_0x1a16b6;return isBabelSyntaxError(r)&&(r[e(105)]=cleanStackTrace(r[e(105)])),r}function isBabelSyntaxError(r){var e=_0x1a16b6;return r[e(131)]===e(186)&&r[e(105)].includes("SyntaxError")}function _0x1d48(r,e){var t=_0x3b19();return(_0x1d48=function(r,e){return t[r-=100]})(r,e)}function cleanStackTrace(r){var e=_0x1a16b6;return r[e(124)](/^\s*at\s.*:\d+:\d+[\s\)]*\n/gm,"")[e(124)](/^Module build failed.*:\s/,e(123))}function moduleNotFoundError(r){var e,t=_0x1a16b6;return"ModuleNotFoundError"===r[t(131)]&&r[t(105)][t(135)](TYPE)&&(r.message=r[t(105)][t(124)](TYPE,"ERROR: ".concat(TYPE)),e=r[t(166)]&&r[t(166)].resource)&&(r[t(105)]+=t(100)[t(137)](e)),r}var defaultFormatters=[defaultFormatter],defaultTransformers=[babelSyntaxError,moduleNotFoundError];function extractError(r){var e=_0x1a16b6;return{message:r[e(105)],file:r.file,origin:r[e(166)],name:r[e(131)],severity:0,webpackError:r}}function cleanMessage(r){var e=_0x1a16b6;return r[e(124)](e(159),"").replace(/Module Warning[^\n]+\n/,"")[e(124)](/Module Error[^\n]+\n/,"")}function transformErrors(r,e){function t(r,e){return e(r)}var n=_0x1a16b6;return r[n(112)](extractError)[n(112)](function(r){return e.reduce(t,r)})}function formatErrors(e,r,t){var n=_0x1a16b6;return r[n(112)](function(r){return r(e,t)||[]})[n(138)](function(r,e){return r[_0x1d48(137)](e)},[])}function getCompileTime(r){var e=_0x1a16b6,t=r[e(142)],r=r[e(164)];logger[e(183)]("compileTime: "[e(137)](t-r,e(116)))}function _dropRepeat(r){var e=_0x1a16b6;return r[e(138)](function(r,t){var n=e;return r[n(170)](function(r){var e=n;return r[e(105)]===t[e(105)]})?r:r[n(137)](t)},[])}var BuildLogOutputPlugin=(()=>{var l=_0x1a16b6;return _createClass(function r(){var e=_0x1d48,t=0<arguments[e(107)]&&void 0!==arguments[0]?arguments[0]:{},n=t[e(115)],n=void 0!==n&&n,t=t.options;_classCallCheck(this,r),this[e(141)]=0,this[e(157)]=0,this[e(179)]=0,this[e(115)]=n||process[e(117)][e(161)]===e(168),this[e(114)]=defaultFormatters,this[e(163)]=defaultTransformers,this[e(146)]=t},[{key:l(155),value:function(r){var u=l,s=this;r.hooks[u(180)][u(176)]("BuildLogOutputPlugin",function(e){var t=u,r=(s[t(184)](e),e[t(125)]),n=r[t(147)],o=r[t(169)],a=e[t(128)](),i=e[t(110)]();setTimeout(function(){var r=t;a&&s[r(103)](n,r(111)),i&&s[r(103)](o,r(121)),s[r(113)](e,n,o),s[r(134)](),s[r(115)]&&getCompileTime(e)})})}},{key:l(184),value:function(r){var e=l;r[e(125)].warnings=_dropRepeat(r[e(125)][e(169)]),r[e(125)][e(147)]=_dropRepeat(r[e(125)][e(147)])}},{key:l(113),value:function(r,e){var t=l,n=this,o=2<arguments[t(107)]&&void 0!==arguments[2]?arguments[2]:[],r=r[t(125)].extraInfo||{},a=r.errorCount,a=void 0===a?0:a,i=r[t(126)],i=void 0===i?0:i,r=r[t(179)],r=void 0===r?0:r;this[t(141)]=e[t(107)]+a,this[t(157)]=i,this[t(179)]=r,o[t(178)](function(r){var e=t,r=r[e(105)];/^NOTE:/[e(136)](cleanMessage(r))?n.noteCount++:n[e(157)]++})}},{key:l(134),value:function(){var r,e=l,t=this.errorCount,n=this[e(157)],o=this[e(179)];0<t+n+o?(r=e(t?167:153),n=Object[e(120)]({},t?{ERROR:t}:{},n?{WARN:n}:{},o?{NOTE:o}:{}),t?logger[e(152)](e(140)[e(137)](r).concat(JSON[e(104)](n))):logger[e(109)]("\nCOMPILE RESULT:"[e(137)](r)[e(137)](JSON[e(104)](n)))):logger[e(183)](e(177))}},{key:l(103),value:function(r,t){var n=l;formatErrors(transformErrors(r,this[n(163)]),this[n(114)],t)[n(178)](function(r){var e=n;t===e(111)&&logger[e(111)](cleanMessage(r)),t===e(121)&&logger[e(109)](cleanMessage(r))})}},{key:l(160),value:function(r,e){var t=l;return formatErrors(transformErrors(r,this.transformers),this[t(114)],e).map(function(r){return cleanMessage(r)})}}])})();function _0x3b19(){var r=["\n@ ","string","undefined","displayErrors","stringify","message","Module not found","length","constructor","warn","hasWarnings","error","map","calculate","formatters","showCompileTime"," ms","env","2455ewRVhM","slice","assign","warning","enumerable","Error: ","replace","compilation","warnCount","3047Xljnai","hasErrors","function","2PTtFkw","name","2044laoDiY","logger-plugin","printCompileResult","includes","test","concat","reduce","442932LgZHdj","\nCOMPILE RESULT:","errorCount","endTime","483508hVVnNQ","prototype","532158ypHuYO","options","errors","103347kKYDlb","exports","764100dyanPr","defineProperty","fatal","SUCCESS ","symbol","apply","iterator","warningCount","getLogger","(Emitted value instead of an instance of Error) ","getBuildMsg","showtime","@@iterator","transformers","startTime","object","origin","FAIL ","true","warnings","some","call","default","830yJEqBk","@@toPrimitive must return a primitive value.","Arguments","tap","\nCOMPILE RESULT:SUCCESS","forEach","noteCount","done","from","344rqYrdZ","info","dropRepeat","toPrimitive","ModuleBuildError","value"];return(_0x3b19=function(){return r})()}module[_0x1a16b6(149)]=BuildLogOutputPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x59f3(r,n){var t=_0x1171();return(_0x59f3=function(r,n){return t[r-=222]})(r,n)}var _0x1e7bf8=_0x59f3;function _0x1171(){var r=["length","69hDujYD","326808TpcwCT","9742EHpJxf","24255ujDIbH","exports","splice","directives","4963NJxhRh","9qTSxbn","8178621RnPTJn","45580PeAUjL","2504uHcxnU","node","3576daISet","value","5585cljJNv"];return(_0x1171=function(){return r})()}(()=>{for(var r=_0x59f3,n=_0x1171();;)try{if(349724==+parseInt(r(227))+parseInt(r(226))/2*(parseInt(r(224))/3)+-parseInt(r(225))/4+parseInt(r(222))/5*(-parseInt(r(237))/6)+parseInt(r(231))/7*(parseInt(r(235))/8)+parseInt(r(232))/9*(-parseInt(r(234))/10)+parseInt(r(233))/11)break;n.push(n.shift())}catch(r){n.push(n.shift())}})(),module[_0x1e7bf8(228)]=function(){return{visitor:{Program:{exit:function(r){for(var n=_0x59f3,t=r[n(236)][n(230)],e=t[n(223)]-1;0<=e;e--)"use strict"===t[e][n(238)][n(238)]&&t[n(229)](e,1)}}}}};
|
package/lib/common/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x400d6b=_0x5638;function _0x5f13(){var r=["ASCF_BUILD_PATH","src/main/resources/rawfile","parse","3756TBrWaq","true","ascf.config.json","NODE_ENV","ASCF_SRC_PATH","beta","7BpwIYs","projectRoot","parse json file error at ","1570916mMXWpv","includes","97427nJJzrv","env","cwd","release","ERROR: Write JSON file failed: ","1557CTZyMZ","11120rfqlZT","stringify","readFileSync","49794qDsswq","debug","json5","PROJECT_CONFIG","resolve","join","710GsqbYN","rimraf","production","ascfRoot","9740403uHCQGN","TOOLKIT_PATH","writeFileSync","uglifyjs","existsSync","sync","versionType","_versionType","concat","map","10MWMAei","writeJsonFile","743684aUBxOY","ascf","PROJECT_PATH","ascf/ascf_src","8860016VVdsNx","utf-8"];return(_0x5f13=function(){return r})()}(()=>{for(var r=_0x5638,e=_0x5f13();;)try{if(839732==-parseInt(r(239))+parseInt(r(221))/2+parseInt(r(246))/3*(parseInt(r(247))/4)+parseInt(r(256))/5*(parseInt(r(250))/6)+-parseInt(r(236))/7*(-parseInt(r(225))/8)+-parseInt(r(260))/9*(-parseInt(r(219))/10)+-parseInt(r(241))/11*(parseInt(r(230))/12))break;e.push(e.shift())}catch(r){e.push(e.shift())}})();var rimraf=require(_0x400d6b(257)),fs=require("fs"),path=require("path"),JSON5=require(_0x400d6b(252)),projectPath=process[_0x400d6b(242)][_0x400d6b(237)]||process[_0x400d6b(243)](),projectCfg=readProjectCfgJson(projectPath)||{},srcPath=path[_0x400d6b(254)](projectPath,_0x400d6b(224));function _0x5638(r,e){var t=_0x5f13();return(_0x5638=function(r,e){return t[r-=213]})(r,e)}function readJsonFile(e){var t=_0x400d6b;if(!fs[t(213)](e))return{};var r={};try{r=JSON5[t(229)](fs[t(249)](e,t(226)).toString()||"{}")}catch(r){throw new Error(t(238)[t(217)](e,":")[t(217)](r.lineNumber,":")[t(217)](r.columnNumber," "))}return r}function writeJsonFile(r,e){var t=_0x400d6b;try{fs[t(262)](r,JSON[t(248)](e,null,2))}catch(r){throw t(245)[t(217)](r)}}function initVersionType(){var r=_0x400d6b,e=["debug",r(235),r(244)],t=process.env[r(215)];global[r(216)]="debug",t&&e[r(240)](t)?global[r(216)]=t:(e=process[r(242)][r(263)]===r(231),global[r(216)]=r(e?244:251))}function readProjectCfgJson(r){var e,t=_0x400d6b,r=path[t(255)](r,t(232));return e=fs.existsSync(r)?JSON[t(229)](fs[t(249)](r).toString()):e}initVersionType(),exports.IS_PRD=process.env[_0x400d6b(233)]===_0x400d6b(258),exports[_0x400d6b(223)]=projectPath,exports[_0x400d6b(253)]=projectCfg,exports[_0x400d6b(234)]=projectCfg[_0x400d6b(259)]?path[_0x400d6b(254)](srcPath,projectCfg[_0x400d6b(259)]):srcPath,exports[_0x400d6b(227)]=path[_0x400d6b(254)](projectPath,_0x400d6b(222),"ascf_build"),exports.RAWFILE_DIR=_0x400d6b(228),exports[_0x400d6b(261)]=path[_0x400d6b(255)](__dirname,"..",".."),exports.clearResource=function(r){var s=_0x400d6b;return Promise.all(r[s(218)](function(e){var t=s;if(fs[t(213)](e))return new Promise(function(r){rimraf[t(214)](e),r()})}))},exports.readJsonFile=readJsonFile,exports[_0x400d6b(220)]=writeJsonFile;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _0x1ba21b=_0x3c9e,utils=((()=>{for(var e=_0x3c9e,t=_0x1f7b();;)try{if(309306==+parseInt(e(473))*(-parseInt(e(486))/2)+parseInt(e(470))/3+parseInt(e(454))/4+-parseInt(e(482))/5*(parseInt(e(471))/6)+parseInt(e(456))/7+parseInt(e(490))/8*(parseInt(e(466))/9)+parseInt(e(455))/10)break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),require("./utils")),path=require(_0x1ba21b(460)),_require=require(_0x1ba21b(476)),satisfies=_require[_0x1ba21b(451)],_require2=require(_0x1ba21b(465)),execSync=_require2[_0x1ba21b(467)],log4js=require(_0x1ba21b(461)),logger=log4js[_0x1ba21b(488)]("version-check");function _0x1f7b(){var e=['INFO: @atomicservice/ascf-toolkit can be upgraded, execute command "npm update -g @atomicservice/ascf-toolkit ',"oh-package.json5","trim","4wNYuRs","dependencies","getLogger","readJsonFile","16WVpwfd"," does not depend on ASCF Shared Library. Select a project that does, or create a new one.","concat","latest[39m:","version","satisfies","split","build-profile.json5","1399456MBYIoc","1383900cvgBBa","3667706oojfrD","INFO: ASCF Shared Library can be upgraded.","TOOLKIT_PATH","srcPath","path","./log4js.js","modules","resolve","package.json","child_process","163188EcgzFy","execSync","latest","ERROR: build-profile.json5 file modules is null","286170CKUFIO","57336NOriPn","ohpm info @atomicservice/ascfapi -ft 10000","302608tRvNlw","toString","isLatestAscfToolkit","semver","PROJECT_PATH","toLowerCase","length","warn","npm view @atomicservice/ascf-toolkit version","120RDQvEd"];return(_0x1f7b=function(){return e})()}function _0x3c9e(e,t){var r=_0x1f7b();return(_0x3c9e=function(e,t){return r[e-=449]})(e,t)}function getEntryPackageName(){var e=_0x1ba21b,t=utils[e(489)](path[e(463)](utils[e(477)],e(453)));if(t.modules&&0!==t[e(462)][e(479)])return t.modules[0][e(459)];throw e(469)}exports[_0x1ba21b(475)]=function(){var e=_0x1ba21b,t=0<arguments.length&&void 0!==arguments[0]&&arguments[0],r=utils.readJsonFile(path.join(utils[e(458)],e(464)))[e(450)],a=execSync(e(481),{timeout:5e3})[e(474)]().trim();r!==a&&(t?logger[e(480)]('WARNING: @atomicservice/ascf-toolkit can be upgraded, execute command "npm update -g @atomicservice/ascf-toolkit '[e(492)](a,'"')):logger.info(e(483)[e(492)](a,'"')))},exports.isLatestAscfHar=function(){var e,t=_0x1ba21b,r=0<arguments.length&&void 0!==arguments[0]&&arguments[0],a=path.join(utils[t(477)],getEntryPackageName(),t(484)),i=utils[t(489)](a)[t(487)]["@atomicservice/ascfapi"];i?(e=execSync(t(472),{timeout:5e3}).toString()[t(452)](t(449))[1][t(452)]("\n")[0][t(485)](),satisfies(e,i)||i[t(478)]()===t(468)||(r?logger.warn("WARNING: ASCF Shared Library can be upgraded."):logger.info(t(457)))):logger.warn("WARNING: ".concat(a,t(491)))};
|
package/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var _0x5d1f00=_0x2e80;function _typeof(r){var e=_0x2e80;return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol[e(375)]?function(r){return typeof r}:function(r){var t=e;return r&&t(442)==typeof Symbol&&r[t(507)]===Symbol&&r!==Symbol[t(486)]?t(436):typeof r})(r)}function _regeneratorRuntime(){var s=_0x2e80;_regeneratorRuntime=function(){return c};var f,c={},r=Object[s(486)],l=r[s(407)],h=Object[s(433)]||function(r,t,e){var n=s;r[t]=e[n(453)]},t=s(442)==typeof Symbol?Symbol:{},i=t.iterator||s(457),e=t[s(403)]||s(499),n=t[s(466)]||"@@toStringTag";function o(r,t,e){return Object[s(433)](r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{o({},"")}catch(r){o=function(r,t,e){return r[t]=e}}function u(r,t,e,n){var o,i,a,c,u=s,t=t&&t[u(486)]instanceof y?t:y,t=Object[u(469)](t[u(486)]),n=new E(n||[]);return h(t,u(400),{value:(o=r,i=e,a=n,c=v,function(r,t){var e=_0x2e80;if(c===d)throw Error(e(472));if(c===_){if(e(425)===r)throw t;return{value:f,done:!0}}for(a.method=r,a[e(492)]=t;;){var n=a[e(455)];if(n){n=function r(t,e){var n=s,o=e[n(399)],i=t.iterator[o];if(i===f)return e.delegate=null,"throw"===o&&t[n(375)][n(506)]&&(e.method=n(506),e[n(492)]=f,r(t,e),"throw"===e[n(399)])||n(506)!==o&&(e[n(399)]=n(425),e[n(492)]=new TypeError(n(370)+o+n(476))),g;o=p(i,t.iterator,e[n(492)]);if("throw"===o[n(387)])return e[n(399)]=n(425),e[n(492)]=o[n(492)],e.delegate=null,g;i=o.arg;return i?i[n(465)]?(e[t[n(415)]]=i[n(453)],e[n(443)]=t[n(464)],n(506)!==e[n(399)]&&(e[n(399)]=n(443),e[n(492)]=f),e[n(455)]=null,g):i:(e[n(399)]=n(425),e[n(492)]=new TypeError(n(505)),e[n(455)]=null,g)}(n,a);if(n){if(n===g)continue;return n}}if(e(443)===a[e(399)])a.sent=a[e(410)]=a[e(492)];else if("throw"===a[e(399)]){if(c===v)throw c=_,a.arg;a.dispatchException(a[e(492)])}else e(506)===a.method&&a.abrupt(e(506),a[e(492)]);c=d;n=p(o,i,a);if(e(471)===n[e(387)]){if(c=a[e(465)]?_:m,n[e(492)]===g)continue;return{value:n.arg,done:a[e(465)]}}e(425)===n[e(387)]&&(c=_,a.method=e(425),a[e(492)]=n[e(492)])}})}),t}function p(r,t,e){var n=s;try{return{type:n(471),arg:r[n(504)](t,e)}}catch(r){return{type:"throw",arg:r}}}c[s(383)]=u;var v=s(377),m=s(434),d=s(404),_=s(491),g={};function y(){}function a(){}function w(){}var t={},b=(o(t,i,function(){return this}),Object[s(401)]),b=b&&b(b(A([]))),x=(b&&b!==r&&l[s(504)](b,i)&&(t=b),w[s(486)]=y[s(486)]=Object[s(469)](t));function k(r){var t=s;["next",t(425),"return"][t(456)](function(t){o(r,t,function(r){return this[_0x2e80(400)](t,r)})})}function j(c,u){var t;h(this,s(400),{value:function(e,n){function r(){return new u(function(r,t){!function t(r,e,n,o){var i,a=_0x2e80,r=p(c[r],c,e);if(a(425)!==r[a(387)])return(e=(i=r.arg)[a(453)])&&a(488)==_typeof(e)&&l[a(504)](e,a(490))?u[a(467)](e.__await)[a(405)](function(r){t(a(443),r,n,o)},function(r){t(a(425),r,n,o)}):u[a(467)](e)[a(405)](function(r){i.value=r,n(i)},function(r){return t("throw",r,n,o)});o(r.arg)}(e,n,r,t)})}return t=t?t.then(r,r):r()}})}function I(r){var t=s,e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e[t(367)]=r[2],e[t(427)]=r[3]),this[t(452)].push(e)}function G(r){var t=s,e=r.completion||{};e[t(387)]=t(471),delete e.arg,r.completion=e}function E(r){var t=s;this[t(452)]=[{tryLoc:t(449)}],r[t(456)](I,this),this[t(382)](!0)}function A(e){var n=s;if(e||""===e){var o,r=e[i];if(r)return r.call(e);if(n(442)==typeof e.next)return e;if(!isNaN(e.length))return o=-1,(r=function r(){for(var t=n;++o<e.length;)if(l[t(504)](e,o))return r[t(453)]=e[o],r[t(465)]=!1,r;return r[t(453)]=f,r[t(465)]=!0,r})[n(443)]=r}throw new TypeError(_typeof(e)+n(459))}return a[s(486)]=w,h(x,s(507),{value:w,configurable:!0}),h(w,s(507),{value:a,configurable:!0}),a[s(361)]=o(w,n,s(501)),c.isGeneratorFunction=function(r){var t=s,r=t(442)==typeof r&&r[t(507)];return!!r&&(r===a||t(501)===(r[t(361)]||r[t(416)]))},c[s(366)]=function(r){var t=s;return Object[t(493)]?Object[t(493)](r,w):(r[t(362)]=w,o(r,n,"GeneratorFunction")),r[t(486)]=Object.create(x),r},c[s(439)]=function(r){return{__await:r}},k(j.prototype),o(j[s(486)],e,function(){return this}),c[s(470)]=j,c[s(412)]=function(r,t,e,n,o){var i=s,a=(void 0===o&&(o=Promise),new j(u(r,t,e,n),o));return c[i(408)](t)?a:a[i(443)]()[i(405)](function(r){var t=i;return r[t(465)]?r.value:a[t(443)]()})},k(x),o(x,n,s(358)),o(x,i,function(){return this}),o(x,s(497),function(){return s(365)}),c[s(437)]=function(r){var t,n=s,o=Object(r),i=[];for(t in o)i[n(411)](t);return i[n(429)](),function r(){for(var t=n;i[t(463)];){var e=i.pop();if(e in o)return r[t(453)]=e,r[t(465)]=!1,r}return r[t(465)]=!0,r}},c[s(454)]=A,E[s(486)]={constructor:E,reset:function(r){var t=s;if(this[t(380)]=0,this[t(443)]=0,this[t(480)]=this._sent=f,this[t(465)]=!1,this[t(455)]=null,this[t(399)]="next",this[t(492)]=f,this.tryEntries[t(456)](G),!r)for(var e in this)"t"===e.charAt(0)&&l.call(this,e)&&!isNaN(+e[t(495)](1))&&(this[e]=f)},stop:function(){var r=s,t=(this.done=!0,this[r(452)][0][r(378)]);if(r(425)===t[r(387)])throw t[r(492)];return this.rval},dispatchException:function(n){var o=s;if(this[o(465)])throw n;var i=this;function r(r,t){var e=o;return a.type="throw",a[e(492)]=n,i[e(443)]=r,t&&(i[e(399)]=e(443),i[e(492)]=f),!!t}for(var t=this.tryEntries[o(463)]-1;0<=t;--t){var e=this[o(452)][t],a=e[o(378)];if(o(449)===e.tryLoc)return r(o(440));if(e[o(496)]<=this[o(380)]){var c=l[o(504)](e,o(391)),u=l.call(e,o(367));if(c&&u){if(this.prev<e[o(391)])return r(e[o(391)],!0);if(this.prev<e[o(367)])return r(e.finallyLoc)}else if(c){if(this[o(380)]<e[o(391)])return r(e[o(391)],!0)}else{if(!u)throw Error(o(359));if(this.prev<e[o(367)])return r(e[o(367)])}}}},abrupt:function(r,t){for(var e=s,n=this[e(452)][e(463)]-1;0<=n;--n){var o=this[e(452)][n];if(o[e(496)]<=this[e(380)]&&l[e(504)](o,e(367))&&this[e(380)]<o[e(367)]){var i=o;break}}var a=(i=i&&(e(379)===r||e(430)===r)&&i[e(496)]<=t&&t<=i[e(367)]?null:i)?i[e(378)]:{};return a[e(387)]=r,a.arg=t,i?(this.method=e(443),this[e(443)]=i[e(367)],g):this.complete(a)},complete:function(r,t){var e=s;if("throw"===r[e(387)])throw r[e(492)];return"break"===r[e(387)]||e(430)===r[e(387)]?this[e(443)]=r[e(492)]:e(506)===r[e(387)]?(this[e(432)]=this[e(492)]=r[e(492)],this[e(399)]="return",this[e(443)]=e(440)):"normal"===r[e(387)]&&t&&(this[e(443)]=t),g},finish:function(r){for(var t=s,e=this[t(452)][t(463)]-1;0<=e;--e){var n=this[t(452)][e];if(n[t(367)]===r)return this.complete(n[t(378)],n[t(427)]),G(n),g}},catch:function(r){for(var t=s,e=this[t(452)][t(463)]-1;0<=e;--e){var n,o,i=this[t(452)][e];if(i[t(496)]===r)return"throw"===(n=i.completion)[t(387)]&&(o=n[t(492)],G(i)),o}throw Error(t(423))},delegateYield:function(r,t,e){var n=s;return this.delegate={iterator:A(r),resultName:t,nextLoc:e},n(443)===this[n(399)]&&(this[n(492)]=f),g}},c}function _0x2e80(r,t){var e=_0x5fe6();return(_0x2e80=function(r,t){return e[r-=358]})(r,t)}function asyncGeneratorStep(r,t,e,n,o,i,a){var c=_0x2e80;try{var u=r[i](a),s=u[c(453)]}catch(r){return void e(r)}u.done?t(s):Promise[c(467)](s)[c(405)](n,o)}function _asyncToGenerator(u){return function(){var r=this,c=arguments;return new Promise(function(t,e){var n=_0x2e80,o=u[n(384)](r,c);function i(r){asyncGeneratorStep(o,t,e,i,a,n(443),r)}function a(r){asyncGeneratorStep(o,t,e,i,a,"throw",r)}i(void 0)})}}(()=>{for(var r=_0x2e80,t=_0x5fe6();;)try{if(880489==-parseInt(r(446))+-parseInt(r(393))/2+-parseInt(r(503))/3*(-parseInt(r(386))/4)+-parseInt(r(418))/5*(-parseInt(r(477))/6)+parseInt(r(421))/7*(parseInt(r(420))/8)+-parseInt(r(502))/9*(-parseInt(r(431))/10)+-parseInt(r(458))/11*(parseInt(r(481))/12))break;t.push(t.shift())}catch(r){t.push(t.shift())}})();var _require=require(_0x5d1f00(390)),watchExec=_require.watchExec,chalk=require("./ascf-compiler/chalk/bundle.cjs");function _0x5fe6(){var r=["constructor","Generator","try statement without catch or finally","_isAscfMode","displayName","__proto__","run","chdir","[object Generator]","mark","finallyLoc","check","_isMiniAppConvertMode","The iterator does not provide a '","red",'","folderUrl":"',"mode","NODE_ENV","iterator","green","suspendedStart","completion","break","prev","info","reset","wrap","apply","watch","84DjjhJr","type","WARNING: Get @atomicservice/ascf-toolkit version failed: ","stop","./ascf-compiler/watch/watch","catchLoc","webpack","2347938soCiXM","EnvironmentPlugin",'","errorMessage":"',"./common/utils.js","exit","yes","method","_invoke","getPrototypeOf","ASCF unhandled rejection at:","asyncIterator","executing","then","WARNING: Get @atomicservice/ascf info failed.","hasOwnProperty","isGeneratorFunction","errorMessage","_sent","push","async","command","plugins","resultName","name","input","6830BIfYjw","concat","3131264uHUocy","28YlADko","existsVerifyLog","illegal catch attempt","error","throw","checkInputPathFun","afterLoc","verbose","reverse","continue","212110ZnIOIk","rval","defineProperty","suspendedYield","./ascf-compiler/web.webpack.config.js","symbol","keys","validate","awrap","end",'"command":"',"function","next","level","catch","261954WuPDbW","env","unhandledRejection","root","development","progress","tryEntries","value","values","delegate","forEach","@@iterator","33BnaSAZ"," is not iterable","infrastructureLogging","path","confirmConverterFun","length","nextLoc","done","toStringTag","resolve","warn","create","AsyncIterator","normal","Generator is already running","log","uncaughtException","ascf/ascf_src","' method","5922AjamFT","output","isLatestAscfToolkit","sent","8019996MdcruF","ProgressPlugin","folderUrl","isLatestAscfHar","projectRoot","prototype","_ascfDebug","object","yellow","__await","completed","arg","setPrototypeOf","production","slice","tryLoc","toString","reason:","@@asyncIterator","clearResource","GeneratorFunction","486WHeXQR","37449upPuGa","call","iterator result is not an object","return"];return(_0x5fe6=function(){return r})()}function convert(r){return _convert[_0x5d1f00(384)](this,arguments)}function _convert(){var e=_0x5d1f00;return(_convert=_asyncToGenerator(_regeneratorRuntime()[e(366)](function r(t){var n,o,i,a=e;return _regeneratorRuntime()[a(383)](function(r){for(var e=a;;)switch(r[e(380)]=r[e(443)]){case 0:if(n=require("./ascf-converter/features/converter.js"),global[e(369)]=!0,global[e(360)]=!0,process[e(447)][e(500)]=t.clear?e(398):"no",i=require("./common/utils.js"),o=i[e(479)],i=i.checkPath,t[e(438)]&&(i(t[e(417)],t[e(478)]),process[e(397)](0)),n[e(426)](t[e(417)]),t[e(368)]){r[e(443)]=12;break}return r[e(443)]=10,n[e(462)]({inputPath:t.input,outPath:t[e(478)],confirmAddConfig:!0});case 10:(i=r[e(480)])[e(409)]?console[e(424)](chalk[e(371)](e(441)[e(419)](i[e(413)],e(395))[e(419)](i[e(409)],'"'))):console[e(381)](chalk[e(376)](e(441)[e(419)](i[e(413)],e(372))[e(419)](i[e(483)],'"')));case 12:setTimeout(function(){var t=e;try{o()}catch(r){console.warn(chalk[t(489)]("WARNING: Get @atomicservice/ascf-toolkit version failed: "[t(419)](r,".")))}});case 13:case e(440):return r[e(389)]()}},r)})))[e(384)](this,arguments)}function compile(r,t){return _compile[_0x5d1f00(384)](this,arguments)}function _compile(){var r=_0x5d1f00;return(_compile=_asyncToGenerator(_regeneratorRuntime().mark(function r(e,n){var o,i,a,c=_0x2e80;return _regeneratorRuntime()[c(383)](function(r){for(var t=c;;)switch(r[t(380)]=r[t(443)]){case 0:return o=require(t(461)),process.env[t(485)]=o[t(467)](e),process[t(364)](o[t(467)](e,t(475))),process.env[t(374)]=n[t(373)]?t(450):t(494),process[t(447)][t(500)]=n.clear?t(398):"no",o=require(t(392)),r[t(380)]=6,i=require(t(435)),r[t(443)]=10,i();case 10:(i=r[t(480)])[t(414)]=i[t(414)]||[],i.plugins[t(411)](new o[t(394)]({projectRoot:e})),n[t(451)]&&i[t(414)][t(411)](new o[t(482)]),n[t(385)]&&(i.watch=!0),global._ascfDebug&&(i[t(460)]={level:"verbose"}),a=o(i),n[t(385)]?(watchExec(a,n.run),r[t(443)]=23):r[t(443)]=21;break;case 21:return r[t(443)]=23,run(a);case 23:r[t(443)]=29;break;case 25:r[t(380)]=25,r.t0=r[t(445)](6),console[t(424)](r.t0),process[t(397)](1);case 29:case t(440):return r[t(389)]()}},r,null,[[6,25]])})))[r(384)](this,arguments)}function getAscfToolkitDirname(){return __dirname}function run(r){return new Promise(function(e,o){var i=_0x2e80;r[i(363)](function(r,t){var n=i;t&&console[n(473)](t[n(497)]({all:!1,colors:!0,errors:!0,warnings:!0,assets:!0,logging:global[n(487)]?n(428):n(381)})),r?(console[n(424)](r),o(r)):(setTimeout(function(){var t=n,r=require(t(396)),e=r[t(479)],r=r[t(484)];try{r(global[t(422)])}catch(r){console[t(468)](chalk[t(489)](t(406)))}try{e(global[t(422)])}catch(r){console[t(468)](chalk[t(489)](t(388).concat(r,".")))}}),e(t))})})}chalk[_0x5d1f00(444)]=1,global[_0x5d1f00(360)]=!0,process.on(_0x5d1f00(474),function(r){console[_0x5d1f00(424)]("ASCF uncaught error",r)}),process.on(_0x5d1f00(448),function(r,t){var e=_0x5d1f00;console[e(424)](e(402),t,e(498),r)}),module.exports={convert:convert,compile:compile,getAscfToolkitDirname:getAscfToolkitDirname};
|
|
1
|
+
var _0x20b413=_0x2c72;function _typeof(r){var e=_0x2c72;return(_typeof=e(532)==typeof Symbol&&e(547)==typeof Symbol.iterator?function(r){return typeof r}:function(r){var t=e;return r&&t(532)==typeof Symbol&&r[t(571)]===Symbol&&r!==Symbol[t(527)]?t(547):typeof r})(r)}function _regeneratorRuntime(){var s=_0x2c72;_regeneratorRuntime=function(){return c};var f,c={},r=Object[s(527)],l=r.hasOwnProperty,h=Object[s(487)]||function(r,t,e){var n=s;r[t]=e[n(574)]},t=s(532)==typeof Symbol?Symbol:{},i=t[s(538)]||s(472),e=t[s(480)]||"@@asyncIterator",n=t[s(494)]||"@@toStringTag";function o(r,t,e){return Object[s(487)](r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{o({},"")}catch(r){o=function(r,t,e){return r[t]=e}}function u(r,t,e,n){var o,i,a,c,u=s,t=t&&t[u(527)]instanceof b?t:b,t=Object[u(587)](t[u(527)]),n=new I(n||[]);return h(t,u(501),{value:(o=r,i=e,a=n,c=v,function(r,t){var e=_0x2c72;if(c===y)throw Error(e(476));if(c===m){if(e(595)===r)throw t;return{value:f,done:!0}}for(a[e(529)]=r,a[e(507)]=t;;){var n=a[e(542)];if(n){n=function r(t,e){var n=s,o=e[n(529)],i=t.iterator[o];if(i===f)return e[n(542)]=null,n(595)===o&&t.iterator.return&&(e[n(529)]=n(490),e[n(507)]=f,r(t,e),n(595)===e[n(529)])||"return"!==o&&(e[n(529)]=n(595),e.arg=new TypeError("The iterator does not provide a '"+o+n(513))),_;o=p(i,t[n(538)],e[n(507)]);if(n(595)===o.type)return e[n(529)]="throw",e[n(507)]=o[n(507)],e[n(542)]=null,_;i=o.arg;return i?i.done?(e[t[n(468)]]=i[n(574)],e.next=t[n(567)],"return"!==e[n(529)]&&(e[n(529)]=n(575),e[n(507)]=f),e.delegate=null,_):i:(e[n(529)]=n(595),e[n(507)]=new TypeError("iterator result is not an object"),e[n(542)]=null,_)}(n,a);if(n){if(n===_)continue;return n}}if(e(575)===a[e(529)])a[e(572)]=a[e(493)]=a[e(507)];else if(e(595)===a.method){if(c===v)throw c=m,a.arg;a.dispatchException(a[e(507)])}else e(490)===a[e(529)]&&a[e(557)]("return",a[e(507)]);c=y;n=p(o,i,a);if(e(491)===n.type){if(c=a.done?m:g,n[e(507)]===_)continue;return{value:n[e(507)],done:a.done}}e(595)===n.type&&(c=m,a[e(529)]=e(595),a.arg=n.arg)}})}),t}function p(r,t,e){var n=s;try{return{type:n(491),arg:r[n(585)](t,e)}}catch(r){return{type:"throw",arg:r}}}c[s(477)]=u;var v=s(459),g=s(516),y=s(594),m=s(597),_={};function b(){}function a(){}function d(){}var t={},x=(o(t,i,function(){return this}),Object[s(517)]),x=x&&x(x(L([]))),w=(x&&x!==r&&l[s(585)](x,i)&&(t=x),d.prototype=b[s(527)]=Object[s(587)](t));function j(r){[s(575),"throw","return"].forEach(function(t){o(r,t,function(r){return this[_0x2c72(501)](t,r)})})}function E(c,u){var t;h(this,"_invoke",{value:function(e,n){function r(){return new u(function(r,t){!function t(r,e,n,o){var i,a=_0x2c72,r=p(c[r],c,e);if(a(595)!==r.type)return(e=(i=r[a(507)])[a(574)])&&a(464)==_typeof(e)&&l[a(585)](e,a(528))?u[a(573)](e.__await)[a(470)](function(r){t(a(575),r,n,o)},function(r){t(a(595),r,n,o)}):u[a(573)](e)[a(470)](function(r){i[a(574)]=r,n(i)},function(r){return t(a(595),r,n,o)});o(r[a(507)])}(e,n,r,t)})}return t=t?t.then(r,r):r()}})}function k(r){var t=s,e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e[t(544)]=r[2],e[t(562)]=r[3]),this[t(495)][t(460)](e)}function G(r){var t=s,e=r.completion||{};e[t(524)]=t(491),delete e[t(507)],r.completion=e}function I(r){var t=s;this.tryEntries=[{tryLoc:t(530)}],r.forEach(k,this),this[t(482)](!0)}function L(e){var n=s;if(e||""===e){var o,r=e[i];if(r)return r[n(585)](e);if(n(532)==typeof e[n(575)])return e;if(!isNaN(e[n(558)]))return o=-1,(r=function r(){for(var t=n;++o<e[t(558)];)if(l[t(585)](e,o))return r.value=e[o],r[t(550)]=!1,r;return r[t(574)]=f,r[t(550)]=!0,r})[n(575)]=r}throw new TypeError(_typeof(e)+n(600))}return a.prototype=d,h(w,s(571),{value:d,configurable:!0}),h(d,s(571),{value:a,configurable:!0}),a[s(496)]=o(d,n,s(553)),c[s(551)]=function(r){var t=s,r="function"==typeof r&&r[t(571)];return!!r&&(r===a||"GeneratorFunction"===(r[t(496)]||r.name))},c[s(489)]=function(r){var t=s;return Object.setPrototypeOf?Object[t(563)](r,d):(r[t(522)]=d,o(r,n,t(553))),r[t(527)]=Object.create(w),r},c[s(596)]=function(r){return{__await:r}},j(E[s(527)]),o(E[s(527)],e,function(){return this}),c[s(578)]=E,c[s(463)]=function(r,t,e,n,o){var i=s,a=(void 0===o&&(o=Promise),new E(u(r,t,e,n),o));return c[i(551)](t)?a:a[i(575)]()[i(470)](function(r){var t=i;return r[t(550)]?r[t(574)]:a[t(575)]()})},j(w),o(w,n,s(548)),o(w,i,function(){return this}),o(w,s(554),function(){return s(499)}),c[s(466)]=function(r){var t,n=Object(r),o=[];for(t in n)o.push(t);return o.reverse(),function r(){for(var t=_0x2c72;o.length;){var e=o[t(561)]();if(e in n)return r.value=e,r[t(550)]=!1,r}return r[t(550)]=!0,r}},c.values=L,I.prototype={constructor:I,reset:function(r){var t=s;if(this[t(462)]=0,this[t(575)]=0,this[t(572)]=this[t(493)]=f,this[t(550)]=!1,this[t(542)]=null,this[t(529)]=t(575),this[t(507)]=f,this[t(495)].forEach(G),!r)for(var e in this)"t"===e[t(506)](0)&&l[t(585)](this,e)&&!isNaN(+e[t(577)](1))&&(this[e]=f)},stop:function(){var r=s,t=(this[r(550)]=!0,this[r(495)][0][r(568)]);if("throw"===t[r(524)])throw t[r(507)];return this[r(481)]},dispatchException:function(n){var r=s;if(this.done)throw n;var o=this;function t(r,t){var e=_0x2c72;return a.type=e(595),a[e(507)]=n,o[e(575)]=r,t&&(o.method=e(575),o[e(507)]=f),!!t}for(var e=this.tryEntries[r(558)]-1;0<=e;--e){var i=this.tryEntries[e],a=i.completion;if(r(530)===i.tryLoc)return t(r(546));if(i[r(560)]<=this.prev){var c=l[r(585)](i,r(576)),u=l[r(585)](i,r(544));if(c&&u){if(this.prev<i[r(576)])return t(i.catchLoc,!0);if(this[r(462)]<i.finallyLoc)return t(i[r(544)])}else if(c){if(this.prev<i[r(576)])return t(i[r(576)],!0)}else{if(!u)throw Error("try statement without catch or finally");if(this[r(462)]<i[r(544)])return t(i[r(544)])}}}},abrupt:function(r,t){for(var e=s,n=this[e(495)][e(558)]-1;0<=n;--n){var o=this[e(495)][n];if(o[e(560)]<=this[e(462)]&&l[e(585)](o,e(544))&&this[e(462)]<o.finallyLoc){var i=o;break}}var a=(i=i&&("break"===r||e(485)===r)&&i[e(560)]<=t&&t<=i[e(544)]?null:i)?i[e(568)]:{};return a.type=r,a[e(507)]=t,i?(this[e(529)]=e(575),this[e(575)]=i[e(544)],_):this.complete(a)},complete:function(r,t){var e=s;if(e(595)===r.type)throw r[e(507)];return e(484)===r[e(524)]||e(485)===r[e(524)]?this[e(575)]=r.arg:e(490)===r[e(524)]?(this.rval=this[e(507)]=r[e(507)],this[e(529)]=e(490),this.next=e(546)):e(491)===r[e(524)]&&t&&(this[e(575)]=t),_},finish:function(r){for(var t=s,e=this.tryEntries[t(558)]-1;0<=e;--e){var n=this.tryEntries[e];if(n[t(544)]===r)return this.complete(n.completion,n[t(562)]),G(n),_}},catch:function(r){for(var t=s,e=this[t(495)][t(558)]-1;0<=e;--e){var n,o,i=this[t(495)][e];if(i.tryLoc===r)return"throw"===(n=i[t(568)])[t(524)]&&(o=n[t(507)],G(i)),o}throw Error(t(569))},delegateYield:function(r,t,e){var n=s;return this.delegate={iterator:L(r),resultName:t,nextLoc:e},"next"===this[n(529)]&&(this.arg=f),_}},c}function asyncGeneratorStep(r,t,e,n,o,i,a){var c=_0x2c72;try{var u=r[i](a),s=u[c(574)]}catch(r){return void e(r)}u[c(550)]?t(s):Promise[c(573)](s)[c(470)](n,o)}function _asyncToGenerator(u){return function(){var r=this,c=arguments;return new Promise(function(t,e){var n=_0x2c72,o=u[n(521)](r,c);function i(r){asyncGeneratorStep(o,t,e,i,a,"next",r)}function a(r){asyncGeneratorStep(o,t,e,i,a,n(595),r)}i(void 0)})}}(()=>{for(var r=_0x2c72,t=_0x4bd4();;)try{if(701469==-parseInt(r(512))*(parseInt(r(458))/2)+-parseInt(r(509))/3*(parseInt(r(599))/4)+parseInt(r(586))/5*(parseInt(r(467))/6)+-parseInt(r(559))/7*(-parseInt(r(540))/8)+parseInt(r(488))/9+-parseInt(r(469))/10*(-parseInt(r(508))/11)+parseInt(r(518))/12*(-parseInt(r(539))/13))break;t.push(t.shift())}catch(r){t.push(t.shift())}})();var _require=require(_0x20b413(593)),watchExec=_require[_0x20b413(515)],log4js=require(_0x20b413(500)),logger=log4js.getLogger(_0x20b413(552));function _0x2c72(r,t){var e=_0x4bd4();return(_0x2c72=function(r,t){return e[r-=458]})(r,t)}function convert(r){return _convert.apply(this,arguments)}function _convert(){var r=_0x20b413;return(_convert=_asyncToGenerator(_regeneratorRuntime().mark(function r(t){var n,o,i=_0x2c72;return _regeneratorRuntime()[i(477)](function(r){for(var e=i;;)switch(r.prev=r[e(575)]){case 0:if(n=require(e(533)),global[e(525)]=!0,global[e(492)]=!0,process[e(519)][e(502)]=t.clear?e(541):"no",o=require(e(601)),o=o[e(580)],t[e(471)]&&(o(t[e(588)],t[e(598)]),process[e(536)](0)),n.checkInputPathFun(t[e(588)]),t[e(556)]){r[e(575)]=12;break}return r.next=10,n.confirmConverterFun({inputPath:t[e(588)],outPath:t[e(598)],confirmAddConfig:!0});case 10:(o=r.sent)[e(479)]?logger[e(498)]('"command":"'[e(590)](o[e(504)],e(535))[e(590)](o[e(479)],'"')):logger[e(566)](e(543)[e(590)](o[e(504)],e(497)).concat(o.folderUrl,'"'));case 12:setTimeout(function(){var t=e,r=require(t(579))[t(505)];try{r()}catch(r){logger[t(570)](t(531)[t(590)](r,"."))}});case 13:case"end":return r[e(503)]()}},r)})))[r(521)](this,arguments)}function compile(r,t){return _compile[_0x20b413(521)](this,arguments)}function _compile(){var t=_0x20b413;return(_compile=_asyncToGenerator(_regeneratorRuntime()[t(489)](function r(e,n){var o,i,a,c=t;return _regeneratorRuntime()[c(477)](function(r){for(var t=c;;)switch(r[t(462)]=r[t(575)]){case 0:return o=require("path"),process.env[t(537)]=o[t(573)](e),process[t(473)](o[t(573)](e,t(486))),process.env[t(510)]=n[t(545)]?t(520):t(534),process[t(519)][t(502)]=n[t(584)]?t(541):"no",process[t(519)][t(591)]=n[t(549)]?t(549):t(564),o=require(t(592)),r[t(462)]=7,i=require(t(526)),r[t(575)]=11,i();case 11:(i=r[t(572)]).plugins=i.plugins||[],i[t(478)].push(new o.EnvironmentPlugin({projectRoot:e})),n[t(555)]&&i[t(478)][t(460)](new o[t(483)]),n[t(565)]&&(i.watch=!0),global._ascfDebug&&(i[t(583)]={level:t(465)}),a=o(i),logger[t(566)](t(581)),n[t(565)]?(watchExec(a,n.run),r[t(575)]=25):r[t(575)]=23;break;case 23:return r[t(575)]=25,run(a);case 25:r[t(575)]=30;break;case 27:r[t(462)]=27,r.t0=r[t(511)](7),logger.fatal(r.t0);case 30:case t(546):return r.stop()}},r,null,[[7,27]])})))[t(521)](this,arguments)}function getAscfToolkitDirname(){return __dirname}function _0x4bd4(){var r=["543751OowoyG","1604728zXreUI","yes","delegate",'"command":"',"finallyLoc","mode","end","symbol","Generator","swc","done","isGeneratorFunction","index","GeneratorFunction","toString","progress","check","abrupt","length","21gKPqTX","tryLoc","pop","afterLoc","setPrototypeOf","babel","watch","info","nextLoc","completion","illegal catch attempt","warn","constructor","sent","resolve","value","next","catchLoc","slice","AsyncIterator","./common/version-check.js","pathValidator","Run compiler.","ASCF uncaught error","infrastructureLogging","clear","call","15055WIPUGl","create","input","ASCF unhandled rejection at:","concat","parser","webpack","./ascf-compiler/watch/watch","executing","throw","awrap","completed","output","136KuAUQG"," is not iterable","./ascf-converter/common/path-validator","469032rhUzAj","suspendedStart","push","run","prev","async","object","verbose","keys","594RJbfhX","resultName","1418290vZJjPp","then","validate","@@iterator","chdir","isLatestAscfHar","WARNING: Get @atomicservice/ascf info failed.","Generator is already running","wrap","plugins","errorMessage","asyncIterator","rval","reset","ProgressPlugin","break","continue","ascf/ascf_src","defineProperty","6943473mYgJbT","mark","return","normal","_isAscfMode","_sent","toStringTag","tryEntries","displayName",'","folderUrl":"',"error","[object Generator]","./common/log4js.js","_invoke","clearResource","stop","command","isLatestAscfToolkit","charAt","arg","11QfSKQL","17562GxqvYG","NODE_ENV","catch","3XKSoPS","' method","existsVerifyLog","watchExec","suspendedYield","getPrototypeOf","60LmDMve","env","development","apply","__proto__","reason:","type","_isMiniAppConvertMode","./ascf-compiler/web.webpack.config.js","prototype","__await","method","root","WARNING: Get @atomicservice/ascf-toolkit version failed: ","function","./ascf-converter/features/converter.js","production",'","errorMessage":"',"exit","projectRoot","iterator"];return(_0x4bd4=function(){return r})()}function run(r){return new Promise(function(e,o){var i=_0x2c72;r[i(461)](function(r,t){var n=i;t&&logger.info(t[n(554)]({all:!1,colors:!0,errors:!1,warnings:!1,assets:!0,logging:global._ascfDebug?n(465):n(566)})),r?(logger[n(498)](r),o(r)):(setTimeout(function(){var t=n,r=require(t(579)),e=r[t(505)],r=r[t(474)];try{r(global[t(514)])}catch(r){logger[t(570)](t(475))}try{e(global[t(514)])}catch(r){logger[t(570)]("WARNING: Get @atomicservice/ascf-toolkit version failed: ".concat(r,"."))}}),e(t))})})}global[_0x20b413(492)]=!0,process.on("uncaughtException",function(r){var t=_0x20b413;logger.error(t(582),r)}),process.on("unhandledRejection",function(r,t){var e=_0x20b413;logger[e(498)](e(589),t,e(523),r)}),module.exports={convert:convert,compile:compile,getAscfToolkitDirname:getAscfToolkitDirname};
|