@atomicservice/ascf-toolkit 1.0.3 → 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 -1
- package/lib/ascf-compiler/common/exp-utils.js +1 -1
- package/lib/ascf-compiler/common/hash-sum.js +1 -1
- package/lib/ascf-compiler/common/hjs-utils.js +1 -1
- package/lib/ascf-compiler/common/hxml-validator.js +1 -1
- package/lib/ascf-compiler/common/logUndefined.js +1 -1
- package/lib/ascf-compiler/common/merge-tpl-cmps.js +1 -1
- package/lib/ascf-compiler/common/packoptions-utils.js +1 -1
- package/lib/ascf-compiler/common/quick-generate-subpackage.js +1 -1
- package/lib/ascf-compiler/common/utils.js +1 -1
- package/lib/ascf-compiler/css-process-loader.js +1 -1
- package/lib/ascf-compiler/extract-loader.js +1 -1
- package/lib/ascf-compiler/hcss-loader.js +1 -1
- package/lib/ascf-compiler/hjs-loader.js +1 -1
- package/lib/ascf-compiler/hxml-loader.js +1 -1
- package/lib/ascf-compiler/js-parser/parser-babel.js +1 -1
- package/lib/ascf-compiler/js-parser/parser-swc.js +1 -1
- package/lib/ascf-compiler/js-parser/parser.js +1 -1
- package/lib/ascf-compiler/loader-utils.js +1 -1
- package/lib/ascf-compiler/path-process-loader.js +1 -1
- package/lib/ascf-compiler/plugin/copy-bundle-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/extConfig-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/html-generator-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/i18n-transform-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/manifest-generator-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/replace-module-id-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/resource-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/index.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/jsonpChunkLoadingRuntimeModule.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/jsonpHelpers.js +1 -1
- package/lib/ascf-compiler/plugin/webpack-target/jsonpTemplatePlugin.js +1 -1
- package/lib/ascf-compiler/require-loader.js +1 -1
- 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 -1
- package/lib/ascf-compiler/template/node-name-utils.js +1 -1
- package/lib/ascf-compiler/trustlist-hxml-verify-loader.js +1 -1
- package/lib/ascf-compiler/trustlist-js-verify-loader.js +1 -1
- package/lib/ascf-compiler/trustlist-verify/config.js +1 -1
- package/lib/ascf-compiler/trustlist-verify/utils.js +1 -1
- package/lib/ascf-compiler/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 -1
- 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 +2 -0
- package/lib/index.js +1 -1
- package/package.json +11 -48
|
@@ -1 +1 @@
|
|
|
1
|
-
var _0x18093c=_0x46fe;function _typeof(t){var e=_0x46fe;return(_typeof=e(552)==typeof Symbol&&e(575)==typeof Symbol[e(521)]?function(t){return typeof t}:function(t){var r=e;return t&&r(552)==typeof Symbol&&t[r(526)]===Symbol&&t!==Symbol[r(562)]?r(575):typeof t})(t)}function _regeneratorRuntime(){var s=_0x46fe;_regeneratorRuntime=function(){return c};var f,c={},t=Object[s(562)],p=t.hasOwnProperty,h=Object[s(515)]||function(t,r,e){var n=s;t[r]=e[n(590)]},r="function"==typeof Symbol?Symbol:{},i=r[s(521)]||s(557),e=r[s(535)]||"@@asyncIterator",n=r[s(549)]||s(524);function o(t,r,e){return Object[s(515)](t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{o({},"")}catch(t){o=function(t,r,e){return t[r]=e}}function u(t,r,e,n){var o,i,a,c,u=s,r=r&&r.prototype instanceof d?r:d,r=Object[u(615)](r.prototype),n=new k(n||[]);return h(r,u(536),{value:(o=t,i=e,a=n,c=l,function(t,r){var e=_0x46fe;if(c===_)throw Error(e(497));if(c===y){if("throw"===t)throw r;return{value:f,done:!0}}for(a[e(584)]=t,a[e(607)]=r;;){var n=a[e(636)];if(n){n=function t(r,e){var n=s,o=e.method,i=r[n(521)][o];if(i===f)return e.delegate=null,"throw"===o&&r.iterator[n(510)]&&(e.method=n(510),e[n(607)]=f,t(r,e),n(523)===e.method)||"return"!==o&&(e[n(584)]=n(523),e[n(607)]=new TypeError(n(628)+o+n(543))),g;o=m(i,r[n(521)],e.arg);if(n(523)===o[n(504)])return e[n(584)]=n(523),e.arg=o[n(607)],e[n(636)]=null,g;i=o[n(607)];return i?i[n(559)]?(e[r[n(587)]]=i.value,e.next=r.nextLoc,n(510)!==e.method&&(e.method=n(538),e[n(607)]=f),e[n(636)]=null,g):i:(e[n(584)]=n(523),e[n(607)]=new TypeError("iterator result is not an object"),e[n(636)]=null,g)}(n,a);if(n){if(n===g)continue;return n}}if(e(538)===a[e(584)])a[e(626)]=a[e(533)]=a[e(607)];else if("throw"===a.method){if(c===l)throw c=y,a[e(607)];a[e(561)](a[e(607)])}else e(510)===a[e(584)]&&a[e(547)](e(510),a[e(607)]);c=_;n=m(o,i,a);if(e(632)===n.type){if(c=a[e(559)]?y:v,n[e(607)]===g)continue;return{value:n[e(607)],done:a[e(559)]}}e(523)===n[e(504)]&&(c=y,a.method=e(523),a[e(607)]=n[e(607)])}})}),r}function m(t,r,e){var n=s;try{return{type:n(632),arg:t[n(563)](r,e)}}catch(t){return{type:n(523),arg:t}}}c[s(612)]=u;var l=s(611),v=s(508),_=s(600),y="completed",g={};function d(){}function a(){}function x(){}var r={},b=(o(r,i,function(){return this}),Object.getPrototypeOf),b=b&&b(b(F([]))),w=(b&&b!==t&&p.call(b,i)&&(r=b),x[s(562)]=d.prototype=Object[s(615)](r));function C(t){var r=s;[r(538),"throw",r(510)][r(638)](function(r){o(t,r,function(t){return this[_0x46fe(536)](r,t)})})}function P(c,u){var r,o=s;h(this,o(536),{value:function(e,n){function t(){return new u(function(t,r){!function r(t,e,n,o){var i,a=_0x46fe,t=m(c[t],c,e);if(a(523)!==t[a(504)])return(e=(i=t[a(607)])[a(590)])&&a(605)==_typeof(e)&&p[a(563)](e,a(614))?u[a(500)](e[a(614)])[a(556)](function(t){r(a(538),t,n,o)},function(t){r(a(523),t,n,o)}):u[a(500)](e).then(function(t){i.value=t,n(i)},function(t){return r("throw",t,n,o)});o(t[a(607)])}(e,n,t,r)})}return r=r?r[o(556)](t,t):t()}})}function j(t){var r=s,e={tryLoc:t[0]};1 in t&&(e[r(499)]=t[1]),2 in t&&(e[r(627)]=t[2],e[r(551)]=t[3]),this[r(571)][r(567)](e)}function O(t){var r=s,e=t.completion||{};e[r(504)]="normal",delete e.arg,t[r(565)]=e}function k(t){var r=s;this[r(571)]=[{tryLoc:"root"}],t[r(638)](j,this),this[r(540)](!0)}function F(e){var n=s;if(e||""===e){var o,t=e[i];if(t)return t[n(563)](e);if(n(552)==typeof e[n(538)])return e;if(!isNaN(e[n(625)]))return o=-1,(t=function t(){for(var r=n;++o<e[r(625)];)if(p.call(e,o))return t[r(590)]=e[o],t[r(559)]=!1,t;return t[r(590)]=f,t[r(559)]=!0,t})[n(538)]=t}throw new TypeError(_typeof(e)+n(579))}return a[s(562)]=x,h(w,s(526),{value:x,configurable:!0}),h(x,"constructor",{value:a,configurable:!0}),a.displayName=o(x,n,s(582)),c[s(530)]=function(t){var r=s,t=r(552)==typeof t&&t[r(526)];return!!t&&(t===a||r(582)===(t[r(616)]||t.name))},c[s(633)]=function(t){var r=s;return Object[r(572)]?Object.setPrototypeOf(t,x):(t[r(598)]=x,o(t,n,"GeneratorFunction")),t[r(562)]=Object.create(w),t},c.awrap=function(t){return{__await:t}},C(P[s(562)]),o(P[s(562)],e,function(){return this}),c.AsyncIterator=P,c[s(525)]=function(t,r,e,n,o){var i=s,a=(void 0===o&&(o=Promise),new P(u(t,r,e,n),o));return c[i(530)](r)?a:a[i(538)]()[i(556)](function(t){var r=i;return t[r(559)]?t.value:a[r(538)]()})},C(w),o(w,n,s(529)),o(w,i,function(){return this}),o(w,s(639),function(){return s(560)}),c[s(498)]=function(t){var r,n=s,o=Object(t),i=[];for(r in o)i.push(r);return i[n(645)](),function t(){for(var r=n;i.length;){var e=i[r(635)]();if(e in o)return t[r(590)]=e,t[r(559)]=!1,t}return t.done=!0,t}},c.values=F,k[s(562)]={constructor:k,reset:function(t){var r=s;if(this.prev=0,this[r(538)]=0,this.sent=this._sent=f,this[r(559)]=!1,this[r(636)]=null,this[r(584)]=r(538),this[r(607)]=f,this[r(571)][r(638)](O),!t)for(var e in this)"t"===e[r(618)](0)&&p[r(563)](this,e)&&!isNaN(+e[r(578)](1))&&(this[e]=f)},stop:function(){var t=s,r=(this[t(559)]=!0,this[t(571)][0][t(565)]);if(t(523)===r[t(504)])throw r[t(607)];return this[t(599)]},dispatchException:function(n){var o=s;if(this[o(559)])throw n;var i=this;function t(t,r){var e=o;return a[e(504)]=e(523),a[e(607)]=n,i[e(538)]=t,r&&(i[e(584)]=e(538),i[e(607)]=f),!!r}for(var r=this.tryEntries[o(625)]-1;0<=r;--r){var e=this[o(571)][r],a=e[o(565)];if(o(550)===e[o(507)])return t(o(593));if(e[o(507)]<=this.prev){var c=p.call(e,o(499)),u=p[o(563)](e,o(627));if(c&&u){if(this[o(566)]<e.catchLoc)return t(e[o(499)],!0);if(this.prev<e[o(627)])return t(e[o(627)])}else if(c){if(this[o(566)]<e[o(499)])return t(e[o(499)],!0)}else{if(!u)throw Error(o(594));if(this[o(566)]<e[o(627)])return t(e[o(627)])}}}},abrupt:function(t,r){for(var e=s,n=this.tryEntries[e(625)]-1;0<=n;--n){var o=this[e(571)][n];if(o[e(507)]<=this[e(566)]&&p.call(o,e(627))&&this[e(566)]<o.finallyLoc){var i=o;break}}var a=(i=i&&(e(548)===t||"continue"===t)&&i[e(507)]<=r&&r<=i[e(627)]?null:i)?i[e(565)]:{};return a[e(504)]=t,a[e(607)]=r,i?(this[e(584)]=e(538),this[e(538)]=i[e(627)],g):this.complete(a)},complete:function(t,r){var e=s;if("throw"===t[e(504)])throw t.arg;return e(548)===t.type||e(589)===t[e(504)]?this[e(538)]=t[e(607)]:e(510)===t[e(504)]?(this[e(599)]=this[e(607)]=t.arg,this[e(584)]=e(510),this[e(538)]="end"):"normal"===t.type&&r&&(this[e(538)]=r),g},finish:function(t){for(var r=s,e=this.tryEntries.length-1;0<=e;--e){var n=this[r(571)][e];if(n[r(627)]===t)return this[r(496)](n[r(565)],n[r(551)]),O(n),g}},catch:function(t){for(var r=s,e=this[r(571)][r(625)]-1;0<=e;--e){var n,o,i=this[r(571)][e];if(i.tryLoc===t)return"throw"===(n=i[r(565)]).type&&(o=n[r(607)],O(i)),o}throw Error(r(573))},delegateYield:function(t,r,e){var n=s;return this.delegate={iterator:F(t),resultName:r,nextLoc:e},"next"===this[n(584)]&&(this[n(607)]=f),g}},c}function asyncGeneratorStep(t,r,e,n,o,i,a){var c=_0x46fe;try{var u=t[i](a),s=u[c(590)]}catch(t){return void e(t)}u[c(559)]?r(s):Promise[c(500)](s).then(n,o)}function _asyncToGenerator(u){return function(){var t=this,c=arguments;return new Promise(function(r,e){var n=_0x46fe,o=u[n(503)](t,c);function i(t){asyncGeneratorStep(o,r,e,i,a,n(538),t)}function a(t){asyncGeneratorStep(o,r,e,i,a,n(523),t)}i(void 0)})}}(()=>{for(var t=_0x46fe,r=_0x31f1();;)try{if(181819==-parseInt(t(570))*(parseInt(t(514))/2)+parseInt(t(621))/3*(parseInt(t(505))/4)+parseInt(t(539))/5+parseInt(t(576))/6*(-parseInt(t(537))/7)+parseInt(t(622))/8+parseInt(t(554))/9*(parseInt(t(608))/10)+parseInt(t(617))/11*(-parseInt(t(623))/12))break;r.push(r.shift())}catch(t){r.push(r.shift())}})(),Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkInputPathFun=exports[_0x18093c(602)]=exports[_0x18093c(528)]=void 0;var commonConfig_1=require(_0x18093c(518)),path=require(_0x18093c(506)),fs=require("fs"),commonUtils_1=require(_0x18093c(643)),_require=require(_0x18093c(534)),clearResource=_require[_0x18093c(580)],log4js=require(_0x18093c(520)),logger=log4js[_0x18093c(603)]("converter");function confirmConverterFun(t,r){return _confirmConverterFun.apply(this,arguments)}function _confirmConverterFun(){var t=_0x18093c;return(_confirmConverterFun=_asyncToGenerator(_regeneratorRuntime()[t(633)](function t(e,n){var o,i;return _regeneratorRuntime().wrap(function(t){for(var r=_0x46fe;;)switch(t.prev=t[r(538)]){case 0:if(t[r(566)]=0,o=path.resolve(e[r(630)],"app.json"),i=path[r(500)](e[r(630)],"project.config.json"),fs[r(577)](i)||!fs[r(577)](o)||e[r(568)]){t[r(538)]=7;break}return t[r(547)](r(510),{command:r(541)});case 7:return t[r(538)]=9,doConvert(e,n);case 9:return t[r(547)](r(510),t[r(626)]);case 10:t[r(538)]=16;break;case 12:return t.prev=12,t.t0=t[r(558)](0),logger.error(t.t0),t.abrupt(r(510),{command:r(613),errorMessage:t.t0.message});case 16:case r(593):return t[r(542)]()}},t,null,[[0,12]])})))[t(503)](this,arguments)}function confirmConverterH5Fun(t,r){var e=_0x18093c,n=path[e(545)](t[e(513)],t[e(531)]);try{return commonUtils_1[e(574)](n,e(642),!0),commonUtils_1[e(511)](path[e(545)](__filename,e(555),e(642)),path.join(n,e(642)),!1,!0),commonUtils_1[e(644)](t,path[e(545)](n,e(642))),{command:e(544)}}catch(t){return logger[e(501)](t),{command:"failedTransform",errorMessage:t[e(609)]}}}function _0x31f1(){var t=["root","afterLoc","function"," is exists. Use the -c parameter to clear.","47043CqtgrC","../lib","then","@@iterator","catch","done","[object Generator]","dispatchException","prototype","call","setOriginPtahObject","completion","prev","push","confirmAddConfig","Output directory cannot be a subdirectory of the input directory.","3kyHAcc","tryEntries","setPrototypeOf","illegal catch attempt","createDirs","symbol","349722xHJWXJ","existsSync","slice"," is not iterable","clearResource","dirname","GeneratorFunction","hxml","method","stat","Applets","resultName","startsWith","continue","value","sep","appJsonFile","end","try statement without catch or finally","isArray","postInputPath","env","__proto__","rval","executing","parse","confirmConverterH5Fun","getLogger","appletType","object","../../","arg","220AphZuD","message","isDirectory","suspendedStart","wrap","failedTransform","__await","create","displayName","11LfLRCA","charAt","adaptApiFile","miniprogramRoot","2691hDqfto","704688GnTxmL","1003896ZlkmaT","checkInputPathFun","length","sent","finallyLoc","The iterator does not provide a '","rmdir","inputPath","smartProgramRoot","normal","mark","createTransformReportFile","pop","delegate","configBasenameArray","forEach","toString","concat","unlink","src","../common/commonUtils","handleConfigInfo","reverse","complete","Generator is already running","keys","catchLoc","resolve","error","all","apply","type","1248ZbHBYw","path","tryLoc","suspendedYield","Output path ","return","copyDir","transformNodeModuleComponent","outPath","130822kCHRqk","defineProperty","readFileSync","app.json","../common/commonConfig","map","../../common/log4js.js","iterator","projectFileSuffix","throw","@@toStringTag","async","constructor","finally","confirmConverterFun","Generator","isGeneratorFunction","packageName","srcRootPath","_sent","../../common/utils","asyncIterator","_invoke","21wpEJYH","next","768135uVxtXv","reset","notifyConfig","stop","' method","completeTransform","join","pages","abrupt","break","toStringTag"];return(_0x31f1=function(){return t})()}function checkConvertOutput(t,r){var e=_0x18093c,t=path[e(500)](t),r=path.resolve(r);if(fs[e(577)](r))throw new Error(e(509)[e(640)](r,e(553)));if(r[e(588)](t+path[e(591)]))throw new Error(e(569))}function doConvert(t,r){return _doConvert[_0x18093c(503)](this,arguments)}function _doConvert(){var t=_0x18093c;return(_doConvert=_asyncToGenerator(_regeneratorRuntime()[t(633)](function t(e,r){var n,o,i;return _regeneratorRuntime().wrap(function(t){for(var r=_0x46fe;;)switch(t[r(566)]=t[r(538)]){case 0:if(n=path[r(500)](e.outPath,"ascf/ascf_src"),"yes"===process[r(597)].clearResource)return t[r(538)]=4,clearResource([n]);t.next=4;break;case 4:return checkConvertOutput(e[r(630)],n),o=commonConfig_1[r(586)][r(532)],t[r(566)]=6,commonUtils_1.createDirs(n,o),commonUtils_1[r(634)](n,e[r(630)]),i=path[r(545)](n,o),"./"===o||""===o?(commonUtils_1.setOriginPtahObject(e[r(630)],i),commonUtils_1[r(511)](e[r(630)],i)):(commonUtils_1[r(564)](path.join(e.inputPath,o),i),commonUtils_1[r(511)](path[r(545)](e[r(630)],o),i),commonUtils_1.copyConfigFiles(path.join(e[r(630)]),n)),commonUtils_1[r(512)](),commonUtils_1[r(592)](path[r(545)](n,o),e),commonUtils_1.projectConfigFile(path[r(545)](n)),"my"===commonConfig_1.Applets[r(604)]&&commonUtils_1[r(619)](n,path[r(545)](__filename,r(606))),t[r(547)](r(510),{command:r(544),folderUrl:n});case 18:return t[r(566)]=18,t.t0=t[r(558)](6),logger[r(501)](t.t0),removePromise(n)[r(527)](),t[r(547)](r(510),{command:r(613),errorMessage:t.t0.message});case 23:case"end":return t[r(542)]()}},t,null,[[6,18]])}))).apply(this,arguments)}function removePromise(i){return new Promise(function(o,t){var e=_0x46fe;fs[e(585)](i,function(t,r){var n=e;r[n(610)]()?fs.readdir(i,function(t,r){var e=n,r=(r=r[e(519)](function(t){return path[e(545)](i,t)}))[e(519)](function(t){return removePromise(t)});Promise[e(502)](r)[e(556)](function(){fs[e(629)](i,o)})}):fs[n(641)](i,o)})})}function checkInputPathFun(t){var r=_0x18093c,t=path[r(500)](t),e=checkMiniProgram(t);return{command:r(596),data:{returnCode:e,outPath:path[r(581)](t)}}}function checkMiniProgram(t){var r=_0x18093c,e=!0,n=path[r(545)](t,r(517));return e=fs[r(577)](n)&&identifyProgram(t)?e:!1}function identifyProgram(t){var r=_0x18093c;try{var e=path[r(545)](t,r(517)),n=JSON[r(601)](fs[r(516)](e)[r(639)]());if(n&&n[r(546)]&&Array[r(595)](n.pages)&&0<n[r(546)][r(625)])for(var o=getSrcRootPath(t),i=0,a=Object[r(498)](commonConfig_1[r(522)]);i<a[r(625)];i++){var c=a[i],u=path[r(545)](t,o,n[r(546)][0]+commonConfig_1[r(522)][c][r(583)]);if(fs.existsSync(u))return"wx"===c?commonConfig_1[r(586)][r(604)]="tt":commonConfig_1.Applets[r(604)]=c,!0}return!1}catch(t){return!1}}function _0x46fe(t,r){var e=_0x31f1();return(_0x46fe=function(t,r){return e[t-=496]})(t,r)}function getSrcRootPath(t){var r=_0x18093c;commonConfig_1[r(586)][r(532)]="./";for(var e=0;e<commonConfig_1[r(637)][r(625)];e++){var n=commonConfig_1.configBasenameArray[e],n=path[r(545)](t,n);fs[r(577)](n)&&((n=JSON[r(601)](fs[r(516)](n).toString()))[r(620)]?commonConfig_1.Applets[r(532)]=n[r(620)]:n[r(631)]?commonConfig_1[r(586)][r(532)]=n[r(631)]:commonConfig_1[r(586)][r(532)]="./")}return commonConfig_1[r(586)][r(532)]}exports[_0x18093c(528)]=confirmConverterFun,exports[_0x18093c(602)]=confirmConverterH5Fun,exports[_0x18093c(624)]=checkInputPathFun;
|
|
1
|
+
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 globalDistanceCount,globalJsLine,
|
|
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
|
-
function
|
|
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,_0xf3123=_0x35ba;function _0x35ba(t,r){var e=_0x2e62();return(_0x35ba=function(t,r){return e[t-=270]})(t,r)}function _typeof(t){var e=_0x35ba;return(_typeof="function"==typeof Symbol&&e(366)==typeof Symbol.iterator?function(t){return typeof t}:function(t){var r=e;return t&&r(402)==typeof Symbol&&t[r(336)]===Symbol&&t!==Symbol.prototype?r(366):typeof t})(t)}function _regeneratorRuntime(){var u=_0x35ba;_regeneratorRuntime=function(){return f};var s,f={},t=Object[u(405)],l=t[u(341)],p=Object[u(298)]||function(t,r,e){var n=u;t[r]=e[n(348)]},r=u(402)==typeof Symbol?Symbol:{},i=r[u(285)]||u(271),e=r[u(398)]||u(372),n=r[u(401)]||u(392);function o(t,r,e){return Object.defineProperty(t,r,{value:e,enumerable:!0,configurable:!0,writable:!0}),t[r]}try{o({},"")}catch(t){o=function(t,r,e){return t[r]=e}}function c(t,r,e,n){var o,i,a,f,c=u,r=r&&r[c(405)]instanceof y?r:y,r=Object[c(323)](r[c(405)]),n=new E(n||[]);return p(r,c(283),{value:(o=t,i=e,a=n,f=_,function(t,r){var e=_0x35ba;if(f===g)throw Error(e(378));if(f===x){if("throw"===t)throw r;return{value:s,done:!0}}for(a.method=t,a[e(371)]=r;;){var n=a[e(403)];if(n){n=function t(r,e){var n=u,o=e[n(373)],i=r[n(285)][o];if(i===s)return e[n(403)]=null,n(387)===o&&r[n(285)].return&&(e[n(373)]="return",e[n(371)]=s,t(r,e),n(387)===e[n(373)])||n(289)!==o&&(e[n(373)]=n(387),e[n(371)]=new TypeError(n(357)+o+n(276))),d;o=h(i,r.iterator,e.arg);if(n(387)===o[n(352)])return e[n(373)]=n(387),e[n(371)]=o[n(371)],e[n(403)]=null,d;i=o[n(371)];return i?i.done?(e[r.resultName]=i[n(348)],e[n(280)]=r[n(344)],n(289)!==e[n(373)]&&(e.method=n(280),e[n(371)]=s),e[n(403)]=null,d):i:(e.method=n(387),e[n(371)]=new TypeError(n(314)),e[n(403)]=null,d)}(n,a);if(n){if(n===d)continue;return n}}if(e(280)===a[e(373)])a[e(293)]=a[e(306)]=a.arg;else if(e(387)===a[e(373)]){if(f===_)throw f=x,a[e(371)];a.dispatchException(a[e(371)])}else e(289)===a.method&&a.abrupt(e(289),a[e(371)]);f=g;n=h(o,i,a);if(e(329)===n.type){if(f=a[e(311)]?x:v,n[e(371)]===d)continue;return{value:n[e(371)],done:a.done}}"throw"===n[e(352)]&&(f=x,a[e(373)]=e(387),a[e(371)]=n[e(371)])}})}),r}function h(t,r,e){var n=u;try{return{type:n(329),arg:t[n(343)](r,e)}}catch(t){return{type:"throw",arg:t}}}f.wrap=c;var _=u(327),v=u(315),g=u(287),x=u(381),d={};function y(){}function a(){}function m(){}var r={},b=(o(r,i,function(){return this}),Object[u(337)]),b=b&&b(b(I([]))),w=(b&&b!==t&&l[u(343)](b,i)&&(r=b),m[u(405)]=y[u(405)]=Object[u(323)](r));function j(t){var r=u;[r(280),r(387),r(289)].forEach(function(r){o(t,r,function(t){return this._invoke(r,t)})})}function S(f,c){var r,o=u;p(this,o(283),{value:function(e,n){function t(){return new c(function(t,r){!function r(t,e,n,o){var i,a=_0x35ba,t=h(f[t],f,e);if(a(387)!==t.type)return(e=(i=t[a(371)])[a(348)])&&a(364)==_typeof(e)&&l[a(343)](e,"__await")?c.resolve(e[a(317)])[a(319)](function(t){r("next",t,n,o)},function(t){r(a(387),t,n,o)}):c[a(288)](e)[a(319)](function(t){i[a(348)]=t,n(i)},function(t){return r(a(387),t,n,o)});o(t[a(371)])}(e,n,t,r)})}return r=r?r[o(319)](t,t):t()}})}function O(t){var r=u,e={tryLoc:t[0]};1 in t&&(e[r(356)]=t[1]),2 in t&&(e[r(277)]=t[2],e[r(349)]=t[3]),this[r(380)][r(325)](e)}function C(t){var r=u,e=t[r(273)]||{};e[r(352)]=r(329),delete e[r(371)],t[r(273)]=e}function E(t){var r=u;this[r(380)]=[{tryLoc:r(272)}],t[r(340)](O,this),this.reset(!0)}function I(e){var n=u;if(e||""===e){var o,t=e[i];if(t)return t.call(e);if(n(402)==typeof e[n(280)])return e;if(!isNaN(e[n(385)]))return o=-1,(t=function t(){for(var r=n;++o<e[r(385)];)if(l[r(343)](e,o))return t.value=e[o],t[r(311)]=!1,t;return t[r(348)]=s,t[r(311)]=!0,t})[n(280)]=t}throw new TypeError(_typeof(e)+n(404))}return a[u(405)]=m,p(w,"constructor",{value:m,configurable:!0}),p(m,u(336),{value:a,configurable:!0}),a[u(301)]=o(m,n,u(292)),f[u(274)]=function(t){var r=u,t=r(402)==typeof t&&t[r(336)];return!!t&&(t===a||r(292)===(t[r(301)]||t[r(342)]))},f[u(362)]=function(t){var r=u;return Object[r(353)]?Object.setPrototypeOf(t,m):(t[r(312)]=m,o(t,n,r(292))),t[r(405)]=Object[r(323)](w),t},f[u(326)]=function(t){return{__await:t}},j(S[u(405)]),o(S[u(405)],e,function(){return this}),f[u(321)]=S,f[u(302)]=function(t,r,e,n,o){var i=u,a=(void 0===o&&(o=Promise),new S(c(t,r,e,n),o));return f[i(274)](r)?a:a[i(280)]()[i(319)](function(t){var r=i;return t.done?t[r(348)]:a[r(280)]()})},j(w),o(w,n,u(394)),o(w,i,function(){return this}),o(w,u(320),function(){return u(365)}),f[u(305)]=function(t){var r,n=u,o=Object(t),i=[];for(r in o)i[n(325)](r);return i.reverse(),function t(){for(var r=n;i[r(385)];){var e=i.pop();if(e in o)return t[r(348)]=e,t[r(311)]=!1,t}return t[r(311)]=!0,t}},f[u(322)]=I,E.prototype={constructor:E,reset:function(t){var r=u;if(this[r(354)]=0,this[r(280)]=0,this[r(293)]=this[r(306)]=s,this.done=!1,this.delegate=null,this[r(373)]=r(280),this[r(371)]=s,this.tryEntries.forEach(C),!t)for(var e in this)"t"===e[r(374)](0)&&l[r(343)](this,e)&&!isNaN(+e.slice(1))&&(this[e]=s)},stop:function(){var t=u,r=(this[t(311)]=!0,this[t(380)][0][t(273)]);if(t(387)===r.type)throw r[t(371)];return this.rval},dispatchException:function(n){var o=u;if(this[o(311)])throw n;var i=this;function t(t,r){var e=o;return a[e(352)]=e(387),a[e(371)]=n,i[e(280)]=t,r&&(i[e(373)]="next",i[e(371)]=s),!!r}for(var r=this[o(380)][o(385)]-1;0<=r;--r){var e=this[o(380)][r],a=e[o(273)];if(o(272)===e.tryLoc)return t("end");if(e[o(308)]<=this[o(354)]){var f=l.call(e,"catchLoc"),c=l.call(e,o(277));if(f&&c){if(this.prev<e[o(356)])return t(e.catchLoc,!0);if(this[o(354)]<e[o(277)])return t(e[o(277)])}else if(f){if(this[o(354)]<e[o(356)])return t(e[o(356)],!0)}else{if(!c)throw Error(o(379));if(this[o(354)]<e.finallyLoc)return t(e[o(277)])}}}},abrupt:function(t,r){for(var e=u,n=this.tryEntries[e(385)]-1;0<=n;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&l[e(343)](o,e(277))&&this[e(354)]<o[e(277)]){var i=o;break}}var a=(i=i&&("break"===t||e(346)===t)&&i[e(308)]<=r&&r<=i[e(277)]?null:i)?i[e(273)]:{};return a[e(352)]=t,a[e(371)]=r,i?(this[e(373)]="next",this[e(280)]=i[e(277)],d):this[e(345)](a)},complete:function(t,r){var e=u;if(e(387)===t[e(352)])throw t.arg;return e(399)===t.type||e(346)===t[e(352)]?this[e(280)]=t.arg:e(289)===t[e(352)]?(this[e(333)]=this[e(371)]=t.arg,this.method=e(289),this.next=e(279)):e(329)===t[e(352)]&&r&&(this[e(280)]=r),d},finish:function(t){for(var r=u,e=this[r(380)].length-1;0<=e;--e){var n=this[r(380)][e];if(n[r(277)]===t)return this[r(345)](n[r(273)],n[r(349)]),C(n),d}},catch:function(t){for(var r=u,e=this.tryEntries[r(385)]-1;0<=e;--e){var n,o,i=this[r(380)][e];if(i[r(308)]===t)return n=i[r(273)],r(387)===n[r(352)]&&(o=n[r(371)],C(i)),o}throw Error(r(310))},delegateYield:function(t,r,e){var n=u;return this.delegate={iterator:I(t),resultName:r,nextLoc:e},n(280)===this[n(373)]&&(this.arg=s),d}},f}function asyncGeneratorStep(t,r,e,n,o,i,a){var f=_0x35ba;try{var c=t[i](a),u=c[f(348)]}catch(t){return void e(t)}c[f(311)]?r(u):Promise[f(288)](u)[f(319)](n,o)}function _0x2e62(){var t=["setPrototypeOf","prev","Watch for changes","catchLoc","The iterator does not provide a '","Control if and how source maps are generated","--templateHoist","compile","convert","mark","apply","object","[object Generator]","symbol","../index","-c, --clear","_ascfDebug","-va, --validate","arg","@@asyncIterator","method","charAt","-w, --watch","2491380ROdeMt","Skip API and components validator","Generator is already running","try statement without catch or finally","tryEntries","completed","16ttYvXb","--devtool [type]","Environment is development","length","../../package.json","throw","Use swc parser","-p, --progress","-i, --input <input-directory>","opts","@@toStringTag","command","Generator","enable debug logging","--swc","stop","asyncIterator","break","3172644wNzfyy","toStringTag","function","delegate"," is not iterable","prototype","11QatHIk","-o, --output <output-directory>","@@iterator","root","completion","isGeneratorFunction","22231360JZnIsN","' method","finallyLoc","Setting the log level","end","next","Not add todo for not supported api.","Show build progress","_invoke","-m, --mode","iterator","5445030WdRBpD","executing","resolve","return","wrap","Clear convert output path","GeneratorFunction","sent","version","Run command on changes been watched","5PJoqSh","_ascfCliProgram","defineProperty","option","9440001uqeoOs","displayName","async","145437lQrTZR","description","keys","_sent","-notaddtodo, --notaddtodo","tryLoc","4963gSOhtC","illegal catch attempt","done","__proto__","ascf toolkit convert and compile ascf project","iterator result is not an object","suspendedYield","commander","__await","action","then","toString","AsyncIterator","values","create","../common/log4js.js","push","awrap","suspendedStart","setLoggerConfig","normal","Validate path","--logging [level]","5272yRrlSd","rval","logging","Convert miniprogram project to ascf project","constructor","getPrototypeOf","requiredOption","--skipApiValidator","forEach","hasOwnProperty","name","call","nextLoc","complete","continue","Clear build resource","value","afterLoc","-r, --run [command]","Hoist template to page scope","type"];return(_0x2e62=function(){return t})()}function _asyncToGenerator(c){return function(){var t=this,f=arguments;return new Promise(function(r,e){var n=_0x35ba,o=c[n(363)](t,f);function i(t){asyncGeneratorStep(o,r,e,i,a,n(280),t)}function a(t){asyncGeneratorStep(o,r,e,i,a,"throw",t)}i(void 0)})}}(()=>{for(var t=_0x35ba,r=_0x2e62();;)try{if(959097==+parseInt(t(303))*(parseInt(t(382))/2)+parseInt(t(286))/3+-parseInt(t(400))/4+parseInt(t(296))/5*(parseInt(t(376))/6)+-parseInt(t(309))/7*(parseInt(t(332))/8)+parseInt(t(300))/9+-parseInt(t(275))/10*(parseInt(t(406))/11))break;r.push(r.shift())}catch(t){r.push(r.shift())}})();var ascf=require(_0xf3123(367)),_require=require(_0xf3123(316)),Command=_require.Command,pkg=require(_0xf3123(386)),program=new Command,_require2=require(_0xf3123(324)),setLoggerConfig=_require2[_0xf3123(328)];program[_0xf3123(294)](pkg[_0xf3123(294)])[_0xf3123(304)](_0xf3123(313))[_0xf3123(299)]("--debug",_0xf3123(395)),program[_0xf3123(393)]("convert")[_0xf3123(304)](_0xf3123(335))[_0xf3123(338)](_0xf3123(390))[_0xf3123(338)](_0xf3123(270)).option(_0xf3123(368),_0xf3123(291)).option(_0xf3123(370),_0xf3123(330))[_0xf3123(299)](_0xf3123(307),_0xf3123(281))[_0xf3123(299)](_0xf3123(331),_0xf3123(278))[_0xf3123(318)]((()=>{var r=_0xf3123,e=_asyncToGenerator(_regeneratorRuntime()[r(362)](function t(e){var n=r;return _regeneratorRuntime()[n(290)](function(t){for(var r=n;;)switch(t[r(354)]=t[r(280)]){case 0:return setLoggerConfig(e[r(334)]),t.next=3,ascf[r(361)](e);case 3:case r(279):return t[r(397)]()}},t)}));return function(t){return e[r(363)](this,arguments)}})()),program[_0xf3123(393)]("compile <projectRoot>")[_0xf3123(304)]("Compile ascf project")[_0xf3123(299)](_0xf3123(389),_0xf3123(282))[_0xf3123(299)](_0xf3123(375),_0xf3123(355))[_0xf3123(299)](_0xf3123(284),_0xf3123(384)).option(_0xf3123(368),_0xf3123(347))[_0xf3123(299)](_0xf3123(350),_0xf3123(295))[_0xf3123(299)](_0xf3123(331),"Setting the log level")[_0xf3123(299)](_0xf3123(396),_0xf3123(388)).option(_0xf3123(383),_0xf3123(358))[_0xf3123(299)](_0xf3123(359),_0xf3123(351))[_0xf3123(299)](_0xf3123(339),_0xf3123(377)).action((()=>{var i=_0xf3123,e=_asyncToGenerator(_regeneratorRuntime()[i(362)](function t(e,n){var o=i;return _regeneratorRuntime()[o(290)](function(t){for(var r=o;;)switch(t[r(354)]=t.next){case 0:return setLoggerConfig(n.logging),t.next=3,ascf[r(360)](e,n);case 3:case r(279):return t[r(397)]()}},t)}));return function(t,r){return e[i(363)](this,arguments)}})()),program.parse(process.argv),global[_0xf3123(297)]=program,global[_0xf3123(369)]=!(null==(_global$_ascfCliProgr=global[_0xf3123(297)][_0xf3123(391)]())||!_global$_ascfCliProgr.debug);
|
|
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
|
-
var
|
|
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
|
-
var
|
|
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)}}}}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
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;
|