@atomicservice/ascf-toolkit 1.0.3-beta.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ascf-compiler/appjson-loader.js +1 -1
- package/lib/ascf-compiler/common/appjson-validator.js +1 -1
- package/lib/ascf-compiler/common/css-runtime-api.js +1 -1
- package/lib/ascf-compiler/common/eventHappenHjs.js +1 -0
- package/lib/ascf-compiler/common/exp-utils.js +1 -1
- package/lib/ascf-compiler/common/fixComponentName.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/merge-tpl-cmps.js +1 -0
- package/lib/ascf-compiler/common/packoptions-utils.js +1 -1
- package/lib/ascf-compiler/common/quick-generate-subpackage.js +1 -0
- package/lib/ascf-compiler/common/utils.js +1 -1
- package/lib/ascf-compiler/css-process-loader.js +1 -1
- package/lib/ascf-compiler/extract-loader.js +1 -1
- package/lib/ascf-compiler/hcss-loader.js +1 -1
- package/lib/ascf-compiler/hjs-loader.js +1 -1
- package/lib/ascf-compiler/hxml-loader.js +1 -1
- package/lib/ascf-compiler/js-parser/parser-babel.js +1 -0
- package/lib/ascf-compiler/js-parser/parser-swc.js +1 -0
- package/lib/ascf-compiler/js-parser/parser.js +1 -0
- package/lib/ascf-compiler/loader-utils.js +1 -1
- package/lib/ascf-compiler/path-process-loader.js +1 -1
- package/lib/ascf-compiler/plugin/copy-bundle-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/extConfig-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/html-generator-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/i18n-transform-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/manifest-generator-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/replace-module-id-plugin.js +1 -0
- 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/require-loader.js +1 -0
- package/lib/ascf-compiler/swc-loader.js +1 -0
- package/lib/ascf-compiler/template/attr-utils.js +1 -1
- package/lib/ascf-compiler/template/implicit-model-config.js +1 -0
- package/lib/ascf-compiler/template/node-name-utils.js +1 -1
- package/lib/ascf-compiler/trustlist-hxml-verify-loader.js +1 -1
- package/lib/ascf-compiler/trustlist-js-verify-loader.js +1 -1
- package/lib/ascf-compiler/trustlist-verify/config.js +1 -1
- package/lib/ascf-compiler/trustlist-verify/utils.js +1 -1
- package/lib/ascf-compiler/vue-compiler/vue.bundle.js +1 -1
- package/lib/ascf-compiler/watch/watch.js +1 -1
- package/lib/ascf-compiler/web.webpack.config.js +1 -1
- package/lib/ascf-converter/common/commonConfig.js +1 -1
- package/lib/ascf-converter/common/commonUtils.js +1 -1
- package/lib/ascf-converter/common/path-validator.js +1 -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/config.js +1 -1
- package/lib/common/log4js.js +1 -0
- package/lib/common/logger-plugin.js +1 -1
- package/lib/common/remove-strict-mode-plugin.js +1 -1
- package/lib/common/string-utils.js +1 -0
- package/lib/common/utils.js +1 -1
- package/lib/common/version-check.js +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.js +1 -1
- package/notice/openSourceSoftwareNotice.docx +0 -0
- package/package.json +10 -10
- package/lib/ascf-compiler/chalk/bundle.cjs.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var _0x4bae98=_0x3a79;function _typeof(t){var e=_0x3a79;return(_typeof=e(295)==typeof Symbol&&"symbol"==typeof Symbol[e(412)]?function(t){return typeof t}:function(t){var r=e;return t&&r(295)==typeof Symbol&&t[r(417)]===Symbol&&t!==Symbol[r(285)]?r(395):typeof t})(t)}function _regeneratorRuntime(){var s=_0x3a79;_regeneratorRuntime=function(){return c};var f,c={},t=Object[s(285)],h=t.hasOwnProperty,p=Object[s(323)]||function(t,r,e){var n=s;t[r]=e[n(330)]},r=s(295)==typeof Symbol?Symbol:{},a=r[s(412)]||s(376),e=r[s(405)]||s(394),n=r[s(381)]||s(315);function o(t,r,e){return Object[s(323)](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,a,i,c,u=s,r=r&&r[u(285)]instanceof d?r:d,r=Object[u(334)](r[u(285)]),u=new S(n||[]);return p(r,"_invoke",{value:(o=t,a=e,i=u,c=l,function(t,r){var e=_0x3a79;if(c===y)throw Error(e(367));if(c===_){if(e(304)===t)throw r;return{value:f,done:!0}}for(i[e(399)]=t,i[e(335)]=r;;){var n=i[e(375)];if(n){n=function t(r,e){var n=s,o=e.method,a=r[n(412)][o];if(a===f)return e[n(375)]=null,n(304)===o&&r[n(412)].return&&(e[n(399)]=n(355),e.arg=f,t(r,e),n(304)===e[n(399)])||n(355)!==o&&(e.method="throw",e.arg=new TypeError(n(391)+o+n(298))),g;o=m(a,r[n(412)],e[n(335)]);if(n(304)===o[n(346)])return e.method="throw",e[n(335)]=o[n(335)],e[n(375)]=null,g;a=o[n(335)];return a?a[n(314)]?(e[r.resultName]=a[n(330)],e[n(290)]=r[n(289)],"return"!==e[n(399)]&&(e[n(399)]="next",e[n(335)]=f),e[n(375)]=null,g):a:(e[n(399)]=n(304),e[n(335)]=new TypeError("iterator result is not an object"),e[n(375)]=null,g)}(n,i);if(n){if(n===g)continue;return n}}if(e(290)===i[e(399)])i.sent=i._sent=i[e(335)];else if(e(304)===i.method){if(c===l)throw c=_,i[e(335)];i.dispatchException(i[e(335)])}else e(355)===i[e(399)]&&i[e(389)](e(355),i[e(335)]);c=y;n=m(o,a,i);if(e(385)===n[e(346)]){if(c=i[e(314)]?_:v,n[e(335)]===g)continue;return{value:n.arg,done:i.done}}e(304)===n.type&&(c=_,i[e(399)]=e(304),i[e(335)]=n[e(335)])}})}),r}function m(t,r,e){var n=s;try{return{type:n(385),arg:t[n(410)](r,e)}}catch(t){return{type:n(304),arg:t}}}c.wrap=u;var l=s(377),v=s(386),y=s(418),_=s(309),g={};function d(){}function i(){}function b(){}var r={},x=(o(r,a,function(){return this}),Object[s(284)]),x=x&&x(x(O([]))),w=(x&&x!==t&&h.call(x,a)&&(r=x),b.prototype=d[s(285)]=Object[s(334)](r));function C(t){var r=s;[r(290),"throw",r(355)][r(373)](function(r){o(t,r,function(t){return this[_0x3a79(341)](r,t)})})}function P(c,u){var r,o=s;p(this,o(341),{value:function(e,n){function t(){return new u(function(t,r){!function r(t,e,n,o){var a,i=_0x3a79,t=m(c[t],c,e);if(i(304)!==t[i(346)])return(e=(a=t.arg).value)&&i(280)==_typeof(e)&&h[i(410)](e,i(345))?u.resolve(e[i(345)])[i(416)](function(t){r(i(290),t,n,o)},function(t){r(i(304),t,n,o)}):u.resolve(e)[i(416)](function(t){a.value=t,n(a)},function(t){return r(i(304),t,n,o)});o(t[i(335)])}(e,n,t,r)})}return r=r?r[o(416)](t,t):t()}})}function j(t){var r=s,e={tryLoc:t[0]};1 in t&&(e[r(356)]=t[1]),2 in t&&(e[r(300)]=t[2],e[r(340)]=t[3]),this[r(358)][r(390)](e)}function F(t){var r=s,e=t[r(365)]||{};e[r(346)]=r(385),delete e[r(335)],t[r(365)]=e}function S(t){var r=s;this[r(358)]=[{tryLoc:"root"}],t.forEach(j,this),this[r(348)](!0)}function O(e){var n=s;if(e||""===e){var o,t=e[a];if(t)return t[n(410)](e);if(n(295)==typeof e[n(290)])return e;if(!isNaN(e.length))return o=-1,(t=function t(){for(var r=n;++o<e[r(321)];)if(h[r(410)](e,o))return t.value=e[o],t[r(314)]=!1,t;return t.value=f,t.done=!0,t})[n(290)]=t}throw new TypeError(_typeof(e)+n(353))}return i[s(285)]=b,p(w,s(417),{value:b,configurable:!0}),p(b,s(417),{value:i,configurable:!0}),i[s(400)]=o(b,n,s(362)),c[s(329)]=function(t){var r=s,t=r(295)==typeof t&&t[r(417)];return!!t&&(t===i||r(362)===(t.displayName||t[r(347)]))},c[s(293)]=function(t){var r=s;return Object[r(363)]?Object[r(363)](t,b):(t[r(374)]=b,o(t,n,r(362))),t[r(285)]=Object.create(w),t},c[s(292)]=function(t){return{__await:t}},C(P[s(285)]),o(P.prototype,e,function(){return this}),c.AsyncIterator=P,c[s(360)]=function(t,r,e,n,o){var a=s,i=(void 0===o&&(o=Promise),new P(u(t,r,e,n),o));return c.isGeneratorFunction(r)?i:i[a(290)]().then(function(t){var r=a;return t[r(314)]?t[r(330)]:i[r(290)]()})},C(w),o(w,n,s(388)),o(w,a,function(){return this}),o(w,s(307),function(){return s(369)}),c[s(413)]=function(t){var r,n=s,o=Object(t),a=[];for(r in o)a[n(390)](r);return a[n(305)](),function t(){for(var r=n;a.length;){var e=a[r(403)]();if(e in o)return t[r(330)]=e,t[r(314)]=!1,t}return t[r(314)]=!0,t}},c[s(294)]=O,S[s(285)]={constructor:S,reset:function(t){var r=s;if(this[r(338)]=0,this[r(290)]=0,this[r(279)]=this[r(291)]=f,this.done=!1,this.delegate=null,this[r(399)]=r(290),this[r(335)]=f,this.tryEntries[r(373)](F),!t)for(var e in this)"t"===e.charAt(0)&&h[r(410)](this,e)&&!isNaN(+e.slice(1))&&(this[e]=f)},stop:function(){var t=s,r=(this.done=!0,this[t(358)][0][t(365)]);if("throw"===r[t(346)])throw r[t(335)];return this.rval},dispatchException:function(n){var o=s;if(this[o(314)])throw n;var a=this;function t(t,r){var e=o;return i[e(346)]="throw",i[e(335)]=n,a.next=t,r&&(a[e(399)]=e(290),a[e(335)]=f),!!r}for(var r=this[o(358)].length-1;0<=r;--r){var e=this[o(358)][r],i=e[o(365)];if("root"===e.tryLoc)return t(o(283));if(e.tryLoc<=this[o(338)]){var c=h.call(e,"catchLoc"),u=h[o(410)](e,o(300));if(c&&u){if(this.prev<e[o(356)])return t(e[o(356)],!0);if(this[o(338)]<e.finallyLoc)return t(e[o(300)])}else if(c){if(this[o(338)]<e[o(356)])return t(e[o(356)],!0)}else{if(!u)throw Error(o(392));if(this.prev<e[o(300)])return t(e.finallyLoc)}}}},abrupt:function(t,r){for(var e=s,n=this[e(358)][e(321)]-1;0<=n;--n){var o=this[e(358)][n];if(o[e(324)]<=this[e(338)]&&h.call(o,"finallyLoc")&&this[e(338)]<o[e(300)]){var a=o;break}}var i=(a=a&&("break"===t||e(344)===t)&&a[e(324)]<=r&&r<=a.finallyLoc?null:a)?a.completion:{};return i[e(346)]=t,i[e(335)]=r,a?(this[e(399)]=e(290),this.next=a.finallyLoc,g):this[e(342)](i)},complete:function(t,r){var e=s;if(e(304)===t[e(346)])throw t.arg;return"break"===t.type||e(344)===t.type?this[e(290)]=t.arg:"return"===t.type?(this[e(393)]=this[e(335)]=t[e(335)],this[e(399)]=e(355),this[e(290)]="end"):e(385)===t[e(346)]&&r&&(this.next=r),g},finish:function(t){for(var r=s,e=this[r(358)].length-1;0<=e;--e){var n=this[r(358)][e];if(n[r(300)]===t)return this[r(342)](n[r(365)],n[r(340)]),F(n),g}},catch:function(t){for(var r=s,e=this[r(358)].length-1;0<=e;--e){var n,o,a=this[r(358)][e];if(a.tryLoc===t)return"throw"===(n=a[r(365)])[r(346)]&&(o=n[r(335)],F(a)),o}throw Error(r(286))},delegateYield:function(t,r,e){var n=s;return this[n(375)]={iterator:O(t),resultName:r,nextLoc:e},"next"===this.method&&(this[n(335)]=f),g}},c}function asyncGeneratorStep(t,r,e,n,o,a,i){var c=_0x3a79;try{var u=t[a](i),s=u[c(330)]}catch(t){return void e(t)}u.done?r(s):Promise.resolve(s)[c(416)](n,o)}function _0x3a79(t,r){var e=_0x720e();return(_0x3a79=function(t,r){return e[t-=279]})(t,r)}function _0x720e(){var t=["then","constructor","executing","createDirs","notifyConfig","setOriginPtahObject","sent","object","env","ascf/ascf_src","end","getPrototypeOf","prototype","illegal catch attempt","4917561ZnAdaw","yes","nextLoc","next","_sent","awrap","mark","values","function","../common/commonConfig","../lib","' method","projectFileSuffix","finallyLoc","confirmConverterH5Fun","checkInputPathFun","packageName","throw","reverse","3142089jbQbVm","toString","1220ysJpbY","completed","../../","path","sep","readdir","done","@@toStringTag","parse","apply","app.json","postInputPath","miniprogramRoot","length","copyConfigFiles","defineProperty","tryLoc","handleConfigInfo","pages","Output path ","outPath","isGeneratorFunction","value","srcRootPath","confirmConverterFun","56mduTjA","create","arg","configBasenameArray","isArray","prev","dirname","afterLoc","_invoke","complete","appletType","continue","__await","type","name","reset","2493484utOBIA","project.config.json","stop","Output directory cannot be a subdirectory of the input directory."," is not iterable","map","return","catchLoc","failedTransform","tryEntries","copyDir","async","25640NJWVxG","GeneratorFunction","setPrototypeOf","inputPath","completion","error","Generator is already running","clearResource","[object Generator]","1003573nuaXXK","rmdir","4097790drKEGs","forEach","__proto__","delegate","@@iterator","suspendedStart","isDirectory","existsSync","unlink","toStringTag","completeTransform","readFileSync","transformNodeModuleComponent","normal","suspendedYield","3155918sGMgaB","Generator","abrupt","push","The iterator does not provide a '","try statement without catch or finally","rval","@@asyncIterator","symbol","smartProgramRoot","finally","resolve","method","displayName","wrap","Applets","pop","message","asyncIterator","join","confirmAddConfig","catch","startsWith","call","src","iterator","keys","createTransformReportFile","appJsonFile"];return(_0x720e=function(){return t})()}function _asyncToGenerator(u){return function(){var t=this,c=arguments;return new Promise(function(r,e){var n=_0x3a79,o=u[n(317)](t,c);function a(t){asyncGeneratorStep(o,r,e,a,i,n(290),t)}function i(t){asyncGeneratorStep(o,r,e,a,i,n(304),t)}a(void 0)})}}(()=>{for(var t=_0x3a79,r=_0x720e();;)try{if(854183==-parseInt(t(370))+parseInt(t(387))/2+-parseInt(t(287))/3+-parseInt(t(361))/4*(parseInt(t(308))/5)+parseInt(t(372))/6+parseInt(t(349))/7+-parseInt(t(333))/8*(-parseInt(t(306))/9))break;r.push(r.shift())}catch(t){r.push(r.shift())}})(),Object[_0x4bae98(323)](exports,"__esModule",{value:!0}),exports.checkInputPathFun=exports.confirmConverterH5Fun=exports.confirmConverterFun=void 0;var commonConfig_1=require(_0x4bae98(296)),path=require(_0x4bae98(311)),fs=require("fs"),commonUtils_1=require("../common/commonUtils"),_require=require("../../common/utils"),clearResource=_require[_0x4bae98(368)];function confirmConverterFun(t,r){return _confirmConverterFun[_0x4bae98(317)](this,arguments)}function _confirmConverterFun(){return(_confirmConverterFun=_asyncToGenerator(_regeneratorRuntime().mark(function t(e,n){var o,a;return _regeneratorRuntime().wrap(function(t){for(var r=_0x3a79;;)switch(t[r(338)]=t[r(290)]){case 0:if(t[r(338)]=0,o=path[r(398)](e[r(364)],r(318)),a=path[r(398)](e.inputPath,r(350)),fs.existsSync(a)||!fs.existsSync(o)||e[r(407)]){t[r(290)]=7;break}return t[r(389)](r(355),{command:r(420)});case 7:return t[r(290)]=9,doConvert(e,n);case 9:return t[r(389)](r(355),t[r(279)]);case 10:t[r(290)]=16;break;case 12:return t[r(338)]=12,t.t0=t.catch(0),console[r(366)](t.t0),t.abrupt(r(355),{command:r(357),errorMessage:t.t0[r(404)]});case 16:case r(283):return t[r(351)]()}},t,null,[[0,12]])}))).apply(this,arguments)}function confirmConverterH5Fun(t,r){var e=_0x4bae98,n=path[e(406)](t[e(328)],t[e(303)]);try{return commonUtils_1[e(419)](n,e(411),!0),commonUtils_1[e(359)](path[e(406)](__filename,e(297),"src"),path[e(406)](n,e(411)),!1,!0),commonUtils_1[e(325)](t,path[e(406)](n,e(411))),{command:e(382)}}catch(t){return console[e(366)](t),{command:e(357),errorMessage:t[e(404)]}}}function checkConvertOutput(t,r){var e=_0x4bae98,t=path[e(398)](t),r=path.resolve(r);if(fs[e(379)](r))throw new Error(e(327).concat(r," is exists. Use the -c parameter to clear."));if(r[e(409)](t+path[e(312)]))throw new Error(e(352))}function doConvert(t,r){return _doConvert.apply(this,arguments)}function _doConvert(){var c=_0x4bae98;return(_doConvert=_asyncToGenerator(_regeneratorRuntime()[c(293)](function t(e,r){var n,o,a,i=c;return _regeneratorRuntime()[i(401)](function(t){for(var r=i;;)switch(t[r(338)]=t[r(290)]){case 0:if(n=path.resolve(e[r(328)],r(282)),process[r(281)][r(368)]===r(288))return t[r(290)]=4,clearResource([n]);t[r(290)]=4;break;case 4:return checkConvertOutput(e[r(364)],n),o=commonConfig_1[r(402)][r(331)],t[r(338)]=6,commonUtils_1[r(419)](n,o),commonUtils_1[r(414)](n,e.inputPath),a=path[r(406)](n,o),"./"===o||""===o?(commonUtils_1[r(421)](e[r(364)],a),commonUtils_1[r(359)](e.inputPath,a)):(commonUtils_1[r(421)](path[r(406)](e[r(364)],o),a),commonUtils_1.copyDir(path[r(406)](e[r(364)],o),a),commonUtils_1[r(322)](path[r(406)](e[r(364)]),n)),commonUtils_1[r(384)](),commonUtils_1[r(415)](path[r(406)](n,o),e),commonUtils_1.projectConfigFile(path[r(406)](n)),"my"===commonConfig_1[r(402)][r(343)]&&commonUtils_1.adaptApiFile(n,path[r(406)](__filename,r(310))),t[r(389)](r(355),{command:r(382),folderUrl:n});case 18:return t.prev=18,t.t0=t[r(408)](6),console[r(366)](t.t0),removePromise(n)[r(397)](),t.abrupt("return",{command:r(357),errorMessage:t.t0[r(404)]});case 23:case r(283):return t.stop()}},t,null,[[6,18]])}))).apply(this,arguments)}function removePromise(a){return new Promise(function(o,t){fs.stat(a,function(t,r){var n=_0x3a79;r[n(378)]()?fs[n(313)](a,function(t,r){var e=n,r=(r=r[e(354)](function(t){return path[e(406)](a,t)}))[e(354)](function(t){return removePromise(t)});Promise.all(r)[e(416)](function(){fs[e(371)](a,o)})}):fs[n(380)](a,o)})})}function checkInputPathFun(t){var r=_0x4bae98,t=path[r(398)](t),e=checkMiniProgram(t);return{command:r(319),data:{returnCode:e,outPath:path[r(339)](t)}}}function checkMiniProgram(t){var r=_0x4bae98,e=!0,n=path[r(406)](t,r(318));return e=fs[r(379)](n)&&identifyProgram(t)?e:!1}function identifyProgram(t){var r=_0x4bae98;try{var e=path[r(406)](t,"app.json"),n=JSON[r(316)](fs[r(383)](e)[r(307)]());if(n&&n[r(326)]&&Array[r(337)](n[r(326)])&&0<n.pages.length)for(var o=getSrcRootPath(t),a=0,i=Object[r(413)](commonConfig_1[r(299)]);a<i[r(321)];a++){var c=i[a],u=path[r(406)](t,o,n.pages[0]+commonConfig_1.projectFileSuffix[c].hxml);if(fs.existsSync(u))return commonConfig_1[r(402)][r(343)]="wx"===c?"tt":c,!0}return!1}catch(t){return!1}}function getSrcRootPath(t){var r=_0x4bae98;commonConfig_1[r(402)][r(331)]="./";for(var e=0;e<commonConfig_1[r(336)][r(321)];e++){var n=commonConfig_1.configBasenameArray[e],n=path.join(t,n);fs[r(379)](n)&&((n=JSON[r(316)](fs.readFileSync(n)[r(307)]())).miniprogramRoot?commonConfig_1.Applets.srcRootPath=n[r(320)]:n[r(396)]?commonConfig_1[r(402)][r(331)]=n[r(396)]:commonConfig_1[r(402)][r(331)]="./")}return commonConfig_1[r(402)][r(331)]}exports[_0x4bae98(332)]=confirmConverterFun,exports[_0x4bae98(301)]=confirmConverterH5Fun,exports[_0x4bae98(302)]=checkInputPathFun;
|
|
1
|
+
var _0x18093c=_0x46fe;function _typeof(t){var e=_0x46fe;return(_typeof=e(552)==typeof Symbol&&e(575)==typeof Symbol[e(521)]?function(t){return typeof t}:function(t){var r=e;return t&&r(552)==typeof Symbol&&t[r(526)]===Symbol&&t!==Symbol[r(562)]?r(575):typeof t})(t)}function _regeneratorRuntime(){var s=_0x46fe;_regeneratorRuntime=function(){return c};var f,c={},t=Object[s(562)],p=t.hasOwnProperty,h=Object[s(515)]||function(t,r,e){var n=s;t[r]=e[n(590)]},r="function"==typeof Symbol?Symbol:{},i=r[s(521)]||s(557),e=r[s(535)]||"@@asyncIterator",n=r[s(549)]||s(524);function o(t,r,e){return Object[s(515)](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(615)](r.prototype),n=new k(n||[]);return h(r,u(536),{value:(o=t,i=e,a=n,c=l,function(t,r){var e=_0x46fe;if(c===_)throw Error(e(497));if(c===y){if("throw"===t)throw r;return{value:f,done:!0}}for(a[e(584)]=t,a[e(607)]=r;;){var n=a[e(636)];if(n){n=function t(r,e){var n=s,o=e.method,i=r[n(521)][o];if(i===f)return e.delegate=null,"throw"===o&&r.iterator[n(510)]&&(e.method=n(510),e[n(607)]=f,t(r,e),n(523)===e.method)||"return"!==o&&(e[n(584)]=n(523),e[n(607)]=new TypeError(n(628)+o+n(543))),g;o=m(i,r[n(521)],e.arg);if(n(523)===o[n(504)])return e[n(584)]=n(523),e.arg=o[n(607)],e[n(636)]=null,g;i=o[n(607)];return i?i[n(559)]?(e[r[n(587)]]=i.value,e.next=r.nextLoc,n(510)!==e.method&&(e.method=n(538),e[n(607)]=f),e[n(636)]=null,g):i:(e[n(584)]=n(523),e[n(607)]=new TypeError("iterator result is not an object"),e[n(636)]=null,g)}(n,a);if(n){if(n===g)continue;return n}}if(e(538)===a[e(584)])a[e(626)]=a[e(533)]=a[e(607)];else if("throw"===a.method){if(c===l)throw c=y,a[e(607)];a[e(561)](a[e(607)])}else e(510)===a[e(584)]&&a[e(547)](e(510),a[e(607)]);c=_;n=m(o,i,a);if(e(632)===n.type){if(c=a[e(559)]?y:v,n[e(607)]===g)continue;return{value:n[e(607)],done:a[e(559)]}}e(523)===n[e(504)]&&(c=y,a.method=e(523),a[e(607)]=n[e(607)])}})}),r}function m(t,r,e){var n=s;try{return{type:n(632),arg:t[n(563)](r,e)}}catch(t){return{type:n(523),arg:t}}}c[s(612)]=u;var l=s(611),v=s(508),_=s(600),y="completed",g={};function d(){}function a(){}function x(){}var r={},b=(o(r,i,function(){return this}),Object.getPrototypeOf),b=b&&b(b(F([]))),w=(b&&b!==t&&p.call(b,i)&&(r=b),x[s(562)]=d.prototype=Object[s(615)](r));function C(t){var r=s;[r(538),"throw",r(510)][r(638)](function(r){o(t,r,function(t){return this[_0x46fe(536)](r,t)})})}function P(c,u){var r,o=s;h(this,o(536),{value:function(e,n){function t(){return new u(function(t,r){!function r(t,e,n,o){var i,a=_0x46fe,t=m(c[t],c,e);if(a(523)!==t[a(504)])return(e=(i=t[a(607)])[a(590)])&&a(605)==_typeof(e)&&p[a(563)](e,a(614))?u[a(500)](e[a(614)])[a(556)](function(t){r(a(538),t,n,o)},function(t){r(a(523),t,n,o)}):u[a(500)](e).then(function(t){i.value=t,n(i)},function(t){return r("throw",t,n,o)});o(t[a(607)])}(e,n,t,r)})}return r=r?r[o(556)](t,t):t()}})}function j(t){var r=s,e={tryLoc:t[0]};1 in t&&(e[r(499)]=t[1]),2 in t&&(e[r(627)]=t[2],e[r(551)]=t[3]),this[r(571)][r(567)](e)}function O(t){var r=s,e=t.completion||{};e[r(504)]="normal",delete e.arg,t[r(565)]=e}function k(t){var r=s;this[r(571)]=[{tryLoc:"root"}],t[r(638)](j,this),this[r(540)](!0)}function F(e){var n=s;if(e||""===e){var o,t=e[i];if(t)return t[n(563)](e);if(n(552)==typeof e[n(538)])return e;if(!isNaN(e[n(625)]))return o=-1,(t=function t(){for(var r=n;++o<e[r(625)];)if(p.call(e,o))return t[r(590)]=e[o],t[r(559)]=!1,t;return t[r(590)]=f,t[r(559)]=!0,t})[n(538)]=t}throw new TypeError(_typeof(e)+n(579))}return a[s(562)]=x,h(w,s(526),{value:x,configurable:!0}),h(x,"constructor",{value:a,configurable:!0}),a.displayName=o(x,n,s(582)),c[s(530)]=function(t){var r=s,t=r(552)==typeof t&&t[r(526)];return!!t&&(t===a||r(582)===(t[r(616)]||t.name))},c[s(633)]=function(t){var r=s;return Object[r(572)]?Object.setPrototypeOf(t,x):(t[r(598)]=x,o(t,n,"GeneratorFunction")),t[r(562)]=Object.create(w),t},c.awrap=function(t){return{__await:t}},C(P[s(562)]),o(P[s(562)],e,function(){return this}),c.AsyncIterator=P,c[s(525)]=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(530)](r)?a:a[i(538)]()[i(556)](function(t){var r=i;return t[r(559)]?t.value:a[r(538)]()})},C(w),o(w,n,s(529)),o(w,i,function(){return this}),o(w,s(639),function(){return s(560)}),c[s(498)]=function(t){var r,n=s,o=Object(t),i=[];for(r in o)i.push(r);return i[n(645)](),function t(){for(var r=n;i.length;){var e=i[r(635)]();if(e in o)return t[r(590)]=e,t[r(559)]=!1,t}return t.done=!0,t}},c.values=F,k[s(562)]={constructor:k,reset:function(t){var r=s;if(this.prev=0,this[r(538)]=0,this.sent=this._sent=f,this[r(559)]=!1,this[r(636)]=null,this[r(584)]=r(538),this[r(607)]=f,this[r(571)][r(638)](O),!t)for(var e in this)"t"===e[r(618)](0)&&p[r(563)](this,e)&&!isNaN(+e[r(578)](1))&&(this[e]=f)},stop:function(){var t=s,r=(this[t(559)]=!0,this[t(571)][0][t(565)]);if(t(523)===r[t(504)])throw r[t(607)];return this[t(599)]},dispatchException:function(n){var o=s;if(this[o(559)])throw n;var i=this;function t(t,r){var e=o;return a[e(504)]=e(523),a[e(607)]=n,i[e(538)]=t,r&&(i[e(584)]=e(538),i[e(607)]=f),!!r}for(var r=this.tryEntries[o(625)]-1;0<=r;--r){var e=this[o(571)][r],a=e[o(565)];if(o(550)===e[o(507)])return t(o(593));if(e[o(507)]<=this.prev){var c=p.call(e,o(499)),u=p[o(563)](e,o(627));if(c&&u){if(this[o(566)]<e.catchLoc)return t(e[o(499)],!0);if(this.prev<e[o(627)])return t(e[o(627)])}else if(c){if(this[o(566)]<e[o(499)])return t(e[o(499)],!0)}else{if(!u)throw Error(o(594));if(this[o(566)]<e[o(627)])return t(e[o(627)])}}}},abrupt:function(t,r){for(var e=s,n=this.tryEntries[e(625)]-1;0<=n;--n){var o=this[e(571)][n];if(o[e(507)]<=this[e(566)]&&p.call(o,e(627))&&this[e(566)]<o.finallyLoc){var i=o;break}}var a=(i=i&&(e(548)===t||"continue"===t)&&i[e(507)]<=r&&r<=i[e(627)]?null:i)?i[e(565)]:{};return a[e(504)]=t,a[e(607)]=r,i?(this[e(584)]=e(538),this[e(538)]=i[e(627)],g):this.complete(a)},complete:function(t,r){var e=s;if("throw"===t[e(504)])throw t.arg;return e(548)===t.type||e(589)===t[e(504)]?this[e(538)]=t[e(607)]:e(510)===t[e(504)]?(this[e(599)]=this[e(607)]=t.arg,this[e(584)]=e(510),this[e(538)]="end"):"normal"===t.type&&r&&(this[e(538)]=r),g},finish:function(t){for(var r=s,e=this.tryEntries.length-1;0<=e;--e){var n=this[r(571)][e];if(n[r(627)]===t)return this[r(496)](n[r(565)],n[r(551)]),O(n),g}},catch:function(t){for(var r=s,e=this[r(571)][r(625)]-1;0<=e;--e){var n,o,i=this[r(571)][e];if(i.tryLoc===t)return"throw"===(n=i[r(565)]).type&&(o=n[r(607)],O(i)),o}throw Error(r(573))},delegateYield:function(t,r,e){var n=s;return this.delegate={iterator:F(t),resultName:r,nextLoc:e},"next"===this[n(584)]&&(this[n(607)]=f),g}},c}function asyncGeneratorStep(t,r,e,n,o,i,a){var c=_0x46fe;try{var u=t[i](a),s=u[c(590)]}catch(t){return void e(t)}u[c(559)]?r(s):Promise[c(500)](s).then(n,o)}function _asyncToGenerator(u){return function(){var t=this,c=arguments;return new Promise(function(r,e){var n=_0x46fe,o=u[n(503)](t,c);function i(t){asyncGeneratorStep(o,r,e,i,a,n(538),t)}function a(t){asyncGeneratorStep(o,r,e,i,a,n(523),t)}i(void 0)})}}(()=>{for(var t=_0x46fe,r=_0x31f1();;)try{if(181819==-parseInt(t(570))*(parseInt(t(514))/2)+parseInt(t(621))/3*(parseInt(t(505))/4)+parseInt(t(539))/5+parseInt(t(576))/6*(-parseInt(t(537))/7)+parseInt(t(622))/8+parseInt(t(554))/9*(parseInt(t(608))/10)+parseInt(t(617))/11*(-parseInt(t(623))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}})(),Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkInputPathFun=exports[_0x18093c(602)]=exports[_0x18093c(528)]=void 0;var commonConfig_1=require(_0x18093c(518)),path=require(_0x18093c(506)),fs=require("fs"),commonUtils_1=require(_0x18093c(643)),_require=require(_0x18093c(534)),clearResource=_require[_0x18093c(580)],log4js=require(_0x18093c(520)),logger=log4js[_0x18093c(603)]("converter");function confirmConverterFun(t,r){return _confirmConverterFun.apply(this,arguments)}function _confirmConverterFun(){var t=_0x18093c;return(_confirmConverterFun=_asyncToGenerator(_regeneratorRuntime()[t(633)](function t(e,n){var o,i;return _regeneratorRuntime().wrap(function(t){for(var r=_0x46fe;;)switch(t.prev=t[r(538)]){case 0:if(t[r(566)]=0,o=path.resolve(e[r(630)],"app.json"),i=path[r(500)](e[r(630)],"project.config.json"),fs[r(577)](i)||!fs[r(577)](o)||e[r(568)]){t[r(538)]=7;break}return t[r(547)](r(510),{command:r(541)});case 7:return t[r(538)]=9,doConvert(e,n);case 9:return t[r(547)](r(510),t[r(626)]);case 10:t[r(538)]=16;break;case 12:return t.prev=12,t.t0=t[r(558)](0),logger.error(t.t0),t.abrupt(r(510),{command:r(613),errorMessage:t.t0.message});case 16:case r(593):return t[r(542)]()}},t,null,[[0,12]])})))[t(503)](this,arguments)}function confirmConverterH5Fun(t,r){var e=_0x18093c,n=path[e(545)](t[e(513)],t[e(531)]);try{return commonUtils_1[e(574)](n,e(642),!0),commonUtils_1[e(511)](path[e(545)](__filename,e(555),e(642)),path.join(n,e(642)),!1,!0),commonUtils_1[e(644)](t,path[e(545)](n,e(642))),{command:e(544)}}catch(t){return logger[e(501)](t),{command:"failedTransform",errorMessage:t[e(609)]}}}function _0x31f1(){var t=["root","afterLoc","function"," is exists. Use the -c parameter to clear.","47043CqtgrC","../lib","then","@@iterator","catch","done","[object Generator]","dispatchException","prototype","call","setOriginPtahObject","completion","prev","push","confirmAddConfig","Output directory cannot be a subdirectory of the input directory.","3kyHAcc","tryEntries","setPrototypeOf","illegal catch attempt","createDirs","symbol","349722xHJWXJ","existsSync","slice"," is not iterable","clearResource","dirname","GeneratorFunction","hxml","method","stat","Applets","resultName","startsWith","continue","value","sep","appJsonFile","end","try statement without catch or finally","isArray","postInputPath","env","__proto__","rval","executing","parse","confirmConverterH5Fun","getLogger","appletType","object","../../","arg","220AphZuD","message","isDirectory","suspendedStart","wrap","failedTransform","__await","create","displayName","11LfLRCA","charAt","adaptApiFile","miniprogramRoot","2691hDqfto","704688GnTxmL","1003896ZlkmaT","checkInputPathFun","length","sent","finallyLoc","The iterator does not provide a '","rmdir","inputPath","smartProgramRoot","normal","mark","createTransformReportFile","pop","delegate","configBasenameArray","forEach","toString","concat","unlink","src","../common/commonUtils","handleConfigInfo","reverse","complete","Generator is already running","keys","catchLoc","resolve","error","all","apply","type","1248ZbHBYw","path","tryLoc","suspendedYield","Output path ","return","copyDir","transformNodeModuleComponent","outPath","130822kCHRqk","defineProperty","readFileSync","app.json","../common/commonConfig","map","../../common/log4js.js","iterator","projectFileSuffix","throw","@@toStringTag","async","constructor","finally","confirmConverterFun","Generator","isGeneratorFunction","packageName","srcRootPath","_sent","../../common/utils","asyncIterator","_invoke","21wpEJYH","next","768135uVxtXv","reset","notifyConfig","stop","' method","completeTransform","join","pages","abrupt","break","toStringTag"];return(_0x31f1=function(){return t})()}function checkConvertOutput(t,r){var e=_0x18093c,t=path[e(500)](t),r=path.resolve(r);if(fs[e(577)](r))throw new Error(e(509)[e(640)](r,e(553)));if(r[e(588)](t+path[e(591)]))throw new Error(e(569))}function doConvert(t,r){return _doConvert[_0x18093c(503)](this,arguments)}function _doConvert(){var t=_0x18093c;return(_doConvert=_asyncToGenerator(_regeneratorRuntime()[t(633)](function t(e,r){var n,o,i;return _regeneratorRuntime().wrap(function(t){for(var r=_0x46fe;;)switch(t[r(566)]=t[r(538)]){case 0:if(n=path[r(500)](e.outPath,"ascf/ascf_src"),"yes"===process[r(597)].clearResource)return t[r(538)]=4,clearResource([n]);t.next=4;break;case 4:return checkConvertOutput(e[r(630)],n),o=commonConfig_1[r(586)][r(532)],t[r(566)]=6,commonUtils_1.createDirs(n,o),commonUtils_1[r(634)](n,e[r(630)]),i=path[r(545)](n,o),"./"===o||""===o?(commonUtils_1.setOriginPtahObject(e[r(630)],i),commonUtils_1[r(511)](e[r(630)],i)):(commonUtils_1[r(564)](path.join(e.inputPath,o),i),commonUtils_1[r(511)](path[r(545)](e[r(630)],o),i),commonUtils_1.copyConfigFiles(path.join(e[r(630)]),n)),commonUtils_1[r(512)](),commonUtils_1[r(592)](path[r(545)](n,o),e),commonUtils_1.projectConfigFile(path[r(545)](n)),"my"===commonConfig_1.Applets[r(604)]&&commonUtils_1[r(619)](n,path[r(545)](__filename,r(606))),t[r(547)](r(510),{command:r(544),folderUrl:n});case 18:return t[r(566)]=18,t.t0=t[r(558)](6),logger[r(501)](t.t0),removePromise(n)[r(527)](),t[r(547)](r(510),{command:r(613),errorMessage:t.t0.message});case 23:case"end":return t[r(542)]()}},t,null,[[6,18]])}))).apply(this,arguments)}function removePromise(i){return new Promise(function(o,t){var e=_0x46fe;fs[e(585)](i,function(t,r){var n=e;r[n(610)]()?fs.readdir(i,function(t,r){var e=n,r=(r=r[e(519)](function(t){return path[e(545)](i,t)}))[e(519)](function(t){return removePromise(t)});Promise[e(502)](r)[e(556)](function(){fs[e(629)](i,o)})}):fs[n(641)](i,o)})})}function checkInputPathFun(t){var r=_0x18093c,t=path[r(500)](t),e=checkMiniProgram(t);return{command:r(596),data:{returnCode:e,outPath:path[r(581)](t)}}}function checkMiniProgram(t){var r=_0x18093c,e=!0,n=path[r(545)](t,r(517));return e=fs[r(577)](n)&&identifyProgram(t)?e:!1}function identifyProgram(t){var r=_0x18093c;try{var e=path[r(545)](t,r(517)),n=JSON[r(601)](fs[r(516)](e)[r(639)]());if(n&&n[r(546)]&&Array[r(595)](n.pages)&&0<n[r(546)][r(625)])for(var o=getSrcRootPath(t),i=0,a=Object[r(498)](commonConfig_1[r(522)]);i<a[r(625)];i++){var c=a[i],u=path[r(545)](t,o,n[r(546)][0]+commonConfig_1[r(522)][c][r(583)]);if(fs.existsSync(u))return"wx"===c?commonConfig_1[r(586)][r(604)]="tt":commonConfig_1.Applets[r(604)]=c,!0}return!1}catch(t){return!1}}function _0x46fe(t,r){var e=_0x31f1();return(_0x46fe=function(t,r){return e[t-=496]})(t,r)}function getSrcRootPath(t){var r=_0x18093c;commonConfig_1[r(586)][r(532)]="./";for(var e=0;e<commonConfig_1[r(637)][r(625)];e++){var n=commonConfig_1.configBasenameArray[e],n=path[r(545)](t,n);fs[r(577)](n)&&((n=JSON[r(601)](fs[r(516)](n).toString()))[r(620)]?commonConfig_1.Applets[r(532)]=n[r(620)]:n[r(631)]?commonConfig_1[r(586)][r(532)]=n[r(631)]:commonConfig_1[r(586)][r(532)]="./")}return commonConfig_1[r(586)][r(532)]}exports[_0x18093c(528)]=confirmConverterFun,exports[_0x18093c(602)]=confirmConverterH5Fun,exports[_0x18093c(624)]=checkInputPathFun;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var globalDistanceCount,globalJsLine,_0xa3f90b=_0x56b5,path=((()=>{for(var e=_0x56b5,t=_0x1af4();;)try{if(412538==-parseInt(e(398))+parseInt(e(411))/2+parseInt(e(365))/3+-parseInt(e(414))/4*(parseInt(e(395))/5)+-parseInt(e(383))/6+parseInt(e(386))/7*(parseInt(e(396))/8)+-parseInt(e(385))/9*(-parseInt(e(348))/10))break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object[_0xa3f90b(393)](exports,_0xa3f90b(346),{value:!0}),exports.transformJsPath=exports[_0xa3f90b(351)]=exports[_0xa3f90b(359)]=exports[_0xa3f90b(379)]=exports[_0xa3f90b(415)]=void 0,require("path")),fs=require("fs"),_require=require("../common/textDocument"),create=_require[_0xa3f90b(417)],fileHandle_1=require(_0xa3f90b(381)),commonConfig_1=require(_0xa3f90b(373)),commonUtils_1=require(_0xa3f90b(369)),importVisitor_1=require(_0xa3f90b(358)),wxssParser_1=require("../parse/wxssParser"),commonConfig_2=require(_0xa3f90b(373)),TransformReport=require("./transformReport"),parse5=require("../compiler-utils/parse5.bundle"),_require2=require("../../common/config"),configs=_require2[_0xa3f90b(400)],insertedApiObj={},insertedApiCountObj={},excessOffsets={},DEST_API_NAME=_0xa3f90b(388),DEST_API_LEN=DEST_API_NAME[_0xa3f90b(345)];function handleWxssImport(e,r,n){var a=_0xa3f90b,o=commonConfig_1.projectFileSuffix[n],e=create(e,r),e=(r=e[a(378)](),wxssParser_1[a(382)](r,e,o.css,n)),s=0;return e[a(375)](function(e){var t=a;e.type===t(367)?(";"!==r[e[t(413)]+1-s]&&(e.endOffset=e.endOffset+1),r=commonUtils_1[t(377)](r,e[t(413)]-o[t(394)][t(345)]-s,e[t(413)]-s,t(418)),s+=o.css[t(345)]-4):(r=commonUtils_1[t(377)](r,e.startOffset-s,e[t(410)]+n.length+1-s,""),s+=n[t(345)]+1)}),r}function handleWxmlFile(e,t,r,n){var a=_0xa3f90b,t=create(e,t),t=parse5[a(347)](t[a(378)](),{}),e={filePath:e,srcPath:r,appType:n,utils:{commonConfig:commonConfig_1,importVisitor:importVisitor_1,textDocument:{create:create},fileHandle:fileHandle_1}};return parse5[a(416)](t,{convertOptions:e})}function transformWxSchemas(e,t,r){var n=_0xa3f90b,a=e[n(371)][n(356)],t=t[n(380)]({line:a.line-1,character:a[n(387)]+1});return r=commonUtils_1.replacepos(r,t+globalDistanceCount,t+e[n(366)].length+globalDistanceCount,"has:"),globalDistanceCount-=e[n(366)][n(345)]-4,r}function transformWxmlWxsFilePath(e,t,r){var n=_0xa3f90b,a=e.moduleRange.start,t=t.offsetAt({line:a[n(376)]-1,character:a[n(387)]});return r=commonUtils_1[n(377)](r,t+globalDistanceCount,t+globalDistanceCount+e[n(366)][n(345)]-1,4===e[n(366)][n(345)]?n(350):n(409))}function transformWxsFilePath(e,s,i,f,t){var c=_0xa3f90b,l=0,m=commonConfig_1[c(389)][t];return e[c(375)](function(e){var t=c;if(path[t(368)](e[t(366)])===m[t(350)]){var r=e[t(366)],n=e[t(371)][t(356)],n=s[t(380)]({line:n[t(376)]-1,character:n[t(387)]-1})+l,a=e[t(366)][t(390)](0,e[t(366)].length-(m[t(350)][t(345)]-1))+"hjs";if(r&&!r[t(349)]("./")&&!r[t(349)](t(361))){var o=path[t(401)](f,"..",r);if(!path[t(368)](o))return;fs[t(399)](o)&&(o=".",r.startsWith("/")?l+=1:(o="./",l+=2),a=o+a)}i=commonUtils_1[t(377)](i,n,n+e[t(366)][t(345)],a)}}),i}function _0x56b5(e,t){var r=_0x1af4();return(_0x56b5=function(e,t){return r[e-=345]})(e,t)}function calProcessedApis(e,t){e[t]?e[t]++:e[t]=1}function notDealtWith(e,t){var r=_0xa3f90b;return-1!==commonConfig_2[r(412)][r(392)](e[r(370)])&&!(-1!==Object[r(364)](insertedApiObj).indexOf(t)&&insertedApiObj[t]===e[r(370)])}function insertTodoInline(e,t,r,n){var a=_0xa3f90b,o=1,n=a(363)[a(402)](commonUtils_1.setLanguage(a(384)),a(372))[a(402)](DEST_API_NAME,".")[a(402)](n[a(370)],a(354)),r=(1===insertedApiCountObj[t]&&(o=0,n+="\n",globalJsLine++),r+globalDistanceCount-excessOffsets[t]-o);return e=commonUtils_1.insertStr(e,r,n),globalDistanceCount+=n[a(345)],e}function _0x1af4(){var e=["../",',"column":',"// ","keys","1802802zLRfYx","module","import","extname","../common/commonUtils","property","moduleRange","api ","../common/commonConfig",".js","forEach","line","replacepos","getText","handleWxmlFile","offsetAt","../features/fileHandle","wxssParser","4607580RsIozz","notSupport","9XQPptz","16772QFMGpi","character","has","projectFileSuffix","substring",' {"line":',"indexOf","defineProperty","css","5dFurSH","440zIfQCF","transformJsPath","757723vPVSId","existsSync","configs","join","concat","uri","mixins","wxSchema","setLanguage","fileImport","behaviors","hxml","startOffset","756004fvMDIy","invalidApis","endOffset","1121668SPuXWV","handleWxssImport","serialize","create",".css","length","__esModule","parseFragment","11078920iBPbtB","startsWith","hjs","transformJsFile","getImportRules","filePath"," TODO","interfacesForTransform","start","type","../parse/importVisitor","transformWxsFilePath","wxInterface"];return(_0x1af4=function(){return e})()}function transformWxInterface(e,t,r,n){var a=_0xa3f90b,o=e.moduleRange.start,s=t[a(403)]()+"-"+o[a(376)],i=t.offsetAt({line:o[a(376)]-1,character:o.character}),f=i+globalDistanceCount;return r=commonUtils_1[a(377)](r,f,f+n[a(345)],DEST_API_NAME),globalDistanceCount+=DEST_API_LEN-n.length,calProcessedApis(excessOffsets,s),commonConfig_2[a(355)][e[a(370)]]?(f=i+globalDistanceCount+n[a(345)]+1,r=commonUtils_1[a(377)](r,f,f+e[a(370)].length,commonConfig_2.interfacesForTransform[e[a(370)]]),i=e[a(370)].length-commonConfig_2[a(355)][e[a(370)]][a(345)],globalDistanceCount-=i,excessOffsets[s]-=i):notDealtWith(e,s)&&(calProcessedApis(insertedApiCountObj,s),n=t.offsetAt({line:o[a(376)]-1,character:0}),f=o[a(376)],configs.notaddtodo||(r=insertTodoInline(r,s,n,e)),i=t[a(403)]()+a(391)+(f+globalJsLine)+a(362)+o.character+"}",TransformReport.writeInfo(""[a(402)](commonUtils_1[a(406)](a(384)),a(372))[a(402)](DEST_API_NAME,".")[a(402)](e[a(370)]),i),insertedApiObj[s]=e[a(370)]),r}function transformJsFile(e,r,n,a){var o=_0xa3f90b,s=create(e,n),e=(n=s[o(378)](),importVisitor_1[o(352)](n,null,null,a));return globalJsLine=globalDistanceCount=0,e[o(375)](function(e){var t=o;switch(e[t(357)]){case t(407):n=transformJsPath(e,r,n,s);break;case t(360):n=transformWxInterface(e,s,n,a);break;case t(353):n=transformWxmlWxsFilePath(e,s,n);break;case t(405):n=transformWxSchemas(e,s,n);break;case t(404):n=transformComponentMixins(e,s,n)}}),n}function transformComponentMixins(e,t,r){var n=_0xa3f90b,a=e[n(371)][n(356)],t=t[n(380)]({line:a.line-1,character:a[n(387)]});return r=commonUtils_1.replacepos(r,t+globalDistanceCount,t+e[n(366)][n(345)]+globalDistanceCount,n(408)),globalDistanceCount-=e[n(366)][n(345)]-9,r}function transformJsPath(e,t,r,n){var a=_0xa3f90b,o=e[a(366)];return!o||o[a(349)]("./")||o[a(349)]("../")||(t=path.join(t,"..",o),path[a(368)](t)||(t+=a(374)),fs[a(399)](t)&&(t=e[a(371)].start,e=n[a(380)]({line:t[a(376)]-1,character:t[a(387)]-1})+globalDistanceCount,n=".",o[a(349)]("/")?globalDistanceCount+=1:(n="./",globalDistanceCount+=2),r=commonUtils_1.insertStr(r,e,n))),r}exports.handleWxssImport=handleWxssImport,exports[_0xa3f90b(379)]=handleWxmlFile,exports[_0xa3f90b(359)]=transformWxsFilePath,exports[_0xa3f90b(351)]=transformJsFile,exports[_0xa3f90b(397)]=transformJsPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x106ca2=_0xb56a,commonUtils_1=((()=>{for(var t=_0xb56a,n=_0x3f9b();;)try{if(626052==-parseInt(t(158))+-parseInt(t(161))/2+parseInt(t(155))/3*(-parseInt(t(151))/4)+parseInt(t(165))/5*(parseInt(t(150))/6)+-parseInt(t(159))/7*(parseInt(t(171))/8)+-parseInt(t(162))/9+-parseInt(t(164))/10*(-parseInt(t(168))/11))break;n.push(n.shift())}catch(t){n.push(n.shift())}})(),Object[_0x106ca2(172)](exports,_0x106ca2(157),{value:!0}),exports[_0x106ca2(154)]=exports.writeInfo=void 0,require(_0x106ca2(156))),fs=require("fs");function writeInfo(t,n){var r=_0x106ca2;write([r(167),t,"\n",commonUtils_1[r(153)](r(160)),n,r(173)][r(169)](""))}function _0xb56a(t,n){var r=_0x3f9b();return(_0xb56a=function(t,n){return r[t-=150]})(t,n)}function insertInfo(t){var n=_0x106ca2,r=fs[n(174)](commonUtils_1[n(163)]())[n(170)]();fs.writeFileSync(commonUtils_1[n(163)](),t),write(r)}function _0x3f9b(){var t=["844712XWMgPZ","8686809EObqjR","getGlobleOutPutPath","10jPKvZH","30oOFbfQ","appendFile","Error: ","25689070HytmVM","join","toString","1929704qJEZAQ","defineProperty","\n\n\n","readFileSync","594462ZWUbRk","538908nQWoFB","writeInfo","setLanguage","insertInfo","3wpAZpd","../common/commonUtils","__esModule","57857DnakEn","21uioYQc","position"];return(_0x3f9b=function(){return t})()}function write(t){t&&fs[_0x106ca2(166)](commonUtils_1.getGlobleOutPutPath(),t,function(t){if(t)throw t})}exports[_0x106ca2(152)]=writeInfo,exports[_0x106ca2(154)]=insertInfo,exports.write=write;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _typeof(a){var t=
|
|
1
|
+
function _typeof(a){var t=_0x1311;return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol[t(421)]?function(a){return typeof a}:function(a){var e=t;return a&&e(435)==typeof Symbol&&a.constructor===Symbol&&a!==Symbol[e(379)]?e(423):typeof a})(a)}function _defineProperty(a,e,t){var r=_0x1311;return(e=_toPropertyKey(e))in a?Object[r(434)](a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function _toPropertyKey(a){var e=_0x1311,a=_toPrimitive(a,e(413));return e(423)==_typeof(a)?a:a+""}function _0x4ee2(){var a=["brightness","scanCode","clearStorageSync","chooseImage","default","defineProperty","function","tempFilePath","index","title","199743JCYCTo","concat","getStorageSync","49lYqRYg","showToast","getSavedFileInfo","@@toPrimitive must return a primitive value.","prototype","length","compressImage","downloadFile","showActionSheet","forEach","makePhoneCall","__apiAdapterConverted","returnVal","66951nBrvuS","params","28149980fAbsnQ","callBack","keys","isArray","sort","onlyFromCamera","src","quality","push","5147864PPVPVY","success","removeStorageSync","filePath","28vSYfOC","600949XcYMyh","phoneNumber","apiName","getClipboardData","uploadFile","data","2nHYeRz","name","text","string","eventName","saveImageToPhotosAlbum","apFilePaths","itemList","getScreenBrightness","646002TYACGF","code","iterator","256330MtdqGz","symbol","removeSavedFile","apFilePath","object","setScreenBrightness","toPrimitive"];return(_0x4ee2=function(){return a})()}function _0x1311(a,e){var t=_0x4ee2();return(_0x1311=function(a,e){return t[a-=375]})(a,e)}function _toPrimitive(a,e){var t=_0x1311;if(t(426)!=_typeof(a)||!a)return a;var r=a[Symbol[t(428)]];if(void 0===r)return(t(413)===e?String:Number)(a);r=r.call(a,e||t(433));if("object"!=_typeof(r))return r;throw new TypeError(t(378))}(()=>{for(var a=_0x1311,e=_0x4ee2();;)try{if(409535==+parseInt(a(404))*(-parseInt(a(410))/2)+parseInt(a(439))/3*(-parseInt(a(403))/4)+parseInt(a(422))/5+parseInt(a(419))/6*(-parseInt(a(375))/7)+-parseInt(a(399))/8+parseInt(a(388))/9+parseInt(a(390))/10)break;e.push(e.shift())}catch(a){e.push(e.shift())}})(),(()=>{var a,e,p,n=_0x1311;function i(e,t){e&&Object[n(392)](e).forEach(function(a){t[a]&&(t[e[a]]=t[a],delete t[a])})}has[n(386)]||(has[n(386)]=!0,a=[{apiName:n(432),callBack:[{eventName:n(400),params:{tempFilePaths:"apFilePaths"}}]},{apiName:"saveFile",params:{apFilePath:n(436)},callBack:[{eventName:n(400),params:{savedFilePath:"apFilePath"}}]},{apiName:"getFileInfo",params:{apFilePath:n(402)}},{apiName:n(377),params:{apFilePath:n(402)}},{apiName:n(424),params:{apFilePath:n(402)}},{apiName:"setClipboardData",params:{text:n(409)}},{apiName:n(407),callBack:[{eventName:n(400),params:{data:n(412)}}]},{apiName:n(415),params:{url:n(402)}},{apiName:"showLoading",params:{content:n(438)}},{apiName:n(383),params:{items:n(417)},callBack:[{eventName:n(400),params:{tapIndex:n(437)}}]},{apiName:n(408),params:{fileName:n(411)}},{apiName:n(427),params:{brightness:"value"}},{apiName:n(418),callBack:[{eventName:n(400),params:{value:n(429)}}]},{apiName:n(430),params:{hideAlbum:n(395)},callBack:[{eventName:"success",params:{result:n(420)}}]},{apiName:n(385),params:{number:n(405)}},{apiName:n(376),params:{content:n(438)}},{apiName:n(382),callBack:[{eventName:"success",params:{tempFilePath:n(425)}}]}],e=[{apiName:n(441),params:{key:1},returnVal:n(409)},{apiName:"setStorageSync",params:{key:1,data:2}},{apiName:n(401),params:{key:1}},{apiName:n(431)}],p={},a[n(440)](e)[n(384)](function(a){a=a[n(406)];p[a]=has[a]}),a[n(384)](function(e){var t=n,r=e[t(406)];has[r]=function(){var a=t,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return i(e[a(389)],n),e[a(391)]&&e[a(391)][a(384)](function(e){var t=a,r=n[e.eventName];n[e[t(414)]]=function(a){i(e[t(389)],a),r(a)}}),p[r](n)}}),e[n(384)](function(e){var o=e.apiName;has[o]=function(){var t=_0x1311,r=0<arguments[t(380)]&&void 0!==arguments[0]?arguments[0]:{},n=[],i=e.params&&Object[t(392)](e.params)||[],a=(i[t(394)](function(a,e){return i[a]-i[e]}),i[t(384)](function(a){var e=t;r[a]&&n[e(398)](r[a])}),p[o].apply(p,n));return e[t(387)]?_defineProperty({},e.returnVal,a):{}}}),p.compressImage=has[n(381)],has.compressImage=function(){var t=n,a=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=(a[t(396)]=Array[t(393)](a.apFilePaths)?a[t(416)][0]:"",Number(a.level)),r=(e<=3?a[t(397)]=(100/3*e).toFixed(0):a.defaultImgVuality=80,a[t(397)]=Number(a[t(397)]),a[t(400)]);return a.success=function(a){var e=t;a.apFilePaths=[a[e(436)]],r(a)},p[t(381)](a)})})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function _0x2fb1(r,e){var n=_0x2d43();return(_0x2fb1=function(r,e){return n[r-=304]})(r,e)}var _0x3b274c=_0x2fb1;function _0x2d43(){var r=["81464exkqbP","classProperties","9puTLtK","662774rnXOYo","6905ywoCVh","396ioXrka","529714wjzBTq","19280tHiGDl","defineProperty","917LpRfAc","unambiguous","23619662vqYPIq","1800EltIKo","parse","babelTransform","6681408VQYxhN","substring","length"];return(_0x2d43=function(){return r})()}(()=>{for(var r=_0x2fb1,e=_0x2d43();;)try{if(852650==-parseInt(r(319))+-parseInt(r(304))/2*(parseInt(r(318))/3)+-parseInt(r(313))/4+parseInt(r(320))/5*(parseInt(r(310))/6)+parseInt(r(307))/7*(parseInt(r(316))/8)+parseInt(r(321))/9*(parseInt(r(305))/10)+parseInt(r(309))/11)break;e.push(e.shift())}catch(r){e.push(e.shift())}})(),Object[_0x3b274c(306)](exports,"__esModule",{value:!0}),exports[_0x3b274c(312)]=void 0;var babelParser=require("@babel/parser"),parseTryCount=0;function babelTransform(e,n){var a=_0x3b274c;try{var t=babelParser[a(311)](e,{sourceType:a(308),allowReturnOutsideFunction:!0,plugins:[a(317)]});return parseTryCount=0,t}catch(r){if(n){if(0===parseTryCount)return t=e.substring(0,n-1)+e[a(314)](n,e[a(315)]),parseTryCount++,babelTransform(t,n);if(parseTryCount<3)return t=e[a(314)](0,n)+","+e[a(314)](n,e[a(315)]),parseTryCount++,babelTransform(t,n);parseTryCount=0}return null}}exports.babelTransform=babelTransform;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x24e601=_0x194c,babelParser_1=((()=>{for(var e=_0x194c,r=_0x1eb7();;)try{if(688431==-parseInt(e(536))+-parseInt(e(516))/2*(parseInt(e(533))/3)+parseInt(e(499))/4*(parseInt(e(528))/5)+-parseInt(e(497))/6+-parseInt(e(554))/7*(-parseInt(e(532))/8)+-parseInt(e(506))/9+parseInt(e(529))/10*(parseInt(e(534))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}})(),Object[_0x24e601(517)](exports,_0x24e601(551),{value:!0}),exports[_0x24e601(543)]=void 0,require(_0x24e601(518))),babel_traverse_1=require("@babel/traverse"),pathTool=require(_0x24e601(548)),commonConfig_1=require(_0x24e601(527)),babelTypes=require(_0x24e601(538))[_0x24e601(514)];function getQaSchemasReg(e){var r=_0x24e601;return new RegExp("^"[r(547)](e,r(515)))}var currentType,suffixs,importRules=[],visitor={ImportDeclaration:function(e){var r=_0x24e601;importRules[r(504)]({type:"fileImport",module:e[r(507)][r(544)][r(523)],moduleRange:{start:{line:e[r(507)][r(544)][r(530)][r(525)].line,character:e[r(507)].source[r(530)][r(525)][r(520)]+2},end:{line:e[r(507)].source[r(530)][r(519)][r(539)],character:e.node[r(544)][r(530)][r(519)].column+2}}})},CallExpression:function(e){var t=_0x24e601;e[t(507)].callee&&e[t(507)][t(531)]&&e.node[t(503)].name===t(513)&&1===e[t(507)][t(531)][t(537)]&&importRules[t(504)]({type:t(498),module:e[t(507)][t(531)][0][t(523)],moduleRange:{start:{line:e[t(507)][t(531)][0][t(530)][t(525)][t(539)],character:e[t(507)][t(531)][0].loc.start[t(520)]+2},end:{line:e[t(507)][t(531)][0][t(530)][t(519)][t(539)],character:e[t(507)][t(531)][0][t(530)][t(519)][t(520)]+2}}}),e.node[t(503)]&&e.node[t(531)]&&"Component"===e[t(507)].callee[t(535)]&&1===e.node[t(531)][t(537)]&&babelTypes[t(501)](e[t(507)][t(531)][0])&&e[t(507)][t(531)][0][t(546)]&&0<e[t(507)][t(531)][0][t(546)][t(537)]&&e.node[t(531)][0].properties[t(505)](function(e){var r=t;babelTypes[r(545)](e)&&babelTypes[r(555)](e.key)&&"mixins"===e[r(526)][r(535)]&&importRules[r(504)]({type:r(550),module:e.key.name,moduleRange:{start:{line:e[r(530)][r(525)][r(539)],character:e[r(530)].start.column},end:{line:e.key.loc[r(519)][r(539)],character:e[r(526)][r(530)][r(519)].column}}})})},MemberExpression:function(e){var r=_0x24e601;e[r(507)][r(552)]&&e[r(507)][r(549)]&&e[r(507)][r(552)].name===currentType&&!hasParent(e,e[r(507)].object[r(535)])&&importRules[r(504)]({type:r(542),module:e[r(507)].object[r(535)],moduleRange:{start:{line:e[r(507)][r(552)][r(530)].start[r(539)],character:e[r(507)][r(552)].loc[r(525)][r(520)]},end:{line:e[r(507)][r(552)][r(530)][r(519)][r(539)],character:e.node[r(552)][r(530)][r(519)][r(520)]}},property:e[r(507)][r(549)][r(535)]})},Identifier:function(e){var r=_0x24e601;e[r(507)].name!==currentType||0!==e[r(526)]||hasParent(e,e[r(507)][r(535)])||importRules[r(504)]({type:r(542),module:e[r(507)][r(535)],moduleRange:{start:{line:e[r(507)][r(530)].start[r(539)],character:e[r(507)][r(530)][r(525)][r(520)]},end:{line:e.node[r(530)].end[r(539)],character:e[r(507)][r(530)][r(519)][r(520)]}},property:null})},StringLiteral:function(e){var r,t=_0x24e601;!e[t(507)][t(523)]||pathTool[t(512)](e[t(507)][t(523)])!==suffixs[t(521)]&&pathTool[t(512)](e[t(507)][t(523)])!==suffixs[t(524)]||(r=pathTool.extname(e[t(507)][t(523)]),importRules[t(504)]({type:t(541),module:r,moduleRange:{start:{line:e[t(507)][t(530)][t(519)].line,character:e.node[t(530)][t(519)][t(520)]-r[t(537)]},end:{line:e[t(507)][t(530)].end[t(539)],character:e.node[t(530)][t(519)][t(520)]}}})),e[t(507)][t(523)]&&getQaSchemasReg(currentType)[t(511)](e.node[t(523)])&&importRules.push({type:t(510),module:"".concat(currentType,":"),moduleRange:{start:{line:e.node[t(530)][t(525)].line,character:e[t(507)].loc[t(525)].column},end:{line:e[t(507)][t(530)].start.line,character:e.node[t(530)].start[t(520)]+5}}})}};function _0x1eb7(){var e=["path","property","mixins","__esModule","object","splice","8986859aEoMBo","isIdentifier","CallExpression","9528Lrqbvv","fileImport","278332TSYqWV","getOwnBinding","isObjectExpression","StringLiteral","callee","push","forEach","6416748VRvGiB","node","findParent","babelTransform","wxSchema","test","extname","require","types","://","74DnpKwO","defineProperty","./babelParser","end","column","hxml","scope","value","hjs","start","key","../common/commonConfig","25NbRZwU","297210NJnLZb","loc","arguments","8CVWhgr","95862JjsUFL","396vLZfmu","name","116419CCtpIE","length","@babel/core","line","projectFileSuffix","filePath","wxInterface","getImportRules","source","isObjectProperty","properties","concat"];return(_0x1eb7=function(){return e})()}function hasParent(e,t){var n=_0x24e601,a=!1;return e.getStatementParent()[n(508)](function(e){var r=n;a||e[r(522)][r(500)](t)&&(a=!0)}),a}function clear(){importRules[_0x24e601(553)](0,importRules.length)}function getImportRules(e,r){var t=_0x24e601,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],a=3<arguments[t(537)]?arguments[3]:void 0,n=(currentType=a,suffixs=commonConfig_1[t(540)][a],a=n?{CallExpression:visitor.CallExpression,ImportDeclaration:visitor.ImportDeclaration}:{MemberExpression:visitor.MemberExpression,StringLiteral:visitor[t(502)],Identifier:visitor.Identifier,CallExpression:visitor[t(496)]},babelParser_1[t(509)](e,r));return clear(),babel_traverse_1.default(n,a),importRules}function _0x194c(e,r){var t=_0x1eb7();return(_0x194c=function(e,r){return t[e-=496]})(e,r)}exports[_0x24e601(543)]=getImportRules;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x41583d=_0x5b60;function _0x5b60(e,t){var r=_0x5817();return(_0x5b60=function(e,t){return r[e-=271]})(e,t)}(()=>{for(var e=_0x5b60,t=_0x5817();;)try{if(117563==-parseInt(e(297))*(parseInt(e(271))/2)+parseInt(e(312))/3+parseInt(e(280))/4+-parseInt(e(287))/5*(parseInt(e(289))/6)+-parseInt(e(296))/7+-parseInt(e(283))/8+parseInt(e(284))/9*(parseInt(e(300))/10))break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object[_0x41583d(288)](exports,"__esModule",{value:!0}),exports[_0x41583d(282)]=exports[_0x41583d(304)]=exports.importReg=void 0;var postcss=require("postcss"),path=require(_0x41583d(313));function _0x5817(){var e=["importFileReg",".*(?:\\r|\\n|$)))","rule","atrule","split","[\\s\\S]*?\\*\\/\\s*(?:\\r|\\n|$)|((?:^|\\n|\\r)\\s*\\/\\/.*","swan","uri","53052pauwmh","path","map","importReg","push","indexOf","index","restLength","offsetAt","character","source","positionAt","nodes","position","11738TVtbGh","line","length","params","start","exec","concat","name","filter","286448FRCRrV","test","wxssParser","1520656IMNCsc","117rGsCCD","media","((?:^|\\n|\\r)\\s*\\/\\*[\\s\\S]*?","5EkdTWI","defineProperty","860346oWfQIY","import","type","parse","forEach","getText","selector","443562GgpfOl","25XwyciK","substring","isInComment","439870wgUwew","column","end","replace"];return(_0x5817=function(){return e})()}function wxssParser(t,r,i,p){var c=_0x41583d,n=[];try{n=postcss[c(292)](t)[c(324)][c(279)](function(e){var t=c;return e[t(291)]===t(307)&&e[t(278)]===t(290)})[c(314)](function(e){var t=c;return{type:t(290),import:e[t(274)],position:{start:e[t(322)][t(275)],end:e[t(322)].end}}})}catch(e){for(var s=t.match(exports.importReg),o=0,a=0;s=exports.importReg[c(276)](t);){var u,a=t[c(317)](s[0],a),x=checkIsInComment(s[0],t,o,s[c(318)]);x[c(299)]?(o=s[c(318)]+x.restLength,a+=x[c(319)]):(o=s[c(318)]+s[0][c(273)],(x=s[0].match(exports[c(304)]))&&(u=r[c(323)](a+x[c(318)]),n.push({type:c(290),uri:r[c(311)],position:{start:{line:u[c(272)]+1,column:u[c(321)]},end:{line:u[c(272)]+1,column:u[c(321)]+x[0].length+2}},value:x?x[1]:"",import:x[0]})),a+=s[0][c(273)])}}var l=[];return n[c(293)](function(n){var s,e,o,a=c;n.type===a(290)?(e={line:n.position[a(302)][a(272)]-1,character:n[a(325)][a(302)][a(301)]-2},s=r[a(320)](e),e=n[a(290)][a(303)](/[\r\n]/gi," ")[a(308)](" "),o=0,e[a(293)](function(e){var t,r=a,e=e[r(298)](1,e[r(273)]-1);path.extname(e)===i&&(t=n[r(290)][r(317)](e,o),o=t,l[r(316)]({type:"import",import:e,endOffset:s-(n[r(290)][r(273)]-t-e[r(273)])+1}))})):p===a(310)&&getSelectorRule(n,r,p,l)}),l}function handleSelectors(e,n,s,o,a){var t=_0x41583d;e[t(293)](function(e){var r=t;e[r(308)](/\s+/)[r(293)](function(e){var t=r;n=s[t(317)](e,n),o[t(281)](e)&&a[t(316)]({type:t(295),selector:e,startOffset:n}),n+=e[t(273)]})})}function getSelectorRule(e,t,r,n){var s,o,a,i,p=_0x41583d;e.type===p(306)?(s=t[p(294)](),o=new RegExp("^"[p(277)](r,"-")),a=e.selectors,i={line:e[p(325)][p(275)][p(272)]-1,character:e.position.start.column-1},i=t[p(320)](i),a&&handleSelectors(a,i,s,o,n)):e.type===p(285)&&e.rules[p(293)](function(e){getSelectorRule(e,t,r,n)})}function checkIsInComment(e,t,r,n){for(var s,o=_0x41583d,a=new RegExp(o(286)[o(277)](e,o(309))[o(277)](e,o(305)),"g");s=a[o(276)](t[o(298)](r));){if(s[o(318)]+r<n&&s[o(318)]+r+s[0].length>n)return{isInComment:!0,restLength:s[o(318)]+r+s[0][o(273)]-n};if(s[o(318)]+r>n)break}return{isInComment:!1,restLength:0}}exports[_0x41583d(315)]=/\@import\s+[\'\"].*[\'\"](\s+.*(\s*[and|not|only|or|\,]\s*\(.*\))*)?\s*\;?/g,exports[_0x41583d(304)]=/['"]\s*([^()]+?)\s*['"]/,exports.wxssParser=wxssParser;
|
package/lib/bin/ascf.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
var _global$_ascfCliProgr,_0x3eec07=_0x2af0;function _0x26b8(){var e=["return","3517785dgDRkQ","try statement without catch or finally","method","-p, --progress","@@toStringTag","compile","152916AxjanV","convert","AsyncIterator","5031536hEeJcf","tryEntries","Show build progress","push","description","normal","_ascfCliProgram","104506duXLJw","_ascfDebug","enable debug logging","arg","charAt","8yUZVqk","231liAEDi","requiredOption","continue","-o, --output <output-directory>","suspendedStart"," is not iterable","illegal catch attempt","object","opts","[object Generator]","wrap","commander","forEach","afterLoc","end","version","ascf toolkit convert and compile ascf project","reset","@@asyncIterator","values","-notaddtodo, --notaddtodo","Clear convert output path","Environment is development","slice","-r, --run [command]","Compile ascf project","The iterator does not provide a '","hasOwnProperty","../common/config","-w, --watch","_invoke","../../package.json","notaddtodo","value","complete","GeneratorFunction","setPrototypeOf","awrap","-c, --clear","executing","next","constructor","tryLoc","Watch for changes","completion","option","reverse","prev","completed","resolve","pop","delegate","../index","sent","catchLoc","async","stop","' method","compile <projectRoot>","action","parse","__await","function","break","mark","dispatchException","-m, --mode","create","length","then","__proto__","isGeneratorFunction","finallyLoc","Run command on changes been watched","3829340VCrXcw","abrupt","call","resultName","argv","rval","1818294EPlnkE","displayName","type","throw","defineProperty","-i, --input <input-directory>","toStringTag","suspendedYield","iterator","symbol","command","@@iterator","prototype","29180wDIenj","apply","Convert miniprogram project to ascf project","keys","4869hvbVUr","done","debug","Clear build resource","nextLoc","root"];return(_0x26b8=function(){return e})()}function _typeof(e){var t=_0x2af0;return(_typeof=t(566)==typeof Symbol&&t(467)==typeof Symbol[t(466)]?function(e){return typeof e}:function(e){var r=t;return e&&r(566)==typeof Symbol&&e[r(545)]===Symbol&&e!==Symbol[r(470)]?r(467):typeof e})(e)}function _regeneratorRuntime(){var f=_0x2af0;_regeneratorRuntime=function(){return c};var s,c={},e=Object.prototype,p=e[f(531)],l=Object[f(462)]||function(e,r,t){var n=f;e[r]=t[n(537)]},r="function"==typeof Symbol?Symbol:{},i=r.iterator||f(469),t=r.asyncIterator||f(522),n=r[f(464)]||f(486);function o(e,r,t){return Object[f(462)](e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[r]}try{o({},"")}catch(e){o=function(e,r,t){return e[r]=t}}function u(e,r,t,n){var o,i,a,c,u=f,r=r&&r[u(470)]instanceof y?r:y,r=Object[u(571)](r[u(470)]),n=new k(n||[]);return l(r,u(534),{value:(o=e,i=t,a=n,c=_,function(e,r){var t=_0x2af0;if(c===d)throw Error("Generator is already running");if(c===x){if(t(461)===e)throw r;return{value:s,done:!0}}for(a.method=e,a[t(501)]=r;;){var n=a[t(555)];if(n){n=function e(r,t){var n=f,o=t[n(484)],i=r[n(466)][o];if(i===s)return t[n(555)]=null,n(461)===o&&r[n(466)][n(481)]&&(t[n(484)]=n(481),t[n(501)]=s,e(r,t),n(461)===t.method)||n(481)!==o&&(t[n(484)]=n(461),t[n(501)]=new TypeError(n(530)+o+n(561))),m;o=h(i,r.iterator,t[n(501)]);if(n(461)===o[n(460)])return t[n(484)]=n(461),t[n(501)]=o[n(501)],t[n(555)]=null,m;i=o[n(501)];return i?i.done?(t[r[n(581)]]=i[n(537)],t[n(544)]=r[n(479)],n(481)!==t[n(484)]&&(t[n(484)]=n(544),t.arg=s),t[n(555)]=null,m):i:(t[n(484)]=n(461),t[n(501)]=new TypeError("iterator result is not an object"),t.delegate=null,m)}(n,a);if(n){if(n===m)continue;return n}}if(t(544)===a[t(484)])a.sent=a._sent=a[t(501)];else if("throw"===a.method){if(c===_)throw c=x,a[t(501)];a[t(569)](a[t(501)])}else t(481)===a[t(484)]&&a[t(579)]("return",a[t(501)]);c=d;n=h(o,i,a);if(t(496)===n[t(460)]){if(c=a[t(476)]?x:v,n[t(501)]===m)continue;return{value:n.arg,done:a[t(476)]}}t(461)===n[t(460)]&&(c=x,a[t(484)]=t(461),a.arg=n[t(501)])}})}),r}function h(e,r,t){var n=f;try{return{type:"normal",arg:e[n(580)](r,t)}}catch(e){return{type:"throw",arg:e}}}c[f(514)]=u;var _=f(508),v=f(465),d=f(543),x=f(552),m={};function y(){}function a(){}function g(){}var r={},b=(o(r,i,function(){return this}),Object.getPrototypeOf),b=b&&b(b(I([]))),w=(b&&b!==e&&p[f(580)](b,i)&&(r=b),g[f(470)]=y[f(470)]=Object[f(571)](r));function j(e){var r=f;[r(544),r(461),"return"][r(516)](function(r){o(e,r,function(e){return this[_0x2af0(534)](r,e)})})}function E(c,u){var r,o=f;l(this,o(534),{value:function(t,n){function e(){return new u(function(e,r){!function r(e,t,n,o){var i,a=_0x2af0,e=h(c[e],c,t);if(a(461)!==e[a(460)])return(t=(i=e[a(501)])[a(537)])&&a(511)==_typeof(t)&&p[a(580)](t,"__await")?u.resolve(t[a(565)])[a(573)](function(e){r(a(544),e,n,o)},function(e){r(a(461),e,n,o)}):u[a(553)](t)[a(573)](function(e){i[a(537)]=e,n(i)},function(e){return r("throw",e,n,o)});o(e[a(501)])}(t,n,e,r)})}return r=r?r[o(573)](e,e):e()}})}function O(e){var r=f,t={tryLoc:e[0]};1 in e&&(t[r(558)]=e[1]),2 in e&&(t[r(576)]=e[2],t[r(517)]=e[3]),this[r(492)][r(494)](t)}function S(e){var r=f,t=e[r(548)]||{};t[r(460)]=r(496),delete t.arg,e.completion=t}function k(e){var r=f;this[r(492)]=[{tryLoc:"root"}],e[r(516)](O,this),this[r(521)](!0)}function I(t){var n=f;if(t||""===t){var o,e=t[i];if(e)return e[n(580)](t);if("function"==typeof t[n(544)])return t;if(!isNaN(t[n(572)]))return o=-1,(e=function e(){for(var r=n;++o<t[r(572)];)if(p[r(580)](t,o))return e[r(537)]=t[o],e.done=!1,e;return e[r(537)]=s,e[r(476)]=!0,e})[n(544)]=e}throw new TypeError(_typeof(t)+n(509))}return a[f(470)]=g,l(w,f(545),{value:g,configurable:!0}),l(g,f(545),{value:a,configurable:!0}),a.displayName=o(g,n,f(539)),c[f(575)]=function(e){var r=f,e=r(566)==typeof e&&e[r(545)];return!!e&&(e===a||r(539)===(e[r(459)]||e.name))},c[f(568)]=function(e){var r=f;return Object[r(540)]?Object.setPrototypeOf(e,g):(e[r(574)]=g,o(e,n,r(539))),e[r(470)]=Object.create(w),e},c[f(541)]=function(e){return{__await:e}},j(E[f(470)]),o(E[f(470)],t,function(){return this}),c[f(490)]=E,c[f(559)]=function(e,r,t,n,o){var i=f,a=(void 0===o&&(o=Promise),new E(u(e,r,t,n),o));return c[i(575)](r)?a:a[i(544)]()[i(573)](function(e){var r=i;return e[r(476)]?e.value:a[r(544)]()})},j(w),o(w,n,"Generator"),o(w,i,function(){return this}),o(w,"toString",function(){return f(513)}),c[f(474)]=function(e){var r,n=f,o=Object(e),i=[];for(r in o)i[n(494)](r);return i[n(550)](),function e(){for(var r=n;i[r(572)];){var t=i[r(554)]();if(t in o)return e[r(537)]=t,e[r(476)]=!1,e}return e[r(476)]=!0,e}},c[f(523)]=I,k[f(470)]={constructor:k,reset:function(e){var r=f;if(this[r(551)]=0,this[r(544)]=0,this[r(557)]=this._sent=s,this[r(476)]=!1,this[r(555)]=null,this[r(484)]=r(544),this[r(501)]=s,this[r(492)][r(516)](S),!e)for(var t in this)"t"===t[r(502)](0)&&p[r(580)](this,t)&&!isNaN(+t[r(527)](1))&&(this[t]=s)},stop:function(){var e=f,r=(this[e(476)]=!0,this[e(492)][0].completion);if(e(461)===r[e(460)])throw r.arg;return this[e(583)]},dispatchException:function(n){var o=f;if(this[o(476)])throw n;var i=this;function e(e,r){var t=o;return a[t(460)]="throw",a[t(501)]=n,i[t(544)]=e,r&&(i[t(484)]="next",i[t(501)]=s),!!r}for(var r=this.tryEntries[o(572)]-1;0<=r;--r){var t=this[o(492)][r],a=t[o(548)];if(o(480)===t[o(546)])return e("end");if(t[o(546)]<=this[o(551)]){var c=p[o(580)](t,o(558)),u=p[o(580)](t,o(576));if(c&&u){if(this[o(551)]<t.catchLoc)return e(t[o(558)],!0);if(this[o(551)]<t[o(576)])return e(t[o(576)])}else if(c){if(this[o(551)]<t[o(558)])return e(t[o(558)],!0)}else{if(!u)throw Error(o(483));if(this[o(551)]<t[o(576)])return e(t[o(576)])}}}},abrupt:function(e,r){for(var t=f,n=this[t(492)][t(572)]-1;0<=n;--n){var o=this[t(492)][n];if(o.tryLoc<=this[t(551)]&&p[t(580)](o,"finallyLoc")&&this[t(551)]<o.finallyLoc){var i=o;break}}var a=(i=i&&("break"===e||"continue"===e)&&i.tryLoc<=r&&r<=i[t(576)]?null:i)?i[t(548)]:{};return a[t(460)]=e,a[t(501)]=r,i?(this[t(484)]="next",this[t(544)]=i[t(576)],m):this.complete(a)},complete:function(e,r){var t=f;if(t(461)===e[t(460)])throw e[t(501)];return t(567)===e.type||t(506)===e.type?this[t(544)]=e[t(501)]:t(481)===e.type?(this[t(583)]=this.arg=e[t(501)],this[t(484)]=t(481),this[t(544)]=t(518)):"normal"===e[t(460)]&&r&&(this[t(544)]=r),m},finish:function(e){for(var r=f,t=this.tryEntries[r(572)]-1;0<=t;--t){var n=this[r(492)][t];if(n[r(576)]===e)return this[r(538)](n[r(548)],n[r(517)]),S(n),m}},catch:function(e){for(var r=f,t=this[r(492)][r(572)]-1;0<=t;--t){var n,o,i=this[r(492)][t];if(i[r(546)]===e)return n=i[r(548)],r(461)===n[r(460)]&&(o=n.arg,S(i)),o}throw Error(r(510))},delegateYield:function(e,r,t){var n=f;return this[n(555)]={iterator:I(e),resultName:r,nextLoc:t},"next"===this[n(484)]&&(this[n(501)]=s),m}},c}function asyncGeneratorStep(e,r,t,n,o,i,a){var c=_0x2af0;try{var u=e[i](a),f=u[c(537)]}catch(e){return void t(e)}u.done?r(f):Promise[c(553)](f)[c(573)](n,o)}function _asyncToGenerator(u){return function(){var e=this,c=arguments;return new Promise(function(r,t){var n=_0x2af0,o=u[n(472)](e,c);function i(e){asyncGeneratorStep(o,r,t,i,a,n(544),e)}function a(e){asyncGeneratorStep(o,r,t,i,a,n(461),e)}i(void 0)})}}function _0x2af0(e,r){var t=_0x26b8();return(_0x2af0=function(e,r){return t[e-=459]})(e,r)}(()=>{for(var e=_0x2af0,r=_0x26b8();;)try{if(512834==+parseInt(e(498))*(-parseInt(e(503))/2)+-parseInt(e(584))/3+-parseInt(e(578))/4+parseInt(e(482))/5+parseInt(e(488))/6*(parseInt(e(504))/7)+-parseInt(e(491))/8+parseInt(e(475))/9*(parseInt(e(471))/10))break;r.push(r.shift())}catch(e){r.push(r.shift())}})();var ascf=require(_0x3eec07(556)),_require=require(_0x3eec07(515)),Command=_require.Command,pkg=require(_0x3eec07(535)),_require2=require(_0x3eec07(532)),configs=_require2.configs,program=new Command;program[_0x3eec07(519)](pkg[_0x3eec07(519)])[_0x3eec07(495)](_0x3eec07(520))[_0x3eec07(549)]("--debug",_0x3eec07(500)),program[_0x3eec07(468)](_0x3eec07(489)).description(_0x3eec07(473)).requiredOption(_0x3eec07(463))[_0x3eec07(505)](_0x3eec07(507))[_0x3eec07(549)](_0x3eec07(542),_0x3eec07(525)).option("-va, --validate","Validate path")[_0x3eec07(549)](_0x3eec07(524),"Not add todo for not supported api.")[_0x3eec07(563)]((()=>{var r=_0x3eec07,t=_asyncToGenerator(_regeneratorRuntime()[r(568)](function e(t){var n=r;return _regeneratorRuntime()[n(514)](function(e){for(var r=n;;)switch(e[r(551)]=e[r(544)]){case 0:return configs[r(536)]=!!t[r(536)],e[r(544)]=3,ascf[r(489)](t);case 3:case r(518):return e[r(560)]()}},e)}));return function(e){return t[r(472)](this,arguments)}})()),program[_0x3eec07(468)](_0x3eec07(562)).description(_0x3eec07(529))[_0x3eec07(549)](_0x3eec07(485),_0x3eec07(493))[_0x3eec07(549)](_0x3eec07(533),_0x3eec07(547))[_0x3eec07(549)](_0x3eec07(570),_0x3eec07(526))[_0x3eec07(549)]("-c, --clear",_0x3eec07(478))[_0x3eec07(549)](_0x3eec07(528),_0x3eec07(577)).action((()=>{var i=_0x3eec07,t=_asyncToGenerator(_regeneratorRuntime()[i(568)](function e(t,n){var o=i;return _regeneratorRuntime()[o(514)](function(e){for(var r=o;;)switch(e[r(551)]=e[r(544)]){case 0:return e.next=2,ascf[r(487)](t,n);case 2:case r(518):return e[r(560)]()}},e)}));return function(e,r){return t[i(472)](this,arguments)}})()),program[_0x3eec07(564)](process[_0x3eec07(582)]),global[_0x3eec07(497)]=program,global[_0x3eec07(499)]=!(null==(_global$_ascfCliProgr=global[_0x3eec07(497)][_0x3eec07(512)]())||!_global$_ascfCliProgr[_0x3eec07(477)]);
|
|
2
|
+
var _global$_ascfCliProgr,_0xf3123=_0x35ba;function _0x35ba(t,r){var e=_0x2e62();return(_0x35ba=function(t,r){return e[t-=270]})(t,r)}function _typeof(t){var e=_0x35ba;return(_typeof="function"==typeof Symbol&&e(366)==typeof Symbol.iterator?function(t){return typeof t}:function(t){var r=e;return t&&r(402)==typeof Symbol&&t[r(336)]===Symbol&&t!==Symbol.prototype?r(366):typeof t})(t)}function _regeneratorRuntime(){var u=_0x35ba;_regeneratorRuntime=function(){return f};var s,f={},t=Object[u(405)],l=t[u(341)],p=Object[u(298)]||function(t,r,e){var n=u;t[r]=e[n(348)]},r=u(402)==typeof Symbol?Symbol:{},i=r[u(285)]||u(271),e=r[u(398)]||u(372),n=r[u(401)]||u(392);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 c(t,r,e,n){var o,i,a,f,c=u,r=r&&r[c(405)]instanceof y?r:y,r=Object[c(323)](r[c(405)]),n=new E(n||[]);return p(r,c(283),{value:(o=t,i=e,a=n,f=_,function(t,r){var e=_0x35ba;if(f===g)throw Error(e(378));if(f===x){if("throw"===t)throw r;return{value:s,done:!0}}for(a.method=t,a[e(371)]=r;;){var n=a[e(403)];if(n){n=function t(r,e){var n=u,o=e[n(373)],i=r[n(285)][o];if(i===s)return e[n(403)]=null,n(387)===o&&r[n(285)].return&&(e[n(373)]="return",e[n(371)]=s,t(r,e),n(387)===e[n(373)])||n(289)!==o&&(e[n(373)]=n(387),e[n(371)]=new TypeError(n(357)+o+n(276))),d;o=h(i,r.iterator,e.arg);if(n(387)===o[n(352)])return e[n(373)]=n(387),e[n(371)]=o[n(371)],e[n(403)]=null,d;i=o[n(371)];return i?i.done?(e[r.resultName]=i[n(348)],e[n(280)]=r[n(344)],n(289)!==e[n(373)]&&(e.method=n(280),e[n(371)]=s),e[n(403)]=null,d):i:(e.method=n(387),e[n(371)]=new TypeError(n(314)),e[n(403)]=null,d)}(n,a);if(n){if(n===d)continue;return n}}if(e(280)===a[e(373)])a[e(293)]=a[e(306)]=a.arg;else if(e(387)===a[e(373)]){if(f===_)throw f=x,a[e(371)];a.dispatchException(a[e(371)])}else e(289)===a.method&&a.abrupt(e(289),a[e(371)]);f=g;n=h(o,i,a);if(e(329)===n.type){if(f=a[e(311)]?x:v,n[e(371)]===d)continue;return{value:n[e(371)],done:a.done}}"throw"===n[e(352)]&&(f=x,a[e(373)]=e(387),a[e(371)]=n[e(371)])}})}),r}function h(t,r,e){var n=u;try{return{type:n(329),arg:t[n(343)](r,e)}}catch(t){return{type:"throw",arg:t}}}f.wrap=c;var _=u(327),v=u(315),g=u(287),x=u(381),d={};function y(){}function a(){}function m(){}var r={},b=(o(r,i,function(){return this}),Object[u(337)]),b=b&&b(b(I([]))),w=(b&&b!==t&&l[u(343)](b,i)&&(r=b),m[u(405)]=y[u(405)]=Object[u(323)](r));function j(t){var r=u;[r(280),r(387),r(289)].forEach(function(r){o(t,r,function(t){return this._invoke(r,t)})})}function S(f,c){var r,o=u;p(this,o(283),{value:function(e,n){function t(){return new c(function(t,r){!function r(t,e,n,o){var i,a=_0x35ba,t=h(f[t],f,e);if(a(387)!==t.type)return(e=(i=t[a(371)])[a(348)])&&a(364)==_typeof(e)&&l[a(343)](e,"__await")?c.resolve(e[a(317)])[a(319)](function(t){r("next",t,n,o)},function(t){r(a(387),t,n,o)}):c[a(288)](e)[a(319)](function(t){i[a(348)]=t,n(i)},function(t){return r(a(387),t,n,o)});o(t[a(371)])}(e,n,t,r)})}return r=r?r[o(319)](t,t):t()}})}function O(t){var r=u,e={tryLoc:t[0]};1 in t&&(e[r(356)]=t[1]),2 in t&&(e[r(277)]=t[2],e[r(349)]=t[3]),this[r(380)][r(325)](e)}function C(t){var r=u,e=t[r(273)]||{};e[r(352)]=r(329),delete e[r(371)],t[r(273)]=e}function E(t){var r=u;this[r(380)]=[{tryLoc:r(272)}],t[r(340)](O,this),this.reset(!0)}function I(e){var n=u;if(e||""===e){var o,t=e[i];if(t)return t.call(e);if(n(402)==typeof e[n(280)])return e;if(!isNaN(e[n(385)]))return o=-1,(t=function t(){for(var r=n;++o<e[r(385)];)if(l[r(343)](e,o))return t.value=e[o],t[r(311)]=!1,t;return t[r(348)]=s,t[r(311)]=!0,t})[n(280)]=t}throw new TypeError(_typeof(e)+n(404))}return a[u(405)]=m,p(w,"constructor",{value:m,configurable:!0}),p(m,u(336),{value:a,configurable:!0}),a[u(301)]=o(m,n,u(292)),f[u(274)]=function(t){var r=u,t=r(402)==typeof t&&t[r(336)];return!!t&&(t===a||r(292)===(t[r(301)]||t[r(342)]))},f[u(362)]=function(t){var r=u;return Object[r(353)]?Object.setPrototypeOf(t,m):(t[r(312)]=m,o(t,n,r(292))),t[r(405)]=Object[r(323)](w),t},f[u(326)]=function(t){return{__await:t}},j(S[u(405)]),o(S[u(405)],e,function(){return this}),f[u(321)]=S,f[u(302)]=function(t,r,e,n,o){var i=u,a=(void 0===o&&(o=Promise),new S(c(t,r,e,n),o));return f[i(274)](r)?a:a[i(280)]()[i(319)](function(t){var r=i;return t.done?t[r(348)]:a[r(280)]()})},j(w),o(w,n,u(394)),o(w,i,function(){return this}),o(w,u(320),function(){return u(365)}),f[u(305)]=function(t){var r,n=u,o=Object(t),i=[];for(r in o)i[n(325)](r);return i.reverse(),function t(){for(var r=n;i[r(385)];){var e=i.pop();if(e in o)return t[r(348)]=e,t[r(311)]=!1,t}return t[r(311)]=!0,t}},f[u(322)]=I,E.prototype={constructor:E,reset:function(t){var r=u;if(this[r(354)]=0,this[r(280)]=0,this[r(293)]=this[r(306)]=s,this.done=!1,this.delegate=null,this[r(373)]=r(280),this[r(371)]=s,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e[r(374)](0)&&l[r(343)](this,e)&&!isNaN(+e.slice(1))&&(this[e]=s)},stop:function(){var t=u,r=(this[t(311)]=!0,this[t(380)][0][t(273)]);if(t(387)===r.type)throw r[t(371)];return this.rval},dispatchException:function(n){var o=u;if(this[o(311)])throw n;var i=this;function t(t,r){var e=o;return a[e(352)]=e(387),a[e(371)]=n,i[e(280)]=t,r&&(i[e(373)]="next",i[e(371)]=s),!!r}for(var r=this[o(380)][o(385)]-1;0<=r;--r){var e=this[o(380)][r],a=e[o(273)];if(o(272)===e.tryLoc)return t("end");if(e[o(308)]<=this[o(354)]){var f=l.call(e,"catchLoc"),c=l.call(e,o(277));if(f&&c){if(this.prev<e[o(356)])return t(e.catchLoc,!0);if(this[o(354)]<e[o(277)])return t(e[o(277)])}else if(f){if(this[o(354)]<e[o(356)])return t(e[o(356)],!0)}else{if(!c)throw Error(o(379));if(this[o(354)]<e.finallyLoc)return t(e[o(277)])}}}},abrupt:function(t,r){for(var e=u,n=this.tryEntries[e(385)]-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&l[e(343)](o,e(277))&&this[e(354)]<o[e(277)]){var i=o;break}}var a=(i=i&&("break"===t||e(346)===t)&&i[e(308)]<=r&&r<=i[e(277)]?null:i)?i[e(273)]:{};return a[e(352)]=t,a[e(371)]=r,i?(this[e(373)]="next",this[e(280)]=i[e(277)],d):this[e(345)](a)},complete:function(t,r){var e=u;if(e(387)===t[e(352)])throw t.arg;return e(399)===t.type||e(346)===t[e(352)]?this[e(280)]=t.arg:e(289)===t[e(352)]?(this[e(333)]=this[e(371)]=t.arg,this.method=e(289),this.next=e(279)):e(329)===t[e(352)]&&r&&(this[e(280)]=r),d},finish:function(t){for(var r=u,e=this[r(380)].length-1;0<=e;--e){var n=this[r(380)][e];if(n[r(277)]===t)return this[r(345)](n[r(273)],n[r(349)]),C(n),d}},catch:function(t){for(var r=u,e=this.tryEntries[r(385)]-1;0<=e;--e){var n,o,i=this[r(380)][e];if(i[r(308)]===t)return n=i[r(273)],r(387)===n[r(352)]&&(o=n[r(371)],C(i)),o}throw Error(r(310))},delegateYield:function(t,r,e){var n=u;return this.delegate={iterator:I(t),resultName:r,nextLoc:e},n(280)===this[n(373)]&&(this.arg=s),d}},f}function asyncGeneratorStep(t,r,e,n,o,i,a){var f=_0x35ba;try{var c=t[i](a),u=c[f(348)]}catch(t){return void e(t)}c[f(311)]?r(u):Promise[f(288)](u)[f(319)](n,o)}function _0x2e62(){var t=["setPrototypeOf","prev","Watch for changes","catchLoc","The iterator does not provide a '","Control if and how source maps are generated","--templateHoist","compile","convert","mark","apply","object","[object Generator]","symbol","../index","-c, --clear","_ascfDebug","-va, --validate","arg","@@asyncIterator","method","charAt","-w, --watch","2491380ROdeMt","Skip API and components validator","Generator is already running","try statement without catch or finally","tryEntries","completed","16ttYvXb","--devtool [type]","Environment is development","length","../../package.json","throw","Use swc parser","-p, --progress","-i, --input <input-directory>","opts","@@toStringTag","command","Generator","enable debug logging","--swc","stop","asyncIterator","break","3172644wNzfyy","toStringTag","function","delegate"," is not iterable","prototype","11QatHIk","-o, --output <output-directory>","@@iterator","root","completion","isGeneratorFunction","22231360JZnIsN","' method","finallyLoc","Setting the log level","end","next","Not add todo for not supported api.","Show build progress","_invoke","-m, --mode","iterator","5445030WdRBpD","executing","resolve","return","wrap","Clear convert output path","GeneratorFunction","sent","version","Run command on changes been watched","5PJoqSh","_ascfCliProgram","defineProperty","option","9440001uqeoOs","displayName","async","145437lQrTZR","description","keys","_sent","-notaddtodo, --notaddtodo","tryLoc","4963gSOhtC","illegal catch attempt","done","__proto__","ascf toolkit convert and compile ascf project","iterator result is not an object","suspendedYield","commander","__await","action","then","toString","AsyncIterator","values","create","../common/log4js.js","push","awrap","suspendedStart","setLoggerConfig","normal","Validate path","--logging [level]","5272yRrlSd","rval","logging","Convert miniprogram project to ascf project","constructor","getPrototypeOf","requiredOption","--skipApiValidator","forEach","hasOwnProperty","name","call","nextLoc","complete","continue","Clear build resource","value","afterLoc","-r, --run [command]","Hoist template to page scope","type"];return(_0x2e62=function(){return t})()}function _asyncToGenerator(c){return function(){var t=this,f=arguments;return new Promise(function(r,e){var n=_0x35ba,o=c[n(363)](t,f);function i(t){asyncGeneratorStep(o,r,e,i,a,n(280),t)}function a(t){asyncGeneratorStep(o,r,e,i,a,"throw",t)}i(void 0)})}}(()=>{for(var t=_0x35ba,r=_0x2e62();;)try{if(959097==+parseInt(t(303))*(parseInt(t(382))/2)+parseInt(t(286))/3+-parseInt(t(400))/4+parseInt(t(296))/5*(parseInt(t(376))/6)+-parseInt(t(309))/7*(parseInt(t(332))/8)+parseInt(t(300))/9+-parseInt(t(275))/10*(parseInt(t(406))/11))break;r.push(r.shift())}catch(t){r.push(r.shift())}})();var ascf=require(_0xf3123(367)),_require=require(_0xf3123(316)),Command=_require.Command,pkg=require(_0xf3123(386)),program=new Command,_require2=require(_0xf3123(324)),setLoggerConfig=_require2[_0xf3123(328)];program[_0xf3123(294)](pkg[_0xf3123(294)])[_0xf3123(304)](_0xf3123(313))[_0xf3123(299)]("--debug",_0xf3123(395)),program[_0xf3123(393)]("convert")[_0xf3123(304)](_0xf3123(335))[_0xf3123(338)](_0xf3123(390))[_0xf3123(338)](_0xf3123(270)).option(_0xf3123(368),_0xf3123(291)).option(_0xf3123(370),_0xf3123(330))[_0xf3123(299)](_0xf3123(307),_0xf3123(281))[_0xf3123(299)](_0xf3123(331),_0xf3123(278))[_0xf3123(318)]((()=>{var r=_0xf3123,e=_asyncToGenerator(_regeneratorRuntime()[r(362)](function t(e){var n=r;return _regeneratorRuntime()[n(290)](function(t){for(var r=n;;)switch(t[r(354)]=t[r(280)]){case 0:return setLoggerConfig(e[r(334)]),t.next=3,ascf[r(361)](e);case 3:case r(279):return t[r(397)]()}},t)}));return function(t){return e[r(363)](this,arguments)}})()),program[_0xf3123(393)]("compile <projectRoot>")[_0xf3123(304)]("Compile ascf project")[_0xf3123(299)](_0xf3123(389),_0xf3123(282))[_0xf3123(299)](_0xf3123(375),_0xf3123(355))[_0xf3123(299)](_0xf3123(284),_0xf3123(384)).option(_0xf3123(368),_0xf3123(347))[_0xf3123(299)](_0xf3123(350),_0xf3123(295))[_0xf3123(299)](_0xf3123(331),"Setting the log level")[_0xf3123(299)](_0xf3123(396),_0xf3123(388)).option(_0xf3123(383),_0xf3123(358))[_0xf3123(299)](_0xf3123(359),_0xf3123(351))[_0xf3123(299)](_0xf3123(339),_0xf3123(377)).action((()=>{var i=_0xf3123,e=_asyncToGenerator(_regeneratorRuntime()[i(362)](function t(e,n){var o=i;return _regeneratorRuntime()[o(290)](function(t){for(var r=o;;)switch(t[r(354)]=t.next){case 0:return setLoggerConfig(n.logging),t.next=3,ascf[r(360)](e,n);case 3:case r(279):return t[r(397)]()}},t)}));return function(t,r){return e[i(363)](this,arguments)}})()),program.parse(process.argv),global[_0xf3123(297)]=program,global[_0xf3123(369)]=!(null==(_global$_ascfCliProgr=global[_0xf3123(297)][_0xf3123(391)]())||!_global$_ascfCliProgr.debug);
|
package/lib/common/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x5994dc=_0x28a1;function _0x28a1(c,r){var e=_0x5cc2();return(_0x28a1=function(c,r){return e[c-=156]})(c,r)}function _0x5cc2(){var c=["5508IiGSar","11pkGaXn","radio-group","47rloNSq","movable-view","3179592nKkqAm","progress","3440NRuCpz","web-view","1782403EYoXOy","icon","textarea","navigator","24185BGqOUB","checkbox","888117DamURU","swiper-item","button","movable-area","scroll-view","8qnAxfS","picker","label","picker-view","swiper","588HWZzzf","view","picker-view-column","12324LIUNfb","695440pnocWZ","text","4UZlqZq","camera"];return(_0x5cc2=function(){return c})()}(()=>{for(var c=_0x28a1,r=_0x5cc2();;)try{if(339476==-parseInt(c(156))*(parseInt(c(160))/2)+-parseInt(c(168))/3*(parseInt(c(184))/4)+-parseInt(c(166))/5*(-parseInt(c(178))/6)+-parseInt(c(162))/7*(-parseInt(c(173))/8)+parseInt(c(158))/9+-parseInt(c(182))/10*(-parseInt(c(187))/11)+parseInt(c(186))/12*(-parseInt(c(181))/13))break;r.push(r.shift())}catch(c){r.push(r.shift())}})();var configs={notaddtodo:!1,parser:"babel",devtool:void 0,componentList:[_0x5994dc(171),_0x5994dc(157),_0x5994dc(172),_0x5994dc(177),_0x5994dc(169),_0x5994dc(179),_0x5994dc(163),_0x5994dc(159),"rich-text",_0x5994dc(183),_0x5994dc(170),_0x5994dc(167),"checkbox-group","form","input",_0x5994dc(175),_0x5994dc(174),_0x5994dc(176),_0x5994dc(180),"radio",_0x5994dc(188),"slider","switch",_0x5994dc(164),_0x5994dc(165),"image","video",_0x5994dc(185),"Map","canvas",_0x5994dc(161)],templateHoist:!1,ascfLazyImportFiles:{},skipApiValidator:!1};exports.configs=configs;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _0x98d680=_0x1ef7;function _typeof(e){var t=_0x1ef7;return(_typeof=t(308)==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){var r=t;return e&&r(308)==typeof Symbol&&e[r(306)]===Symbol&&e!==Symbol[r(332)]?"symbol":typeof e})(e)}function _0x1ef7(e,r){var t=_0x6f72();return(_0x1ef7=function(e,r){return t[e-=306]})(e,r)}function _classCallCheck(e,r){var t=_0x1ef7;if(!(e instanceof r))throw new TypeError(t(355))}function _defineProperties(e,r){for(var t=_0x1ef7,o=0;o<r.length;o++){var n=r[o];n.enumerable=n[t(324)]||!1,n[t(348)]=!0,t(344)in n&&(n[t(340)]=!0),Object.defineProperty(e,_toPropertyKey(n[t(331)]),n)}}function _createClass(e,r,t){var o=_0x1ef7;return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object[o(312)](e,o(332),{writable:!1}),e}function _toPropertyKey(e){var r=_0x1ef7,e=_toPrimitive(e,"string");return r(347)==_typeof(e)?e:e+""}function _toPrimitive(e,r){var t=_0x1ef7;if(t(320)!=_typeof(e)||!e)return e;var o=e[Symbol[t(316)]];if(void 0===o)return(t(359)===r?String:Number)(e);o=o[t(360)](e,r||t(325));if("object"!=_typeof(o))return o;throw new TypeError(t(357))}function _0x6f72(){var e=["3770SrwLcq","fatal","debug-log-file","120VNqZQE","cachedir","writable","warn","categories","setLoggerConfig","value","apply","path","symbol","configurable","ascf-cache","toLowerCase","error","info","2122184mFiUkB","stdout","Cannot call a class as a function","resolve","@@toPrimitive must return a primitive value.","debug","string","call","constructor","1030077nsUKGH","function","> ascf-toolkit %p %c %[%m%]","concat","1990584MJdnOs","defineProperty","4502448TsWfcN","pattern","getLogger","toPrimitive","build.log","35IHlXIW","exports","object","length","86NIALvr","12567lcmmKY","enumerable","default","143RaTVlE","%d{yyyy-MM-dd hh:mm:ss.SSS} > ascf-toolkit %p %c %m","2180204JQuAHN","AscfToolkit","exit","key","prototype","1314LZFABL","configure"];return(_0x6f72=function(){return e})()}(()=>{for(var e=_0x1ef7,r=_0x6f72();;)try{if(797025==-parseInt(e(323))*(parseInt(e(322))/2)+parseInt(e(313))/3+parseInt(e(328))/4+parseInt(e(335))/5*(-parseInt(e(333))/6)+-parseInt(e(318))/7*(parseInt(e(353))/8)+parseInt(e(307))/9*(-parseInt(e(338))/10)+-parseInt(e(326))/11*(-parseInt(e(311))/12))break;r.push(r.shift())}catch(e){r.push(r.shift())}})();var log4js=require("log4js"),path=require(_0x98d680(346)),levelArr=[_0x98d680(358),"info",_0x98d680(341),_0x98d680(351),"fatal"],cachedir=require(_0x98d680(339)),ASCF_TOOLKIT=_0x98d680(329);function setLoggerConfig(e){var r=_0x98d680,e=getLevel(e);log4js[r(334)]({appenders:{default:{type:r(354),layout:{type:"pattern",pattern:r(309)}},"debug-log-file":{type:"fileSync",filename:path[r(356)](cachedir(r(349)),r(317)),maxLogSize:10485760,backups:9,layout:{type:r(314),pattern:r(327)}}},categories:{default:{appenders:[r(325)],level:e},AscfToolkit:{appenders:[r(337)],level:r(358)}}})}function getLevel(e){var r=_0x98d680;return e&&levelArr.includes(e[r(350)]())?e[r(350)]():r(352)}var Logger=(()=>{var f=_0x98d680;return _createClass(function e(r){var t=_0x1ef7;_classCallCheck(this,e),this[t(342)]=r},[{key:f(358),value:function(e){for(var r=f,t=log4js[r(315)](this.categories),o=log4js[r(315)](ASCF_TOOLKIT),n=arguments.length,a=new Array(1<n?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];t[r(358)][r(345)](t,[e].concat(a)),o[r(358)][r(345)](o,[e][r(310)](a))}},{key:"info",value:function(e){for(var r=f,t=log4js[r(315)](this[r(342)]),o=log4js.getLogger(ASCF_TOOLKIT),n=arguments[r(321)],a=new Array(1<n?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];t.info[r(345)](t,[e].concat(a)),o[r(352)][r(345)](o,[e][r(310)](a))}},{key:"warn",value:function(e){for(var r=f,t=log4js[r(315)](this.categories),o=log4js[r(315)](ASCF_TOOLKIT),n=arguments.length,a=new Array(1<n?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];t[r(341)][r(345)](t,[e][r(310)](a)),o[r(341)][r(345)](o,[e][r(310)](a))}},{key:f(351),value:function(e){for(var r=f,t=log4js.getLogger(this.categories),o=log4js[r(315)](ASCF_TOOLKIT),n=arguments.length,a=new Array(1<n?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];t.error[r(345)](t,[e][r(310)](a)),o[r(351)][r(345)](o,[e][r(310)](a))}},{key:f(336),value:function(e){for(var r=f,t=log4js[r(315)](this[r(342)]),o=log4js[r(315)](ASCF_TOOLKIT),n=arguments[r(321)],a=new Array(1<n?n-1:0),i=1;i<n;i++)a[i-1]=arguments[i];t[r(336)][r(345)](t,[e][r(310)](a)),o[r(336)][r(345)](o,[e][r(310)](a)),process[r(330)](1)}}])})();function getLogger(e){return new Logger(e)}module[_0x98d680(319)]={getLogger:getLogger},module[_0x98d680(319)][_0x98d680(343)]=setLoggerConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x5823d8=_0x521c;function _typeof(r){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){var t=_0x521c;return r&&t(512)==typeof Symbol&&r[t(554)]===Symbol&&r!==Symbol[t(546)]?t(503):typeof r})(r)}function _classCallCheck(r,t){var e=_0x521c;if(!(r instanceof t))throw new TypeError(e(551))}function _defineProperties(r,t){for(var e=_0x521c,n=0;n<t.length;n++){var o=t[n];o[e(496)]=o[e(496)]||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object[e(541)](r,_toPropertyKey(o.key),o)}}function _createClass(r,t,e){var n=_0x521c;return t&&_defineProperties(r.prototype,t),e&&_defineProperties(r,e),Object[n(541)](r,n(546),{writable:!1}),r}function _toPropertyKey(r){var t=_0x521c,r=_toPrimitive(r,t(557));return t(503)==_typeof(r)?r:r+""}function _0x521c(r,t){var e=_0x2891();return(_0x521c=function(r,t){return e[r-=466]})(r,t)}function _toPrimitive(r,t){var e=_0x521c;if(e(505)!=_typeof(r)||!r)return r;var n=r[Symbol[e(548)]];if(void 0===n)return(e(557)===t?String:Number)(r);n=n[e(511)](r,t||e(501));if("object"!=_typeof(n))return n;throw new TypeError(e(473))}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,t){var e,n=_0x521c;if(r)return n(557)==typeof r?_arrayLikeToArray(r,t):(e={}[n(553)][n(511)](r)[n(495)](8,-1),n(526)===e&&r[n(554)]&&(e=r[n(554)][n(523)]),n(486)===e||n(529)===e?Array[n(483)](r):n(471)===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[n(520)](e)?_arrayLikeToArray(r,t):void 0)}function _iterableToArray(r){var t=_0x521c;if(t(543)!=typeof Symbol&&null!=r[Symbol[t(478)]]||null!=r["@@iterator"])return Array[t(483)](r)}function _arrayWithoutHoles(r){if(Array[_0x521c(550)](r))return _arrayLikeToArray(r)}function _arrayLikeToArray(r,t){var e=_0x521c;(null==t||t>r[e(535)])&&(t=r[e(535)]);for(var n=0,o=Array(t);n<t;n++)o[n]=r[n];return o}(()=>{for(var r=_0x521c,t=_0x2891();;)try{if(734297==-parseInt(r(506))+-parseInt(r(502))/2+parseInt(r(549))/3+-parseInt(r(491))/4+-parseInt(r(537))/5*(-parseInt(r(492))/6)+-parseInt(r(500))/7*(-parseInt(r(474))/8)+parseInt(r(538))/9*(parseInt(r(484))/10))break;t.push(t.shift())}catch(r){t.push(t.shift())}})();var TYPE=_0x5823d8(532),log4js=require(_0x5823d8(542)),logger=log4js.getLogger(_0x5823d8(534));function defaultFormatter(r,t){var n=_0x5823d8;return r[n(527)](function(r,t){var e=n;return[][e(469)](_toConsumableArray(r),["\n".concat(t[e(507)])])},[])}function babelSyntaxError(r){var t=_0x5823d8;return isBabelSyntaxError(r)&&(r[t(507)]=cleanStackTrace(r[t(507)])),r}function isBabelSyntaxError(r){var t=_0x5823d8;return"ModuleBuildError"===r[t(523)]&&r[t(507)][t(531)]("SyntaxError")}function cleanStackTrace(r){var t=_0x5823d8;return r[t(509)](/^\s*at\s.*:\d+:\d+[\s\)]*\n/gm,"")[t(509)](/^Module build failed.*:\s/,"Error: ")}function _0x2891(){var r=["name","endTime","hasWarnings","Object","reduce","transformers","Set","tap","includes","Module not found","env","logger-plugin","length","true","87185fmPwvk","8592093tjPcCk","warning","compileTime: ","defineProperty","./log4js.js","undefined","apply","FAIL ","prototype","assign","toPrimitive","356196hocfng","isArray","Cannot call a class as a function","printCompileResult","toString","constructor","\n@ ","showCompileTime","string","warnings"," ms","info","concat","errorCount","Arguments","BuildLogOutputPlugin","@@toPrimitive must return a primitive value.","224rkwogz","forEach","warnCount","done","iterator","\nCOMPILE RESULT:","fatal","showtime","ERROR: ","from","10Xnakkr","formatters","Map","getBuildMsg","SUCCESS ","noteCount","map","606112teWWbi","126MlopFL","hasErrors","extraInfo","slice","enumerable","options","origin","startTime","309589dBSiOA","default","2036628vdgpMH","symbol","resource","object","773803UzMsme","message","displayErrors","replace","some","call","function","error","hooks","compilation","errors","warningCount","(Emitted value instead of an instance of Error) ","stringify","test","file","dropRepeat"];return(_0x2891=function(){return r})()}function moduleNotFoundError(r){var t,e=_0x5823d8;return"ModuleNotFoundError"===r[e(523)]&&r[e(507)][e(531)](TYPE)&&(r[e(507)]=r[e(507)].replace(TYPE,e(482).concat(TYPE)),t=r.origin&&r[e(498)][e(504)])&&(r[e(507)]+=e(555)[e(469)](t)),r}var defaultFormatters=[defaultFormatter],defaultTransformers=[babelSyntaxError,moduleNotFoundError];function extractError(r){var t=_0x5823d8;return{message:r[t(507)],file:r[t(521)],origin:r[t(498)],name:r[t(523)],severity:0,webpackError:r}}function cleanMessage(r){var t=_0x5823d8;return r.replace(t(518),"")[t(509)](/Module Warning[^\n]+\n/,"")[t(509)](/Module Error[^\n]+\n/,"")}function transformErrors(r,t){function e(r,t){return t(r)}var n=_0x5823d8;return r.map(extractError)[n(490)](function(r){return t[_0x521c(527)](e,r)})}function formatErrors(t,r,e){var n=_0x5823d8;return r[n(490)](function(r){return r(t,e)||[]})[n(527)](function(r,t){return r[_0x521c(469)](t)},[])}function getCompileTime(r){var t=_0x5823d8,e=r[t(524)],r=r[t(499)];logger.info(t(540)[t(469)](e-r,t(467)))}function _dropRepeat(r){var t=_0x5823d8;return r[t(527)](function(r,e){var n=t;return r[n(510)](function(r){var t=n;return r[t(507)]===e[t(507)]})?r:r[n(469)](e)},[])}var BuildLogOutputPlugin=(()=>{var l=_0x5823d8;return _createClass(function r(){var t=_0x521c,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=e[t(556)],n=void 0!==n&&n,e=e[t(497)];_classCallCheck(this,r),this[t(470)]=0,this.warningCount=0,this.noteCount=0,this[t(556)]=n||process[t(533)][t(481)]===t(536),this.formatters=defaultFormatters,this[t(528)]=defaultTransformers,this[t(497)]=e},[{key:l(544),value:function(r){var u=l,s=this;r[u(514)][u(477)][u(530)](u(472),function(t){var e=u,r=(s[e(522)](t),t.compilation),n=r[e(516)],o=r[e(466)],a=t[e(493)](),i=t[e(525)]();setTimeout(function(){var r=e;a&&s[r(508)](n,r(513)),i&&s[r(508)](o,"warning"),s.calculate(t,n,o),s.printCompileResult(),s[r(556)]&&getCompileTime(t)})})}},{key:l(522),value:function(r){var t=l;r[t(515)][t(466)]=_dropRepeat(r[t(515)].warnings),r[t(515)][t(516)]=_dropRepeat(r.compilation.errors)}},{key:"calculate",value:function(r,t){var e=l,n=this,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],r=r[e(515)][e(494)]||{},a=r[e(470)],a=void 0===a?0:a,i=r[e(476)],i=void 0===i?0:i,r=r[e(489)],r=void 0===r?0:r;this[e(470)]=t[e(535)]+a,this[e(517)]=i,this.noteCount=r,o.forEach(function(r){var t=e,r=r[t(507)];/^NOTE:/[t(520)](cleanMessage(r))?n[t(489)]++:n[t(517)]++})}},{key:l(552),value:function(){var r,t=l,e=this[t(470)],n=this[t(517)],o=this.noteCount;0<e+n+o?(r=t(e?545:488),n=Object[t(547)]({},e?{ERROR:e}:{},n?{WARN:n}:{},o?{NOTE:o}:{}),e?logger[t(480)](t(479)[t(469)](r).concat(JSON.stringify(n))):logger.warn(t(479)[t(469)](r)[t(469)](JSON[t(519)](n)))):logger[t(468)]("\nCOMPILE RESULT:SUCCESS")}},{key:l(508),value:function(r,e){var n=l;formatErrors(transformErrors(r,this.transformers),this[n(485)],e)[n(475)](function(r){var t=n;"error"===e&&logger[t(513)](cleanMessage(r)),e===t(539)&&logger.warn(cleanMessage(r))})}},{key:l(487),value:function(r,t){var e=l;return formatErrors(transformErrors(r,this[e(528)]),this[e(485)],t).map(function(r){return cleanMessage(r)})}}])})();module.exports=BuildLogOutputPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x1db304=_0x7220;function _0x1eca(){var r=["17044TgSsNb","812421Guakac","exports","26590212tisePD","343EuhmHk","splice","1125205JySOBi","length","211536GTDRgq","3030192vaJRYo","use strict","value","1196810StGXsU","785gzPAMM"];return(_0x1eca=function(){return r})()}function _0x7220(r,t){var e=_0x1eca();return(_0x7220=function(r,t){return e[r-=143]})(r,t)}(()=>{for(var r=_0x7220,t=_0x1eca();;)try{if(697258==-parseInt(r(152))+parseInt(r(144))/2+-parseInt(r(147))/3+parseInt(r(146))/4*(-parseInt(r(145))/5)+parseInt(r(155))/6+-parseInt(r(150))/7*(parseInt(r(154))/8)+parseInt(r(149))/9)break;t.push(t.shift())}catch(r){t.push(t.shift())}})(),module[_0x1db304(148)]=function(){return{visitor:{Program:{exit:function(r){for(var t=_0x7220,e=r.node.directives,n=e[t(153)]-1;0<=n;n--)e[n][t(143)][t(143)]===t(156)&&e[t(151)](n,1)}}}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _0x46c2(r,e){var n=_0x2a24();return(_0x46c2=function(r,e){return n[r-=387]})(r,e)}function _0x2a24(){var r=["2627895NSJdJj","2695532CoJhcF","replaceAll","21bpfsVK","1604005Wenrfz","2028762CrtUJV","1582368ZOjqgw","5663640vfJwVh","replace","702510EfHAOV","9fecwRs"];return(_0x2a24=function(){return r})()}(()=>{for(var r=_0x46c2,e=_0x2a24();;)try{if(812255==+parseInt(r(394))+-parseInt(r(391))/2+parseInt(r(388))/3+-parseInt(r(397))/4+parseInt(r(390))/5+-parseInt(r(395))/6*(-parseInt(r(393))/7)+-parseInt(r(396))/8*(-parseInt(r(389))/9))break;e.push(e.shift())}catch(r){e.push(e.shift())}})(),exports.replaceAll=function(r,e,n){var t=_0x46c2;return String.prototype.replaceAll?null==r?void 0:r[t(392)](e,n):(e=e[t(387)](/[.*+?^${}()|[\]\\]/g,"\\$&"),e=new RegExp(e,"g"),null==r?void 0:r[t(387)](e,n))};
|
package/lib/common/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x43dbc6=_0x2fd5;function _0x2c00(){var r=["readFileSync","ascf","3811338Sozsai","lineNumber","2499477Whttgz","release","fatal","TOOLKIT_PATH","RAWFILE_DIR","ascfRoot","1080zZJvNy","NODE_ENV","env","ERROR: Write JSON file failed: ","440754FoizQn","55CRDKcj","existsSync","projectRoot","getLogger","src/main/resources/rawfile","production","toString","build-profile.json5","parse json file error at ","map","cwd","darwin","parse","uglifyjs","rimraf","includes","srcPath","23468ZKylFd","230ivkNUw","common-utils","beta","isOSX","path","resolve","IS_PRD","utf-8","ascf/ascf_src","56XqClFP","getEntryPkgPath error, build-profile.json5 file modules is null","all","debug","ascf_build","platform","concat","ASCF_SRC_PATH","78430MlHNlE","getEntryPkgPath","ASCF_BUILD_PATH","1767912SYOdID","length","modules","true","join","301OcHGmh","PROJECT_CONFIG","writeJsonFile"];return(_0x2c00=function(){return r})()}(()=>{for(var r=_0x2fd5,e=_0x2c00();;)try{if(434061==+parseInt(r(498))*(parseInt(r(450))/2)+parseInt(r(444))/3+-parseInt(r(472))/4*(-parseInt(r(455))/5)+-parseInt(r(454))/6*(parseInt(r(482))/7)+parseInt(r(493))/8+-parseInt(r(442))/9+parseInt(r(473))/10*(parseInt(r(490))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}})();var rimraf=require(_0x43dbc6(469)),fs=require("fs"),path=require(_0x43dbc6(477)),JSON5=require("json5"),os=require("os"),log4js=require("./log4js.js"),logger=log4js[_0x43dbc6(458)](_0x43dbc6(474)),projectPath=process[_0x43dbc6(452)][_0x43dbc6(457)]||process[_0x43dbc6(465)](),projectCfg=readProjectCfgJson(projectPath)||{},srcPath=path[_0x43dbc6(478)](projectPath,_0x43dbc6(481));function _0x2fd5(r,e){var t=_0x2c00();return(_0x2fd5=function(r,e){return t[r-=440]})(r,e)}function readJsonFile(e){var t=_0x43dbc6;if(!fs[t(456)](e))return{};var r={};try{r=JSON5.parse(fs[t(440)](e,t(480))[t(461)]()||"{}")}catch(r){throw new Error(t(463)[t(488)](e,":").concat(r[t(443)],":")[t(488)](r.columnNumber," "))}return r}function writeJsonFile(r,e){var t=_0x43dbc6;try{fs.writeFileSync(r,JSON.stringify(e,null,2))}catch(r){throw t(453).concat(r)}}function initVersionType(){var r=_0x43dbc6,e=[r(485),r(475),r(445)],t=process[r(452)].versionType;global._versionType=r(485),t&&e[r(470)](t)?global._versionType=t:(e=process[r(452)][r(468)]===r(496),global._versionType=r(e?445:485))}function readProjectCfgJson(r){var e,t=_0x43dbc6,r=path[t(497)](r,"ascf.config.json");return e=fs.existsSync(r)?JSON[t(467)](fs[t(440)](r).toString()):e}function isOSX(){var r=_0x43dbc6;return os[r(487)]()===r(466)}function getEntryPkgPath(){var r,e=_0x43dbc6,t=readJsonFile(path[e(478)](projectPath,e(462)));if(0<(null==t||null==(r=t[e(495)])?void 0:r[e(494)]))return path[e(497)](projectPath,t[e(495)][0][e(471)]);logger[e(446)](e(483))}initVersionType(),exports[_0x43dbc6(479)]=process[_0x43dbc6(452)][_0x43dbc6(451)]===_0x43dbc6(460),exports.PROJECT_PATH=projectPath,exports[_0x43dbc6(499)]=projectCfg,exports[_0x43dbc6(489)]=projectCfg[_0x43dbc6(449)]?path[_0x43dbc6(478)](srcPath,projectCfg[_0x43dbc6(449)]):srcPath,exports[_0x43dbc6(492)]=path[_0x43dbc6(478)](projectPath,_0x43dbc6(441),_0x43dbc6(486)),exports[_0x43dbc6(448)]=_0x43dbc6(459),exports[_0x43dbc6(447)]=path[_0x43dbc6(497)](__dirname,"..",".."),exports.clearResource=function(r){var t=_0x43dbc6;return Promise[t(484)](r[t(464)](function(e){if(fs[t(456)](e))return new Promise(function(r){rimraf.sync(e),r()})}))},exports.readJsonFile=readJsonFile,exports[_0x43dbc6(500)]=writeJsonFile,exports[_0x43dbc6(476)]=isOSX,exports[_0x43dbc6(491)]=getEntryPkgPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x3efaad=_0x2a76;function _0x2a76(e,t){var a=_0x4f71();return(_0x2a76=function(e,t){return a[e-=135]})(e,t)}function _0x4f71(){var e=["split","src","readJsonFile","getLogger","get project entry module.json.","trim","TOOLKIT_PATH","get ohpm from deveco dir.","bundleName","join","getEntryPkgPath","INFO: ASCF Shared Library can be upgraded.","DEVECO_DIR","ohpm","1208504ThWoUr","length",'INFO: @atomicservice/ascf-toolkit can be upgraded, execute command "npm update -g @atomicservice/ascf-toolkit ',"info","@atomicservice/ascfapi","npm view @atomicservice/ascf-toolkit version","tools","isOSX","toString","main","concat","337114LIAhDf","1460632ZqjmBv","3IyMjca","1059392LVatRN","C:\\Program Files\\Huawei\\DevEco Studio\\bin","2002725XKloFH","warn","DevEco Studio ohpm ","semver","dependencies"," is not exists, please ensure DevEco Studio installed","8974nvnMcZ"," at entry/src/main/module.json5.","fatal","./utils","WARNING: ","DevEco Studio","latest[39m:","satisfies","version-check","./log4js.js","1734ZDoYTo","isLatestAscfHar","version","package.json","env","versionCode","com.huawei.hms.ascfruntime","ERROR: ASCF shared library version is too low,","module.json5","bin","/Applications/DevEco-Studio.app/Contents/tools","isAscfHspSatisfied","449307wNmcRG","18BJzGxq","filter","child_process","90ifjmaT","debug"];return(_0x4f71=function(){return e})()}(()=>{for(var e=_0x2a76,t=_0x4f71();;)try{if(266623==+parseInt(e(195))*(parseInt(e(193))/2)+parseInt(e(162))/3+parseInt(e(196))/4+-parseInt(e(198))/5+parseInt(e(150))/6*(parseInt(e(140))/7)+-parseInt(e(194))/8*(-parseInt(e(163))/9)+-parseInt(e(166))/10*(parseInt(e(182))/11))break;t.push(t.shift())}catch(e){t.push(t.shift())}})();var utils=require(_0x3efaad(143)),path=require("path"),_require=require(_0x3efaad(137)),satisfies=_require[_0x3efaad(147)],_require2=require(_0x3efaad(165)),execSync=_require2.execSync,log4js=require(_0x3efaad(149)),fs=require("fs"),logger=log4js[_0x3efaad(171)](_0x3efaad(148));function getOhpmExecFile(){var e=_0x3efaad,t=(logger[e(167)](e(175)),null==(t=process[e(154)][e(145)]||process[e(154)][e(180)])?void 0:t[e(168)](";")[0].trim()),a=t||e(160),t=t||e(197),a=utils[e(189)]()?a:t,t=path.join(a,"..",e(188),"ohpm",e(159),e(181)),a=utils[e(189)]()?t:'"'[e(192)](t,'"');return fs.existsSync(t)?a:void 0}exports.isLatestAscfToolkit=function(){var e=_0x3efaad,t=0<arguments[e(183)]&&void 0!==arguments[0]&&arguments[0],a=utils[e(170)](path[e(177)](utils[e(174)],e(153)))[e(152)],r=execSync(e(187),{timeout:5e3}).toString()[e(173)]();a!==r&&(t?logger.warn('WARNING: @atomicservice/ascf-toolkit can be upgraded, execute command "npm update -g @atomicservice/ascf-toolkit '[e(192)](r,'"')):logger[e(185)](e(184)[e(192)](r,'"')))},exports[_0x3efaad(151)]=function(){var e,t=_0x3efaad,a=0<arguments[t(183)]&&void 0!==arguments[0]&&arguments[0],r=path[t(177)](utils[t(178)](),"oh-package.json5"),o=utils[t(170)](r).dependencies[t(186)];o?(e=getOhpmExecFile())?(e=execSync(""[t(192)](e," info @atomicservice/ascfapi"),{timeout:5e3})[t(190)]()[t(168)](t(146))[1].split("\n")[0][t(173)](),satisfies(e,o)||"latest"===o.toLowerCase()||(a?logger[t(135)]("WARNING: ASCF Shared Library can be upgraded."):logger[t(185)](t(179)))):logger[t(135)](t(136)[t(192)](ohpmFile,t(139))):logger[t(135)](t(144)[t(192)](r," does not depend on ASCF Shared Library. Select a project that does, or create a new one."))},exports[_0x3efaad(161)]=function(e){var a=_0x3efaad,t=(logger.debug(a(172)),path.join(utils.getEntryPkgPath(),a(169),a(191),a(158))),t=(null==(t=utils[a(170)](t).module)?void 0:t[a(138)])[a(164)](function(e){var t=a;return e[t(176)]===t(156)});return!t||t.length<=0?(logger[a(135)]("WARN: ASCF shared library not found."),!1):!(Number(t[0][a(155)])<Number(e)&&(logger[a(142)](a(157)+"update to "[a(192)](e,a(141))),1))};
|
package/lib/index.d.ts
CHANGED
|
@@ -17,4 +17,6 @@ export declare function compile(projectPath: String, option: CompileOption): Pro
|
|
|
17
17
|
|
|
18
18
|
export declare function convert(option: ConvertOption): Promise<void>
|
|
19
19
|
|
|
20
|
-
export declare function getAscfToolkitDirname(): string
|
|
20
|
+
export declare function getAscfToolkitDirname(): string
|
|
21
|
+
|
|
22
|
+
export declare function quickGenerateSubpackage(): Promise<void>
|