@atomicservice/ascf-toolkit 1.0.8 → 1.0.10
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.js +1 -1
- package/lib/ascf-common/index.js +1 -1
- package/lib/ascf-compiler/appjson-loader.js +1 -1
- package/lib/ascf-compiler/common/appjson-validator.js +1 -1
- package/lib/ascf-compiler/common/ascf-define.js +1 -1
- package/lib/ascf-compiler/common/ascf-file-cache.js +1 -0
- package/lib/ascf-compiler/common/beforeLoaderProcess.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 -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/manifest-handler.js +1 -1
- package/lib/ascf-compiler/common/manifest-manager.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/before-loader-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/copy-bundle-plugin.js +1 -1
- package/lib/ascf-compiler/plugin/dynamic-entry-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/quick-service-build-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 -1
- package/lib/ascf-compiler/server/port-manager.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/template-compiler/index.js +1 -0
- 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 -1
- package/lib/ascf-compiler/vue-compiler/vue-compiler.d.ts +8 -0
- package/lib/ascf-compiler/vue-compiler/vue-compiler.js +1 -0
- package/lib/ascf-compiler/vue-compiler/vue.bundle.js +1 -1
- package/lib/ascf-compiler/web.webpack.config.js +1 -1
- package/lib/ascf-converter/ascfApisDiff.json +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/convertManager.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/ascf-converter/report/js/index.js +1 -1
- package/lib/ascf-sign-tools/cli.js +1 -1
- package/lib/ascf-sign-tools/index.js +1 -1
- package/lib/bin/ascf.js +1 -1
- package/lib/commands/ascfbuild/index.js +1 -1
- package/lib/commands/build-npm/index.js +1 -1
- package/lib/commands/compile.js +1 -1
- package/lib/commands/convert.js +1 -1
- package/lib/commands/debugger/index.js +1 -1
- package/lib/commands/quickservice/index.js +1 -1
- package/lib/common/config.js +1 -1
- package/lib/common/constants.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/utils.js +1 -1
- package/lib/common/version-check.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +7 -2
- package/lib/ascf-base/index.d.ts +0 -79
- package/lib/tools/release_64/SSL/ct_log_list.cnf +0 -9
- package/lib/tools/release_64/SSL/ct_log_list.cnf.dist +0 -9
- package/lib/tools/release_64/SSL/misc/CA.pl +0 -215
- package/lib/tools/release_64/SSL/misc/tsget.pl +0 -200
- package/lib/tools/release_64/SSL/openssl.cnf +0 -350
- package/lib/tools/release_64/SSL/openssl.cnf.dist +0 -350
- package/lib/tools/release_64/bin/c_rehash.pl +0 -251
- package/lib/tools/release_64/bin/libcrypto-1_1-x64.dll +0 -0
- package/lib/tools/release_64/bin/libssl-1_1-x64.dll +0 -0
- package/lib/tools/release_64/bin/openssl.exe +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _createForOfIteratorHelper(e,r){var n,t,o,a,s="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(s)return o=!(t=!0),{s:function(){s=s.call(e)},n:function(){var e=s.next();return t=e.done,e},e:function(e){o=!0,n=e},f:function(){try{t||null==s.return||s.return()}finally{if(o)throw n}}};if(Array.isArray(e)||(s=_unsupportedIterableToArray(e))||r&&e&&"number"==typeof e.length)return s&&(e=s),a=0,{s:r=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:r};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(e,r){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,r):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,r):void 0}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var n=0,t=Array(r);n<r;n++)t[n]=e[n];return t}var loaderUtils=require("./loader-utils"),checkAppJson=require("./common/appjson-validator"),_require=require("path"),relative=_require.relative,fs=require("fs"),path=require("path"),_require2=require("../common/utils"),getProjectInfo=_require2.getProjectInfo,readJsonFile=_require2.readJsonFile,_require3=require("./common/utils"),resolve=_require3.resolve,packOptions=require("./common/packoptions-utils"),_require4=require("../common/config"),configs=_require4.configs,_require5=require("../ascf-compiler/common/manifest-manager"),manifestManager=_require5.manifestManager,hasCheckAppJson=!1;function generateIgnoreRule(e){var r;return(r=e?packOptions.parseIgnoreRules(e):r)||{}}function getComponents(e){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],n=[];return null!=e&&e.forEach(function(e){r.includes(e.path)||n.push(e.path)}),JSON.stringify(n)}function appProcess(r,e,n,t){configs.isInjectDebugTimer()&&r.push("const NOOP=()=>{}; setInterval(NOOP, 1000);"),r.push("global.__globalComponents = ".concat(JSON.stringify(e),";")),r.push("global.__qaRoute = '".concat(t,"';")),Object.keys(n).forEach(function(e){"app"===e?r.push("require('./app.js');"):r.push('import(/* webpackChunkName: "'.concat(e.endsWith("/")?e:"".concat(e,"/"),"index.js\" */'./app.json?package=").concat(e,"');"))})}function appJsonLoader(e){var i=this,r=(hasCheckAppJson=hasCheckAppJson||checkAppJson(this),(null==(r=loaderUtils.parseQuery(this.resourceQuery).get("package"))?void 0:r.replace(/\\/g,"/"))||""),n=manifestManager.getManifestData(),t=n.projectComponentsMap,n=n.manifest,c=manifestManager.getIsOpenLazyCodeLoad(),u=this.options.srcPath,p=Object.values(n.usingComponents||{}),l=[],n=(c&&l.push("var {ascfDefine, ascfRequire} = require("+"".concat(loaderUtils.stringifyRequest(this,"!".concat(resolve("./ascf-define"))),");")),"app"===r&&appProcess(l,p,t,r),t[r]||t["".concat(r,"/")]);return n&&0<n.size&&n.forEach(function(e,r){var n=e.componentList,t=e.jsonContent,e="./"+relative(u,e.compJsonPath).replace(/\\/g,"/"),o=getComponents(n,p),a=e.replace(/\.json$/g,".js"),e=path.resolve(getProjectInfo().ascfSrcPath,e),s=e.replace(/\.json$/g,".js"),t=JSON.stringify(null!=t&&t.styleIsolation?{styleIsolation:null==t?void 0:t.styleIsolation}:{});fs.existsSync(e)&&i.addDependency(e),fs.existsSync(s)&&i.addDependency(s),c?(e=getLazyCodeLoadUsingCmp(n),l.push("ascfDefine(() => require('".concat(a,"'), '").concat(r,"', ").concat(e,", ").concat(t,")"))):(l.push("global.__qaJson= ".concat(t,";")),l.push("global.__qaRoute = '".concat(r,"';")),l.push("global.usingComponents = ".concat(o,";")),l.push("require('".concat(a,"');")))}),"app"===r&&c&&(t=getRequireGlobalCmpStr(p),l.push(t)),asyncProcess(r,l,this),l.join("\r\n")}function getRequireGlobalCmpStr(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],r=[];return(r=e.length?e.map(function(e){return'ascfRequire("'.concat(e,'")')}):r).join("\r\n")}function getLazyCodeLoadUsingCmp(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:[],r=[];return e.length&&(r=e.filter(function(e){return!e.hasPlaceHolder||"customTabBar"===e.key}).map(function(e){return e.path})),JSON.stringify(r)}function asyncProcess(e,r,n){var t,o=getProjectInfo(),a=generateIgnoreRule(o.projectCfg);if(null==(t=configs.asyncJsList[e])?void 0:t.keys()){var s,i=_createForOfIteratorHelper(configs.asyncJsList[e].keys());try{for(i.s();!(s=i.n()).done;){var c=s.value,u=path.relative(o.ascfSrcPath,c).replace(/\\/g,"/");u.endsWith(".js")||(u+=".js"),packOptions.isIgnoreFile(path.relative(o.ascfSrcPath,c),a)||(n.addDependency(c.replace(/\//g,"\\")),r.push("require('./".concat(u,"');")))}}catch(e){i.e(e)}finally{i.f()}}}module.exports=appJsonLoader;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _0x55202d=_0x2d42;function _typeof(e){var t=_0x2d42;return(_typeof=t(514)==typeof Symbol&&t(529)==typeof Symbol.iterator?function(e){return typeof e}:function(e){var a=t;return e&&a(514)==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?a(529):typeof e})(e)}(()=>{for(var e=_0x2d42,a=_0x2978();;)try{if(652601==-parseInt(e(531))+-parseInt(e(483))/2+parseInt(e(488))/3+-parseInt(e(515))/4*(parseInt(e(535))/5)+-parseInt(e(470))/6+-parseInt(e(507))/7*(parseInt(e(518))/8)+parseInt(e(524))/9*(parseInt(e(552))/10))break;a.push(a.shift())}catch(e){a.push(a.shift())}})();var utils=require(_0x55202d(481)),fs=require("fs"),path=require(_0x55202d(504)),logTypes=[_0x55202d(498),_0x55202d(502),_0x55202d(554)],REGEXP_INT=/^[0-9]+$/,REGEXP_COLOR_LONG=/^#[0-9a-fA-F]{6}$/,REGEXP_COLOR_SHORT=/^#[0-9a-fA-F]{3}$/,REGEXP_PACKAGE_NAME=/^[a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z0-9_]+)+$/,validator={enum:function(r,e){var o=_0x55202d;return 0<=r[o(494)](e.toString())?{value:e}:{value:null,reason:function(e,a){var t=o;return t(490).concat(e,"' value '")[t(546)](a,t(499))+t(545)[t(546)](r,"]")}}},booleans:function(e){return"boolean"==typeof e?{value:e}:{value:null,reason:function(e,a){var t=_0x2d42;return"ERROR: Attribute '"[t(546)](e,"' value '").concat(a,t(499))+t(532)}}},packageName:function(e){var r=_0x55202d;return(e||"")[r(464)]()[r(491)]()[r(479)](REGEXP_PACKAGE_NAME)?{value:!0}:{value:!1,reason:function(e,a){var t=r;return t(551)[t(546)](e,t(530))[t(546)](a,t(474))}}},integer:function(e){var r=_0x55202d;return r(510)===typeof e?e.match(REGEXP_INT)?{value:!0,reason:function(e,a){var t=r;return t(472).concat(e,"' ")+t(484).concat(a,t(459))}}:{value:!1,reason:function(e,a){var t=r;return t(551).concat(e,"' value '")[t(546)](a,t(474))}}:(e=(e||"")[r(464)]()).match(REGEXP_INT)?{value:!0}:{value:!1,reason:function(e,a){var t=r;return t(551).concat(e,t(530)).concat(a,t(474))}}},strArr:function(e){var r=_0x55202d;return Array[r(517)](e)?{value:e}:{value:!1,reason:function(e,a){var t=r;return t(490)[t(546)](e,t(530))[t(546)](a,"' is invalid")}}},window:function(e){return windowAndNetworkTimeOut(e,windowValidatorMap,_0x55202d(462))},tabBar:function(n){var i,t,u,d,l,p=_0x55202d;return p(468)!==_typeof(n)?{value:!1,reason:function(e){var a=p;return a(490)[a(546)](e,a(476))}}:(i=[],t=[],Object.keys(tabBarValidatorMap)[p(520)](function(e){var a=p;tabBarValidatorMap[e][a(542)]&&i[a(550)](e),tabBarValidatorMap[e][a(528)]&&t[a(550)](tabBarValidatorMap[e][a(528)])}),u={},d=[],l=0,Object[p(553)](n)[p(520)](function(e){var a,t,r,o=p;typeof tabBarValidatorMap[e]!==o(548)?(-1!==i[o(494)](e)&&(a=i.indexOf(e),i[o(478)](a,1)),a=tabBarValidatorMap[e].type,o(514)===typeof a&&(a=a(n[e]),o(526)!==typeof a[o(450)]&&o(510)!==typeof a[o(450)]||(u[e]=a[o(450)]),a.reason)&&((t=(a=a[o(539)](e,n[e])).match(/^([A-Z]+):/))&&(r=logTypes[o(494)](t[1]),l<r&&(l=r),a=a[o(519)](t[0],"")),d[o(550)](a))):(l=1,d[o(550)](" Attribute '"[o(546)](e,o(453))))}),0<i[p(534)]&&(l=2,d.push(p(463)[p(546)](i.join(", ")))),{value:utils[p(482)](u)?null:JSON[p(496)](u),reason:0<d[p(534)]?function(e){var a=p;return""[a(546)](logTypes[l],a(523))[a(546)](e,a(451))+""[a(546)](d[a(500)](a(487)))}:null})},networkTimeout:function(e){return windowAndNetworkTimeOut(e,networkTimeoutValidatorMap,"networkTimeout")},objArr:function(e){return{value:e}},string:function(e){return{value:e}},Object:function(e){return{value:e}},plugins:function(e){return{value:e}},preloadRule:function(e){return{value:e}},permission:function(e){return{value:e}},permissionObject:function(e){return{value:e}},HexColor:function(e){var r=_0x55202d;return(e=(e||"")[r(464)]())[r(479)](REGEXP_COLOR_LONG)||e[r(479)](REGEXP_COLOR_SHORT)?{value:e}:{value:null,reason:function(e,a){var t=r;return t(490)[t(546)](e,t(475))[t(546)](a,t(512))}}},number:function(e){var r=_0x55202d;return r(510)===typeof e?e[r(479)](REGEXP_INT)?{value:Number(e),reason:function(e,a){var t=r;return t(472)[t(546)](e,"' ")+t(484)[t(546)](a,t(459))}}:{value:!1,reason:function(e,a){var t=r;return t(551)[t(546)](e,t(530))[t(546)](a,t(460))}}:(e=(e||"")[r(464)]())[r(479)](REGEXP_INT)?{value:e}:{value:!1,reason:function(e,a){var t=r;return"ERROR: app.json configuration item '"[t(546)](e,t(530))[t(546)](a,t(474))}}},minPlatformVersion:function(e){var r=_0x55202d,a=validator[r(525)](e);return a.value?e<1069?{value:!1,reason:function(e,a){var t=r;return"ERROR: The platform version number of "[t(546)](a,t(543))+t(513).concat(e,t(452))}}:{value:!0}:a}},validatorMap={window:{type:validator.window,required:!1},tabBar:{type:validator[_0x55202d(538)],required:!1},networkTimeout:{type:validator[_0x55202d(549)],required:!1},functionalPages:{type:makeEnumValidator([_0x55202d(547),_0x55202d(495)]),required:!1},subpackages:{type:validator[_0x55202d(461)],required:!1},subPackages:{type:validator[_0x55202d(461)],required:!1},workers:{type:validator[_0x55202d(510)],required:!1},requiredBackgroundModes:{type:validator[_0x55202d(541)],required:!1},plugins:{type:validator[_0x55202d(485)],required:!1},preloadRule:{type:validator[_0x55202d(521)],required:!1},resizable:{type:makeEnumValidator(["false",_0x55202d(495)]),required:!1},navigateToMiniProgramAppIdList:{type:validator.strArr,required:!1},usingComponents:{type:validator[_0x55202d(455)],required:!1},permission:{type:validator[_0x55202d(454)],required:!1},sitemapLocation:{type:validator[_0x55202d(510)],required:!1},style:{type:validator[_0x55202d(510)],required:!1}},windowValidatorMap={navigationBarBackgroundColor:{type:validator.HexColor,def:_0x55202d(467)},navigationBarTextStyle:{type:makeEnumValidator([_0x55202d(509),_0x55202d(516)]),def:_0x55202d(509)},navigationBarTitleText:{type:validator[_0x55202d(510)]},navigationStyle:{type:makeEnumValidator([_0x55202d(501),_0x55202d(497)]),def:_0x55202d(501)},backgroundColor:{type:validator[_0x55202d(508)],def:_0x55202d(527)},backgroundTextStyle:{type:makeEnumValidator([_0x55202d(533),_0x55202d(486)]),def:"dark"},backgroundColorTop:{type:validator.string,def:_0x55202d(527)},backgroundColorBottom:{type:validator[_0x55202d(510)],def:_0x55202d(527)},enablePullDownRefresh:{type:makeEnumValidator([_0x55202d(547),_0x55202d(495)]),def:"false"},onReachBottomDistance:{type:validator[_0x55202d(526)],def:50},pageOrientation:{type:makeEnumValidator([_0x55202d(457),_0x55202d(469),_0x55202d(503)]),def:_0x55202d(457)}},tabBarValidatorMap={color:{type:validator[_0x55202d(508)],required:!0},selectedColor:{type:validator.HexColor,required:!0},backgroundColor:{type:validator[_0x55202d(508)],required:!0},borderStyle:{type:makeEnumValidator(["black","white"]),required:!1,def:"black"},list:{type:validator[_0x55202d(544)],required:!0},position:{type:makeEnumValidator([_0x55202d(489),_0x55202d(511)]),required:!1,def:"bottom"},custom:{type:makeBooleanValidator(),required:!1,def:_0x55202d(547)}},networkTimeoutValidatorMap={request:{type:validator[_0x55202d(526)],required:!1,def:6e4},connectSocket:{type:validator[_0x55202d(526)],required:!1,def:6e4},uploadFile:{type:validator[_0x55202d(526)],required:!1,def:6e4},downloadFile:{type:validator[_0x55202d(526)],required:!1,def:6e4}},preloadRuleValidatorMap={packages:{type:validator[_0x55202d(541)],required:!0},network:{type:makeEnumValidator([_0x55202d(506),_0x55202d(477)]),required:!1,def:_0x55202d(506)}},permissionValidatorMap={"scope.userLocation":{type:validator[_0x55202d(537)],required:!0}},requireAttrMap=[];function validate(e,a){var t=_0x55202d,r=void 0,o=void 0,n=validatorMap[e];return n&&t(514)===typeof n[t(493)]?(r=n.type(a))[t(539)]&&(o={reason:r[t(539)](e,a)}):r={value:!0},{value:r[t(450)],log:o}}function windowAndNetworkTimeOut(n,i,u){var d,l,p,s=_0x55202d;return"{}"===JSON[s(496)](n)?{value:!0}:(d={},l=[],p=0,Object[s(553)](n).forEach(function(e){var a,t,r=s,o=i[e]&&i[e].type;r(514)===typeof o?(o=o(n[e]),r(526)!==typeof o.value&&"string"!=typeof o.value&&r(480)!==typeof o.value||(d[e]=o.value),o[r(539)]&&((a=(o=o.reason(e,n[e])).match(/^([A-Z]+):/))&&(t=logTypes.indexOf(a[1]),p<t&&(p=t),o=o[r(519)](a[0],"")),l.push(o))):(p=1,l[r(550)](r(536).concat(e,r(456))[r(546)](u,".")))}),{value:utils[s(482)](d)?null:JSON[s(496)](d),reason:0<l[s(534)]?function(e){var a=s;return""[a(546)](logTypes[p],": configuration item '").concat(e,"' contains: \n ")+"".concat(l.join(a(487)))}:null})}function _0x2d42(e,a){var t=_0x2978();return(_0x2d42=function(e,a){return t[e-=450]})(e,a)}function makeEnumValidator(e){var a=_0x55202d;return validator.enum[a(473)](null,e)}function makeBooleanValidator(){return validator.booleans.bind(null)}function getComponents(e){var t=_0x55202d,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],o=[];return e[t(520)](function(e){var a=t;r.includes(e.path)||o[a(550)](e[a(504)])}),JSON[t(496)](o)}function _0x2978(){var e=["297087NsgkNh","HexColor","white","string","top","' is invalid.'",'please change "',"function","8xJAPem","black","isArray","128PfdKKl","replace","forEach","preloadRule","manifest",": configuration item '","9sDOXSy","integer","number","#ffffff","def","symbol","' value '","522341uOkcfG","the attribute value type must be boolean","dark","length","1527245hKCkFx"," Attribute '","permissionObject","tabBar","reason","existsSync","strArr","require"," is too early, ","array","the attribute value must in [","concat","false","undefined","networkTimeout","push","ERROR: app.json configuration item '","35519470NAhmFe","keys","ERROR","value","' contains: \n ",'" field in the app.json file >= 1069.',"' is not a sub-attribute of tabBar.","permission","Object","' is not a configuration item of ","portrait","required","' is a character string, which should be an integer instead.","' is invalid","objArr","window"," The mandatory sub-attribute is missing: ","toString","icon","log","#000000","object","auto","7377840HkFYjJ","ERROR: app.json does not contain configuration item '","WARNING: app.json configuration item '","bind","' is invalid.","' color value '","' value is invalid.","all","splice","match","boolean","./utils","isEmptyObject","523494oPgArw","value '","plugins","light"," \n ","1213008wuXjLl","bottom","ERROR: Attribute '","trim","manifestData","type","indexOf","true","stringify","custom","NOTE","' is invalid, ","join","default","WARNING","landscape","path","logWarn","wifi"];return(_0x2978=function(){return e})()}(()=>{var t=_0x55202d;Object[t(553)](validatorMap)[t(520)](function(e){var a=t;validatorMap[e][a(458)]&&requireAttrMap[a(550)](e)})})(),module.exports=function(e){var t,r,a,o,n=_0x55202d,i=e.options[n(492)][n(522)];return i&&(t=e.resourcePath,r=[],requireAttrMap.forEach(function(e){var a=n;i[e]||r[a(550)]({reason:a(471)[a(546)](e,"'"),filePath:t})}),a=i[n(465)],o=void(utils.isExp(a)||!a||fs[n(540)](path[n(500)](t,"..",a[n(491)]()))||r[n(550)]({reason:"ERROR: Can not resolve file :"[n(546)](a),filePath:t})),Object[n(553)](i)[n(520)](function(e){var a=n;(o=validate(e,i[e])).log&&r[a(550)]({reason:o[a(466)][a(539)],filePath:t})}),utils[n(505)](e,r)),!0};
|
|
1
|
+
function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var utils=require("./utils"),fs=require("fs"),path=require("path"),logTypes=["NOTE","WARNING","ERROR"],REGEXP_INT=/^[0-9]+$/,REGEXP_COLOR_LONG=/^#[0-9a-fA-F]{6}$/,REGEXP_COLOR_SHORT=/^#[0-9a-fA-F]{3}$/,REGEXP_PACKAGE_NAME=/^[a-zA-Z][a-zA-Z0-9_]*(\.[a-zA-Z0-9_]+)+$/,validator={enum:function(a,e){return 0<=a.indexOf(e.toString())?{value:e}:{value:null,reason:function(e,t){return"ERROR: Attribute '".concat(e,"' value '").concat(t,"' is invalid, ")+"the attribute value must in [".concat(a,"]")}}},booleans:function(e){return"boolean"==typeof e?{value:e}:{value:null,reason:function(e,t){return"ERROR: Attribute '".concat(e,"' value '").concat(t,"' is invalid, ")+"the attribute value type must be boolean"}}},packageName:function(e){return(e||"").toString().trim().match(REGEXP_PACKAGE_NAME)?{value:!0}:{value:!1,reason:function(e,t){return"ERROR: app.json configuration item '".concat(e,"' value '").concat(t,"' is invalid.")}}},integer:function(e){return"string"==typeof e?e.match(REGEXP_INT)?{value:!0,reason:function(e,t){return"WARNING: app.json configuration item '".concat(e,"' ")+"value '".concat(t,"' is a character string, which should be an integer instead.")}}:{value:!1,reason:function(e,t){return"ERROR: app.json configuration item '".concat(e,"' value '").concat(t,"' is invalid.")}}:(e=(e||"").toString()).match(REGEXP_INT)?{value:!0}:{value:!1,reason:function(e,t){return"ERROR: app.json configuration item '".concat(e,"' value '").concat(t,"' is invalid.")}}},strArr:function(e){return Array.isArray(e)?{value:e}:{value:!1,reason:function(e,t){return"ERROR: Attribute '".concat(e,"' value '").concat(t,"' is invalid")}}},window:function(e){return windowAndNetworkTimeOut(e,windowValidatorMap,"window")},tabBar:function(n){var o,t,i,u,l;return"object"!==_typeof(n)?{value:!1,reason:function(e){return"ERROR: Attribute '".concat(e,"' value is invalid.")}}:(o=[],t=[],Object.keys(tabBarValidatorMap).forEach(function(e){tabBarValidatorMap[e].require&&o.push(e),tabBarValidatorMap[e].def&&t.push(tabBarValidatorMap[e].def)}),i={},u=[],l=0,Object.keys(n).forEach(function(e){var t,a,r;void 0!==tabBarValidatorMap[e]?(-1!==o.indexOf(e)&&(t=o.indexOf(e),o.splice(t,1)),"function"==typeof(t=tabBarValidatorMap[e].type)&&("number"!=typeof(t=t(n[e])).value&&"string"!=typeof t.value||(i[e]=t.value),t.reason)&&((a=(t=t.reason(e,n[e])).match(/^([A-Z]+):/))&&(r=logTypes.indexOf(a[1]),l<r&&(l=r),t=t.replace(a[0],"")),u.push(t))):(l=1,u.push(" Attribute '".concat(e,"' is not a sub-attribute of tabBar.")))}),0<o.length&&(l=2,u.push(" The mandatory sub-attribute is missing: ".concat(o.join(", ")))),{value:utils.isEmptyObject(i)?null:JSON.stringify(i),reason:0<u.length?function(e){return"".concat(logTypes[l],": configuration item '").concat(e,"' contains: \n ")+"".concat(u.join(" \n "))}:null})},networkTimeout:function(e){return windowAndNetworkTimeOut(e,networkTimeoutValidatorMap,"networkTimeout")},objArr:function(e){return{value:e}},string:function(e){return{value:e}},Object:function(e){return{value:e}},plugins:function(e){return{value:e}},preloadRule:function(e){return{value:e}},permission:function(e){return{value:e}},permissionObject:function(e){return{value:e}},HexColor:function(e){return(e=(e||"").toString()).match(REGEXP_COLOR_LONG)||e.match(REGEXP_COLOR_SHORT)?{value:e}:{value:null,reason:function(e,t){return"ERROR: Attribute '".concat(e,"' color value '").concat(t,"' is invalid.'")}}},number:function(e){return"string"==typeof e?e.match(REGEXP_INT)?{value:Number(e),reason:function(e,t){return"WARNING: app.json configuration item '".concat(e,"' ")+"value '".concat(t,"' is a character string, which should be an integer instead.")}}:{value:!1,reason:function(e,t){return"ERROR: app.json configuration item '".concat(e,"' value '").concat(t,"' is invalid")}}:(e=(e||"").toString()).match(REGEXP_INT)?{value:e}:{value:!1,reason:function(e,t){return"ERROR: app.json configuration item '".concat(e,"' value '").concat(t,"' is invalid.")}}},minPlatformVersion:function(e){var t=validator.integer(e);return t.value?e<1069?{value:!1,reason:function(e,t){return"ERROR: The platform version number of ".concat(t," is too early, ")+'please change "'.concat(e,'" field in the app.json file >= 1069.')}}:{value:!0}:t}},validatorMap={window:{type:validator.window,required:!1},tabBar:{type:validator.tabBar,required:!1},networkTimeout:{type:validator.networkTimeout,required:!1},functionalPages:{type:makeEnumValidator(["false","true"]),required:!1},subpackages:{type:validator.objArr,required:!1},subPackages:{type:validator.objArr,required:!1},workers:{type:validator.string,required:!1},requiredBackgroundModes:{type:validator.strArr,required:!1},plugins:{type:validator.plugins,required:!1},preloadRule:{type:validator.preloadRule,required:!1},resizable:{type:makeEnumValidator(["false","true"]),required:!1},navigateToMiniProgramAppIdList:{type:validator.strArr,required:!1},usingComponents:{type:validator.Object,required:!1},permission:{type:validator.permission,required:!1},sitemapLocation:{type:validator.string,required:!1},style:{type:validator.string,required:!1}},windowValidatorMap={navigationBarBackgroundColor:{type:validator.HexColor,def:"#000000"},navigationBarTextStyle:{type:makeEnumValidator(["white","black"]),def:"white"},navigationBarTitleText:{type:validator.string},navigationStyle:{type:makeEnumValidator(["default","custom"]),def:"default"},backgroundColor:{type:validator.HexColor,def:"#ffffff"},backgroundTextStyle:{type:makeEnumValidator(["dark","light"]),def:"dark"},backgroundColorTop:{type:validator.string,def:"#ffffff"},backgroundColorBottom:{type:validator.string,def:"#ffffff"},enablePullDownRefresh:{type:makeEnumValidator(["false","true"]),def:"false"},onReachBottomDistance:{type:validator.number,def:50},pageOrientation:{type:makeEnumValidator(["portrait","auto","landscape"]),def:"portrait"}},tabBarValidatorMap={color:{type:validator.HexColor,required:!0},selectedColor:{type:validator.HexColor,required:!0},backgroundColor:{type:validator.HexColor,required:!0},borderStyle:{type:makeEnumValidator(["black","white"]),required:!1,def:"black"},list:{type:validator.array,required:!0},position:{type:makeEnumValidator(["bottom","top"]),required:!1,def:"bottom"},custom:{type:makeBooleanValidator(),required:!1,def:"false"}},networkTimeoutValidatorMap={request:{type:validator.number,required:!1,def:6e4},connectSocket:{type:validator.number,required:!1,def:6e4},uploadFile:{type:validator.number,required:!1,def:6e4},downloadFile:{type:validator.number,required:!1,def:6e4}},preloadRuleValidatorMap={packages:{type:validator.strArr,required:!0},network:{type:makeEnumValidator(["wifi","all"]),required:!1,def:"wifi"}},permissionValidatorMap={"scope.userLocation":{type:validator.permissionObject,required:!0}},requireAttrMap=[];function validate(e,t){var a=void 0,r=void 0,n=validatorMap[e];return n&&"function"==typeof n.type?(a=n.type(t)).reason&&(r={reason:a.reason(e,t)}):a={value:!0},{value:a.value,log:r}}function windowAndNetworkTimeOut(n,o,i){var u,l,c;return"{}"===JSON.stringify(n)?{value:!0}:(u={},l=[],c=0,Object.keys(n).forEach(function(e){var t,a,r=o[e]&&o[e].type;"function"==typeof r?("number"!=typeof(r=r(n[e])).value&&"string"!=typeof r.value&&"boolean"!=typeof r.value||(u[e]=r.value),r.reason&&((t=(r=r.reason(e,n[e])).match(/^([A-Z]+):/))&&(a=logTypes.indexOf(t[1]),c<a&&(c=a),r=r.replace(t[0],"")),l.push(r))):(c=1,l.push(" Attribute '".concat(e,"' is not a configuration item of ").concat(i,".")))}),{value:utils.isEmptyObject(u)?null:JSON.stringify(u),reason:0<l.length?function(e){return"".concat(logTypes[c],": configuration item '").concat(e,"' contains: \n ")+"".concat(l.join(" \n "))}:null})}function makeEnumValidator(e){return validator.enum.bind(null,e)}function makeBooleanValidator(){return validator.booleans.bind(null)}function getComponents(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:[],a=[];return e.forEach(function(e){t.includes(e.path)||a.push(e.path)}),JSON.stringify(a)}Object.keys(validatorMap).forEach(function(e){validatorMap[e].required&&requireAttrMap.push(e)}),module.exports=function(e){var t,a,r,n,o=e.options.manifestData.manifest;return o&&(t=e.resourcePath,a=[],requireAttrMap.forEach(function(e){o[e]||a.push({reason:"ERROR: app.json does not contain configuration item '".concat(e,"'"),filePath:t})}),r=o.icon,n=void(utils.isExp(r)||!r||fs.existsSync(path.join(t,"..",r.trim()))||a.push({reason:"ERROR: Can not resolve file :".concat(r),filePath:t})),Object.keys(o).forEach(function(e){(n=validate(e,o[e])).log&&a.push({reason:n.log.reason,filePath:t})}),utils.logWarn(e,a)),!0};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function ascfDefine(e,n){globalThis.ASCF_ROUTES[n]={routePath:n,requireCb:e,usingComponents:2<arguments.length&&void 0!==arguments[2]?arguments[2]:[],qaJson:3<arguments.length?arguments[3]:void 0}}function ascfRequireInner(e){global.__qaRoute=e.routePath,global.usingComponents=e.usingComponents,e.requireCb(),global.__qaRoute="",global.__qaJson=e.qaJson}function ascfRequire(e){var n=globalThis.ASCF_ROUTES[e];n?(n.usingComponents&&n.usingComponents.forEach(function(e){ascfRequire(e)}),ascfRequireInner(n)):console.showWarn("WARNING: Can't find the ".concat(e," info, please check your json file."))}globalThis.ascfDefine=ascfDefine,globalThis.ascfRequire=ascfRequire,globalThis.ASCF_ROUTES=globalThis.ASCF_ROUTES||{},module.exports={ascfDefine:ascfDefine,ascfRequire:ascfRequire};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _regenerator(){var p,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",t=e.toStringTag||"@@toStringTag";function n(e,r,t,n){var o,i,a,c,u,f,s,l,y,r=r&&r.prototype instanceof _?r:_,r=Object.create(r.prototype);return _regeneratorDefine2(r,"_invoke",(o=e,i=t,s=n||[],l=!1,y={p:f=0,n:0,v:p,a:h,f:h.bind(p,4),d:function(e,r){return a=e,c=0,u=p,y.n=r,v}},function(e,r,t){if(1<f)throw TypeError("Generator is already running");for(l&&1===r&&h(r,t),c=r,u=t;(g=c<2?p:u)||!l;){a||(c?c<3?(1<c&&(y.n=-1),h(c,u)):y.n=u:y.v=u);try{if(f=2,a){if(g=a[e=c?e:"next"]){if(!(g=g.call(a,u)))throw TypeError("iterator result is not an object");if(!g.done)return g;u=g.value,c<2&&(c=0)}else 1===c&&(g=a.return)&&g.call(a),c<2&&(u=TypeError("The iterator does not provide a '"+e+"' method"),c=1);a=p}else if((g=(l=y.n<0)?u:o.call(i,y))!==v)break}catch(e){a=p,c=1,u=e}finally{f=1}}return{value:g,done:l}}),!0),r;function h(e,r){for(c=e,u=r,g=0;!l&&f&&!t&&g<s.length;g++){var t,n=s[g],o=y.p,i=n[2];3<e?(t=i===r)&&(u=n[(c=n[4])?5:c=3],n[4]=n[5]=p):n[0]<=o&&((t=e<2&&o<n[1])?(c=0,y.v=r,y.n=n[1]):o<i&&(t=e<3||n[0]>r||i<r)&&(n[4]=e,n[5]=r,y.n=i,c=0))}if(t||1<e)return v;throw l=!0,r}}var v={};function _(){}function o(){}function i(){}var g=Object.getPrototypeOf,e=[][r]?g(g([][r]())):(_regeneratorDefine2(g={},r,function(){return this}),g),a=i.prototype=_.prototype=Object.create(e);function c(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,i):(e.__proto__=i,_regeneratorDefine2(e,t,"GeneratorFunction")),e.prototype=Object.create(a),e}return _regeneratorDefine2(a,"constructor",o.prototype=i),_regeneratorDefine2(i,"constructor",o),_regeneratorDefine2(i,t,o.displayName="GeneratorFunction"),_regeneratorDefine2(a),_regeneratorDefine2(a,t,"Generator"),_regeneratorDefine2(a,r,function(){return this}),_regeneratorDefine2(a,"toString",function(){return"[object Generator]"}),(_regenerator=function(){return{w:n,m:c}})()}function _regeneratorDefine2(e,r,t,n){var i=Object.defineProperty;try{i({},"",{})}catch(e){i=0}(_regeneratorDefine2=function(e,r,t,n){function o(r,t){_regeneratorDefine2(e,r,function(e){return this._invoke(r,t,e)})}r?i?i(e,r,{value:t,enumerable:!n,configurable:!n,writable:!n}):e[r]=t:(o("next",0),o("throw",1),o("return",2))})(e,r,t,n)}function _slicedToArray(e,r){return _arrayWithHoles(e)||_iterableToArrayLimit(e,r)||_unsupportedIterableToArray(e,r)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _unsupportedIterableToArray(e,r){var t;if(e)return"string"==typeof e?_arrayLikeToArray(e,r):"Map"===(t="Object"===(t={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:t)||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,r):void 0}function _arrayLikeToArray(e,r){(null==r||r>e.length)&&(r=e.length);for(var t=0,n=Array(r);t<r;t++)n[t]=e[t];return n}function _iterableToArrayLimit(e,r){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,o,i,a,c=[],u=!0,f=!1;try{if(i=(t=t.call(e)).next,0===r){if(Object(t)!==t)return;u=!1}else for(;!(u=(n=i.call(t)).done)&&(c.push(n.value),c.length!==r);u=!0);}catch(e){f=!0,o=e}finally{try{if(!u&&null!=t.return&&(a=t.return(),Object(a)!==a))return}finally{if(f)throw o}}return c}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function asyncGeneratorStep(e,r,t,n,o,i,a){try{var c=e[i](a),u=c.value}catch(e){return void t(e)}c.done?r(u):Promise.resolve(u).then(n,o)}function _asyncToGenerator(c){return function(){var e=this,a=arguments;return new Promise(function(r,t){var n=c.apply(e,a);function o(e){asyncGeneratorStep(n,r,t,o,i,"next",e)}function i(e){asyncGeneratorStep(n,r,t,o,i,"throw",e)}o(void 0)})}}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=0;t<r.length;t++){var n=r[t];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,_toPropertyKey(n.key),n)}}function _createClass(e,r,t){return r&&_defineProperties(e.prototype,r),t&&_defineProperties(e,t),Object.defineProperty(e,"prototype",{writable:!1}),e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,r){if("object"!=_typeof(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0===t)return("string"===r?String:Number)(e);t=t.call(e,r||"default");if("object"!=_typeof(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}var fs=require("fs"),path=require("path"),log4js=require("../../common/log4js.js"),_require=require("../../common/utils.js"),getProjectInfo=_require.getProjectInfo,logger=log4js.getLogger("AscfFileCache"),CACHE_ID="changed_files_ascf",AscfFileCache=(()=>{return _createClass(function e(){var r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:CACHE_ID,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:path.join(getProjectInfo().ascfSrcPath,"../","build");_classCallCheck(this,e),this.cacheDir=t,this.cacheFile=path.join(t,r),this.cacheMap=new Map,this.init()},[{key:"init",value:(r=_asyncToGenerator(_regenerator().m(function e(){var r,t,n=this;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:if(fs.existsSync(this.cacheDir)||fs.mkdirSync(this.cacheDir,{recursive:!0}),fs.existsSync(this.cacheFile))try{r=fs.readFileSync(this.cacheFile,"utf8"),t=JSON.parse(r),Object.entries(t).forEach(function(e){var e=_slicedToArray(e,2),r=e[0],e=e[1];Date.now()<=e.expires&&n.cacheMap.set(r,e)})}catch(e){logger.error("Failed to load cache:",e)}case 1:return e.a(2)}},e,this)})),function(){return r.apply(this,arguments)})},{key:"set",value:function(e,r){var t=2<arguments.length&&void 0!==arguments[2]?arguments[2]:3e5,t=Date.now()+t;this.cacheMap.set(e,{data:r,expires:t}),this.save()}},{key:"get",value:function(e){if(this.cacheMap.has(e)){var r=this.cacheMap.get(e),t=r.data,r=r.expires;if(!(Date.now()>r))return t;this.cacheMap.delete(e)}}},{key:"remove",value:function(e){this.cacheMap.delete(e),this.save()}},{key:"flushAll",value:function(){this.cacheMap.clear(),this.save()}},{key:"save",value:(e=_asyncToGenerator(_regenerator().m(function e(){var r;return _regenerator().w(function(e){for(;;)switch(e.n){case 0:try{r=Array.from(this.cacheMap.entries()).reduce(function(e,r){var r=_slicedToArray(r,2),t=r[0],r=r[1];return e[t]={data:r.data,expires:r.expires},e},{}),fs.writeFileSync(this.cacheFile,JSON.stringify(r))}catch(e){logger.error("Failed to sync cache to disk:",e)}case 1:return e.a(2)}},e,this)})),function(){return e.apply(this,arguments)})}]);var e,r})(),ASCFCache=new AscfFileCache;module.exports=ASCFCache;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var _require=require("../js-parser/parser"),astParse=_require.astParse,traverse=_require.traverse,generate=_require.generate,requireHandler=_require.requireHandler,_require2=require("../../common/utils"),getProjectInfo=_require2.getProjectInfo,path=require("path"),fs=require("fs"),_require3=require("./utils"),normalizedAbsPath=_require3.normalizedAbsPath,_require4=require("../../common/utils"),handleResolveAlias=_require4.handleResolveAlias,_require5=require("../../common/config"),configs=_require5.configs;function getOwnerIndexJs(t,e){var a;return t=normalizePath(t),null!=e&&e.forEach(function(e){var r,e=normalizedAbsPath(e.root);e+=e.endsWith("/")?"":"/",null!=(r=t)&&r.startsWith(e)&&(a=e)}),a?a+"index.js":normalizedAbsPath("app.js")}function pathHandler(e,r,t,a,n){var s=getProjectInfo().ascfSrcPath,a=(r=handleResolveAlias(r,a),path.dirname(e)),a=r.startsWith("/")?path.join(s,r):path.resolve(a,r);return isValidJSPath(a,r,e),n||configs.jsLoaderList.add(e),!!isNeedAddCommon(t,a,e,n)||((r="/"+normalizePath(path.relative(s,a))).endsWith(".js")||(r+=".js"),r)}function normalizePath(e){return null==e?void 0:e.replace(/\\/g,"/")}function isNeedAddCommon(e,t,a,n){var s=getProjectInfo().ascfSrcPath,i=(a=a.replace(/\\/g,"/"),(t=normalizePath(t))+(t.endsWith(".js")?"":".js")),o=!1,c=!1;return null!=e&&e.forEach(function(e){var r=path.join(s,e.root).replace(/\\/g,"/");r+=r.endsWith("/")?"":"/",t.startsWith(r)&&a.startsWith(r)&&(c=!0),t.startsWith(r)&&!n&&(Object.prototype.hasOwnProperty.call(configs.asyncJsList,e.root)||(configs.asyncJsList[e.root]=new Set),configs.asyncJsList[e.root].add(i),o=!0)}),o||n||(Object.prototype.hasOwnProperty.call(configs.asyncJsList,"app")||(configs.asyncJsList.app=new Set),configs.asyncJsList.app.add(i)),c}function isValidJSPath(e,r,t){if(e.endsWith(".js")||(e+=".js"),!fs.existsSync(e))throw'ERROR: JS is not found in path "'.concat(r,'" (using by "').concat(t,'")')}function jsScanner(e,r,t,a){var n;return e&&-1===e.indexOf("require")?e:(e=astParse(e),n=getOwnerIndexJs(r,a),r=requireHandler(pathHandler,r,a,n,t),traverse(e,r),null==(a=generate(e))?void 0:a.code)}module.exports={jsScanner:jsScanner,getOwnerIndexJs:getOwnerIndexJs,pathHandler:pathHandler,normalizePath:normalizePath};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
module.exports=function(n){var f=[];return f.toString=function(){return this.map(function(n){return n[1]||""}).join("")},f.i=function(n,t,r){var o=n,i=("string"==typeof o&&(o=[[null,o,""]]),{});if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(i[u]=!0)}for(var c=0;c<o.length;c++){var e=[].concat(o[c]);r&&i[e[0]]||(t&&(e[2]?e[2]="".concat(t," and ").concat(e[2]):e[2]=t),f.push(e))}},f};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function eventHappenHjs(n,
|
|
1
|
+
function eventHappenHjs(n,e,l,o){return"function"==typeof n&&n.call?null==n?void 0:n.call(l,e,e.ownerInstance):null==o?void 0:o(n,e)}module.exports=eventHappenHjs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
var allowedKeywords="Infinity,undefined,NaN,null,isFinite,isNaN,true,false,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,require",allowedKeywordsRE=allowedKeywords.split(","),prohibitedKeywordRE=new RegExp("\\b".concat("break,case,class,catch,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,in,instanceof,let,return,super,switch,throw,try,var,while,with,yield,enum,await,implements,package,protected,static,interface,private,public".split(",").join("\\b|\\b"),"\\b")),stripStringRE=/'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g,innerParenthesesRe=/{{([^}][^}])*({{.*)+/,_require=require("./hash-sum"),hashSum=_require.hashSum,STRINGIFY_OBJECT=JSON.stringify({}),OBEJECT_PLACEHOLDER=hashSum(STRINGIFY_OBJECT),REPLACE_RE=new RegExp(OBEJECT_PLACEHOLDER,"g"),BINDING_CONTENT_RE=/{{([\s\S]*)}}/,OBJECT_RE=/{\s*}/g,CATCH_FUNC="(function(){ try { return xx} catch (_undefinedErr){ _logUndefined(_undefinedErr)};})()",INNER_FUNC_KEYWORDS="Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,require",INNER_FUNC_LIST=INNER_FUNC_KEYWORDS.split(","),HJS_GET_CONSTRUCTOR='getProperty4Object("constructor", xx)',ASCF_LAZY_IMPORT="__ascf_lazy_import__(p1).then(()=>(__webpack_require__(p2))).then(cb).catch(cbErr);",ASCF_LAZY_IMPORT_ERR='console.log("__ascf_lazy_import__ error: " + err);',NEW_PROMISE="await new Promise((resolve,reject) => { aa.then(resolve).catch(reject);});",REQUIRE_TRY_CATCH="try { (mod => {a();})(require('./w.js'));} catch(err) {(err => {a();})(err)}",REQUIRE_TRY_CATCH_FUL="try { (cb)(require(path));} catch(err) {(cbErr)(err)}",REQUIRE="require(path)";function replace(e){return 1<arguments.length&&void 0!==arguments[1]&&arguments[1]?e.replace(REPLACE_RE,STRINGIFY_OBJECT).replace(/\s+$/gm,""):e.replace(REPLACE_RE,STRINGIFY_OBJECT).trim()}function isIdentifierNotAllow(e){return allowedKeywordsRE.includes(e)}function parseText(e,r){var t=2<arguments.length&&void 0!==arguments[2]&&arguments[2],E=!(3<arguments.length&&void 0!==arguments[3])||arguments[3],n=e;if(t){if(!textExpRE.test(n))return null}else if(n=n.replace(/\n/g,""),!expRE.test(n))return null;var i=[];if(innerParenthesesRe.test(n))r.buildLog.push({reason:'ERROR: Unexpected inner parentheses, with attr value : "'.concat(n,'", please change it.')});else{for(var a=0,R=(tagRE.lastIndex=a,OBJECT_RE.test(n)&&(n=n.replace(OBJECT_RE,OBEJECT_PLACEHOLDER)),null);R=textTagRE.exec(n);){var s=R.index,s=(a<s&&i.push({value:n.slice(a,s)}),htmlRE.test(R[0]));s&&(R[1]=n.slice(a,textTagRE.lastIndex+1).match(BINDING_CONTENT_RE)[1]),i.push({tag:!0,value:replace(R[1]||R[2],E),html:s}),a=textTagRE.lastIndex}a<n.length&&i.push({value:replace(n.slice(a),E)})}return i}function isExpr(e){return expRE.test(e)}function singleExpr(e){return sexpRE.test(e.trim())}function removeExprffix(e){return e=(e=singleExpr(e)?e.replace(/^\s*{{/,"").replace(/}}\s*$/,""):e).trim()}function addExprffix(e){return e=singleExpr(e)?e:"{{".concat(e,"}}")}function containExpr(e){return!!e&&tagRE.test(e.replace(/(\n)|(\r)/g,""))}function removeAllExprFix(e){return e=containExpr(e)?e.replace(/\{\{\{?|\}\}\}?/g,""):e}var tagSource="{{{(.+?)}}}|{{(.+?)}}",tagRE=new RegExp(tagSource,"g"),expRE=new RegExp(tagSource),textTagRE=new RegExp("{{{([\\s\\S]*?)}}}|{{([\\s\\S]*?)}}","g"),textExpRE=new RegExp("{{{([\\s\\S]*?)}}}|{{([\\s\\S]*?)}}"),htmlRE=new RegExp("^{{{.*}}}$"),sexpRE=new RegExp("^{{{(.+?)}}}$|^{{(.+?)}}$");module.exports={parseText:parseText,isExpr:isExpr,singleExpr:singleExpr,addExprffix:addExprffix,removeExprffix:removeExprffix,containExpr:containExpr,removeAllExprFix:removeAllExprFix,prohibitedKeywordRE:prohibitedKeywordRE,stripStringRE:stripStringRE,isIdentifierNotAllow:isIdentifierNotAllow,CATCH_FUNC:CATCH_FUNC,INNER_FUNC_LIST:INNER_FUNC_LIST,HJS_GET_CONSTRUCTOR:HJS_GET_CONSTRUCTOR,ASCF_LAZY_IMPORT:ASCF_LAZY_IMPORT,ASCF_LAZY_IMPORT_ERR:ASCF_LAZY_IMPORT_ERR,NEW_PROMISE:NEW_PROMISE,REQUIRE_TRY_CATCH:REQUIRE_TRY_CATCH,REQUIRE:REQUIRE,REQUIRE_TRY_CATCH_FUL:REQUIRE_TRY_CATCH_FUL};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _typeof(o){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}function hashSum(o){for(var t=fold(fold(fold(0,""),Object.prototype.toString.call(o)),_typeof(o)),n=fold(t,o.toString()).toString(16);n.length<8;)n="0"+n;return n}function fold(o,t){var n,r,e=o;if(0===t.length)return e;for(n=0,r=t.length;n<r;n++)e=(e<<5)-e+t.charCodeAt(n),e|=0;return e<0?-2*e:e}module.exports={hashSum:hashSum};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function ownKeys(t,e){var r,o=Object.keys(t);return Object.getOwnPropertySymbols&&(r=Object.getOwnPropertySymbols(t),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),o.push.apply(o,r)),o}function _objectSpread(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ownKeys(Object(r),!0).forEach(function(e){_defineProperty(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}function _defineProperty(e,t,r){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return("string"===t?String:Number)(e);r=r.call(e,t||"default");if("object"!=_typeof(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}var _require=require("../../common/utils"),getProjectInfo=_require.getProjectInfo,getHvigorwPath=_require.getHvigorwPath,getEntryPkgPath=_require.getEntryPkgPath,getHdcPath=_require.getHdcPath,getModuleNames=_require.getModuleNames,getBundleName=_require.getBundleName,log4js=require("../../common/log4js"),path=require("path"),fs=require("fs"),_require2=require("child_process"),execSync=_require2.execSync,_require3=require("../../common/config"),configs=_require3.configs,_require4=require("../../ascf-base"),getPath=_require4.getPath,execSafe=_require4.execSafe,getProjectConfig=_require4.getProjectConfig,logger=log4js.getLogger("hdc-executor");function getDevEcoSdkHome(){var e=getPath("../sdk").replace(/"/g,"");return fs.existsSync(e)?logger.debug("DEVECO_SDK_HOME="+e):logger.warn("DEVECO_SDK_HOME is not found, please specify env DEVECO_SDK_HOME"),e}var isCommandRunning=!1;function assembleHap(){logger.info("assembleHap"),runCmd("".concat(getHvigorwPath()," assembleHap --parallel --incremental --daemon -p skipAscfCompile=true"),{chdir:!0,cwd:getProjectInfo().projectPath})}function stopHvigorDaemon(){logger.info("stop-daemon"),runCmd("".concat(getHvigorwPath()," --stop-daemon"),{chdir:!0,cwd:getProjectInfo().projectPath})}function installPkg(){var e=getModuleNames();e.name?(e=path.join(getEntryPkgPath(),"build","default","outputs","default","".concat(e.name,"-default-signed.hap")),fs.existsSync(e)?(logger.info("installing package bundleName to sn"),runCmd("".concat(getHdcPath()," -t ").concat(getDeviceId()," install ").concat(e),{chdir:!0,cwd:getProjectInfo().projectPath})):logger.error("hapPath is not exists",e)):logger.error("module.name is null, in the file of module.json5")}function startAbilityWithBrk(e,t){"brk"===(null==(e=getProjectConfig(e))?void 0:e.ascfDebugger)&&t.push("--ps ascfDebugger brk"),runCmd(t.join(" "))}function assembleAndInstallHap(e){var t,r,o,n;global._supportLegacyHos?(t=getProjectInfo().projectPath,r=configs.qsHostPkg||"com.enjoy.now.hmos",o=global.ASCF_QS_BUILT_PATH?path.basename(global.ASCF_QS_BUILT_PATH):null==(o=fs.readdirSync("".concat(t,"/build/dist")))||null==(o=o.filter(function(e){return/.*-debug-.*\.spk/.test(e)}))?void 0:o[0],n=getBundleNameQs(t),startAbilityWithBrk(t,["".concat(getHdcPath()," -t ").concat(getDeviceId()," shell aa start -a MpEntryAbility -b ").concat(r," --ps startMode installAndRunDebugPkg --ps pkgUrl http://127.0.0.1:").concat(e.remotePort,"/build/dist/").concat(o," --ps ascfPackageName ").concat(n)])):(assembleHap(),installPkg())}function uninstallPkg(){var e;global._supportLegacyHos||(e=getBundleName(),logger.info("Uninstall package"),runCmd("".concat(getHdcPath()," -t ").concat(getDeviceId()," uninstall ").concat(e),{chdir:!0,cwd:getProjectInfo().projectPath}))}function getBundleNameQs(e){e=path.resolve(e,"ascf","ascf_src","app.json");if(fs.existsSync(e)){e=JSON.parse(fs.readFileSync(e,"utf8"));if(null!=e&&e.package)return null==e?void 0:e.package;logger.error("app.json package is null")}else logger.error("app.json is not found")}function startAbility(){var e,t,r=getProjectInfo().projectPath;logger.info("start startAbility under ".concat(r)),global._supportLegacyHos?(t=getBundleNameQs(r),e=configs.qsHostPkg||"com.enjoy.now.hmos",startAbilityWithBrk(r,[getHdcPath(),"-t",getDeviceId(),"shell","aa","start","-a","MpEntryAbility","-b",e,"--ps","ascfPackageName",t,"--ps","launchMode","forceUpdate"])):(e=getBundleName())?(t=getModuleNames()).name?t.entryAbility?(logger.info("start ability ".concat(e)),startAbilityWithBrk(r,["".concat(getHdcPath()," -t ").concat(getDeviceId()," shell aa start -a ").concat(t.entryAbility," -b ").concat(e," -m ").concat(t.name," --ps launchMode forceUpdate")])):logger.error("abilities.name is null, in the file of module.json5"):logger.error("module.name is null, in the file of module.json5"):logger.error("bundleName is null")}function runCmd(e,t){if(e&&!isCommandRunning){var r=getDevEcoSdkHome(),r=Object.assign({encoding:"utf8",env:_objectSpread(_objectSpread({},process.env||{}),{},{DEVECO_SDK_HOME:r})},t);try{logger.info("Run command: ",e),isCommandRunning=!0;var o=execSync(e,r),n=String(o);return/failed to start ability/.test(n)?logger.error("Run command error: ",n):logger.info("Run command result:",n),o}catch(e){logger.error("Run command error: ",e)}finally{isCommandRunning=!1}}}function hdcRemovePort(e,t){0!==e&&0!==t&&(logger.info("Remove forward port"),e=execSafe("".concat(getHdcPath()," -t ").concat(getDeviceId()," fport rm tcp:").concat(e," tcp:").concat(t)),logger.debug(e))}function tryHdcPortReversing(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0,r=Math.floor(64512*Math.random())+1024,o=execSafe("".concat(getHdcPath()," -t ").concat(getDeviceId()," rport tcp:").concat(r," tcp:").concat(e));return o&&5!==t?o.includes("Forwardport result:OK")?r:tryHdcPortReversing(e,++t):0}function getDeviceId(){var e;return configs.deviceId||((e=execSafe("".concat(getHdcPath()," list targets")))&&!/(Empty|Fail)/.test(e)||(logger.error("App Launch: select a device first"),process.exit(1)),e=e.split("\n"),configs.deviceId=e[0].trim()),configs.deviceId}module.exports={stopHvigorDaemon:stopHvigorDaemon,assembleAndInstallHap:assembleAndInstallHap,assembleHap:assembleHap,installPkg:installPkg,uninstallPkg:uninstallPkg,startAbility:startAbility,hdcRemovePort:hdcRemovePort,tryHdcPortReversing:tryHdcPortReversing,getDeviceId:getDeviceId};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function _construct(t,e,r){var n;return _isNativeReflectConstruct()?Reflect.construct.apply(null,arguments):((n=[null]).push.apply(n,e),e=new(t.bind.apply(t,n)),r&&_setPrototypeOf(e,r.prototype),e)}function _setPrototypeOf(t,e){return(_setPrototypeOf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t})(t,e)}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(t){}return(_isNativeReflectConstruct=function(){return!!t})()}function getRegExp(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return _construct(RegExp,e)}function getDate(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return _construct(Date,e)}function getProperty4Object(t,e){var r=null==e?void 0:e[t];if("constructor"!==t)return r;switch(r){case Date:return"Date";case RegExp:return"RegExp";case Object:return"Object";case Function:return"Function";case Array:return"Array";case String:return"String";case Boolean:return"Boolean";case Number:return"Number";default:return r}}module.exports={getDate:getDate,getRegExp:getRegExp,getProperty4Object:getProperty4Object};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _0x5ab112=_0x3689;function _0x3689(a,e){var t=_0x58a6();return(_0x3689=function(a,e){return t[a-=411]})(a,e)}(()=>{for(var a=_0x3689,e=_0x58a6();;)try{if(976527==-parseInt(a(537))*(-parseInt(a(800))/2)+parseInt(a(578))/3*(parseInt(a(522))/4)+-parseInt(a(670))/5+parseInt(a(569))/6+-parseInt(a(687))/7+-parseInt(a(785))/8+-parseInt(a(479))/9)break;e.push(e.shift())}catch(a){e.push(e.shift())}})();var expUtils=require(_0x5ab112(411)),fs=require("fs"),utils=require(_0x5ab112(712)),path=require(_0x5ab112(732)),vm=require("vm"),ATTR_NAME=_0x5ab112(440),tagCommon={attrs:[{name:"id"},{name:_0x5ab112(607)},{name:_0x5ab112(601)},{name:_0x5ab112(614)},{name:_0x5ab112(697)},{name:_0x5ab112(624)},{name:"has:else"},{name:"has:key",combDiectives:[_0x5ab112(614),_0x5ab112(804)]},{name:_0x5ab112(804)},{name:"has:for-index",combDiectives:[_0x5ab112(614),_0x5ab112(804)]},{name:"has:for-item",combDiectives:["has:for",_0x5ab112(804)]},{name:_0x5ab112(755)},{name:_0x5ab112(439)},{name:_0x5ab112(755)},{name:"data-"},{name:"catch"},{name:_0x5ab112(469)}]},tagComponentMap={map:{events:["bindtap","bindmarketap",_0x5ab112(760),_0x5ab112(623),"bindcallouttap",_0x5ab112(460),"bindregionchange",_0x5ab112(458)],attrs:[{name:_0x5ab112(682),type:[_0x5ab112(477)],required:!0},{name:_0x5ab112(709),type:["number"],required:!0},{name:_0x5ab112(434),type:[_0x5ab112(477)],default:16,enum:[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]},{name:_0x5ab112(658),type:[_0x5ab112(475)]},{name:_0x5ab112(437),type:["array"]},{name:_0x5ab112(598),type:[_0x5ab112(475)]},{name:_0x5ab112(515),type:["array"]},{name:_0x5ab112(704),type:[_0x5ab112(475)]},{name:_0x5ab112(656),type:[_0x5ab112(475)]},{name:_0x5ab112(449),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(808),type:[_0x5ab112(475)]},{name:_0x5ab112(552),type:[_0x5ab112(480)]},{name:_0x5ab112(713),type:[_0x5ab112(477)],default:1},{name:_0x5ab112(692),type:[_0x5ab112(477)],default:0},{name:_0x5ab112(728),type:[_0x5ab112(477)],default:0},{name:_0x5ab112(494),type:["boolean"],default:!1},{name:_0x5ab112(520),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(674),type:["boolean"],default:!1},{name:_0x5ab112(689),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(802),type:[_0x5ab112(647)],default:!0},{name:_0x5ab112(748),type:["boolean"],default:!1},{name:_0x5ab112(483),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(533),type:[_0x5ab112(647)],default:!0},{name:_0x5ab112(784),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(543),type:[_0x5ab112(639)]}]},video:{events:["bindplay",_0x5ab112(727),_0x5ab112(553),_0x5ab112(795),_0x5ab112(594),_0x5ab112(534),"binderror","bindprogress","bindloadmetadata"],attrs:[{name:_0x5ab112(576),type:["string"],checkPath:!0,required:!0},{name:_0x5ab112(649),type:[_0x5ab112(477)]},{name:"controls",type:[_0x5ab112(647)],default:!0},{name:_0x5ab112(776),type:["array"]},{name:"danmu-list",type:["array"]},{name:_0x5ab112(751),type:[_0x5ab112(647)],default:!1},{name:"enable-danmu",type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(772),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(744),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(485),type:["boolean"],default:!1},{name:_0x5ab112(763),type:[_0x5ab112(477)],default:0},{name:_0x5ab112(428),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(679),type:[_0x5ab112(480)],default:_0x5ab112(502),enum:["contain",_0x5ab112(539),_0x5ab112(437)]},{name:_0x5ab112(651),type:["string"],checkPath:!0},{name:"direction",type:[_0x5ab112(477)],enum:[0,-90,90]},{name:"show-progress",type:["boolean"],default:!0},{name:_0x5ab112(699),type:[_0x5ab112(647)],default:!0},{name:_0x5ab112(756),type:[_0x5ab112(647)],default:!0},{name:_0x5ab112(775),type:[_0x5ab112(647)],default:!0},{name:"enable-prgress-gesture",type:[_0x5ab112(647)],default:!0},{name:"show-mute-btn",type:["boolean"],default:!1},{name:_0x5ab112(473),type:[_0x5ab112(480)]},{name:_0x5ab112(464),type:["string"],default:"buttom",enum:[_0x5ab112(433),_0x5ab112(803)]},{name:_0x5ab112(620),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(758),type:[_0x5ab112(647)],default:!0},{name:"auto-pause-if-open-native",type:[_0x5ab112(647)],default:!0},{name:_0x5ab112(513),type:["boolean"],default:!1},{name:_0x5ab112(495),type:[_0x5ab112(647)],default:!0},{name:_0x5ab112(711),type:["string"]}]},"live-pusher":{events:["bindstatechange","bindnetstatus",_0x5ab112(456),_0x5ab112(648),_0x5ab112(521),"bindbgmcomplete"],attrs:[{name:_0x5ab112(412),type:[_0x5ab112(480)],checkPath:!0},{name:_0x5ab112(661),type:[_0x5ab112(480)],default:_0x5ab112(572),enum:[_0x5ab112(572),_0x5ab112(762)]},{name:_0x5ab112(764),type:[_0x5ab112(647)],default:!1},{name:"muted",type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(547),type:[_0x5ab112(647)],default:!0},{name:"atuo-foucus",type:[_0x5ab112(647)],default:!0},{name:_0x5ab112(517),type:[_0x5ab112(480)],default:_0x5ab112(636),enum:["vertical",_0x5ab112(550)]},{name:_0x5ab112(541),type:[_0x5ab112(477)],default:0,enum:[0,1,2,3,4,5,6,7,8,9]},{name:_0x5ab112(721),type:[_0x5ab112(477)],default:0,enum:[0,1,2,3,4,5,6,7,8,9]},{name:_0x5ab112(724),type:["string"],default:"9:16",enum:[_0x5ab112(519),_0x5ab112(590)]},{name:_0x5ab112(621),type:["number"],default:200},{name:"max-bitrate",type:[_0x5ab112(477)],default:1e3},{name:_0x5ab112(806),type:["string"],default:"high",enum:["low",_0x5ab112(801)]},{name:"waiting-image",type:[_0x5ab112(480)]},{name:_0x5ab112(470),type:[_0x5ab112(480)]},{name:_0x5ab112(471),type:[_0x5ab112(647)],default:!1},{name:"device-position",type:[_0x5ab112(480)],default:_0x5ab112(722),enum:[_0x5ab112(722),_0x5ab112(593)]},{name:_0x5ab112(688),type:["boolean"],default:!1},{name:_0x5ab112(778),type:["boolean"],default:!1}]},"live-player":{events:[_0x5ab112(780),_0x5ab112(594),_0x5ab112(643)],attrs:[{name:_0x5ab112(576),type:["string"],checkPath:!0},{name:_0x5ab112(661),type:[_0x5ab112(480)],default:"RTC",enum:["HD",_0x5ab112(743),"SD",_0x5ab112(762)]},{name:_0x5ab112(772),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(485),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(517),type:[_0x5ab112(480)],default:_0x5ab112(636),enum:[_0x5ab112(636),"horizontal"]},{name:"object-fit",type:[_0x5ab112(480)],default:_0x5ab112(502),enum:[_0x5ab112(502),_0x5ab112(781)]},{name:_0x5ab112(688),type:[_0x5ab112(647)],default:!1},{name:"min-cache",type:[_0x5ab112(477)],default:1},{name:_0x5ab112(622),type:[_0x5ab112(477)],default:3},{name:_0x5ab112(536),type:[_0x5ab112(480)],default:_0x5ab112(588),enum:[_0x5ab112(588),_0x5ab112(526)]},{name:_0x5ab112(559),type:[_0x5ab112(647)],default:!0},{name:_0x5ab112(758),type:[_0x5ab112(647)],default:!0}]},camrea:{events:["bindstop","binderror",_0x5ab112(592),_0x5ab112(555)],attrs:[{name:_0x5ab112(661),type:[_0x5ab112(647)],default:"normal",enum:["front","back"]},{name:_0x5ab112(634),type:[_0x5ab112(480)],default:_0x5ab112(593)},{name:"flash",type:[_0x5ab112(480)],default:"auto",enum:[_0x5ab112(752),"on",_0x5ab112(466),"torch"]},{name:_0x5ab112(678),type:[_0x5ab112(480)],default:"medium",enum:[_0x5ab112(504),"medium",_0x5ab112(659)]},{name:_0x5ab112(567),type:[_0x5ab112(480)],default:_0x5ab112(752)}]},view:{attrs:[{name:_0x5ab112(681),type:[_0x5ab112(480)],default:_0x5ab112(705)},{name:_0x5ab112(747),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(720),type:[_0x5ab112(477)],default:50},{name:"hover-stay-time",type:[_0x5ab112(477)],default:400}]},"scroll-view":{events:[_0x5ab112(796),_0x5ab112(453),_0x5ab112(606)],attrs:[{name:"scroll-x",type:[_0x5ab112(647)],default:!1},{name:"scroll-y",type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(701),type:["number",_0x5ab112(480)],default:50},{name:_0x5ab112(654),type:[_0x5ab112(477),_0x5ab112(480)],default:50},{name:_0x5ab112(500),type:[_0x5ab112(477),_0x5ab112(480)]},{name:_0x5ab112(561),type:["number",_0x5ab112(480)]},{name:_0x5ab112(416),type:[_0x5ab112(480)]},{name:"scroll-with-animation",type:["boolean"],default:!1},{name:"scroll-flex",type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(427),type:[_0x5ab112(647)],default:!1}]},"movable-area":{attrs:[{name:_0x5ab112(523),type:[_0x5ab112(647)],default:!1}]},"movable-view":{events:[_0x5ab112(610),_0x5ab112(665),_0x5ab112(646),_0x5ab112(791)],attrs:[{name:_0x5ab112(600),type:[_0x5ab112(480)],default:"none"},{name:_0x5ab112(680),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(429),type:[_0x5ab112(647)],default:!1},{name:"x",type:[_0x5ab112(477)]},{name:"y",type:[_0x5ab112(477)]},{name:_0x5ab112(668),type:[_0x5ab112(477)],default:20},{name:_0x5ab112(589),type:[_0x5ab112(477)],default:2},{name:"disabled",type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(434),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(566),type:[_0x5ab112(477)],default:.5},{name:_0x5ab112(630),type:["number"],default:10},{name:_0x5ab112(564),type:["number"],default:1},{name:_0x5ab112(560),type:[_0x5ab112(647)],default:!0}]},audio:{events:[_0x5ab112(456),_0x5ab112(556),_0x5ab112(727),"bindtimeupdate","bindended"],attrs:[{name:"id",type:[_0x5ab112(480)]},{name:_0x5ab112(576),type:[_0x5ab112(480)],checkPath:!0},{name:"loop",type:["boolean"],default:!1},{name:_0x5ab112(704),type:["boolean"],default:!1},{name:_0x5ab112(651),type:[_0x5ab112(480)],checkPath:!0},{name:_0x5ab112(481),type:[_0x5ab112(480)]},{name:_0x5ab112(545),type:[_0x5ab112(480)]}]},progress:{events:[_0x5ab112(499)],attrs:[{name:_0x5ab112(573),type:[_0x5ab112(477)]},{name:_0x5ab112(503),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(777),type:[_0x5ab112(477),_0x5ab112(480)],default:0},{name:_0x5ab112(635),type:[_0x5ab112(477),_0x5ab112(480)],default:16},{name:_0x5ab112(733),type:[_0x5ab112(477),_0x5ab112(480)],default:6},{name:"color",type:[_0x5ab112(480)],default:_0x5ab112(740)},{name:"active-color",type:[_0x5ab112(480)],default:_0x5ab112(740)},{name:"backgroundColor",type:[_0x5ab112(480)],default:_0x5ab112(583)},{name:_0x5ab112(676),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(714),type:[_0x5ab112(480)],default:"backwards"},{name:_0x5ab112(452),type:["number"],default:30}]},"rich-text":{attrs:[{name:_0x5ab112(632),type:["array",_0x5ab112(480)],default:[]},{name:_0x5ab112(797),type:["string"]}]},text:{attrs:[{name:_0x5ab112(772),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(772),type:["string"]},{name:_0x5ab112(425),type:[_0x5ab112(647)],default:!1}]},swiper:{events:[_0x5ab112(707),"bindtransition",_0x5ab112(488)],attrs:[{name:"indicator-dots",type:["boolean"],default:!1},{name:_0x5ab112(770),type:[_0x5ab112(480)],default:_0x5ab112(809)},{name:"indicator-active-color",type:[_0x5ab112(480)],default:_0x5ab112(467)},{name:_0x5ab112(772),type:[_0x5ab112(647)],default:!1},{name:"current",type:[_0x5ab112(477),_0x5ab112(480)],default:0},{name:_0x5ab112(615),type:[_0x5ab112(477),"string"],default:5e3},{name:"duration",type:[_0x5ab112(477),_0x5ab112(480)],default:500},{name:_0x5ab112(636),type:[_0x5ab112(647)],default:!1},{name:"circular",type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(474),type:[_0x5ab112(480),"number"],default:_0x5ab112(739)},{name:_0x5ab112(677),type:[_0x5ab112(480),"number"],default:_0x5ab112(739)},{name:_0x5ab112(608),type:[_0x5ab112(477)],default:1},{name:_0x5ab112(717),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(424),type:["string"],default:"default",enum:["default",_0x5ab112(585),_0x5ab112(448),_0x5ab112(612),_0x5ab112(716)]}]},"swiper-item":{parent:"swiper",attrs:[{name:_0x5ab112(725)}]},image:{events:[_0x5ab112(456),_0x5ab112(491)],attrs:[{name:_0x5ab112(576),checkPath:!0},{name:_0x5ab112(661)},{name:_0x5ab112(738)},{name:"lazy-load"},{name:"show-menu-by-longpress"}]},icon:{attrs:[{name:"type",type:[_0x5ab112(480)]},{name:_0x5ab112(457),type:["number",_0x5ab112(480)],default:23},{name:_0x5ab112(461),type:[_0x5ab112(480)]}]},"cover-image":{attrs:[{name:_0x5ab112(576),required:!0,checkPath:!0}],events:["bindload","binderror"]},"cover-view":{attrs:[{name:_0x5ab112(500),type:[_0x5ab112(477),_0x5ab112(480)]}]},checkbox:{attrs:[{name:_0x5ab112(691),type:[_0x5ab112(480),_0x5ab112(477)]},{name:"disabled",type:["boolean"],default:!1},{name:_0x5ab112(507),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(461),type:["string"],default:_0x5ab112(740)}]},button:{events:[_0x5ab112(497),"bindcontact",_0x5ab112(508),_0x5ab112(456),_0x5ab112(667),_0x5ab112(768)],attrs:[{name:_0x5ab112(457),type:["string"],default:_0x5ab112(535),enum:[_0x5ab112(535),_0x5ab112(723)]},{name:_0x5ab112(787),type:[_0x5ab112(480)],default:_0x5ab112(535),enum:[_0x5ab112(487),_0x5ab112(535),_0x5ab112(490)]},{name:_0x5ab112(626),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(619),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(505),type:[_0x5ab112(647)],default:!1},{name:"form-type",type:[_0x5ab112(480)],enum:[_0x5ab112(581),_0x5ab112(568)]},{name:"open-type",type:[_0x5ab112(480)],enum:[_0x5ab112(512),_0x5ab112(735),"getPhoneNumber",_0x5ab112(493),_0x5ab112(664),"openSetting","feedback"]},{name:_0x5ab112(681),type:["string"],default:"button-hover"},{name:"hover-stop-propagation",type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(720),type:[_0x5ab112(477)],default:20},{name:_0x5ab112(782),type:["number"],default:70},{name:"lang",type:["string"],default:"en",enum:["en","zh_CN",_0x5ab112(525)]},{name:_0x5ab112(673),type:["string"]},{name:_0x5ab112(577),type:[_0x5ab112(480)]},{name:"send-message-path",type:[_0x5ab112(480)]},{name:_0x5ab112(478),type:[_0x5ab112(480)]},{name:_0x5ab112(715),type:[_0x5ab112(480)]},{name:"show-message-card",type:[_0x5ab112(647)],default:!1}]},"checkbox-group":{events:[_0x5ab112(610)],attrs:[]},editor:{events:[_0x5ab112(650),_0x5ab112(655),_0x5ab112(638),_0x5ab112(436),_0x5ab112(447)],attrs:[{name:_0x5ab112(693),type:["boolean"],default:!1},{name:_0x5ab112(629),type:[_0x5ab112(480),_0x5ab112(477)]},{name:_0x5ab112(660),type:["boolean"],default:!1},{name:"show-img-toolbar",type:["boolean"],default:!1},{name:_0x5ab112(613),type:[_0x5ab112(647)],default:!1}]},form:{events:[_0x5ab112(420),_0x5ab112(514)],attrs:[{name:_0x5ab112(538),type:["boolean"],default:!1},{name:_0x5ab112(759),type:["number"],default:0}]},input:{events:[_0x5ab112(436),"bindfocus","bindblur",_0x5ab112(684),_0x5ab112(617)],attrs:[{name:"value",type:[_0x5ab112(480),_0x5ab112(477)]},{name:"type",type:[_0x5ab112(480)],default:_0x5ab112(708),enum:["text",_0x5ab112(477),_0x5ab112(726),"digit"]},{name:_0x5ab112(532),type:["boolean"],default:!1},{name:"placeholder",type:["string",_0x5ab112(477)]},{name:_0x5ab112(736),type:[_0x5ab112(480)]},{name:_0x5ab112(586),type:[_0x5ab112(480)],default:_0x5ab112(492)},{name:_0x5ab112(619),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(605),type:["number"],default:140},{name:"cursor-spacing",type:[_0x5ab112(477)],default:0},{name:_0x5ab112(445),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(749),type:["boolean"],default:!1},{name:_0x5ab112(702),type:[_0x5ab112(480)],default:_0x5ab112(415),enum:[_0x5ab112(430),"search",_0x5ab112(528),"go",_0x5ab112(415)]},{name:_0x5ab112(571),type:[_0x5ab112(647)],default:!1},{name:"cursor",type:["number"]},{name:_0x5ab112(432),type:[_0x5ab112(477)],default:-1},{name:_0x5ab112(696),type:[_0x5ab112(477)],default:-1},{name:"adjust-position",type:[_0x5ab112(647)],default:!0},{name:_0x5ab112(769),type:[_0x5ab112(647)],default:!1}]},label:{attrs:[{name:_0x5ab112(465),type:[_0x5ab112(480)]}]},picker:{events:[_0x5ab112(754),_0x5ab112(610),_0x5ab112(551)],attrs:[{name:"mode",type:[_0x5ab112(480)],default:_0x5ab112(530),enum:[_0x5ab112(530),"multiSelector","time",_0x5ab112(584),_0x5ab112(418)]},{name:_0x5ab112(619),type:["boolean"],default:!1},{name:"range",type:[_0x5ab112(475)]},{name:_0x5ab112(587),type:[_0x5ab112(647)],string:!1},{name:"value",type:[_0x5ab112(477),_0x5ab112(475),_0x5ab112(480)]},{name:_0x5ab112(511),type:[_0x5ab112(480),_0x5ab112(477)]},{name:_0x5ab112(616),type:[_0x5ab112(480),"number"]},{name:_0x5ab112(421),type:[_0x5ab112(480)],default:_0x5ab112(637),enum:["year",_0x5ab112(570),"day"]},{name:_0x5ab112(462),type:[_0x5ab112(480)]}]},"picker-view":{events:["bindchange","bindpickstart",_0x5ab112(706)],attrs:[{name:_0x5ab112(691),type:[_0x5ab112(475)],default:_0x5ab112(530)},{name:"indicator-style",type:[_0x5ab112(480)]},{name:_0x5ab112(580),type:[_0x5ab112(480)]},{name:_0x5ab112(690),type:[_0x5ab112(480)]},{name:_0x5ab112(734),type:["string"]}]},"picker-view-column":{attrs:[]},radio:{attrs:[{name:_0x5ab112(691),type:["string","number"]},{name:_0x5ab112(461),type:[_0x5ab112(480)],default:_0x5ab112(740)},{name:_0x5ab112(507),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(619),type:["boolean"],default:!1}]},"radio-group":{events:["bindchange"],attrs:[]},slider:{events:[_0x5ab112(610),_0x5ab112(750)],attrs:[{name:"min",type:["number"],default:0},{name:_0x5ab112(685),type:[_0x5ab112(477)],default:100},{name:_0x5ab112(595),type:["number"],default:1},{name:_0x5ab112(619),type:[_0x5ab112(647)],default:!1},{name:"value",type:[_0x5ab112(477)],default:0},{name:_0x5ab112(461),type:["string"],default:_0x5ab112(792)},{name:_0x5ab112(518),type:[_0x5ab112(480)],default:_0x5ab112(476)},{name:_0x5ab112(790),type:["string"],default:_0x5ab112(476)},{name:_0x5ab112(773),type:[_0x5ab112(480)],default:_0x5ab112(792)},{name:_0x5ab112(798),type:["number"],default:28},{name:_0x5ab112(431),type:["string"],default:_0x5ab112(574)},{name:_0x5ab112(531),type:["boolean"],default:!1}]},switch:{events:[_0x5ab112(610)],attrs:[{name:_0x5ab112(507),type:[_0x5ab112(647)],default:!1},{name:"disabled",type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(787),type:[_0x5ab112(480)],default:"switch"},{name:_0x5ab112(461),type:[_0x5ab112(480)],default:_0x5ab112(675)}]},textarea:{events:[_0x5ab112(655),_0x5ab112(638),"bindlinechange",_0x5ab112(436),_0x5ab112(684),_0x5ab112(617)],attrs:[{name:_0x5ab112(691),type:["string"]},{name:_0x5ab112(629),type:[_0x5ab112(480),_0x5ab112(477)]},{name:_0x5ab112(736),type:[_0x5ab112(480)]},{name:_0x5ab112(586),type:[_0x5ab112(480)],default:_0x5ab112(807)},{name:_0x5ab112(619),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(605),type:[_0x5ab112(477)],default:140},{name:_0x5ab112(445),type:["boolean"],default:!1},{name:_0x5ab112(749),type:["boolean"],default:!1},{name:_0x5ab112(455),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(446),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(641),type:[_0x5ab112(477)],default:0},{name:_0x5ab112(788),type:["number"],default:-1},{name:_0x5ab112(558),type:[_0x5ab112(647)],default:!1},{name:_0x5ab112(432),type:[_0x5ab112(477)],default:-1},{name:_0x5ab112(696),type:[_0x5ab112(477)],default:-1},{name:_0x5ab112(618),type:[_0x5ab112(647)],default:!0},{name:_0x5ab112(769),type:[_0x5ab112(647)],default:!1}]},"functional-page-navigator":{events:[_0x5ab112(710),"bindfail",_0x5ab112(754)],attrs:[{name:"version",type:[_0x5ab112(480)],default:"release"},{name:_0x5ab112(481),type:[_0x5ab112(480)]},{name:"args",type:["object"]}]},navigator:{events:[_0x5ab112(710),_0x5ab112(542),"bindcomplete"],attrs:[{name:"target",type:["string"],default:_0x5ab112(441)},{name:"url",type:["string"]},{name:_0x5ab112(450),type:[_0x5ab112(480)],default:_0x5ab112(686),enum:["navigate",_0x5ab112(472),"switchTab","reLaunch","navigateBack",_0x5ab112(501)]},{name:_0x5ab112(805),type:["number"],default:1},{name:_0x5ab112(631),type:[_0x5ab112(480)]},{name:_0x5ab112(732),type:[_0x5ab112(480)]},{name:_0x5ab112(438),type:["object"]},{name:_0x5ab112(628),type:[_0x5ab112(480)],default:_0x5ab112(652),enum:[_0x5ab112(671),_0x5ab112(442),_0x5ab112(652)]},{name:_0x5ab112(681),type:[_0x5ab112(480)],default:_0x5ab112(582)},{name:_0x5ab112(747),type:["boolean"],default:!1},{name:_0x5ab112(720),type:[_0x5ab112(477)],default:50},{name:_0x5ab112(782),type:[_0x5ab112(477)],default:600}]},"open-data":{events:[_0x5ab112(456)],attrs:[{name:"type",type:["string"],enum:[_0x5ab112(548),"userNickName",_0x5ab112(604),"userGender",_0x5ab112(489),_0x5ab112(672),_0x5ab112(793),_0x5ab112(454)]},{name:"open-gid",type:["string"]},{name:"lang",type:[_0x5ab112(480)],default:"en",enum:["en",_0x5ab112(546),_0x5ab112(525)]},{name:"default-text",type:[_0x5ab112(480)]},{name:_0x5ab112(703),type:[_0x5ab112(480)]}]},"official-account":{events:[_0x5ab112(491),"binderror"],attrs:[]},ad:{events:["bindload","binderror",_0x5ab112(426)],attrs:[{name:"unit-id",type:[_0x5ab112(480)],required:!0},{name:_0x5ab112(563),type:[_0x5ab112(477)]}]},"web-view":{events:["bindmessage",_0x5ab112(491),_0x5ab112(456)],attrs:[{name:_0x5ab112(576),type:[_0x5ab112(480)],checkPath:!0}]},canvas:{events:[_0x5ab112(484),_0x5ab112(662),_0x5ab112(486),_0x5ab112(698),_0x5ab112(653),_0x5ab112(456)],attrs:[{name:_0x5ab112(787),type:[_0x5ab112(480)]},{name:_0x5ab112(599),type:["string"]},{name:_0x5ab112(468),type:["boolean"],default:!1}]},"navigation-bar":{events:[],attrs:[{name:_0x5ab112(473),type:[_0x5ab112(480)]},{name:_0x5ab112(505),type:["boolean"],default:!1},{name:"front-color",type:[_0x5ab112(480)]},{name:_0x5ab112(773),type:[_0x5ab112(480)]},{name:_0x5ab112(435),type:["number"],default:0},{name:_0x5ab112(746),type:[_0x5ab112(480)],default:""},{name:_0x5ab112(737),type:["string"],default:_0x5ab112(585),enum:[_0x5ab112(585),_0x5ab112(700),_0x5ab112(579),_0x5ab112(799)]}]},"page-meta":{events:[_0x5ab112(627),"bindscroll","bindscrolldone"],attrs:[{name:_0x5ab112(451),type:[_0x5ab112(480)]},{name:_0x5ab112(773),type:[_0x5ab112(480)]},{name:_0x5ab112(444),type:[_0x5ab112(480)]},{name:_0x5ab112(596),type:[_0x5ab112(480)]},{name:_0x5ab112(500),type:[_0x5ab112(480)],default:""},{name:"scroll-duration",type:[_0x5ab112(477)],default:300},{name:"page-style",type:["string"],default:""},{name:_0x5ab112(757),type:[_0x5ab112(480)],default:""}]},"ad-button":{events:[_0x5ab112(611)],attrs:[{name:_0x5ab112(694),type:[_0x5ab112(480)],required:!0},{name:_0x5ab112(509),type:[_0x5ab112(480)],required:!0},{name:"valuetype",type:["number"],default:0},{name:_0x5ab112(450),type:[_0x5ab112(477)],default:0}]}},tagRequiredParent={},tagRequiredAttrs={},tagAllowedAttrs={},tagAttrsAllowedType={},tagAttrsNeedCheckPath={},attrsNeedCombine={},URL_MATCH_REG_EXP=/url\s*\(\s*['"]?\s*([^\(\)]+?)\s*['"]?\s*\)/g,URL_CONTENT_REG_EXP=/url\s*\(\s*['"]?([^'"]*)['"]?\s*\)/;function initData(b){var x=_0x5ab112;tagCommon.attrs[x(443)](function(a){return a.combDiectives}).forEach(function(a){return attrsNeedCombine[a[x(481)]]=a.combDiectives}),Object.keys(b)[x(413)](function(a){var e=x,t=b[a],n=t[e(663)];t[e(602)]&&t[e(602)][e(783)]&&(tagRequiredParent[a]=t[e(602)]),tagRequiredAttrs[a]=n[e(443)](function(a){return a[e(767)]}),tagAllowedAttrs[a]=n[e(597)](tagCommon[e(663)]),tagAttrsAllowedType[a]=n[e(443)](function(a){return a[e(787)]}),tagAttrsNeedCheckPath[a]=n[e(443)](function(a){return a[e(683)]}).map(function(a){return a[e(481)]})})}function getRelativePath(a,e){return path[_0x5ab112(422)](a,e).replace(/\\/g,"/")}function findIncldeTagSrcChain(a,e){for(var t,n=_0x5ab112,b=[],x=a[n(603)],_=e[n(789)],r=e[n(562)];x;)x[n(544)][n(669)](/^q\-/,"")===n(423)&&(t=x[n(663)][n(443)](function(a){return"src"===a[n(481)]})[0])&&b[n(644)](t[n(691)]),x=x[n(603)];return b[n(783)]&&(r=b.reduce(function(a,e){e=utils[n(516)](e,r,_).filePath;return r=e},"")),/\.hxml$/[n(719)](r)?r:""[n(597)](r,".hxml")}function findIncludeSrcPath(a,e){var t=_0x5ab112,n=a;return/^\//[t(719)](e)?{srcPath:a}:((a=a[t(774)](/\/|\\/)).pop(),a=a[t(779)]("/"),{sourcePath:n,filePath:path[t(779)](a,e)[t(669)](/\\/g,"/")})}function checkSourcePath(a,e,t,n,b){var x,_=_0x5ab112;/^(https?:)?\/\//[_(719)](e[_(691)])||(x=e[_(691)],a=a[_(771)],tagAttrsNeedCheckPath[a][_(666)](e[_(481)])&&fileExistHandle(a,e,t,n,b),e[_(481)]!==_(601))||typeof x!==_(480)||x[_(666)]("rpx")||checkStyleUrlPath(a,e,t,n,b)}function fileExistHandle(a,e,t,n,b){var x,_,r,l=_0x5ab112;return/^(https?:)?\/\//[l(719)](e[l(691)])||typeof e.value!==l(480)?e[l(691)]:(x=e[l(691)],_=n[l(789)],n=n[l(562)],r=findIncludeSrcPath(b,x),n=utils[l(516)](x,n,_)[l(695)][l(669)](/\s/g,""),n=r&&r.filePath?r[l(695)]:n,fs[l(645)](n)?(r=getRelativePath(_,n),e[l(691)]="/"[l(597)](r)):/^\/[^\/]+|(\.?\.\/)/.test(x)&&t[l(417)]({filePath:b,loc:e[l(633)]||{start:0,end:0},reason:"WRANNING: Component <"[l(597)](a,"> attribute '")[l(597)](e[l(481)],"' ")+l(482)[l(597)](e[l(691)],l(731))+l(510)}),e.value)}function checkStyleUrlPath(n,a,b,x,_){var r=_0x5ab112;URL_MATCH_REG_EXP[r(719)](a[r(691)])&&(a[r(691)]=a[r(691)][r(669)](URL_MATCH_REG_EXP,function(a){var e=r,t=a[e(669)](/(\\")|(\\')/g,"").match(URL_CONTENT_REG_EXP);return t?(t=fileExistHandle(n,{value:t[1],name:e(601)},b,x,_),e(609).concat(t,")")):a}))}function checkAttrValType(a,e,t,n){var b=_0x5ab112,x=tagAttrsAllowedType[a].find(function(a){return a[_0x3689(481)]===e.name});x&&(x=x[b(787)])&&(x=x.filter(function(a){return a!==b(647)}))[b(783)]&&!x.includes(getAttrValType(e.value))&&t[b(417)]({filePath:n,loc:e[b(633)],reason:b(766).concat(a,"> attribute '")[b(597)](e[b(481)],"' ")+b(529)[b(597)](e[b(691)],"' is not allowed type: <").concat(getAttrValType(e.value),b(575))+b(459)[b(597)](JSON.stringify(x[b(779)](", ")))})}function getAttrValType(a){var e,t=_0x5ab112;try{return/^{(:+)}$/[t(719)](a)?"object":(e=vm.runInThisContext(a),Object[t(761)].toString[t(498)](e)[t(419)](8,-1)[t(729)]())}catch(a){return"string"}}function isParentTagExist(a,e){for(var t=_0x5ab112,n=a[t(603)];n&&n[t(544)][t(669)](/^q\-/,"")!==e;)n=n.parentNode;return!!n}function checkTagName(a,e,t){var n=_0x5ab112,b=a[n(771)],e=e[n(625)];tagRequiredParent[b]&&!isParentTagExist(a,a=tagRequiredParent[b])&&e[n(417)]({filePath:t,reason:"WRANING: Component <"[n(597)](b,n(657))[n(597)](a,n(575))+n(549)})}function checkAttrValInAllowedList(a,e,t,n,b){var x=_0x5ab112,_="number"===getAttrValType(e.value)?Number(e[x(691)]):e[x(691)],n=(typeof _===x(480)&&(_=_[x(554)]()),n.buildLog);t[x(666)](_)||n.push({filePath:b,loc:e[x(633)],reason:x(766).concat(a,x(524)).concat(e[x(481)],x(463)).concat(e.value,x(540))+x(742)[x(597)](JSON[x(730)](t.join(", ")))})}function checkElseIf(a,e,t,n){var b,x,_=_0x5ab112,r=!1;[_(642),_(624)][_(666)](e[_(481)])&&((x=a[_(603)].childNodes)&&1<x.length&&(b=x.indexOf(a),r=(x=x[_(419)](0,b)).length&&x[_(745)](function(a){var e=_;return a[e(663)]&&a[e(663)][e(506)](function(a){return"v-if"===a[e(481)]})})),r||(t[_(625)][_(417)]({filePath:n,loc:e[_(633)],trigger:ATTR_NAME,reason:"WRANNING: "[_(597)](e[_(481)],"=")[_(597)](e[_(691)],_(640))[_(597)](a[_(771)],"> ")+_(496)}),a[_(663)][_(741)](a[_(663)][_(414)](e),1)))}function checkAttrFor(a,e,t,n){var b,x,_=_0x5ab112,r=attrsNeedCombine[e[_(481)]];r&&(x=(b=a[_(663)]).indexOf(e),!b[_(506)](function(a){var e=_;return r[e(666)](a[e(481)])}))&&(t[_(625)][_(417)]({filePath:n,loc:e.loc,trigger:ATTR_NAME,reason:_(718)[_(597)](e.name,"=")[_(597)](e[_(691)],_(640))[_(597)](a.tagName,"> ")+_(794)}),/^has:key$/[_(719)](e.name))&&a[_(663)][_(741)](x,1)}function checkAttrAllowed(a,e,t){var n=_0x5ab112,b=[n(565)];return/^(v-|:)/[n(719)](a[n(481)])?(e[n(417)]({filePath:t,loc:a[n(633)],trigger:ATTR_NAME,reason:n(786)[n(597)](a[n(481)],", attribute can not start with 'v-' or ':'. ")}),!1):(b[n(666)](a.name)&&e[n(417)]({filePath:t,loc:a[n(633)],trigger:ATTR_NAME,reason:"WARNING: Unexpected JavaScript keyword as attribute name: '"[n(597)](a.name,"', please change it.")}),!0)}function checkTagAttrs(e,b,x,_){var r,n,l=_0x5ab112,i=e.tagName,o=b[l(625)],a=e.attrs,u=tagAllowedAttrs[i],t=tagRequiredAttrs[i];u?(t[l(413)](function(t){var n=l;a[n(506)](function(a){var e=n;return a[e(481)]===t[e(481)]})||o[n(417)]({filePath:_,loc:e.loc,reason:"WRANNING: Component <".concat(i,n(527))[n(597)](t[n(481)],"'")})}),r=[],a.forEach(function(t){var a,n=l;checkAttrAllowed(t,o,_)&&r[n(417)](t),!expUtils[n(591)](t.value)&&!utils[n(557)](t[n(691)])&&(/^data\-/[n(719)](t[n(481)])||(t[n(481)]=utils.camelCaseToHyphened(t[n(481)])),a=u[n(506)](function(a){var e=n;return new RegExp("^".concat(a[e(481)]))[e(719)](t[e(481)])}))&&(a[n(753)]?checkAttrValInAllowedList(i,t,a.enum,b,_):checkAttrValType(i,t,o,_),checkSourcePath(e,t,o,x,_)),checkElseIf(e,t,b,_),checkAttrFor(e,t,b,_)}),e.attrs=r):a&&0<a[l(783)]&&(n=[],a.forEach(function(a,e,t){checkAttrAllowed(a,o,_)&&n.push(a)}),e[l(663)]=n)}function _0x58a6(){var a=["text","latitude","bindsuccess","ad-unit-id","./utils","layer-style","active-mode","app-parameter","easeInOutCubic","skip-hidden-item-layout","WRANNING: ","test","hover-start-time","whiteness","front","mini","aspect","item-id","idcard","bindpause","skew","toLowerCase","stringify","' is not exist, ","path","stroke-width","mask-class","share","placeholder-style","color-animation-timing-func","webp","0px","#09BB07","splice"," Use below values \n ","FHD","loop","some","page-style","hover-stop-propagation","enable-sttellite","focus","bindchanging","danmu-button","auto","enum","bindcancel","data","show-play-btn","root-font-size","auto-pause-if-navigate","report-submit-timeout","bindlabeltap","prototype","RTC","initial-time","autopush","exports","WRANNING: Component <","required","bindlaunchapp","hold-keyboard","indicator-color","tagName","autoplay","background-color","split","show-center-play-btn","danmu-list","border-radius","mirror","join","bindstatechange","fillCrop","hover-stay-time","length","enable-rotate","1961608HRlyqd","WARNING: Unexpected attribute name: ","type","cursor","rootPath","active-color","vtouchmove","#e9e9e9","userCountry","without corresponding has:for.","bindtimeupdate","bindscrolltoupper","space","block-size","easeInOut","579906yPUapg","high","enable-zoom","center","has:for-items","delta","audio-quality","textarea-placeholde","polygons","rgba(0, 0, 0, .3)","./exp-utils","url","forEach","indexOf","done","scroll-into-view","push","region","slice","bindsubmit","fields","relative","_@template@_","easing-function","decode","bindclose","scroll-anchoring","page-gesture","out-of-bounds","send","block-color","selection-start","buttom","scale","color-animation-duration","bindinput","cover","extra-data","bind","ATTR_NAME","self","trial","filter","background-color-top","auto-focus","fixed","bindstatuschange","easeInCubic","show-location","open-type","background-text-style","durations","bindscrolltolower","userLanguage","auto-height","binderror","size","bindpoitap","Use below types ","bindupdated","color","custom-item","' value '","play-btn-postion","for","off","#000000","disable-scroll","capture-catch:","waiting-image-hash","zoom","redirect","title","previous-margin","array","#1aad19","number","send-message-img","30852639xnZXbv","string","name","source path '","enable-traffic","bindtouchstart","muted","bindtouchend","primary","bindanimationfinish","userCity","warn","bindload","input-placeholder","getUserInfo","show-compass","vslide-gesture-in-fullscreen","without corresponding has:if.","bindgetuserinfo","call","bindactiveend","scroll-top","exit","contain","show-info","small","loading","find","checked","bindgetphonenumber","adunitid","Please check.","start","contact","vslide-gesture","bindreset","circles","getAbsPath","orientation","selected-color","9:16","enable-3D","bindbgmprogress","18376VMQMBm","scale-area","> attribute '","zh_TW","ear","> missing required attribute '","next","value '","selector","show-value","password","enable-scroll","bindwating","default","sound-mode","6rHIjSC","report-submit","fill","' is not allowed,","beauty","bindfail","setting","nodeName","author","zh_CN","enable-camera","groupName","Please check it","horizontal","bindcolumnchange","subkey","bindended","trim","bindscancode","bindplay","isEmptyStr","show-confirm-bar","auto-pause-if-open-native","animation","scroll-left","resourcePath","ad-intervals","scale-value","key","scale-min","flash","reset","10077426zZiyJG","month","confirm-hold","live","percent","#ffffff",">, ","src","send-message-title","1182keeTLq","easeOut","indicator-class","submit","navigator-hover","#EBEBEB","date","linear","placeholder-class","range-key","speaker","friction","3:4","isExpr","bindinitdone","back","bindfullscreenchange","step","background-color-bottom","concat","polyline","canvas-id","direction","style","parent","parentNode","userAvatarUrl","maxlength","bindscroll","class","display-multiple-items","url(","bindchange","bindtap","easeOutCubic","show-img-resize","has:for","interval","end","bindkeyboardheightchange","adjust-position","disabled","enable-play-gesture","mini-bitrate","min-cache","bindcontroltap","has:elif","buildLog","plain","bindresize","version","placeholder","scale-max","app-id","nodes","loc","device-position","font-size","vertical","day","bindblur","object"," used on element <","cursor-spacing","has:else","bindnetstatus","unshift","existsSync","htouchmove","boolean","bindbgmstart","duration","bindready","poster","release","bindlongtap","lower-threshold","bindfocus","include-points","> cant not find parent component: <","marker","large","show-img-size","mode","bindtouchmove","attrs","launchApp","bindscale","includes","bindopensetting","damping","replace","225000MUqFDg","develop","userProvince","session-from","show-scale","#04BE02","active","next-margin","frame-size","object-fit","inertia","hover-class","longitude","checkPath","bindconfirm","max","navigate","3741682blWLta","background-mute","enable-overlooking","mask-style","value","rotate","read-only","adid","filePath","selection-end","has:if","bindtouchcancel","show-fullscreen-btn","easeIn","upper-threshold","confirm-type","default-avatar","controls","node","bindpickend","bindchang"];return(_0x58a6=function(){return a})()}function checkNode(a,e,t){var n=findIncldeTagSrcChain(a,t);checkTagName(a,e,n),checkTagAttrs(a,e,t,n)}initData(tagComponentMap),module[_0x5ab112(765)]={checkTagAttrs:checkTagAttrs,checkTagName:checkTagName,isParentTagExist:isParentTagExist,checkNode:checkNode,findIncldeTagSrcChain:findIncldeTagSrcChain};
|
|
1
|
+
var expUtils=require("./exp-utils"),fs=require("fs"),utils=require("./utils"),path=require("path"),vm=require("vm"),ATTR_NAME="ATTR_NAME",tagCommon={attrs:[{name:"id"},{name:"class"},{name:"style"},{name:"has:for"},{name:"has:if"},{name:"has:elif"},{name:"has:else"},{name:"has:key",combDiectives:["has:for","has:for-items"]},{name:"has:for-items"},{name:"has:for-index",combDiectives:["has:for","has:for-items"]},{name:"has:for-item",combDiectives:["has:for","has:for-items"]},{name:"data"},{name:"bind"},{name:"data"},{name:"data-"},{name:"catch"},{name:"capture-catch:"}]},tagComponentMap={map:{events:["bindtap","bindmarketap","bindlabeltap","bindcontroltap","bindcallouttap","bindupdated","bindregionchange","bindpoitap"],attrs:[{name:"longitude",type:["number"],required:!0},{name:"latitude",type:["number"],required:!0},{name:"scale",type:["number"],default:16,enum:[3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]},{name:"marker",type:["array"]},{name:"cover",type:["array"]},{name:"polyline",type:["array"]},{name:"circles",type:["array"]},{name:"controls",type:["array"]},{name:"include-points",type:["array"]},{name:"show-location",type:["boolean"],default:!1},{name:"polygons",type:["array"]},{name:"subkey",type:["string"]},{name:"layer-style",type:["number"],default:1},{name:"rotate",type:["number"],default:0},{name:"skew",type:["number"],default:0},{name:"show-compass",type:["boolean"],default:!1},{name:"enable-3D",type:["boolean"],default:!1},{name:"show-scale",type:["boolean"],default:!1},{name:"enable-overlooking",type:["boolean"],default:!1},{name:"enable-zoom",type:["boolean"],default:!0},{name:"enable-sttellite",type:["boolean"],default:!1},{name:"enable-traffic",type:["boolean"],default:!1},{name:"enable-scroll",type:["boolean"],default:!0},{name:"enable-rotate",type:["boolean"],default:!1},{name:"setting",type:["object"]}]},video:{events:["bindplay","bindpause","bindended","bindtimeupdate","bindfullscreenchange","bindwating","binderror","bindprogress","bindloadmetadata"],attrs:[{name:"src",type:["string"],checkPath:!0,required:!0},{name:"duration",type:["number"]},{name:"controls",type:["boolean"],default:!0},{name:"danmu-list",type:["array"]},{name:"danmu-list",type:["array"]},{name:"danmu-button",type:["boolean"],default:!1},{name:"enable-danmu",type:["boolean"],default:!1},{name:"autoplay",type:["boolean"],default:!1},{name:"loop",type:["boolean"],default:!1},{name:"muted",type:["boolean"],default:!1},{name:"initial-time",type:["number"],default:0},{name:"page-gesture",type:["boolean"],default:!1},{name:"object-fit",type:["string"],default:"contain",enum:["contain","fill","cover"]},{name:"poster",type:["string"],checkPath:!0},{name:"direction",type:["number"],enum:[0,-90,90]},{name:"show-progress",type:["boolean"],default:!0},{name:"show-fullscreen-btn",type:["boolean"],default:!0},{name:"show-play-btn",type:["boolean"],default:!0},{name:"show-center-play-btn",type:["boolean"],default:!0},{name:"enable-prgress-gesture",type:["boolean"],default:!0},{name:"show-mute-btn",type:["boolean"],default:!1},{name:"title",type:["string"]},{name:"play-btn-postion",type:["string"],default:"buttom",enum:["buttom","center"]},{name:"enable-play-gesture",type:["boolean"],default:!1},{name:"auto-pause-if-navigate",type:["boolean"],default:!0},{name:"auto-pause-if-open-native",type:["boolean"],default:!0},{name:"vslide-gesture",type:["boolean"],default:!1},{name:"vslide-gesture-in-fullscreen",type:["boolean"],default:!0},{name:"ad-unit-id",type:["string"]}]},"live-pusher":{events:["bindstatechange","bindnetstatus","binderror","bindbgmstart","bindbgmprogress","bindbgmcomplete"],attrs:[{name:"url",type:["string"],checkPath:!0},{name:"mode",type:["string"],default:"live",enum:["live","RTC"]},{name:"autopush",type:["boolean"],default:!1},{name:"muted",type:["boolean"],default:!1},{name:"enable-camera",type:["boolean"],default:!0},{name:"atuo-foucus",type:["boolean"],default:!0},{name:"orientation",type:["string"],default:"vertical",enum:["vertical","horizontal"]},{name:"beauty",type:["number"],default:0,enum:[0,1,2,3,4,5,6,7,8,9]},{name:"whiteness",type:["number"],default:0,enum:[0,1,2,3,4,5,6,7,8,9]},{name:"aspect",type:["string"],default:"9:16",enum:["9:16","3:4"]},{name:"mini-bitrate",type:["number"],default:200},{name:"max-bitrate",type:["number"],default:1e3},{name:"audio-quality",type:["string"],default:"high",enum:["low","high"]},{name:"waiting-image",type:["string"]},{name:"waiting-image-hash",type:["string"]},{name:"zoom",type:["boolean"],default:!1},{name:"device-position",type:["string"],default:"front",enum:["front","back"]},{name:"background-mute",type:["boolean"],default:!1},{name:"mirror",type:["boolean"],default:!1}]},"live-player":{events:["bindstatechange","bindfullscreenchange","bindnetstatus"],attrs:[{name:"src",type:["string"],checkPath:!0},{name:"mode",type:["string"],default:"RTC",enum:["HD","FHD","SD","RTC"]},{name:"autoplay",type:["boolean"],default:!1},{name:"muted",type:["boolean"],default:!1},{name:"orientation",type:["string"],default:"vertical",enum:["vertical","horizontal"]},{name:"object-fit",type:["string"],default:"contain",enum:["contain","fillCrop"]},{name:"background-mute",type:["boolean"],default:!1},{name:"min-cache",type:["number"],default:1},{name:"min-cache",type:["number"],default:3},{name:"sound-mode",type:["string"],default:"speaker",enum:["speaker","ear"]},{name:"auto-pause-if-open-native",type:["boolean"],default:!0},{name:"auto-pause-if-navigate",type:["boolean"],default:!0}]},camrea:{events:["bindstop","binderror","bindinitdone","bindscancode"],attrs:[{name:"mode",type:["boolean"],default:"normal",enum:["front","back"]},{name:"device-position",type:["string"],default:"back"},{name:"flash",type:["string"],default:"auto",enum:["auto","on","off","torch"]},{name:"frame-size",type:["string"],default:"medium",enum:["small","medium","large"]},{name:"flash",type:["string"],default:"auto"}]},view:{attrs:[{name:"hover-class",type:["string"],default:"node"},{name:"hover-stop-propagation",type:["boolean"],default:!1},{name:"hover-start-time",type:["number"],default:50},{name:"hover-stay-time",type:["number"],default:400}]},"scroll-view":{events:["bindscrolltoupper","bindscrolltolower","bindscroll"],attrs:[{name:"scroll-x",type:["boolean"],default:!1},{name:"scroll-y",type:["boolean"],default:!1},{name:"upper-threshold",type:["number","string"],default:50},{name:"lower-threshold",type:["number","string"],default:50},{name:"scroll-top",type:["number","string"]},{name:"scroll-left",type:["number","string"]},{name:"scroll-into-view",type:["string"]},{name:"scroll-with-animation",type:["boolean"],default:!1},{name:"scroll-flex",type:["boolean"],default:!1},{name:"scroll-anchoring",type:["boolean"],default:!1}]},"movable-area":{attrs:[{name:"scale-area",type:["boolean"],default:!1}]},"movable-view":{events:["bindchange","bindscale","htouchmove","vtouchmove"],attrs:[{name:"direction",type:["string"],default:"none"},{name:"inertia",type:["boolean"],default:!1},{name:"out-of-bounds",type:["boolean"],default:!1},{name:"x",type:["number"]},{name:"y",type:["number"]},{name:"damping",type:["number"],default:20},{name:"friction",type:["number"],default:2},{name:"disabled",type:["boolean"],default:!1},{name:"scale",type:["boolean"],default:!1},{name:"scale-min",type:["number"],default:.5},{name:"scale-max",type:["number"],default:10},{name:"scale-value",type:["number"],default:1},{name:"animation",type:["boolean"],default:!0}]},audio:{events:["binderror","bindplay","bindpause","bindtimeupdate","bindended"],attrs:[{name:"id",type:["string"]},{name:"src",type:["string"],checkPath:!0},{name:"loop",type:["boolean"],default:!1},{name:"controls",type:["boolean"],default:!1},{name:"poster",type:["string"],checkPath:!0},{name:"name",type:["string"]},{name:"author",type:["string"]}]},progress:{events:["bindactiveend"],attrs:[{name:"percent",type:["number"]},{name:"show-info",type:["boolean"],default:!1},{name:"border-radius",type:["number","string"],default:0},{name:"font-size",type:["number","string"],default:16},{name:"stroke-width",type:["number","string"],default:6},{name:"color",type:["string"],default:"#09BB07"},{name:"active-color",type:["string"],default:"#09BB07"},{name:"backgroundColor",type:["string"],default:"#EBEBEB"},{name:"active",type:["boolean"],default:!1},{name:"active-mode",type:["string"],default:"backwards"},{name:"durations",type:["number"],default:30}]},"rich-text":{attrs:[{name:"nodes",type:["array","string"],default:[]},{name:"space",type:["string"]}]},text:{attrs:[{name:"autoplay",type:["boolean"],default:!1},{name:"autoplay",type:["string"]},{name:"decode",type:["boolean"],default:!1}]},swiper:{events:["bindchang","bindtransition","bindanimationfinish"],attrs:[{name:"indicator-dots",type:["boolean"],default:!1},{name:"indicator-color",type:["string"],default:"rgba(0, 0, 0, .3)"},{name:"indicator-active-color",type:["string"],default:"#000000"},{name:"autoplay",type:["boolean"],default:!1},{name:"current",type:["number","string"],default:0},{name:"interval",type:["number","string"],default:5e3},{name:"duration",type:["number","string"],default:500},{name:"vertical",type:["boolean"],default:!1},{name:"circular",type:["boolean"],default:!1},{name:"previous-margin",type:["string","number"],default:"0px"},{name:"next-margin",type:["string","number"],default:"0px"},{name:"display-multiple-items",type:["number"],default:1},{name:"skip-hidden-item-layout",type:["boolean"],default:!1},{name:"easing-function",type:["string"],default:"default",enum:["default","linear","easeInCubic","easeOutCubic","easeInOutCubic"]}]},"swiper-item":{parent:"swiper",attrs:[{name:"item-id"}]},image:{events:["binderror","bindload"],attrs:[{name:"src",checkPath:!0},{name:"mode"},{name:"webp"},{name:"lazy-load"},{name:"show-menu-by-longpress"}]},icon:{attrs:[{name:"type",type:["string"]},{name:"size",type:["number","string"],default:23},{name:"color",type:["string"]}]},"cover-image":{attrs:[{name:"src",required:!0,checkPath:!0}],events:["bindload","binderror"]},"cover-view":{attrs:[{name:"scroll-top",type:["number","string"]}]},checkbox:{attrs:[{name:"value",type:["string","number"]},{name:"disabled",type:["boolean"],default:!1},{name:"checked",type:["boolean"],default:!1},{name:"color",type:["string"],default:"#09BB07"}]},button:{events:["bindgetuserinfo","bindcontact","bindgetphonenumber","binderror","bindopensetting","bindlaunchapp"],attrs:[{name:"size",type:["string"],default:"default",enum:["default","mini"]},{name:"type",type:["string"],default:"default",enum:["primary","default","warn"]},{name:"plain",type:["boolean"],default:!1},{name:"disabled",type:["boolean"],default:!1},{name:"loading",type:["boolean"],default:!1},{name:"form-type",type:["string"],enum:["submit","reset"]},{name:"open-type",type:["string"],enum:["contact","share","getPhoneNumber","getUserInfo","launchApp","openSetting","feedback"]},{name:"hover-class",type:["string"],default:"button-hover"},{name:"hover-stop-propagation",type:["boolean"],default:!1},{name:"hover-start-time",type:["number"],default:20},{name:"hover-stay-time",type:["number"],default:70},{name:"lang",type:["string"],default:"en",enum:["en","zh_CN","zh_TW"]},{name:"session-from",type:["string"]},{name:"send-message-title",type:["string"]},{name:"send-message-path",type:["string"]},{name:"send-message-img",type:["string"]},{name:"app-parameter",type:["string"]},{name:"show-message-card",type:["boolean"],default:!1}]},"checkbox-group":{events:["bindchange"],attrs:[]},editor:{events:["bindready","bindfocus","bindblur","bindinput","bindstatuschange"],attrs:[{name:"read-only",type:["boolean"],default:!1},{name:"placeholder",type:["string","number"]},{name:"show-img-size",type:["boolean"],default:!1},{name:"show-img-toolbar",type:["boolean"],default:!1},{name:"show-img-resize",type:["boolean"],default:!1}]},form:{events:["bindsubmit","bindreset"],attrs:[{name:"report-submit",type:["boolean"],default:!1},{name:"report-submit-timeout",type:["number"],default:0}]},input:{events:["bindinput","bindfocus","bindblur","bindconfirm","bindkeyboardheightchange"],attrs:[{name:"value",type:["string","number"]},{name:"type",type:["string"],default:"text",enum:["text","number","idcard","digit"]},{name:"password",type:["boolean"],default:!1},{name:"placeholder",type:["string","number"]},{name:"placeholder-style",type:["string"]},{name:"placeholder-class",type:["string"],default:"input-placeholder"},{name:"disabled",type:["boolean"],default:!1},{name:"maxlength",type:["number"],default:140},{name:"cursor-spacing",type:["number"],default:0},{name:"auto-focus",type:["boolean"],default:!1},{name:"focus",type:["boolean"],default:!1},{name:"confirm-type",type:["string"],default:"done",enum:["send","search","next","go","done"]},{name:"confirm-hold",type:["boolean"],default:!1},{name:"cursor",type:["number"]},{name:"selection-start",type:["number"],default:-1},{name:"selection-end",type:["number"],default:-1},{name:"adjust-position",type:["boolean"],default:!0},{name:"hold-keyboard",type:["boolean"],default:!1}]},label:{attrs:[{name:"for",type:["string"]}]},picker:{events:["bindcancel","bindchange","bindcolumnchange"],attrs:[{name:"mode",type:["string"],default:"selector",enum:["selector","multiSelector","time","date","region"]},{name:"disabled",type:["boolean"],default:!1},{name:"range",type:["array"]},{name:"range-key",type:["boolean"],string:!1},{name:"value",type:["number","array","string"]},{name:"start",type:["string","number"]},{name:"end",type:["string","number"]},{name:"fields",type:["string"],default:"day",enum:["year","month","day"]},{name:"custom-item",type:["string"]}]},"picker-view":{events:["bindchange","bindpickstart","bindpickend"],attrs:[{name:"value",type:["array"],default:"selector"},{name:"indicator-style",type:["string"]},{name:"indicator-class",type:["string"]},{name:"mask-style",type:["string"]},{name:"mask-class",type:["string"]}]},"picker-view-column":{attrs:[]},radio:{attrs:[{name:"value",type:["string","number"]},{name:"color",type:["string"],default:"#09BB07"},{name:"checked",type:["boolean"],default:!1},{name:"disabled",type:["boolean"],default:!1}]},"radio-group":{events:["bindchange"],attrs:[]},slider:{events:["bindchange","bindchanging"],attrs:[{name:"min",type:["number"],default:0},{name:"max",type:["number"],default:100},{name:"step",type:["number"],default:1},{name:"disabled",type:["boolean"],default:!1},{name:"value",type:["number"],default:0},{name:"color",type:["string"],default:"#e9e9e9"},{name:"selected-color",type:["string"],default:"#1aad19"},{name:"active-color",type:["string"],default:"#1aad19"},{name:"background-color",type:["string"],default:"#e9e9e9"},{name:"block-size",type:["number"],default:28},{name:"block-color",type:["string"],default:"#ffffff"},{name:"show-value",type:["boolean"],default:!1}]},switch:{events:["bindchange"],attrs:[{name:"checked",type:["boolean"],default:!1},{name:"disabled",type:["boolean"],default:!1},{name:"type",type:["string"],default:"switch"},{name:"color",type:["string"],default:"#04BE02"}]},textarea:{events:["bindfocus","bindblur","bindlinechange","bindinput","bindconfirm","bindkeyboardheightchange"],attrs:[{name:"value",type:["string"]},{name:"placeholder",type:["string","number"]},{name:"placeholder-style",type:["string"]},{name:"placeholder-class",type:["string"],default:"textarea-placeholde"},{name:"disabled",type:["boolean"],default:!1},{name:"maxlength",type:["number"],default:140},{name:"auto-focus",type:["boolean"],default:!1},{name:"focus",type:["boolean"],default:!1},{name:"auto-height",type:["boolean"],default:!1},{name:"fixed",type:["boolean"],default:!1},{name:"cursor-spacing",type:["number"],default:0},{name:"cursor",type:["number"],default:-1},{name:"show-confirm-bar",type:["boolean"],default:!1},{name:"selection-start",type:["number"],default:-1},{name:"selection-end",type:["number"],default:-1},{name:"adjust-position",type:["boolean"],default:!0},{name:"hold-keyboard",type:["boolean"],default:!1}]},"functional-page-navigator":{events:["bindsuccess","bindfail","bindcancel"],attrs:[{name:"version",type:["string"],default:"release"},{name:"name",type:["string"]},{name:"args",type:["object"]}]},navigator:{events:["bindsuccess","bindfail","bindcomplete"],attrs:[{name:"target",type:["string"],default:"self"},{name:"url",type:["string"]},{name:"open-type",type:["string"],default:"navigate",enum:["navigate","redirect","switchTab","reLaunch","navigateBack","exit"]},{name:"delta",type:["number"],default:1},{name:"app-id",type:["string"]},{name:"path",type:["string"]},{name:"extra-data",type:["object"]},{name:"version",type:["string"],default:"release",enum:["develop","trial","release"]},{name:"hover-class",type:["string"],default:"navigator-hover"},{name:"hover-stop-propagation",type:["boolean"],default:!1},{name:"hover-start-time",type:["number"],default:50},{name:"hover-stay-time",type:["number"],default:600}]},"open-data":{events:["binderror"],attrs:[{name:"type",type:["string"],enum:["groupName","userNickName","userAvatarUrl","userGender","userCity","userProvince","userCountry","userLanguage"]},{name:"open-gid",type:["string"]},{name:"lang",type:["string"],default:"en",enum:["en","zh_CN","zh_TW"]},{name:"default-text",type:["string"]},{name:"default-avatar",type:["string"]}]},"official-account":{events:["bindload","binderror"],attrs:[]},ad:{events:["bindload","binderror","bindclose"],attrs:[{name:"unit-id",type:["string"],required:!0},{name:"ad-intervals",type:["number"]}]},"web-view":{events:["bindmessage","bindload","binderror"],attrs:[{name:"src",type:["string"],checkPath:!0}]},canvas:{events:["bindtouchstart","bindtouchmove","bindtouchend","bindtouchcancel","bindlongtap","binderror"],attrs:[{name:"type",type:["string"]},{name:"canvas-id",type:["string"]},{name:"disable-scroll",type:["boolean"],default:!1}]},"navigation-bar":{events:[],attrs:[{name:"title",type:["string"]},{name:"loading",type:["boolean"],default:!1},{name:"front-color",type:["string"]},{name:"background-color",type:["string"]},{name:"color-animation-duration",type:["number"],default:0},{name:"page-style",type:["string"],default:""},{name:"color-animation-timing-func",type:["string"],default:"linear",enum:["linear","easeIn","easeOut","easeInOut"]}]},"page-meta":{events:["bindresize","bindscroll","bindscrolldone"],attrs:[{name:"background-text-style",type:["string"]},{name:"background-color",type:["string"]},{name:"background-color-top",type:["string"]},{name:"background-color-bottom",type:["string"]},{name:"scroll-top",type:["string"],default:""},{name:"scroll-duration",type:["number"],default:300},{name:"page-style",type:["string"],default:""},{name:"root-font-size",type:["string"],default:""}]},"ad-button":{events:["bindtap"],attrs:[{name:"adid",type:["string"],required:!0},{name:"adunitid",type:["string"],required:!0},{name:"valuetype",type:["number"],default:0},{name:"open-type",type:["number"],default:0}]}},tagRequiredParent={},tagRequiredAttrs={},tagAllowedAttrs={},tagAttrsAllowedType={},tagAttrsNeedCheckPath={},attrsNeedCombine={},URL_MATCH_REG_EXP=/url\s*\(\s*['"]?\s*([^\(\)]+?)\s*['"]?\s*\)/g,URL_CONTENT_REG_EXP=/url\s*\(\s*['"]?([^'"]*)['"]?\s*\)/;function initData(n){tagCommon.attrs.filter(function(e){return e.combDiectives}).forEach(function(e){return attrsNeedCombine[e.name]=e.combDiectives}),Object.keys(n).forEach(function(e){var t=n[e],a=t.attrs;t.parent&&t.parent.length&&(tagRequiredParent[e]=t.parent),tagRequiredAttrs[e]=a.filter(function(e){return e.required}),tagAllowedAttrs[e]=a.concat(tagCommon.attrs),tagAttrsAllowedType[e]=a.filter(function(e){return e.type}),tagAttrsNeedCheckPath[e]=a.filter(function(e){return e.checkPath}).map(function(e){return e.name})})}function getRelativePath(e,t){return path.relative(e,t).replace(/\\/g,"/")}function findIncldeTagSrcChain(e,t){for(var a,n=[],r=e.parentNode,o=t.rootPath,l=t.resourcePath;r;)"_@template@_"===r.nodeName.replace(/^q\-/,"")&&(a=r.attrs.filter(function(e){return"src"===e.name})[0])&&n.unshift(a.value),r=r.parentNode;return n.length&&(l=n.reduce(function(e,t){t=utils.getAbsPath(t,l,o).filePath;return l=t},"")),/\.hxml$/.test(l)?l:"".concat(l,".hxml")}function findIncludeSrcPath(e,t){var a=e;return/^\//.test(t)?{srcPath:e}:((e=e.split(/\/|\\/)).pop(),e=e.join("/"),{sourcePath:a,filePath:path.join(e,t).replace(/\\/g,"/")})}function checkSourcePath(e,t,a,n,r){var o;/^(https?:)?\/\//.test(t.value)||(o=t.value,e=e.tagName,tagAttrsNeedCheckPath[e].includes(t.name)&&fileExistHandle(e,t,a,n,r),"style"!==t.name)||"string"!=typeof o||o.includes("rpx")||checkStyleUrlPath(e,t,a,n,r)}function fileExistHandle(e,t,a,n,r){var o,l,i;return/^(https?:)?\/\//.test(t.value)||"string"==typeof t.value&&(l=n.rootPath,n=n.resourcePath,i=findIncludeSrcPath(r,o=t.value),n=utils.getAbsPath(o,n,l).filePath.replace(/\s/g,""),n=i&&i.filePath?i.filePath:n,fs.existsSync(n)?(i=getRelativePath(l,n),t.value="/".concat(i)):/^\/[^\/]+|(\.?\.\/)/.test(o)&&a.push({filePath:r,loc:t.loc||{start:0,end:0},reason:"WRANNING: Component <".concat(e,"> attribute '").concat(t.name,"' ")+"source path '".concat(t.value,"' is not exist, ")+"Please check."})),t.value}function checkStyleUrlPath(a,e,n,r,o){URL_MATCH_REG_EXP.test(e.value)&&(e.value=e.value.replace(URL_MATCH_REG_EXP,function(e){var t=e.replace(/(\\")|(\\')/g,"").match(URL_CONTENT_REG_EXP);return t?(t=fileExistHandle(a,{value:t[1],name:"style"},n,r,o),"url(".concat(t,")")):e}))}function checkAttrValType(e,t,a,n){var r=tagAttrsAllowedType[e].find(function(e){return e.name===t.name});r&&(r=r.type)&&(r=r.filter(function(e){return"boolean"!==e})).length&&!r.includes(getAttrValType(t.value))&&a.push({filePath:n,loc:t.loc,reason:"WRANNING: Component <".concat(e,"> attribute '").concat(t.name,"' ")+"value '".concat(t.value,"' is not allowed type: <").concat(getAttrValType(t.value),">, ")+"Use below types ".concat(JSON.stringify(r.join(", ")))})}function getAttrValType(e){try{var t;return/^{(:+)}$/.test(e)?"object":(t=vm.runInThisContext(e),Object.prototype.toString.call(t).slice(8,-1).toLowerCase())}catch(e){return"string"}}function isParentTagExist(e,t){for(var a=e.parentNode;a&&a.nodeName.replace(/^q\-/,"")!==t;)a=a.parentNode;return!!a}function checkTagName(e,t,a){var n=e.tagName,t=t.buildLog;tagRequiredParent[n]&&!isParentTagExist(e,e=tagRequiredParent[n])&&t.push({filePath:a,reason:"WRANING: Component <".concat(n,"> cant not find parent component: <").concat(e,">, ")+"Please check it"})}function checkAttrValInAllowedList(e,t,a,n,r){var o="number"===getAttrValType(t.value)?Number(t.value):t.value,n=("string"==typeof o&&(o=o.trim()),n.buildLog);a.includes(o)||n.push({filePath:r,loc:t.loc,reason:"WRANNING: Component <".concat(e,"> attribute '").concat(t.name,"' value '").concat(t.value,"' is not allowed,")+" Use below values \n ".concat(JSON.stringify(a.join(", ")))})}function checkElseIf(e,t,a,n){var r,o,l=!1;["has:else","has:elif"].includes(t.name)&&((o=e.parentNode.childNodes)&&1<o.length&&(r=o.indexOf(e),l=(o=o.slice(0,r)).length&&o.some(function(e){return e.attrs&&e.attrs.find(function(e){return"v-if"===e.name})})),l||(a.buildLog.push({filePath:n,loc:t.loc,trigger:ATTR_NAME,reason:"WRANNING: ".concat(t.name,"=").concat(t.value," used on element <").concat(e.tagName,"> ")+"without corresponding has:if."}),e.attrs.splice(e.attrs.indexOf(t),1)))}function checkAttrFor(e,t,a,n){var r,o,l=attrsNeedCombine[t.name];l&&(o=(r=e.attrs).indexOf(t),!r.find(function(e){return l.includes(e.name)}))&&(a.buildLog.push({filePath:n,loc:t.loc,trigger:ATTR_NAME,reason:"WRANNING: ".concat(t.name,"=").concat(t.value," used on element <").concat(e.tagName,"> ")+"without corresponding has:for."}),/^has:key$/.test(t.name))&&e.attrs.splice(o,1)}function checkAttrAllowed(e,t,a){return/^(v-|:)/.test(e.name)?(t.push({filePath:a,loc:e.loc,trigger:ATTR_NAME,reason:"WARNING: Unexpected attribute name: ".concat(e.name,", attribute can not start with 'v-' or ':'. ")}),!1):(["key"].includes(e.name)&&t.push({filePath:a,loc:e.loc,trigger:ATTR_NAME,reason:"WARNING: Unexpected JavaScript keyword as attribute name: '".concat(e.name,"', please change it.")}),!0)}function checkTagAttrs(a,n,r,o){var l,i,s=a.tagName,u=n.buildLog,e=a.attrs,m=tagAllowedAttrs[s],t=tagRequiredAttrs[s];m?(t.forEach(function(t){e.find(function(e){return e.name===t.name})||u.push({filePath:o,loc:a.loc,reason:"WRANNING: Component <".concat(s,"> missing required attribute '").concat(t.name,"'")})}),l=[],e.forEach(function(t){var e;checkAttrAllowed(t,u,o)&&l.push(t),!expUtils.isExpr(t.value)&&!utils.isEmptyStr(t.value)&&(/^data\-/.test(t.name)||(t.name=utils.camelCaseToHyphened(t.name)),e=m.find(function(e){return new RegExp("^".concat(e.name)).test(t.name)}))&&(e.enum?checkAttrValInAllowedList(s,t,e.enum,n,o):checkAttrValType(s,t,u,o),checkSourcePath(a,t,u,r,o)),checkElseIf(a,t,n,o),checkAttrFor(a,t,n,o)}),a.attrs=l):e&&0<e.length&&(i=[],e.forEach(function(e,t,a){checkAttrAllowed(e,u,o)&&i.push(e)}),a.attrs=i)}function checkNode(e,t,a){var n=findIncldeTagSrcChain(e,a);checkTagName(e,t,n),checkTagAttrs(e,t,a,n)}initData(tagComponentMap),module.exports={checkTagAttrs:checkTagAttrs,checkTagName:checkTagName,isParentTagExist:isParentTagExist,checkNode:checkNode,findIncldeTagSrcChain:findIncldeTagSrcChain};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
module.exports=function(e){console.warn("undefined property , error: ",e)};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _0x4f529b=_0x49b1;function _typeof(e){var n=_0x49b1;return(_typeof=n(275)==typeof Symbol&&n(197)==typeof Symbol[n(280)]?function(e){return typeof e}:function(e){var t=n;return e&&t(275)==typeof Symbol&&e[t(236)]===Symbol&&e!==Symbol.prototype?t(197):typeof e})(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError(_0x49b1(287))}function _iterableToArrayLimit(e,t){var n=_0x49b1,r=null==e?null:n(224)!=typeof Symbol&&e[Symbol[n(280)]]||e[n(240)];if(null!=r){var o,a,i,s,c=[],f=!0,u=!1;try{if(i=(r=r[n(213)](e))[n(297)],0===t){if(Object(r)!==r)return;f=!1}else for(;!(f=(o=i.call(r))[n(263)])&&(c[n(190)](o[n(235)]),c[n(176)]!==t);f=!0);}catch(e){u=!0,a=e}finally{try{if(!f&&null!=r.return&&(s=r[n(308)](),Object(s)!==s))return}finally{if(u)throw a}}return c}}function _arrayWithHoles(e){if(Array[_0x49b1(175)](e))return e}function _createForOfIteratorHelper(e,t){var n,r,o,a,i=_0x49b1,s=i(224)!=typeof Symbol&&e[Symbol[i(280)]]||e["@@iterator"];if(s)return o=!(r=!0),{s:function(){s=s[i(213)](e)},n:function(){var e=i,t=s.next();return r=t[e(263)],t},e:function(e){o=!0,n=e},f:function(){var e=i;try{r||null==s[e(308)]||s.return()}finally{if(o)throw n}}};if(Array.isArray(e)||(s=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e[i(176)])return s&&(e=s),a=0,{s:t=function(){},n:function(){return a>=e[i(176)]?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};throw new TypeError(i(278))}function _unsupportedIterableToArray(e,t){var n,r=_0x49b1;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):(n={}[r(222)][r(213)](e).slice(8,-1),r(303)===n&&e[r(236)]&&(n=e[r(236)][r(189)]),r(258)===n||r(282)===n?Array[r(172)](e):r(285)===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/[r(261)](n)?_arrayLikeToArray(e,t):void 0)}function _0x23e9(){var e=["startsWith","disableSubpackages","./packoptions-utils","manifest-handler","?type=component","object","function","path","projectCfg","Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","isIgnoreFile","iterator","root","Set","exports","defineProperty","Arguments","', please check tabBar configuration.","Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.","@@toPrimitive must return a primitive value.","reverse","filePath","parse","stringify","widgetPathsList","custom-tab-bar/index.hxml",".js","getComponentAbsPath","next","269548FZmQlB",".hxml","mergeMap","router","fatal","Object","index.json","custom-tab-bar/index","custom","../../common/utils","return","' does not have the component attribute configured. ","ERROR: tabBar ","appType","getProjectInfo","configs","trim","iconPath",'" is asyncComponent (using by "',"find","common","parseIgnoreRules","error","tabBar","resolve","concat","106671bFUfrD","get","hasOwnProperty","list","pagePath","manifest","1176LymiRy","from",".ux",'" placeHolder can not be asyncComponent (using by "',"isArray","length","independentList","webapp","placeholder","widgets","warn","keys",'" placeHolder is wrong (using by "',"independent","ascfSrcPath","routeMapping","app.js","custom-tab-bar","name","push","../../common/config","subpackage","defUnfreezeProperty","subPackages","view","endsWith","symbol",'").',"filter","tabBarList","relative","../../common/log4js","forEach","existsSync",'" is not found in the path: ',"' is used.","text","string",'"). Please add placeHolder',"app.json","includes","6155znIaIy","call","adaptCustomTabBar","projectComponentsMap","582036gqKlMR",' (using by "',"set","364ksqkhF"," cannot be in the subpackage directory","readJsonFile","toString","6911928adKcRX","undefined","route-mapping.json","prototype","componentList","4086056PukUDY","join","../../common/version-check","ERROR: Can not resolve tabBar list item : ","components","usingComponents","ERROR: app.json doesn't contain any page.","value","constructor","tabBarUsingComponents","WARNING:Route information in the manifest.json file is incomplete:\n Page '","app","@@iterator","custom-tab-bar/index.pack.js",'ERROR: "',"entries","map","component","readFileSync","page","subpackages","requiredComponents","replace","key","app.css.js","pages","packgaePath","app.css","isAscfHspSatisfied","default","Map",".pack.js",".json","test","getProjectAbsPath","done","componentPlaceholder",'WARNING: "',"../common/utils","16044eirRap","ERROR: modify app.json tabBar and recompile it"];return(_0x23e9=function(){return e})()}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function _0x49b1(e,t){var n=_0x23e9();return(_0x49b1=function(e,t){return n[e-=158]})(e,t)}function _defineProperty(e,t,n){var r=_0x49b1;return(t=_toPropertyKey(t))in e?Object[r(284)](e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){var t=_0x49b1,e=_toPrimitive(e,t(208));return t(197)==_typeof(e)?e:e+""}function _toPrimitive(e,t){var n=_0x49b1;if(n(274)!=_typeof(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0===r)return(n(208)===t?String:Number)(e);r=r[n(213)](e,t||n(257));if(n(274)!=_typeof(r))return r;throw new TypeError(n(288))}(()=>{for(var e=_0x49b1,t=_0x23e9();;)try{if(291160==+parseInt(e(165))+parseInt(e(298))/2+-parseInt(e(216))/3+parseInt(e(171))/4*(parseInt(e(212))/5)+-parseInt(e(267))/6*(-parseInt(e(219))/7)+parseInt(e(228))/8+-parseInt(e(223))/9)break;t.push(t.shift())}catch(e){t.push(t.shift())}})();var path=require(_0x4f529b(276)),_require=require(_0x4f529b(307)),readJsonFile=_require[_0x4f529b(221)],getProjectInfo=_require[_0x4f529b(312)],_require2=require(_0x4f529b(191)),configs=_require2[_0x4f529b(313)],_packOptions=require(_0x4f529b(271)),utils=require(_0x4f529b(266)),fs=require("fs"),_require3=require(_0x4f529b(230)),isAscfHspSatisfied=_require3[_0x4f529b(256)],log4js=require(_0x4f529b(202)),logger=log4js.getLogger(_0x4f529b(272)),APP=_0x4f529b(239),APP_TYPE=_0x4f529b(178);function handleUsingComponents(e,t){var n=_0x4f529b;if(e){var r,o,a=getProjectInfo()[n(185)];for(r in e)Object.prototype.hasOwnProperty[n(213)](e,r)&&(o=e[r][n(314)](),e[r]=utils[n(262)](o,t,a))}}function checkTabBarPath(e){var t,i,n=_0x4f529b,s=getProjectInfo().ascfSrcPath,c=[n(315),"selectedIconPath",n(169)],r=(null==(r=e[n(162)])?void 0:r[n(168)])||[],e=e.subPackages||e[n(248)]||[];0!==r[n(176)]&&0!==e[n(176)]&&(t=e.map(function(e){return e[n(281)]})[n(199)](function(e){return e}),i=[],r[n(203)](function(a){var e=n;t[e(203)](function(r){var o=e;c[o(203)](function(e){var t,n=o;path[n(229)](s,null!=(t=a[e])?t:"")[n(269)](path[n(229)](s,r,"/"))&&i[n(190)](n(310)[n(164)](a[n(207)]," ")[n(164)](e,n(220)))})})}),0<i[n(176)])&&(i[n(203)](function(e){logger[n(161)](e)}),logger[n(161)](n(268)))}function checkCommonPackage(e){var t=_0x4f529b;e[t(248)]&&0<(null==(e=e.subpackages[t(199)](function(e){return null==e?void 0:e[t(159)]}))?void 0:e[t(176)])&&isAscfHspSatisfied(10008300)}function readAppJson(e){var n=_0x4f529b,t=_defineProperty({},APP,new Map),r=getProjectInfo(),r=path.join(r[n(185)],n(210));if(!fs.existsSync(r))throw"ERROR: Can not resolve file : app.json";var o=readJsonFile(r),o=configs[n(270)]?mergeSubPkgs(o):o,a=(e&&(checkCommonPackage(o),checkTabBarPath(o)),handleAppType(o),handleUsingComponents(o[n(233)],r),o[n(247)]={},o[n(177)]=[],[]);if(!o[n(253)]||o[n(253)][n(176)]<=0)throw n(234);if(hasCustomTabBar(o)){var i,r=path.resolve(getProjectInfo().ascfSrcPath,n(188),n(304)),r=readJsonFile(r),s=(configs[n(237)]=r[n(233)],_createForOfIteratorHelper(o[n(162)][n(168)]));try{for(s.s();!(i=s.n()).done;){var c=i[n(235)];configs[n(200)].push(c.pagePath)}}catch(e){s.e(e)}finally{s.f()}}r={packgaePath:"",subpackage:o[n(248)]||o[n(194)]||[]},putPageInfoToEntryList(o.pages,"",!1,o,t[APP],r,e),r=[n(248),"subPackages"][n(158)](function(e){var t=n;return Object[t(226)].hasOwnProperty[t(213)](o,e)});if(a[n(176)]){r&&delete o[r];var f,u=_createForOfIteratorHelper(o[n(248)]=a);try{for(u.s();!(f=u.n())[n(263)];){var p=f[n(235)],l=new Map,g={packgaePath:p[n(281)],subpackage:p};t[p.root]=l,putPageInfoToEntryList(p.pages,p.root,p.independent,o,l,g,e)}}catch(e){u.e(e)}finally{u.f()}}else if(r){a=o[r],delete o[r];var b,h=_createForOfIteratorHelper(o.subpackages=a);try{for(h.s();!(b=h.n())[n(263)];){var m=b[n(235)],y=new Map,d={packgaePath:m[n(281)],subpackage:a};t[m[n(281)]]=y,putPageInfoToEntryList(m.pages,m.root,m[n(184)],o,y,d,e)}}catch(e){h.e(e)}finally{h.f()}}return handingCustomTabBar(o),{manifest:o,projectComponentsMap:t}}function handleAppType(e){var t,n=_0x4f529b;e.type=null!=(t=null!=(t=e.type)?t:e[n(311)])?t:APP_TYPE,delete e[n(311)]}function hasCustomTabBar(e){var t=_0x4f529b;return(e[t(162)]||{})[t(306)]&&fs[t(204)](path[t(163)](getProjectInfo()[t(185)],t(294)))}function handingCustomTabBar(e){var t=_0x4f529b;if(hasCustomTabBar(e)){var n,r=_createForOfIteratorHelper(e[t(162)][t(168)]);try{for(r.s();!(n=r.n()).done;){var o=n[t(235)];if(!e.page[o[t(169)]])throw t(231)+"'".concat(o[t(169)],t(286));e[t(247)][o[t(169)]].useCustomTabBar=!0}}catch(e){r.e(e)}finally{r.f()}}}function mergeSubPkgs(a){var t=_0x4f529b;return(a.subpackages||a.subPackages||[])[t(203)](function(r){var e,o=t;null!=(e=r[o(253)])&&e[o(203)](function(e){var t,n=o;null!=(t=a[n(253)])&&t[n(190)](path[n(229)](r[n(281)],e).replace(/\\/g,"/"))})}),a[t(248)]=[],a[t(194)]=[],a}function getGlobalComponentsInfo(){var e=_0x4f529b,t=0<arguments[e(176)]&&void 0!==arguments[0]?arguments[0]:{},n=[];return Object[e(182)](t).forEach(function(e){n.push({key:e,path:t[e]})}),n}function putPageInfoToEntryList(e,t,n,r,o,a,i){var s=_0x4f529b;if(e){var c,f,u,p,l=getProjectInfo(),g=generateIgnoreRule(l[s(277)]);for(c in e)Object[s(226)].hasOwnProperty[s(213)](e,c)&&(u=path[s(229)](l[s(185)],t,e[c]),f=path[s(201)](l.ascfSrcPath,u),_packOptions[s(279)](f,g)||(f=f[s(250)](/\\/g,"/"),u=""[s(164)](u,s(260)),handleUsingComponents((p=readJsonFile(u)).usingComponents,u),n&&r[s(177)][s(190)](f),r[s(247)][f]=p,t||getUsingComponents(r,"","",o,"page",a,i),getUsingComponents(p,u,f,o,s(247),a,i)))}}function getUsingComponents(a,i,s,c,e,f,u){var p=_0x4f529b,l=7<arguments[p(176)]&&void 0!==arguments[7]?arguments[7]:[],g=8<arguments[p(176)]&&void 0!==arguments[8]&&arguments[8],b=getProjectInfo(),h=[],m=[],y=(getComponentPlaceholderList(m,null==a?void 0:a[p(264)]),a[p(189)]);if(utils[p(214)](e,a,s),a[p(233)])for(var d in a[p(233)])(()=>{var e=p;if(Object[e(226)][e(167)].call(a[e(233)],d)){var t=a[e(233)][d],n=utils[e(296)](t,i,b[e(185)],e(260)),r=n[e(290)],n=n.fixEntryPath,o=path[e(201)](b[e(185)],r)[e(250)](/\\/g,"/")[e(250)](/\.json/,"");if(a.usingComponents[d]=t=n||o,!y&&i===r)return y=d;if(u&&(n=unifyPath(f),errorJudge(d,a,r,m,n,t,s,f),g=checkPlaceholderExists(t,a),hasPlaceholder(d,m))&&configs[e(249)].push(t),l[e(158)](function(e){return e===r}))return;h.some(function(e){return e.path===t})||h[e(190)]({path:t,key:d,compJsonPath:r,hasPlaceHolder:g});o=readJsonFile(r);handleUsingComponents(o[e(233)],r),getUsingComponents(o,r,t,c,"component",f,u,l[e(164)]([r]),g)}})();s&&!c.get(s)&&(e={componentList:h,type:e,componentName:y,compJsonPath:i,path:s,hasPlaceHolder:g,componentPlaceholderList:m},c[p(218)](s,e))}function unifyPath(e){var n=_0x4f529b,e=JSON[n(291)](JSON[n(292)]((null==e?void 0:e[n(192)])||[]));return e[n(244)](function(e){var t=n;return e.root+=e[t(281)][t(196)]("/")?"":"/",e}),e}function errorJudge(e,t,n,r,o,a,i,s){var c=_0x4f529b;checkComponentPath(a)||logger.fatal(c(242)[c(164)](e,c(205))[c(164)](path.join(getProjectInfo()[c(185)],a),c(217)).concat(i,c(198))),isComponentInMainOrSubPackage(a,o,i,s)||hasPlaceholder(e,r)||logger[c(302)](c(242)[c(164)](e,c(316))[c(164)](i,c(209))),checkPlaceholderNotAsync(e,r)||logger.fatal(c(242)[c(164)](e,c(174))[c(164)](i,c(198))),checkPlaceholder(e,r,t)||logger[c(181)](c(265)[c(164)](e,c(183)).concat(i,'").'))}function checkPlaceholder(n,e,t){var r,o=_0x4f529b;return!(null!=e&&e[o(176)]&&""!==(r=0<(r=e.filter(function(e){return e.key===n})).length?r[r[o(176)]-1][o(179)]:"")&&(t=Object.prototype[o(167)][o(213)](t[o(233)],r),r=configs[o(227)][o(211)](r),!t)&&!r&&(e[o(203)](function(e){var t=o;e.placeholder=n===e.key?t(195):e.placeholder}),1))}function checkPlaceholderNotAsync(e,t){for(var n=_0x4f529b,r="",o=0;o<(null==t?void 0:t[n(176)]);o++)e===t[o][n(251)]&&(r=t[o][n(179)]);for(var a=0;a<(null==t?void 0:t[n(176)]);a++)if(r===t[a].key)return!1;return!0}function hasPlaceholder(e,t){for(var n=_0x4f529b,r=0;r<(null==t?void 0:t[n(176)]);r++)if(t[r][n(251)]===e)return!0;return!1}function isComponentInMainOrSubPackage(e,t,n,r){for(var o=_0x4f529b,a=0;a<(null==t?void 0:t[o(176)]);a++){var i=t[a][o(281)];if(n.startsWith(i)&&e[o(269)](i))return!0}return isComponentInSameSubpackageAsPage(r,e,t)}function isComponentInSameSubpackageAsPage(e,n,t){var r=_0x4f529b,o="",a="",i=!0,s=!0;return""!==e[r(254)]&&(i=!1,o=e[r(254)]+e[r(254)][r(196)]("/")?"":"/"),null!=t&&t.forEach(function(e){var t=r;n[t(269)](e[t(281)])&&(a=e[t(281)],s=!1)}),!!s||!i&&o===a}function checkComponentPath(e){var t=_0x4f529b,e=path.join(getProjectInfo()[t(185)],e)+t(260);return!!fs[t(204)](e)}function checkPlaceholderExists(e,t){var n,r=_0x4f529b,o=t[r(233)],a=t[r(264)];for(n in o)if(Object.prototype[r(167)][r(213)](o,n)&&o[n]===e&&a&&n in a)return!0;return!1}function getComponentPlaceholderList(e,t){var n=_0x4f529b;if(t)for(var r=0,o=Object[n(243)](t);r<o.length;r++){var a=_slicedToArray(o[r],2),i=a[0],a=a[1];e[n(190)]({key:i,placeholder:a})}}function generateIgnoreRule(e){var t;return(t=e?_packOptions[_0x4f529b(160)](e):t)||{}}function generateEntry(e,r,t){var o=_0x4f529b,n=getProjectInfo(),a=e[o(215)],i=[],s=(Object.keys(a)[o(289)]()[o(203)](function(e){i[o(190)](a[e])}),r[o(187)]=path[o(163)](n[o(185)],"app.json?package=app")[o(250)](/\\/g,"/"),utils[o(300)](i)),c=path[o(163)](n[o(185)],o(255));return fs.existsSync(c)?r[o(252)]=path[o(163)](n[o(185)],o(255)):delete r["app.css.js"],hasCustomTabBar(e.manifest)&&customTabBarHandle(n,r,e,s,a),s.forEach(function(e,t){var n=o;r[""[n(164)](t,n(259))]=e.compJsonPath[n(250)](/\.json$/,".hxml")}),utils[o(193)](e,o(232),s),generateWidgetsEntry(r,e),r}function customTabBarHandle(e,t,n,r,o){var a,i=_0x4f529b,e=path[i(163)](e[i(185)],i(294)),s=e.replace(/\.hxml$/,".json"),c=(t[i(241)]=""[i(164)](e,i(273)),_createForOfIteratorHelper(n[i(170)][i(162)].list));try{for(c.s();!(a=c.n())[i(263)];){var f=a[i(235)];r[i(166)](f[i(169)])&&r[i(166)](f[i(169)])[i(227)][i(190)]({path:i(305),key:"customTabBar",compJsonPath:s})}}catch(e){c.e(e)}finally{c.f()}t={componentList:[],type:"component",compJsonPath:s};o.app[i(218)](i(305),t)}function generateWidgetsEntry(o,n){var a,r,i=_0x4f529b,s=getProjectInfo(),e=n.manifest;n[i(170)]&&e[i(301)]&&((a=e[i(301)][i(253)])&&Object[i(182)](a)[i(203)](function(e){var t=i,n=a[e],r=n[t(245)],n=(n||logger.warn(t(238)[t(164)](e,t(309))+"By default, '"[t(164)](r,t(206))),path[t(229)](s[t(185)],e,r)),e=""[t(164)](path[t(229)](e,r),t(295));if(fs[t(204)](""[t(164)](n,t(173))))o[e]=""[t(164)](n,t(173));else if(!fs.existsSync(""[t(164)](n,t(299))))throw"ERROR: Failed to find the file: "[t(164)](n,t(173))}),e=e[i(180)])&&0<e[i(176)]&&(n[i(293)]=[],r="",e[i(203)](function(e){var t=i;r=e[t(276)],n[t(293)][t(190)](path[t(229)](s[t(185)],r))}))}function generateRouteMapping(e){var t=_0x4f529b,n=getProjectInfo(),r=e[t(170)][t(186)]||{},n=path.join(n.ascfSrcPath,t(225));if(fs[t(204)](n)){var o=JSON[t(291)](fs[t(246)](n).toString());if(o)for(var a in o)Object[t(226)][t(167)][t(213)](o,a)&&(r[a]=o[a])}0<Object[t(182)](r)[t(176)]&&(e[t(170)][t(186)]=r)}module[_0x4f529b(283)]={readAppJson:readAppJson,generateEntry:generateEntry,generateRouteMapping:generateRouteMapping,getGlobalComponentsInfo:getGlobalComponentsInfo,mergeSubPkgs:mergeSubPkgs};
|
|
1
|
+
function _typeof(e){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function _slicedToArray(e,t){return _arrayWithHoles(e)||_iterableToArrayLimit(e,t)||_unsupportedIterableToArray(e,t)||_nonIterableRest()}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function _iterableToArrayLimit(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,a,c,s=[],i=!0,p=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;i=!1}else for(;!(i=(o=a.call(n)).done)&&(s.push(o.value),s.length!==t);i=!0);}catch(e){p=!0,r=e}finally{try{if(!i&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(p)throw r}}return s}}function _arrayWithHoles(e){if(Array.isArray(e))return e}function _createForOfIteratorHelper(e,t){var n,o,r,a,c="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(c)return r=!(o=!0),{s:function(){c=c.call(e)},n:function(){var e=c.next();return o=e.done,e},e:function(e){r=!0,n=e},f:function(){try{o||null==c.return||c.return()}finally{if(r)throw n}}};if(Array.isArray(e)||(c=_unsupportedIterableToArray(e))||t&&e&&"number"==typeof e.length)return c&&(e=c),a=0,{s:t=function(){},n:function(){return a>=e.length?{done:!0}:{done:!1,value:e[a++]}},e:function(e){throw e},f:t};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(e,t){var n;if(e)return"string"==typeof e?_arrayLikeToArray(e,t):"Map"===(n="Object"===(n={}.toString.call(e).slice(8,-1))&&e.constructor?e.constructor.name:n)||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?_arrayLikeToArray(e,t):void 0}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=Array(t);n<t;n++)o[n]=e[n];return o}function _defineProperty(e,t,n){return(t=_toPropertyKey(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function _toPropertyKey(e){e=_toPrimitive(e,"string");return"symbol"==_typeof(e)?e:e+""}function _toPrimitive(e,t){if("object"!=_typeof(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0===n)return("string"===t?String:Number)(e);n=n.call(e,t||"default");if("object"!=_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}var path=require("path"),_require=require("../../common/utils"),readJsonFile=_require.readJsonFile,getProjectInfo=_require.getProjectInfo,_require2=require("../../common/config"),configs=_require2.configs,_packOptions=require("./packoptions-utils"),utils=require("../common/utils"),fs=require("fs"),_require3=require("../../common/version-check"),isAscfHspSatisfied=_require3.isAscfHspSatisfied,log4js=require("../../common/log4js"),logger=log4js.getLogger("manifest-handler"),APP="app",APP_TYPE="webapp";function handleUsingComponents(e,t){if(e){var n,o,r=getProjectInfo().ascfSrcPath;for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(o=e[n].trim(),e[n]=utils.getProjectAbsPath(o,t,r))}}function checkTabBarPath(e){var t,r,a=getProjectInfo().ascfSrcPath,c=["iconPath","selectedIconPath","pagePath"],n=(null==(n=e.tabBar)?void 0:n.list)||[],e=e.subPackages||e.subpackages||[];0!==n.length&&0!==e.length&&(utils.hasDuplicatePath(n),t=e.map(function(e){return e.root}).filter(function(e){return e}),r=[],n.forEach(function(o){t.forEach(function(n){c.forEach(function(e){var t;path.join(a,null!=(t=o[e])?t:"").startsWith(path.join(a,n,"/"))&&r.push("ERROR: tabBar ".concat(o.text," ").concat(e," cannot be in the subpackage directory"))})})}),0<r.length)&&(r.forEach(function(e){logger.error(e)}),logger.error("ERROR: modify app.json tabBar and recompile it"))}function checkCommonPackage(e){e.subpackages&&0<(null==(e=e.subpackages.filter(function(e){return null==e?void 0:e.common}))?void 0:e.length)&&isAscfHspSatisfied(10008300)}function readAppJson(e){var t=_defineProperty({},APP,new Map),n=getProjectInfo(),n=path.join(n.ascfSrcPath,"app.json");if(!fs.existsSync(n))throw"ERROR: Can not resolve file : app.json";var o=readJsonFile(n),o=configs.disableSubpackages?mergeSubPkgs(o):o,r=(e&&(checkCommonPackage(o),checkTabBarPath(o)),handleAppType(o),handleUsingComponents(o.usingComponents,n),o.page={},o.independentList=[],[]);if(!o.pages||o.pages.length<=0)throw"ERROR: app.json doesn't contain any page.";if(hasCustomTabBar(o)){var a,n=path.resolve(getProjectInfo().ascfSrcPath,"custom-tab-bar","index.json"),n=readJsonFile(n),c=(configs.tabBarUsingComponents=n.usingComponents,_createForOfIteratorHelper(o.tabBar.list));try{for(c.s();!(a=c.n()).done;){var s=a.value;configs.tabBarList.push(s.pagePath)}}catch(e){c.e(e)}finally{c.f()}}n={packgaePath:"",subpackage:o.subpackages||o.subPackages||[]},putPageInfoToEntryList(o.pages,"",!1,o,t[APP],n,e),n=["subpackages","subPackages"].find(function(e){return Object.prototype.hasOwnProperty.call(o,e)});if(r.length){n&&delete o[n];var i,p=_createForOfIteratorHelper(o.subpackages=r);try{for(p.s();!(i=p.n()).done;){var l=i.value,u=new Map,f={packgaePath:l.root,subpackage:l};t[l.root]=u,putPageInfoToEntryList(l.pages,l.root,l.independent,o,u,f,e)}}catch(e){p.e(e)}finally{p.f()}}else if(n){r=o[n],delete o[n];var h,g=_createForOfIteratorHelper(o.subpackages=r);try{for(g.s();!(h=g.n()).done;){var m=h.value,y=new Map,d={packgaePath:m.root,subpackage:r};t[m.root]=y,putPageInfoToEntryList(m.pages,m.root,m.independent,o,y,d,e)}}catch(e){g.e(e)}finally{g.f()}}return handingCustomTabBar(o),{manifest:o,projectComponentsMap:t}}function handleAppType(e){var t;e.type=null!=(t=null!=(t=e.type)?t:e.appType)?t:APP_TYPE,delete e.appType}function hasCustomTabBar(e){return(e.tabBar||{}).custom&&fs.existsSync(path.resolve(getProjectInfo().ascfSrcPath,"custom-tab-bar/index.hxml"))}function handingCustomTabBar(e){if(hasCustomTabBar(e)){var t,n=_createForOfIteratorHelper(e.tabBar.list);try{for(n.s();!(t=n.n()).done;){var o=t.value;if(!e.page[o.pagePath])throw"ERROR: Can not resolve tabBar list item : "+"'".concat(o.pagePath,"', please check tabBar configuration.");e.page[o.pagePath].useCustomTabBar=!0}}catch(e){n.e(e)}finally{n.f()}}}function mergeSubPkgs(o){return(o.subpackages||o.subPackages||[]).forEach(function(n){var e;null!=(e=n.pages)&&e.forEach(function(e){var t;null!=(t=o.pages)&&t.push(path.join(n.root,e).replace(/\\/g,"/"))})}),o.subpackages=[],o.subPackages=[],o}function getGlobalComponentsInfo(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=[];return Object.keys(t).forEach(function(e){n.push({key:e,path:t[e]})}),n}function putPageInfoToEntryList(e,t,n,o,r,a,c){if(e){var s,i,p,l,u=getProjectInfo(),f=generateIgnoreRule(u.projectCfg);for(s in e)Object.prototype.hasOwnProperty.call(e,s)&&(p=path.join(u.ascfSrcPath,t,e[s]),i=path.relative(u.ascfSrcPath,p),_packOptions.isIgnoreFile(i,f)||(i=i.replace(/\\/g,"/"),p="".concat(p,".json"),handleUsingComponents((l=readJsonFile(p)).usingComponents,p),n&&o.independentList.push(i),o.page[i]=l,t||getUsingComponents(o,"","",r,"page",a,c),getUsingComponents(l,p,i,r,"page",a,c)))}}function getUsingComponents(r,a,c,s,e,i,p){var l=7<arguments.length&&void 0!==arguments[7]?arguments[7]:[],u=8<arguments.length&&void 0!==arguments[8]&&arguments[8],f=getProjectInfo(),h=[],g=[],m=(getComponentPlaceholderList(g,null==r?void 0:r.componentPlaceholder),r.name);if(utils.adaptCustomTabBar(e,r,c),r.usingComponents)for(var y in r.usingComponents)(()=>{if(Object.prototype.hasOwnProperty.call(r.usingComponents,y)){var t=r.usingComponents[y],e=utils.getComponentAbsPath(t,a,f.ascfSrcPath,".json"),n=e.filePath,e=e.fixEntryPath,o=path.relative(f.ascfSrcPath,n).replace(/\\/g,"/").replace(/\.json/,"");if(r.usingComponents[y]=t=e||o,!m&&a===n)return m=y;if(p&&(e=unifyPath(i),errorJudge(y,r,n,g,e,t,c,i),u=checkPlaceholderExists(t,r),hasPlaceholder(y,g))&&configs.requiredComponents.push(t),l.find(function(e){return e===n}))return;h.some(function(e){return e.path===t})||h.push({path:t,key:y,jsonContent:r,compJsonPath:n,hasPlaceHolder:u});o=readJsonFile(n);handleUsingComponents(o.usingComponents,n),getUsingComponents(o,n,t,s,"component",i,p,l.concat([n]),u)}})();var t=""===a?{}:r;c&&!s.get(c)&&(t={jsonContent:t,componentList:h,type:e,componentName:m,compJsonPath:a,path:c,hasPlaceHolder:u,componentPlaceholderList:g},s.set(c,t))}function unifyPath(e){e=JSON.parse(JSON.stringify((null==e?void 0:e.subpackage)||[]));return e.map(function(e){return e.root+=e.root.endsWith("/")?"":"/",e}),e}function errorJudge(e,t,n,o,r,a,c,s){checkComponentPath(a)||logger.fatal('ERROR: "'.concat(e,'" is not found in the path: ').concat(path.join(getProjectInfo().ascfSrcPath,a),' (using by "').concat(c,'").')),isComponentInMainOrSubPackage(a,r,c,s)||hasPlaceholder(e,o)||logger.fatal('ERROR: "'.concat(e,'" is asyncComponent (using by "').concat(c,'"). Please add placeHolder')),checkPlaceholderNotAsync(e,o)||logger.fatal('ERROR: "'.concat(e,'" placeHolder can not be asyncComponent (using by "').concat(c,'").')),checkPlaceholder(e,o,t)||logger.warn('WARNING: "'.concat(e,'" placeHolder is wrong (using by "').concat(c,'").'))}function checkPlaceholder(t,e,n){var o;return!(null!=e&&e.length&&""!==(o=0<(o=e.filter(function(e){return e.key===t})).length?o[o.length-1].placeholder:"")&&(n=Object.prototype.hasOwnProperty.call(n.usingComponents,o),o=configs.componentList.includes(o),!n)&&!o&&(e.forEach(function(e){e.placeholder=t===e.key?"view":e.placeholder}),1))}function checkPlaceholderNotAsync(e,t){for(var n="",o=0;o<(null==t?void 0:t.length);o++)e===t[o].key&&(n=t[o].placeholder);for(var r=0;r<(null==t?void 0:t.length);r++)if(n===t[r].key)return!1;return!0}function hasPlaceholder(e,t){for(var n=0;n<(null==t?void 0:t.length);n++)if(t[n].key===e)return!0;return!1}function isComponentInMainOrSubPackage(e,t,n,o){for(var r=0;r<(null==t?void 0:t.length);r++){var a=t[r].root;if(n.startsWith(a)&&e.startsWith(a))return!0}return isComponentInSameSubpackageAsPage(o,e,t)}function isComponentInSameSubpackageAsPage(e,t,n){var o="",r="",a=!0,c=!0;return""!==e.packgaePath&&(a=!1,o=e.packgaePath+e.packgaePath.endsWith("/")?"":"/"),null!=n&&n.forEach(function(e){t.startsWith(e.root)&&(r=e.root,c=!1)}),!!c||!a&&o===r}function checkComponentPath(e){e=path.join(getProjectInfo().ascfSrcPath,e)+".json";return!!fs.existsSync(e)}function checkPlaceholderExists(e,t){var n,o=t.usingComponents,r=t.componentPlaceholder;for(n in o)if(Object.prototype.hasOwnProperty.call(o,n)&&o[n]===e&&r&&n in r)return!0;return!1}function getComponentPlaceholderList(e,t){if(t)for(var n=0,o=Object.entries(t);n<o.length;n++){var r=_slicedToArray(o[n],2),a=r[0];e.push({key:a,placeholder:r[1]})}}function generateIgnoreRule(e){var t;return(t=e?_packOptions.parseIgnoreRules(e):t)||{}}function generateEntry(e,n,t){var o=getProjectInfo(),r=e.projectComponentsMap,a=[],c=(Object.keys(r).reverse().forEach(function(e){a.push(r[e])}),n["app.js"]=path.resolve(o.ascfSrcPath,"app.json?package=app").replace(/\\/g,"/"),utils.mergeMap(a)),s=path.resolve(o.ascfSrcPath,"app.css");return fs.existsSync(s)?n["app.css.js"]=path.resolve(o.ascfSrcPath,"app.css"):delete n["app.css.js"],hasCustomTabBar(e.manifest)&&customTabBarHandle(o,n,e,c,r),c.forEach(function(e,t){n["".concat(t,".pack.js")]=e.compJsonPath.replace(/\.json$/,".hxml")}),utils.defUnfreezeProperty(e,"components",c),generateWidgetsEntry(n,e),n}function customTabBarHandle(e,t,n,o,r){var a,e=path.resolve(e.ascfSrcPath,"custom-tab-bar/index.hxml"),c=e.replace(/\.hxml$/,".json"),s=(t["custom-tab-bar/index.pack.js"]="".concat(e,"?type=component"),_createForOfIteratorHelper(n.manifest.tabBar.list));try{for(s.s();!(a=s.n()).done;){var i=a.value;o.get(i.pagePath)&&o.get(i.pagePath).componentList.push({path:"custom-tab-bar/index",key:"customTabBar",compJsonPath:c})}}catch(e){s.e(e)}finally{s.f()}r.app.set("custom-tab-bar/index",{componentList:[],type:"component",compJsonPath:c})}function generateWidgetsEntry(o,t){var r,n,a=getProjectInfo(),e=t.manifest;t.manifest&&e.router&&((r=e.router.pages)&&Object.keys(r).forEach(function(e){var t=r[e],n=t.component,t=(t||logger.warn("WARNING:Route information in the manifest.json file is incomplete:\n Page '".concat(e,"' does not have the component attribute configured. ")+"By default, '".concat(n,"' is used.")),path.join(a.ascfSrcPath,e,n)),e="".concat(path.join(e,n),".js");if(fs.existsSync("".concat(t,".ux")))o[e]="".concat(t,".ux");else if(!fs.existsSync("".concat(t,".hxml")))throw"ERROR: Failed to find the file: ".concat(t,".ux")}),e=e.widgets)&&0<e.length&&(t.widgetPathsList=[],n="",e.forEach(function(e){n=e.path,t.widgetPathsList.push(path.join(a.ascfSrcPath,n))}))}function generateRouteMapping(e){var t=getProjectInfo(),n=e.manifest.routeMapping||{},t=path.join(t.ascfSrcPath,"route-mapping.json");if(fs.existsSync(t)){var o=JSON.parse(fs.readFileSync(t).toString());if(o)for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(n[r]=o[r])}0<Object.keys(n).length&&(e.manifest.routeMapping=n)}module.exports={readAppJson:readAppJson,generateEntry:generateEntry,generateRouteMapping:generateRouteMapping,getGlobalComponentsInfo:getGlobalComponentsInfo,mergeSubPkgs:mergeSubPkgs};
|