@atomicservice/ascf-toolkit 1.0.3 → 1.0.5-beta.4
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-base/index.d.ts +68 -0
- package/lib/ascf-base/index.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/hdc-executor.js +1 -0
- 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/manifest-handler.js +1 -0
- package/lib/ascf-compiler/common/manifest-manager.js +1 -0
- 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/dynamic-entry-plugin.js +1 -0
- 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/server/dev-server.js +1 -0
- package/lib/ascf-compiler/server/port-manager.js +1 -0
- package/lib/ascf-compiler/swc-loader.js +1 -1
- package/lib/ascf-compiler/template/attr-utils.js +1 -1
- package/lib/ascf-compiler/template/implicit-model-config.js +1 -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/ascfApisDiff.json +1979 -0
- 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/convertManager.js +1 -0
- 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/ascf-converter/report/icons/completely.png +0 -0
- package/lib/ascf-converter/report/icons/failed.png +0 -0
- package/lib/ascf-converter/report/icons/portion.png +0 -0
- package/lib/ascf-converter/report/index.html +718 -0
- package/lib/ascf-converter/report/js/index.js +1 -0
- package/lib/bin/ascf.js +1 -1
- package/lib/commands/ascfbuild/index.js +1 -0
- package/lib/commands/build-npm/index.js +1 -0
- package/lib/commands/debugger/index.js +1 -0
- 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 +17 -53
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var _0x37da88=_0x2501;function _typeof(t){var r=_0x2501;return(_typeof=r(449)==typeof Symbol&&r(483)==typeof Symbol[r(498)]?function(t){return typeof t}:function(t){var e=r;return t&&e(449)==typeof Symbol&&t[e(448)]===Symbol&&t!==Symbol[e(489)]?"symbol":typeof t})(t)}function _0x3690(){var t=["outputPath","constructor","function","文件总数","2ZOvgAe","value","jsonModular","modelAll","pageData","ASCF","getTime","ConvertManager","572376OAqyYS","tableInfo","status","源项目路径","defineProperty","relative","transformOther","values","attrs","transforms","Node.js版本","2113640WBjowi","configurable","report result: ","2062024yyAVwv","concept","copyDir","substring","transformTemplate","object","init","let pageData = ","125810TvTUpb","14693pOmTig","symbol",".css","toPrimitive","./ascfApisDiff.json","otherModular","components","prototype","transformJs","164140KWFzti","api","string","report","assign","component","转换耗时","iterator","45vnZPcd","length","concat","options","1506KEhatj","version","jsModular","enumerable","utf8","./common/commonUtils","path","956499xlrmqw","beginTime","keys","lastIndexOf","__ascfConvertReport","Cannot call a class as a function","writeFileSync","call","info","transform","forEach","push","js/data.js","stringify","resolve","completely","index.html","notsupport"];return(_0x3690=function(){return t})()}function _classCallCheck(t,e){var r=_0x2501;if(!(t instanceof e))throw new TypeError(r(515))}function _defineProperties(t,e){for(var r=_0x2501,n=0;n<e.length;n++){var o=e[n];o.enumerable=o[r(506)]||!1,o[r(471)]=!0,r(452)in o&&(o.writable=!0),Object[r(463)](t,_toPropertyKey(o.key),o)}}function _createClass(t,e,r){var n=_0x2501;return e&&_defineProperties(t.prototype,e),r&&_defineProperties(t,r),Object[n(463)](t,"prototype",{writable:!1}),t}function _toPropertyKey(t){var e=_0x2501,t=_toPrimitive(t,e(493));return e(483)==_typeof(t)?t:t+""}function _toPrimitive(t,e){var r=_0x2501;if(r(478)!=_typeof(t)||!t)return t;var n=t[Symbol[r(485)]];if(void 0===n)return(r(493)===e?String:Number)(t);n=n[r(517)](t,e||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}(()=>{for(var t=_0x2501,e=_0x3690();;)try{if(331132==+parseInt(t(491))+parseInt(t(451))/2*(-parseInt(t(510))/3)+-parseInt(t(459))/4+parseInt(t(470))/5+parseInt(t(503))/6*(parseInt(t(482))/7)+-parseInt(t(473))/8+parseInt(t(499))/9*(-parseInt(t(481))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}})();var fs=require("fs"),path=require(_0x37da88(509)),commonUtils=require(_0x37da88(508)),HAS_APIS=require(_0x37da88(486)),log4js=require("../common/log4js.js"),logger=log4js.getLogger(_0x37da88(458)),ConvertManager=(()=>{var s=_0x37da88;return _createClass(function t(){_classCallCheck(this,t)},[{key:s(479),value:function(t){var e=s,t=(this[e(502)]=Object[e(495)]({},t),this[e(455)]={transforms:{},configs:{},plugins:[],surroundings:{pcSystem:{name:"系统环境",val:process.platform},nodeVersion:{name:e(469),val:process[e(504)]},version:{name:e(456),val:require("../../package.json")[e(504)]}},tableInfo:{"文件总数":0},opening:{},concept:{modelAll:0,completely:0,partial:0,notsupport:0}},this[e(455)][e(460)]);t[e(462)]=this[e(502)].inputPath,t["目标输出路径"]=this[e(502)].outputPath,this.beginTime=(new Date)[e(457)]()}},{key:s(477),value:function(t,e){var r=s,n={status:1};e&&(n=HAS_APIS[r(496)][e]?Object[r(495)]({name:e},HAS_APIS[r(496)][e]):{status:3}),this[r(519)]("templete",t,n)}},{key:s(490),value:function(t,e){var r=s,e=HAS_APIS[r(492)][e]?Object[r(495)]({name:e},HAS_APIS[r(492)][e]):{status:3};this[r(519)](r(505),t,e)}},{key:s(465),value:function(t){var e=s,r=(e(500),{".css":"wxssModular",".json":e(453)}),n=t[e(476)](t[e(513)](".")),r=null!=(r=r[n])?r:"otherModular";n!==e(484)&&".json"!==n&&r!==e(487)||this.transform(r,t,{status:1})}},{key:s(519),value:function(t,e,r){var n=s,e=path[n(464)](this[n(502)][n(447)],e);this[n(455)][n(468)][e]=this[n(455)][n(468)][e]||{status:r[n(461)],components:[],type:t},null!=r&&r[n(467)]&&this[n(455)][n(468)][e][n(488)][n(521)](r)}},{key:"report",value:function(){var n=s,o=this,t=((new Date)[n(457)]()-this[n(511)])/1e3+"s",e=this[n(455)].tableInfo,a=(e[n(497)]=t,e[n(450)]=Object[n(512)](this.pageData.transforms)[n(500)],{1:n(444),2:"partial",3:n(446)}),t=(Object[n(466)](this[n(455)][n(468)])[n(520)](function(t){var e,r=n;null!=(e=t[r(488)])&&e[r(500)]||(t.status=1),o[r(455)][r(474)][a[t[r(461)]]]+=1}),this[n(455)][n(474)][n(454)]=e[n(450)],n(480)+JSON[n(442)](this[n(455)],null," ")),e=path[n(443)](this[n(502)].outputPath,n(514)),t=(commonUtils[n(475)](path[n(443)](__dirname,n(494)),e),fs[n(516)](path[n(443)](e,n(441)),t,n(507)),path[n(443)](e,n(445)));logger[n(518)](n(472)[n(501)](t))}}])})(),convertManager=new ConvertManager;function _0x2501(t,e){var r=_0x3690();return(_0x2501=function(t,e){return r[t-=441]})(t,e)}module.exports=convertManager;
|
|
@@ -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 _0x3e48a7=_0x3c4c;function _0x5b04(){var r=["createTransformReportFile","__await","resolve","asyncIterator","notifyConfig","createDirs","../../common/log4js.js","catch","concat","values","inputPath","init","stop","normal","yes","value","call","Generator","_invoke","keys","iterator result is not an object","../features/transformReport","GeneratorFunction","all","949260mqVxuu","clearResource","wrap","outPath","illegal catch attempt","ascf/ascf_src","try statement without catch or finally","src","Applets","prototype","setOriginPtahObject","setPrototypeOf","apply","Output directory cannot be a subdirectory of the input directory.","isGeneratorFunction","194RccKpe","27mcKJtz","object","stat","completed","184865jqptBL","toString","adaptApiFile","reverse","executing","done","suspendedYield","app.json","../../common/utils","name","create","iterator","111503onLnvC","10770826SpnSwl","return","miniprogramRoot","displayName","env","finally","rval","delegate","' method","completion","projectConfigFile","next","tryEntries","appletType","configBasenameArray","../common/commonConfig","tryLoc","confirmConverterFun","@@asyncIterator","throw","rmdir","mark","prev","@@toStringTag","packageName","continue","getLogger","AsyncIterator","projectFileSuffix","readFileSync","completeTransform","appJsonFile","sent","copyDir","smartProgramRoot","264YYRSAm","method","forEach","dirname","confirmAddConfig","length","slice","649660OSXshp","path","join","5745Ovwzit","checkInputPathFun","hxml","72dlhQgk","unlink","function","failedTransform","dispatchException","root","error","message","afterLoc","toStringTag","map","srcRootPath","reset","push","sep"," is not iterable","finallyLoc","__proto__","[object Generator]","defineProperty","end","readdir","constructor","abrupt","getPrototypeOf","then","__esModule","catchLoc","The iterator does not provide a '","complete","type","confirmConverterH5Fun","symbol","report","existsSync","1469580MtvRhQ","arg","startsWith","hasOwnProperty","break","parse","_sent"];return(_0x5b04=function(){return r})()}function _typeof(r){var e=_0x3c4c;return(_typeof="function"==typeof Symbol&&e(532)==typeof Symbol[e(597)]?function(r){return typeof r}:function(r){var t=e;return r&&t(502)==typeof Symbol&&r[t(522)]===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(r)}function _regeneratorRuntime(){var s=_0x3c4c;_regeneratorRuntime=function(){return c};var f,c={},r=Object[s(575)],p=r[s(538)],m=Object[s(519)]||function(r,t,e){var n=s;r[t]=e[n(557)]},t=s(502)==typeof Symbol?Symbol:{},a=t[s(597)]||"@@iterator",e=t[s(545)]||s(470),n=t[s(509)]||s(475);function o(r,t,e){return Object[s(519)](r,t,{value:e,enumerable:!0,configurable:!0,writable:!0}),r[t]}try{o({},"")}catch(r){o=function(r,t,e){return r[t]=e}}function u(r,t,e,n){var o,a,i,c,u=s,t=t&&t[u(575)]instanceof d?t:d,t=Object[u(596)](t.prototype),n=new O(n||[]);return m(t,u(560),{value:(o=r,a=e,i=n,c=l,function(r,t){var e=_0x3c4c;if(c===_)throw Error("Generator is already running");if(c===g){if(e(471)===r)throw t;return{value:f,done:!0}}for(i[e(488)]=r,i[e(536)]=t;;){var n=i.delegate;if(n){n=function r(t,e){var n=s,o=e[n(488)],a=t[n(597)][o];if(a===f)return e[n(606)]=null,n(471)===o&&t[n(597)][n(600)]&&(e[n(488)]=n(600),e[n(536)]=f,r(t,e),n(471)===e[n(488)])||n(600)!==o&&(e[n(488)]=n(471),e[n(536)]=new TypeError(n(528)+o+n(607))),y;o=h(a,t[n(597)],e[n(536)]);if(n(471)===o[n(530)])return e[n(488)]=n(471),e.arg=o[n(536)],e.delegate=null,y;a=o[n(536)];return a?a.done?(e[t.resultName]=a[n(557)],e[n(610)]=t.nextLoc,n(600)!==e[n(488)]&&(e[n(488)]=n(610),e[n(536)]=f),e[n(606)]=null,y):a:(e.method=n(471),e[n(536)]=new TypeError(n(562)),e[n(606)]=null,y)}(n,i);if(n){if(n===y)continue;return n}}if("next"===i[e(488)])i[e(484)]=i[e(541)]=i.arg;else if("throw"===i[e(488)]){if(c===l)throw c=g,i.arg;i[e(504)](i[e(536)])}else e(600)===i[e(488)]&&i[e(523)](e(600),i[e(536)]);c=_;n=h(o,a,i);if(e(555)===n.type){if(c=i[e(591)]?g:v,n[e(536)]===y)continue;return{value:n[e(536)],done:i.done}}"throw"===n[e(530)]&&(c=g,i.method=e(471),i[e(536)]=n[e(536)])}})}),t}function h(r,t,e){var n=s;try{return{type:"normal",arg:r[n(558)](t,e)}}catch(r){return{type:n(471),arg:r}}}c[s(568)]=u;var l="suspendedStart",v=s(592),_=s(590),g=s(585),y={};function d(){}function i(){}function x(){}var t={},b=(o(t,a,function(){return this}),Object[s(524)]),b=b&&b(b(F([]))),C=(b&&b!==r&&p[s(558)](b,a)&&(t=b),x.prototype=d[s(575)]=Object[s(596)](t));function w(r){["next","throw",s(600)].forEach(function(t){o(r,t,function(r){return this[_0x3c4c(560)](t,r)})})}function j(c,u){var t,o=s;m(this,o(560),{value:function(e,n){function r(){return new u(function(r,t){!function t(r,e,n,o){var a,i=_0x3c4c,r=h(c[r],c,e);if(i(471)!==r[i(530)])return(e=(a=r[i(536)]).value)&&i(583)==_typeof(e)&&p[i(558)](e,i(543))?u[i(544)](e[i(543)])[i(525)](function(r){t(i(610),r,n,o)},function(r){t(i(471),r,n,o)}):u[i(544)](e)[i(525)](function(r){a[i(557)]=r,n(a)},function(r){return t("throw",r,n,o)});o(r[i(536)])}(e,n,r,t)})}return t=t?t[o(525)](r,r):r()}})}function P(r){var t=s,e={tryLoc:r[0]};1 in r&&(e[t(527)]=r[1]),2 in r&&(e[t(516)]=r[2],e.afterLoc=r[3]),this[t(611)][t(513)](e)}function S(r){var t=s,e=r[t(608)]||{};e[t(530)]="normal",delete e[t(536)],r[t(608)]=e}function O(r){var t=s;this[t(611)]=[{tryLoc:t(505)}],r.forEach(P,this),this[t(512)](!0)}function F(e){var n=s;if(e||""===e){var o,r=e[a];if(r)return r.call(e);if(n(502)==typeof e[n(610)])return e;if(!isNaN(e[n(492)]))return o=-1,(r=function r(){for(var t=n;++o<e[t(492)];)if(p[t(558)](e,o))return r.value=e[o],r[t(591)]=!1,r;return r.value=f,r[t(591)]=!0,r})[n(610)]=r}throw new TypeError(_typeof(e)+n(515))}return i[s(575)]=x,m(C,s(522),{value:x,configurable:!0}),m(x,s(522),{value:i,configurable:!0}),i[s(602)]=o(x,n,s(564)),c[s(580)]=function(r){var t=s,r=t(502)==typeof r&&r[t(522)];return!!r&&(r===i||t(564)===(r.displayName||r[t(595)]))},c[s(473)]=function(r){var t=s;return Object[t(577)]?Object.setPrototypeOf(r,x):(r[t(517)]=x,o(r,n,t(564))),r[t(575)]=Object[t(596)](C),r},c.awrap=function(r){return{__await:r}},w(j[s(575)]),o(j[s(575)],e,function(){return this}),c[s(479)]=j,c.async=function(r,t,e,n,o){var a=s,i=(void 0===o&&(o=Promise),new j(u(r,t,e,n),o));return c[a(580)](t)?i:i[a(610)]()[a(525)](function(r){var t=a;return r.done?r.value:i[t(610)]()})},w(C),o(C,n,s(559)),o(C,a,function(){return this}),o(C,s(587),function(){return s(518)}),c.keys=function(r){var t,n=s,o=Object(r),a=[];for(t in o)a[n(513)](t);return a[n(589)](),function r(){for(var t=n;a.length;){var e=a.pop();if(e in o)return r[t(557)]=e,r[t(591)]=!1,r}return r[t(591)]=!0,r}},c[s(551)]=F,O[s(575)]={constructor:O,reset:function(r){var t=s;if(this.prev=0,this[t(610)]=0,this[t(484)]=this[t(541)]=f,this[t(591)]=!1,this.delegate=null,this.method="next",this[t(536)]=f,this[t(611)][t(489)](S),!r)for(var e in this)"t"===e.charAt(0)&&p[t(558)](this,e)&&!isNaN(+e[t(493)](1))&&(this[e]=f)},stop:function(){var r=s,t=(this[r(591)]=!0,this[r(611)][0][r(608)]);if(r(471)===t.type)throw t[r(536)];return this.rval},dispatchException:function(n){var o=s;if(this[o(591)])throw n;var a=this;function r(r,t){var e=o;return i[e(530)]=e(471),i[e(536)]=n,a[e(610)]=r,t&&(a[e(488)]=e(610),a[e(536)]=f),!!t}for(var t=this[o(611)][o(492)]-1;0<=t;--t){var e=this[o(611)][t],i=e.completion;if(o(505)===e[o(615)])return r("end");if(e.tryLoc<=this[o(474)]){var c=p.call(e,"catchLoc"),u=p[o(558)](e,o(516));if(c&&u){if(this[o(474)]<e.catchLoc)return r(e.catchLoc,!0);if(this[o(474)]<e[o(516)])return r(e.finallyLoc)}else if(c){if(this[o(474)]<e.catchLoc)return r(e[o(527)],!0)}else{if(!u)throw Error(o(572));if(this[o(474)]<e.finallyLoc)return r(e[o(516)])}}}},abrupt:function(r,t){for(var e=s,n=this[e(611)][e(492)]-1;0<=n;--n){var o=this.tryEntries[n];if(o[e(615)]<=this[e(474)]&&p[e(558)](o,e(516))&&this[e(474)]<o[e(516)]){var a=o;break}}var i=(a=a&&(e(539)===r||e(477)===r)&&a[e(615)]<=t&&t<=a[e(516)]?null:a)?a[e(608)]:{};return i[e(530)]=r,i.arg=t,a?(this[e(488)]=e(610),this.next=a[e(516)],y):this[e(529)](i)},complete:function(r,t){var e=s;if(e(471)===r[e(530)])throw r[e(536)];return e(539)===r[e(530)]||e(477)===r.type?this[e(610)]=r.arg:e(600)===r[e(530)]?(this[e(605)]=this[e(536)]=r.arg,this.method=e(600),this[e(610)]=e(520)):e(555)===r[e(530)]&&t&&(this[e(610)]=t),y},finish:function(r){for(var t=s,e=this.tryEntries[t(492)]-1;0<=e;--e){var n=this[t(611)][e];if(n[t(516)]===r)return this[t(529)](n.completion,n[t(508)]),S(n),y}},catch:function(r){for(var t=s,e=this[t(611)][t(492)]-1;0<=e;--e){var n,o,a=this.tryEntries[e];if(a[t(615)]===r)return"throw"===(n=a[t(608)])[t(530)]&&(o=n[t(536)],S(a)),o}throw Error(t(570))},delegateYield:function(r,t,e){var n=s;return this[n(606)]={iterator:F(r),resultName:t,nextLoc:e},n(610)===this[n(488)]&&(this.arg=f),y}},c}function asyncGeneratorStep(r,t,e,n,o,a,i){var c=_0x3c4c;try{var u=r[a](i),s=u[c(557)]}catch(r){return void e(r)}u.done?t(s):Promise[c(544)](s).then(n,o)}function _asyncToGenerator(u){return function(){var r=this,c=arguments;return new Promise(function(t,e){var n=_0x3c4c,o=u[n(578)](r,c);function a(r){asyncGeneratorStep(o,t,e,a,i,n(610),r)}function i(r){asyncGeneratorStep(o,t,e,a,i,n(471),r)}a(void 0)})}}(()=>{for(var r=_0x3c4c,t=_0x5b04();;)try{if(321225==+parseInt(r(497))*(parseInt(r(581))/2)+parseInt(r(566))/3+-parseInt(r(535))/4+-parseInt(r(586))/5*(parseInt(r(500))/6)+parseInt(r(598))/7*(-parseInt(r(487))/8)+parseInt(r(582))/9*(-parseInt(r(494))/10)+parseInt(r(599))/11)break;t.push(t.shift())}catch(r){t.push(t.shift())}})(),Object[_0x3e48a7(519)](exports,_0x3e48a7(526),{value:!0}),exports.checkInputPathFun=exports[_0x3e48a7(531)]=exports.confirmConverterFun=void 0;var commonConfig_1=require(_0x3e48a7(614)),path=require(_0x3e48a7(495)),fs=require("fs"),commonUtils_1=require("../common/commonUtils"),_require=require(_0x3e48a7(594)),clearResource=_require[_0x3e48a7(567)],log4js=require(_0x3e48a7(548)),logger=log4js[_0x3e48a7(478)]("converter"),_require2=require(_0x3e48a7(563)),addTransformUrl=_require2.addTransformUrl,convertManager=require("../convertManager.js");function confirmConverterFun(r,t){return _confirmConverterFun[_0x3e48a7(578)](this,arguments)}function _confirmConverterFun(){var t=_0x3e48a7;return(_confirmConverterFun=_asyncToGenerator(_regeneratorRuntime()[t(473)](function r(e,n){var o,a,i=t;return _regeneratorRuntime()[i(568)](function(r){for(var t=i;;)switch(r.prev=r.next){case 0:if(r[t(474)]=0,o=path.resolve(e[t(552)],t(593)),a=path[t(544)](e[t(552)],"project.config.json"),fs[t(534)](a)||!fs[t(534)](o)||e[t(491)]){r[t(610)]=7;break}return r[t(523)](t(600),{command:t(546)});case 7:return r[t(610)]=9,doConvert(e,n);case 9:return r[t(523)](t(600),r.sent);case 10:r[t(610)]=16;break;case 12:return r[t(474)]=12,r.t0=r.catch(0),logger.error(r.t0),r[t(523)](t(600),{command:t(503),errorMessage:r.t0[t(507)]});case 16:case t(520):return r[t(554)]()}},r,null,[[0,12]])}))).apply(this,arguments)}function _0x3c4c(r,t){var e=_0x5b04();return(_0x3c4c=function(r,t){return e[r-=469]})(r,t)}function confirmConverterH5Fun(r,t){var e=_0x3e48a7,n=path[e(496)](r[e(569)],r[e(476)]);try{return commonUtils_1.createDirs(n,e(573),!0),commonUtils_1[e(485)](path[e(496)](__filename,"../lib",e(573)),path.join(n,e(573)),!1,!0),commonUtils_1.handleConfigInfo(r,path.join(n,"src")),{command:e(482)}}catch(r){return logger[e(506)](r),{command:e(503),errorMessage:r[e(507)]}}}function checkConvertOutput(r,t){var e=_0x3e48a7,r=path.resolve(r),t=path[e(544)](t);if(fs[e(534)](t))throw new Error("Output path "[e(550)](t," is exists. Use the -c parameter to clear."));if(t[e(537)](r+path[e(514)]))throw new Error(e(579))}function doConvert(r,t){return _doConvert.apply(this,arguments)}function _doConvert(){var c=_0x3e48a7;return(_doConvert=_asyncToGenerator(_regeneratorRuntime()[c(473)](function r(e,t){var n,o,a,i=c;return _regeneratorRuntime()[i(568)](function(r){for(var t=i;;)switch(r[t(474)]=r[t(610)]){case 0:if(n=path[t(544)](e[t(569)],t(571)),process[t(603)][t(567)]===t(556))return r[t(610)]=4,clearResource([n]);r.next=4;break;case 4:return checkConvertOutput(e[t(552)],n),o=commonConfig_1[t(574)][t(511)],convertManager[t(553)]({appletType:commonConfig_1[t(574)][t(612)],inputPath:e[t(552)],outputPath:n}),r[t(474)]=7,commonUtils_1[t(547)](n,o),commonUtils_1[t(542)](n,e[t(552)]),a=path.join(n,o),"./"===o||""===o?(commonUtils_1.setOriginPtahObject(e.inputPath,a),commonUtils_1[t(485)](e[t(552)],a)):(commonUtils_1[t(576)](path.join(e[t(552)],o),a),commonUtils_1[t(485)](path[t(496)](e[t(552)],o),a),commonUtils_1.copyConfigFiles(path[t(496)](e[t(552)]),n)),commonUtils_1.transformNodeModuleComponent(),commonUtils_1[t(483)](path[t(496)](n,o),e),commonUtils_1[t(609)](path.join(n)),"my"===commonConfig_1[t(574)].appletType&&commonUtils_1[t(588)](n,path.join(__filename,"../../")),addTransformUrl(),convertManager[t(533)](),r[t(523)](t(600),{command:"completeTransform",folderUrl:n});case 21:return r[t(474)]=21,r.t0=r[t(549)](7),logger[t(506)](r.t0),removePromise(n)[t(604)](),r[t(523)]("return",{command:"failedTransform",errorMessage:r.t0[t(507)]});case 26:case t(520):return r[t(554)]()}},r,null,[[7,21]])})))[c(578)](this,arguments)}function removePromise(a){return new Promise(function(o,r){var e=_0x3c4c;fs[e(584)](a,function(r,t){var n=e;t.isDirectory()?fs[n(521)](a,function(r,t){var e=n,t=(t=t.map(function(r){return path.join(a,r)}))[e(510)](function(r){return removePromise(r)});Promise[e(565)](t)[e(525)](function(){fs[e(472)](a,o)})}):fs[n(501)](a,o)})})}function checkInputPathFun(r){var t=_0x3e48a7,r=path.resolve(r);return{command:"postInputPath",data:{returnCode:checkMiniProgram(r),outPath:path[t(490)](r)}}}function checkMiniProgram(r){var t=_0x3e48a7,e=!0,n=path[t(496)](r,t(593));return e=fs[t(534)](n)&&identifyProgram(r)?e:!1}function identifyProgram(r){var t=_0x3e48a7;try{var e=path[t(496)](r,t(593)),n=JSON[t(540)](fs[t(481)](e)[t(587)]());if(n&&n.pages&&Array.isArray(n.pages)&&0<n.pages[t(492)])for(var o=getSrcRootPath(r),a=0,i=Object[t(561)](commonConfig_1.projectFileSuffix);a<i.length;a++){var c=i[a],u=path[t(496)](r,o,n.pages[0]+commonConfig_1[t(480)][c][t(499)]);if(fs.existsSync(u))return"wx"===c?commonConfig_1.Applets[t(612)]="tt":commonConfig_1[t(574)][t(612)]=c,!0}return!1}catch(r){return!1}}function getSrcRootPath(r){var t=_0x3e48a7;commonConfig_1.Applets[t(511)]="./";for(var e=0;e<commonConfig_1[t(613)][t(492)];e++){var n=commonConfig_1.configBasenameArray[e],n=path[t(496)](r,n);fs[t(534)](n)&&((n=JSON[t(540)](fs.readFileSync(n).toString()))[t(601)]?commonConfig_1[t(574)][t(511)]=n.miniprogramRoot:n[t(486)]?commonConfig_1.Applets[t(511)]=n[t(486)]:commonConfig_1.Applets[t(511)]="./")}return commonConfig_1.Applets[t(511)]}exports[_0x3e48a7(469)]=confirmConverterFun,exports.confirmConverterH5Fun=confirmConverterH5Fun,exports[_0x3e48a7(498)]=checkInputPathFun;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x1aef24=_0x10bd;function _0x10bd(e,t){var r=_0x2891();return(_0x10bd=function(e,t){return r[e-=227]})(e,t)}(()=>{for(var e=_0x10bd,t=_0x2891();;)try{if(600925==+parseInt(e(258))+-parseInt(e(277))/2+-parseInt(e(239))/3+-parseInt(e(292))/4+parseInt(e(240))/5+-parseInt(e(254))/6+parseInt(e(274))/7*(parseInt(e(265))/8))break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object[_0x1aef24(288)](exports,_0x1aef24(256),{value:!0}),exports.transformJsPath=exports[_0x1aef24(262)]=exports[_0x1aef24(270)]=exports[_0x1aef24(232)]=exports.handleWxssImport=void 0;var globalDistanceCount,globalJsLine,path=require("path"),fs=require("fs"),_require=require(_0x1aef24(247)),create=_require[_0x1aef24(298)],fileHandle_1=require(_0x1aef24(233)),commonConfig_1=require(_0x1aef24(263)),commonUtils_1=require("../common/commonUtils"),importVisitor_1=require(_0x1aef24(251)),wxssParser_1=require("../parse/wxssParser"),commonConfig_2=require(_0x1aef24(263)),TransformReport=require(_0x1aef24(264)),parse5=require("../compiler-utils/parse5.bundle"),_require2=require(_0x1aef24(267)),configs=_require2[_0x1aef24(272)],convertManager=require(_0x1aef24(266)),insertedApiObj={},insertedApiCountObj={},excessOffsets={},DEST_API_NAME=_0x1aef24(245),DEST_API_LEN=DEST_API_NAME[_0x1aef24(275)];function handleWxssImport(e,r,n){var a=_0x1aef24,o=commonConfig_1.projectFileSuffix[n],e=create(e,r),e=(r=e[a(280)](),wxssParser_1[a(236)](r,e,o[a(297)],n)),s=0;return e[a(253)](function(e){var t=a;e[t(249)]===t(243)?(";"!==r[e[t(227)]+1-s]&&(e[t(227)]=e[t(227)]+1),r=commonUtils_1.replacepos(r,e[t(227)]-o.css[t(275)]-s,e.endOffset-s,t(286)),s+=o[t(297)][t(275)]-4):(r=commonUtils_1.replacepos(r,e.startOffset-s,e[t(252)]+n[t(275)]+1-s,""),s+=n[t(275)]+1)}),r}function handleWxmlFile(e,t,r,n){var a=_0x1aef24,t=create(e,t),t=parse5[a(242)](t.getText(),{}),e={filePath:e,srcPath:r,appType:n,utils:{commonConfig:commonConfig_1,importVisitor:importVisitor_1,textDocument:{create:create},fileHandle:fileHandle_1}};return parse5[a(257)](t,{convertOptions:e})}function _0x2891(){var e=["./transformReport","13493944FYcBEJ","../convertManager","../../common/config","module","behaviors","transformWxsFilePath"," TODO","configs","moduleRange","7JqJwGp","length","setLanguage","1481966qrhTGk","transformJs","keys","getText","extname","uri","api ",',"column":',"property",".css","wxInterface","defineProperty","existsSync","start","invalidApis","489280cKpoyc","transformJsPath","projectFileSuffix","hxml","concat","css","create","handleWxssImport","notaddtodo","getImportRules","endOffset","hjs","offsetAt","insertStr","fileImport","handleWxmlFile","../features/fileHandle","join","interfacesForTransform","wxssParser","// ","notSupport","389409LMUrfc","1929145NoxsVE","mixins","parseFragment","import","wxSchema","has",' {"line":',"../common/textDocument","startsWith","type","character","../parse/importVisitor","startOffset","forEach","6540138ZsRWzv","replacepos","__esModule","serialize","611482ifGjWY","line",".js","has:","transformJsFile","../common/commonConfig"];return(_0x2891=function(){return e})()}function transformWxSchemas(e,t,r){var n=_0x1aef24,a=e[n(273)][n(290)],t=t.offsetAt({line:a[n(259)]-1,character:a[n(250)]+1});return r=commonUtils_1[n(255)](r,t+globalDistanceCount,t+e[n(268)][n(275)]+globalDistanceCount,n(261)),globalDistanceCount-=e.module[n(275)]-4,r}function transformWxmlWxsFilePath(e,t,r){var n=_0x1aef24,a=e[n(273)].start,t=t[n(229)]({line:a[n(259)]-1,character:a[n(250)]});return r=commonUtils_1[n(255)](r,t+globalDistanceCount,t+globalDistanceCount+e[n(268)].length-1,4===e[n(268)][n(275)]?n(228):n(295))}function transformWxsFilePath(e,s,i,c,t){var f=_0x1aef24,l=0,m=commonConfig_1[f(294)][t];return e[f(253)](function(e){var t=f;if(path[t(281)](e[t(268)])===m[t(228)]){var r=e[t(268)],n=e[t(273)][t(290)],n=s[t(229)]({line:n[t(259)]-1,character:n[t(250)]-1})+l,a=e[t(268)].substring(0,e[t(268)][t(275)]-(m[t(228)].length-1))+"hjs";if(r&&!r.startsWith("./")&&!r[t(248)]("../")){var o=path[t(234)](c,"..",r);if(!path.extname(o))return;fs[t(289)](o)&&(o=".",r.startsWith("/")?l+=1:(o="./",l+=2),a=o+a)}i=commonUtils_1[t(255)](i,n,n+e[t(268)].length,a)}}),i}function calProcessedApis(e,t){e[t]?e[t]++:e[t]=1}function notDealtWith(e,t){var r=_0x1aef24;return-1!==commonConfig_2[r(291)].indexOf(e.property)&&!(-1!==Object[r(279)](insertedApiObj).indexOf(t)&&insertedApiObj[t]===e[r(285)])}function insertTodoInline(e,t,r,n){var a=_0x1aef24,o=1,n=a(237).concat(commonUtils_1[a(276)](a(238)),"api ")[a(296)](DEST_API_NAME,".")[a(296)](n.property,a(271)),r=(1===insertedApiCountObj[t]&&(o=0,n+="\n",globalJsLine++),r+globalDistanceCount-excessOffsets[t]-o);return e=commonUtils_1.insertStr(e,r,n),globalDistanceCount+=n[a(275)],e}function transformWxInterface(e,t,r,n){var a=_0x1aef24,o=e.moduleRange[a(290)],s=t[a(282)]()+"-"+o[a(259)],i=t[a(229)]({line:o[a(259)]-1,character:o[a(250)]}),c=i+globalDistanceCount;return r=commonUtils_1[a(255)](r,c,c+n[a(275)],DEST_API_NAME),globalDistanceCount+=DEST_API_LEN-n[a(275)],calProcessedApis(excessOffsets,s),commonConfig_2[a(235)][e[a(285)]]?(c=i+globalDistanceCount+n.length+1,r=commonUtils_1[a(255)](r,c,c+e.property[a(275)],commonConfig_2[a(235)][e[a(285)]]),i=e[a(285)][a(275)]-commonConfig_2[a(235)][e[a(285)]][a(275)],globalDistanceCount-=i,excessOffsets[s]-=i):notDealtWith(e,s)&&(calProcessedApis(insertedApiCountObj,s),n=t.offsetAt({line:o[a(259)]-1,character:0}),c=o.line,configs[a(300)]||(r=insertTodoInline(r,s,n,e)),i=t.uri()+a(246)+(c+globalJsLine)+a(284)+o.character+"}",TransformReport.writeInfo(""[a(296)](commonUtils_1.setLanguage(a(238)),a(283))[a(296)](DEST_API_NAME,".")[a(296)](e[a(285)]),i),insertedApiObj[s]=e[a(285)]),r}function transformJsFile(r,n,a,o){var s=_0x1aef24,i=create(r,a),e=(a=i[s(280)](),importVisitor_1[s(301)](a,null,null,o));return globalJsLine=globalDistanceCount=0,e[s(253)](function(e){var t=s;switch(e.type){case t(231):a=transformJsPath(e,n,a,i);break;case t(287):a=transformWxInterface(e,i,a,o),convertManager[t(278)](r,"".concat(DEST_API_NAME,".")[t(296)](e[t(285)]));break;case"filePath":a=transformWxmlWxsFilePath(e,i,a);break;case t(244):a=transformWxSchemas(e,i,a);break;case t(241):a=transformComponentMixins(e,i,a)}}),a}function transformComponentMixins(e,t,r){var n=_0x1aef24,a=e.moduleRange[n(290)],t=t[n(229)]({line:a[n(259)]-1,character:a.character});return r=commonUtils_1[n(255)](r,t+globalDistanceCount,t+e[n(268)][n(275)]+globalDistanceCount,n(269)),globalDistanceCount-=e[n(268)][n(275)]-9,r}function transformJsPath(e,t,r,n){var a=_0x1aef24,o=e[a(268)];return!o||o.startsWith("./")||o[a(248)]("../")||(t=path[a(234)](t,"..",o),path[a(281)](t)||(t+=a(260)),fs[a(289)](t)&&(t=e[a(273)][a(290)],e=n[a(229)]({line:t.line-1,character:t.character-1})+globalDistanceCount,n=".",o[a(248)]("/")?globalDistanceCount+=1:(n="./",globalDistanceCount+=2),r=commonUtils_1[a(230)](r,e,n))),r}exports[_0x1aef24(299)]=handleWxssImport,exports[_0x1aef24(232)]=handleWxmlFile,exports[_0x1aef24(270)]=transformWxsFilePath,exports[_0x1aef24(262)]=transformJsFile,exports[_0x1aef24(293)]=transformJsPath;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
function _0xae20(){var r=["appendFile","getGlobleOutPutPath","Error: ","length","1512602cflgpH","__esModule","274047RIBiwI","readFileSync","6dVcphD","setLanguage","2271076tJccfL","../../common/url.json","writeInfo","603yZgExK","37136iqgevr","resolve","parse","656310ELkrOp","join","7270390qqytpQ","write","position","insertInfo","15ZbxQFf","toString","1834gmQwlF","addTransformUrl","writeFileSync","\n\n\n","path","defineProperty"];return(_0xae20=function(){return r})()}function _0x1b9f(r,t){var n=_0xae20();return(_0x1b9f=function(r,t){return n[r-=466]})(r,t)}var _0x80c9fc=_0x1b9f,commonUtils_1=((()=>{for(var r=_0x1b9f,t=_0xae20();;)try{if(314162==-parseInt(r(486))*(parseInt(r(488))/2)+parseInt(r(469))/3+parseInt(r(473))/4+-parseInt(r(480))/5+-parseInt(r(471))/6*(-parseInt(r(467))/7)+parseInt(r(477))/8*(parseInt(r(476))/9)+-parseInt(r(482))/10)break;t.push(t.shift())}catch(r){t.push(t.shift())}})(),Object[_0x80c9fc(493)](exports,_0x80c9fc(468),{value:!0}),exports[_0x80c9fc(485)]=exports[_0x80c9fc(475)]=void 0,require("../common/commonUtils")),fs=require("fs"),path=require(_0x80c9fc(492)),unsupportedApis=[];function addTransformUrl(){var r=_0x80c9fc,t=path[r(478)](__dirname,r(474)),t=JSON[r(479)](fs[r(470)](t)[r(487)]());0<unsupportedApis[r(466)]&&(unsupportedApis.push("以上接口当前版本暂不支持,请期待后续更新。\n如有需要使用请参考官方文档获取暂不支持的接口处理方式:"+t.transformLogUrl),write(unsupportedApis[r(481)]("")))}function writeInfo(r,t){var n=_0x80c9fc,r=[n(496),r,"\n",commonUtils_1[n(472)](n(484)),t,n(491)][n(481)]("");unsupportedApis.push(r)}function insertInfo(r){var t=_0x80c9fc,n=fs[t(470)](commonUtils_1[t(495)]())[t(487)]();fs[t(490)](commonUtils_1[t(495)](),r),write(n)}function write(r){r&&fs[_0x80c9fc(494)](commonUtils_1.getGlobleOutPutPath(),r,function(r){if(r)throw r})}exports[_0x80c9fc(489)]=addTransformUrl,exports[_0x80c9fc(475)]=writeInfo,exports[_0x80c9fc(485)]=insertInfo,exports[_0x80c9fc(483)]=write;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function _typeof(a){var t=
|
|
1
|
+
function _typeof(a){var t=_0x41c3;return(_typeof="function"==typeof Symbol&&t(510)==typeof Symbol[t(539)]?function(a){return typeof a}:function(a){var e=t;return a&&e(529)==typeof Symbol&&a[e(511)]===Symbol&&a!==Symbol[e(492)]?e(510):typeof a})(a)}function _0x41c3(a,e){var t=_0x563f();return(_0x41c3=function(a,e){return t[a-=474]})(a,e)}function _defineProperty(a,e,t){var r=_0x41c3;return(e=_toPropertyKey(e))in a?Object[r(498)](a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function _toPropertyKey(a){var e=_0x41c3,a=_toPrimitive(a,e(527));return e(510)==_typeof(a)?a:a+""}function _0x563f(){var a=["brightness","setScreenBrightness","toFixed","119774HleERT","1047KhBfPx","saveImageToPhotosAlbum","showLoading","@@toPrimitive must return a primitive value.","filePath","__apiAdapterConverted","chooseImage","12ufvFSF","code","string","toPrimitive","function","14NqAdpY","length","getStorageSync","3808pSalnS","makePhoneCall","quality","771790xStRfu","object","call","iterator","keys","tempFilePath","saveFile","apply","eventName","src","clearStorageSync","itemList","title","index","setClipboardData","getScreenBrightness","apFilePaths","sort","callBack","name","compressImage","8082zXvxgh","level","getFileInfo","phoneNumber","data","concat","prototype","text","apFilePath","forEach","defaultImgVuality","12228825RmllsN","defineProperty","returnVal","downloadFile","getClipboardData","params","isArray","value","29679837hocrNN","setStorageSync","success","apiName","13884wddmYL","symbol","constructor","onlyFromCamera","5293490Qlomuj"];return(_0x563f=function(){return a})()}function _toPrimitive(a,e){var t=_0x41c3;if(t(537)!=_typeof(a)||!a)return a;var r=a[Symbol[t(528)]];if(void 0===r)return("string"===e?String:Number)(a);r=r[t(538)](a,e||"default");if(t(537)!=_typeof(r))return r;throw new TypeError(t(521))}(()=>{for(var a=_0x41c3,e=_0x563f();;)try{if(913536==-parseInt(a(517))*(parseInt(a(530))/2)+-parseInt(a(518))/3*(-parseInt(a(509))/4)+parseInt(a(536))/5*(-parseInt(a(525))/6)+-parseInt(a(497))/7+-parseInt(a(533))/8*(-parseInt(a(486))/9)+-parseInt(a(513))/10+parseInt(a(505))/11)break;e.push(e.shift())}catch(a){e.push(e.shift())}})(),(()=>{var a,e,s,n=_0x41c3;function i(e,t){e&&Object[n(540)](e).forEach(function(a){t[a]&&(t[e[a]]=t[a],delete t[a])})}has[n(523)]||(has[n(523)]=!0,a=[{apiName:n(524),callBack:[{eventName:n(507),params:{tempFilePaths:n(481)}}]},{apiName:n(542),params:{apFilePath:n(541)},callBack:[{eventName:n(507),params:{savedFilePath:n(494)}}]},{apiName:n(488),params:{apFilePath:"filePath"}},{apiName:"getSavedFileInfo",params:{apFilePath:n(522)}},{apiName:"removeSavedFile",params:{apFilePath:n(522)}},{apiName:n(479),params:{text:n(490)}},{apiName:n(501),callBack:[{eventName:n(507),params:{data:n(493)}}]},{apiName:n(519),params:{url:n(522)}},{apiName:n(520),params:{content:"title"}},{apiName:"showActionSheet",params:{items:n(476)},callBack:[{eventName:"success",params:{tapIndex:n(478)}}]},{apiName:"uploadFile",params:{fileName:n(484)}},{apiName:n(515),params:{brightness:n(504)}},{apiName:n(480),callBack:[{eventName:"success",params:{value:n(514)}}]},{apiName:"scanCode",params:{hideAlbum:n(512)},callBack:[{eventName:n(507),params:{result:n(526)}}]},{apiName:n(534),params:{number:n(489)}},{apiName:"showToast",params:{content:n(477)}},{apiName:n(500),callBack:[{eventName:"success",params:{tempFilePath:n(494)}}]}],e=[{apiName:n(532),params:{key:1},returnVal:"data"},{apiName:n(506),params:{key:1,data:2}},{apiName:"removeStorageSync",params:{key:1}},{apiName:n(475)}],s={},a[n(491)](e)[n(495)](function(a){a=a[n(508)];s[a]=has[a]}),a[n(495)](function(e){var t=n,r=e[t(508)];has[r]=function(){var a=t,n=0<arguments[a(531)]&&void 0!==arguments[0]?arguments[0]:{};return i(e[a(502)],n),e[a(483)]&&e[a(483)].forEach(function(e){var t=a,r=n[e[t(544)]];n[e[t(544)]]=function(a){i(e[t(502)],a),r(a)}}),s[r](n)}}),e[n(495)](function(i){var o=n,p=i[o(508)];has[p]=function(){var a=o,e=0<arguments[a(531)]&&void 0!==arguments[0]?arguments[0]:{},t=[],r=i[a(502)]&&Object[a(540)](i[a(502)])||[],n=(r[a(482)](function(a,e){return r[a]-r[e]}),r[a(495)](function(a){e[a]&&t.push(e[a])}),s[p][a(543)](s,t));return i[a(499)]?_defineProperty({},i[a(499)],n):{}}}),s.compressImage=has[n(485)],has.compressImage=function(){var t=n,a=0<arguments[t(531)]&&void 0!==arguments[0]?arguments[0]:{},e=(a[t(474)]=Array[t(503)](a[t(481)])?a[t(481)][0]:"",Number(a[t(487)])),r=(e<=3?a[t(535)]=(100/3*e)[t(516)](0):a[t(496)]=80,a.quality=Number(a.quality),a[t(507)]);return a[t(507)]=function(a){var e=t;a.apFilePaths=[a[e(541)]],r(a)},s[t(485)](a)})})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var _0x207753=_0x5949;function _0x4cd5(){var r=["391966Dtvels","substring","3428007zlHIzK","parse","length","defineProperty","2919lZEHVC","251271tBRLIr","100TDfeuR","classProperties","2JPAlPZ","702RoycSr","unambiguous","7472gCGiOF","babelTransform","626418eHQrWY","__esModule","1124cEVkPf","2340230jOLdGn"];return(_0x4cd5=function(){return r})()}function _0x5949(r,e){var n=_0x4cd5();return(_0x5949=function(r,e){return n[r-=244]})(r,e)}(()=>{for(var r=_0x5949,e=_0x4cd5();;)try{if(332824==-parseInt(r(254))*(-parseInt(r(245))/2)+-parseInt(r(246))/3*(parseInt(r(252))/4)+parseInt(r(253))/5+-parseInt(r(250))/6+-parseInt(r(260))/7*(parseInt(r(248))/8)+parseInt(r(261))/9*(-parseInt(r(262))/10)+parseInt(r(256))/11)break;e.push(e.shift())}catch(r){e.push(e.shift())}})(),Object[_0x207753(259)](exports,_0x207753(251),{value:!0}),exports[_0x207753(249)]=void 0;var babelParser=require("@babel/parser"),parseTryCount=0;function babelTransform(e,n){var t=_0x207753;try{var a=babelParser[t(257)](e,{sourceType:t(247),allowReturnOutsideFunction:!0,plugins:[t(244)]});return parseTryCount=0,a}catch(r){if(n){if(0===parseTryCount)return a=e.substring(0,n-1)+e[t(255)](n,e.length),parseTryCount++,babelTransform(a,n);if(parseTryCount<3)return a=e[t(255)](0,n)+","+e[t(255)](n,e[t(258)]),parseTryCount++,babelTransform(a,n);parseTryCount=0}return null}}exports[_0x207753(249)]=babelTransform;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _0x3d925c=_0x56ab;function _0x56ab(e,r){var t=_0x1385();return(_0x56ab=function(e,r){return t[e-=431]})(e,r)}function _0x1385(){var e=["wxSchema","@babel/core","isObjectProperty","babelTransform","getStatementParent","push","line","node","name","://","start","hxml","16eTBrLc","mixins","fileImport","StringLiteral","require","wxInterface","../common/commonConfig","properties","filePath","getOwnBinding","object","20478LCZfYh","10bxUsQJ","1155CULwKc","extname","source","forEach","MemberExpression","length","path","defineProperty","3880264LrocRH","callee","end","Component","property","column","@babel/traverse","hjs","17143430CXjQMc","1356063oshmWU","415587QjGpXw","5876300UedXHA","Identifier","splice","concat","test","4257648yQQvON","projectFileSuffix","findParent","arguments","types","11JWnzVn","ImportDeclaration","value","isObjectExpression","loc","CallExpression","key"];return(_0x1385=function(){return e})()}(()=>{for(var e=_0x56ab,r=_0x1385();;)try{if(711402==+parseInt(e(435))+parseInt(e(478))/2*(-parseInt(e(436))/3)+parseInt(e(487))/4+parseInt(e(437))/5+-parseInt(e(477))/6*(-parseInt(e(479))/7)+parseInt(e(466))/8*(-parseInt(e(442))/9)+-parseInt(e(434))/10*(parseInt(e(447))/11))break;r.push(r.shift())}catch(e){r.push(r.shift())}})(),Object[_0x3d925c(486)](exports,"__esModule",{value:!0}),exports.getImportRules=void 0;var babelParser_1=require("./babelParser"),babel_traverse_1=require(_0x3d925c(432)),pathTool=require(_0x3d925c(485)),commonConfig_1=require(_0x3d925c(472)),babelTypes=require(_0x3d925c(455))[_0x3d925c(446)];function getQaSchemasReg(e){var r=_0x3d925c;return new RegExp("^"[r(440)](e,r(463)))}var currentType,suffixs,importRules=[],visitor={ImportDeclaration:function(e){var r=_0x3d925c;importRules[r(459)]({type:r(468),module:e.node[r(481)][r(449)],moduleRange:{start:{line:e[r(461)].source[r(451)][r(464)][r(460)],character:e[r(461)][r(481)][r(451)][r(464)][r(431)]+2},end:{line:e[r(461)][r(481)][r(451)][r(489)][r(460)],character:e[r(461)][r(481)].loc[r(489)][r(431)]+2}}})},CallExpression:function(e){var t=_0x3d925c;e[t(461)].callee&&e.node[t(445)]&&e[t(461)][t(488)].name===t(470)&&1===e[t(461)].arguments[t(484)]&&importRules[t(459)]({type:t(468),module:e[t(461)][t(445)][0].value,moduleRange:{start:{line:e[t(461)][t(445)][0][t(451)][t(464)].line,character:e.node[t(445)][0][t(451)][t(464)][t(431)]+2},end:{line:e[t(461)][t(445)][0][t(451)][t(489)].line,character:e[t(461)][t(445)][0].loc[t(489)].column+2}}}),e[t(461)][t(488)]&&e[t(461)][t(445)]&&e[t(461)][t(488)][t(462)]===t(490)&&1===e[t(461)].arguments.length&&babelTypes[t(450)](e[t(461)].arguments[0])&&e[t(461)][t(445)][0].properties&&0<e[t(461)][t(445)][0][t(473)].length&&e[t(461)][t(445)][0][t(473)][t(482)](function(e){var r=t;babelTypes[r(456)](e)&&babelTypes.isIdentifier(e[r(453)])&&e[r(453)][r(462)]===r(467)&&importRules[r(459)]({type:r(467),module:e[r(453)][r(462)],moduleRange:{start:{line:e.loc.start.line,character:e[r(451)][r(464)][r(431)]},end:{line:e[r(453)][r(451)].end[r(460)],character:e[r(453)][r(451)].end[r(431)]}}})})},MemberExpression:function(e){var r=_0x3d925c;e[r(461)][r(476)]&&e[r(461)][r(491)]&&e.node[r(476)][r(462)]===currentType&&!hasParent(e,e[r(461)].object[r(462)])&&importRules[r(459)]({type:r(471),module:e.node[r(476)][r(462)],moduleRange:{start:{line:e[r(461)][r(476)][r(451)][r(464)][r(460)],character:e[r(461)][r(476)][r(451)][r(464)][r(431)]},end:{line:e[r(461)][r(476)][r(451)].end[r(460)],character:e[r(461)][r(476)][r(451)].end[r(431)]}},property:e[r(461)][r(491)][r(462)]})},Identifier:function(e){var r=_0x3d925c;e[r(461)][r(462)]!==currentType||0!==e.key||hasParent(e,e[r(461)].name)||importRules[r(459)]({type:r(471),module:e[r(461)].name,moduleRange:{start:{line:e[r(461)][r(451)][r(464)][r(460)],character:e[r(461)][r(451)].start[r(431)]},end:{line:e[r(461)].loc[r(489)].line,character:e[r(461)][r(451)].end[r(431)]}},property:null})},StringLiteral:function(e){var r,t=_0x3d925c;!e[t(461)][t(449)]||pathTool.extname(e[t(461)][t(449)])!==suffixs[t(465)]&&pathTool.extname(e[t(461)][t(449)])!==suffixs[t(433)]||(r=pathTool[t(480)](e.node[t(449)]),importRules.push({type:t(474),module:r,moduleRange:{start:{line:e[t(461)][t(451)].end[t(460)],character:e[t(461)][t(451)][t(489)].column-r.length},end:{line:e[t(461)].loc[t(489)].line,character:e[t(461)][t(451)][t(489)].column}}})),e.node[t(449)]&&getQaSchemasReg(currentType)[t(441)](e[t(461)][t(449)])&&importRules.push({type:t(454),module:"".concat(currentType,":"),moduleRange:{start:{line:e[t(461)][t(451)][t(464)][t(460)],character:e[t(461)][t(451)][t(464)][t(431)]},end:{line:e[t(461)][t(451)][t(464)].line,character:e[t(461)][t(451)].start[t(431)]+5}}})}};function hasParent(e,t){var n=_0x3d925c,a=!1;return e[n(458)]()[n(444)](function(e){var r=n;a||e.scope[r(475)](t)&&(a=!0)}),a}function clear(){importRules[_0x3d925c(439)](0,importRules.length)}function getImportRules(e,r){var t=_0x3d925c,n=2<arguments[t(484)]&&void 0!==arguments[2]&&arguments[2],a=3<arguments[t(484)]?arguments[3]:void 0,n=(currentType=a,suffixs=commonConfig_1[t(443)][a],a=n?{CallExpression:visitor[t(452)],ImportDeclaration:visitor[t(448)]}:{MemberExpression:visitor[t(483)],StringLiteral:visitor[t(469)],Identifier:visitor[t(438)],CallExpression:visitor[t(452)]},babelParser_1[t(457)](e,r));return clear(),babel_traverse_1.default(n,a),importRules}exports.getImportRules=getImportRules;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _0x2b61(e,t){var r=_0x41d6();return(_0x2b61=function(e,t){return r[e-=480]})(e,t)}var _0x327e70=_0x2b61,postcss=((()=>{for(var e=_0x2b61,t=_0x41d6();;)try{if(112377==+parseInt(e(525))+-parseInt(e(505))/2*(parseInt(e(495))/3)+parseInt(e(490))/4*(-parseInt(e(496))/5)+parseInt(e(524))/6+-parseInt(e(484))/7+-parseInt(e(527))/8*(parseInt(e(482))/9)+parseInt(e(513))/10)break;t.push(t.shift())}catch(e){t.push(t.shift())}})(),Object.defineProperty(exports,_0x327e70(500),{value:!0}),exports[_0x327e70(514)]=exports[_0x327e70(481)]=exports[_0x327e70(518)]=void 0,require(_0x327e70(502))),path=require(_0x327e70(497));function _0x41d6(){var e=["push","4314shVrQR","5FmXxDv","path",".*(?:\\r|\\n|$)))","start","__esModule","position","postcss","selector","line","10OuBLvX","end","rule","import","swan","exec","[\\s\\S]*?\\*\\/\\s*(?:\\r|\\n|$)|((?:^|\\n|\\r)\\s*\\/\\/.*","name","3390780siOWpW","wxssParser","index","getText","source","importReg","map","offsetAt","params","filter","replace","707082GgTSuu","36447SUbvWK","atrule","222000pDdyTm","concat","nodes","column","character","indexOf","importFileReg","18OFZpdR","substring","1202964sTZcXS","selectors","type","match","split","((?:^|\\n|\\r)\\s*\\/\\*[\\s\\S]*?","585812pNpFQJ","length","forEach","media"];return(_0x41d6=function(){return e})()}function wxssParser(t,r,i,p){var c=_0x327e70,n=[];try{n=postcss.parse(t)[c(529)][c(522)](function(e){var t=c;return e[t(486)]===t(526)&&"import"===e[t(512)]})[c(519)](function(e){var t=c;return{type:t(508),import:e[t(521)],position:{start:e[t(517)][t(499)],end:e[t(517)][t(506)]}}})}catch(e){for(var s=t[c(487)](exports[c(518)]),o=0,a=0;s=exports[c(518)].exec(t);){var u,a=t[c(480)](s[0],a),x=checkIsInComment(s[0],t,o,s.index);x.isInComment?(o=s[c(515)]+x.restLength,a+=x.restLength):(o=s[c(515)]+s[0][c(491)],(x=s[0][c(487)](exports[c(481)]))&&(u=r.positionAt(a+x[c(515)]),n[c(494)]({type:c(508),uri:r.uri,position:{start:{line:u[c(504)]+1,column:u[c(531)]},end:{line:u[c(504)]+1,column:u[c(531)]+x[0][c(491)]+2}},value:x?x[1]:"",import:x[0]})),a+=s[0][c(491)])}}var f=[];return n[c(492)](function(n){var s,e,o,a=c;n[a(486)]===a(508)?(e={line:n[a(501)][a(506)].line-1,character:n[a(501)][a(506)][a(530)]-2},s=r[a(520)](e),e=n[a(508)][a(523)](/[\r\n]/gi," ")[a(488)](" "),o=0,e[a(492)](function(e){var t,r=a,e=e[r(483)](1,e[r(491)]-1);path.extname(e)===i&&(t=n[r(508)][r(480)](e,o),o=t,f[r(494)]({type:"import",import:e,endOffset:s-(n.import[r(491)]-t-e[r(491)])+1}))})):p===a(509)&&getSelectorRule(n,r,p,f)}),f}function handleSelectors(e,n,s,o,a){e.forEach(function(e){var r=_0x2b61;e[r(488)](/\s+/).forEach(function(e){var t=r;n=s[t(480)](e,n),o.test(e)&&a[t(494)]({type:t(503),selector:e,startOffset:n}),n+=e[t(491)]})})}function getSelectorRule(e,t,r,n){var s,o,a,i,p=_0x327e70;e[p(486)]===p(507)?(s=t[p(516)](),o=new RegExp("^"[p(528)](r,"-")),a=e[p(485)],i={line:e[p(501)].start[p(504)]-1,character:e[p(501)][p(499)][p(530)]-1},i=t[p(520)](i),a&&handleSelectors(a,i,s,o,n)):e[p(486)]===p(493)&&e.rules[p(492)](function(e){getSelectorRule(e,t,r,n)})}function checkIsInComment(e,t,r,n){for(var s,o=_0x327e70,a=new RegExp(o(489)[o(528)](e,o(511))[o(528)](e,o(498)),"g");s=a[o(510)](t[o(483)](r));){if(s[o(515)]+r<n&&s[o(515)]+r+s[0][o(491)]>n)return{isInComment:!0,restLength:s[o(515)]+r+s[0][o(491)]-n};if(s[o(515)]+r>n)break}return{isInComment:!1,restLength:0}}exports[_0x327e70(518)]=/\@import\s+[\'\"].*[\'\"](\s+.*(\s*[and|not|only|or|\,]\s*\(.*\))*)?\s*\;?/g,exports.importFileReg=/['"]\s*([^()]+?)\s*['"]/,exports[_0x327e70(514)]=wxssParser;
|
|
Binary file
|
|
Binary file
|
|
Binary file
|