@atomicservice/ascf-toolkit 1.0.3-beta.6 → 1.0.4-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ascf-build-npm/build-npm.js +1 -0
- 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 -1
- 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/trustlist-verify/verify-ignore-files.js +1 -0
- 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 -1
- 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/url.json +3 -0
- package/lib/common/utils.js +1 -1
- package/lib/common/version-check.js +1 -1
- package/lib/index.d.ts +5 -1
- package/lib/index.js +1 -1
- package/notice/openSourceSoftwareNotice.docx +0 -0
- package/package.json +15 -51
- package/lib/ascf-compiler/common/parser-babel.js +0 -1
- package/lib/ascf-compiler/common/parser-swc.js +0 -1
- package/lib/ascf-compiler/common/parser.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
var _0x2cf1e0=_0x104c;function _typeof(r){var e=_0x104c;return(_typeof=e(444)==typeof Symbol&&e(473)==typeof Symbol.iterator?function(r){return typeof r}:function(r){var t=e;return r&&t(444)==typeof Symbol&&r[t(423)]===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function _regeneratorRuntime(){var s=_0x104c;_regeneratorRuntime=function(){return c};var f,c={},r=Object[s(361)],h=r[s(394)],m=Object[s(458)]||function(r,t,e){var n=s;r[t]=e[n(469)]},t="function"==typeof Symbol?Symbol:{},i=t[s(403)]||s(474),e=t.asyncIterator||s(374),n=t[s(467)]||"@@toStringTag";function o(r,t,e){return Object[s(458)](r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{o({},"")}catch(r){o=function(r,t,e){return r[t]=e}}function u(r,t,e,n){var o,i,a,c,u=s,t=t&&t[u(361)]instanceof x?t:x,t=Object[u(365)](t[u(361)]),u=new O(n||[]);return m(t,"_invoke",{value:(o=r,i=e,a=u,c=l,function(r,t){var e=_0x104c;if(c===_)throw Error(e(352));if(c===y){if(e(419)===r)throw t;return{value:f,done:!0}}for(a[e(408)]=r,a[e(448)]=t;;){var n=a[e(354)];if(n){n=function r(t,e){var n=s,o=e[n(408)],i=t[n(403)][o];if(i===f)return e.delegate=null,n(419)===o&&t[n(403)][n(480)]&&(e[n(408)]="return",e[n(448)]=f,r(t,e),n(419)===e[n(408)])||"return"!==o&&(e.method=n(419),e[n(448)]=new TypeError(n(416)+o+"' method")),g;o=p(i,t.iterator,e.arg);if(n(419)===o[n(445)])return e[n(408)]="throw",e[n(448)]=o[n(448)],e.delegate=null,g;i=o[n(448)];return i?i[n(420)]?(e[t.resultName]=i[n(469)],e[n(388)]=t[n(341)],n(480)!==e.method&&(e.method="next",e.arg=f),e[n(354)]=null,g):i:(e[n(408)]=n(419),e[n(448)]=new TypeError("iterator result is not an object"),e[n(354)]=null,g)}(n,a);if(n){if(n===g)continue;return n}}if("next"===a[e(408)])a[e(443)]=a._sent=a.arg;else if(e(419)===a[e(408)]){if(c===l)throw c=y,a[e(448)];a[e(482)](a[e(448)])}else e(480)===a[e(408)]&&a[e(414)](e(480),a[e(448)]);c=_;n=p(o,i,a);if(e(349)===n[e(445)]){if(c=a[e(420)]?y:v,n[e(448)]===g)continue;return{value:n[e(448)],done:a[e(420)]}}e(419)===n.type&&(c=y,a[e(408)]="throw",a.arg=n[e(448)])}})}),t}function p(r,t,e){var n=s;try{return{type:n(349),arg:r.call(t,e)}}catch(r){return{type:"throw",arg:r}}}c[s(410)]=u;var l="suspendedStart",v=s(418),_="executing",y=s(350),g={};function x(){}function a(){}function d(){}var t={},b=(o(t,i,function(){return this}),Object[s(348)]),b=b&&b(b(S([]))),w=(b&&b!==r&&h[s(376)](b,i)&&(t=b),d[s(361)]=x[s(361)]=Object[s(365)](t));function C(r){var t=s;["next",t(419),t(480)].forEach(function(t){o(r,t,function(r){return this[_0x104c(460)](t,r)})})}function j(c,u){var t;m(this,s(460),{value:function(e,n){function r(){return new u(function(r,t){!function t(r,e,n,o){var i,a=_0x104c,r=p(c[r],c,e);if("throw"!==r[a(445)])return(e=(i=r.arg).value)&&a(384)==_typeof(e)&&h[a(376)](e,a(407))?u.resolve(e[a(407)]).then(function(r){t(a(388),r,n,o)},function(r){t(a(419),r,n,o)}):u[a(389)](e)[a(462)](function(r){i[a(469)]=r,n(i)},function(r){return t(a(419),r,n,o)});o(r[a(448)])}(e,n,r,t)})}return t=t?t.then(r,r):r()}})}function P(r){var t=s,e={tryLoc:r[0]};1 in r&&(e.catchLoc=r[1]),2 in r&&(e.finallyLoc=r[2],e[t(440)]=r[3]),this[t(437)][t(391)](e)}function F(r){var t=s,e=r[t(345)]||{};e[t(445)]=t(349),delete e[t(448)],r[t(345)]=e}function O(r){var t=s;this[t(437)]=[{tryLoc:t(425)}],r.forEach(P,this),this[t(344)](!0)}function S(e){var n=s;if(e||""===e){var o,r=e[i];if(r)return r[n(376)](e);if("function"==typeof e[n(388)])return e;if(!isNaN(e.length))return o=-1,(r=function r(){for(var t=n;++o<e[t(412)];)if(h[t(376)](e,o))return r[t(469)]=e[o],r[t(420)]=!1,r;return r.value=f,r[t(420)]=!0,r}).next=r}throw new TypeError(_typeof(e)+" is not iterable")}return a[s(361)]=d,m(w,"constructor",{value:d,configurable:!0}),m(d,s(423),{value:a,configurable:!0}),a[s(429)]=o(d,n,s(360)),c.isGeneratorFunction=function(r){var t=s,r=t(444)==typeof r&&r[t(423)];return!!r&&(r===a||t(360)===(r[t(429)]||r.name))},c[s(405)]=function(r){var t=s;return Object[t(377)]?Object[t(377)](r,d):(r[t(362)]=d,o(r,n,t(360))),r[t(361)]=Object[t(365)](w),r},c[s(441)]=function(r){return{__await:r}},C(j[s(361)]),o(j.prototype,e,function(){return this}),c[s(379)]=j,c[s(432)]=function(r,t,e,n,o){var i=s,a=(void 0===o&&(o=Promise),new j(u(r,t,e,n),o));return c.isGeneratorFunction(t)?a:a[i(388)]()[i(462)](function(r){var t=i;return r[t(420)]?r[t(469)]:a[t(388)]()})},C(w),o(w,n,s(363)),o(w,i,function(){return this}),o(w,"toString",function(){return"[object Generator]"}),c[s(453)]=function(r){var t,n=s,o=Object(r),i=[];for(t in o)i.push(t);return i[n(392)](),function r(){for(var t=n;i[t(412)];){var e=i[t(370)]();if(e in o)return r[t(469)]=e,r[t(420)]=!1,r}return r[t(420)]=!0,r}},c[s(380)]=S,O.prototype={constructor:O,reset:function(r){var t=s;if(this.prev=0,this.next=0,this.sent=this._sent=f,this[t(420)]=!1,this[t(354)]=null,this.method=t(388),this.arg=f,this[t(437)][t(402)](F),!r)for(var e in this)"t"===e.charAt(0)&&h.call(this,e)&&!isNaN(+e[t(404)](1))&&(this[e]=f)},stop:function(){var r=s,t=(this.done=!0,this.tryEntries[0][r(345)]);if("throw"===t[r(445)])throw t[r(448)];return this[r(372)]},dispatchException:function(n){var o=s;if(this[o(420)])throw n;var i=this;function r(r,t){var e=o;return a[e(445)]=e(419),a[e(448)]=n,i[e(388)]=r,t&&(i[e(408)]=e(388),i[e(448)]=f),!!t}for(var t=this[o(437)].length-1;0<=t;--t){var e=this[o(437)][t],a=e[o(345)];if(o(425)===e[o(411)])return r(o(383));if(e[o(411)]<=this[o(434)]){var c=h.call(e,"catchLoc"),u=h[o(376)](e,o(478));if(c&&u){if(this[o(434)]<e.catchLoc)return r(e[o(401)],!0);if(this[o(434)]<e[o(478)])return r(e[o(478)])}else if(c){if(this[o(434)]<e[o(401)])return r(e[o(401)],!0)}else{if(!u)throw Error("try statement without catch or finally");if(this[o(434)]<e[o(478)])return r(e[o(478)])}}}},abrupt:function(r,t){for(var e=s,n=this[e(437)][e(412)]-1;0<=n;--n){var o=this[e(437)][n];if(o[e(411)]<=this[e(434)]&&h.call(o,"finallyLoc")&&this.prev<o[e(478)]){var i=o;break}}var a=(i=i&&("break"===r||"continue"===r)&&i.tryLoc<=t&&t<=i[e(478)]?null:i)?i[e(345)]:{};return a[e(445)]=r,a[e(448)]=t,i?(this[e(408)]=e(388),this[e(388)]=i.finallyLoc,g):this[e(471)](a)},complete:function(r,t){var e=s;if("throw"===r[e(445)])throw r[e(448)];return"break"===r[e(445)]||e(417)===r.type?this[e(388)]=r[e(448)]:"return"===r[e(445)]?(this.rval=this.arg=r[e(448)],this[e(408)]=e(480),this[e(388)]="end"):e(349)===r.type&&t&&(this[e(388)]=t),g},finish:function(r){for(var t=s,e=this.tryEntries.length-1;0<=e;--e){var n=this[t(437)][e];if(n.finallyLoc===r)return this.complete(n[t(345)],n.afterLoc),F(n),g}},catch:function(r){for(var t=s,e=this.tryEntries[t(412)]-1;0<=e;--e){var n,o,i=this.tryEntries[e];if(i.tryLoc===r)return n=i[t(345)],t(419)===n[t(445)]&&(o=n[t(448)],F(i)),o}throw Error(t(457))},delegateYield:function(r,t,e){var n=s;return this[n(354)]={iterator:S(r),resultName:t,nextLoc:e},"next"===this[n(408)]&&(this[n(448)]=f),g}},c}function asyncGeneratorStep(r,t,e,n,o,i,a){var c=_0x104c;try{var u=r[i](a),s=u[c(469)]}catch(r){return void e(r)}u[c(420)]?t(s):Promise[c(389)](s)[c(462)](n,o)}function _asyncToGenerator(c){return function(){var r=this,a=arguments;return new Promise(function(t,e){var n=c.apply(r,a);function o(r){asyncGeneratorStep(n,t,e,o,i,"next",r)}function i(r){asyncGeneratorStep(n,t,e,o,i,_0x104c(419),r)}o(void 0)})}}(()=>{for(var r=_0x104c,t=_0x3185();;)try{if(180643==-parseInt(r(456))*(parseInt(r(481))/2)+parseInt(r(364))/3*(-parseInt(r(422))/4)+-parseInt(r(340))/5+parseInt(r(438))/6+parseInt(r(397))/7*(parseInt(r(395))/8)+-parseInt(r(447))/9*(-parseInt(r(415))/10)+parseInt(r(359))/11)break;t.push(t.shift())}catch(r){t.push(t.shift())}})(),Object[_0x2cf1e0(458)](exports,"__esModule",{value:!0}),exports.checkInputPathFun=exports[_0x2cf1e0(459)]=exports[_0x2cf1e0(451)]=void 0;var commonConfig_1=require(_0x2cf1e0(387)),path=require(_0x2cf1e0(342)),fs=require("fs"),commonUtils_1=require(_0x2cf1e0(476)),_require=require(_0x2cf1e0(450)),clearResource=_require.clearResource,log4js=require("../../common/log4js.js"),logger=log4js[_0x2cf1e0(452)](_0x2cf1e0(472));function confirmConverterFun(r,t){return _confirmConverterFun[_0x2cf1e0(353)](this,arguments)}function _confirmConverterFun(){var r=_0x2cf1e0;return(_confirmConverterFun=_asyncToGenerator(_regeneratorRuntime()[r(405)](function r(e,n){var o,i;return _regeneratorRuntime().wrap(function(r){for(var t=_0x104c;;)switch(r[t(434)]=r[t(388)]){case 0:if(r[t(434)]=0,o=path[t(389)](e.inputPath,t(435)),i=path[t(389)](e[t(446)],t(455)),fs.existsSync(i)||!fs[t(477)](o)||e.confirmAddConfig){r[t(388)]=7;break}return r[t(414)]("return",{command:t(409)});case 7:return r[t(388)]=9,doConvert(e,n);case 9:return r[t(414)](t(480),r.sent);case 10:r[t(388)]=16;break;case 12:return r[t(434)]=12,r.t0=r[t(430)](0),logger[t(439)](r.t0),r[t(414)](t(480),{command:t(470),errorMessage:r.t0[t(413)]});case 16:case t(383):return r[t(406)]()}},r,null,[[0,12]])}))).apply(this,arguments)}function confirmConverterH5Fun(r,t){var e=_0x2cf1e0,n=path.join(r[e(449)],r[e(426)]);try{return commonUtils_1[e(358)](n,e(375),!0),commonUtils_1[e(390)](path[e(468)](__filename,e(343),e(375)),path[e(468)](n,e(375)),!1,!0),commonUtils_1[e(442)](r,path[e(468)](n,"src")),{command:e(378)}}catch(r){return logger.error(r),{command:"failedTransform",errorMessage:r[e(413)]}}}function _0x3185(){var r=["srcRootPath","Applets","end","object","miniprogramRoot","readFileSync","../common/commonConfig","next","resolve","copyDir","push","reverse","setOriginPtahObject","hasOwnProperty","4040ssavzs","clearResource","1897HFpILO","isArray","all","env","catchLoc","forEach","iterator","slice","mark","stop","__await","method","notifyConfig","wrap","tryLoc","length","message","abrupt","10fbiGAm","The iterator does not provide a '","continue","suspendedYield","throw","done","sep","5188cKVRAM","constructor","readdir","root","packageName","yes","unlink","displayName","catch","Output directory cannot be a subdirectory of the input directory.","async","projectConfigFile","prev","app.json","dirname","tryEntries","341514YlFhUZ","error","afterLoc","awrap","handleConfigInfo","sent","function","type","inputPath","1249983reeuRQ","arg","outPath","../../common/utils","confirmConverterFun","getLogger","keys","Output path ","project.config.json","81558xCjsxR","illegal catch attempt","defineProperty","confirmConverterH5Fun","_invoke","pages","then","appJsonFile","../../","toString","startsWith","toStringTag","join","value","failedTransform","complete","converter","symbol","@@iterator","transformNodeModuleComponent","../common/commonUtils","existsSync","finallyLoc","hxml","return","8qrOEGV","dispatchException","createTransformReportFile","265550jHLYEp","nextLoc","path","../lib","reset","completion","concat","rmdir","getPrototypeOf","normal","completed","isDirectory","Generator is already running","apply","delegate","smartProgramRoot","parse","ascf/ascf_src","createDirs","4369541MwGkCj","GeneratorFunction","prototype","__proto__","Generator","393JyZTZJ","create"," is exists. Use the -c parameter to clear.","appletType","projectFileSuffix","postInputPath","pop","map","rval","adaptApiFile","@@asyncIterator","src","call","setPrototypeOf","completeTransform","AsyncIterator","values"];return(_0x3185=function(){return r})()}function checkConvertOutput(r,t){var e=_0x2cf1e0,r=path[e(389)](r),t=path.resolve(t);if(fs[e(477)](t))throw new Error(e(454)[e(346)](t,e(366)));if(t[e(466)](r+path[e(421)]))throw new Error(e(431))}function doConvert(r,t){return _doConvert[_0x2cf1e0(353)](this,arguments)}function _0x104c(r,t){var e=_0x3185();return(_0x104c=function(r,t){return e[r-=339]})(r,t)}function _doConvert(){var r=_0x2cf1e0;return(_doConvert=_asyncToGenerator(_regeneratorRuntime()[r(405)](function r(e,t){var n,o,i;return _regeneratorRuntime().wrap(function(r){for(var t=_0x104c;;)switch(r[t(434)]=r.next){case 0:if(n=path[t(389)](e[t(449)],t(357)),process[t(400)][t(396)]===t(427))return r[t(388)]=4,clearResource([n]);r.next=4;break;case 4:return checkConvertOutput(e[t(446)],n),o=commonConfig_1[t(382)].srcRootPath,r[t(434)]=6,commonUtils_1[t(358)](n,o),commonUtils_1[t(339)](n,e[t(446)]),i=path[t(468)](n,o),"./"===o||""===o?(commonUtils_1[t(393)](e.inputPath,i),commonUtils_1[t(390)](e[t(446)],i)):(commonUtils_1[t(393)](path[t(468)](e[t(446)],o),i),commonUtils_1[t(390)](path.join(e[t(446)],o),i),commonUtils_1.copyConfigFiles(path[t(468)](e[t(446)]),n)),commonUtils_1[t(475)](),commonUtils_1[t(463)](path[t(468)](n,o),e),commonUtils_1[t(433)](path[t(468)](n)),"my"===commonConfig_1[t(382)][t(367)]&&commonUtils_1[t(373)](n,path[t(468)](__filename,t(464))),r[t(414)]("return",{command:t(378),folderUrl:n});case 18:return r[t(434)]=18,r.t0=r[t(430)](6),logger.error(r.t0),removePromise(n).finally(),r[t(414)]("return",{command:t(470),errorMessage:r.t0.message});case 23:case"end":return r.stop()}},r,null,[[6,18]])})))[r(353)](this,arguments)}function removePromise(i){return new Promise(function(o,r){fs.stat(i,function(r,t){var n=_0x104c;t[n(351)]()?fs[n(424)](i,function(r,t){var e=n,t=(t=t[e(371)](function(r){return path[e(468)](i,r)}))[e(371)](function(r){return removePromise(r)});Promise[e(399)](t)[e(462)](function(){fs[e(347)](i,o)})}):fs[n(428)](i,o)})})}function checkInputPathFun(r){var t=_0x2cf1e0,r=path[t(389)](r),e=checkMiniProgram(r);return{command:t(369),data:{returnCode:e,outPath:path[t(436)](r)}}}function checkMiniProgram(r){var t=_0x2cf1e0,e=!0,n=path[t(468)](r,t(435));return e=fs[t(477)](n)&&identifyProgram(r)?e:!1}function identifyProgram(r){var t=_0x2cf1e0;try{var e=path[t(468)](r,t(435)),n=JSON.parse(fs[t(386)](e)[t(465)]());if(n&&n[t(461)]&&Array[t(398)](n.pages)&&0<n[t(461)].length)for(var o=getSrcRootPath(r),i=0,a=Object.keys(commonConfig_1.projectFileSuffix);i<a[t(412)];i++){var c=a[i],u=path[t(468)](r,o,n[t(461)][0]+commonConfig_1[t(368)][c][t(479)]);if(fs[t(477)](u))return commonConfig_1[t(382)][t(367)]="wx"===c?"tt":c,!0}return!1}catch(r){return!1}}function getSrcRootPath(r){var t=_0x2cf1e0;commonConfig_1.Applets[t(381)]="./";for(var e=0;e<commonConfig_1.configBasenameArray[t(412)];e++){var n=commonConfig_1.configBasenameArray[e],n=path.join(r,n);fs.existsSync(n)&&((n=JSON[t(356)](fs[t(386)](n)[t(465)]())).miniprogramRoot?commonConfig_1[t(382)][t(381)]=n[t(385)]:n[t(355)]?commonConfig_1[t(382)].srcRootPath=n[t(355)]:commonConfig_1[t(382)][t(381)]="./")}return commonConfig_1[t(382)][t(381)]}exports[_0x2cf1e0(451)]=confirmConverterFun,exports.confirmConverterH5Fun=confirmConverterH5Fun,exports.checkInputPathFun=checkInputPathFun;
|
|
1
|
+
var _0x3ea7b4=_0x4769;function _typeof(r){var e=_0x4769;return(_typeof=e(466)==typeof Symbol&&e(455)==typeof Symbol[e(475)]?function(r){return typeof r}:function(r){var t=e;return r&&"function"==typeof Symbol&&r[t(552)]===Symbol&&r!==Symbol[t(547)]?"symbol":typeof r})(r)}function _regeneratorRuntime(){var s=_0x4769;_regeneratorRuntime=function(){return c};var f,c={},r=Object[s(547)],m=r[s(451)],h=Object[s(463)]||function(r,t,e){r[t]=e.value},t=s(466)==typeof Symbol?Symbol:{},i=t[s(475)]||s(492),e=t.asyncIterator||"@@asyncIterator",n=t.toStringTag||s(467);function o(r,t,e){return Object.defineProperty(r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{o({},"")}catch(r){o=function(r,t,e){return r[t]=e}}function u(r,t,e,n){var o,i,a,c,u=s,t=t&&t[u(547)]instanceof d?t:d,t=Object[u(448)](t[u(547)]),n=new S(n||[]);return h(t,u(425),{value:(o=r,i=e,a=n,c=p,function(r,t){var e=_0x4769;if(c===y)throw Error(e(407));if(c===_){if("throw"===r)throw t;return{value:f,done:!0}}for(a.method=r,a[e(477)]=t;;){var n=a[e(428)];if(n){n=function r(t,e){var n=s,o=e[n(498)],i=t[n(475)][o];if(i===f)return e[n(428)]=null,"throw"===o&&t[n(475)][n(450)]&&(e[n(498)]=n(450),e[n(477)]=f,r(t,e),"throw"===e.method)||n(450)!==o&&(e[n(498)]=n(517),e[n(477)]=new TypeError(n(432)+o+n(465))),g;o=l(i,t.iterator,e[n(477)]);if(n(517)===o[n(479)])return e[n(498)]="throw",e[n(477)]=o[n(477)],e[n(428)]=null,g;i=o[n(477)];return i?i[n(416)]?(e[t.resultName]=i.value,e[n(544)]=t[n(530)],n(450)!==e[n(498)]&&(e[n(498)]=n(544),e[n(477)]=f),e[n(428)]=null,g):i:(e[n(498)]=n(517),e[n(477)]=new TypeError(n(501)),e.delegate=null,g)}(n,a);if(n){if(n===g)continue;return n}}if("next"===a.method)a[e(538)]=a[e(408)]=a[e(477)];else if(e(517)===a.method){if(c===p)throw c=_,a[e(477)];a[e(437)](a.arg)}else e(450)===a[e(498)]&&a[e(539)](e(450),a[e(477)]);c=y;n=l(o,i,a);if(e(511)===n[e(479)]){if(c=a.done?_:v,n[e(477)]===g)continue;return{value:n[e(477)],done:a[e(416)]}}"throw"===n[e(479)]&&(c=_,a.method=e(517),a.arg=n[e(477)])}})}),t}function l(r,t,e){var n=s;try{return{type:n(511),arg:r[n(545)](t,e)}}catch(r){return{type:n(517),arg:r}}}c.wrap=u;var p=s(436),v=s(543),y=s(456),_=s(505),g={};function d(){}function a(){}function b(){}var t={},x=(o(t,i,function(){return this}),Object[s(468)]),x=x&&x(x(O([]))),C=(x&&x!==r&&m[s(545)](x,i)&&(t=x),b.prototype=d[s(547)]=Object[s(448)](t));function w(r){var t=s;[t(544),t(517),t(450)][t(531)](function(t){o(r,t,function(r){return this[_0x4769(425)](t,r)})})}function P(c,u){var t,o=s;h(this,o(425),{value:function(e,n){function r(){return new u(function(r,t){!function t(r,e,n,o){var i,a=_0x4769,r=l(c[r],c,e);if("throw"!==r[a(479)])return(e=(i=r[a(477)])[a(486)])&&a(488)==_typeof(e)&&m[a(545)](e,a(409))?u.resolve(e[a(409)])[a(411)](function(r){t("next",r,n,o)},function(r){t(a(517),r,n,o)}):u[a(555)](e)[a(411)](function(r){i[a(486)]=r,n(i)},function(r){return t("throw",r,n,o)});o(r[a(477)])}(e,n,r,t)})}return t=t?t[o(411)](r,r):r()}})}function j(r){var t=s,e={tryLoc:r[0]};1 in r&&(e[t(524)]=r[1]),2 in r&&(e[t(490)]=r[2],e[t(440)]=r[3]),this[t(518)][t(424)](e)}function F(r){var t=s,e=r[t(513)]||{};e[t(479)]="normal",delete e[t(477)],r[t(513)]=e}function S(r){var t=s;this.tryEntries=[{tryLoc:t(489)}],r.forEach(j,this),this[t(414)](!0)}function O(e){var n=s;if(e||""===e){var o,r=e[i];if(r)return r.call(e);if(n(466)==typeof e[n(544)])return e;if(!isNaN(e[n(487)]))return o=-1,(r=function r(){for(var t=n;++o<e[t(487)];)if(m[t(545)](e,o))return r[t(486)]=e[o],r[t(416)]=!1,r;return r[t(486)]=f,r[t(416)]=!0,r})[n(544)]=r}throw new TypeError(_typeof(e)+n(528))}return a[s(547)]=b,h(C,s(552),{value:b,configurable:!0}),h(b,s(552),{value:a,configurable:!0}),a.displayName=o(b,n,"GeneratorFunction"),c[s(452)]=function(r){var t=s,r=t(466)==typeof r&&r[t(552)];return!!r&&(r===a||t(557)===(r.displayName||r[t(431)]))},c.mark=function(r){var t=s;return Object[t(446)]?Object[t(446)](r,b):(r.__proto__=b,o(r,n,t(557))),r[t(547)]=Object[t(448)](C),r},c[s(454)]=function(r){return{__await:r}},w(P[s(547)]),o(P[s(547)],e,function(){return this}),c[s(553)]=P,c[s(537)]=function(r,t,e,n,o){var i=s,a=(void 0===o&&(o=Promise),new P(u(r,t,e,n),o));return c[i(452)](t)?a:a[i(544)]().then(function(r){var t=i;return r[t(416)]?r[t(486)]:a[t(544)]()})},w(C),o(C,n,s(502)),o(C,i,function(){return this}),o(C,"toString",function(){return s(418)}),c.keys=function(r){var t,n=s,o=Object(r),i=[];for(t in o)i[n(424)](t);return i[n(536)](),function r(){for(var t=n;i[t(487)];){var e=i[t(419)]();if(e in o)return r.value=e,r[t(416)]=!1,r}return r[t(416)]=!0,r}},c[s(457)]=O,S[s(547)]={constructor:S,reset:function(r){var t=s;if(this[t(526)]=0,this[t(544)]=0,this.sent=this[t(408)]=f,this[t(416)]=!1,this[t(428)]=null,this[t(498)]="next",this.arg=f,this[t(518)][t(531)](F),!r)for(var e in this)"t"===e[t(435)](0)&&m.call(this,e)&&!isNaN(+e[t(541)](1))&&(this[e]=f)},stop:function(){var r=s,t=(this.done=!0,this[r(518)][0][r(513)]);if(r(517)===t[r(479)])throw t.arg;return this[r(423)]},dispatchException:function(n){var o=s;if(this[o(416)])throw n;var i=this;function r(r,t){var e=o;return a.type=e(517),a[e(477)]=n,i[e(544)]=r,t&&(i[e(498)]=e(544),i[e(477)]=f),!!t}for(var t=this.tryEntries[o(487)]-1;0<=t;--t){var e=this[o(518)][t],a=e[o(513)];if("root"===e.tryLoc)return r(o(512));if(e[o(422)]<=this[o(526)]){var c=m[o(545)](e,o(524)),u=m[o(545)](e,"finallyLoc");if(c&&u){if(this[o(526)]<e[o(524)])return r(e[o(524)],!0);if(this[o(526)]<e[o(490)])return r(e[o(490)])}else if(c){if(this.prev<e.catchLoc)return r(e.catchLoc,!0)}else{if(!u)throw Error("try statement without catch or finally");if(this[o(526)]<e.finallyLoc)return r(e[o(490)])}}}},abrupt:function(r,t){for(var e=s,n=this.tryEntries[e(487)]-1;0<=n;--n){var o=this[e(518)][n];if(o.tryLoc<=this[e(526)]&&m[e(545)](o,e(490))&&this[e(526)]<o[e(490)]){var i=o;break}}var a=(i=i&&(e(525)===r||e(529)===r)&&i.tryLoc<=t&&t<=i.finallyLoc?null:i)?i.completion:{};return a[e(479)]=r,a.arg=t,i?(this.method=e(544),this[e(544)]=i[e(490)],g):this.complete(a)},complete:function(r,t){var e=s;if(e(517)===r[e(479)])throw r[e(477)];return e(525)===r.type||e(529)===r.type?this.next=r[e(477)]:"return"===r.type?(this.rval=this[e(477)]=r.arg,this[e(498)]="return",this[e(544)]="end"):"normal"===r[e(479)]&&t&&(this[e(544)]=t),g},finish:function(r){for(var t=s,e=this[t(518)].length-1;0<=e;--e){var n=this[t(518)][e];if(n[t(490)]===r)return this[t(453)](n[t(513)],n[t(440)]),F(n),g}},catch:function(r){for(var t=s,e=this.tryEntries[t(487)]-1;0<=e;--e){var n,o,i=this.tryEntries[e];if(i.tryLoc===r)return n=i[t(513)],t(517)===n[t(479)]&&(o=n[t(477)],F(i)),o}throw Error(t(442))},delegateYield:function(r,t,e){var n=s;return this[n(428)]={iterator:O(r),resultName:t,nextLoc:e},n(544)===this.method&&(this[n(477)]=f),g}},c}function asyncGeneratorStep(r,t,e,n,o,i,a){var c=_0x4769;try{var u=r[i](a),s=u.value}catch(r){return void e(r)}u[c(416)]?t(s):Promise[c(555)](s).then(n,o)}function _asyncToGenerator(c){return function(){var r=this,a=arguments;return new Promise(function(t,e){var n=c.apply(r,a);function o(r){asyncGeneratorStep(n,t,e,o,i,"next",r)}function i(r){asyncGeneratorStep(n,t,e,o,i,_0x4769(517),r)}o(void 0)})}}(()=>{for(var r=_0x4769,t=_0x2e9b();;)try{if(718290==+parseInt(r(533))+-parseInt(r(470))/2+-parseInt(r(496))/3*(parseInt(r(443))/4)+-parseInt(r(469))/5+-parseInt(r(509))/6+-parseInt(r(510))/7+-parseInt(r(520))/8*(-parseInt(r(548))/9))break;t.push(t.shift())}catch(r){t.push(t.shift())}})(),Object[_0x3ea7b4(463)](exports,_0x3ea7b4(458),{value:!0}),exports.checkInputPathFun=exports.confirmConverterH5Fun=exports.confirmConverterFun=void 0;var commonConfig_1=require(_0x3ea7b4(439)),path=require("path"),fs=require("fs"),commonUtils_1=require("../common/commonUtils"),_require=require(_0x3ea7b4(491)),clearResource=_require.clearResource,log4js=require(_0x3ea7b4(481)),logger=log4js[_0x3ea7b4(464)](_0x3ea7b4(460)),_require2=require("../features/transformReport"),addTransformUrl=_require2[_0x3ea7b4(493)];function _0x2e9b(){var r=["1046421eAWDCM","configBasenameArray","isArray","miniprogramRoot","constructor","AsyncIterator","setOriginPtahObject","resolve","existsSync","GeneratorFunction","Generator is already running","_sent","__await","confirmAddConfig","then","catch","parse","reset","concat","done","stat","[object Generator]","pop"," is exists. Use the -c parameter to clear.","appletType","tryLoc","rval","push","_invoke","readFileSync","adaptApiFile","delegate","postInputPath","projectConfigFile","name","The iterator does not provide a '","startsWith","rmdir","charAt","suspendedStart","dispatchException","failedTransform","../common/commonConfig","afterLoc","completeTransform","illegal catch attempt","4UvyGNx","apply","notifyConfig","setPrototypeOf","transformNodeModuleComponent","create","yes","return","hasOwnProperty","isGeneratorFunction","complete","awrap","symbol","executing","values","__esModule","packageName","converter","stop","projectFileSuffix","defineProperty","getLogger","' method","function","@@toStringTag","getPrototypeOf","6157490kEZtAN","2233532MAupTi","Output directory cannot be a subdirectory of the input directory.","Output path ","toString","map","iterator","isDirectory","arg","createTransformReportFile","type","mark","../../common/log4js.js","dirname","srcRootPath","copyDir","inputPath","value","length","object","root","finallyLoc","../../common/utils","@@iterator","addTransformUrl","copyConfigFiles","unlink","3149271VbFRRe","sep","method","error","project.config.json","iterator result is not an object","Generator","wrap","Applets","completed","pages","outPath","message","7364070LZMysJ","6093605xSiMyS","normal","end","completion","env","confirmConverterH5Fun","join","throw","tryEntries","app.json","336ChbOxy","src","hxml","smartProgramRoot","catchLoc","break","prev","confirmConverterFun"," is not iterable","continue","nextLoc","forEach","createDirs","1330873hmrvry","clearResource","readdir","reverse","async","sent","abrupt","checkInputPathFun","slice","appJsonFile","suspendedYield","next","call","handleConfigInfo","prototype"];return(_0x2e9b=function(){return r})()}function confirmConverterFun(r,t){return _confirmConverterFun[_0x3ea7b4(444)](this,arguments)}function _confirmConverterFun(){var t=_0x3ea7b4;return(_confirmConverterFun=_asyncToGenerator(_regeneratorRuntime()[t(480)](function r(e,n){var o,i,a=t;return _regeneratorRuntime()[a(503)](function(r){for(var t=a;;)switch(r[t(526)]=r[t(544)]){case 0:if(r[t(526)]=0,o=path[t(555)](e[t(485)],t(519)),i=path.resolve(e.inputPath,t(500)),fs[t(556)](i)||!fs[t(556)](o)||e[t(410)]){r.next=7;break}return r[t(539)](t(450),{command:t(445)});case 7:return r[t(544)]=9,doConvert(e,n);case 9:return r[t(539)]("return",r[t(538)]);case 10:r[t(544)]=16;break;case 12:return r[t(526)]=12,r.t0=r[t(412)](0),logger[t(499)](r.t0),r[t(539)](t(450),{command:"failedTransform",errorMessage:r.t0[t(508)]});case 16:case t(512):return r[t(461)]()}},r,null,[[0,12]])})))[t(444)](this,arguments)}function confirmConverterH5Fun(r,t){var e=_0x3ea7b4,n=path[e(516)](r.outPath,r[e(459)]);try{return commonUtils_1[e(532)](n,"src",!0),commonUtils_1[e(484)](path.join(__filename,"../lib",e(521)),path[e(516)](n,"src"),!1,!0),commonUtils_1[e(546)](r,path[e(516)](n,"src")),{command:e(441)}}catch(r){return logger[e(499)](r),{command:e(438),errorMessage:r.message}}}function checkConvertOutput(r,t){var e=_0x3ea7b4,r=path[e(555)](r),t=path[e(555)](t);if(fs[e(556)](t))throw new Error(e(472)[e(415)](t,e(420)));if(t[e(433)](r+path[e(497)]))throw new Error(e(471))}function doConvert(r,t){return _doConvert[_0x3ea7b4(444)](this,arguments)}function _doConvert(){var c=_0x3ea7b4;return(_doConvert=_asyncToGenerator(_regeneratorRuntime()[c(480)](function r(e,t){var n,o,i,a=c;return _regeneratorRuntime()[a(503)](function(r){for(var t=a;;)switch(r[t(526)]=r[t(544)]){case 0:if(n=path[t(555)](e[t(507)],"ascf/ascf_src"),process[t(514)][t(534)]===t(449))return r.next=4,clearResource([n]);r.next=4;break;case 4:return checkConvertOutput(e.inputPath,n),o=commonConfig_1[t(504)].srcRootPath,r[t(526)]=6,commonUtils_1[t(532)](n,o),commonUtils_1[t(478)](n,e[t(485)]),i=path[t(516)](n,o),"./"===o||""===o?(commonUtils_1[t(554)](e.inputPath,i),commonUtils_1[t(484)](e.inputPath,i)):(commonUtils_1[t(554)](path[t(516)](e[t(485)],o),i),commonUtils_1[t(484)](path[t(516)](e[t(485)],o),i),commonUtils_1[t(494)](path[t(516)](e[t(485)]),n)),commonUtils_1[t(447)](),commonUtils_1[t(542)](path[t(516)](n,o),e),commonUtils_1[t(430)](path[t(516)](n)),"my"===commonConfig_1[t(504)][t(421)]&&commonUtils_1[t(427)](n,path[t(516)](__filename,"../../")),addTransformUrl(),r[t(539)](t(450),{command:"completeTransform",folderUrl:n});case 19:return r[t(526)]=19,r.t0=r[t(412)](6),logger.error(r.t0),removePromise(n).finally(),r[t(539)]("return",{command:"failedTransform",errorMessage:r.t0[t(508)]});case 24:case t(512):return r[t(461)]()}},r,null,[[6,19]])})))[c(444)](this,arguments)}function removePromise(i){return new Promise(function(o,r){var e=_0x4769;fs[e(417)](i,function(r,t){var n=e;t[n(476)]()?fs[n(535)](i,function(r,t){var e=n,t=(t=t[e(474)](function(r){return path.join(i,r)})).map(function(r){return removePromise(r)});Promise.all(t)[e(411)](function(){fs[e(434)](i,o)})}):fs[n(495)](i,o)})})}function checkInputPathFun(r){var t=_0x3ea7b4,r=path.resolve(r),e=checkMiniProgram(r);return{command:t(429),data:{returnCode:e,outPath:path[t(482)](r)}}}function checkMiniProgram(r){var t=_0x3ea7b4,e=!0,t=path[t(516)](r,t(519));return e=fs.existsSync(t)&&identifyProgram(r)?e:!1}function _0x4769(r,t){var e=_0x2e9b();return(_0x4769=function(r,t){return e[r-=407]})(r,t)}function identifyProgram(r){var t=_0x3ea7b4;try{var e=path[t(516)](r,t(519)),n=JSON.parse(fs.readFileSync(e)[t(473)]());if(n&&n[t(506)]&&Array[t(550)](n[t(506)])&&0<n.pages.length)for(var o=getSrcRootPath(r),i=0,a=Object.keys(commonConfig_1[t(462)]);i<a[t(487)];i++){var c=a[i],u=path.join(r,o,n[t(506)][0]+commonConfig_1.projectFileSuffix[c][t(522)]);if(fs[t(556)](u))return commonConfig_1[t(504)][t(421)]="wx"===c?"tt":c,!0}return!1}catch(r){return!1}}function getSrcRootPath(r){var t=_0x3ea7b4;commonConfig_1[t(504)][t(483)]="./";for(var e=0;e<commonConfig_1.configBasenameArray[t(487)];e++){var n=commonConfig_1[t(549)][e],n=path[t(516)](r,n);fs[t(556)](n)&&((n=JSON[t(413)](fs[t(426)](n)[t(473)]()))[t(551)]?commonConfig_1[t(504)][t(483)]=n[t(551)]:n[t(523)]?commonConfig_1[t(504)][t(483)]=n[t(523)]:commonConfig_1[t(504)].srcRootPath="./")}return commonConfig_1[t(504)][t(483)]}exports[_0x3ea7b4(527)]=confirmConverterFun,exports[_0x3ea7b4(515)]=confirmConverterH5Fun,exports[_0x3ea7b4(540)]=checkInputPathFun;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var globalDistanceCount,globalJsLine,_0x377bd7=_0x385b,path=((()=>{for(var e=_0x385b,t=_0x5395();;)try{if(805727==+parseInt(e(356))*(parseInt(e(401))/2)+-parseInt(e(344))/3*(-parseInt(e(386))/4)+-parseInt(e(383))/5*(parseInt(e(384))/6)+parseInt(e(369))/7*(parseInt(e(402))/8)+-parseInt(e(357))/9+parseInt(e(407))/10+parseInt(e(337))/11*(-parseInt(e(370))/12))break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object.defineProperty(exports,_0x377bd7(406),{value:!0}),exports[_0x377bd7(360)]=exports[_0x377bd7(398)]=exports[_0x377bd7(367)]=exports.handleWxmlFile=exports[_0x377bd7(355)]=void 0,require(_0x377bd7(346))),fs=require("fs"),_require=require(_0x377bd7(362)),create=_require[_0x377bd7(376)],fileHandle_1=require(_0x377bd7(365)),commonConfig_1=require(_0x377bd7(397)),commonUtils_1=require("../common/commonUtils"),importVisitor_1=require(_0x377bd7(358)),wxssParser_1=require(_0x377bd7(388)),commonConfig_2=require(_0x377bd7(397)),TransformReport=require("./transformReport"),parse5=require("../compiler-utils/parse5.bundle"),_require2=require(_0x377bd7(377)),configs=_require2[_0x377bd7(380)],insertedApiObj={},insertedApiCountObj={},excessOffsets={},DEST_API_NAME=_0x377bd7(375),DEST_API_LEN=DEST_API_NAME[_0x377bd7(405)];function handleWxssImport(e,r,n){var o=_0x377bd7,a=commonConfig_1[o(378)][n],e=create(e,r),e=(r=e[o(374)](),wxssParser_1.wxssParser(r,e,a[o(347)],n)),s=0;return e.forEach(function(e){var t=o;e[t(336)]===t(341)?(";"!==r[e[t(345)]+1-s]&&(e[t(345)]=e[t(345)]+1),r=commonUtils_1[t(387)](r,e[t(345)]-a[t(347)][t(405)]-s,e[t(345)]-s,t(343)),s+=a[t(347)][t(405)]-4):(r=commonUtils_1.replacepos(r,e[t(390)]-s,e[t(390)]+n.length+1-s,""),s+=n[t(405)]+1)}),r}function handleWxmlFile(e,t,r,n){var o=_0x377bd7,t=create(e,t),t=parse5[o(404)](t[o(374)](),{}),e={filePath:e,srcPath:r,appType:n,utils:{commonConfig:commonConfig_1,importVisitor:importVisitor_1,textDocument:{create:create},fileHandle:fileHandle_1}};return parse5[o(381)](t,{convertOptions:e})}function _0x385b(e,t){var r=_0x5395();return(_0x385b=function(e,t){return r[e-=334]})(e,t)}function transformWxSchemas(e,t,r){var n=_0x377bd7,o=e.moduleRange[n(342)],t=t.offsetAt({line:o[n(385)]-1,character:o.character+1});return r=commonUtils_1.replacepos(r,t+globalDistanceCount,t+e.module.length+globalDistanceCount,n(403)),globalDistanceCount-=e[n(334)][n(405)]-4,r}function transformWxmlWxsFilePath(e,t,r){var n=_0x377bd7,o=e[n(338)][n(342)],t=t[n(371)]({line:o[n(385)]-1,character:o.character});return r=commonUtils_1[n(387)](r,t+globalDistanceCount,t+globalDistanceCount+e[n(334)][n(405)]-1,4===e[n(334)][n(405)]?n(399):n(394))}function transformWxsFilePath(e,s,i,c,t){var l=0,m=commonConfig_1.projectFileSuffix[t];return e.forEach(function(e){var t=_0x385b;if(path[t(353)](e[t(334)])===m[t(399)]){var r=e[t(334)],n=e[t(338)][t(342)],n=s[t(371)]({line:n[t(385)]-1,character:n.character-1})+l,o=e[t(334)][t(372)](0,e.module[t(405)]-(m.hjs[t(405)]-1))+t(399);if(r&&!r.startsWith("./")&&!r[t(361)](t(408))){var a=path[t(350)](c,"..",r);if(!path[t(353)](a))return;fs[t(366)](a)&&(a=".",r[t(361)]("/")?l+=1:(a="./",l+=2),o=a+o)}i=commonUtils_1[t(387)](i,n,n+e[t(334)].length,o)}}),i}function calProcessedApis(e,t){e[t]?e[t]++:e[t]=1}function notDealtWith(e,t){var r=_0x377bd7;return-1!==commonConfig_2.invalidApis[r(352)](e.property)&&!(-1!==Object.keys(insertedApiObj)[r(352)](t)&&insertedApiObj[t]===e[r(351)])}function insertTodoInline(e,t,r,n){var o=_0x377bd7,a=1,n=o(354)[o(395)](commonUtils_1.setLanguage(o(396)),o(349))[o(395)](DEST_API_NAME,".")[o(395)](n[o(351)],o(363)),r=(1===insertedApiCountObj[t]&&(a=0,n+="\n",globalJsLine++),r+globalDistanceCount-excessOffsets[t]-a);return e=commonUtils_1.insertStr(e,r,n),globalDistanceCount+=n[o(405)],e}function transformWxInterface(e,t,r,n){var o=_0x377bd7,a=e[o(338)][o(342)],s=t[o(382)]()+"-"+a[o(385)],i=t[o(371)]({line:a[o(385)]-1,character:a[o(379)]}),c=i+globalDistanceCount;return r=commonUtils_1[o(387)](r,c,c+n[o(405)],DEST_API_NAME),globalDistanceCount+=DEST_API_LEN-n.length,calProcessedApis(excessOffsets,s),commonConfig_2[o(364)][e[o(351)]]?(c=i+globalDistanceCount+n[o(405)]+1,r=commonUtils_1[o(387)](r,c,c+e[o(351)][o(405)],commonConfig_2[o(364)][e.property]),i=e.property[o(405)]-commonConfig_2[o(364)][e[o(351)]][o(405)],globalDistanceCount-=i,excessOffsets[s]-=i):notDealtWith(e,s)&&(calProcessedApis(insertedApiCountObj,s),n=t[o(371)]({line:a[o(385)]-1,character:0}),c=a[o(385)],configs[o(368)]||(r=insertTodoInline(r,s,n,e)),i=t.uri()+' {"line":'+(c+globalJsLine)+o(359)+a[o(379)]+"}",TransformReport.writeInfo(""[o(395)](commonUtils_1[o(400)](o(396)),"api ").concat(DEST_API_NAME,".")[o(395)](e.property),i),insertedApiObj[s]=e[o(351)]),r}function transformJsFile(e,r,n,o){var a=_0x377bd7,s=create(e,n),e=(n=s[a(374)](),importVisitor_1.getImportRules(n,null,null,o));return globalJsLine=globalDistanceCount=0,e.forEach(function(e){var t=a;switch(e[t(336)]){case t(335):n=transformJsPath(e,r,n,s);break;case t(389):n=transformWxInterface(e,s,n,o);break;case t(339):n=transformWxmlWxsFilePath(e,s,n);break;case t(373):n=transformWxSchemas(e,s,n);break;case t(393):n=transformComponentMixins(e,s,n)}}),n}function transformComponentMixins(e,t,r){var n=_0x377bd7,o=e[n(338)][n(342)],t=t[n(371)]({line:o[n(385)]-1,character:o.character});return r=commonUtils_1[n(387)](r,t+globalDistanceCount,t+e[n(334)][n(405)]+globalDistanceCount,n(348)),globalDistanceCount-=e[n(334)].length-9,r}function transformJsPath(e,t,r,n){var o=_0x377bd7,a=e[o(334)];return!a||a.startsWith("./")||a[o(361)]("../")||(t=path[o(350)](t,"..",a),path.extname(t)||(t+=o(340)),fs[o(366)](t)&&(t=e.moduleRange[o(342)],e=n.offsetAt({line:t.line-1,character:t[o(379)]-1})+globalDistanceCount,n=".",a[o(361)]("/")?globalDistanceCount+=1:(n="./",globalDistanceCount+=2),r=commonUtils_1[o(392)](r,e,n))),r}function _0x5395(){var e=["notSupport","../common/commonConfig","transformJsFile","hjs","setLanguage","112QmpiZK","8VSCylR","has:","parseFragment","length","__esModule","1167270McaEsV","../","module","fileImport","type","22nnqMkO","moduleRange","filePath",".js","import","start",".css","3FMlLbB","endOffset","path","css","behaviors","api ","join","property","indexOf","extname","// ","handleWxssImport","13637opOViT","585234CDwxSs","../parse/importVisitor",',"column":',"transformJsPath","startsWith","../common/textDocument"," TODO","interfacesForTransform","../features/fileHandle","existsSync","transformWxsFilePath","notaddtodo","4241489YOuHNP","7418244Izbooa","offsetAt","substring","wxSchema","getText","has","create","../../common/config","projectFileSuffix","character","configs","serialize","uri","35JdvDdo","596796guunfM","line","5268252BJpaWZ","replacepos","../parse/wxssParser","wxInterface","startOffset","handleWxmlFile","insertStr","mixins","hxml","concat"];return(_0x5395=function(){return e})()}exports[_0x377bd7(355)]=handleWxssImport,exports[_0x377bd7(391)]=handleWxmlFile,exports[_0x377bd7(367)]=transformWxsFilePath,exports[_0x377bd7(398)]=transformJsFile,exports[_0x377bd7(360)]=transformJsPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x11e587=_0x56f7;function _0x56f7(r,e){var n=_0x37da();return(_0x56f7=function(r,e){return n[r-=478]})(r,e)}(()=>{for(var r=_0x56f7,e=_0x37da();;)try{if(482635==+parseInt(r(481))*(parseInt(r(505))/2)+parseInt(r(491))/3+-parseInt(r(499))/4*(parseInt(r(478))/5)+-parseInt(r(503))/6+parseInt(r(482))/7+-parseInt(r(494))/8*(parseInt(r(479))/9)+-parseInt(r(497))/10*(-parseInt(r(501))/11))break;e.push(e.shift())}catch(r){e.push(e.shift())}})(),Object[_0x11e587(500)](exports,_0x11e587(484),{value:!0}),exports.insertInfo=exports[_0x11e587(487)]=void 0;var commonUtils_1=require(_0x11e587(486)),fs=require("fs"),path=require(_0x11e587(489)),unsupportedApis=[];function addTransformUrl(){var r=_0x11e587,e=path[r(485)](__dirname,r(480)),e=JSON[r(492)](fs[r(493)](e)[r(496)]());0<unsupportedApis[r(504)]&&(unsupportedApis[r(498)]("以上接口当前版本暂不支持,请期待后续更新。\n如有需要使用请参考官方文档获取暂不支持的接口处理方式:"+e[r(490)]),write(unsupportedApis.join("")))}function _0x37da(){var r=["38568EiWBYH","write","toString","10xvgDRf","push","284XcAALW","defineProperty","4766465rwzJeY","join","660324HAsBtn","length","15782kBDlQa","getGlobleOutPutPath","50225MUWJFH","981cmYcoB","../../common/url.json","19jKUPvz","3089450hyfWmO","Error: ","__esModule","resolve","../common/commonUtils","writeInfo","appendFile","path","transformLogUrl","2420337qytLLU","parse","readFileSync"];return(_0x37da=function(){return r})()}function writeInfo(r,e){var n=_0x11e587,r=[n(483),r,"\n",commonUtils_1.setLanguage("position"),e,"\n\n\n"][n(502)]("");unsupportedApis[n(498)](r)}function insertInfo(r){var e=_0x11e587,n=fs[e(493)](commonUtils_1[e(506)]())[e(496)]();fs.writeFileSync(commonUtils_1[e(506)](),r),write(n)}function write(r){var e=_0x11e587;r&&fs[e(488)](commonUtils_1[e(506)](),r,function(r){if(r)throw r})}exports.addTransformUrl=addTransformUrl,exports[_0x11e587(487)]=writeInfo,exports.insertInfo=insertInfo,exports[_0x11e587(495)]=write;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function _0x1c31(a,e){var t=_0x16fb();return(_0x1c31=function(a,e){return t[a-=142]})(a,e)}function _typeof(a){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){var e=_0x1c31;return a&&e(170)==typeof Symbol&&a[e(160)]===Symbol&&a!==Symbol[e(150)]?"symbol":typeof a})(a)}function _defineProperty(a,e,t){var r=_0x1c31;return(e=_toPropertyKey(e))in a?Object[r(143)](a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function _0x16fb(){var a=["showToast","setClipboardData","defineProperty","saveFile","showActionSheet","chooseImage","sort","getClipboardData","75iROIvL","prototype","apFilePaths","__apiAdapterConverted","eventName","652347nAfUUN","string","1233KmulCd","value","code","scanCode","constructor","name","apiName","symbol","callBack","downloadFile","tempFilePath","apply","keys","getScreenBrightness","function","level","compressImage","phoneNumber","setStorageSync","getSavedFileInfo","toFixed","1085ESgFpN","returnVal","setScreenBrightness","2517383cBuVaE","length","success","removeStorageSync","removeSavedFile","42142qkJgYG","default","getFileInfo","forEach","data","apFilePath","40NQfOSD","index","175470QxAbJl","params","showLoading","44808mSUqyl","clearStorageSync","quality","concat","push","2604XMqnTH","4880981kriQgR","object","@@toPrimitive must return a primitive value.","itemList","filePath","uploadFile","makePhoneCall","title"];return(_0x16fb=function(){return a})()}function _toPropertyKey(a){var e=_0x1c31,a=_toPrimitive(a,e(155));return e(163)==_typeof(a)?a:a+""}function _toPrimitive(a,e){var t=_0x1c31;if(t(203)!=_typeof(a)||!a)return a;var r=a[Symbol.toPrimitive];if(void 0===r)return(t(155)===e?String:Number)(a);r=r.call(a,e||t(186));if(t(203)!=_typeof(r))return r;throw new TypeError(t(204))}(()=>{for(var a=_0x1c31,e=_0x16fb();;)try{if(445786==+parseInt(a(154))+parseInt(a(185))/2*(parseInt(a(149))/3)+parseInt(a(201))/4*(parseInt(a(177))/5)+-parseInt(a(193))/6+-parseInt(a(202))/7+-parseInt(a(196))/8*(-parseInt(a(156))/9)+parseInt(a(191))/10*(-parseInt(a(180))/11))break;e.push(e.shift())}catch(a){e.push(e.shift())}})(),(()=>{var a,e,m,n=_0x1c31;function i(e,t){var a=n;e&&Object[a(168)](e)[a(188)](function(a){t[a]&&(t[e[a]]=t[a],delete t[a])})}has[n(152)]||(has[n(152)]=!0,a=[{apiName:n(146),callBack:[{eventName:n(182),params:{tempFilePaths:n(151)}}]},{apiName:n(144),params:{apFilePath:"tempFilePath"},callBack:[{eventName:"success",params:{savedFilePath:n(190)}}]},{apiName:n(187),params:{apFilePath:n(206)}},{apiName:n(175),params:{apFilePath:n(206)}},{apiName:n(184),params:{apFilePath:"filePath"}},{apiName:n(142),params:{text:n(189)}},{apiName:n(148),callBack:[{eventName:n(182),params:{data:"text"}}]},{apiName:"saveImageToPhotosAlbum",params:{url:"filePath"}},{apiName:n(195),params:{content:n(209)}},{apiName:n(145),params:{items:n(205)},callBack:[{eventName:n(182),params:{tapIndex:n(192)}}]},{apiName:n(207),params:{fileName:n(161)}},{apiName:n(179),params:{brightness:n(157)}},{apiName:n(169),callBack:[{eventName:n(182),params:{value:"brightness"}}]},{apiName:n(159),params:{hideAlbum:"onlyFromCamera"},callBack:[{eventName:n(182),params:{result:n(158)}}]},{apiName:n(208),params:{number:n(173)}},{apiName:n(210),params:{content:n(209)}},{apiName:n(165),callBack:[{eventName:n(182),params:{tempFilePath:n(190)}}]}],e=[{apiName:"getStorageSync",params:{key:1},returnVal:n(189)},{apiName:n(174),params:{key:1,data:2}},{apiName:n(183),params:{key:1}},{apiName:n(197)}],m={},a[n(199)](e)[n(188)](function(a){a=a[n(162)];m[a]=has[a]}),a[n(188)](function(e){var t=n,r=e[t(162)];has[r]=function(){var a=t,n=0<arguments[a(181)]&&void 0!==arguments[0]?arguments[0]:{};return i(e.params,n),e.callBack&&e[a(164)].forEach(function(e){var t=a,r=n[e[t(153)]];n[e.eventName]=function(a){i(e[t(194)],a),r(a)}}),m[r](n)}}),e[n(188)](function(e){var o=n,p=e[o(162)];has[p]=function(){var t=o,r=0<arguments[t(181)]&&void 0!==arguments[0]?arguments[0]:{},n=[],i=e[t(194)]&&Object.keys(e[t(194)])||[],a=(i[t(147)](function(a,e){return i[a]-i[e]}),i[t(188)](function(a){var e=t;r[a]&&n[e(200)](r[a])}),m[p][t(167)](m,n));return e.returnVal?_defineProperty({},e[t(178)],a):{}}}),m[n(172)]=has[n(172)],has[n(172)]=function(){var t=n,a=0<arguments[t(181)]&&void 0!==arguments[0]?arguments[0]:{},e=(a.src=Array.isArray(a[t(151)])?a[t(151)][0]:"",Number(a[t(171)])),r=(e<=3?a.quality=(100/3*e)[t(176)](0):a.defaultImgVuality=80,a[t(198)]=Number(a.quality),a[t(182)]);return a[t(182)]=function(a){var e=t;a[e(151)]=[a[e(166)]],r(a)},m[t(172)](a)})})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x2e6568=_0x1874;function _0x1874(r,e){var a=_0x2a38();return(_0x1874=function(r,e){return a[r-=460]})(r,e)}function _0x2a38(){var r=["parse","1268jGBqQL","1492116RqpEol","substring","25biLrQf","unambiguous","8958105cWDjxt","3429587ELNhtZ","12154216hJOPEZ","__esModule","21570kcgXkd","length","13224120quNGqo","babelTransform","101cALWpX","9009kPEUHT"];return(_0x2a38=function(){return r})()}(()=>{for(var r=_0x1874,e=_0x2a38();;)try{if(955521==+parseInt(r(471))*(-parseInt(r(467))/2)+parseInt(r(472))/3*(parseInt(r(474))/4)+-parseInt(r(461))/5*(parseInt(r(475))/6)+parseInt(r(464))/7+parseInt(r(465))/8+-parseInt(r(463))/9+parseInt(r(469))/10)break;e.push(e.shift())}catch(r){e.push(e.shift())}})(),Object.defineProperty(exports,_0x2e6568(466),{value:!0}),exports[_0x2e6568(470)]=void 0;var babelParser=require("@babel/parser"),parseTryCount=0;function babelTransform(e,a){var n=_0x2e6568;try{var t=babelParser[n(473)](e,{sourceType:n(462),allowReturnOutsideFunction:!0,plugins:["classProperties"]});return parseTryCount=0,t}catch(r){if(a){if(0===parseTryCount)return t=e[n(460)](0,a-1)+e.substring(a,e[n(468)]),parseTryCount++,babelTransform(t,a);if(parseTryCount<3)return t=e.substring(0,a)+","+e[n(460)](a,e[n(468)]),parseTryCount++,babelTransform(t,a);parseTryCount=0}return null}}exports[_0x2e6568(470)]=babelTransform;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x4de451=_0x3432;function _0x3432(e,r){var t=_0x3ae6();return(_0x3432=function(e,r){return t[e-=389]})(e,r)}function _0x3ae6(){var e=["start","10VLDtNT","object","391180nTAnxA","./babelParser","isObjectProperty","3EVnPhI","wxSchema","scope","@babel/traverse","key","source","wxInterface","CallExpression","value","221716BZuKQs","filePath","isObjectExpression","push","properties","2160109xGactx","Identifier","findParent","arguments","forEach","2372408JbulxO","getOwnBinding","1428588YoabBy","callee","extname","getStatementParent","65tunIPe","name","line","node","end","fileImport","31888ijzFTu","concat","hjs","Component","746793wJZsCO","column","@babel/core","property","getImportRules","isIdentifier","loc","://","length","test","defineProperty"];return(_0x3ae6=function(){return e})()}(()=>{for(var e=_0x3432,r=_0x3ae6();;)try{if(216801==+parseInt(e(406))+-parseInt(e(418))/2*(parseInt(e(409))/3)+-parseInt(e(440))/4*(-parseInt(e(434))/5)+-parseInt(e(430))/6+-parseInt(e(423))/7+parseInt(e(428))/8+-parseInt(e(392))/9*(-parseInt(e(404))/10))break;r.push(r.shift())}catch(e){r.push(r.shift())}})(),Object[_0x4de451(402)](exports,"__esModule",{value:!0}),exports.getImportRules=void 0;var babelParser_1=require(_0x4de451(407)),babel_traverse_1=require(_0x4de451(412)),pathTool=require("path"),commonConfig_1=require("../common/commonConfig"),babelTypes=require(_0x4de451(394)).types;function getQaSchemasReg(e){var r=_0x4de451;return new RegExp("^"[r(389)](e,r(399)))}var currentType,suffixs,importRules=[],visitor={ImportDeclaration:function(e){var r=_0x4de451;importRules[r(421)]({type:r(439),module:e[r(437)][r(414)][r(417)],moduleRange:{start:{line:e[r(437)][r(414)][r(398)][r(403)][r(436)],character:e[r(437)][r(414)][r(398)].start[r(393)]+2},end:{line:e[r(437)][r(414)][r(398)][r(438)][r(436)],character:e[r(437)].source[r(398)][r(438)].column+2}}})},CallExpression:function(e){var t=_0x4de451;e[t(437)][t(431)]&&e.node[t(426)]&&"require"===e.node.callee.name&&1===e[t(437)][t(426)].length&&importRules[t(421)]({type:"fileImport",module:e.node[t(426)][0].value,moduleRange:{start:{line:e[t(437)].arguments[0][t(398)][t(403)][t(436)],character:e[t(437)].arguments[0][t(398)][t(403)][t(393)]+2},end:{line:e[t(437)][t(426)][0][t(398)][t(438)][t(436)],character:e.node[t(426)][0][t(398)][t(438)].column+2}}}),e.node[t(431)]&&e[t(437)][t(426)]&&e.node[t(431)][t(435)]===t(391)&&1===e[t(437)][t(426)][t(400)]&&babelTypes[t(420)](e.node[t(426)][0])&&e.node.arguments[0][t(422)]&&0<e[t(437)].arguments[0][t(422)].length&&e[t(437)][t(426)][0][t(422)][t(427)](function(e){var r=t;babelTypes[r(408)](e)&&babelTypes[r(397)](e[r(413)])&&"mixins"===e[r(413)][r(435)]&&importRules[r(421)]({type:"mixins",module:e[r(413)][r(435)],moduleRange:{start:{line:e[r(398)][r(403)][r(436)],character:e[r(398)][r(403)][r(393)]},end:{line:e[r(413)][r(398)][r(438)].line,character:e[r(413)][r(398)].end[r(393)]}}})})},MemberExpression:function(e){var r=_0x4de451;e[r(437)].object&&e[r(437)][r(395)]&&e[r(437)][r(405)][r(435)]===currentType&&!hasParent(e,e[r(437)][r(405)][r(435)])&&importRules[r(421)]({type:"wxInterface",module:e[r(437)][r(405)].name,moduleRange:{start:{line:e.node.object.loc[r(403)][r(436)],character:e[r(437)][r(405)][r(398)][r(403)].column},end:{line:e[r(437)].object.loc[r(438)][r(436)],character:e[r(437)][r(405)].loc.end.column}},property:e.node[r(395)][r(435)]})},Identifier:function(e){var r=_0x4de451;e.node[r(435)]!==currentType||0!==e.key||hasParent(e,e[r(437)].name)||importRules[r(421)]({type:r(415),module:e.node[r(435)],moduleRange:{start:{line:e.node[r(398)][r(403)][r(436)],character:e[r(437)][r(398)][r(403)][r(393)]},end:{line:e[r(437)][r(398)][r(438)].line,character:e[r(437)][r(398)][r(438)][r(393)]}},property:null})},StringLiteral:function(e){var r,t=_0x4de451;!e[t(437)][t(417)]||pathTool.extname(e[t(437)][t(417)])!==suffixs.hxml&&pathTool[t(432)](e.node[t(417)])!==suffixs[t(390)]||(r=pathTool[t(432)](e[t(437)][t(417)]),importRules[t(421)]({type:t(419),module:r,moduleRange:{start:{line:e.node[t(398)][t(438)][t(436)],character:e.node[t(398)].end[t(393)]-r[t(400)]},end:{line:e[t(437)].loc[t(438)].line,character:e[t(437)][t(398)].end.column}}})),e[t(437)][t(417)]&&getQaSchemasReg(currentType)[t(401)](e.node[t(417)])&&importRules[t(421)]({type:t(410),module:""[t(389)](currentType,":"),moduleRange:{start:{line:e[t(437)][t(398)][t(403)][t(436)],character:e[t(437)].loc[t(403)][t(393)]},end:{line:e[t(437)][t(398)][t(403)][t(436)],character:e.node.loc[t(403)][t(393)]+5}}})}};function hasParent(e,t){var n=_0x4de451,a=!1;return e[n(433)]()[n(425)](function(e){var r=n;a||e[r(411)][r(429)](t)&&(a=!0)}),a}function clear(){var e=_0x4de451;importRules.splice(0,importRules[e(400)])}function getImportRules(e,r){var t=_0x4de451,n=2<arguments.length&&void 0!==arguments[2]&&arguments[2],a=3<arguments.length?arguments[3]:void 0,n=(currentType=a,suffixs=commonConfig_1.projectFileSuffix[a],a=n?{CallExpression:visitor[t(416)],ImportDeclaration:visitor.ImportDeclaration}:{MemberExpression:visitor.MemberExpression,StringLiteral:visitor.StringLiteral,Identifier:visitor[t(424)],CallExpression:visitor.CallExpression},babelParser_1.babelTransform(e,r));return clear(),babel_traverse_1.default(n,a),importRules}exports[_0x4de451(396)]=getImportRules;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x258bb1=_0x32bc;function _0x32bc(e,t){var r=_0x2375();return(_0x32bc=function(e,t){return r[e-=179]})(e,t)}(()=>{for(var e=_0x32bc,t=_0x2375();;)try{if(981903==+parseInt(e(225))*(-parseInt(e(189))/2)+parseInt(e(197))/3*(-parseInt(e(193))/4)+parseInt(e(204))/5*(parseInt(e(187))/6)+-parseInt(e(194))/7*(parseInt(e(195))/8)+-parseInt(e(186))/9+-parseInt(e(214))/10*(-parseInt(e(217))/11)+parseInt(e(184))/12)break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object[_0x258bb1(226)](exports,"__esModule",{value:!0}),exports.wxssParser=exports[_0x258bb1(205)]=exports[_0x258bb1(231)]=void 0;var postcss=require(_0x258bb1(232)),path=require("path");function wxssParser(t,r,p,i){var c=_0x258bb1,n=[];try{n=postcss[c(210)](t)[c(182)][c(198)](function(e){var t=c;return"atrule"===e[t(222)]&&e[t(230)]===t(201)})[c(208)](function(e){var t=c;return{type:t(201),import:e[t(199)],position:{start:e[t(227)][t(228)],end:e[t(227)][t(220)]}}})}catch(e){for(var s=t[c(180)](exports.importReg),o=0,a=0;s=exports[c(231)][c(209)](t);){var u,a=t.indexOf(s[0],a),x=checkIsInComment(s[0],t,o,s[c(202)]);x[c(183)]?(o=s[c(202)]+x.restLength,a+=x[c(181)]):(o=s.index+s[0].length,(x=s[0][c(180)](exports[c(205)]))&&(u=r[c(223)](a+x[c(202)]),n.push({type:"import",uri:r[c(215)],position:{start:{line:u[c(224)]+1,column:u.character},end:{line:u[c(224)]+1,column:u[c(213)]+x[0][c(188)]+2}},value:x?x[1]:"",import:x[0]})),a+=s[0].length)}}var l=[];return n[c(229)](function(n){var s,e,o,a=c;n.type===a(201)?(e={line:n.position[a(220)][a(224)]-1,character:n[a(192)][a(220)][a(190)]-2},s=r[a(203)](e),e=n.import[a(200)](/[\r\n]/gi," ")[a(216)](" "),o=0,e[a(229)](function(e){var t,r=a,e=e[r(185)](1,e[r(188)]-1);path.extname(e)===p&&(t=n[r(201)][r(211)](e,o),o=t,l[r(207)]({type:r(201),import:e,endOffset:s-(n[r(201)].length-t-e[r(188)])+1}))})):"swan"===i&&getSelectorRule(n,r,i,l)}),l}function _0x2375(){var e=["index","offsetAt","5srWDGJ","importFileReg","selectors","push","map","exec","parse","indexOf","getText","character","12564270OpwIvW","uri","split","11jxNpjE","rules","media","end","selector","type","positionAt","line","197527emiQYc","defineProperty","source","start","forEach","name","importReg","postcss","concat","match","restLength","nodes","isInComment","43637064PNpwtj","substring","7280379vdRMEs","1379874gpdpFG","length","6qGUnBE","column",".*(?:\\r|\\n|$)))","position","52852rGJxLW","6454aXCTUT","16088GeCNgY","rule","201MMvkNe","filter","params","replace","import"];return(_0x2375=function(){return e})()}function handleSelectors(e,n,s,o,a){var t=_0x258bb1;e[t(229)](function(e){var r=t;e[r(216)](/\s+/).forEach(function(e){var t=r;n=s[t(211)](e,n),o.test(e)&&a[t(207)]({type:t(221),selector:e,startOffset:n}),n+=e.length})})}function getSelectorRule(e,t,r,n){var s,o,a,p,i=_0x258bb1;e[i(222)]===i(196)?(s=t[i(212)](),o=new RegExp("^"[i(179)](r,"-")),a=e[i(206)],p={line:e[i(192)][i(228)][i(224)]-1,character:e[i(192)][i(228)][i(190)]-1},p=t[i(203)](p),a&&handleSelectors(a,p,s,o,n)):e.type===i(219)&&e[i(218)][i(229)](function(e){getSelectorRule(e,t,r,n)})}function checkIsInComment(e,t,r,n){for(var s,o=_0x258bb1,a=new RegExp("((?:^|\\n|\\r)\\s*\\/\\*[\\s\\S]*?"[o(179)](e,"[\\s\\S]*?\\*\\/\\s*(?:\\r|\\n|$)|((?:^|\\n|\\r)\\s*\\/\\/.*")[o(179)](e,o(191)),"g");s=a[o(209)](t[o(185)](r));){if(s[o(202)]+r<n&&s[o(202)]+r+s[0][o(188)]>n)return{isInComment:!0,restLength:s.index+r+s[0][o(188)]-n};if(s[o(202)]+r>n)break}return{isInComment:!1,restLength:0}}exports[_0x258bb1(231)]=/\@import\s+[\'\"].*[\'\"](\s+.*(\s*[and|not|only|or|\,]\s*\(.*\))*)?\s*\;?/g,exports[_0x258bb1(205)]=/['"]\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,_0x56f78e=_0x59d2;function _0x52be(){var e=["apply","asyncIterator","98287IENQLx","convert","dispatchException","commander","ascf toolkit convert and compile ascf project","_invoke","stop","prototype","call","create","_ascfCliProgram","Command","length","method","requiredOption","prev","awrap","getPrototypeOf","toStringTag","' method","function","symbol","constructor","../../package.json","iterator result is not an object","Compile ascf project","Not add todo for not supported api.","compile <projectRoot>","enable debug logging","__proto__","description","nextLoc","-notaddtodo, --notaddtodo","catchLoc","suspendedStart","complete","Clear convert output path","isGeneratorFunction","return","424kfgbIl","normal","Use swc parser","hasOwnProperty","-c, --clear","afterLoc","try statement without catch or finally","reset","push","finallyLoc","Validate path","end","--logging [level]","4LUAcGJ","AsyncIterator","defineProperty","rval","@@toStringTag","command","debug","type","throw","setLoggerConfig","action","slice","mark","break","--swc","tryLoc","logging","keys","opts","notaddtodo","continue","1916850kJGmcx","../common/log4js.js","suspendedYield","name","value","sent","toString","Generator is already running","../index","next","-r, --run [command]","displayName","10NYOLXI","delegate","tryEntries","arg","charAt","2974866KyYlYC","-m, --mode","done","iterator","507579vrbVqz","wrap","version","forEach","Clear build resource","18570233KfYFkf","515248RxyokU","Convert miniprogram project to ascf project","values","illegal catch attempt","object","pop","executing","then","compile","_sent","-p, --progress","Watch for changes","parse","option","_ascfDebug","10CKHKbA","resolve","../common/config","7619409hfJool","Setting the log level","__await","Environment is development","-w, --watch","reverse","GeneratorFunction","completion"];return(_0x52be=function(){return e})()}function _0x59d2(e,r){var t=_0x52be();return(_0x59d2=function(e,r){return t[e-=329]})(e,r)}function _typeof(e){var t=_0x59d2;return(_typeof=t(381)==typeof Symbol&&"symbol"==typeof Symbol[t(454)]?function(e){return typeof e}:function(e){var r=t;return e&&r(381)==typeof Symbol&&e[r(383)]===Symbol&&e!==Symbol[r(368)]?r(382):typeof e})(e)}function _regeneratorRuntime(){var u=_0x59d2;_regeneratorRuntime=function(){return f};var s,f={},e=Object[u(368)],p=e[u(403)],l=Object[u(415)]||function(e,r,t){var n=u;e[r]=t[n(438)]},r=u(381)==typeof Symbol?Symbol:{},i=r[u(454)]||"@@iterator",t=r[u(360)]||"@@asyncIterator",n=r[u(379)]||u(417);function o(e,r,t){return Object[u(415)](e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}),e[r]}try{o({},"")}catch(e){o=function(e,r,t){return e[r]=t}}function c(e,r,t,n){var o,i,a,f,c=u,r=r&&r[c(368)]instanceof m?r:m,r=Object.create(r[c(368)]),n=new O(n||[]);return l(r,c(366),{value:(o=e,i=t,a=n,f=_,function(e,r){var t=_0x59d2;if(f===d)throw Error(t(441));if(f===g){if(t(421)===e)throw r;return{value:s,done:!0}}for(a[t(374)]=e,a[t(449)]=r;;){var n=a[t(447)];if(n){n=function e(r,t){var n=u,o=t.method,i=r[n(454)][o];if(i===s)return t[n(447)]=null,n(421)===o&&r[n(454)].return&&(t.method=n(399),t[n(449)]=s,e(r,t),n(421)===t[n(374)])||n(399)!==o&&(t[n(374)]=n(421),t[n(449)]=new TypeError("The iterator does not provide a '"+o+n(380))),x;o=h(i,r[n(454)],t.arg);if(n(421)===o.type)return t[n(374)]=n(421),t.arg=o.arg,t[n(447)]=null,x;i=o[n(449)];return i?i[n(453)]?(t[r.resultName]=i[n(438)],t[n(443)]=r[n(392)],n(399)!==t[n(374)]&&(t[n(374)]=n(443),t[n(449)]=s),t.delegate=null,x):i:(t[n(374)]="throw",t[n(449)]=new TypeError(n(385)),t[n(447)]=null,x)}(n,a);if(n){if(n===x)continue;return n}}if(t(443)===a[t(374)])a[t(439)]=a[t(342)]=a[t(449)];else if(t(421)===a[t(374)]){if(f===_)throw f=g,a[t(449)];a[t(363)](a.arg)}else"return"===a.method&&a.abrupt(t(399),a[t(449)]);f=d;n=h(o,i,a);if(t(401)===n[t(420)]){if(f=a.done?g:v,n[t(449)]===x)continue;return{value:n[t(449)],done:a.done}}t(421)===n[t(420)]&&(f=g,a[t(374)]=t(421),a[t(449)]=n[t(449)])}})}),r}function h(e,r,t){var n=u;try{return{type:n(401),arg:e[n(369)](r,t)}}catch(e){return{type:n(421),arg:e}}}f.wrap=c;var _=u(395),v=u(436),d=u(339),g="completed",x={};function m(){}function a(){}function y(){}var r={},b=(o(r,i,function(){return this}),Object[u(378)]),b=b&&b(b(k([]))),w=(b&&b!==e&&p[u(369)](b,i)&&(r=b),y.prototype=m.prototype=Object.create(r));function j(e){var r=u;[r(443),r(421),r(399)][r(330)](function(r){o(e,r,function(e){return this._invoke(r,e)})})}function L(f,c){var r,o=u;l(this,o(366),{value:function(t,n){function e(){return new c(function(e,r){!function r(e,t,n,o){var i,a=_0x59d2,e=h(f[e],f,t);if("throw"!==e[a(420)])return(t=(i=e[a(449)])[a(438)])&&a(337)==_typeof(t)&&p[a(369)](t,a(353))?c[a(349)](t[a(353)]).then(function(e){r(a(443),e,n,o)},function(e){r(a(421),e,n,o)}):c[a(349)](t).then(function(e){i[a(438)]=e,n(i)},function(e){return r(a(421),e,n,o)});o(e[a(449)])}(t,n,e,r)})}return r=r?r[o(340)](e,e):e()}})}function C(e){var r=u,t={tryLoc:e[0]};1 in e&&(t[r(394)]=e[1]),2 in e&&(t[r(409)]=e[2],t[r(405)]=e[3]),this[r(448)].push(t)}function I(e){var r=u,t=e.completion||{};t.type=r(401),delete t[r(449)],e[r(358)]=t}function O(e){var r=u;this[r(448)]=[{tryLoc:"root"}],e[r(330)](C,this),this[r(407)](!0)}function k(t){var n=u;if(t||""===t){var o,e=t[i];if(e)return e[n(369)](t);if(n(381)==typeof t.next)return t;if(!isNaN(t[n(373)]))return o=-1,(e=function e(){for(var r=n;++o<t[r(373)];)if(p.call(t,o))return e[r(438)]=t[o],e[r(453)]=!1,e;return e[r(438)]=s,e.done=!0,e})[n(443)]=e}throw new TypeError(_typeof(t)+" is not iterable")}return a.prototype=y,l(w,u(383),{value:y,configurable:!0}),l(y,u(383),{value:a,configurable:!0}),a[u(445)]=o(y,n,u(357)),f[u(398)]=function(e){var r=u,e=r(381)==typeof e&&e.constructor;return!!e&&(e===a||"GeneratorFunction"===(e.displayName||e[r(437)]))},f[u(425)]=function(e){var r=u;return Object.setPrototypeOf?Object.setPrototypeOf(e,y):(e[r(390)]=y,o(e,n,"GeneratorFunction")),e[r(368)]=Object[r(370)](w),e},f[u(377)]=function(e){return{__await:e}},j(L[u(368)]),o(L[u(368)],t,function(){return this}),f[u(414)]=L,f.async=function(e,r,t,n,o){var i=u,a=(void 0===o&&(o=Promise),new L(c(e,r,t,n),o));return f[i(398)](r)?a:a[i(443)]().then(function(e){var r=i;return e.done?e[r(438)]:a[r(443)]()})},j(w),o(w,n,"Generator"),o(w,i,function(){return this}),o(w,u(440),function(){return"[object Generator]"}),f[u(430)]=function(e){var r,n=u,o=Object(e),i=[];for(r in o)i[n(408)](r);return i[n(356)](),function e(){for(var r=n;i[r(373)];){var t=i[r(338)]();if(t in o)return e[r(438)]=t,e[r(453)]=!1,e}return e.done=!0,e}},f[u(335)]=k,O[u(368)]={constructor:O,reset:function(e){var r=u;if(this[r(376)]=0,this[r(443)]=0,this[r(439)]=this[r(342)]=s,this[r(453)]=!1,this[r(447)]=null,this[r(374)]=r(443),this[r(449)]=s,this[r(448)][r(330)](I),!e)for(var t in this)"t"===t[r(450)](0)&&p[r(369)](this,t)&&!isNaN(+t[r(424)](1))&&(this[t]=s)},stop:function(){var e=u,r=(this.done=!0,this[e(448)][0].completion);if(e(421)===r[e(420)])throw r[e(449)];return this[e(416)]},dispatchException:function(n){var o=u;if(this[o(453)])throw n;var i=this;function e(e,r){var t=o;return a[t(420)]=t(421),a[t(449)]=n,i[t(443)]=e,r&&(i[t(374)]=t(443),i.arg=s),!!r}for(var r=this[o(448)][o(373)]-1;0<=r;--r){var t=this[o(448)][r],a=t[o(358)];if("root"===t[o(428)])return e("end");if(t.tryLoc<=this[o(376)]){var f=p[o(369)](t,o(394)),c=p[o(369)](t,o(409));if(f&&c){if(this[o(376)]<t[o(394)])return e(t[o(394)],!0);if(this[o(376)]<t[o(409)])return e(t[o(409)])}else if(f){if(this[o(376)]<t[o(394)])return e(t.catchLoc,!0)}else{if(!c)throw Error(o(406));if(this.prev<t[o(409)])return e(t[o(409)])}}}},abrupt:function(e,r){for(var t=u,n=this.tryEntries[t(373)]-1;0<=n;--n){var o=this[t(448)][n];if(o[t(428)]<=this[t(376)]&&p[t(369)](o,t(409))&&this[t(376)]<o[t(409)]){var i=o;break}}var a=(i=i&&(t(426)===e||t(433)===e)&&i.tryLoc<=r&&r<=i[t(409)]?null:i)?i[t(358)]:{};return a[t(420)]=e,a.arg=r,i?(this.method=t(443),this.next=i.finallyLoc,x):this[t(396)](a)},complete:function(e,r){var t=u;if("throw"===e[t(420)])throw e[t(449)];return"break"===e.type||t(433)===e[t(420)]?this.next=e[t(449)]:t(399)===e[t(420)]?(this[t(416)]=this[t(449)]=e[t(449)],this.method=t(399),this[t(443)]=t(411)):t(401)===e[t(420)]&&r&&(this[t(443)]=r),x},finish:function(e){for(var r=u,t=this[r(448)][r(373)]-1;0<=t;--t){var n=this[r(448)][t];if(n.finallyLoc===e)return this[r(396)](n[r(358)],n[r(405)]),I(n),x}},catch:function(e){for(var r=u,t=this[r(448)].length-1;0<=t;--t){var n,o,i=this[r(448)][t];if(i[r(428)]===e)return n=i[r(358)],r(421)===n[r(420)]&&(o=n.arg,I(i)),o}throw Error(r(336))},delegateYield:function(e,r,t){var n=u;return this[n(447)]={iterator:k(e),resultName:r,nextLoc:t},n(443)===this[n(374)]&&(this[n(449)]=s),x}},f}function asyncGeneratorStep(e,r,t,n,o,i,a){var f=_0x59d2;try{var c=e[i](a),u=c[f(438)]}catch(e){return void t(e)}c.done?r(u):Promise[f(349)](u)[f(340)](n,o)}function _asyncToGenerator(c){return function(){var e=this,f=arguments;return new Promise(function(r,t){var n=_0x59d2,o=c[n(359)](e,f);function i(e){asyncGeneratorStep(o,r,t,i,a,n(443),e)}function a(e){asyncGeneratorStep(o,r,t,i,a,n(421),e)}i(void 0)})}}(()=>{for(var e=_0x59d2,r=_0x52be();;)try{if(505471==+parseInt(e(333))+parseInt(e(434))/2+parseInt(e(455))/3*(-parseInt(e(413))/4)+-parseInt(e(348))/5*(-parseInt(e(451))/6)+-parseInt(e(361))/7*(-parseInt(e(400))/8)+parseInt(e(351))/9*(-parseInt(e(446))/10)+-parseInt(e(332))/11)break;r.push(r.shift())}catch(e){r.push(r.shift())}})();var ascf=require(_0x56f78e(442)),_require=require(_0x56f78e(364)),Command=_require[_0x56f78e(372)],pkg=require(_0x56f78e(384)),_require2=require(_0x56f78e(350)),configs=_require2.configs,program=new Command,_require3=require(_0x56f78e(435)),setLoggerConfig=_require3[_0x56f78e(422)];program[_0x56f78e(329)](pkg.version).description(_0x56f78e(365))[_0x56f78e(346)]("--debug",_0x56f78e(389)),program.command(_0x56f78e(362))[_0x56f78e(391)](_0x56f78e(334))[_0x56f78e(375)]("-i, --input <input-directory>").requiredOption("-o, --output <output-directory>")[_0x56f78e(346)](_0x56f78e(404),_0x56f78e(397))[_0x56f78e(346)]("-va, --validate",_0x56f78e(410))[_0x56f78e(346)](_0x56f78e(393),_0x56f78e(387))[_0x56f78e(346)](_0x56f78e(412),_0x56f78e(352))[_0x56f78e(423)]((()=>{var r=_0x56f78e,t=_asyncToGenerator(_regeneratorRuntime()[r(425)](function e(t){var n=r;return _regeneratorRuntime()[n(456)](function(e){for(var r=n;;)switch(e.prev=e.next){case 0:return setLoggerConfig(t[r(429)]),configs[r(432)]=!!t[r(432)],e[r(443)]=4,ascf.convert(t);case 4:case"end":return e[r(367)]()}},e)}));return function(e){return t[r(359)](this,arguments)}})()),program[_0x56f78e(418)](_0x56f78e(388))[_0x56f78e(391)](_0x56f78e(386))[_0x56f78e(346)](_0x56f78e(343),"Show build progress").option(_0x56f78e(355),_0x56f78e(344)).option(_0x56f78e(452),_0x56f78e(354)).option(_0x56f78e(404),_0x56f78e(331))[_0x56f78e(346)](_0x56f78e(444),"Run command on changes been watched")[_0x56f78e(346)](_0x56f78e(412),_0x56f78e(352))[_0x56f78e(346)](_0x56f78e(427),_0x56f78e(402)).action((()=>{var i=_0x56f78e,t=_asyncToGenerator(_regeneratorRuntime()[i(425)](function e(t,n){var o=i;return _regeneratorRuntime()[o(456)](function(e){for(var r=o;;)switch(e[r(376)]=e.next){case 0:return setLoggerConfig(n[r(429)]),e[r(443)]=3,ascf[r(341)](t,n);case 3:case r(411):return e[r(367)]()}},e)}));return function(e,r){return t[i(359)](this,arguments)}})()),program[_0x56f78e(345)](process.argv),global[_0x56f78e(371)]=program,global[_0x56f78e(347)]=!(null==(_global$_ascfCliProgr=global[_0x56f78e(371)][_0x56f78e(431)]())||!_global$_ascfCliProgr[_0x56f78e(419)]);
|
|
2
|
+
var _global$_ascfCliProgr,_0x4edc42=_0x3aed;function _typeof(e){var r=_0x3aed;return(_typeof=r(342)==typeof Symbol&&r(238)==typeof Symbol[r(270)]?function(e){return typeof e}:function(e){var t=r;return e&&t(342)==typeof Symbol&&e[t(293)]===Symbol&&e!==Symbol[t(289)]?t(238):typeof e})(e)}function _0x466c(){var e=["@@iterator","__await","-m, --mode","-r, --run [command]","completion","finallyLoc","tryLoc","displayName","asyncIterator","Clear build resource","argv","complete","_sent","opts","4872FozGZJ","pop","315917vIezeN","-i, --input <input-directory>","Run command on changes been watched","--skipApiValidator [flag]","Generator","5gKjLcW","Watch for changes","wrap","then","method","iterator","Skip API and components validator","done","length","enable debug logging","--debug","Environment is development","getPrototypeOf","tryEntries","parse","illegal catch attempt","Generator is already running","value","afterLoc","[object Generator]","apply","setLoggerConfig","11396NTNGBn","catchLoc","prototype","56494YFwBQS","prev","resolve","constructor","reset","Clear convert output path","throw","dispatchException","hasOwnProperty","setPrototypeOf","call","action","version","isGeneratorFunction","' method","ascf toolkit convert and compile ascf project","end","requiredOption","forEach","break","-w, --watch","return","228522QGuLbe","rval","2AYWeSx","description","stop","Convert miniprogram project to ascf project","_ascfCliProgram","183410iYGaEp","Not add todo for not supported api.","suspendedStart","Command","_ascfDebug","buildNpm","9TAIWKA","733812bWOHDf","--logging [level]","resultName","logging","executing","object","arg","command","GeneratorFunction","Validate path","_invoke","__proto__","-c, --clear","push","AsyncIterator","Compile ascf project","function","awrap","charAt","24ybUCVC","create","suspendedYield","reverse","711747TyYjNw","option","delegate","Control if and how source maps are generated","defineProperty","root","@@asyncIterator","@@toStringTag","convert","continue"," is not iterable","nextLoc","commander","normal","toString","symbol","next","type","iterator result is not an object","mark","Build ASCF npm dependencies to miniprogram_npm"];return(_0x466c=function(){return e})()}function _regeneratorRuntime(){var s=_0x3aed;_regeneratorRuntime=function(){return c};var f,c={},e=Object[s(289)],l=e[s(298)],d=Object[s(353)]||function(e,t,r){e[t]=r.value},t=s(342)==typeof Symbol?Symbol:{},i=t.iterator||s(244),r=t[s(252)]||s(355),n=t.toStringTag||s(230);function o(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{o({},"")}catch(e){o=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var o,i,a,c,u=s,t=t&&t[u(289)]instanceof m?t:m,t=Object[u(346)](t[u(289)]),n=new I(n||[]);return d(t,u(336),{value:(o=e,i=r,a=n,c=h,function(e,t){var r=_0x3aed;if(c===g)throw Error(r(281));if(c===v){if("throw"===e)throw t;return{value:f,done:!0}}for(a[r(269)]=e,a[r(332)]=t;;){var n=a[r(351)];if(n){n=function e(t,r){var n=s,o=r[n(269)],i=t[n(270)][o];if(i===f)return r.delegate=null,"throw"===o&&t[n(270)][n(311)]&&(r.method=n(311),r[n(332)]=f,e(t,r),n(296)===r[n(269)])||n(311)!==o&&(r[n(269)]=n(296),r[n(332)]=new TypeError("The iterator does not provide a '"+o+n(304))),x;o=p(i,t[n(270)],r[n(332)]);if("throw"===o[n(240)])return r[n(269)]=n(296),r[n(332)]=o[n(332)],r.delegate=null,x;i=o[n(332)];return i?i[n(272)]?(r[t[n(328)]]=i.value,r[n(239)]=t[n(234)],n(311)!==r[n(269)]&&(r[n(269)]=n(239),r[n(332)]=f),r[n(351)]=null,x):i:(r[n(269)]=n(296),r.arg=new TypeError(n(241)),r.delegate=null,x)}(n,a);if(n){if(n===x)continue;return n}}if(r(239)===a[r(269)])a.sent=a[r(256)]=a.arg;else if(r(296)===a[r(269)]){if(c===h)throw c=v,a[r(332)];a[r(297)](a.arg)}else r(311)===a[r(269)]&&a.abrupt("return",a[r(332)]);c=g;n=p(o,i,a);if(r(236)===n.type){if(c=a[r(272)]?v:_,n[r(332)]===x)continue;return{value:n.arg,done:a[r(272)]}}r(296)===n.type&&(c=v,a[r(269)]="throw",a.arg=n.arg)}})}),t}function p(e,t,r){var n=s;try{return{type:n(236),arg:e[n(300)](t,r)}}catch(e){return{type:n(296),arg:e}}}c[s(267)]=u;var h=s(321),_=s(347),g=s(330),v="completed",x={};function m(){}function a(){}function y(){}var t={},b=(o(t,i,function(){return this}),Object[s(277)]),b=b&&b(b(G([]))),w=(b&&b!==e&&l[s(300)](b,i)&&(t=b),y[s(289)]=m.prototype=Object.create(t));function j(e){var t=s;[t(239),t(296),t(311)][t(308)](function(t){o(e,t,function(e){return this[_0x3aed(336)](t,e)})})}function L(c,u){var t,o=s;d(this,o(336),{value:function(r,n){function e(){return new u(function(e,t){!function t(e,r,n,o){var i,a=_0x3aed,e=p(c[e],c,r);if("throw"!==e[a(240)])return(r=(i=e[a(332)]).value)&&a(331)==_typeof(r)&&l[a(300)](r,a(245))?u.resolve(r[a(245)])[a(268)](function(e){t("next",e,n,o)},function(e){t(a(296),e,n,o)}):u[a(292)](r)[a(268)](function(e){i[a(282)]=e,n(i)},function(e){return t("throw",e,n,o)});o(e[a(332)])}(r,n,e,t)})}return t=t?t[o(268)](e,e):e()}})}function S(e){var t=s,r={tryLoc:e[0]};1 in e&&(r[t(288)]=e[1]),2 in e&&(r[t(249)]=e[2],r.afterLoc=e[3]),this[t(278)][t(339)](r)}function C(e){var t=s,r=e[t(248)]||{};r.type=t(236),delete r[t(332)],e.completion=r}function I(e){var t=s;this[t(278)]=[{tryLoc:t(354)}],e.forEach(S,this),this[t(294)](!0)}function G(r){var n=s;if(r||""===r){var o,e=r[i];if(e)return e[n(300)](r);if(n(342)==typeof r[n(239)])return r;if(!isNaN(r.length))return o=-1,(e=function e(){for(var t=n;++o<r.length;)if(l[t(300)](r,o))return e[t(282)]=r[o],e[t(272)]=!1,e;return e[t(282)]=f,e[t(272)]=!0,e})[n(239)]=e}throw new TypeError(_typeof(r)+n(233))}return a.prototype=y,d(w,s(293),{value:y,configurable:!0}),d(y,s(293),{value:a,configurable:!0}),a[s(251)]=o(y,n,s(334)),c[s(303)]=function(e){var t=s,e=t(342)==typeof e&&e.constructor;return!!e&&(e===a||t(334)===(e[t(251)]||e.name))},c[s(242)]=function(e){var t=s;return Object[t(299)]?Object.setPrototypeOf(e,y):(e[t(337)]=y,o(e,n,t(334))),e.prototype=Object[t(346)](w),e},c[s(343)]=function(e){return{__await:e}},j(L[s(289)]),o(L[s(289)],r,function(){return this}),c[s(340)]=L,c.async=function(e,t,r,n,o){var i=s,a=(void 0===o&&(o=Promise),new L(u(e,t,r,n),o));return c[i(303)](t)?a:a[i(239)]()[i(268)](function(e){var t=i;return e[t(272)]?e[t(282)]:a[t(239)]()})},j(w),o(w,n,s(264)),o(w,i,function(){return this}),o(w,s(237),function(){return s(284)}),c.keys=function(e){var t,n=s,o=Object(e),i=[];for(t in o)i.push(t);return i[n(348)](),function e(){for(var t=n;i.length;){var r=i[t(259)]();if(r in o)return e.value=r,e[t(272)]=!1,e}return e[t(272)]=!0,e}},c.values=G,I[s(289)]={constructor:I,reset:function(e){var t=s;if(this[t(291)]=0,this[t(239)]=0,this.sent=this[t(256)]=f,this[t(272)]=!1,this[t(351)]=null,this.method="next",this[t(332)]=f,this.tryEntries[t(308)](C),!e)for(var r in this)"t"===r[t(344)](0)&&l[t(300)](this,r)&&!isNaN(+r.slice(1))&&(this[r]=f)},stop:function(){var e=s,t=(this[e(272)]=!0,this[e(278)][0][e(248)]);if(e(296)===t[e(240)])throw t[e(332)];return this.rval},dispatchException:function(n){var o=s;if(this[o(272)])throw n;var i=this;function e(e,t){var r=o;return a.type=r(296),a[r(332)]=n,i[r(239)]=e,t&&(i[r(269)]="next",i[r(332)]=f),!!t}for(var t=this[o(278)][o(273)]-1;0<=t;--t){var r=this[o(278)][t],a=r[o(248)];if(o(354)===r[o(250)])return e(o(306));if(r[o(250)]<=this[o(291)]){var c=l[o(300)](r,o(288)),u=l[o(300)](r,"finallyLoc");if(c&&u){if(this[o(291)]<r[o(288)])return e(r[o(288)],!0);if(this[o(291)]<r.finallyLoc)return e(r.finallyLoc)}else if(c){if(this[o(291)]<r[o(288)])return e(r[o(288)],!0)}else{if(!u)throw Error("try statement without catch or finally");if(this[o(291)]<r[o(249)])return e(r[o(249)])}}}},abrupt:function(e,t){for(var r=s,n=this[r(278)][r(273)]-1;0<=n;--n){var o=this[r(278)][n];if(o[r(250)]<=this.prev&&l[r(300)](o,r(249))&&this[r(291)]<o.finallyLoc){var i=o;break}}var a=(i=i&&("break"===e||r(232)===e)&&i.tryLoc<=t&&t<=i[r(249)]?null:i)?i[r(248)]:{};return a[r(240)]=e,a.arg=t,i?(this[r(269)]=r(239),this[r(239)]=i[r(249)],x):this[r(255)](a)},complete:function(e,t){var r=s;if(r(296)===e[r(240)])throw e[r(332)];return r(309)===e[r(240)]||r(232)===e[r(240)]?this.next=e[r(332)]:"return"===e[r(240)]?(this[r(313)]=this[r(332)]=e.arg,this.method=r(311),this[r(239)]=r(306)):"normal"===e[r(240)]&&t&&(this.next=t),x},finish:function(e){for(var t=s,r=this[t(278)][t(273)]-1;0<=r;--r){var n=this[t(278)][r];if(n.finallyLoc===e)return this.complete(n[t(248)],n[t(283)]),C(n),x}},catch:function(e){for(var t=s,r=this[t(278)].length-1;0<=r;--r){var n,o,i=this[t(278)][r];if(i.tryLoc===e)return"throw"===(n=i[t(248)]).type&&(o=n.arg,C(i)),o}throw Error(t(280))},delegateYield:function(e,t,r){var n=s;return this[n(351)]={iterator:G(e),resultName:t,nextLoc:r},n(239)===this[n(269)]&&(this.arg=f),x}},c}function asyncGeneratorStep(e,t,r,n,o,i,a){var c=_0x3aed;try{var u=e[i](a),s=u[c(282)]}catch(e){return void r(e)}u[c(272)]?t(s):Promise[c(292)](s)[c(268)](n,o)}function _0x3aed(e,t){var r=_0x466c();return(_0x3aed=function(e,t){return r[e-=230]})(e,t)}function _asyncToGenerator(u){return function(){var e=this,c=arguments;return new Promise(function(t,r){var n=_0x3aed,o=u[n(285)](e,c);function i(e){asyncGeneratorStep(o,t,r,i,a,n(239),e)}function a(e){asyncGeneratorStep(o,t,r,i,a,n(296),e)}i(void 0)})}}(()=>{for(var e=_0x3aed,t=_0x466c();;)try{if(135373==+parseInt(e(314))*(parseInt(e(290))/2)+-parseInt(e(349))/3+-parseInt(e(326))/4+-parseInt(e(265))/5*(parseInt(e(312))/6)+-parseInt(e(260))/7*(-parseInt(e(345))/8)+parseInt(e(325))/9*(-parseInt(e(319))/10)+parseInt(e(287))/11*(parseInt(e(258))/12))break;t.push(t.shift())}catch(e){t.push(t.shift())}})();var ascf=require("../index"),_require=require(_0x4edc42(235)),Command=_require[_0x4edc42(322)],pkg=require("../../package.json"),program=new Command,_require2=require("../common/log4js.js"),setLoggerConfig=_require2[_0x4edc42(286)];program.version(pkg[_0x4edc42(302)])[_0x4edc42(315)](_0x4edc42(305))[_0x4edc42(350)](_0x4edc42(275),_0x4edc42(274)),program[_0x4edc42(333)]("buildNpm <projectRoot>")[_0x4edc42(315)](_0x4edc42(243)).action((()=>{var r=_0x4edc42,n=_asyncToGenerator(_regeneratorRuntime()[r(242)](function e(r,n){return _regeneratorRuntime().wrap(function(e){for(var t=_0x3aed;;)switch(e[t(291)]=e.next){case 0:setLoggerConfig(n[t(329)]),ascf[t(324)](r);case 2:case t(306):return e[t(316)]()}},e)}));return function(e,t){return n[r(285)](this,arguments)}})()),program[_0x4edc42(333)](_0x4edc42(231)).description(_0x4edc42(317))[_0x4edc42(307)](_0x4edc42(261))[_0x4edc42(307)]("-o, --output <output-directory>")[_0x4edc42(350)]("-c, --clear",_0x4edc42(295))[_0x4edc42(350)]("-va, --validate",_0x4edc42(335))[_0x4edc42(350)]("-notaddtodo, --notaddtodo",_0x4edc42(320)).option(_0x4edc42(327),"Setting the log level")[_0x4edc42(301)]((()=>{var t=_0x4edc42,r=_asyncToGenerator(_regeneratorRuntime()[t(242)](function e(r){var n=t;return _regeneratorRuntime()[n(267)](function(e){for(var t=n;;)switch(e.prev=e[t(239)]){case 0:return setLoggerConfig(r.logging),e[t(239)]=3,ascf.convert(r);case 3:case t(306):return e[t(316)]()}},e)}));return function(e){return r.apply(this,arguments)}})()),program.command("compile <projectRoot>")[_0x4edc42(315)](_0x4edc42(341))[_0x4edc42(350)]("-p, --progress","Show build progress")[_0x4edc42(350)](_0x4edc42(310),_0x4edc42(266))[_0x4edc42(350)](_0x4edc42(246),_0x4edc42(276))[_0x4edc42(350)](_0x4edc42(338),_0x4edc42(253)).option(_0x4edc42(247),_0x4edc42(262))[_0x4edc42(350)](_0x4edc42(327),"Setting the log level")[_0x4edc42(350)]("--swc","Use swc parser")[_0x4edc42(350)]("--devtool [type]",_0x4edc42(352))[_0x4edc42(350)]("--templateHoist","Hoist template to page scope")[_0x4edc42(350)](_0x4edc42(263),_0x4edc42(271)).action((()=>{var i=_0x4edc42,r=_asyncToGenerator(_regeneratorRuntime()[i(242)](function e(r,n){var o=i;return _regeneratorRuntime()[o(267)](function(e){for(var t=o;;)switch(e[t(291)]=e[t(239)]){case 0:return setLoggerConfig(n.logging),e[t(239)]=3,ascf.compile(r,n);case 3:case"end":return e[t(316)]()}},e)}));return function(e,t){return r[i(285)](this,arguments)}})()),program[_0x4edc42(279)](process[_0x4edc42(254)]),global[_0x4edc42(318)]=program,global[_0x4edc42(323)]=!(null==(_global$_ascfCliProgr=global[_0x4edc42(318)][_0x4edc42(257)]())||!_global$_ascfCliProgr.debug);
|
package/lib/common/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x8ae3d8=_0x1456;function _0x1dbd(){var e=["660LndATG","label","3816776ZHmMEg","checkbox-group","configs","radio","2556533plliTS","icon","video","6vKhRZc","612027NaXUPH","9tAHCBf","picker-view","button","swiper-item","1801640WDSUqF","movable-area","canvas","switch","651088gdEcRx","text","babel","slider","web-view","picker","28364NSOSwM","camera","checkbox","view","navigator","158030PnjUfI","movable-view","Map","image","scroll-view","swiper","form","rich-text","9KyCKNJ"];return(_0x1dbd=function(){return e})()}function _0x1456(e,a){var r=_0x1dbd();return(_0x1456=function(e,a){return r[e-=217]})(e,a)}(()=>{for(var e=_0x1456,a=_0x1dbd();;)try{if(239955==-parseInt(e(232))*(-parseInt(e(219))/2)+parseInt(e(243))/3+parseInt(e(252))/4+-parseInt(e(248))/5+parseInt(e(242))/6*(-parseInt(e(239))/7)+parseInt(e(235))/8*(-parseInt(e(244))/9)+-parseInt(e(224))/10*(-parseInt(e(233))/11))break;a.push(a.shift())}catch(e){a.push(a.shift())}})();var configs={notaddtodo:!1,parser:_0x8ae3d8(254),devtool:void 0,componentList:[_0x8ae3d8(249),_0x8ae3d8(225),_0x8ae3d8(228),_0x8ae3d8(229),_0x8ae3d8(247),_0x8ae3d8(222),_0x8ae3d8(240),"progress",_0x8ae3d8(231),_0x8ae3d8(253),_0x8ae3d8(246),_0x8ae3d8(221),_0x8ae3d8(236),_0x8ae3d8(230),"input",_0x8ae3d8(234),_0x8ae3d8(218),_0x8ae3d8(245),"picker-view-column",_0x8ae3d8(238),"radio-group",_0x8ae3d8(255),_0x8ae3d8(251),"textarea",_0x8ae3d8(223),_0x8ae3d8(227),_0x8ae3d8(241),_0x8ae3d8(220),_0x8ae3d8(226),_0x8ae3d8(250),_0x8ae3d8(217)],templateHoist:!1,ascfLazyImportFiles:{},skipApiValidator:!0};exports[_0x8ae3d8(237)]=configs;
|
package/lib/common/log4js.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var _0x536a28=_0x105b;function _typeof(e){var t=_0x105b;return(_typeof=t(166)==typeof Symbol&&t(131)==typeof Symbol[t(168)]?function(e){return typeof e}:function(e){var r=t;return e&&r(166)==typeof Symbol&&e.constructor===Symbol&&e!==Symbol[r(153)]?r(131):typeof e})(e)}function _0x105b(e,r){var t=_0x5b88();return(_0x105b=function(e,r){return t[e-=116]})(e,r)}function _classCallCheck(e,r){if(!(e instanceof r))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,r){for(var t=_0x105b,a=0;a<r[t(117)];a++){var o=r[a];o[t(157)]=o.enumerable||!1,o.configurable=!0,t(123)in o&&(o[t(124)]=!0),Object.defineProperty(e,_toPropertyKey(o[t(134)]),o)}}function _createClass(e,r,t){var a=_0x105b;return r&&_defineProperties(e[a(153)],r),t&&_defineProperties(e,t),Object[a(121)](e,a(153),{writable:!1}),e}function _toPropertyKey(e){var r=_0x105b,e=_toPrimitive(e,r(119));return r(131)==_typeof(e)?e:e+""}function _toPrimitive(e,r){var t=_0x105b;if("object"!=_typeof(e)||!e)return e;var a=e[Symbol[t(128)]];if(void 0===a)return(t(119)===r?String:Number)(e);a=a.call(e,r||t(160));if(t(154)!=_typeof(a))return a;throw new TypeError(t(151))}(()=>{for(var e=_0x105b,r=_0x5b88();;)try{if(982174==+parseInt(e(143))*(parseInt(e(133))/2)+parseInt(e(156))/3+-parseInt(e(139))/4*(parseInt(e(144))/5)+-parseInt(e(165))/6+parseInt(e(142))/7*(parseInt(e(127))/8)+parseInt(e(129))/9*(-parseInt(e(132))/10)+parseInt(e(158))/11*(parseInt(e(161))/12))break;r.push(r.shift())}catch(e){r.push(r.shift())}})();var log4js=require(_0x536a28(116)),path=require(_0x536a28(140)),levelArr=[_0x536a28(118),_0x536a28(141),_0x536a28(167),_0x536a28(169),_0x536a28(163)],cachedir=require(_0x536a28(135)),ASCF_LOG_FILE=path[_0x536a28(120)](cachedir(_0x536a28(146)),_0x536a28(125)),ASCF_TOOLKIT=_0x536a28(162);function setLoggerConfig(e){var r=_0x536a28,e=getLevel(e);log4js[r(164)]({appenders:{default:{type:r(148),layout:{type:r(137),pattern:r(138)}},"debug-log-file":{type:"fileSync",filename:path[r(120)](cachedir(r(146)),r(125)),maxLogSize:10485760,backups:9,layout:{type:"pattern",pattern:r(150)}}},categories:{default:{appenders:[r(160)],level:e},AscfToolkit:{appenders:[r(122)],level:r(118)}}})}function getLevel(e){var r=_0x536a28;return e&&levelArr[r(147)](e[r(149)]())?e[r(149)]():r(141)}function _0x5b88(){var e=["key","cachedir","categories","pattern","> ascf-toolkit %p %c %[%m%]","5484aThQRc","path","info","6031382HvPwDH","4307bsLZLc","4915KkGOmV","setLoggerConfig","ascf-cache","includes","stdout","toLowerCase","%d{yyyy-MM-dd hh:mm:ss.SSS} > ascf-toolkit %p %c %m","@@toPrimitive must return a primitive value.","exit","prototype","object","getLogger","3213048LWQUnP","enumerable","6863109jJIaec","apply","default","48MkOdud","AscfToolkit","fatal","configure","6643494qzVQwL","function","warn","iterator","error","log4js","length","debug","string","resolve","defineProperty","debug-log-file","value","writable","build.log","concat","8BBpAVE","toPrimitive","9oROFqH","exports","symbol","13056130GrvJgP","146AFlgvC"];return(_0x5b88=function(){return e})()}var Logger=(()=>{var l=_0x536a28;return _createClass(function e(r){var t=_0x105b;_classCallCheck(this,e),this[t(136)]=r},[{key:"debug",value:function(e){for(var r=_0x105b,t=log4js[r(155)](this.categories),a=log4js[r(155)](ASCF_TOOLKIT),o=arguments.length,n=new Array(1<o?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];t[r(118)][r(159)](t,[e][r(126)](n)),a[r(118)][r(159)](a,[e].concat(n))}},{key:l(141),value:function(e){for(var r=l,t=log4js[r(155)](this[r(136)]),a=log4js[r(155)](ASCF_TOOLKIT),o=arguments[r(117)],n=new Array(1<o?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];t[r(141)][r(159)](t,[e][r(126)](n)),a.info.apply(a,[e][r(126)](n))}},{key:l(167),value:function(e){for(var r=l,t=log4js[r(155)](this[r(136)]),a=log4js[r(155)](ASCF_TOOLKIT),o=arguments[r(117)],n=new Array(1<o?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];t[r(167)][r(159)](t,[e][r(126)](n)),a.warn[r(159)](a,[e][r(126)](n))}},{key:l(169),value:function(e){for(var r=l,t=log4js[r(155)](this[r(136)]),a=log4js[r(155)](ASCF_TOOLKIT),o=arguments[r(117)],n=new Array(1<o?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];t[r(169)].apply(t,[e][r(126)](n)),a[r(169)].apply(a,[e][r(126)](n))}},{key:l(163),value:function(e){for(var r=l,t=log4js.getLogger(this.categories),a=log4js[r(155)](ASCF_TOOLKIT),o=arguments[r(117)],n=new Array(1<o?o-1:0),i=1;i<o;i++)n[i-1]=arguments[i];t[r(163)].apply(t,[e][r(126)](n)),a[r(163)][r(159)](a,[e][r(126)](n)),process[r(152)](1)}}])})();function getLogger(e){return new Logger(e)}module.exports={getLogger:getLogger,ASCF_LOG_FILE:ASCF_LOG_FILE},module[_0x536a28(130)][_0x536a28(145)]=setLoggerConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x4e0eda=_0x28c5;function _typeof(r){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){var e=_0x28c5;return r&&e(502)==typeof Symbol&&r[e(490)]===Symbol&&r!==Symbol[e(562)]?"symbol":typeof r})(r)}function _classCallCheck(r,e){var t=_0x28c5;if(!(r instanceof e))throw new TypeError(t(521))}function _defineProperties(r,e){for(var t=_0x28c5,n=0;n<e[t(545)];n++){var o=e[n];o[t(538)]=o[t(538)]||!1,o[t(569)]=!0,t(567)in o&&(o[t(517)]=!0),Object[t(505)](r,_toPropertyKey(o[t(519)]),o)}}function _createClass(r,e,t){var n=_0x28c5;return e&&_defineProperties(r[n(562)],e),t&&_defineProperties(r,t),Object[n(505)](r,n(562),{writable:!1}),r}function _toPropertyKey(r){var e=_0x28c5,r=_toPrimitive(r,e(559));return e(497)==_typeof(r)?r:r+""}function _toPrimitive(r,e){var t=_0x28c5;if("object"!=_typeof(r)||!r)return r;var n=r[Symbol[t(499)]];if(void 0===n)return("string"===e?String:Number)(r);n=n[t(550)](r,e||t(536));if(t(533)!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}function _toConsumableArray(r){return _arrayWithoutHoles(r)||_iterableToArray(r)||_unsupportedIterableToArray(r)||_nonIterableSpread()}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,e){var t,n=_0x28c5;if(r)return n(559)==typeof r?_arrayLikeToArray(r,e):("Object"===(t={}[n(578)][n(550)](r).slice(8,-1))&&r[n(490)]&&(t=r[n(490)][n(515)]),n(498)===t||n(535)===t?Array[n(532)](r):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[n(547)](t)?_arrayLikeToArray(r,e):void 0)}function _iterableToArray(r){var e=_0x28c5;if(e(554)!=typeof Symbol&&null!=r[Symbol[e(514)]]||null!=r[e(584)])return Array[e(532)](r)}function _arrayWithoutHoles(r){if(Array[_0x28c5(495)](r))return _arrayLikeToArray(r)}function _arrayLikeToArray(r,e){var t=_0x28c5;(null==e||e>r.length)&&(e=r[t(545)]);for(var n=0,o=Array(e);n<e;n++)o[n]=r[n];return o}(()=>{for(var r=_0x28c5,e=_0x15fd();;)try{if(502398==+parseInt(r(542))*(-parseInt(r(590))/2)+parseInt(r(561))/3*(parseInt(r(522))/4)+-parseInt(r(523))/5*(parseInt(r(588))/6)+parseInt(r(556))/7*(-parseInt(r(491))/8)+parseInt(r(577))/9*(parseInt(r(531))/10)+-parseInt(r(552))/11*(-parseInt(r(570))/12)+parseInt(r(580))/13)break;e.push(e.shift())}catch(r){e.push(e.shift())}})();var TYPE=_0x4e0eda(504),log4js=require(_0x4e0eda(553)),logger=log4js[_0x4e0eda(546)](_0x4e0eda(516));function defaultFormatter(r,e){var n=_0x4e0eda;return r[n(513)](function(r,e){var t=n;return[].concat(_toConsumableArray(r),["\n"[t(541)](e.message)])},[])}function babelSyntaxError(r){var e=_0x4e0eda;return isBabelSyntaxError(r)&&(r[e(589)]=cleanStackTrace(r[e(589)])),r}function _0x15fd(){var r=["message","1304234PSYocV","constructor","19248jMBMSh","calculate","FAIL ","warningCount","isArray","endTime","symbol","Map","toPrimitive","\n@ ","SUCCESS ","function","stringify","Module not found","defineProperty","options"," ms","printCompileResult","startTime","done","hasWarnings","showCompileTime","reduce","iterator","name","logger-plugin","writable","some","key","getTime","Cannot call a class as a function","327556erDgyR","3092875WFBchT","formatters","BuildLogOutputPlugin","fatal","forEach","env","includes","error","670XbcMwj","from","object","hasErrors","Set","default","info","enumerable","ModuleBuildError","replace","concat","1fhZbuK","warning","transformers","length","getLogger","test","\n\nYou can check full log: ","Error: ","call","dropRepeat","10027831sUBlet","./log4js.js","undefined","errorCount","1778Htdszr","warnings","errors","string","\nCOMPILE RESULT:","9UYqUmX","prototype","warn","origin","compilation","ERROR: ","value","noteCount","configurable","12WECOQg","compileTime: ","round","resource","file","ASCF_LOG_FILE","displayErrors","84681GCdwXB","toString","assign","7754799yFOwBT","apply","warnCount","\nCOMPILE RESULT:SUCCESS","@@iterator","showtime","SyntaxError","map","6ERhuqr"];return(_0x15fd=function(){return r})()}function isBabelSyntaxError(r){var e=_0x4e0eda;return r[e(515)]===e(539)&&r.message.includes(e(586))}function cleanStackTrace(r){var e=_0x4e0eda;return r[e(540)](/^\s*at\s.*:\d+:\d+[\s\)]*\n/gm,"").replace(/^Module build failed.*:\s/,e(549))}function moduleNotFoundError(r){var e,t=_0x4e0eda;return"ModuleNotFoundError"===r[t(515)]&&r[t(589)][t(529)](TYPE)&&(r[t(589)]=r.message.replace(TYPE,t(566).concat(TYPE)),e=r.origin&&r[t(564)][t(573)])&&(r[t(589)]+=t(500).concat(e)),r}var defaultFormatters=[defaultFormatter],defaultTransformers=[babelSyntaxError,moduleNotFoundError];function extractError(r){var e=_0x4e0eda;return{message:r[e(589)],file:r[e(574)],origin:r[e(564)],name:r.name,severity:0,webpackError:r}}function cleanMessage(r){var e=_0x4e0eda;return r[e(540)]("(Emitted value instead of an instance of Error) ","").replace(/Module Warning[^\n]+\n/,"")[e(540)](/Module Error[^\n]+\n/,"")}function transformErrors(r,e){function t(r,e){return e(r)}var n=_0x4e0eda;return r[n(587)](extractError)[n(587)](function(r){return e[_0x28c5(513)](t,r)})}function formatErrors(e,r,t){var n=_0x4e0eda;return r[n(587)](function(r){return r(e,t)||[]})[n(513)](function(r,e){return r[_0x28c5(541)](e)},[])}function _0x28c5(r,e){var t=_0x15fd();return(_0x28c5=function(r,e){return t[r-=490]})(r,e)}function getCompileTime(r){var e=_0x4e0eda,t=r[e(496)],r=r[e(509)];logger[e(537)](e(571).concat(t-r,e(507)))}function _dropRepeat(r){var e=_0x4e0eda;return r[e(513)](function(r,t){var n=e;return r[n(518)](function(r){var e=n;return r[e(589)]===t[e(589)]})?r:r[n(541)](t)},[])}var BuildLogOutputPlugin=(()=>{var c=_0x4e0eda;return _createClass(function r(){var e=_0x28c5,t=0<arguments[e(545)]&&void 0!==arguments[0]?arguments[0]:{},n=t.showCompileTime,n=void 0!==n&&n,t=t[e(506)];_classCallCheck(this,r),this[e(555)]=0,this[e(494)]=0,this[e(568)]=0,this[e(512)]=n||"true"===process[e(528)][e(585)],this[e(524)]=defaultFormatters,this[e(544)]=defaultTransformers,this[e(506)]=t},[{key:c(581),value:function(r){var u=c,s=this;r.hooks[u(510)].tap(u(525),function(e){var t=u,r=(s[t(551)](e),e[t(565)]),n=r[t(558)],o=r[t(557)],a=e[t(534)](),i=e[t(511)]();setTimeout(function(){var r=t;a&&s[r(576)](n,"error"),i&&s[r(576)](o,r(543)),s[r(492)](e,n,o),s[r(508)](),s.showCompileTime&&getCompileTime(e)})})}},{key:"dropRepeat",value:function(r){var e=c;r[e(565)][e(557)]=_dropRepeat(r.compilation[e(557)]),r.compilation[e(558)]=_dropRepeat(r[e(565)][e(558)])}},{key:c(492),value:function(r,e){var t=c,n=this,o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],r=r[t(565)].extraInfo||{},a=r[t(555)],a=void 0===a?0:a,i=r[t(582)],i=void 0===i?0:i,r=r[t(568)],r=void 0===r?0:r;this[t(555)]=e.length+a,this[t(494)]=i,this[t(568)]=r,o[t(527)](function(r){var e=t,r=r[e(589)];/^NOTE:/[e(547)](cleanMessage(r))?n.noteCount++:n[e(494)]++})}},{key:c(508),value:function(){var r,e=c,t=this[e(555)],n=this[e(494)],o=this[e(568)],a=(new Date)[e(520)]()-global.beginTime,a=", elapsed: "+Math[e(572)](a/1e3)+"s"+e(548)+log4js[e(575)];0<t+n+o?(r=e(t?493:501),n=Object[e(579)]({},t?{ERROR:t}:{},n?{WARN:n}:{},o?{NOTE:o}:{}),t?logger[e(526)](e(560)[e(541)](r).concat(JSON[e(503)](n))+a):logger[e(563)](e(560)[e(541)](r).concat(JSON.stringify(n))+a)):logger.info(e(583)+a)}},{key:c(576),value:function(r,t){formatErrors(transformErrors(r,this.transformers),this.formatters,t).forEach(function(r){var e=_0x28c5;t===e(530)&&logger[e(530)](cleanMessage(r)),t===e(543)&&logger[e(563)](cleanMessage(r))})}},{key:"getBuildMsg",value:function(r,e){var t=c;return formatErrors(transformErrors(r,this[t(544)]),this[t(524)],e).map(function(r){return cleanMessage(r)})}}])})();module.exports=BuildLogOutputPlugin;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var _0x556b66=_0x3dab;function _0x29c9(){var r=["19436oQVMhe","881896GpMJqG","value","node","20QuWtmm","splice","21463570eJVNBt","directives","9QbnoXo","49ENPGPm","6621756hNTAfZ","987888BJgctC","3421227vQumrt","9578781YMsaPN","exports"];return(_0x29c9=function(){return r})()}function _0x3dab(r,t){var n=_0x29c9();return(_0x3dab=function(r,t){return n[r-=297]})(r,t)}(()=>{for(var r=_0x3dab,t=_0x29c9();;)try{if(626820==+parseInt(r(297))*(-parseInt(r(304))/2)+parseInt(r(301))/3+-parseInt(r(300))/4*(-parseInt(r(308))/5)+-parseInt(r(299))/6+parseInt(r(298))/7*(parseInt(r(305))/8)+parseInt(r(302))/9+-parseInt(r(310))/10)break;t.push(t.shift())}catch(r){t.push(t.shift())}})(),module[_0x556b66(303)]=function(){return{visitor:{Program:{exit:function(r){for(var t=_0x3dab,n=r[t(307)][t(311)],e=n.length-1;0<=e;e--)"use strict"===n[e].value[t(306)]&&n[t(309)](e,1)}}}}};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _0x38e375=_0x5f2b;function _0x5f2b(e,r){var t=_0x3eff();return(_0x5f2b=function(e,r){return t[e-=245]})(e,r)}function _0x3eff(){var e=["572700SkJPCK","677763utNnhH","\\$&","replaceAll","120016lOofBv","20tGNBeJ","10073obfQgR","16429TPkFQe","3944730kcNlZt","replace","1038RXpMqB","189RmleMX","91AJvfms","33055BIvMDy","11tkzSUX","38CwfTtf"];return(_0x3eff=function(){return e})()}(()=>{for(var e=_0x5f2b,r=_0x3eff();;)try{if(232866==+parseInt(e(260))*(parseInt(e(253))/2)+parseInt(e(255))/3+-parseInt(e(259))/4*(parseInt(e(251))/5)+-parseInt(e(248))/6*(parseInt(e(245))/7)+parseInt(e(258))/8*(parseInt(e(249))/9)+-parseInt(e(246))/10*(parseInt(e(252))/11)+-parseInt(e(254))/12*(-parseInt(e(250))/13))break;r.push(r.shift())}catch(e){r.push(r.shift())}})(),exports[_0x38e375(257)]=function(e,r,t){var n=_0x38e375;return String.prototype[n(257)]?null==e?void 0:e[n(257)](r,t):(r=r.replace(/[.*+?^${}()|[\]\\]/g,n(256)),r=new RegExp(r,"g"),null==e?void 0:e[n(247)](r,t))};
|
package/lib/common/utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _ref,_process$env$NODE_ENV,_0x135d84=_0x9ffc;function _0x5256(){var r=["PROJECT_CONFIG","join","ascf","includes","startsWith","IS_PRD","readdirSync","TOOLKIT_PATH","production","resolve","parse json file error at ","number","[object Object]","modules","string","176XBQAxp","PROJECT_PATH","readFileSync","2028644wlpATN","apply","release","isFile","2101590xmfsNw","platform","path","ASCF_BUILD_PATH","darwin","utf-8","@@iterator","endsWith","map","slice","397983hvNBlx","ascf_build","iterator","true","ERROR: Write JSON file failed: ",".hxml","fatal","src/main/resources/rawfile","done","json5","ascfRoot","./log4js.js","2504620tqMqYG","cwd","next","forEach","shift","writeJsonFile","getEntryPkgPath error, build-profile.json5 file modules is null","1698DnLJiq","stringify","Arguments","call","sync","mkdirSync","constructor","mode","existsSync","isArray","concat","return","Set","761989PfZWMh","_versionType","find Hxml error:","value","length","20rLhqwl","uglifyjs","getLogger","keys","env","projectRoot","hasHxml","parse","isDirectory","toString","4501oLEFfk","undefined","Moving files error:","writeFileSync","ascf.config.json","handleResolveAlias","getEntryPkgPath","169110eNUVlF","node_modules","ascf_src","name","sort","error","moveFiles","test","replace","debug"];return(_0x5256=function(){return r})()}function _createForOfIteratorHelper(r,e){var t,o,n,a,s=_0x9ffc,i=s(146)!=typeof Symbol&&r[Symbol[s(196)]]||r[s(190)];if(i)return n=!(o=!0),{s:function(){i=i[s(120)](r)},n:function(){var r=s,e=i[r(112)]();return o=e[r(202)],e},e:function(r){n=!0,t=r},f:function(){var r=s;try{o||null==i.return||i[r(128)]()}finally{if(n)throw t}}};if(Array[s(126)](r)||(i=_unsupportedIterableToArray(r))||e&&r&&s(173)==typeof r[s(134)])return i&&(r=i),a=0,{s:e=function(){},n:function(){return a>=r[s(134)]?{done:!0}:{done:!1,value:r[a++]}},e:function(r){throw r},f:e};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(r,e){var t,o=_0x9ffc;if(r)return o(176)==typeof r?_arrayLikeToArray(r,e):"Map"===(t="Object"===(t={}[o(144)][o(120)](r)[o(193)](8,-1))&&r[o(123)]?r.constructor[o(155)]:t)||o(129)===t?Array.from(r):o(119)===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[o(159)](t)?_arrayLikeToArray(r,e):void 0}function _arrayLikeToArray(r,e){var t=_0x9ffc;(null==e||e>r.length)&&(e=r[t(134)]);for(var o=0,n=Array(e);o<e;o++)n[o]=r[o];return n}(()=>{for(var r=_0x9ffc,e=_0x5256();;)try{if(531522==-parseInt(r(130))+parseInt(r(180))/2+parseInt(r(194))/3*(-parseInt(r(135))/4)+parseInt(r(110))/5+parseInt(r(117))/6*(-parseInt(r(145))/7)+-parseInt(r(177))/8*(-parseInt(r(152))/9)+parseInt(r(184))/10)break;e.push(e.shift())}catch(r){e.push(e.shift())}})();var rimraf=require("rimraf"),fs=require("fs"),path=require(_0x135d84(186)),JSON5=require(_0x135d84(203)),os=require("os"),log4js=require(_0x135d84(109)),logger=log4js[_0x135d84(137)]("common-utils"),projectPath=process[_0x135d84(139)][_0x135d84(140)]||process[_0x135d84(111)](),projectCfg=readProjectCfgJson(projectPath)||{},srcPath=path[_0x135d84(171)](projectPath,"ascf/ascf_src"),ascfSrcPath=projectCfg[_0x135d84(204)]?path[_0x135d84(171)](srcPath,projectCfg[_0x135d84(204)]):srcPath;function readJsonFile(e){var t=_0x135d84;if(!fs[t(125)](e))return{};var r={};try{r=JSON5[t(142)](fs[t(179)](e,t(189)).toString()||"{}")}catch(r){throw new Error(t(172)[t(127)](e,":")[t(127)](r.lineNumber,":")[t(127)](r.columnNumber," "))}return r}function writeJsonFile(r,e){var t=_0x135d84;try{fs[t(148)](r,JSON[t(118)](e,null,2))}catch(r){throw t(198).concat(r)}}function initVersionType(){var r=_0x135d84,e=[r(161),"beta","release"],t=process.env.versionType;global[r(131)]=r(161),t&&e[r(165)](t)?global._versionType=t:(e=process[r(139)][r(136)]===r(197),global[r(131)]=e?r(182):"debug")}function readProjectCfgJson(r){var e,t=_0x135d84,r=path[t(163)](r,t(164),t(154),t(149));return e=fs.existsSync(r)?JSON[t(142)](fs[t(179)](r)[t(144)]()):e}function isOSX(){var r=_0x135d84;return os[r(185)]()===r(188)}function hasHxml(r){var e=_0x135d84;try{var t,o=_createForOfIteratorHelper(fs[e(168)](r,{withFileTypes:!0}));try{for(o.s();!(t=o.n())[e(202)];){var n=t[e(133)],a=path[e(163)](r,n[e(155)]);if(n[e(183)]()&&n.name[e(191)](e(199))||n.isDirectory()&&"node_modules"!==n[e(155)]&&hasHxml(a))return!0}}catch(r){o.e(r)}finally{o.f()}}catch(r){logger[e(157)](e(132),r)}return!1}function moveFiles(n,a){var s=_0x135d84;try{fs[s(122)](a,{recursive:!0}),fs[s(168)](n,{withFileTypes:!0})[s(113)](function(r){var e=s,t=path[e(163)](n,r[e(155)]),o=path[e(163)](a,r[e(155)]);r.isFile()?fs.copyFileSync(t,o):r[e(143)]()&&r[e(155)]!==e(153)&&moveFiles(t,o)})}catch(r){logger[s(157)](s(147),r)}}function handleResolveAlias(r,e){var t,o=_0x135d84,n=_createForOfIteratorHelper(Object[o(138)](e)[o(156)](function(r,e){return e[o(134)]-r.length}));try{for(n.s();!(t=n.n())[o(202)];){var a,s,i,c=t.value;if(c[o(191)]("/*")&&e[c][o(191)]("/*"))if(r[o(166)](c[o(193)](0,-1))||r===c[o(193)](0,-1))return a=e[c].slice(0,-1),s=r.slice(c[o(134)]-1),i=(i=path.join(a,s)[o(160)](/\\/g,"/")).startsWith("/")?i:"/"+i}}catch(r){n.e(r)}finally{n.f()}return r}function getEntryPkgPath(){var r,e=_0x135d84,t=readJsonFile(path.resolve(projectPath,"build-profile.json5"));if(0<(null==t||null==(r=t[e(175)])?void 0:r[e(134)]))return path[e(163)](projectPath,t[e(175)][0].srcPath);logger[e(200)](e(116))}function _0x9ffc(r,e){var t=_0x5256();return(_0x9ffc=function(r,e){return t[r-=109]})(r,e)}function deepMerge(r){for(var e=_0x135d84,t=arguments[e(134)],o=new Array(1<t?t-1:0),n=1;n<t;n++)o[n-1]=arguments[n];if(!o[e(134)])return r;var a=o[e(114)]();if(!a)return deepMerge[e(181)](void 0,[r].concat(o));for(var s=0,i=Object[e(138)](a);s<i[e(134)];s++){var c=i[s],f=a[c],l=r[c];isObject(f)&&c in r&&isObject(l)?deepMerge(l,f):void 0!==f&&(r[c]=f)}return deepMerge.apply(void 0,[r][e(127)](o))}function isObject(r){var e=_0x135d84;return Object.prototype[e(144)][e(120)](r)===e(174)}initVersionType(),exports[_0x135d84(167)]=(null!=(_ref=null!=(_process$env$NODE_ENV=process[_0x135d84(139)].NODE_ENV)?_process$env$NODE_ENV:projectCfg[_0x135d84(124)])?_ref:_0x135d84(170))===_0x135d84(170),exports[_0x135d84(178)]=projectPath,exports[_0x135d84(162)]=projectCfg,exports.ASCF_SRC_PATH=ascfSrcPath,exports[_0x135d84(187)]=path.resolve(projectPath,_0x135d84(164),_0x135d84(195)),exports.RAWFILE_DIR=_0x135d84(201),exports[_0x135d84(169)]=path[_0x135d84(163)](__dirname,"..",".."),exports.clearResource=function(r){var o=_0x135d84;return Promise.all(r[o(192)](function(e){var t=o;if(fs[t(125)](e))return new Promise(function(r){rimraf[t(121)](e),r()})}))},exports.readJsonFile=readJsonFile,exports[_0x135d84(115)]=writeJsonFile,exports.isOSX=isOSX,exports[_0x135d84(141)]=hasHxml,exports[_0x135d84(158)]=moveFiles,exports[_0x135d84(150)]=handleResolveAlias,exports[_0x135d84(151)]=getEntryPkgPath,exports.deepMerge=deepMerge;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x24ae2b=_0x2507;function _0x4b6c(){var e=['WARNING: @atomicservice/ascf-toolkit can be upgraded, execute command "npm update -g @atomicservice/ascf-toolkit ',"WARN: ASCF shared library not found.","info","4423335HhZOTp","split",'INFO: @atomicservice/ascf-toolkit can be upgraded, execute command "npm update -g @atomicservice/ascf-toolkit ',"5jKNJwf","toLowerCase","./log4js.js","isOSX","oh-package.json5","join","isLatestAscfHar","ohpm","warn","npm view @atomicservice/ascf-toolkit version","6758286seOqPR","WARNING: ASCF Shared Library can be upgraded.","1976853XhBrru","length","dependencies","DevEco Studio","version-check"," does not depend on ASCF Shared Library. Select a project that does, or create a new one.","debug","/Applications/DevEco-Studio.app/Contents/tools","satisfies","toString","24370770SQLuyE","env","94uqhlEI","readJsonFile","TOOLKIT_PATH","get project entry module.json.","isLatestAscfToolkit","update to ","C:\\Program Files\\Huawei\\DevEco Studio\\bin","fatal","get ohpm from deveco dir.","filter","version","getLogger","module.json5","4392868IcBEwJ","latest","existsSync","trim","20613FeEdxh","semver","bin","isAscfHspSatisfied","INFO: ASCF Shared Library can be upgraded.","getEntryPkgPath","@atomicservice/ascfapi"," at entry/src/main/module.json5.","WARNING: "," is not exists, please ensure DevEco Studio installed","module","concat","com.huawei.hms.ascfruntime","main","7401060wFTOGC"," info @atomicservice/ascfapi","16QrSnbR","execSync"];return(_0x4b6c=function(){return e})()}function _0x2507(e,t){var r=_0x4b6c();return(_0x2507=function(e,t){return r[e-=137]})(e,t)}(()=>{for(var e=_0x2507,t=_0x4b6c();;)try{if(632623==-parseInt(e(155))*(-parseInt(e(138))/2)+-parseInt(e(191))/3+-parseInt(e(151))/4*(-parseInt(e(179))/5)+-parseInt(e(189))/6+-parseInt(e(176))/7*(parseInt(e(171))/8)+-parseInt(e(169))/9+parseInt(e(201))/10)break;t.push(t.shift())}catch(e){t.push(t.shift())}})();var utils=require("./utils"),path=require("path"),_require=require(_0x24ae2b(156)),satisfies=_require[_0x24ae2b(199)],_require2=require("child_process"),execSync=_require2[_0x24ae2b(172)],log4js=require(_0x24ae2b(181)),fs=require("fs"),logger=log4js[_0x24ae2b(149)](_0x24ae2b(195));function getOhpmFile(){var e=_0x24ae2b,t=(logger[e(197)](e(146)),null==(t=process.env[e(194)]||process[e(137)].DEVECO_DIR)?void 0:t[e(177)](";")[0].trim()),r=t||e(198),t=t||e(144),r=utils[e(182)]()?r:t;return path[e(184)](r,"..","tools",e(186),e(157),"ohpm")}exports[_0x24ae2b(142)]=function(){var e=_0x24ae2b,t=0<arguments[e(192)]&&void 0!==arguments[0]&&arguments[0],r=utils.readJsonFile(path.join(utils[e(140)],"package.json"))[e(148)],o=execSync(e(188),{timeout:5e3})[e(200)]()[e(154)]();r!==o&&(t?logger[e(187)](e(173).concat(o,'"')):logger[e(175)](e(178)[e(166)](o,'"')))},exports[_0x24ae2b(185)]=function(){var e,t,r=_0x24ae2b,o=0<arguments[r(192)]&&void 0!==arguments[0]&&arguments[0],a=path[r(184)](utils.getEntryPkgPath(),r(183)),i=utils.readJsonFile(a).dependencies[r(161)];i?(e=getOhpmFile(),fs[r(153)](e)?(t=utils[r(182)]()?e:'"'[r(166)](e,'"'),t=execSync(""[r(166)](t,r(170)),{timeout:5e3})[r(200)]()[r(177)]("latest[39m:")[1].split("\n")[0][r(154)](),satisfies(t,i)||i[r(180)]()===r(152)||(o?logger[r(187)](r(190)):logger[r(175)](r(159)))):logger.warn("DevEco Studio ohpm ".concat(e,r(164)))):logger[r(187)](r(163).concat(a,r(196)))},exports[_0x24ae2b(158)]=function(e){var r=_0x24ae2b,t=(logger[r(197)](r(141)),path[r(184)](utils[r(160)](),"src",r(168),r(150))),t=null==(t=utils[r(139)](t)[r(165)])?void 0:t[r(193)],t=null==t?void 0:t[r(147)](function(e){var t=r;return e.bundleName===t(167)});return!t||t.length<=0?(logger[r(187)](r(174)),!1):!(Number(t[0].versionCode)<Number(e)&&(logger[r(145)]("ERROR: ASCF shared library version is too low,"+r(143).concat(e,r(162))),1))};
|
package/lib/index.d.ts
CHANGED
|
@@ -17,4 +17,8 @@ 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>
|
|
23
|
+
|
|
24
|
+
export declare function buildNpm(projectPath: String): void
|