@atomicservice/ascf-toolkit 1.0.0 → 1.0.1-beta.0
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/chalk/bundle.cjs.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/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 -0
- 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/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/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/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/logger-plugin.js +1 -1
- package/lib/common/remove-strict-mode-plugin.js +1 -1
- package/lib/common/utils.js +1 -1
- package/lib/index.d.ts +20 -0
- package/lib/index.js +1 -0
- package/package.json +2 -2
- package/lib/ascf-compiler/common/extjson-validator.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var _0x58d34f=_0x510f;function _typeof(t){var e=_0x510f;return(_typeof="function"==typeof Symbol&&e(309)==typeof Symbol.iterator?function(t){return typeof t}:function(t){var r=e;return t&&r(320)==typeof Symbol&&t[r(243)]===Symbol&&t!==Symbol[r(207)]?r(309):typeof t})(t)}function _regeneratorRuntime(){var f=_0x510f;_regeneratorRuntime=function(){return c};var s,c={},t=Object[f(207)],h=t.hasOwnProperty,m=Object[f(269)]||function(t,r,e){t[r]=e.value},r="function"==typeof Symbol?Symbol:{},i=r[f(211)]||f(186),e=r[f(245)]||f(292),n=r[f(288)]||f(239);function o(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{o({},"")}catch(t){o=function(t,r,e){return t[r]=e}}function u(t,r,e,n){var o,i,a,c,u=f,r=r&&r[u(207)]instanceof g?r:g,r=Object.create(r[u(207)]),u=new j(n||[]);return m(r,"_invoke",{value:(o=t,i=e,a=u,c=p,function(t,r){var e=_0x510f;if(c===_)throw Error("Generator is already running");if(c===d){if(e(206)===t)throw r;return{value:s,done:!0}}for(a[e(258)]=t,a.arg=r;;){var n=a[e(261)];if(n){n=function t(r,e){var n=f,o=e[n(258)],i=r[n(211)][o];if(i===s)return e[n(261)]=null,n(206)===o&&r[n(211)][n(325)]&&(e.method=n(325),e[n(254)]=s,t(r,e),n(206)===e[n(258)])||n(325)!==o&&(e[n(258)]="throw",e[n(254)]=new TypeError(n(300)+o+n(307))),y;o=l(i,r[n(211)],e[n(254)]);if(n(206)===o[n(278)])return e.method=n(206),e[n(254)]=o[n(254)],e.delegate=null,y;i=o[n(254)];return i?i[n(268)]?(e[r[n(271)]]=i.value,e[n(279)]=r[n(272)],n(325)!==e[n(258)]&&(e[n(258)]="next",e.arg=s),e.delegate=null,y):i:(e[n(258)]="throw",e[n(254)]=new TypeError(n(263)),e.delegate=null,y)}(n,a);if(n){if(n===y)continue;return n}}if(e(279)===a[e(258)])a[e(318)]=a._sent=a[e(254)];else if(e(206)===a[e(258)]){if(c===p)throw c=d,a.arg;a[e(299)](a.arg)}else e(325)===a[e(258)]&&a[e(198)](e(325),a.arg);c=_;n=l(o,i,a);if("normal"===n[e(278)]){if(c=a[e(268)]?d:v,n.arg===y)continue;return{value:n[e(254)],done:a.done}}"throw"===n[e(278)]&&(c=d,a.method="throw",a[e(254)]=n[e(254)])}})}),r}function l(t,r,e){var n=f;try{return{type:"normal",arg:t.call(r,e)}}catch(t){return{type:n(206),arg:t}}}c[f(301)]=u;var p=f(196),v=f(296),_=f(181),d="completed",y={};function g(){}function a(){}function x(){}var r={},b=(o(r,i,function(){return this}),Object[f(185)]),b=b&&b(b(O([]))),w=(b&&b!==t&&h.call(b,i)&&(r=b),x[f(207)]=g[f(207)]=Object[f(197)](r));function C(t){var r=f;["next",r(206),r(325)].forEach(function(r){o(t,r,function(t){return this[_0x510f(228)](r,t)})})}function P(c,u){var r;m(this,f(228),{value:function(e,n){function t(){return new u(function(t,r){!function r(t,e,n,o){var i,a=_0x510f,t=l(c[t],c,e);if("throw"!==t[a(278)])return(e=(i=t[a(254)]).value)&&a(221)==_typeof(e)&&h[a(280)](e,a(252))?u.resolve(e.__await)[a(249)](function(t){r(a(279),t,n,o)},function(t){r(a(206),t,n,o)}):u[a(262)](e)[a(249)](function(t){i.value=t,n(i)},function(t){return r("throw",t,n,o)});o(t.arg)}(e,n,t,r)})}return r=r?r.then(t,t):t()}})}function F(t){var r=f,e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e[r(306)]=t[2],e[r(294)]=t[3]),this.tryEntries[r(281)](e)}function S(t){var r=f,e=t[r(329)]||{};e[r(278)]=r(227),delete e[r(254)],t.completion=e}function j(t){var r=f;this.tryEntries=[{tryLoc:"root"}],t.forEach(F,this),this[r(276)](!0)}function O(e){var n=f;if(e||""===e){var o,t=e[i];if(t)return t[n(280)](e);if("function"==typeof e[n(279)])return e;if(!isNaN(e.length))return o=-1,(t=function t(){for(var r=n;++o<e[r(205)];)if(h.call(e,o))return t[r(220)]=e[o],t[r(268)]=!1,t;return t.value=s,t[r(268)]=!0,t})[n(279)]=t}throw new TypeError(_typeof(e)+n(202))}return a[f(207)]=x,m(w,f(243),{value:x,configurable:!0}),m(x,f(243),{value:a,configurable:!0}),a[f(187)]=o(x,n,f(247)),c[f(285)]=function(t){var r=f,t=r(320)==typeof t&&t[r(243)];return!!t&&(t===a||"GeneratorFunction"===(t[r(187)]||t[r(213)]))},c[f(304)]=function(t){var r=f;return Object[r(237)]?Object.setPrototypeOf(t,x):(t[r(216)]=x,o(t,n,r(247))),t[r(207)]=Object.create(w),t},c[f(222)]=function(t){return{__await:t}},C(P[f(207)]),o(P[f(207)],e,function(){return this}),c[f(234)]=P,c[f(260)]=function(t,r,e,n,o){var i=f,a=(void 0===o&&(o=Promise),new P(u(t,r,e,n),o));return c[i(285)](r)?a:a.next()[i(249)](function(t){var r=i;return t[r(268)]?t[r(220)]:a.next()})},C(w),o(w,n,f(225)),o(w,i,function(){return this}),o(w,f(328),function(){return"[object Generator]"}),c[f(224)]=function(t){var r,n=f,o=Object(t),i=[];for(r in o)i[n(281)](r);return i[n(251)](),function t(){for(var r=n;i[r(205)];){var e=i[r(209)]();if(e in o)return t[r(220)]=e,t[r(268)]=!1,t}return t[r(268)]=!0,t}},c[f(231)]=O,j[f(207)]={constructor:j,reset:function(t){var r=f;if(this.prev=0,this[r(279)]=0,this[r(318)]=this[r(248)]=s,this[r(268)]=!1,this[r(261)]=null,this[r(258)]="next",this[r(254)]=s,this[r(253)].forEach(S),!t)for(var e in this)"t"===e[r(289)](0)&&h[r(280)](this,e)&&!isNaN(+e[r(310)](1))&&(this[e]=s)},stop:function(){var t=f,r=(this[t(268)]=!0,this[t(253)][0].completion);if("throw"===r[t(278)])throw r.arg;return this[t(183)]},dispatchException:function(n){var o=f;if(this[o(268)])throw n;var i=this;function t(t,r){var e=o;return a[e(278)]="throw",a[e(254)]=n,i[e(279)]=t,r&&(i.method=e(279),i[e(254)]=s),!!r}for(var r=this[o(253)][o(205)]-1;0<=r;--r){var e=this[o(253)][r],a=e.completion;if(o(188)===e[o(195)])return t("end");if(e[o(195)]<=this.prev){var c=h[o(280)](e,o(266)),u=h.call(e,o(306));if(c&&u){if(this.prev<e.catchLoc)return t(e[o(266)],!0);if(this[o(210)]<e.finallyLoc)return t(e[o(306)])}else if(c){if(this.prev<e[o(266)])return t(e.catchLoc,!0)}else{if(!u)throw Error(o(273));if(this[o(210)]<e[o(306)])return t(e[o(306)])}}}},abrupt:function(t,r){for(var e=f,n=this[e(253)].length-1;0<=n;--n){var o=this[e(253)][n];if(o[e(195)]<=this[e(210)]&&h[e(280)](o,"finallyLoc")&&this[e(210)]<o[e(306)]){var i=o;break}}var a=(i=i&&(e(313)===t||e(240)===t)&&i[e(195)]<=r&&r<=i[e(306)]?null:i)?i.completion:{};return a[e(278)]=t,a[e(254)]=r,i?(this[e(258)]=e(279),this.next=i[e(306)],y):this[e(327)](a)},complete:function(t,r){var e=f;if(e(206)===t.type)throw t[e(254)];return"break"===t[e(278)]||"continue"===t[e(278)]?this[e(279)]=t[e(254)]:e(325)===t[e(278)]?(this.rval=this[e(254)]=t.arg,this.method=e(325),this[e(279)]=e(274)):e(227)===t.type&&r&&(this[e(279)]=r),y},finish:function(t){for(var r=f,e=this[r(253)].length-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this[r(327)](n[r(329)],n[r(294)]),S(n),y}},catch:function(t){for(var r=f,e=this[r(253)].length-1;0<=e;--e){var n,o,i=this[r(253)][e];if(i.tryLoc===t)return n=i[r(329)],r(206)===n.type&&(o=n[r(254)],S(i)),o}throw Error(r(308))},delegateYield:function(t,r,e){var n=f;return this[n(261)]={iterator:O(t),resultName:r,nextLoc:e},n(279)===this[n(258)]&&(this[n(254)]=s),y}},c}function _0x510f(t,r){var e=_0xd620();return(_0x510f=function(t,r){return e[t-=181]})(t,r)}function asyncGeneratorStep(t,r,e,n,o,i,a){var c=_0x510f;try{var u=t[i](a),f=u[c(220)]}catch(t){return void e(t)}u[c(268)]?r(f):Promise[c(262)](f)[c(249)](n,o)}function _asyncToGenerator(u){return function(){var t=this,c=arguments;return new Promise(function(r,e){var n=_0x510f,o=u[n(257)](t,c);function i(t){asyncGeneratorStep(o,r,e,i,a,n(279),t)}function a(t){asyncGeneratorStep(o,r,e,i,a,n(206),t)}i(void 0)})}}(()=>{for(var t=_0x510f,r=_0xd620();;)try{if(674932==+parseInt(t(267))*(-parseInt(t(199))/2)+-parseInt(t(295))/3+parseInt(t(315))/4+-parseInt(t(265))/5+parseInt(t(229))/6*(parseInt(t(242))/7)+-parseInt(t(223))/8+-parseInt(t(286))/9*(-parseInt(t(230))/10))break;r.push(r.shift())}catch(t){r.push(r.shift())}})(),Object[_0x58d34f(269)](exports,_0x58d34f(302),{value:!0}),exports[_0x58d34f(235)]=exports[_0x58d34f(305)]=exports[_0x58d34f(256)]=void 0;var commonConfig_1=require("../common/commonConfig"),path=require(_0x58d34f(290)),fs=require("fs"),commonUtils_1=require(_0x58d34f(311)),_require=require(_0x58d34f(189)),clearResource=_require.clearResource;function confirmConverterFun(t,r){return _confirmConverterFun[_0x58d34f(257)](this,arguments)}function _confirmConverterFun(){var r=_0x58d34f;return(_confirmConverterFun=_asyncToGenerator(_regeneratorRuntime()[r(304)](function t(e,n){var o,i,a=r;return _regeneratorRuntime()[a(301)](function(t){for(var r=a;;)switch(t.prev=t[r(279)]){case 0:if(t[r(210)]=0,o=path[r(262)](e[r(244)],r(208)),i=path[r(262)](e[r(244)],r(238)),fs[r(203)](i)||!fs[r(203)](o)||e[r(255)]){t.next=7;break}return t.abrupt(r(325),{command:r(303)});case 7:return t.next=9,doConvert(e,n);case 9:return t[r(198)](r(325),t[r(318)]);case 10:t[r(279)]=16;break;case 12:return t.prev=12,t.t0=t[r(316)](0),console.error(t.t0),t[r(198)](r(325),{command:"failedTransform",errorMessage:t.t0[r(201)]});case 16:case r(274):return t[r(214)]()}},t,null,[[0,12]])})))[r(257)](this,arguments)}function confirmConverterH5Fun(t,r){var e=_0x58d34f,n=path[e(215)](t[e(204)],t[e(298)]);try{return commonUtils_1.createDirs(n,e(326),!0),commonUtils_1[e(297)](path[e(215)](__filename,e(312),e(326)),path[e(215)](n,e(326)),!1,!0),commonUtils_1.handleConfigInfo(t,path[e(215)](n,e(326))),{command:e(283)}}catch(t){return console[e(330)](t),{command:e(317),errorMessage:t.message}}}function checkConvertOutput(t,r){var e=_0x58d34f;if(fs[e(203)](r))throw new Error("Output path ".concat(r,e(217)));if(r[e(192)](t))throw new Error("Output path is error, cannot be in the input directory .")}function doConvert(t,r){return _doConvert.apply(this,arguments)}function _doConvert(){return(_doConvert=_asyncToGenerator(_regeneratorRuntime().mark(function t(e,r){var n,o,i,a=_0x510f;return _regeneratorRuntime()[a(301)](function(t){for(var r=a;;)switch(t.prev=t.next){case 0:if(n=path[r(262)](e[r(204)],r(246)),process[r(233)][r(324)]===r(319))return t[r(279)]=4,clearResource([n]);t[r(279)]=4;break;case 4:return checkConvertOutput(e[r(244)],n),o=commonConfig_1[r(284)][r(200)],t[r(210)]=6,commonUtils_1.createDirs(n,o),commonUtils_1[r(184)](n,e[r(244)]),i=path[r(215)](n,o),"./"===o||""===o?(commonUtils_1[r(291)](e[r(244)],i),commonUtils_1[r(297)](e[r(244)],i)):(commonUtils_1[r(291)](path[r(215)](e.inputPath,o),i),commonUtils_1[r(297)](path[r(215)](e[r(244)],o),i),commonUtils_1[r(321)](path[r(215)](e[r(244)]),n)),commonUtils_1[r(194)](),commonUtils_1[r(314)](path[r(215)](n,o),e),commonUtils_1[r(241)](path[r(215)](n,o),e),commonUtils_1[r(264)](path[r(215)](n)),"my"===commonConfig_1[r(284)][r(218)]&&commonUtils_1[r(236)](n,path[r(215)](__filename,r(270))),t.abrupt("return",{command:r(283),folderUrl:n});case 19:return t.prev=19,t.t0=t.catch(6),console[r(330)](t.t0),removePromise(n)[r(322)](),t[r(198)](r(325),{command:r(317),errorMessage:t.t0[r(201)]});case 24:case r(274):return t[r(214)]()}},t,null,[[6,19]])}))).apply(this,arguments)}function removePromise(i){return new Promise(function(o,t){var e=_0x510f;fs[e(250)](i,function(t,r){var n=e;r[n(293)]()?fs[n(190)](i,function(t,r){var e=n,r=(r=r[e(277)](function(t){return path[e(215)](i,t)}))[e(277)](function(t){return removePromise(t)});Promise[e(282)](r)[e(249)](function(){fs[e(232)](i,o)})}):fs[n(323)](i,o)})})}function checkInputPathFun(t){var r=_0x58d34f,t=path[r(262)](t),e=checkMiniProgram(t);return{command:r(275),data:{returnCode:e,outPath:path.dirname(t)}}}function checkMiniProgram(t){var r=_0x58d34f,e=!0,n=path.join(t,r(208));return e=fs[r(203)](n)&&identifyProgram(t)?e:!1}function _0xd620(){var t=["catchLoc","366353bSPxqq","done","defineProperty","../../","resultName","nextLoc","try statement without catch or finally","end","postInputPath","reset","map","type","next","call","push","all","completeTransform","Applets","isGeneratorFunction","599607MDoLQK","miniprogramRoot","toStringTag","charAt","path","setOriginPtahObject","@@asyncIterator","isDirectory","afterLoc","4035504rJSCNP","suspendedYield","copyDir","packageName","dispatchException","The iterator does not provide a '","wrap","__esModule","notifyConfig","mark","confirmConverterH5Fun","finallyLoc","' method","illegal catch attempt","symbol","slice","../common/commonUtils","../lib","break","appJsonFile","1063620ZRILjF","catch","failedTransform","sent","yes","function","copyConfigFiles","finally","unlink","clearResource","return","src","complete","toString","completion","error","executing","readFileSync","rval","createTransformReportFile","getPrototypeOf","@@iterator","displayName","root","../../common/utils","readdir","pages","startsWith","configBasenameArray","transformNodeModuleComponent","tryLoc","suspendedStart","create","abrupt","2lpnvzm","srcRootPath","message"," is not iterable","existsSync","outPath","length","throw","prototype","app.json","pop","prev","iterator","hxml","name","stop","join","__proto__"," is exists. Use the -c parameter to clear.","appletType","smartProgramRoot","value","object","awrap","4636504vsoVoq","keys","Generator","isArray","normal","_invoke","4844406sgshZh","330AqBrfR","values","rmdir","env","AsyncIterator","checkInputPathFun","adaptApiFile","setPrototypeOf","project.config.json","@@toStringTag","continue","extJsonFile","7eYEmpI","constructor","inputPath","asyncIterator","ascf/ascf_src","GeneratorFunction","_sent","then","stat","reverse","__await","tryEntries","arg","confirmAddConfig","confirmConverterFun","apply","method","parse","async","delegate","resolve","iterator result is not an object","projectConfigFile","1529245Qiwhwu"];return(_0xd620=function(){return t})()}function identifyProgram(t){var r=_0x58d34f;try{var e=path[r(215)](t,r(208)),n=JSON[r(259)](fs.readFileSync(e).toString());if(n&&n[r(191)]&&Array[r(226)](n[r(191)])&&0<n.pages.length)for(var o=getSrcRootPath(t),i=0,a=Object[r(224)](commonConfig_1.projectFileSuffix);i<a[r(205)];i++){var c=a[i],u=path[r(215)](t,o,n[r(191)][0]+commonConfig_1.projectFileSuffix[c][r(212)]);if(fs[r(203)](u))return commonConfig_1[r(284)][r(218)]="wx"===c?"tt":c,!0}return!1}catch(t){return!1}}function getSrcRootPath(t){var r=_0x58d34f;commonConfig_1[r(284)][r(200)]="./";for(var e=0;e<commonConfig_1.configBasenameArray[r(205)];e++){var n=commonConfig_1[r(193)][e],n=path[r(215)](t,n);fs[r(203)](n)&&((n=JSON[r(259)](fs[r(182)](n)[r(328)]()))[r(287)]?commonConfig_1[r(284)][r(200)]=n[r(287)]:n[r(219)]?commonConfig_1.Applets[r(200)]=n.smartProgramRoot:commonConfig_1.Applets[r(200)]="./")}return commonConfig_1[r(284)][r(200)]}exports.confirmConverterFun=confirmConverterFun,exports.confirmConverterH5Fun=confirmConverterH5Fun,exports.checkInputPathFun=checkInputPathFun;
|
|
1
|
+
var _0x12e1f6=_0x365e;function _typeof(t){var e=_0x365e;return(_typeof=e(576)==typeof Symbol&&e(480)==typeof Symbol.iterator?function(t){return typeof t}:function(t){var r=e;return t&&r(576)==typeof Symbol&&t[r(545)]===Symbol&&t!==Symbol.prototype?r(480):typeof t})(t)}function _regeneratorRuntime(){var s=_0x365e;_regeneratorRuntime=function(){return c};var f,c={},t=Object[s(527)],p=t[s(509)],h=Object[s(568)]||function(t,r,e){var n=s;t[r]=e[n(467)]},r=s(576)==typeof Symbol?Symbol:{},i=r[s(559)]||s(464),e=r[s(438)]||"@@asyncIterator",n=r[s(488)]||s(436);function o(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{o({},"")}catch(t){o=function(t,r,e){return t[r]=e}}function u(t,r,e,n){var o,i,a,c,u=s,r=r&&r.prototype instanceof d?r:d,r=Object[u(551)](r[u(527)]),n=new S(n||[]);return h(r,u(498),{value:(o=t,i=e,a=n,c=l,function(t,r){var e=_0x365e;if(c===_)throw Error(e(546));if(c===y){if(e(460)===t)throw r;return{value:f,done:!0}}for(a[e(447)]=t,a[e(561)]=r;;){var n=a[e(446)];if(n){n=function t(r,e){var n=s,o=e[n(447)],i=r[n(559)][o];if(i===f)return e[n(446)]=null,n(460)===o&&r[n(559)][n(461)]&&(e[n(447)]=n(461),e[n(561)]=f,t(r,e),n(460)===e[n(447)])||n(461)!==o&&(e[n(447)]=n(460),e[n(561)]=new TypeError(n(478)+o+n(558))),g;o=m(i,r.iterator,e.arg);if(n(460)===o.type)return e[n(447)]="throw",e[n(561)]=o.arg,e[n(446)]=null,g;i=o[n(561)];return i?i[n(449)]?(e[r.resultName]=i[n(467)],e[n(468)]=r[n(571)],n(461)!==e[n(447)]&&(e[n(447)]="next",e[n(561)]=f),e[n(446)]=null,g):i:(e.method=n(460),e[n(561)]=new TypeError(n(510)),e[n(446)]=null,g)}(n,a);if(n){if(n===g)continue;return n}}if(e(468)===a[e(447)])a.sent=a[e(532)]=a[e(561)];else if(e(460)===a[e(447)]){if(c===l)throw c=y,a[e(561)];a.dispatchException(a[e(561)])}else e(461)===a[e(447)]&&a.abrupt("return",a.arg);c=_;n=m(o,i,a);if(e(505)===n[e(548)]){if(c=a[e(449)]?y:v,n[e(561)]===g)continue;return{value:n[e(561)],done:a.done}}e(460)===n[e(548)]&&(c=y,a.method=e(460),a.arg=n[e(561)])}})}),r}function m(t,r,e){var n=s;try{return{type:n(505),arg:t[n(450)](r,e)}}catch(t){return{type:n(460),arg:t}}}c[s(493)]=u;var l=s(550),v=s(481),_=s(489),y=s(453),g={};function d(){}function a(){}function x(){}var r={},b=(o(r,i,function(){return this}),Object[s(519)]),b=b&&b(b(F([]))),C=(b&&b!==t&&p[s(450)](b,i)&&(r=b),x[s(527)]=d[s(527)]=Object.create(r));function w(t){var r=s;[r(468),"throw",r(461)][r(540)](function(r){o(t,r,function(t){return this[_0x365e(498)](r,t)})})}function P(c,u){var r;h(this,s(498),{value:function(e,n){function t(){return new u(function(t,r){!function r(t,e,n,o){var i,a=_0x365e,t=m(c[t],c,e);if(a(460)!==t[a(548)])return(e=(i=t[a(561)]).value)&&a(471)==_typeof(e)&&p[a(450)](e,a(439))?u[a(466)](e[a(439)])[a(465)](function(t){r(a(468),t,n,o)},function(t){r(a(460),t,n,o)}):u[a(466)](e).then(function(t){i[a(467)]=t,n(i)},function(t){return r(a(460),t,n,o)});o(t[a(561)])}(e,n,t,r)})}return r=r?r.then(t,t):t()}})}function j(t){var r=s,e={tryLoc:t[0]};1 in t&&(e[r(560)]=t[1]),2 in t&&(e[r(443)]=t[2],e[r(497)]=t[3]),this.tryEntries.push(e)}function O(t){var r=s,e=t[r(514)]||{};e[r(548)]=r(505),delete e.arg,t[r(514)]=e}function S(t){var r=s;this[r(482)]=[{tryLoc:r(569)}],t[r(540)](j,this),this.reset(!0)}function F(e){var n=s;if(e||""===e){var o,t=e[i];if(t)return t[n(450)](e);if(n(576)==typeof e[n(468)])return e;if(!isNaN(e[n(544)]))return o=-1,(t=function t(){for(var r=n;++o<e[r(544)];)if(p.call(e,o))return t[r(467)]=e[o],t[r(449)]=!1,t;return t.value=f,t.done=!0,t}).next=t}throw new TypeError(_typeof(e)+n(579))}return a[s(527)]=x,h(C,s(545),{value:x,configurable:!0}),h(x,s(545),{value:a,configurable:!0}),a[s(525)]=o(x,n,s(459)),c[s(564)]=function(t){var r=s,t=r(576)==typeof t&&t.constructor;return!!t&&(t===a||r(459)===(t.displayName||t[r(475)]))},c[s(516)]=function(t){var r=s;return Object.setPrototypeOf?Object[r(587)](t,x):(t[r(463)]=x,o(t,n,"GeneratorFunction")),t[r(527)]=Object[r(551)](C),t},c[s(501)]=function(t){return{__await:t}},w(P.prototype),o(P[s(527)],e,function(){return this}),c[s(542)]=P,c.async=function(t,r,e,n,o){var i=s,a=(void 0===o&&(o=Promise),new P(u(t,r,e,n),o));return c[i(564)](r)?a:a[i(468)]().then(function(t){var r=i;return t[r(449)]?t[r(467)]:a[r(468)]()})},w(C),o(C,n,s(477)),o(C,i,function(){return this}),o(C,s(547),function(){return s(511)}),c[s(583)]=function(t){var r,n=s,o=Object(t),i=[];for(r in o)i[n(565)](r);return i[n(572)](),function t(){for(var r=n;i[r(544)];){var e=i[r(507)]();if(e in o)return t[r(467)]=e,t[r(449)]=!1,t}return t[r(449)]=!0,t}},c[s(570)]=F,S[s(527)]={constructor:S,reset:function(t){var r=s;if(this[r(484)]=0,this[r(468)]=0,this[r(581)]=this[r(532)]=f,this[r(449)]=!1,this.delegate=null,this[r(447)]="next",this[r(561)]=f,this[r(482)].forEach(O),!t)for(var e in this)"t"===e[r(534)](0)&&p.call(this,e)&&!isNaN(+e[r(513)](1))&&(this[e]=f)},stop:function(){var t=s,r=(this[t(449)]=!0,this[t(482)][0][t(514)]);if(t(460)===r[t(548)])throw r[t(561)];return this[t(500)]},dispatchException:function(n){var o=s;if(this[o(449)])throw n;var i=this;function t(t,r){var e=o;return a[e(548)]="throw",a[e(561)]=n,i[e(468)]=t,r&&(i.method="next",i[e(561)]=f),!!r}for(var r=this[o(482)][o(544)]-1;0<=r;--r){var e=this[o(482)][r],a=e[o(514)];if(o(569)===e.tryLoc)return t("end");if(e.tryLoc<=this[o(484)]){var c=p[o(450)](e,"catchLoc"),u=p[o(450)](e,o(443));if(c&&u){if(this.prev<e[o(560)])return t(e.catchLoc,!0);if(this[o(484)]<e[o(443)])return t(e[o(443)])}else if(c){if(this[o(484)]<e[o(560)])return t(e[o(560)],!0)}else{if(!u)throw Error(o(585));if(this[o(484)]<e[o(443)])return t(e[o(443)])}}}},abrupt:function(t,r){for(var e=s,n=this[e(482)][e(544)]-1;0<=n;--n){var o=this[e(482)][n];if(o[e(483)]<=this[e(484)]&&p.call(o,e(443))&&this[e(484)]<o[e(443)]){var i=o;break}}var a=(i=i&&(e(508)===t||e(440)===t)&&i.tryLoc<=r&&r<=i[e(443)]?null:i)?i[e(514)]:{};return a.type=t,a[e(561)]=r,i?(this[e(447)]=e(468),this[e(468)]=i[e(443)],g):this[e(578)](a)},complete:function(t,r){var e=s;if(e(460)===t[e(548)])throw t.arg;return e(508)===t[e(548)]||e(440)===t[e(548)]?this.next=t[e(561)]:"return"===t[e(548)]?(this[e(500)]=this[e(561)]=t[e(561)],this[e(447)]="return",this[e(468)]=e(536)):e(505)===t[e(548)]&&r&&(this.next=r),g},finish:function(t){for(var r=s,e=this[r(482)][r(544)]-1;0<=e;--e){var n=this[r(482)][e];if(n.finallyLoc===t)return this[r(578)](n[r(514)],n[r(497)]),O(n),g}},catch:function(t){for(var r=s,e=this.tryEntries.length-1;0<=e;--e){var n,o,i=this[r(482)][e];if(i[r(483)]===t)return n=i[r(514)],r(460)===n[r(548)]&&(o=n.arg,O(i)),o}throw Error(r(531))},delegateYield:function(t,r,e){var n=s;return this.delegate={iterator:F(t),resultName:r,nextLoc:e},"next"===this.method&&(this[n(561)]=f),g}},c}function asyncGeneratorStep(t,r,e,n,o,i,a){var c=_0x365e;try{var u=t[i](a),s=u[c(467)]}catch(t){return void e(t)}u[c(449)]?r(s):Promise[c(466)](s)[c(465)](n,o)}function _asyncToGenerator(u){return function(){var t=this,c=arguments;return new Promise(function(r,e){var n=_0x365e,o=u[n(582)](t,c);function i(t){asyncGeneratorStep(o,r,e,i,a,n(468),t)}function a(t){asyncGeneratorStep(o,r,e,i,a,n(460),t)}i(void 0)})}}(()=>{for(var t=_0x365e,r=_0x5183();;)try{if(561863==-parseInt(t(496))+-parseInt(t(521))/2*(-parseInt(t(476))/3)+parseInt(t(538))/4*(-parseInt(t(589))/5)+-parseInt(t(441))/6*(-parseInt(t(448))/7)+parseInt(t(555))/8*(-parseInt(t(530))/9)+parseInt(t(479))/10+parseInt(t(445))/11*(-parseInt(t(524))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}})(),Object[_0x12e1f6(568)](exports,"__esModule",{value:!0}),exports[_0x12e1f6(437)]=exports[_0x12e1f6(567)]=exports[_0x12e1f6(584)]=void 0;var commonConfig_1=require(_0x12e1f6(580)),path=require(_0x12e1f6(494)),fs=require("fs"),commonUtils_1=require(_0x12e1f6(491)),_require=require(_0x12e1f6(492)),clearResource=_require[_0x12e1f6(517)];function confirmConverterFun(t,r){return _confirmConverterFun[_0x12e1f6(582)](this,arguments)}function _confirmConverterFun(){var t=_0x12e1f6;return(_confirmConverterFun=_asyncToGenerator(_regeneratorRuntime().mark(function t(e,n){var o,i;return _regeneratorRuntime().wrap(function(t){for(var r=_0x365e;;)switch(t[r(484)]=t[r(468)]){case 0:if(t.prev=0,o=path[r(466)](e[r(456)],r(557)),i=path[r(466)](e[r(456)],r(454)),fs[r(529)](i)||!fs.existsSync(o)||e[r(469)]){t[r(468)]=7;break}return t[r(473)]("return",{command:r(586)});case 7:return t.next=9,doConvert(e,n);case 9:return t[r(473)](r(461),t[r(581)]);case 10:t[r(468)]=16;break;case 12:return t[r(484)]=12,t.t0=t[r(533)](0),console[r(457)](t.t0),t[r(473)]("return",{command:r(566),errorMessage:t.t0[r(573)]});case 16:case"end":return t[r(552)]()}},t,null,[[0,12]])})))[t(582)](this,arguments)}function confirmConverterH5Fun(t,r){var e=_0x12e1f6,n=path[e(486)](t.outPath,t[e(537)]);try{return commonUtils_1[e(506)](n,"src",!0),commonUtils_1.copyDir(path[e(486)](__filename,e(577),e(535)),path[e(486)](n,e(535)),!1,!0),commonUtils_1[e(502)](t,path[e(486)](n,e(535))),{command:e(528)}}catch(t){return console[e(457)](t),{command:e(566),errorMessage:t.message}}}function checkConvertOutput(t,r){var e=_0x12e1f6,t=path.resolve(t),r=path.resolve(r);if(fs[e(529)](r))throw new Error(e(562)[e(554)](r,e(455)));if(r[e(458)](t+path[e(485)]))throw new Error(e(499))}function doConvert(t,r){return _doConvert[_0x12e1f6(582)](this,arguments)}function _doConvert(){var t=_0x12e1f6;return(_doConvert=_asyncToGenerator(_regeneratorRuntime()[t(516)](function t(e,r){var n,o,i;return _regeneratorRuntime().wrap(function(t){for(var r=_0x365e;;)switch(t[r(484)]=t[r(468)]){case 0:if(n=path[r(466)](e[r(520)],r(574)),process[r(575)][r(517)]===r(470))return t[r(468)]=4,clearResource([n]);t.next=4;break;case 4:return checkConvertOutput(e.inputPath,n),o=commonConfig_1.Applets[r(523)],t[r(484)]=6,commonUtils_1[r(506)](n,o),commonUtils_1[r(543)](n,e[r(456)]),i=path.join(n,o),"./"===o||""===o?(commonUtils_1.setOriginPtahObject(e.inputPath,i),commonUtils_1[r(541)](e[r(456)],i)):(commonUtils_1.setOriginPtahObject(path.join(e[r(456)],o),i),commonUtils_1.copyDir(path[r(486)](e[r(456)],o),i),commonUtils_1.copyConfigFiles(path[r(486)](e[r(456)]),n)),commonUtils_1[r(451)](),commonUtils_1[r(504)](path[r(486)](n,o),e),commonUtils_1[r(472)](path[r(486)](n)),"my"===commonConfig_1[r(522)][r(462)]&&commonUtils_1[r(495)](n,path.join(__filename,r(563))),t.abrupt(r(461),{command:r(528),folderUrl:n});case 18:return t.prev=18,t.t0=t[r(533)](6),console[r(457)](t.t0),removePromise(n)[r(487)](),t[r(473)]("return",{command:"failedTransform",errorMessage:t.t0[r(573)]});case 23:case r(536):return t[r(552)]()}},t,null,[[6,18]])})))[t(582)](this,arguments)}function _0x365e(t,r){var e=_0x5183();return(_0x365e=function(t,r){return e[t-=436]})(t,r)}function removePromise(i){return new Promise(function(o,t){fs.stat(i,function(t,r){var n=_0x365e;r.isDirectory()?fs[n(556)](i,function(t,r){var e=n,r=(r=r[e(553)](function(t){return path[e(486)](i,t)}))[e(553)](function(t){return removePromise(t)});Promise[e(452)](r)[e(465)](function(){fs[e(539)](i,o)})}):fs[n(503)](i,o)})})}function checkInputPathFun(t){var r=_0x12e1f6,t=path.resolve(t),e=checkMiniProgram(t);return{command:r(588),data:{returnCode:e,outPath:path.dirname(t)}}}function checkMiniProgram(t){var r=_0x12e1f6,e=!0,n=path[r(486)](t,"app.json");return e=fs[r(529)](n)&&identifyProgram(t)?e:!1}function identifyProgram(t){var r=_0x12e1f6;try{var e=path[r(486)](t,r(557)),n=JSON[r(515)](fs[r(474)](e).toString());if(n&&n[r(444)]&&Array[r(512)](n[r(444)])&&0<n.pages[r(544)])for(var o=getSrcRootPath(t),i=0,a=Object.keys(commonConfig_1[r(526)]);i<a[r(544)];i++){var c=a[i],u=path[r(486)](t,o,n.pages[0]+commonConfig_1.projectFileSuffix[c][r(442)]);if(fs.existsSync(u))return"wx"===c?commonConfig_1.Applets.appletType="tt":commonConfig_1[r(522)][r(462)]=c,!0}return!1}catch(t){return!1}}function _0x5183(){var t=["app.json","' method","iterator","catchLoc","arg","Output path ","../../","isGeneratorFunction","push","failedTransform","confirmConverterH5Fun","defineProperty","root","values","nextLoc","reverse","message","ascf/ascf_src","env","function","../lib","complete"," is not iterable","../common/commonConfig","sent","apply","keys","confirmConverterFun","try statement without catch or finally","notifyConfig","setPrototypeOf","postInputPath","1644025JVJInp","@@toStringTag","checkInputPathFun","asyncIterator","__await","continue","6syBRYv","hxml","finallyLoc","pages","1254KsFYED","delegate","method","273021OzqMlU","done","call","transformNodeModuleComponent","all","completed","project.config.json"," is exists. Use the -c parameter to clear.","inputPath","error","startsWith","GeneratorFunction","throw","return","appletType","__proto__","@@iterator","then","resolve","value","next","confirmAddConfig","yes","object","projectConfigFile","abrupt","readFileSync","name","282clNAju","Generator","The iterator does not provide a '","10670930WwzCBi","symbol","suspendedYield","tryEntries","tryLoc","prev","sep","join","finally","toStringTag","executing","configBasenameArray","../common/commonUtils","../../common/utils","wrap","path","adaptApiFile","832754ymOBmS","afterLoc","_invoke","Output directory cannot be a subdirectory of the input directory.","rval","awrap","handleConfigInfo","unlink","appJsonFile","normal","createDirs","pop","break","hasOwnProperty","iterator result is not an object","[object Generator]","isArray","slice","completion","parse","mark","clearResource","miniprogramRoot","getPrototypeOf","outPath","20426ZCiYXz","Applets","srcRootPath","20004wOVuVX","displayName","projectFileSuffix","prototype","completeTransform","existsSync","41634ogzPIj","illegal catch attempt","_sent","catch","charAt","src","end","packageName","4VjeZDi","rmdir","forEach","copyDir","AsyncIterator","createTransformReportFile","length","constructor","Generator is already running","toString","type","smartProgramRoot","suspendedStart","create","stop","map","concat","264XJEIlH","readdir"];return(_0x5183=function(){return t})()}function getSrcRootPath(t){var r=_0x12e1f6;commonConfig_1.Applets[r(523)]="./";for(var e=0;e<commonConfig_1[r(490)][r(544)];e++){var n=commonConfig_1[r(490)][e],n=path[r(486)](t,n);fs[r(529)](n)&&((n=JSON[r(515)](fs[r(474)](n).toString())).miniprogramRoot?commonConfig_1[r(522)].srcRootPath=n[r(518)]:n.smartProgramRoot?commonConfig_1[r(522)][r(523)]=n[r(549)]:commonConfig_1[r(522)][r(523)]="./")}return commonConfig_1[r(522)][r(523)]}exports[_0x12e1f6(584)]=confirmConverterFun,exports[_0x12e1f6(567)]=confirmConverterH5Fun,exports.checkInputPathFun=checkInputPathFun;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x1b0d14=_0x556f;function _0xdf85(){var t=["wxssParser","character","interfacesForTransform","endOffset","startsWith","transformWxsFilePath","../","getText","15058098RIICgU","handleWxmlFile","handleWxssImport","7934022ffkYLU","import","wxInterface","css","3052024jikVOR","start","filePath","forEach","type","./transformReport","../common/commonConfig","mixins","line","startOffset","notSupport","../features/fileHandle","has:","projectFileSuffix","module","../parse/wxssParser","indexOf","length","path","wxSchema","uri","245664HmHnZJ","has","transformJsPath","extname","behaviors","existsSync",".css","5SIfyml","../common/textDocument","transformJsFile","4419kjStea",' {"line":',"substring","hxml","parseFragment","hjs","api ","setLanguage","join","invalidApis","../common/commonUtils","../parse/importVisitor","9020053nIVTdw"," TODO\n","offsetAt",',"column":',"property","concat","478ynwIkR","5837808YSOAdx","moduleRange","replacepos","insertStr","serialize"];return(_0xdf85=function(){return t})()}(()=>{for(var t=_0x556f,e=_0xdf85();;)try{if(731786==+parseInt(t(350))+-parseInt(t(308))/2*(-parseInt(t(290))/3)+parseInt(t(309))/4*(parseInt(t(357))/5)+-parseInt(t(325))/6+parseInt(t(302))/7+parseInt(t(329))/8+-parseInt(t(322))/9)break;e.push(e.shift())}catch(t){e.push(e.shift())}})(),Object.defineProperty(exports,"__esModule",{value:!0}),exports[_0x1b0d14(352)]=exports[_0x1b0d14(289)]=exports[_0x1b0d14(319)]=exports[_0x1b0d14(323)]=exports[_0x1b0d14(324)]=void 0;var globalDistanceCount,globalJsLine,path=require(_0x1b0d14(347)),fs=require("fs"),_require=require(_0x1b0d14(288)),create=_require.create,fileHandle_1=require(_0x1b0d14(340)),commonConfig_1=require(_0x1b0d14(335)),commonUtils_1=require(_0x1b0d14(300)),importVisitor_1=require(_0x1b0d14(301)),wxssParser_1=require(_0x1b0d14(344)),commonConfig_2=require(_0x1b0d14(335)),TransformReport=require(_0x1b0d14(334)),parse5=require("../compiler-utils/parse5.bundle"),insertedApiObj={},insertedApiCountObj={},DEST_API_NAME=_0x1b0d14(351),DEST_API_LEN=DEST_API_NAME[_0x1b0d14(346)];function handleWxssImport(t,r,n){var o=_0x1b0d14,a=commonConfig_1.projectFileSuffix[n],t=create(t,r),t=(r=t[o(321)](),wxssParser_1[o(314)](r,t,a[o(328)],n)),s=0;return t[o(332)](function(t){var e=o;t[e(333)]===e(326)?(r=commonUtils_1[e(311)](r,t.endOffset-a[e(328)][e(346)]-s,t[e(317)]-s,e(356)),s+=a[e(328)][e(346)]-4):(r=commonUtils_1[e(311)](r,t[e(338)]-s,t[e(338)]+n[e(346)]+1-s,""),s+=n[e(346)]+1)}),r}function handleWxmlFile(t,e,r,n){var o=_0x1b0d14,e=create(t,e),e=parse5[o(294)](e.getText(),{}),t={filePath:t,srcPath:r,appType:n,utils:{commonConfig:commonConfig_1,importVisitor:importVisitor_1,textDocument:{create:create},fileHandle:fileHandle_1}};return parse5[o(313)](e,{convertOptions:t})}function transformWxSchemas(t,e,r){var n=_0x1b0d14,o=t[n(310)][n(330)],e=e[n(304)]({line:o[n(337)]-1,character:o[n(315)]+1});return r=commonUtils_1[n(311)](r,e+globalDistanceCount,e+t[n(343)][n(346)]+globalDistanceCount,n(341)),globalDistanceCount-=t[n(343)][n(346)]-4,r}function _0x556f(t,e){var r=_0xdf85();return(_0x556f=function(t,e){return r[t-=288]})(t,e)}function transformWxmlWxsFilePath(t,e,r){var n=_0x1b0d14,o=t.moduleRange[n(330)],e=e[n(304)]({line:o[n(337)]-1,character:o[n(315)]});return r=commonUtils_1[n(311)](r,e+globalDistanceCount,e+globalDistanceCount+t[n(343)].length-1,4===t[n(343)].length?"hjs":n(293))}function transformWxsFilePath(t,s,i,l,e){var c=_0x1b0d14,m=0,f=commonConfig_1[c(342)][e];return t[c(332)](function(t){var e=c;if(path[e(353)](t[e(343)])===f[e(295)]){var r=t[e(343)],n=t[e(310)][e(330)],n=s[e(304)]({line:n[e(337)]-1,character:n[e(315)]-1})+m,o=t[e(343)][e(292)](0,t.module.length-(f[e(295)][e(346)]-1))+e(295);if(r&&!r.startsWith("./")&&!r[e(318)](e(320))){var a=path[e(298)](l,"..",r);if(!path[e(353)](a))return;fs.existsSync(a)&&(a=".",r.startsWith("/")?m+=1:(a="./",m+=2),o=a+o)}i=commonUtils_1[e(311)](i,n,n+t[e(343)].length,o)}}),i}function transformWxInterface(t,e,r,n){var o,a,s=_0x1b0d14,i=t[s(310)].start,l=e.uri()+"-"+i.line,c=e[s(304)]({line:i.line-1,character:i[s(315)]});return r=commonUtils_1.replacepos(r,c+globalDistanceCount,globalDistanceCount+c+n[s(346)],DEST_API_NAME),commonConfig_2[s(316)][t[s(306)]]?(globalDistanceCount-=n[s(346)]-DEST_API_LEN,r=commonUtils_1[s(311)](r,c+globalDistanceCount+n.length+1,c+globalDistanceCount+n[s(346)]+1+t[s(306)][s(346)],commonConfig_2.interfacesForTransform[t[s(306)]]),globalDistanceCount-=t[s(306)][s(346)]-commonConfig_2.interfacesForTransform[t.property][s(346)]):-1===commonConfig_2[s(299)][s(345)](t[s(306)])||-1!==Object.keys(insertedApiObj)[s(345)](l)&&insertedApiObj[l]===t.property?globalDistanceCount-=n[s(346)]-DEST_API_LEN:(c=e[s(304)]({line:i.line-1,character:0}),o="// ".concat(commonUtils_1.setLanguage(s(339)),s(296))[s(307)](DEST_API_NAME,".")[s(307)](t.property,s(303)),a=i[s(337)]+1,insertedApiCountObj[l]&&(a+=insertedApiCountObj[l]),e=e[s(349)]()+s(291)+(a+globalJsLine)+s(305)+i.character+"}",TransformReport.writeInfo(""[s(307)](commonUtils_1[s(297)](s(339)),"api ")[s(307)](DEST_API_NAME,".")[s(307)](t[s(306)]),e),r=commonUtils_1[s(312)](r,c+globalDistanceCount,o),globalJsLine++,globalDistanceCount=(globalDistanceCount+=o.length)-(n[s(346)]-DEST_API_LEN),insertedApiObj[l]=t[s(306)],insertedApiCountObj[l]?insertedApiCountObj[l]++:insertedApiCountObj[l]=1),r}function transformJsFile(t,r,n,o){var a=_0x1b0d14,s=create(t,n),t=(n=s[a(321)](),importVisitor_1.getImportRules(n,null,null,o));return globalJsLine=globalDistanceCount=0,t[a(332)](function(t){var e=a;switch(t[e(333)]){case"fileImport":n=transformJsPath(t,r,n,s);break;case e(327):n=transformWxInterface(t,s,n,o);break;case e(331):n=transformWxmlWxsFilePath(t,s,n);break;case e(348):n=transformWxSchemas(t,s,n);break;case e(336):n=transformComponentMixins(t,s,n)}}),n}function transformComponentMixins(t,e,r){var n=_0x1b0d14,o=t[n(310)][n(330)],e=e[n(304)]({line:o[n(337)]-1,character:o.character});return r=commonUtils_1[n(311)](r,e+globalDistanceCount,e+t.module[n(346)]+globalDistanceCount,n(354)),globalDistanceCount-=t[n(343)].length-9,r}function transformJsPath(t,e,r,n){var o=_0x1b0d14,a=t[o(343)];return!a||a[o(318)]("./")||a[o(318)]("../")||(e=path[o(298)](e,"..",a),path[o(353)](e)||(e+=".js"),fs[o(355)](e)&&(e=t[o(310)].start,t=n.offsetAt({line:e[o(337)]-1,character:e[o(315)]-1})+globalDistanceCount,n=".",a.startsWith("/")?globalDistanceCount+=1:(n="./",globalDistanceCount+=2),r=commonUtils_1[o(312)](r,t,n))),r}exports[_0x1b0d14(324)]=handleWxssImport,exports[_0x1b0d14(323)]=handleWxmlFile,exports.transformWxsFilePath=transformWxsFilePath,exports.transformJsFile=transformJsFile,exports[_0x1b0d14(352)]=transformJsPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x4dd133=_0x1353,commonUtils_1=((()=>{for(var t=_0x1353,r=_0x2dbc();;)try{if(519470==-parseInt(t(412))*(parseInt(t(408))/2)+-parseInt(t(398))/3+parseInt(t(403))/4*(parseInt(t(414))/5)+parseInt(t(402))/6*(-parseInt(t(411))/7)+parseInt(t(406))/8+-parseInt(t(395))/9*(parseInt(t(397))/10)+parseInt(t(407))/11*(parseInt(t(404))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}})(),Object[_0x4dd133(399)](exports,"__esModule",{value:!0}),exports[_0x4dd133(401)]=exports[_0x4dd133(415)]=void 0,require(_0x4dd133(413))),fs=require("fs");function writeInfo(t,r){var n=_0x4dd133;write([n(410),t,"\n",commonUtils_1[n(405)](n(394)),r,n(400)][n(396)](""))}function insertInfo(t){var r=_0x4dd133,n=fs[r(392)](commonUtils_1[r(409)]()).toString();fs[r(391)](commonUtils_1[r(409)](),t),write(n)}function _0x1353(t,r){var n=_0x2dbc();return(_0x1353=function(t,r){return n[t-=391]})(t,r)}function write(t){var r=_0x4dd133;t&&fs.appendFile(commonUtils_1[r(409)](),t,function(t){if(t)throw t})}function _0x2dbc(){var t=["60pVTMMT","377721kdWTxg","defineProperty","\n\n\n","insertInfo","6TFvwGS","4McwDdB","19584876qTNGhO","setLanguage","2463296wgJhaw","11BLQVQf","2lAxcFo","getGlobleOutPutPath","Error: ","4648742JgkCZJ","681221vPZDjE","../common/commonUtils","2596865QFdjQX","writeInfo","writeFileSync","readFileSync","write","position","702981KrpJBK","join"];return(_0x2dbc=function(){return t})()}exports[_0x4dd133(415)]=writeInfo,exports[_0x4dd133(401)]=insertInfo,exports[_0x4dd133(393)]=write;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _typeof(a){var t=
|
|
1
|
+
function _0x5ec7(){var a=["showLoading","scanCode","concat","8YoJbkC","1043502hvUrrO","toFixed","downloadFile","setScreenBrightness","prototype","object","forEach","code","callBack","apFilePath","saveImageToPhotosAlbum","apFilePaths","function","params","push","11221230rQZgQW","chooseImage","defaultImgVuality","index","removeSavedFile","tempFilePath","phoneNumber","src","7ZqKKlo","title","saveFile","level","filePath","3059892Tqgnov","getClipboardData","apply","string","clearStorageSync","text","407690UWmcgK","quality","brightness","3980235BhJrob","eventName","getSavedFileInfo","data","name","391240ZRnEmd","isArray","returnVal","length","showActionSheet","apiName","uploadFile","setClipboardData","symbol","removeStorageSync","makePhoneCall","sort","9MHKMTc","setStorageSync","iterator","compressImage","success","getScreenBrightness","keys","toPrimitive","getFileInfo","onlyFromCamera","showToast","@@toPrimitive must return a primitive value.","360007MhmEKs"];return(_0x5ec7=function(){return a})()}function _typeof(a){var t=_0x13b7;return(_typeof=t(304)==typeof Symbol&&t(342)==typeof Symbol[t(348)]?function(a){return typeof a}:function(a){var e=t;return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol[e(367)]?"symbol":typeof a})(a)}function _0x13b7(a,e){var t=_0x5ec7();return(_0x13b7=function(a,e){return t[a-=297]})(a,e)}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,_0x13b7(323));return"symbol"==_typeof(a)?a:a+""}function _toPrimitive(a,e){var t=_0x13b7;if(t(297)!=_typeof(a)||!a)return a;var r=a[Symbol[t(353)]];if(void 0===r)return(t(323)===e?String:Number)(a);r=r.call(a,e||"default");if(t(297)!=_typeof(r))return r;throw new TypeError(t(357))}(()=>{for(var a=_0x13b7,e=_0x5ec7();;)try{if(430427==+parseInt(a(358))+parseInt(a(326))/2+-parseInt(a(346))/3*(parseInt(a(334))/4)+-parseInt(a(329))/5+-parseInt(a(363))/6*(-parseInt(a(315))/7)+parseInt(a(362))/8*(-parseInt(a(320))/9)+parseInt(a(307))/10)break;e.push(e.shift())}catch(a){e.push(e.shift())}})(),(()=>{var a,e,m,n=_0x13b7;function i(e,t){var a=n;e&&Object[a(352)](e)[a(298)](function(a){t[a]&&(t[e[a]]=t[a],delete t[a])})}has.__apiAdapterConverted||(has.__apiAdapterConverted=!0,a=[{apiName:n(308),callBack:[{eventName:n(350),params:{tempFilePaths:n(303)}}]},{apiName:n(317),params:{apFilePath:"tempFilePath"},callBack:[{eventName:n(350),params:{savedFilePath:n(301)}}]},{apiName:n(354),params:{apFilePath:n(319)}},{apiName:n(331),params:{apFilePath:"filePath"}},{apiName:n(311),params:{apFilePath:"filePath"}},{apiName:n(341),params:{text:"data"}},{apiName:n(321),callBack:[{eventName:"success",params:{data:n(325)}}]},{apiName:n(302),params:{url:"filePath"}},{apiName:n(359),params:{content:"title"}},{apiName:n(338),params:{items:"itemList"},callBack:[{eventName:n(350),params:{tapIndex:n(310)}}]},{apiName:n(340),params:{fileName:n(333)}},{apiName:n(366),params:{brightness:"value"}},{apiName:n(351),callBack:[{eventName:n(350),params:{value:n(328)}}]},{apiName:n(360),params:{hideAlbum:n(355)},callBack:[{eventName:n(350),params:{result:n(299)}}]},{apiName:n(344),params:{number:n(313)}},{apiName:n(356),params:{content:n(316)}},{apiName:n(365),callBack:[{eventName:n(350),params:{tempFilePath:n(301)}}]}],e=[{apiName:"getStorageSync",params:{key:1},returnVal:n(332)},{apiName:n(347),params:{key:1,data:2}},{apiName:n(343),params:{key:1}},{apiName:n(324)}],m={},a[n(361)](e)[n(298)](function(a){a=a.apiName;m[a]=has[a]}),a[n(298)](function(e){var t=n,r=e[t(339)];has[r]=function(){var a=t,n=0<arguments[a(337)]&&void 0!==arguments[0]?arguments[0]:{};return i(e[a(305)],n),e[a(300)]&&e[a(300)].forEach(function(e){var t=a,r=n[e.eventName];n[e[t(330)]]=function(a){i(e[t(305)],a),r(a)}}),m[r](n)}}),e[n(298)](function(e){var o=n,p=e[o(339)];has[p]=function(){var t=o,r=0<arguments[t(337)]&&void 0!==arguments[0]?arguments[0]:{},n=[],i=e[t(305)]&&Object[t(352)](e[t(305)])||[],a=(i[t(345)](function(a,e){return i[a]-i[e]}),i[t(298)](function(a){var e=t;r[a]&&n[e(306)](r[a])}),m[p][t(322)](m,n));return e.returnVal?_defineProperty({},e[t(336)],a):{}}}),m[n(349)]=has.compressImage,has[n(349)]=function(){var t=n,a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=(a[t(314)]=Array[t(335)](a[t(303)])?a.apFilePaths[0]:"",Number(a[t(318)])),r=(e<=3?a[t(327)]=(100/3*e)[t(364)](0):a[t(309)]=80,a.quality=Number(a[t(327)]),a[t(350)]);return a[t(350)]=function(a){var e=t;a[e(303)]=[a[e(312)]],r(a)},m[t(349)](a)})})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x47da16=_0x4c50;function _0x4c50(r,e){var a=_0x23c5();return(_0x4c50=function(r,e){return a[r-=332]})(r,e)}(()=>{for(var r=_0x4c50,e=_0x23c5();;)try{if(690734==-parseInt(r(343))*(-parseInt(r(335))/2)+parseInt(r(345))/3+-parseInt(r(344))/4*(-parseInt(r(341))/5)+-parseInt(r(347))/6*(parseInt(r(342))/7)+-parseInt(r(340))/8+parseInt(r(338))/9*(parseInt(r(350))/10)+parseInt(r(339))/11*(-parseInt(r(336))/12))break;e.push(e.shift())}catch(r){e.push(e.shift())}})(),Object[_0x47da16(332)](exports,_0x47da16(351),{value:!0}),exports[_0x47da16(333)]=void 0;var babelParser=require(_0x47da16(346)),parseTryCount=0;function babelTransform(e,a){var n=_0x47da16;try{var t=babelParser[n(337)](e,{sourceType:n(349),allowReturnOutsideFunction:!0,plugins:["classProperties"]});return parseTryCount=0,t}catch(r){if(a){if(0===parseTryCount)return t=e[n(348)](0,a-1)+e[n(348)](a,e[n(334)]),parseTryCount++,babelTransform(t,a);if(parseTryCount<3)return t=e[n(348)](0,a)+","+e.substring(a,e[n(334)]),parseTryCount++,babelTransform(t,a);parseTryCount=0}return null}}function _0x23c5(){var r=["330297ZeeACq","227024gtEkhn","843320nZLKBv","14oDwgrQ","1UiwfBH","4uFwqPN","1899858mkokQt","@babel/parser","2167734jkBGxx","substring","unambiguous","269060OJFJAM","__esModule","defineProperty","babelTransform","length","1841914TzbLFr","564VMOMRH","parse","378AcZVqM"];return(_0x23c5=function(){return r})()}exports[_0x47da16(333)]=babelTransform;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x27c73a=_0x5885,babelParser_1=((()=>{for(var e=_0x5885,r=_0x899a();;)try{if(421678==+parseInt(e(532))+parseInt(e(477))/2*(parseInt(e(498))/3)+parseInt(e(517))/4*(-parseInt(e(491))/5)+-parseInt(e(487))/6*(-parseInt(e(484))/7)+-parseInt(e(534))/8*(parseInt(e(527))/9)+parseInt(e(513))/10+parseInt(e(481))/11*(parseInt(e(502))/12))break;r.push(r.shift())}catch(e){r.push(r.shift())}})(),Object.defineProperty(exports,"__esModule",{value:!0}),exports[_0x27c73a(478)]=void 0,require(_0x27c73a(497))),babel_traverse_1=require(_0x27c73a(523)),pathTool=require("path"),commonConfig_1=require(_0x27c73a(485)),babelTypes=require(_0x27c73a(494)).types;function _0x5885(e,r){var t=_0x899a();return(_0x5885=function(e,r){return t[e-=476]})(e,r)}function getQaSchemasReg(e){return new RegExp("^"[_0x27c73a(480)](e,"://"))}var currentType,suffixs,importRules=[],visitor={ImportDeclaration:function(e){var r=_0x27c73a;importRules.push({type:"fileImport",module:e.node[r(509)].value,moduleRange:{start:{line:e[r(511)][r(509)].loc.start.line,character:e[r(511)][r(509)][r(483)][r(512)][r(514)]+2},end:{line:e[r(511)][r(509)][r(483)][r(492)][r(488)],character:e[r(511)].source[r(483)].end[r(514)]+2}}})},CallExpression:function(e){var t=_0x27c73a;e[t(511)][t(500)]&&e.node.arguments&&e[t(511)][t(500)][t(510)]===t(526)&&1===e[t(511)].arguments[t(493)]&&importRules[t(518)]({type:t(499),module:e[t(511)][t(489)][0].value,moduleRange:{start:{line:e.node[t(489)][0][t(483)][t(512)][t(488)],character:e[t(511)].arguments[0][t(483)][t(512)][t(514)]+2},end:{line:e[t(511)].arguments[0].loc[t(492)].line,character:e[t(511)].arguments[0].loc.end[t(514)]+2}}}),e[t(511)].callee&&e[t(511)].arguments&&e[t(511)][t(500)].name===t(479)&&1===e[t(511)][t(489)][t(493)]&&babelTypes[t(505)](e[t(511)][t(489)][0])&&e[t(511)][t(489)][0][t(519)]&&0<e[t(511)][t(489)][0].properties[t(493)]&&e.node[t(489)][0][t(519)][t(515)](function(e){var r=t;babelTypes[r(503)](e)&&babelTypes[r(535)](e.key)&&"mixins"===e.key.name&&importRules[r(518)]({type:r(476),module:e[r(495)].name,moduleRange:{start:{line:e[r(483)][r(512)][r(488)],character:e[r(483)].start[r(514)]},end:{line:e.key[r(483)][r(492)][r(488)],character:e[r(495)][r(483)].end[r(514)]}}})})},MemberExpression:function(e){var r=_0x27c73a;e[r(511)][r(496)]&&e.node[r(508)]&&e.node[r(496)][r(510)]===currentType&&!hasParent(e,e[r(511)].object.name)&&importRules.push({type:r(531),module:e[r(511)][r(496)].name,moduleRange:{start:{line:e[r(511)][r(496)][r(483)][r(512)][r(488)],character:e[r(511)][r(496)][r(483)][r(512)][r(514)]},end:{line:e.node.object[r(483)].end[r(488)],character:e[r(511)][r(496)][r(483)][r(492)][r(514)]}},property:e[r(511)][r(508)].name})},Identifier:function(e){var r=_0x27c73a;e[r(511)].name!==currentType||0!==e[r(495)]||hasParent(e,e[r(511)][r(510)])||importRules.push({type:r(531),module:e[r(511)][r(510)],moduleRange:{start:{line:e.node.loc.start[r(488)],character:e[r(511)][r(483)][r(512)][r(514)]},end:{line:e[r(511)][r(483)][r(492)].line,character:e.node[r(483)][r(492)][r(514)]}},property:null})},StringLiteral:function(e){var r,t=_0x27c73a;!e[t(511)][t(501)]||pathTool[t(530)](e[t(511)].value)!==suffixs[t(521)]&&pathTool.extname(e[t(511)].value)!==suffixs[t(524)]||(r=pathTool[t(530)](e.node[t(501)]),importRules[t(518)]({type:"filePath",module:r,moduleRange:{start:{line:e.node.loc[t(492)][t(488)],character:e.node.loc[t(492)][t(514)]-r[t(493)]},end:{line:e.node[t(483)][t(492)][t(488)],character:e[t(511)].loc[t(492)].column}}})),e[t(511)][t(501)]&&getQaSchemasReg(currentType).test(e[t(511)][t(501)])&&importRules[t(518)]({type:t(522),module:""[t(480)](currentType,":"),moduleRange:{start:{line:e[t(511)][t(483)].start[t(488)],character:e[t(511)][t(483)][t(512)][t(514)]},end:{line:e.node[t(483)].start[t(488)],character:e[t(511)].loc[t(512)][t(514)]+5}}})}};function _0x899a(){var e=["default","hxml","wxSchema","@babel/traverse","hjs","ImportDeclaration","require","7329294CXBodo","findParent","CallExpression","extname","wxInterface","238492fXVYSc","scope","8lHgOkx","isIdentifier","mixins","2rvswGQ","getImportRules","Component","concat","605TiGDHG","Identifier","loc","160517NyjwLk","../common/commonConfig","babelTransform","138cfxiMZ","line","arguments","MemberExpression","135NjpXUi","end","length","@babel/core","key","object","./babelParser","594921DmuliM","fileImport","callee","value","43116Mjzbdh","isObjectProperty","StringLiteral","isObjectExpression","projectFileSuffix","splice","property","source","name","node","start","6864960yvqwab","column","forEach","getOwnBinding","90708fGqBjy","push","properties"];return(_0x899a=function(){return e})()}function hasParent(e,t){var a=_0x27c73a,n=!1;return e.getStatementParent()[a(528)](function(e){var r=a;n||e[r(533)][r(516)](t)&&(n=!0)}),n}function clear(){var e=_0x27c73a;importRules[e(507)](0,importRules[e(493)])}function getImportRules(e,r){var t=_0x27c73a,a=2<arguments[t(493)]&&void 0!==arguments[2]&&arguments[2],n=3<arguments[t(493)]?arguments[3]:void 0,a=(currentType=n,suffixs=commonConfig_1[t(506)][n],n=a?{CallExpression:visitor.CallExpression,ImportDeclaration:visitor[t(525)]}:{MemberExpression:visitor[t(490)],StringLiteral:visitor[t(504)],Identifier:visitor[t(482)],CallExpression:visitor[t(529)]},babelParser_1[t(486)](e,r));return clear(),babel_traverse_1[t(520)](a,n),importRules}exports.getImportRules=getImportRules;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
var _0x4b0926=_0x49d2;function _0x49d2(t,e){var r=_0x16bb();return(_0x49d2=function(t,e){return r[t-=269]})(t,e)}(()=>{for(var t=_0x49d2,e=_0x16bb();;)try{if(563338==-parseInt(t(305))+parseInt(t(304))/2*(-parseInt(t(309))/3)+parseInt(t(315))/4*(parseInt(t(307))/5)+-parseInt(t(314))/6*(-parseInt(t(293))/7)+parseInt(t(301))/8*(-parseInt(t(273))/9)+parseInt(t(311))/10+parseInt(t(303))/11*(parseInt(t(324))/12))break;e.push(e.shift())}catch(t){e.push(e.shift())}})(),Object[_0x4b0926(274)](exports,_0x4b0926(292),{value:!0}),exports.wxssParser=exports.importFileReg=exports[_0x4b0926(278)]=void 0;var postcss=require(_0x4b0926(280)),path=require(_0x4b0926(291));function wxssParser(e,r,i,p){var c=_0x4b0926,n=[];try{n=postcss.parse(e).nodes[c(313)](function(t){var e=c;return t[e(295)]===e(289)&&"import"===t[e(276)]})[c(297)](function(t){var e=c;return{type:e(319),import:t[e(312)],position:{start:t[e(323)].start,end:t[e(323)].end}}})}catch(t){for(var s=e[c(286)](exports[c(278)]),o=0,a=0;s=exports[c(278)][c(287)](e);){var u,a=e.indexOf(s[0],a),x=checkIsInComment(s[0],e,o,s[c(284)]);x[c(281)]?(o=s[c(284)]+x[c(320)],a+=x[c(320)]):(o=s.index+s[0][c(290)],(x=s[0][c(286)](exports[c(322)]))&&(u=r[c(299)](a+x[c(284)]),n[c(272)]({type:c(319),uri:r[c(288)],position:{start:{line:u[c(283)]+1,column:u[c(294)]},end:{line:u[c(283)]+1,column:u[c(294)]+x[0][c(290)]+2}},value:x?x[1]:"",import:x[0]})),a+=s[0][c(290)])}}var f=[];return n.forEach(function(n){var s,t,o,a=c;n[a(295)]===a(319)?(t={line:n[a(271)][a(310)].line-1,character:n[a(271)].end[a(321)]-2},s=r[a(270)](t),t=n[a(319)][a(296)](/[\r\n]/gi," ").split(" "),o=0,t[a(279)](function(t){var e,r=a,t=t[r(275)](1,t[r(290)]-1);path.extname(t)===i&&(e=n[r(319)][r(316)](t,o),o=e,f.push({type:r(319),import:t,endOffset:s-(n.import[r(290)]-e-t[r(290)])+1}))})):p===a(308)&&getSelectorRule(n,r,p,f)}),f}function _0x16bb(){var t=["name","selectors","importReg","forEach","postcss","isInComment","((?:^|\\n|\\r)\\s*\\/\\*[\\s\\S]*?","line","index","selector","match","exec","uri","atrule","length","path","__esModule","3143PGJPHn","character","type","replace","map","start","positionAt","[\\s\\S]*?\\*\\/\\s*(?:\\r|\\n|$)|((?:^|\\n|\\r)\\s*\\/\\/.*","66392DmEXqt","split","8590978dhQSza","2kzahZP","557677XJzPNG","concat","3060LsZZif","swan","955047WYaxdb","end","978120uVdtyJ","params","filter","7866VjNCdL","1064uLKyOF","indexOf","getText","test","import","restLength","column","importFileReg","source","12adfuKt",".*(?:\\r|\\n|$)))","offsetAt","position","push","207AFuYkf","defineProperty","substring"];return(_0x16bb=function(){return t})()}function getSelectorRule(t,e,r,n){var s,o,a,i,p,c=_0x4b0926;"rule"===t[c(295)]?(s=e[c(317)](),o=new RegExp("^"[c(306)](r,"-")),a=t[c(277)],i={line:t[c(271)].start[c(283)]-1,character:t.position[c(298)][c(321)]-1},p=e[c(270)](i),a&&a[c(279)](function(t){var r=c;t[r(302)](/\s+/)[r(279)](function(t){var e=r;p=s[e(316)](t,p),o[e(318)](t)&&n[e(272)]({type:e(285),selector:t,startOffset:p}),p+=t[e(290)]})})):"media"===t[c(295)]&&t.rules[c(279)](function(t){getSelectorRule(t,e,r,n)})}function checkIsInComment(t,e,r,n){for(var s,o=_0x4b0926,a=new RegExp(o(282)[o(306)](t,o(300)).concat(t,o(269)),"g");s=a[o(287)](e[o(275)](r));){if(s[o(284)]+r<n&&s[o(284)]+r+s[0][o(290)]>n)return{isInComment:!0,restLength:s.index+r+s[0].length-n};if(s[o(284)]+r>n)break}return{isInComment:!1,restLength:0}}exports.importReg=/\@import\s+[\'\"].*[\'\"](\s+.*(\s*[and|not|only|or|\,]\s*\(.*\))*)?\s*\;?/g,exports[_0x4b0926(322)]=/['"]\s*([^()]+?)\s*['"]/,exports.wxssParser=wxssParser;
|
package/lib/bin/ascf.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var _0x3d4cf3=_0x51c9;function _typeof(t){var e=_0x51c9;return(_typeof="function"==typeof Symbol&&e(453)==typeof Symbol[e(573)]?function(t){return typeof t}:function(t){var r=e;return t&&r(579)==typeof Symbol&&t.constructor===Symbol&&t!==Symbol[r(576)]?r(453):typeof t})(t)}function _regeneratorRuntime(){var s=_0x51c9;_regeneratorRuntime=function(){return a};var f,a={},t=Object[s(576)],l=t[s(567)],p=Object[s(538)]||function(t,r,e){var n=s;t[r]=e[n(449)]},r=s(579)==typeof Symbol?Symbol:{},c=r.iterator||s(593),e=r[s(500)]||"@@asyncIterator",n=r.toStringTag||s(447);function o(t,r,e){return Object[s(538)](t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{o({},"")}catch(t){o=function(t,r,e){return t[r]=e}}function u(t,r,e,n){var o,c,i,a,u=s,r=r&&r[u(576)]instanceof x?r:x,r=Object[u(558)](r.prototype),n=new L(n||[]);return p(r,u(459),{value:(o=t,c=e,i=n,a=d,function(t,r){var e=_0x51c9;if(a===m)throw Error(e(468));if(a===y){if(e(483)===t)throw r;return{value:f,done:!0}}for(i[e(516)]=t,i[e(507)]=r;;){var n=i[e(534)];if(n){n=function t(r,e){var n=s,o=e[n(516)],c=r[n(573)][o];if(c===f)return e[n(534)]=null,n(483)===o&&r[n(573)][n(557)]&&(e[n(516)]=n(557),e[n(507)]=f,t(r,e),n(483)===e[n(516)])||"return"!==o&&(e[n(516)]=n(483),e[n(507)]=new TypeError("The iterator does not provide a '"+o+n(590))),_;o=h(c,r[n(573)],e[n(507)]);if(n(483)===o[n(466)])return e.method="throw",e[n(507)]=o[n(507)],e[n(534)]=null,_;c=o[n(507)];return c?c.done?(e[r[n(559)]]=c[n(449)],e[n(464)]=r[n(592)],"return"!==e[n(516)]&&(e[n(516)]=n(464),e[n(507)]=f),e.delegate=null,_):c:(e[n(516)]=n(483),e[n(507)]=new TypeError(n(454)),e.delegate=null,_)}(n,i);if(n){if(n===_)continue;return n}}if(e(464)===i[e(516)])i.sent=i[e(536)]=i[e(507)];else if(e(483)===i[e(516)]){if(a===d)throw a=y,i[e(507)];i[e(485)](i[e(507)])}else"return"===i.method&&i.abrupt(e(557),i[e(507)]);a=m;n=h(o,c,i);if("normal"===n[e(466)]){if(a=i[e(539)]?y:v,n[e(507)]===_)continue;return{value:n[e(507)],done:i[e(539)]}}e(483)===n[e(466)]&&(a=y,i[e(516)]=e(483),i[e(507)]=n[e(507)])}})}),r}function h(t,r,e){var n=s;try{return{type:n(451),arg:t[n(518)](r,e)}}catch(t){return{type:"throw",arg:t}}}a.wrap=u;var d=s(564),v="suspendedYield",m=s(473),y=s(540),_={};function x(){}function i(){}function g(){}var r={},b=(o(r,c,function(){return this}),Object[s(465)]),b=b&&b(b(O([]))),w=(b&&b!==t&&l.call(b,c)&&(r=b),g.prototype=x.prototype=Object[s(558)](r));function k(t){[s(464),"throw","return"].forEach(function(r){o(t,r,function(t){return this[_0x51c9(459)](r,t)})})}function j(a,u){var r,o=s;p(this,o(459),{value:function(e,n){function t(){return new u(function(t,r){!function r(t,e,n,o){var c,i=_0x51c9,t=h(a[t],a,e);if(i(483)!==t[i(466)])return(e=(c=t[i(507)])[i(449)])&&i(519)==_typeof(e)&&l.call(e,i(488))?u[i(584)](e[i(488)]).then(function(t){r(i(464),t,n,o)},function(t){r(i(483),t,n,o)}):u.resolve(e)[i(551)](function(t){c.value=t,n(c)},function(t){return r(i(483),t,n,o)});o(t[i(507)])}(e,n,t,r)})}return r=r?r[o(551)](t,t):t()}})}function E(t){var r=s,e={tryLoc:t[0]};1 in t&&(e[r(591)]=t[1]),2 in t&&(e.finallyLoc=t[2],e[r(452)]=t[3]),this[r(565)][r(578)](e)}function G(t){var r=s,e=t[r(472)]||{};e.type="normal",delete e[r(507)],t[r(472)]=e}function L(t){var r=s;this[r(565)]=[{tryLoc:r(509)}],t[r(515)](E,this),this[r(571)](!0)}function O(e){var n=s;if(e||""===e){var o,t=e[c];if(t)return t[n(518)](e);if(n(579)==typeof e[n(464)])return e;if(!isNaN(e.length))return o=-1,(t=function t(){for(var r=n;++o<e[r(522)];)if(l[r(518)](e,o))return t[r(449)]=e[o],t[r(539)]=!1,t;return t[r(449)]=f,t.done=!0,t})[n(464)]=t}throw new TypeError(_typeof(e)+n(469))}return p(w,"constructor",{value:i.prototype=g,configurable:!0}),p(g,s(495),{value:i,configurable:!0}),i[s(550)]=o(g,n,s(487)),a[s(595)]=function(t){var r=s,t=r(579)==typeof t&&t[r(495)];return!!t&&(t===i||r(487)===(t.displayName||t.name))},a[s(520)]=function(t){var r=s;return Object[r(511)]?Object[r(511)](t,g):(t[r(517)]=g,o(t,n,r(487))),t[r(576)]=Object[r(558)](w),t},a.awrap=function(t){return{__await:t}},k(j.prototype),o(j.prototype,e,function(){return this}),a[s(552)]=j,a[s(555)]=function(t,r,e,n,o){var c=s,i=(void 0===o&&(o=Promise),new j(u(t,r,e,n),o));return a[c(595)](r)?i:i[c(464)]()[c(551)](function(t){var r=c;return t.done?t.value:i[r(464)]()})},k(w),o(w,n,s(594)),o(w,c,function(){return this}),o(w,s(570),function(){return s(462)}),a.keys=function(t){var r,n=s,o=Object(t),c=[];for(r in o)c[n(578)](r);return c[n(493)](),function t(){for(var r=n;c[r(522)];){var e=c.pop();if(e in o)return t[r(449)]=e,t[r(539)]=!1,t}return t[r(539)]=!0,t}},a[s(548)]=O,L[s(576)]={constructor:L,reset:function(t){var r=s;if(this[r(467)]=0,this.next=0,this[r(589)]=this._sent=f,this[r(539)]=!1,this.delegate=null,this[r(516)]=r(464),this[r(507)]=f,this[r(565)][r(515)](G),!t)for(var e in this)"t"===e[r(477)](0)&&l[r(518)](this,e)&&!isNaN(+e[r(496)](1))&&(this[e]=f)},stop:function(){var t=s,r=(this[t(539)]=!0,this.tryEntries[0].completion);if(t(483)===r.type)throw r.arg;return this[t(445)]},dispatchException:function(n){var o=s;if(this[o(539)])throw n;var c=this;function t(t,r){var e=o;return i[e(466)]=e(483),i[e(507)]=n,c.next=t,r&&(c[e(516)]="next",c[e(507)]=f),!!r}for(var r=this[o(565)].length-1;0<=r;--r){var e=this[o(565)][r],i=e.completion;if(o(509)===e[o(498)])return t(o(581));if(e[o(498)]<=this[o(467)]){var a=l[o(518)](e,o(591)),u=l.call(e,o(585));if(a&&u){if(this[o(467)]<e.catchLoc)return t(e.catchLoc,!0);if(this.prev<e[o(585)])return t(e[o(585)])}else if(a){if(this[o(467)]<e[o(591)])return t(e[o(591)],!0)}else{if(!u)throw Error(o(575));if(this[o(467)]<e[o(585)])return t(e[o(585)])}}}},abrupt:function(t,r){for(var e=s,n=this.tryEntries[e(522)]-1;0<=n;--n){var o=this.tryEntries[n];if(o[e(498)]<=this[e(467)]&&l[e(518)](o,e(585))&&this[e(467)]<o[e(585)]){var c=o;break}}var i=(c=c&&(e(530)===t||e(450)===t)&&c[e(498)]<=r&&r<=c[e(585)]?null:c)?c[e(472)]:{};return i[e(466)]=t,i[e(507)]=r,c?(this[e(516)]=e(464),this[e(464)]=c.finallyLoc,_):this[e(486)](i)},complete:function(t,r){var e=s;if(e(483)===t[e(466)])throw t[e(507)];return e(530)===t[e(466)]||e(450)===t[e(466)]?this[e(464)]=t[e(507)]:e(557)===t[e(466)]?(this[e(445)]=this[e(507)]=t[e(507)],this[e(516)]="return",this[e(464)]="end"):e(451)===t.type&&r&&(this.next=r),_},finish:function(t){for(var r=s,e=this[r(565)][r(522)]-1;0<=e;--e){var n=this[r(565)][e];if(n[r(585)]===t)return this[r(486)](n[r(472)],n[r(452)]),G(n),_}},catch:function(t){for(var r=s,e=this[r(565)].length-1;0<=e;--e){var n,o,c=this.tryEntries[e];if(c[r(498)]===t)return n=c[r(472)],r(483)===n[r(466)]&&(o=n[r(507)],G(c)),o}throw Error("illegal catch attempt")},delegateYield:function(t,r,e){var n=s;return this[n(534)]={iterator:O(t),resultName:r,nextLoc:e},n(464)===this[n(516)]&&(this[n(507)]=f),_}},a}function asyncGeneratorStep(t,r,e,n,o,c,i){var a=_0x51c9;try{var u=t[c](i),s=u[a(449)]}catch(t){return void e(t)}u[a(539)]?r(s):Promise[a(584)](s)[a(551)](n,o)}function _asyncToGenerator(u){return function(){var t=this,a=arguments;return new Promise(function(r,e){var n=_0x51c9,o=u[n(583)](t,a);function c(t){asyncGeneratorStep(o,r,e,c,i,n(464),t)}function i(t){asyncGeneratorStep(o,r,e,c,i,n(483),t)}c(void 0)})}}function _0x51c9(t,r){var e=_0x52d7();return(_0x51c9=function(t,r){return e[t-=444]})(t,r)}(()=>{for(var t=_0x51c9,r=_0x52d7();;)try{if(910661==-parseInt(t(561))*(parseInt(t(494))/2)+parseInt(t(503))/3+-parseInt(t(527))/4+-parseInt(t(501))/5+parseInt(t(470))/6+-parseInt(t(553))/7+-parseInt(t(523))/8*(-parseInt(t(556))/9))break;r.push(r.shift())}catch(t){r.push(r.shift())}})();var chalk=require(_0x3d4cf3(497)),_require=(chalk[_0x3d4cf3(508)]=1,global[_0x3d4cf3(549)]=!0,require("commander")),Command=_require[_0x3d4cf3(502)],pkg=require(_0x3d4cf3(528)),program=new Command;function _0x52d7(){var t=["executing","../ascf-compiler/web.webpack.config.js","webpack","output","charAt","-o, --output <output-directory>","errorMessage","version","Watch for changes","error","throw","validate","dispatchException","complete","GeneratorFunction","__await","compile <projectRoot>","checkPath","-p, --progress","warn","reverse","3342FLpcyD","constructor","slice","../ascf-compiler/chalk/bundle.cjs","tryLoc","-w, --watch","asyncIterator","5154525uuznll","Command","1841370pTlPqH",'","folderUrl":"','"command":"',"-va, --validate","arg","level","root","WARNING: Get @atomicservice/ascf info failed: ","setPrototypeOf","green","description","Compile ascf project","forEach","method","__proto__","call","object","mark","development","length","8DpFurO","../common/utils.js","parse","exit","1694992XvhBvK","../../package.json","run","break","yes","progress","production","delegate","-i, --input <input-directory>","_sent","EnvironmentPlugin","defineProperty","done","completed","Clear build resource","ProgressPlugin","command","-c, --clear","red","convert","yellow","values","_isAscfMode","displayName","then","AsyncIterator","7632849KjjTvQ","check","async","19444563pCWKko","return","create","resultName","clear","659HGpMYc","wrap","isLatestAscfToolkit","suspendedStart","tryEntries","concat","hasOwnProperty","confirmConverterFun","info","toString","reset","clearResource","iterator","existsVerifyLog","try statement without catch or finally","prototype","argv","push","function","env","end","NODE_ENV","apply","resolve","finallyLoc","checkInputPathFun","ascf toolkit convert and compile ascf project","input","sent","' method","catchLoc","nextLoc","@@iterator","Generator","isGeneratorFunction","requiredOption","-m, --mode","catch","rval","action","@@toStringTag","Convert miniprogram project to ascf project","value","continue","normal","afterLoc","symbol","iterator result is not an object","option","watch","Clear convert output path","plugins","_invoke","ascf/ascf_src","WARNING: Get @atomicservice/ascf-toolkit version failed: ","[object Generator]","Validate path","next","getPrototypeOf","type","prev","Generator is already running"," is not iterable","10695678rvuZtT","stop","completion"];return(_0x52d7=function(){return t})()}program[_0x3d4cf3(480)](pkg.version).description(_0x3d4cf3(587)),program.command(_0x3d4cf3(546))[_0x3d4cf3(513)](_0x3d4cf3(448)).requiredOption(_0x3d4cf3(535))[_0x3d4cf3(596)](_0x3d4cf3(478))[_0x3d4cf3(455)](_0x3d4cf3(544),_0x3d4cf3(457))[_0x3d4cf3(455)](_0x3d4cf3(506),_0x3d4cf3(463))[_0x3d4cf3(446)]((()=>{var e=_0x3d4cf3,r=_asyncToGenerator(_regeneratorRuntime()[e(520)](function t(r){var n,o,c,i=e;return _regeneratorRuntime()[i(562)](function(t){for(var e=i;;)switch(t[e(467)]=t[e(464)]){case 0:if(n=require("../ascf-converter/features/converter.js"),global._isMiniAppConvertMode=!0,global[e(549)]=!0,process[e(580)][e(572)]=r[e(560)]?"yes":"no",c=require(e(524)),o=c[e(563)],c=c[e(490)],r[e(484)]&&(c(r[e(588)],r.output),process[e(526)](0)),n[e(586)](r[e(588)]),r[e(554)]){t[e(464)]=12;break}return t[e(464)]=10,n[e(568)]({inputPath:r[e(588)],outPath:r[e(476)],confirmAddConfig:!0});case 10:(c=t[e(589)])[e(479)]?console[e(482)](chalk[e(545)](e(505)[e(566)](c[e(543)],'","errorMessage":"')[e(566)](c[e(479)],'"'))):console[e(569)](chalk[e(512)]('"command":"'[e(566)](c[e(543)],e(504))[e(566)](c.folderUrl,'"')));case 12:setTimeout(function(){var r=e;try{o()}catch(t){console[r(492)](chalk.yellow(r(461)[r(566)](t,".")))}});case 13:case e(581):return t[e(471)]()}},t)}));return function(t){return r.apply(this,arguments)}})()),program[_0x3d4cf3(543)](_0x3d4cf3(489)).description(_0x3d4cf3(514))[_0x3d4cf3(455)](_0x3d4cf3(491),"Show build progress")[_0x3d4cf3(455)](_0x3d4cf3(499),_0x3d4cf3(481))[_0x3d4cf3(455)](_0x3d4cf3(597),"Environment is development")[_0x3d4cf3(455)](_0x3d4cf3(544),_0x3d4cf3(541))[_0x3d4cf3(446)]((()=>{var e=_0x3d4cf3,n=_asyncToGenerator(_regeneratorRuntime()[e(520)](function t(r,n){var o,c,i=e;return _regeneratorRuntime()[i(562)](function(t){for(var e=i;;)switch(t[e(467)]=t.next){case 0:return o=require("path"),process[e(580)].projectRoot=o[e(584)](r),process.chdir(o[e(584)](r,e(460))),process[e(580)][e(582)]=n.mode?e(521):e(533),process[e(580)][e(572)]=n[e(560)]?e(531):"no",o=require(e(475)),t[e(467)]=6,c=require(e(474)),t[e(464)]=10,c();case 10:(c=t[e(589)])[e(458)]=c.plugins||[],c[e(458)][e(578)](new o[e(537)]({projectRoot:r})),n[e(532)]&&c[e(458)][e(578)](new o[e(542)]),n[e(456)]&&(c[e(456)]=!0),o(c)[e(529)](function(t,r){var n=e;t&&(console[n(482)](chalk[n(545)](t)),process[n(526)](1)),setTimeout(function(){var r=n,t=require("../common/utils.js"),e=t.isLatestAscfToolkit,t=t.isLatestAscfHar;try{t(global[r(574)])}catch(t){console[r(492)](chalk[r(547)](r(510)[r(566)](t,".")))}try{e(global[r(574)])}catch(t){console[r(492)](chalk.yellow("WARNING: Get @atomicservice/ascf-toolkit version failed: "[r(566)](t,".")))}})}),t[e(464)]=23;break;case 19:t[e(467)]=19,t.t0=t[e(444)](6),console[e(482)](chalk[e(545)](t.t0)),process[e(526)](1);case 23:case e(581):return t.stop()}},t,null,[[6,19]])}));return function(t,r){return n[e(583)](this,arguments)}})()),program[_0x3d4cf3(525)](process[_0x3d4cf3(577)]);
|
|
2
|
+
var _global$_ascfCliProgr,_0x465b0f=_0x4fc1;function _typeof(t){var e=_0x4fc1;return(_typeof=e(278)==typeof Symbol&&e(277)==typeof Symbol.iterator?function(t){return typeof t}:function(t){var r=e;return t&&"function"==typeof Symbol&&t[r(262)]===Symbol&&t!==Symbol.prototype?r(277):typeof t})(t)}function _regeneratorRuntime(){var u=_0x4fc1;_regeneratorRuntime=function(){return c};var s,c={},t=Object[u(338)],l=t[u(239)],p=Object[u(337)]||function(t,r,e){var n=u;t[r]=e[n(236)]},r=u(278)==typeof Symbol?Symbol:{},i=r[u(241)]||"@@iterator",e=r[u(259)]||u(334),n=r[u(307)]||u(283);function o(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{o({},"")}catch(t){o=function(t,r,e){return t[r]=e}}function f(t,r,e,n){var o,i,a,c,f=u,r=r&&r[f(338)]instanceof m?r:m,r=Object[f(254)](r[f(338)]),n=new S(n||[]);return p(r,f(233),{value:(o=t,i=e,a=n,c=v,function(t,r){var e=_0x4fc1;if(c===b)throw Error(e(249));if(c===y){if(e(273)===t)throw r;return{value:s,done:!0}}for(a.method=t,a.arg=r;;){var n=a.delegate;if(n){n=function t(r,e){var n=u,o=e[n(342)],i=r[n(241)][o];if(i===s)return e.delegate=null,n(273)===o&&r[n(241)][n(261)]&&(e[n(342)]=n(261),e[n(328)]=s,t(r,e),n(273)===e[n(342)])||n(261)!==o&&(e.method=n(273),e[n(328)]=new TypeError(n(288)+o+"' method")),g;o=h(i,r[n(241)],e[n(328)]);if(n(273)===o[n(310)])return e[n(342)]=n(273),e[n(328)]=o.arg,e[n(274)]=null,g;i=o[n(328)];return i?i.done?(e[r[n(298)]]=i.value,e[n(299)]=r.nextLoc,"return"!==e.method&&(e[n(342)]=n(299),e.arg=s),e[n(274)]=null,g):i:(e[n(342)]=n(273),e[n(328)]=new TypeError(n(296)),e[n(274)]=null,g)}(n,a);if(n){if(n===g)continue;return n}}if(e(299)===a[e(342)])a[e(244)]=a._sent=a[e(328)];else if(e(273)===a[e(342)]){if(c===v)throw c=y,a[e(328)];a[e(247)](a[e(328)])}else e(261)===a.method&&a[e(282)](e(261),a[e(328)]);c=b;n=h(o,i,a);if(e(317)===n[e(310)]){if(c=a[e(243)]?y:_,n[e(328)]===g)continue;return{value:n[e(328)],done:a[e(243)]}}"throw"===n.type&&(c=y,a[e(342)]=e(273),a[e(328)]=n[e(328)])}})}),r}function h(t,r,e){var n=u;try{return{type:n(317),arg:t[n(324)](r,e)}}catch(t){return{type:n(273),arg:t}}}c[u(258)]=f;var v=u(333),_="suspendedYield",b=u(325),y=u(341),g={};function m(){}function a(){}function x(){}var r={},d=(o(r,i,function(){return this}),Object[u(312)]),d=d&&d(d(P([]))),w=(d&&d!==t&&l[u(324)](d,i)&&(r=d),x[u(338)]=m[u(338)]=Object[u(254)](r));function j(t){var r=u;[r(299),r(273),"return"].forEach(function(r){o(t,r,function(t){return this[_0x4fc1(233)](r,t)})})}function E(c,f){var r,o=u;p(this,o(233),{value:function(e,n){function t(){return new f(function(t,r){!function r(t,e,n,o){var i,a=_0x4fc1,t=h(c[t],c,e);if(a(273)!==t[a(310)])return(e=(i=t.arg)[a(236)])&&"object"==_typeof(e)&&l.call(e,"__await")?f[a(340)](e.__await)[a(257)](function(t){r("next",t,n,o)},function(t){r("throw",t,n,o)}):f[a(340)](e)[a(257)](function(t){i.value=t,n(i)},function(t){return r(a(273),t,n,o)});o(t[a(328)])}(e,n,t,r)})}return r=r?r[o(257)](t,t):t()}})}function L(t){var r=u,e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e[r(240)]=t[2],e[r(318)]=t[3]),this[r(263)][r(297)](e)}function O(t){var r=u,e=t[r(295)]||{};e[r(310)]=r(317),delete e[r(328)],t[r(295)]=e}function S(t){var r=u;this[r(263)]=[{tryLoc:r(279)}],t[r(290)](L,this),this[r(291)](!0)}function P(e){var n=u;if(e||""===e){var o,t=e[i];if(t)return t[n(324)](e);if("function"==typeof e.next)return e;if(!isNaN(e[n(238)]))return o=-1,(t=function t(){for(var r=n;++o<e[r(238)];)if(l[r(324)](e,o))return t.value=e[o],t.done=!1,t;return t[r(236)]=s,t[r(243)]=!0,t})[n(299)]=t}throw new TypeError(_typeof(e)+" is not iterable")}return a[u(338)]=x,p(w,u(262),{value:x,configurable:!0}),p(x,u(262),{value:a,configurable:!0}),a[u(286)]=o(x,n,"GeneratorFunction"),c[u(329)]=function(t){var r=u,t="function"==typeof t&&t.constructor;return!!t&&(t===a||r(336)===(t.displayName||t.name))},c.mark=function(t){var r=u;return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t[r(320)]=x,o(t,n,r(336))),t[r(338)]=Object[r(254)](w),t},c[u(265)]=function(t){return{__await:t}},j(E[u(338)]),o(E[u(338)],e,function(){return this}),c[u(322)]=E,c[u(335)]=function(t,r,e,n,o){var i=u,a=(void 0===o&&(o=Promise),new E(f(t,r,e,n),o));return c[i(329)](r)?a:a.next().then(function(t){var r=i;return t[r(243)]?t[r(236)]:a[r(299)]()})},j(w),o(w,n,u(332)),o(w,i,function(){return this}),o(w,u(293),function(){return u(271)}),c[u(251)]=function(t){var r,n=u,o=Object(t),i=[];for(r in o)i[n(297)](r);return i[n(331)](),function t(){for(var r=n;i.length;){var e=i[r(260)]();if(e in o)return t[r(236)]=e,t[r(243)]=!1,t}return t[r(243)]=!0,t}},c[u(280)]=P,S[u(338)]={constructor:S,reset:function(t){var r=u;if(this.prev=0,this[r(299)]=0,this[r(244)]=this[r(343)]=s,this.done=!1,this[r(274)]=null,this.method=r(299),this[r(328)]=s,this[r(263)].forEach(O),!t)for(var e in this)"t"===e[r(272)](0)&&l[r(324)](this,e)&&!isNaN(+e.slice(1))&&(this[e]=s)},stop:function(){var t=u,r=(this[t(243)]=!0,this[t(263)][0][t(295)]);if(t(273)===r[t(310)])throw r.arg;return this[t(248)]},dispatchException:function(n){var o=u;if(this[o(243)])throw n;var i=this;function t(t,r){var e=o;return a[e(310)]=e(273),a[e(328)]=n,i[e(299)]=t,r&&(i[e(342)]=e(299),i[e(328)]=s),!!r}for(var r=this[o(263)].length-1;0<=r;--r){var e=this[o(263)][r],a=e[o(295)];if("root"===e[o(302)])return t(o(237));if(e.tryLoc<=this[o(319)]){var c=l[o(324)](e,"catchLoc"),f=l[o(324)](e,o(240));if(c&&f){if(this[o(319)]<e[o(326)])return t(e[o(326)],!0);if(this.prev<e[o(240)])return t(e[o(240)])}else if(c){if(this[o(319)]<e.catchLoc)return t(e[o(326)],!0)}else{if(!f)throw Error(o(294));if(this[o(319)]<e[o(240)])return t(e.finallyLoc)}}}},abrupt:function(t,r){for(var e=u,n=this[e(263)].length-1;0<=n;--n){var o=this[e(263)][n];if(o[e(302)]<=this[e(319)]&&l[e(324)](o,e(240))&&this[e(319)]<o[e(240)]){var i=o;break}}var a=(i=i&&(e(256)===t||e(339)===t)&&i.tryLoc<=r&&r<=i[e(240)]?null:i)?i.completion:{};return a.type=t,a[e(328)]=r,i?(this[e(342)]=e(299),this[e(299)]=i.finallyLoc,g):this.complete(a)},complete:function(t,r){var e=u;if(e(273)===t[e(310)])throw t.arg;return e(256)===t.type||e(339)===t[e(310)]?this[e(299)]=t.arg:"return"===t[e(310)]?(this[e(248)]=this[e(328)]=t.arg,this[e(342)]=e(261),this.next="end"):e(317)===t[e(310)]&&r&&(this[e(299)]=r),g},finish:function(t){for(var r=u,e=this.tryEntries[r(238)]-1;0<=e;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this[r(304)](n.completion,n[r(318)]),O(n),g}},catch:function(t){for(var r=u,e=this.tryEntries[r(238)]-1;0<=e;--e){var n,o,i=this[r(263)][e];if(i.tryLoc===t)return n=i[r(295)],r(273)===n[r(310)]&&(o=n.arg,O(i)),o}throw Error("illegal catch attempt")},delegateYield:function(t,r,e){var n=u;return this[n(274)]={iterator:P(t),resultName:r,nextLoc:e},n(299)===this[n(342)]&&(this[n(328)]=s),g}},c}function _0x4fc1(t,r){var e=_0x59a8();return(_0x4fc1=function(t,r){return e[t-=233]})(t,r)}function asyncGeneratorStep(t,r,e,n,o,i,a){var c=_0x4fc1;try{var f=t[i](a),u=f[c(236)]}catch(t){return void e(t)}f[c(243)]?r(u):Promise[c(340)](u)[c(257)](n,o)}function _asyncToGenerator(f){return function(){var t=this,c=arguments;return new Promise(function(r,e){var n=_0x4fc1,o=f[n(266)](t,c);function i(t){asyncGeneratorStep(o,r,e,i,a,n(299),t)}function a(t){asyncGeneratorStep(o,r,e,i,a,n(273),t)}i(void 0)})}}(()=>{for(var t=_0x4fc1,r=_0x59a8();;)try{if(864890==-parseInt(t(285))+-parseInt(t(253))/2+parseInt(t(301))/3*(-parseInt(t(305))/4)+parseInt(t(316))/5+parseInt(t(309))/6*(parseInt(t(311))/7)+parseInt(t(284))/8+parseInt(t(242))/9*(parseInt(t(275))/10))break;r.push(r.shift())}catch(t){r.push(r.shift())}})();var ascf=require(_0x465b0f(315)),_require=require("commander"),Command=_require[_0x465b0f(327)],pkg=require(_0x465b0f(281)),program=new Command;function _0x59a8(){var t=["wrap","asyncIterator","pop","return","constructor","tryEntries","compile <projectRoot>","awrap","apply","Environment is development","parse","-o, --output <output-directory>","Clear build resource","[object Generator]","charAt","throw","delegate","50BJUxVN","action","symbol","function","root","values","../../package.json","abrupt","@@toStringTag","3230288XYkgDE","148544fujAHV","displayName","stop","The iterator does not provide a '","Compile ascf project","forEach","reset","description","toString","try statement without catch or finally","completion","iterator result is not an object","push","resultName","next","Validate path","2288859UOSfAn","tryLoc","--debug","complete","4ElMyMK","Clear convert output path","toStringTag","-m, --mode","9678sFYTDE","type","1295xVcaet","getPrototypeOf","convert","_ascfCliProgram","../index","573890lcvPpf","normal","afterLoc","prev","__proto__","-w, --watch","AsyncIterator","option","call","executing","catchLoc","Command","arg","isGeneratorFunction","mark","reverse","Generator","suspendedStart","@@asyncIterator","async","GeneratorFunction","defineProperty","prototype","continue","resolve","completed","method","_sent","_invoke","opts","-c, --clear","value","end","length","hasOwnProperty","finallyLoc","iterator","4458330GNzxog","done","sent","debug","requiredOption","dispatchException","rval","Generator is already running","command","keys","-va, --validate","3034864kCVLPF","create","argv","break","then"];return(_0x59a8=function(){return t})()}program.version(pkg.version)[_0x465b0f(292)]("ascf toolkit convert and compile ascf project")[_0x465b0f(323)](_0x465b0f(303),"enable debug logging"),program[_0x465b0f(250)]("convert").description("Convert miniprogram project to ascf project")[_0x465b0f(246)]("-i, --input <input-directory>")[_0x465b0f(246)](_0x465b0f(269))[_0x465b0f(323)]("-c, --clear",_0x465b0f(306))[_0x465b0f(323)](_0x465b0f(252),_0x465b0f(300))[_0x465b0f(276)]((()=>{var r=_0x465b0f,e=_asyncToGenerator(_regeneratorRuntime()[r(330)](function t(e){return _regeneratorRuntime().wrap(function(t){for(var r=_0x4fc1;;)switch(t[r(319)]=t[r(299)]){case 0:return t[r(299)]=2,ascf[r(313)](e);case 2:case r(237):return t[r(287)]()}},t)}));return function(t){return e[r(266)](this,arguments)}})()),program[_0x465b0f(250)](_0x465b0f(264))[_0x465b0f(292)](_0x465b0f(289))[_0x465b0f(323)]("-p, --progress","Show build progress")[_0x465b0f(323)](_0x465b0f(321),"Watch for changes")[_0x465b0f(323)](_0x465b0f(308),_0x465b0f(267)).option(_0x465b0f(235),_0x465b0f(270)).action((()=>{var i=_0x465b0f,e=_asyncToGenerator(_regeneratorRuntime()[i(330)](function t(e,n){var o=i;return _regeneratorRuntime()[o(258)](function(t){for(var r=o;;)switch(t[r(319)]=t[r(299)]){case 0:return t[r(299)]=2,ascf.compile(e,n);case 2:case r(237):return t[r(287)]()}},t)}));return function(t,r){return e[i(266)](this,arguments)}})()),program[_0x465b0f(268)](process[_0x465b0f(255)]),global[_0x465b0f(314)]=program,global._ascfDebug=!(null==(_global$_ascfCliProgr=global[_0x465b0f(314)][_0x465b0f(234)]())||!_global$_ascfCliProgr[_0x465b0f(245)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x36c519=_0x22b7;function _typeof(r){var t=_0x22b7;return(_typeof="function"==typeof Symbol&&t(181)==typeof Symbol[t(195)]?function(r){return typeof r}:function(r){var e=t;return r&&"function"==typeof Symbol&&r[e(233)]===Symbol&&r!==Symbol[e(187)]?"symbol":typeof r})(r)}function _classCallCheck(r,e){var t=_0x22b7;if(!(r instanceof e))throw new TypeError(t(235))}function _defineProperties(r,e){for(var t=_0x22b7,n=0;n<e[t(202)];n++){var o=e[n];o[t(234)]=o[t(234)]||!1,o[t(176)]=!0,"value"in o&&(o[t(215)]=!0),Object.defineProperty(r,_toPropertyKey(o.key),o)}}function _createClass(r,e,t){var n=_0x22b7;return e&&_defineProperties(r[n(187)],e),t&&_defineProperties(r,t),Object[n(182)](r,n(187),{writable:!1}),r}function _toPropertyKey(r){r=_toPrimitive(r,"string");return"symbol"==_typeof(r)?r:r+""}function _toPrimitive(r,e){var t=_0x22b7;if(t(223)!=_typeof(r)||!r)return r;var n=r[Symbol[t(212)]];if(void 0===n)return(t(158)===e?String:Number)(r);n=n[t(240)](r,e||t(192));if(t(223)!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _0x4b43(){var r=["writable","getBuildMsg","from","compileTime: ","extraInfo","replace","file","137490aiJAtZ","object","calculate","1461138iwdpUa","Error: ","Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","origin","714ZIGwKw","(Emitted value instead of an instance of Error) ","../ascf-compiler/chalk/bundle.cjs","689666LwvToL","constructor","enumerable","Cannot call a class as a function","tap","Map","Arguments","endTime","call","44485IqOCEy","concat","options","errors","noteCount"," ms","info","reduce","compilation","string","assign","some","warn","error","hasWarnings","17800HCUvln","includes","297vxsHrX","warnCount","level","439184HrPzDp","slice","stringify","warnings","showtime","true","ModuleNotFoundError","configurable","3hCMXRI","hasErrors","exports","warningCount","symbol","defineProperty","displayErrors","green","map","ERROR: ","prototype","hooks","\nCOMPILE RESULT:SUCCESS","forEach","dropRepeat","default","message","errorCount","iterator","Object","810FQrzxS","formatters","2081045bCaKvY","\n@ ","showCompileTime","length","startTime","printCompileResult","BuildLogOutputPlugin","test","name","isArray","@@iterator","transformers","undefined","toPrimitive","warning","Module not found"];return(_0x4b43=function(){return r})()}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError(_0x22b7(227))}function _unsupportedIterableToArray(r,e){var t,n=_0x22b7;if(r)return n(158)==typeof r?_arrayLikeToArray(r,e):(t={}.toString.call(r)[n(170)](8,-1),n(196)===t&&r[n(233)]&&(t=r.constructor[n(207)]),n(237)===t||"Set"===t?Array[n(217)](r):n(238)===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[n(206)](t)?_arrayLikeToArray(r,e):void 0)}function _iterableToArray(r){var e=_0x22b7;if(e(211)!=typeof Symbol&&null!=r[Symbol[e(195)]]||null!=r[e(209)])return Array.from(r)}function _arrayWithoutHoles(r){if(Array[_0x22b7(208)](r))return _arrayLikeToArray(r)}function _arrayLikeToArray(r,e){var t=_0x22b7;(null==e||e>r[t(202)])&&(e=r[t(202)]);for(var n=0,o=Array(e);n<e;n++)o[n]=r[n];return o}(()=>{for(var r=_0x22b7,e=_0x4b43();;)try{if(398930==+parseInt(r(232))+parseInt(r(225))/2+parseInt(r(177))/3*(-parseInt(r(169))/4)+parseInt(r(199))/5+parseInt(r(229))/6*(-parseInt(r(241))/7)+-parseInt(r(164))/8*(parseInt(r(197))/9)+parseInt(r(222))/10*(-parseInt(r(166))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}})();var TYPE=_0x36c519(214),chalk=require(_0x36c519(231));function defaultFormatter(r,e){var t=_0x36c519;return r[t(156)](function(r,e){return[][t(242)](_toConsumableArray(r),["\n".concat(e.message)])},[])}function babelSyntaxError(r){var e=_0x36c519;return isBabelSyntaxError(r)&&(r[e(193)]=cleanStackTrace(r[e(193)])),r}function isBabelSyntaxError(r){var e=_0x36c519;return"ModuleBuildError"===r[e(207)]&&r[e(193)].includes("SyntaxError")}function cleanStackTrace(r){var e=_0x36c519;return r[e(220)](/^\s*at\s.*:\d+:\d+[\s\)]*\n/gm,"")[e(220)](/^Module build failed.*:\s/,e(226))}function moduleNotFoundError(r){var e,t=_0x36c519;return r[t(207)]===t(175)&&r[t(193)][t(165)](TYPE)&&(r[t(193)]=r[t(193)].replace(TYPE,t(186)[t(242)](TYPE)),e=r[t(228)]&&r.origin.resource)&&(r.message+=t(200)[t(242)](e)),r}chalk[_0x36c519(168)]=1;var defaultFormatters=[defaultFormatter],defaultTransformers=[babelSyntaxError,moduleNotFoundError];function extractError(r){var e=_0x36c519;return{message:r.message,file:r[e(221)],origin:r[e(228)],name:r[e(207)],severity:0,webpackError:r}}function cleanMessage(r){var e=_0x36c519;return r[e(220)](e(230),"")[e(220)](/Module Warning[^\n]+\n/,"")[e(220)](/Module Error[^\n]+\n/,"")}function transformErrors(r,e){function t(r,e){return e(r)}var n=_0x36c519;return r[n(185)](extractError)[n(185)](function(r){return e[_0x22b7(156)](t,r)})}function formatErrors(e,r,t){var n=_0x36c519;return r.map(function(r){return r(e,t)||[]})[n(156)](function(r,e){return r.concat(e)},[])}function getCompileTime(r){var e=_0x36c519,t=r[e(239)],r=r[e(203)];console.info(chalk[e(184)](e(218)[e(242)](t-r,e(154))))}function _0x22b7(r,e){var t=_0x4b43();return(_0x22b7=function(r,e){return t[r-=154]})(r,e)}function _dropRepeat(r){var e=_0x36c519;return r[e(156)](function(r,t){var n=e;return r[n(160)](function(r){var e=n;return r.message===t[e(193)]})?r:r.concat(t)},[])}var BuildLogOutputPlugin=(()=>{var u=_0x36c519;return _createClass(function r(){var e=_0x22b7,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=t.showCompileTime,n=void 0!==n&&n,t=t.options;_classCallCheck(this,r),this.errorCount=0,this[e(180)]=0,this[e(245)]=0,this[e(201)]=n||process.env[e(173)]===e(174),this[e(198)]=defaultFormatters,this[e(210)]=defaultTransformers,this[e(243)]=t},[{key:"apply",value:function(r){var u=_0x22b7,s=this;r[u(188)].done[u(236)](u(205),function(e){var t=u,r=(s[t(191)](e),e[t(157)]),n=r[t(244)],o=r[t(172)],a=e[t(178)](),i=e[t(163)]();setTimeout(function(){var r=t;a&&s[r(183)](n,"error"),i&&s[r(183)](o,r(213)),s[r(224)](e,n,o),s[r(204)](),s[r(201)]&&getCompileTime(e)})})}},{key:u(191),value:function(r){var e=u;r[e(157)][e(172)]=_dropRepeat(r[e(157)][e(172)]),r[e(157)][e(244)]=_dropRepeat(r[e(157)][e(244)])}},{key:u(224),value:function(r,e){var t=u,n=this,o=2<arguments[t(202)]&&void 0!==arguments[2]?arguments[2]:[],r=r[t(157)][t(219)]||{},a=r[t(194)],a=void 0===a?0:a,i=r[t(167)],i=void 0===i?0:i,r=r[t(245)],r=void 0===r?0:r;this[t(194)]=e[t(202)]+a,this[t(180)]=i,this[t(245)]=r,o[t(190)](function(r){var e=t,r=r[e(193)];/^NOTE:/[e(206)](cleanMessage(r))?n[e(245)]++:n[e(180)]++})}},{key:u(204),value:function(){var r,e=u,t=this[e(194)],n=this[e(180)],o=this[e(245)];0<t+n+o?(r=t?"FAIL ":"SUCCESS ",t=Object[e(159)]({},t?{ERROR:t}:{},n?{WARN:n}:{},o?{NOTE:o}:{}),console[e(161)](chalk.yellow("\nCOMPILE RESULT:"[e(242)](r)[e(242)](JSON[e(171)](t))))):console[e(155)](chalk[e(184)](e(189)))}},{key:"displayErrors",value:function(r,t){var n=u;formatErrors(transformErrors(r,this.transformers),this[n(198)],t)[n(190)](function(r){var e=n;t===e(162)&&console[e(162)](chalk.red(cleanMessage(r))),t===e(213)&&console[e(161)](chalk.yellow(cleanMessage(r)))})}},{key:u(216),value:function(r,e){var t=u;return formatErrors(transformErrors(r,this[t(210)]),this[t(198)],e)[t(185)](function(r){return cleanMessage(r)})}}])})();module[_0x36c519(179)]=BuildLogOutputPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x4d89(r,t){var n=_0x51c9();return(_0x4d89=function(r,t){return n[r-=320]})(r,t)}function _0x51c9(){var r=["length","1357272QvZKvW","directives","value","9MPDSrh","459416BJpprH","1913140PHmHiA","1944534qaQaYZ","splice","26435270uIKVrl","4416235eEUQzu","use strict","49BeAAeN","8COQGDX","6881106IKIwNn"];return(_0x51c9=function(){return r})()}(()=>{for(var r=_0x4d89,t=_0x51c9();;)try{if(808084==-parseInt(r(324))+parseInt(r(329))/2+parseInt(r(330))/3*(-parseInt(r(321))/4)+-parseInt(r(333))/5+parseInt(r(322))/6+-parseInt(r(320))/7*(parseInt(r(328))/8)+parseInt(r(327))/9*(parseInt(r(332))/10))break;t.push(t.shift())}catch(r){t.push(t.shift())}})(),module.exports=function(){return{visitor:{Program:{exit:function(r){for(var t=_0x4d89,n=r.node[t(325)],e=n[t(323)]-1;0<=e;e--)n[e][t(326)][t(326)]===t(334)&&n[t(331)](e,1)}}}}};
|
package/lib/common/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x261097=_0x5f03,rimraf=((()=>{for(var e=_0x5f03,r=_0x78ff();;)try{if(844374==+parseInt(e(131))+parseInt(e(179))/2+-parseInt(e(135))/3+-parseInt(e(133))/4+parseInt(e(189))/5+-parseInt(e(197))/6*(-parseInt(e(192))/7)+parseInt(e(154))/8*(-parseInt(e(196))/9))break;r.push(r.shift())}catch(e){r.push(r.shift())}})(),require("rimraf")),fs=require("fs"),path=require(_0x261097(121)),_require=require("child_process"),execSync=_require[_0x261097(146)],_require2=require(_0x261097(163)),satisfies=_require2[_0x261097(178)],JSON5=require(_0x261097(116)),chalk=require(_0x261097(143)),projectPath=(chalk[_0x261097(193)]=1,process.env[_0x261097(198)]||process.cwd()),projectCfg=readProjectCfgJson(projectPath)||{},srcPath=path.resolve(projectPath,_0x261097(152));function readJsonFile(r){var t=_0x261097;if(!fs[t(187)](r))return{};var e={};try{e=JSON5[t(150)](fs[t(190)](r,t(141)).toString())}catch(e){throw new Error(t(186)[t(159)](r,t(158)))}return e}function writeJsonFile(e,r){var t=_0x261097;try{fs.writeFileSync(e,JSON[t(137)](r,null,2))}catch(e){throw"ERROR: Write JSON file failed: ".concat(e)}}function initVersionType(){var e=_0x261097,r=[e(140),"beta",e(157)],t=process[e(151)][e(145)];global[e(153)]=e(140),t&&r[e(149)](t)?global[e(153)]=t:(r="true"===process.env[e(117)],global[e(153)]=r?e(157):"debug")}function readProjectCfgJson(e){var r,t=_0x261097,e=path[t(148)](e,t(175));return r=fs[t(187)](e)?JSON[t(150)](fs[t(190)](e)[t(200)]()):r}function getEntryPackageName(){var e=_0x261097,r=path[e(155)](projectPath,e(176)),r=JSON5[e(150)](fs[e(190)](r)[e(200)]());if(r[e(124)]&&0!==r[e(124)][e(191)])return r.modules[0][e(164)];throw e(136)}function checkPath(e,r){var t=_0x261097;require(t(181))[t(130)](e)[t(170)][t(120)]?(e=path[t(155)](r,t(176)),fs[t(187)](e)?(e=JSON5.parse(fs[t(190)](e)[t(200)]()))[t(124)]&&0!==e.modules[t(191)]?(r=path.resolve(r,e[t(124)][0][t(164)],t(183)),(e=JSON5[t(150)](fs[t(190)](r).toString()))[t(184)]&&Object[t(162)][t(167)][t(173)](e.dependencies,t(182))?console[t(127)](chalk.green(t(161))):console.error(chalk[t(129)](t(123)))):console[t(119)](chalk.red(t(123))):console[t(119)](chalk[t(129)](t(123)))):console[t(119)](chalk.red(t(180)))}function _0x78ff(){var e=["3039272vWVpbW","Input path is not MiniProgram src.","../ascf-converter/features/converter.js","@atomicservice/ascf","./oh-package.json5","dependencies","version","parse json file ","existsSync",'INFO: @atomicservice/ascf-toolkit can be upgraded, execute command "npm update -g @atomicservice/ascf-toolkit ',"955410FoXAlc","readFileSync","length","3204509JdxcYS","level","ascfRoot","sync","36513GWcJpD","12JfYAGH","projectRoot"," does not depend on ASCF Shared Library. Select a project that does, or create a new one.","toString","trim","isLatestAscfHar","json5","uglifyjs","WARNING: ","error","returnCode","path","INFO: ASCF Shared Library can be upgraded.","Output path is not an ASCF project.","modules","checkPath","all","info","yellow","red","checkInputPathFun","931490KKVbun","green","3588836WkccWr","IS_PRD","3245646DsifYu","ERROR: build-profile.json5 file modules is null","stringify","package.json","RAWFILE_DIR","debug","utf-8","ASCF_BUILD_PATH","../ascf-compiler/chalk/bundle.cjs","oh-package.json5","versionType","execSync","warn","join","includes","parse","env","ascf/ascf_src","_versionType","1448mzUHLg","resolve","readJsonFile","release"," error","concat","production","Check success.","prototype","semver","srcPath","isLatestAscfToolkit","PROJECT_CONFIG","hasOwnProperty","npm view @atomicservice/ascf-toolkit version","map","data","split","ascf","call","@atomicservice/ascf-toolkit","ascf.config.json","build-profile.json5","src/main/resources/rawfile","satisfies"];return(_0x78ff=function(){return e})()}function _0x5f03(e,r){var t=_0x78ff();return(_0x5f03=function(e,r){return t[e-=116]})(e,r)}initVersionType(),exports[_0x261097(134)]=process[_0x261097(151)].NODE_ENV===_0x261097(160),exports.PROJECT_PATH=projectPath,exports[_0x261097(166)]=projectCfg,exports.ASCF_SRC_PATH=projectCfg[_0x261097(194)]?path[_0x261097(155)](srcPath,projectCfg[_0x261097(194)]):srcPath,exports[_0x261097(142)]=path[_0x261097(155)](projectPath,_0x261097(172),"ascf_build"),exports[_0x261097(139)]=_0x261097(177),exports.clearResource=function(e){var o=_0x261097;return Promise[o(126)](e[o(169)](function(r){var t=o;if(fs[t(187)](r))return new Promise(function(e){rimraf[t(195)](r),e()})}))},exports.isPrivatePkg=function(){var e=_0x261097,r=readJsonFile(path[e(148)](__dirname,"..","..",e(138))).name;return r!==e(174)&&r[e(149)]("/")},exports[_0x261097(156)]=readJsonFile,exports.writeJsonFile=writeJsonFile,exports[_0x261097(165)]=function(){var e=_0x261097,r=0<arguments[e(191)]&&void 0!==arguments[0]&&arguments[0],t=JSON[e(150)](fs[e(190)](path.join(__dirname,"..","..",e(138)),"utf-8")[e(200)]())[e(185)],o=execSync(e(168),{timeout:5e3})[e(200)]()[e(201)]();t!==o&&(r?console[e(147)](chalk.yellow('WARNING: @atomicservice/ascf-toolkit can be upgraded, execute command "npm update -g @atomicservice/ascf-toolkit '.concat(o,'"'))):console.info(chalk[e(132)](e(188)[e(159)](o,'"'))))},exports[_0x261097(202)]=function(){var e,r=_0x261097,t=0<arguments[r(191)]&&void 0!==arguments[0]&&arguments[0],o=path[r(148)](projectPath,getEntryPackageName(),r(144)),a=JSON5[r(150)](fs[r(190)](o,r(141)).toString())[r(184)]["@atomicservice/ascf"];a?(e=execSync("ohpm info @atomicservice/ascf -ft 10000",{timeout:5e3})[r(200)]()[r(171)]("latest[39m:")[1][r(171)]("\n")[0][r(201)](),satisfies(e,a)||"latest"===a.toLowerCase()||(t?console.warn(chalk[r(128)]("WARNING: ASCF Shared Library can be upgraded.")):console.info(chalk.green(r(122))))):console[r(147)](chalk[r(128)](r(118).concat(o,r(199))))},exports[_0x261097(125)]=checkPath;
|
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
interface CompileOption {
|
|
2
|
+
clear?: boolean,
|
|
3
|
+
mode?: boolean,
|
|
4
|
+
progress?: boolean,
|
|
5
|
+
watch?: boolean
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ConvertOption {
|
|
9
|
+
clear?: boolean,
|
|
10
|
+
input?: string,
|
|
11
|
+
output?: string,
|
|
12
|
+
validate?: boolean,
|
|
13
|
+
check?: boolean
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export declare function compile(projectPath: String, option: CompileOption): Promise<void>
|
|
17
|
+
|
|
18
|
+
export declare function convert(option: ConvertOption): Promise<void>
|
|
19
|
+
|
|
20
|
+
export declare function getAscfToolkitDirname(): string
|
package/lib/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _0x360d98=_0x21ce;function _0x21ce(t,e){var r=_0x3e12();return(_0x21ce=function(t,e){return r[t-=241]})(t,e)}function _typeof(t){var r=_0x21ce;return(_typeof=r(300)==typeof Symbol&&r(376)==typeof Symbol[r(322)]?function(t){return typeof t}:function(t){var e=r;return t&&e(300)==typeof Symbol&&t[e(353)]===Symbol&&t!==Symbol[e(305)]?e(376):typeof t})(t)}function _regeneratorRuntime(){var s=_0x21ce;_regeneratorRuntime=function(){return a};var f,a={},t=Object.prototype,l=t[s(286)],h=Object[s(299)]||function(t,e,r){var n=s;t[e]=r[n(374)]},e=s(300)==typeof Symbol?Symbol:{},i=e[s(322)]||s(344),r=e[s(339)]||"@@asyncIterator",n=e[s(333)]||s(302);function o(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{o({},"")}catch(t){o=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var o,i,c,a,u=s,e=e&&e[u(305)]instanceof _?e:_,e=Object[u(277)](e[u(305)]),n=new L(n||[]);return h(e,u(328),{value:(o=t,i=r,c=n,a=v,function(t,e){var r=_0x21ce;if(a===d)throw Error("Generator is already running");if(a===m){if("throw"===t)throw e;return{value:f,done:!0}}for(c[r(309)]=t,c[r(317)]=e;;){var n=c[r(266)];if(n){n=function t(e,r){var n=s,o=r[n(309)],i=e.iterator[o];if(i===f)return r.delegate=null,"throw"===o&&e[n(322)].return&&(r[n(309)]=n(249),r[n(317)]=f,t(e,r),n(278)===r[n(309)])||n(249)!==o&&(r.method="throw",r[n(317)]=new TypeError(n(373)+o+n(261))),g;o=p(i,e.iterator,r[n(317)]);if(n(278)===o[n(281)])return r[n(309)]=n(278),r[n(317)]=o[n(317)],r[n(266)]=null,g;i=o.arg;return i?i[n(335)]?(r[e[n(375)]]=i[n(374)],r.next=e[n(320)],n(249)!==r[n(309)]&&(r.method="next",r[n(317)]=f),r.delegate=null,g):i:(r.method=n(278),r[n(317)]=new TypeError("iterator result is not an object"),r[n(266)]=null,g)}(n,c);if(n){if(n===g)continue;return n}}if(r(304)===c[r(309)])c[r(275)]=c[r(247)]=c[r(317)];else if("throw"===c[r(309)]){if(a===v)throw a=m,c[r(317)];c[r(271)](c[r(317)])}else r(249)===c[r(309)]&&c[r(296)](r(249),c.arg);a=d;n=p(o,i,c);if(r(319)===n[r(281)]){if(a=c[r(335)]?m:y,n[r(317)]===g)continue;return{value:n[r(317)],done:c[r(335)]}}r(278)===n.type&&(a=m,c[r(309)]=r(278),c.arg=n[r(317)])}})}),e}function p(t,e,r){var n=s;try{return{type:n(319),arg:t[n(315)](e,r)}}catch(t){return{type:n(278),arg:t}}}a.wrap=u;var v=s(276),y="suspendedYield",d=s(289),m=s(348),g={};function _(){}function c(){}function b(){}var e={},w=(o(e,i,function(){return this}),Object[s(349)]),w=w&&w(w(P([]))),x=(w&&w!==t&&l[s(315)](w,i)&&(e=w),b.prototype=_[s(305)]=Object[s(277)](e));function k(t){var e=s;[e(304),e(278),e(249)][e(346)](function(e){o(t,e,function(t){return this[_0x21ce(328)](e,t)})})}function j(a,u){var e;h(this,s(328),{value:function(r,n){function t(){return new u(function(t,e){!function e(t,r,n,o){var i,c=_0x21ce,t=p(a[t],a,r);if("throw"!==t.type)return(r=(i=t[c(317)])[c(374)])&&c(345)==_typeof(r)&&l.call(r,c(360))?u.resolve(r[c(360)])[c(356)](function(t){e(c(304),t,n,o)},function(t){e(c(278),t,n,o)}):u[c(243)](r).then(function(t){i[c(374)]=t,n(i)},function(t){return e(c(278),t,n,o)});o(t[c(317)])}(r,n,t,e)})}return e=e?e.then(t,t):t()}})}function E(t){var e=s,r={tryLoc:t[0]};1 in t&&(r.catchLoc=t[1]),2 in t&&(r[e(338)]=t[2],r[e(368)]=t[3]),this.tryEntries.push(r)}function I(t){var e=s,r=t[e(331)]||{};r[e(281)]=e(319),delete r[e(317)],t[e(331)]=r}function L(t){var e=s;this.tryEntries=[{tryLoc:e(321)}],t[e(346)](E,this),this[e(244)](!0)}function P(r){var n=s;if(r||""===r){var o,t=r[i];if(t)return t[n(315)](r);if(n(300)==typeof r[n(304)])return r;if(!isNaN(r[n(256)]))return o=-1,(t=function t(){for(var e=n;++o<r.length;)if(l[e(315)](r,o))return t[e(374)]=r[o],t.done=!1,t;return t[e(374)]=f,t.done=!0,t}).next=t}throw new TypeError(_typeof(r)+" is not iterable")}return c.prototype=b,h(x,s(353),{value:b,configurable:!0}),h(b,"constructor",{value:c,configurable:!0}),c[s(242)]=o(b,n,s(250)),a.isGeneratorFunction=function(t){var e=s,t=e(300)==typeof t&&t.constructor;return!!t&&(t===c||e(250)===(t[e(242)]||t.name))},a[s(314)]=function(t){var e=s;return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t[e(350)]=b,o(t,n,e(250))),t[e(305)]=Object[e(277)](x),t},a[s(283)]=function(t){return{__await:t}},k(j[s(305)]),o(j[s(305)],r,function(){return this}),a[s(347)]=j,a[s(361)]=function(t,e,r,n,o){var i=s,c=(void 0===o&&(o=Promise),new j(u(t,e,r,n),o));return a[i(253)](e)?c:c[i(304)]().then(function(t){var e=i;return t.done?t[e(374)]:c.next()})},k(x),o(x,n,"Generator"),o(x,i,function(){return this}),o(x,s(259),function(){return s(264)}),a[s(340)]=function(t){var e,n=s,o=Object(t),i=[];for(e in o)i[n(255)](e);return i[n(359)](),function t(){for(var e=n;i[e(256)];){var r=i[e(260)]();if(r in o)return t[e(374)]=r,t[e(335)]=!1,t}return t.done=!0,t}},a[s(363)]=P,L.prototype={constructor:L,reset:function(t){var e=s;if(this[e(316)]=0,this.next=0,this.sent=this[e(247)]=f,this[e(335)]=!1,this[e(266)]=null,this.method="next",this[e(317)]=f,this[e(358)][e(346)](I),!t)for(var r in this)"t"===r.charAt(0)&&l[e(315)](this,r)&&!isNaN(+r.slice(1))&&(this[r]=f)},stop:function(){var t=s,e=(this[t(335)]=!0,this[t(358)][0][t(331)]);if("throw"===e[t(281)])throw e[t(317)];return this.rval},dispatchException:function(n){var t=s;if(this.done)throw n;var o=this;function e(t,e){var r=_0x21ce;return c[r(281)]="throw",c[r(317)]=n,o[r(304)]=t,e&&(o[r(309)]="next",o[r(317)]=f),!!e}for(var r=this[t(358)][t(256)]-1;0<=r;--r){var i=this[t(358)][r],c=i.completion;if("root"===i[t(268)])return e(t(323));if(i[t(268)]<=this[t(316)]){var a=l[t(315)](i,t(270)),u=l[t(315)](i,t(338));if(a&&u){if(this[t(316)]<i[t(270)])return e(i[t(270)],!0);if(this[t(316)]<i[t(338)])return e(i[t(338)])}else if(a){if(this[t(316)]<i[t(270)])return e(i[t(270)],!0)}else{if(!u)throw Error(t(325));if(this[t(316)]<i[t(338)])return e(i[t(338)])}}}},abrupt:function(t,e){for(var r=s,n=this[r(358)][r(256)]-1;0<=n;--n){var o=this.tryEntries[n];if(o[r(268)]<=this.prev&&l.call(o,r(338))&&this[r(316)]<o[r(338)]){var i=o;break}}var c=(i=i&&(r(293)===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc?null:i)?i[r(331)]:{};return c[r(281)]=t,c[r(317)]=e,i?(this.method=r(304),this[r(304)]=i[r(338)],g):this[r(355)](c)},complete:function(t,e){var r=s;if(r(278)===t[r(281)])throw t[r(317)];return"break"===t.type||"continue"===t[r(281)]?this[r(304)]=t[r(317)]:r(249)===t[r(281)]?(this[r(367)]=this[r(317)]=t[r(317)],this[r(309)]=r(249),this[r(304)]=r(323)):r(319)===t.type&&e&&(this[r(304)]=e),g},finish:function(t){for(var e=s,r=this[e(358)].length-1;0<=r;--r){var n=this[e(358)][r];if(n[e(338)]===t)return this[e(355)](n[e(331)],n[e(368)]),I(n),g}},catch:function(t){for(var e=s,r=this[e(358)].length-1;0<=r;--r){var n,o,i=this.tryEntries[r];if(i.tryLoc===t)return n=i[e(331)],e(278)===n[e(281)]&&(o=n[e(317)],I(i)),o}throw Error("illegal catch attempt")},delegateYield:function(t,e,r){var n=s;return this[n(266)]={iterator:P(t),resultName:e,nextLoc:r},n(304)===this[n(309)]&&(this[n(317)]=f),g}},a}function asyncGeneratorStep(t,e,r,n,o,i,c){var a=_0x21ce;try{var u=t[i](c),s=u[a(374)]}catch(t){return void r(t)}u.done?e(s):Promise[a(243)](s)[a(356)](n,o)}function _asyncToGenerator(a){return function(){var t=this,c=arguments;return new Promise(function(e,r){var n=a.apply(t,c);function o(t){asyncGeneratorStep(n,e,r,o,i,_0x21ce(304),t)}function i(t){asyncGeneratorStep(n,e,r,o,i,_0x21ce(278),t)}o(void 0)})}}(()=>{for(var t=_0x21ce,e=_0x3e12();;)try{if(359724==+parseInt(t(297))+parseInt(t(372))/2*(-parseInt(t(303))/3)+-parseInt(t(285))/4*(-parseInt(t(336))/5)+-parseInt(t(370))/6+-parseInt(t(364))/7*(-parseInt(t(274))/8)+parseInt(t(295))/9+-parseInt(t(263))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}})();var chalk=require(_0x360d98(290));function convert(t){return _convert.apply(this,arguments)}function _convert(){return(_convert=_asyncToGenerator(_regeneratorRuntime().mark(function t(e){var n,o,i,c=_0x21ce;return _regeneratorRuntime()[c(329)](function(t){for(var r=c;;)switch(t[r(316)]=t[r(304)]){case 0:if(n=require(r(284)),global._isMiniAppConvertMode=!0,global._isAscfMode=!0,process[r(246)][r(301)]=e[r(251)]?r(287):"no",i=require(r(245)),o=i[r(294)],i=i[r(308)],e[r(258)]&&(i(e.input,e[r(324)]),process[r(337)](0)),n.checkInputPathFun(e[r(265)]),e[r(272)]){t[r(304)]=12;break}return t[r(304)]=10,n[r(257)]({inputPath:e[r(265)],outPath:e[r(324)],confirmAddConfig:!0});case 10:(i=t[r(275)])[r(330)]?console[r(327)](chalk[r(377)]('"command":"'[r(332)](i.command,'","errorMessage":"')[r(332)](i[r(330)],'"'))):console[r(357)](chalk[r(354)](r(292)[r(332)](i[r(310)],'","folderUrl":"')[r(332)](i.folderUrl,'"')));case 12:setTimeout(function(){var e=r;try{o()}catch(t){console[e(267)](chalk.yellow(e(342).concat(t,".")))}});case 13:case r(323):return t[r(313)]()}},t)}))).apply(this,arguments)}function compile(t,e){return _compile.apply(this,arguments)}function _0x3e12(){var t=["resultName","symbol","red","infrastructureLogging","displayName","resolve","reset","./common/utils.js","env","_sent","level","return","GeneratorFunction","clear","catch","isGeneratorFunction","uncaughtException","push","length","confirmConverterFun","validate","toString","pop","' method","projectRoot","3009570XpjmDe","[object Generator]","input","delegate","warn","tryLoc","exports","catchLoc","dispatchException","check","isLatestAscfHar","2246440WriWVZ","sent","suspendedStart","create","throw","watch","ascf/ascf_src","type","./ascf-compiler/web.webpack.config.js","awrap","./ascf-converter/features/converter.js","104812APvMlN","hasOwnProperty","yes","progress","executing","./ascf-compiler/chalk/bundle.cjs","reason:",'"command":"',"break","isLatestAscfToolkit","1194867dcJLYF","abrupt","318054yVVeTd","verbose","defineProperty","function","clearResource","@@toStringTag","227637usmGqj","next","prototype","NODE_ENV","development","checkPath","method","command","chdir","ASCF uncaught error","stop","mark","call","prev","arg","ProgressPlugin","normal","nextLoc","root","iterator","end","output","try statement without catch or finally","plugins","error","_invoke","wrap","errorMessage","completion","concat","toStringTag","_ascfDebug","done","125SpuEcI","exit","finallyLoc","asyncIterator","keys","production","WARNING: Get @atomicservice/ascf-toolkit version failed: ","WARNING: Get @atomicservice/ascf info failed.","@@iterator","object","forEach","AsyncIterator","completed","getPrototypeOf","__proto__","EnvironmentPlugin","yellow","constructor","green","complete","then","info","tryEntries","reverse","__await","async","existsVerifyLog","values","7Hdfayq","webpack","apply","rval","afterLoc","path","3900822lIgUOF","run","2pQsjkK","The iterator does not provide a '","value"];return(_0x3e12=function(){return t})()}function _compile(){var e=_0x360d98;return(_compile=_asyncToGenerator(_regeneratorRuntime()[e(314)](function t(r,n){var o,i,c,a=e;return _regeneratorRuntime()[a(329)](function(t){for(var e=a;;)switch(t[e(316)]=t[e(304)]){case 0:return o=require(e(369)),process[e(246)][e(262)]=o[e(243)](r),process[e(311)](o[e(243)](r,e(280))),process[e(246)][e(306)]=n.mode?e(307):e(341),process[e(246)].clearResource=n[e(251)]?e(287):"no",o=require(e(365)),t[e(316)]=6,i=require(e(282)),t[e(304)]=10,i();case 10:return(i=t[e(275)])[e(326)]=i.plugins||[],i.plugins[e(255)](new o[e(351)]({projectRoot:r})),n[e(288)]&&i[e(326)][e(255)](new o[e(318)]),n.watch&&(i[e(279)]=!0),global[e(334)]&&(i[e(241)]={level:e(298)}),c=o(i),t.next=19,run(c);case 19:t[e(304)]=25;break;case 21:t[e(316)]=21,t.t0=t[e(252)](6),console.error(t.t0),process.exit(1);case 25:case e(323):return t[e(313)]()}},t,null,[[6,21]])})))[e(366)](this,arguments)}function getAscfToolkitDirname(){return __dirname}function run(t){return new Promise(function(r,o){var i=_0x21ce;t[i(371)](function(t,e){var n=i;global[n(334)]&&e&&console.log(e[n(259)]({all:!1,colors:!0,errors:!0,warnings:!0,logging:n(298)})),t&&(console[n(327)](t),o(t)),setTimeout(function(){var e=n,t=require("./common/utils.js"),r=t.isLatestAscfToolkit,t=t[e(273)];try{t(global[e(362)])}catch(t){console[e(267)](chalk[e(352)](e(343)))}try{r(global[e(362)])}catch(t){console.warn(chalk[e(352)](e(342).concat(t,".")))}}),r()})})}chalk[_0x360d98(248)]=1,global._isAscfMode=!0,process.on(_0x360d98(254),function(t){var e=_0x360d98;console[e(327)](e(312),t)}),process.on("unhandledRejection",function(t,e){var r=_0x360d98;console[r(327)]("ASCF unhandled rejection at:",e,r(291),t)}),module[_0x360d98(269)]={convert:convert,compile:compile,getAscfToolkitDirname:getAscfToolkitDirname};
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomicservice/ascf-toolkit",
|
|
3
|
-
"version": "1.0.0",
|
|
3
|
+
"version": "1.0.1-beta.0",
|
|
4
4
|
"author": "atomicservice",
|
|
5
5
|
"title": "ASCF toolkit for atomicservice",
|
|
6
6
|
"description": "ASCF toolkit for atomicservice",
|
|
7
|
-
"main": "./lib/
|
|
7
|
+
"main": "./lib/index.js",
|
|
8
8
|
"keywords": [
|
|
9
9
|
"atomicservice",
|
|
10
10
|
"loader",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _0x11aa56=_0x2df8;function _slicedToArray(r,a){return _arrayWithHoles(r)||_iterableToArrayLimit(r,a)||_unsupportedIterableToArray(r,a)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(_0x2df8(423))}function _unsupportedIterableToArray(r,a){var e,t=_0x2df8;if(r)return t(404)==typeof r?_arrayLikeToArray(r,a):("Object"===(e={}[t(402)][t(397)](r)[t(431)](8,-1))&&r[t(429)]&&(e=r[t(429)][t(422)]),t(407)===e||t(405)===e?Array[t(401)](r):t(406)===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[t(409)](e)?_arrayLikeToArray(r,a):void 0)}function _arrayLikeToArray(r,a){var e=_0x2df8;(null==a||a>r[e(389)])&&(a=r[e(389)]);for(var t=0,n=Array(a);t<a;t++)n[t]=r[t];return n}function _iterableToArrayLimit(r,a){var e=_0x2df8,t=null==r?null:e(425)!=typeof Symbol&&r[Symbol[e(399)]]||r[e(392)];if(null!=t){var n,i,o,u,l=[],c=!0,v=!1;try{if(o=(t=t[e(397)](r))[e(414)],0===a){if(Object(t)!==t)return;c=!1}else for(;!(c=(n=o[e(397)](t)).done)&&(l[e(398)](n.value),l[e(389)]!==a);c=!0);}catch(r){v=!0,i=r}finally{try{if(!c&&null!=t.return&&(u=t[e(390)](),Object(u)!==u))return}finally{if(v)throw i}}return l}}function _arrayWithHoles(r){if(Array.isArray(r))return r}(()=>{for(var r=_0x2df8,a=_0x7743();;)try{if(741141==+parseInt(r(403))+parseInt(r(393))/2*(-parseInt(r(427))/3)+-parseInt(r(388))/4+-parseInt(r(382))/5+-parseInt(r(421))/6+-parseInt(r(420))/7+-parseInt(r(385))/8*(-parseInt(r(419))/9))break;a.push(a.shift())}catch(r){a.push(a.shift())}})();var REGEXP_INT=/^[0-9]+$/,REGEXP_PACKAGE_NAME=/^[a-z0-9A-Z_.]{3,}$/,validator={packageName:function(r){var t=_0x2df8;return(r||"").toString()[t(411)]()[t(428)](REGEXP_PACKAGE_NAME)?{value:!0}:{value:!1,reason:function(r,a){var e=t;return e(387)[e(400)](r,e(412))[e(400)](a,"' is invalid.")}}},integer:function(r){var t=_0x2df8;return t(404)===typeof r?r[t(428)](REGEXP_INT)?{value:!0,reason:function(r,a){var e=t;return"WARNING: ext.json configuration item '"[e(400)](r,"' ")+e(384)[e(400)](a,e(413))}}:{value:!1,reason:function(r,a){var e=t;return"ERROR: ext.json configuration item '"[e(400)](r,e(412)).concat(a,e(416))}}:(r=(r||"")[t(402)]()).match(REGEXP_INT)?{value:!0}:{value:!1,reason:function(r,a){var e=t;return e(387)[e(400)](r,"' value '")[e(400)](a,"' is invalid.")}}},string:function(r){return{value:r}},Object:function(r){return{value:r}},number:function(r){var t=_0x2df8;return t(404)===typeof r?r.match(REGEXP_INT)?{value:Number(r),reason:function(r,a){var e=t;return e(408).concat(r,"' ")+"value '"[e(400)](a,e(413))}}:{value:!1,reason:function(r,a){var e=t;return e(387)[e(400)](r,e(412))[e(400)](a,e(383))}}:(r=(r||"")[t(402)]())[t(428)](REGEXP_INT)?{value:r}:{value:!1,reason:function(r,a){var e=t;return e(387)[e(400)](r,e(412))[e(400)](a,e(416))}}}},validatorMap={type:{type:validator[_0x11aa56(404)],required:!0},package:{type:validator[_0x11aa56(424)],required:!0},name:{type:validator[_0x11aa56(404)],required:!0},versionName:{type:validator[_0x11aa56(404)],required:!0},versionCode:{type:validator[_0x11aa56(415)],required:!0},ext:{type:validator[_0x11aa56(396)],required:!1},extPages:{type:validator[_0x11aa56(396)],required:!1}},requireAttrMap=[];function _0x2df8(r,a){var e=_0x7743();return(_0x2df8=function(r,a){return e[r-=381]})(r,a)}function validate(r,a){var e=_0x11aa56,t=void 0,n=void 0,i=validatorMap[r];return i&&e(417)===typeof i[e(426)]?(t=i[e(426)](a))[e(386)]&&(n={reason:t.reason(r,a)}):t={value:!0},{value:t.value,log:n}}function _0x7743(){var r=["trim","' value '","' is a character string, which should be an integer instead.","next","integer","' is invalid.","function","warn","723933NdrSBN","3820551NcGGmO","4577184lCXftC","name","Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","packageName","undefined","type","1408098JAwqAQ","match","constructor","ERROR","slice","forEach","exports","3212090UEdSDX","' is invalid","value '","296StCSEp","reason","ERROR: ext.json configuration item '","1102500zyuxpU","length","return","log","@@iterator","4sJRHJD","keys","startsWith","Object","call","push","iterator","concat","from","toString","930404hsUmiq","string","Set","Arguments","Map","WARNING: ext.json configuration item '","test","ERROR: ext.json does not contain configuration item '"];return(_0x7743=function(){return r})()}(()=>{var e=_0x11aa56;Object[e(394)](validatorMap)[e(432)](function(r){var a=e;validatorMap[r].required&&requireAttrMap[a(398)](r)})})(),module[_0x11aa56(381)]=function(r){var e,t,n=_0x11aa56,r=_slicedToArray(r,2),i=r[0],o=r[1];return i&&(e=[],t=void requireAttrMap[n(432)](function(r){var a=n;i[r]||e[a(398)]({reason:a(410).concat(r,"'"),filePath:o})}),Object[n(394)](i)[n(432)](function(r){var a=n;(t=validate(r,i[r])).log&&e[a(398)]({reason:t[a(391)][a(386)],filePath:o})}),e)&&0<e[n(389)]&&e[n(432)](function(r){var a=n,e="".concat(r[a(386)],"\n");if(o&&(e="".concat(r[a(386)],"\n @ ")[a(400)](o,"\n")),r[a(386)][a(395)](a(430)))throw e;console[a(418)](e)}),!0};
|