miniprogram-ci 2.1.33 → 2.1.34

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.
Files changed (364) hide show
  1. package/CHANGELOG.md +1 -1
  2. package/README.md +1 -1
  3. package/dist/@types/build-server/constant.d.ts +42 -0
  4. package/dist/@types/build-server/ctxManager.d.ts +2 -0
  5. package/dist/@types/build-server/fileCacheManager.d.ts +43 -0
  6. package/dist/@types/build-server/fileTaskDriver.d.ts +36 -0
  7. package/dist/@types/build-server/subProcess.d.ts +1 -0
  8. package/dist/@types/build-server/subTaskManager.d.ts +8 -0
  9. package/dist/@types/build-server/taskDriver.d.ts +68 -0
  10. package/dist/@types/build-server/taskFactory.d.ts +22 -0
  11. package/dist/@types/build-server/tasks/appserviceCompile/index.d.ts +1 -0
  12. package/dist/@types/build-server/tasks/appserviceCompile/utils/appdevserver/getAppService.d.ts +5 -0
  13. package/dist/@types/build-server/tasks/appserviceCompile/utils/appservice/getjsfile.d.ts +19 -0
  14. package/dist/@types/build-server/tasks/appserviceCompile/utils/appservice/getmainpkgsortedjsfiles.d.ts +10 -0
  15. package/dist/@types/build-server/tasks/appserviceCompile/utils/appservice/getwxappcode.d.ts +23 -0
  16. package/dist/@types/build-server/tasks/baseFileCompiler/OTService.d.ts +7 -0
  17. package/dist/@types/build-server/tasks/baseFileCompiler/enhance.d.ts +29 -0
  18. package/dist/@types/build-server/tasks/baseFileCompiler/es6module.d.ts +44 -0
  19. package/dist/@types/build-server/tasks/baseFileCompiler/index.d.ts +3 -0
  20. package/dist/@types/build-server/tasks/baseFileCompiler/javascript.d.ts +36 -0
  21. package/dist/@types/build-server/tasks/baseFileCompiler/less.d.ts +43 -0
  22. package/dist/@types/build-server/tasks/baseFileCompiler/minifywxml.d.ts +10 -0
  23. package/dist/@types/build-server/tasks/baseFileCompiler/readFile.d.ts +2 -0
  24. package/dist/@types/build-server/tasks/baseFileCompiler/sass.d.ts +50 -0
  25. package/dist/@types/build-server/tasks/baseFileCompiler/terser.d.ts +20 -0
  26. package/dist/@types/build-server/tasks/baseFileCompiler/typescript.d.ts +25 -0
  27. package/dist/@types/build-server/tasks/baseFileCompiler/worklet.d.ts +13 -0
  28. package/dist/@types/build-server/tasks/baseFileCompiler/wxss.d.ts +33 -0
  29. package/dist/@types/build-server/tasks/common/apperrcode.config.d.ts +92 -0
  30. package/dist/@types/build-server/tasks/common/compiletype.config.d.ts +17 -0
  31. package/dist/@types/build-server/tasks/common/constants.config.d.ts +549 -0
  32. package/dist/@types/build-server/tasks/common/simulatortype.config.d.ts +15 -0
  33. package/dist/@types/build-server/tasks/common/utils/appdevserver/getwxappcode.d.ts +3 -0
  34. package/dist/@types/build-server/tasks/common/utils/babel/babelhelpers.d.ts +11 -0
  35. package/dist/@types/build-server/tasks/common/utils/builder/builder.d.ts +35 -0
  36. package/dist/@types/build-server/tasks/common/utils/builder/filter.d.ts +1 -0
  37. package/dist/@types/build-server/tasks/common/utils/builder/index.d.ts +10 -0
  38. package/dist/@types/build-server/tasks/common/utils/cache/compile.d.ts +72 -0
  39. package/dist/@types/build-server/tasks/common/utils/cache/config.d.ts +16 -0
  40. package/dist/@types/build-server/tasks/common/utils/cache/filecompile.d.ts +16 -0
  41. package/dist/@types/build-server/tasks/common/utils/cache/jspersistcache.d.ts +11 -0
  42. package/dist/@types/build-server/tasks/common/utils/cache/manager.d.ts +18 -0
  43. package/dist/@types/build-server/tasks/common/utils/cache/persistcache.d.ts +17 -0
  44. package/dist/@types/build-server/tasks/common/utils/cache/reporter.d.ts +9 -0
  45. package/dist/@types/build-server/tasks/common/utils/colorutils.d.ts +4 -0
  46. package/dist/@types/build-server/tasks/common/utils/common/bindActionTools.d.ts +8 -0
  47. package/dist/@types/build-server/tasks/common/utils/common/schema.helper.d.ts +0 -0
  48. package/dist/@types/build-server/tasks/common/utils/common/tools.d.ts +17 -0
  49. package/dist/@types/build-server/tasks/common/utils/common/waitable.d.ts +14 -0
  50. package/dist/@types/build-server/tasks/common/utils/filerules.d.ts +13 -0
  51. package/dist/@types/build-server/tasks/common/utils/fsutils.d.ts +7 -0
  52. package/dist/@types/build-server/tasks/common/utils/handleError.d.ts +0 -0
  53. package/dist/@types/build-server/tasks/common/utils/helper/vendorValidate.d.ts +0 -0
  54. package/dist/@types/build-server/tasks/common/utils/interfacebuilder/registry/index.d.ts +22 -0
  55. package/dist/@types/build-server/tasks/common/utils/partialcompile.d.ts +0 -0
  56. package/dist/@types/build-server/tasks/common/utils/project/appconfig.d.ts +5 -0
  57. package/dist/@types/build-server/tasks/common/utils/project/appjson.d.ts +2 -0
  58. package/dist/@types/build-server/tasks/common/utils/project/customcomponent.d.ts +20 -0
  59. package/dist/@types/build-server/tasks/common/utils/project/generatecode.utils.d.ts +5 -0
  60. package/dist/@types/build-server/tasks/common/utils/project/getcompiledjs.d.ts +30 -0
  61. package/dist/@types/build-server/tasks/common/utils/project/helper/index.d.ts +21 -0
  62. package/dist/@types/build-server/tasks/common/utils/project/helper/projectconfigjsonutils.d.ts +142 -0
  63. package/dist/@types/build-server/tasks/common/utils/project/helper/reserveddirectories.d.ts +3 -0
  64. package/dist/@types/build-server/tasks/common/utils/project/helper/theme.d.ts +39 -0
  65. package/dist/@types/build-server/tasks/common/utils/project/online/appconfig.d.ts +0 -0
  66. package/dist/@types/build-server/tasks/common/utils/project/pagejson.d.ts +2 -0
  67. package/dist/@types/build-server/tasks/common/utils/project/projectconfigjson.d.ts +8 -0
  68. package/dist/@types/build-server/tasks/common/utils/project/wxappcodejson.d.ts +2 -0
  69. package/dist/@types/build-server/tasks/common/utils/subpackageUtils.d.ts +0 -0
  70. package/dist/@types/build-server/tasks/common/utils/tracing/Trace.d.ts +50 -0
  71. package/dist/@types/build-server/tasks/common/utils/tracing/aegis.d.ts +3 -0
  72. package/dist/@types/build-server/tasks/common/utils/tracing/index.d.ts +34 -0
  73. package/dist/@types/build-server/tasks/common/utils/tracing/readiness.d.ts +11 -0
  74. package/dist/@types/build-server/tasks/common/utils/tracing/report.d.ts +14 -0
  75. package/dist/@types/build-server/tasks/common/utils/trans/transwxmltojs.d.ts +28 -0
  76. package/dist/@types/build-server/tasks/common/utils/transformsourcemap.d.ts +1 -0
  77. package/dist/@types/build-server/tasks/common/utils/web/glasseaselUtils.d.ts +1 -0
  78. package/dist/@types/build-server/tasks/common/utils/web/md5.d.ts +2 -0
  79. package/dist/@types/build-server/tasks/common/utils/web/processPath.d.ts +9 -0
  80. package/dist/@types/build-server/tasks/common/weapp.config.d.ts +108 -0
  81. package/dist/@types/build-server/tasks/pageInitSourceCompile/index.d.ts +2 -0
  82. package/dist/@types/build-server/tasks/pageframeCompile/index.d.ts +1 -0
  83. package/dist/@types/build-server/tasks/pageframeCompile/utils/appdevserver/getwxappcode.d.ts +8 -0
  84. package/dist/@types/build-server/tasks/pageframeCompile/utils/trans/transwxsstojs.d.ts +26 -0
  85. package/dist/@types/build-server/testAppConfig.d.ts +1 -0
  86. package/dist/@types/build-server/testAppservice.d.ts +1 -0
  87. package/dist/@types/build-server/testInitSourceCompile.d.ts +1 -0
  88. package/dist/@types/build-server/testPageframe.d.ts +1 -0
  89. package/dist/@types/build-server/testSubProcess.d.ts +1 -0
  90. package/dist/@types/build-server/utils/fileTask.d.ts +5 -0
  91. package/dist/@types/build-server/utils/getFileOrCache.d.ts +24 -0
  92. package/dist/@types/build-server/utils/process.d.ts +0 -0
  93. package/dist/@types/build-server/utils/request.d.ts +47 -0
  94. package/dist/@types/bussinessMonitor/monitor.d.ts +1 -0
  95. package/dist/@types/config/config.d.ts +1 -1
  96. package/dist/@types/index.d.ts +0 -2
  97. package/dist/@types/modules/corecompiler/original/workerThread/task/func.d.ts +0 -4
  98. package/dist/@types/modules/corecompiler/summerCompiler.d.ts +0 -4
  99. package/dist/@types/modules/fullcompiler/appservice/appservice.config.d.ts +4 -0
  100. package/dist/@types/modules/fullcompiler/appservice/generatecode.utils.d.ts +12 -0
  101. package/dist/@types/modules/fullcompiler/appservice/getappservice.d.ts +9 -0
  102. package/dist/@types/modules/fullcompiler/appservice/getcompiledjs.d.ts +32 -0
  103. package/dist/@types/modules/fullcompiler/appservice/getjsfile.d.ts +18 -0
  104. package/dist/@types/modules/fullcompiler/appservice/getmainpkgsortedjsfiles.d.ts +12 -0
  105. package/dist/@types/modules/fullcompiler/appservice/getsubpackage.d.ts +7 -0
  106. package/dist/@types/modules/fullcompiler/appservice/getsubpkgsortedjsfiles.d.ts +10 -0
  107. package/dist/@types/modules/fullcompiler/appservice/getwxappcode.d.ts +13 -0
  108. package/dist/@types/modules/fullcompiler/config/apperrcode.config.d.ts +48 -0
  109. package/dist/@types/modules/fullcompiler/filerules.d.ts +5 -0
  110. package/dist/@types/modules/fullcompiler/getallrawfiles.d.ts +11 -0
  111. package/dist/@types/modules/fullcompiler/getallwmltohtmlmap.d.ts +11 -0
  112. package/dist/@types/modules/fullcompiler/index.d.ts +31 -0
  113. package/dist/@types/modules/fullcompiler/pageframe/getsubpackage.d.ts +10 -0
  114. package/dist/@types/modules/fullcompiler/pageframe/getwxappcode.d.ts +13 -0
  115. package/dist/@types/modules/fullcompiler/pageframe/index.d.ts +10 -0
  116. package/dist/@types/modules/fullcompiler/trans/transwxmltojs.d.ts +11 -0
  117. package/dist/@types/modules/fullcompiler/trans/transwxsstojs.d.ts +21 -0
  118. package/dist/@types/modules/fullcompiler/trans/wxml/compilewxml.d.ts +18 -0
  119. package/dist/@types/modules/fullcompiler/trans/wxss/compilewxss.d.ts +11 -0
  120. package/dist/@types/modules/fullcompiler/utils/appconfig/appconfig.d.ts +12 -0
  121. package/dist/@types/modules/fullcompiler/utils/appconfig/appjson.d.ts +3 -0
  122. package/dist/@types/modules/fullcompiler/utils/appconfig/checkcustomcomponent.d.ts +14 -0
  123. package/dist/@types/modules/fullcompiler/utils/appconfig/pagejson.d.ts +3 -0
  124. package/dist/@types/modules/fullcompiler/utils/appconfig/wxappcodejson.d.ts +3 -0
  125. package/dist/@types/modules/fullcompiler/utils/filewriter/index.d.ts +14 -0
  126. package/dist/@types/modules/fullcompiler/utils/handleerror/errorconfig.d.ts +9 -0
  127. package/dist/@types/modules/fullcompiler/utils/handleerror/handleerror.d.ts +3 -0
  128. package/dist/@types/modules/fullcompiler/utils/handleerror/parseerr.d.ts +42 -0
  129. package/dist/@types/modules/fullcompiler/utils/index.d.ts +4 -0
  130. package/dist/@types/modules/fullcompiler/utils/taskmanager.d.ts +23 -0
  131. package/dist/@types/modules/fullcompiler/utils/theme/index.d.ts +40 -0
  132. package/dist/@types/modules/fullcompiler/utils/tools.d.ts +15 -0
  133. package/dist/@types/modules/fullcompiler/utils/transformsourcemap.d.ts +1 -0
  134. package/dist/@types/project/serverProject.d.ts +38 -0
  135. package/dist/@types/services/app/server/appDirService.d.ts +6 -0
  136. package/dist/@types/services/builder/server/builder.d.ts +4 -0
  137. package/dist/@types/services/compileCacheManager/common/compileCacheManager.d.ts +23 -0
  138. package/dist/@types/services/compileCacheManager/nw/compileCacheManager.d.ts +16 -0
  139. package/dist/@types/services/compileCacheManager/server/compileCacheManager.d.ts +26 -0
  140. package/dist/@types/services/compilewxml/server/compilewxmlService.d.ts +5 -0
  141. package/dist/@types/services/compilewxml/server/wccWorker.d.ts +1 -0
  142. package/dist/@types/services/compilewxss/server/compilewxssService.d.ts +4 -0
  143. package/dist/@types/services/compilewxss/server/wcscWorker.d.ts +1 -0
  144. package/dist/@types/services/consoledisplay/server/consoledisplay.d.ts +4 -0
  145. package/dist/@types/services/fileUtilsManager/server/fileUtilsManager.d.ts +4 -0
  146. package/dist/@types/services/fs/server/fileService.d.ts +27 -0
  147. package/dist/@types/services/genTempFile/server/genTempFileService.d.ts +3 -0
  148. package/dist/@types/services/global/server/global.d.ts +6 -0
  149. package/dist/@types/services/initializeCheck/server/initializeCheck.d.ts +4 -0
  150. package/dist/@types/services/locales/server/const.d.ts +5 -0
  151. package/dist/@types/services/locales/server/locales.d.ts +5 -0
  152. package/dist/@types/services/log/server/logService.d.ts +9 -0
  153. package/dist/@types/services/miniappjson/server/miniappjson.d.ts +4 -0
  154. package/dist/@types/services/multiTaskManager/server/multiTaskManager.d.ts +5 -0
  155. package/dist/@types/services/multiTaskManager/server/pm2TaskWorker.d.ts +1 -0
  156. package/dist/@types/services/multiTaskManager/server/pm2WorkerManager.d.ts +18 -0
  157. package/dist/@types/services/nativeModule/server/nativeModule.d.ts +3 -0
  158. package/dist/@types/services/performance/server/performance.d.ts +7 -0
  159. package/dist/@types/services/pluginFileReader/common/pluginFileReader.d.ts +3 -4
  160. package/dist/@types/services/pluginFileReader/server/pluginFileReader.d.ts +18 -0
  161. package/dist/@types/services/projectManager/server/buildServerProjectManager.d.ts +11 -0
  162. package/dist/@types/services/projectManager/server/projectManager.d.ts +7 -0
  163. package/dist/@types/services/root/server/root.d.ts +11 -0
  164. package/dist/@types/services/root/server/rootService.d.ts +2 -0
  165. package/dist/@types/services/staticConfig/server/staticConfigService.d.ts +4 -0
  166. package/dist/@types/services/store/server/storeService.d.ts +11 -0
  167. package/dist/@types/services/uniapp/server/uniapp.d.ts +4 -0
  168. package/dist/build-server/constant.js +1 -0
  169. package/dist/build-server/ctxManager.js +1 -0
  170. package/dist/build-server/fileCacheManager.js +1 -0
  171. package/dist/build-server/fileTaskDriver.js +1 -0
  172. package/dist/build-server/subProcess.js +1 -0
  173. package/dist/build-server/subTaskManager.js +1 -0
  174. package/dist/build-server/taskDriver.js +1 -0
  175. package/dist/build-server/taskFactory.js +1 -0
  176. package/dist/build-server/tasks/appserviceCompile/index.js +1 -0
  177. package/dist/build-server/tasks/appserviceCompile/utils/appdevserver/getAppService.js +1 -0
  178. package/dist/build-server/tasks/appserviceCompile/utils/appservice/getjsfile.js +1 -0
  179. package/dist/build-server/tasks/appserviceCompile/utils/appservice/getmainpkgsortedjsfiles.js +1 -0
  180. package/dist/build-server/tasks/appserviceCompile/utils/appservice/getwxappcode.js +1 -0
  181. package/dist/build-server/tasks/baseFileCompiler/OTService.js +1 -0
  182. package/dist/build-server/tasks/baseFileCompiler/enhance.js +1 -0
  183. package/dist/build-server/tasks/baseFileCompiler/es6module.js +1 -0
  184. package/dist/build-server/tasks/baseFileCompiler/index.js +1 -0
  185. package/dist/build-server/tasks/baseFileCompiler/javascript.js +1 -0
  186. package/dist/build-server/tasks/baseFileCompiler/less.js +1 -0
  187. package/dist/build-server/tasks/baseFileCompiler/minifywxml.js +1 -0
  188. package/dist/build-server/tasks/baseFileCompiler/readFile.js +1 -0
  189. package/dist/build-server/tasks/baseFileCompiler/sass.js +1 -0
  190. package/dist/build-server/tasks/baseFileCompiler/terser.js +1 -0
  191. package/dist/build-server/tasks/baseFileCompiler/typescript.js +1 -0
  192. package/dist/build-server/tasks/baseFileCompiler/worklet.js +1 -0
  193. package/dist/build-server/tasks/baseFileCompiler/wxss.js +1 -0
  194. package/dist/build-server/tasks/common/apperrcode.config.js +1 -0
  195. package/dist/build-server/tasks/common/compiletype.config.js +1 -0
  196. package/dist/build-server/tasks/common/constants.config.js +1 -0
  197. package/dist/build-server/tasks/common/simulatortype.config.js +1 -0
  198. package/dist/build-server/tasks/common/utils/appdevserver/getwxappcode.js +1 -0
  199. package/dist/build-server/tasks/common/utils/babel/babelhelpers.js +1 -0
  200. package/dist/build-server/tasks/common/utils/builder/builder.js +1 -0
  201. package/dist/build-server/tasks/common/utils/builder/filter.js +1 -0
  202. package/dist/build-server/tasks/common/utils/builder/index.js +1 -0
  203. package/dist/build-server/tasks/common/utils/cache/compile.js +1 -0
  204. package/dist/build-server/tasks/common/utils/cache/config.js +1 -0
  205. package/dist/build-server/tasks/common/utils/cache/filecompile.js +1 -0
  206. package/dist/build-server/tasks/common/utils/cache/jspersistcache.js +1 -0
  207. package/dist/build-server/tasks/common/utils/cache/manager.js +1 -0
  208. package/dist/build-server/tasks/common/utils/cache/persistcache.js +1 -0
  209. package/dist/build-server/tasks/common/utils/cache/reporter.js +1 -0
  210. package/dist/build-server/tasks/common/utils/colorutils.js +1 -0
  211. package/dist/build-server/tasks/common/utils/common/bindActionTools.js +1 -0
  212. package/dist/build-server/tasks/common/utils/common/schema.helper.js +1 -0
  213. package/dist/build-server/tasks/common/utils/common/tools.js +1 -0
  214. package/dist/build-server/tasks/common/utils/common/waitable.js +1 -0
  215. package/dist/build-server/tasks/common/utils/filerules.js +1 -0
  216. package/dist/build-server/tasks/common/utils/fsutils.js +1 -0
  217. package/dist/build-server/tasks/common/utils/handleError.js +1 -0
  218. package/dist/build-server/tasks/common/utils/helper/vendorValidate.js +1 -0
  219. package/dist/build-server/tasks/common/utils/interfacebuilder/registry/index.js +1 -0
  220. package/dist/build-server/tasks/common/utils/partialcompile.js +1 -0
  221. package/dist/build-server/tasks/common/utils/project/appconfig.js +1 -0
  222. package/dist/build-server/tasks/common/utils/project/appjson.js +1 -0
  223. package/dist/build-server/tasks/common/utils/project/customcomponent.js +1 -0
  224. package/dist/build-server/tasks/common/utils/project/generatecode.utils.js +1 -0
  225. package/dist/build-server/tasks/common/utils/project/getcompiledjs.js +1 -0
  226. package/dist/build-server/tasks/common/utils/project/helper/index.js +1 -0
  227. package/dist/build-server/tasks/common/utils/project/helper/projectconfigjsonutils.js +1 -0
  228. package/dist/build-server/tasks/common/utils/project/helper/reserveddirectories.js +1 -0
  229. package/dist/build-server/tasks/common/utils/project/helper/theme.js +1 -0
  230. package/dist/build-server/tasks/common/utils/project/online/appconfig.js +1 -0
  231. package/dist/build-server/tasks/common/utils/project/pagejson.js +1 -0
  232. package/dist/build-server/tasks/common/utils/project/projectconfigjson.js +1 -0
  233. package/dist/build-server/tasks/common/utils/project/wxappcodejson.js +1 -0
  234. package/dist/build-server/tasks/common/utils/subpackageUtils.js +1 -0
  235. package/dist/build-server/tasks/common/utils/tracing/Trace.js +1 -0
  236. package/dist/build-server/tasks/common/utils/tracing/aegis.js +1 -0
  237. package/dist/build-server/tasks/common/utils/tracing/index.js +1 -0
  238. package/dist/build-server/tasks/common/utils/tracing/readiness.js +1 -0
  239. package/dist/build-server/tasks/common/utils/tracing/report.js +1 -0
  240. package/dist/build-server/tasks/common/utils/trans/transwxmltojs.js +1 -0
  241. package/dist/build-server/tasks/common/utils/transformsourcemap.js +1 -0
  242. package/dist/build-server/tasks/common/utils/web/glasseaselUtils.js +1 -0
  243. package/dist/build-server/tasks/common/utils/web/md5.js +1 -0
  244. package/dist/build-server/tasks/common/utils/web/processPath.js +1 -0
  245. package/dist/build-server/tasks/common/weapp.config.js +1 -0
  246. package/dist/build-server/tasks/pageInitSourceCompile/index.js +1 -0
  247. package/dist/build-server/tasks/pageframeCompile/index.js +1 -0
  248. package/dist/build-server/tasks/pageframeCompile/utils/appdevserver/getwxappcode.js +1 -0
  249. package/dist/build-server/tasks/pageframeCompile/utils/trans/transwxsstojs.js +1 -0
  250. package/dist/build-server/testAppConfig.js +1 -0
  251. package/dist/build-server/testAppservice.js +1 -0
  252. package/dist/build-server/testInitSourceCompile.js +1 -0
  253. package/dist/build-server/testPageframe.js +1 -0
  254. package/dist/build-server/testSubProcess.js +1 -0
  255. package/dist/build-server/utils/fileTask.js +1 -0
  256. package/dist/build-server/utils/getFileOrCache.js +1 -0
  257. package/dist/build-server/utils/process.js +1 -0
  258. package/dist/build-server/utils/request.js +1 -0
  259. package/dist/bussinessMonitor/monitor.js +1 -0
  260. package/dist/config/config.js +1 -1
  261. package/dist/index.js +1 -1
  262. package/dist/manifest.json +4 -0
  263. package/dist/modules/corecompiler/original/workerThread/task/func.js +1 -1
  264. package/dist/modules/corecompiler/processHandler.js +1 -1
  265. package/dist/modules/corecompiler/summer/pipeManager/index.js +1 -1
  266. package/dist/modules/corecompiler/summer/pipeManager/pipeCPProject.js +1 -1
  267. package/dist/modules/corecompiler/summer/pipeManager/pipeContext.js +1 -1
  268. package/dist/modules/corecompiler/summer/pipeManager/pipeManager.js +1 -1
  269. package/dist/modules/corecompiler/summer/pipeManager/pipeWorker.js +1 -1
  270. package/dist/modules/corecompiler/summer/pipeManager/pipes/appservicePipe/index.js +1 -1
  271. package/dist/modules/corecompiler/summer/pipeManager/pipes/compileWxmlToGlassEaselPipe.js +1 -1
  272. package/dist/modules/corecompiler/summer/pipeManager/pipes/compileWxssPipe.js +1 -1
  273. package/dist/modules/corecompiler/summer/pipeManager/pipes/index.js +1 -1
  274. package/dist/modules/corecompiler/summer/pipeManager/pipes/pageInitSourcePipe/index.js +1 -1
  275. package/dist/modules/corecompiler/summer/pipeManager/pipes/pageframePipe/index.js +1 -1
  276. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getAppService.js +1 -1
  277. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getwxappcode.js +1 -1
  278. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getjsfile.js +1 -1
  279. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getmainpkgsortedjsfiles.js +1 -1
  280. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getwxappcode.js +1 -1
  281. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/common/apperrcode.config.js +1 -1
  282. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/common/tools.js +1 -1
  283. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/appconfig.js +1 -1
  284. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/appjson.js +1 -1
  285. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/customcomponent.js +1 -1
  286. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/helper/theme.js +1 -1
  287. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/pagejson.js +1 -1
  288. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/wxappcodejson.js +1 -1
  289. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxmltojs.js +1 -1
  290. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxsstojs.js +1 -1
  291. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/web/processPath.js +1 -1
  292. package/dist/modules/corecompiler/summer/pipeManager/pipes/wccPipe.js +1 -1
  293. package/dist/modules/corecompiler/summer/pipeManager/types.js +1 -1
  294. package/dist/modules/corecompiler/summerCompiler.js +1 -1
  295. package/dist/modules/fullcompiler/appservice/appservice.config.js +1 -0
  296. package/dist/modules/fullcompiler/appservice/generatecode.utils.js +1 -0
  297. package/dist/modules/fullcompiler/appservice/getappservice.js +1 -0
  298. package/dist/modules/fullcompiler/appservice/getcompiledjs.js +1 -0
  299. package/dist/modules/fullcompiler/appservice/getjsfile.js +1 -0
  300. package/dist/modules/fullcompiler/appservice/getmainpkgsortedjsfiles.js +1 -0
  301. package/dist/modules/fullcompiler/appservice/getsubpackage.js +1 -0
  302. package/dist/modules/fullcompiler/appservice/getsubpkgsortedjsfiles.js +1 -0
  303. package/dist/modules/fullcompiler/appservice/getwxappcode.js +1 -0
  304. package/dist/modules/fullcompiler/config/apperrcode.config.js +1 -0
  305. package/dist/modules/fullcompiler/filerules.js +1 -0
  306. package/dist/modules/fullcompiler/getallrawfiles.js +1 -0
  307. package/dist/modules/fullcompiler/getallwmltohtmlmap.js +1 -0
  308. package/dist/modules/fullcompiler/index.js +1 -0
  309. package/dist/modules/fullcompiler/pageframe/getsubpackage.js +1 -0
  310. package/dist/modules/fullcompiler/pageframe/getwxappcode.js +1 -0
  311. package/dist/modules/fullcompiler/pageframe/index.js +1 -0
  312. package/dist/modules/fullcompiler/trans/transwxmltojs.js +1 -0
  313. package/dist/modules/fullcompiler/trans/transwxsstojs.js +1 -0
  314. package/dist/modules/fullcompiler/trans/wxml/compilewxml.js +1 -0
  315. package/dist/modules/fullcompiler/trans/wxss/compilewxss.js +1 -0
  316. package/dist/modules/fullcompiler/utils/appconfig/appconfig.js +1 -0
  317. package/dist/modules/fullcompiler/utils/appconfig/appjson.js +1 -0
  318. package/dist/modules/fullcompiler/utils/appconfig/checkcustomcomponent.js +1 -0
  319. package/dist/modules/fullcompiler/utils/appconfig/pagejson.js +1 -0
  320. package/dist/modules/fullcompiler/utils/appconfig/wxappcodejson.js +1 -0
  321. package/dist/modules/fullcompiler/utils/filewriter/index.js +1 -0
  322. package/dist/modules/fullcompiler/utils/handleerror/errorconfig.js +1 -0
  323. package/dist/modules/fullcompiler/utils/handleerror/handleerror.js +1 -0
  324. package/dist/modules/fullcompiler/utils/handleerror/parseerr.js +1 -0
  325. package/dist/modules/fullcompiler/utils/index.js +1 -0
  326. package/dist/modules/fullcompiler/utils/taskmanager.js +1 -0
  327. package/dist/modules/fullcompiler/utils/theme/index.js +1 -0
  328. package/dist/modules/fullcompiler/utils/tools.js +1 -0
  329. package/dist/modules/fullcompiler/utils/transformsourcemap.js +1 -0
  330. package/dist/project/serverProject.js +1 -0
  331. package/dist/services/app/server/appDirService.js +1 -0
  332. package/dist/services/builder/server/builder.js +1 -0
  333. package/dist/services/compileCacheManager/common/compileCacheManager.js +1 -0
  334. package/dist/services/compileCacheManager/nw/compileCacheManager.js +1 -0
  335. package/dist/services/compileCacheManager/server/compileCacheManager.js +1 -0
  336. package/dist/services/compilewxml/server/compilewxmlService.js +1 -0
  337. package/dist/services/compilewxml/server/wccWorker.js +1 -0
  338. package/dist/services/compilewxss/server/compilewxssService.js +1 -0
  339. package/dist/services/compilewxss/server/wcscWorker.js +1 -0
  340. package/dist/services/consoledisplay/server/consoledisplay.js +1 -0
  341. package/dist/services/fileUtilsManager/server/fileUtilsManager.js +1 -0
  342. package/dist/services/fs/server/fileService.js +1 -0
  343. package/dist/services/genTempFile/server/genTempFileService.js +1 -0
  344. package/dist/services/global/server/global.js +1 -0
  345. package/dist/services/initializeCheck/server/initializeCheck.js +1 -0
  346. package/dist/services/locales/server/const.js +1 -0
  347. package/dist/services/locales/server/locales.js +1 -0
  348. package/dist/services/log/server/logService.js +1 -0
  349. package/dist/services/miniappjson/server/miniappjson.js +1 -0
  350. package/dist/services/multiTaskManager/server/multiTaskManager.js +1 -0
  351. package/dist/services/multiTaskManager/server/pm2TaskWorker.js +1 -0
  352. package/dist/services/multiTaskManager/server/pm2WorkerManager.js +1 -0
  353. package/dist/services/nativeModule/server/nativeModule.js +1 -0
  354. package/dist/services/performance/server/performance.js +1 -0
  355. package/dist/services/pluginFileReader/server/pluginFileReader.js +1 -0
  356. package/dist/services/projectManager/server/buildServerProjectManager.js +1 -0
  357. package/dist/services/projectManager/server/projectManager.js +1 -0
  358. package/dist/services/root/server/root.js +1 -0
  359. package/dist/services/root/server/rootService.js +1 -0
  360. package/dist/services/staticConfig/server/staticConfigService.js +1 -0
  361. package/dist/services/store/server/storeService.js +1 -0
  362. package/dist/services/uniapp/server/uniapp.js +1 -0
  363. package/dist/utils/subprocess/processService.js +1 -1
  364. package/package.json +3 -60
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileWxssPipe=void 0;const compilewxssService_1=require("../../../../../services/compilewxss/common/compilewxssService"),types_1=require("../types");exports.compileWxssPipe={name:types_1.EPipeCMD.COMPILE_WXSS,execute:async(e,s)=>await e.getService(compilewxssService_1.ICompilewxssService).compileWxss(s)};
1
+ !function(e,i){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileWxssPipe=void 0;const s=e("../../../../../services/compilewxss/common/compilewxssService"),c=e("../types");exports.compileWxssPipe={name:c.EPipeCMD.COMPILE_WXSS,execute:async(e,i)=>await e.getService(s.ICompilewxssService).compileWxss(i)}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.allPipes=void 0;const wccPipe_1=require("./wccPipe"),compileWxmlToGlassEaselPipe_1=require("./compileWxmlToGlassEaselPipe"),compileWxssPipe_1=require("./compileWxssPipe");exports.allPipes=[wccPipe_1.wccPipe,compileWxmlToGlassEaselPipe_1.compileWxmlToGlassEaselPipe,compileWxssPipe_1.compileWxssPipe];
1
+ !function(e,i){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.allPipes=void 0;const s=e("./wccPipe"),l=e("./compileWxmlToGlassEaselPipe"),p=e("./compileWxssPipe");exports.allPipes=[s.wccPipe,l.compileWxmlToGlassEaselPipe,p.compileWxssPipe]}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pageInitSourcePipe=exports.getPageInitResourceCore=exports.getPageInitResource=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),monitor_1=require("../../../../../../bussinessMonitor/monitor"),types_1=require("../../types"),funcName="$gwx",getPageInitResource=async function(e,t){const n=path_1.default.join("app",t);return(0,exports.getPageInitResourceCore)(e,n)};exports.getPageInitResource=getPageInitResource;const getPageInitResourceCore=async function(e,t){var n;const o=Date.now(),r=null===(n=e.project.projectContext)||void 0===n?void 0:n.projectId;(0,monitor_1.BusinessReport)("pageInitSourceCompile","compile start",JSON.stringify({projectId:r,filePath:t}));try{const e=t.slice(4,t.length-5),n=`\n <style> </style> <page></page>\n <script>\n var __setCssStartTime__ = Date.now();\n __wxAppCode__['${e}.wxss']();\n var __setCssEndTime__ = Date.now();\n (function() {\n var gf = ${"$gwx"}( './${e}.wxml' );\n\n if (window.__wxAppCodeReadyCallback__) {\n window.__wxAppCodeReadyCallback__(gf);\n } else {\n document.dispatchEvent(new CustomEvent( "generateFuncReady", {\n detail: {\n generateFunc: gf\n }\n }));\n }\n })();\n <\/script>`,i=Date.now()-o;return(0,monitor_1.BusinessReport)("pageInitSourceCompile","compile success",JSON.stringify({projectId:r,filePath:t,rawPath:e,duration:i,contentLength:n.length})),n}catch(e){const n=Date.now()-o;throw(0,monitor_1.BusinessReport)("pageInitSourceCompile","compile failed",JSON.stringify({projectId:r,filePath:t,duration:n,error:e instanceof Error?e.message:String(e)})),e}};exports.getPageInitResourceCore=getPageInitResourceCore,exports.pageInitSourcePipe={name:types_1.EPipeCMD.PAGE_INIT_SOURCE,async execute(e,t){const{filepath:n}=t;return await(0,exports.getPageInitResource)(e,n)}};
1
+ !function(e,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pageInitSourcePipe=exports.getPageInitResourceCore=exports.getPageInitResource=void 0;const n=e("tslib").__importDefault(e("path")),o=e("../../../../../../bussinessMonitor/monitor"),r=e("../../types");exports.getPageInitResource=async function(e,t){const o=n.default.join("app",t);return(0,exports.getPageInitResourceCore)(e,o)};exports.getPageInitResourceCore=async function(e,t){var n;const r=Date.now(),i=null===(n=e.project.projectContext)||void 0===n?void 0:n.projectId;(0,o.BusinessReport)("pageInitSourceCompile","compile start",JSON.stringify({projectId:i,filePath:t}));try{const e=t.slice(4,t.length-5),n=`\n <style> </style> <page></page>\n <script>\n var __setCssStartTime__ = Date.now();\n __wxAppCode__['${e}.wxss']();\n var __setCssEndTime__ = Date.now();\n (function() {\n var gf = $gwx( './${e}.wxml' );\n\n if (window.__wxAppCodeReadyCallback__) {\n window.__wxAppCodeReadyCallback__(gf);\n } else {\n document.dispatchEvent(new CustomEvent( "generateFuncReady", {\n detail: {\n generateFunc: gf\n }\n }));\n }\n })();\n <\/script>`,s=Date.now()-r;return(0,o.BusinessReport)("pageInitSourceCompile","compile success",JSON.stringify({projectId:i,filePath:t,rawPath:e,duration:s,contentLength:n.length})),n}catch(e){const n=Date.now()-r;throw(0,o.BusinessReport)("pageInitSourceCompile","compile failed",JSON.stringify({projectId:i,filePath:t,duration:n,error:e instanceof Error?e.message:String(e)})),e}},exports.pageInitSourcePipe={name:r.EPipeCMD.PAGE_INIT_SOURCE,async execute(e,t){const{filepath:n}=t;return await(0,exports.getPageInitResource)(e,n)}}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pageframePipe=void 0,exports.getPageframeCore=getPageframeCore;const tools_1=require("../utils/common/tools"),getwxappcode_1=require("../utils/appdevserver/getwxappcode"),monitor_1=require("../../../../../../bussinessMonitor/monitor"),types_1=require("../../types"),transwxmltojs=require("../utils/trans/transwxmltojs"),transwxsstojs=require("../utils/trans/transwxsstojs");async function getPageframeCore(e,t=!1){var o,n;const a=Date.now(),i=e.project.projectContext;(0,monitor_1.BusinessReport)("pageframeCompile","compile start",JSON.stringify({options:i,isMultiPkg:t}));try{const s=[];t||s.push('\n <!DOCTYPE html>\n <html lang="zh-CN">\n <head>\n <meta charset="UTF-8" />\n <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />\n <meta http-equiv="Content-Security-Policy" content="script-src \'self\' \'unsafe-inline\' \'unsafe-eval\'">\n <link rel="icon" href="data:image/ico;base64,aWNv">\n <script>'),s.push("\n var __mainPageFrameReady__ = window.__mainPageFrameReady__ || function(){}; var __pageFrameStartTime__ = __pageFrameStartTime__ || Date.now(); var __webviewId__ = __webviewId__;\n var __wxAppCode__ = __wxAppCode__ || {}; var __WXML_GLOBAL__ = __WXML_GLOBAL__ || {entrys:{},defines:{},modules:{},ops:[],wxs_nf_init:undefined,total_ops:0}; var __vd_version_info__=__vd_version_info__||{};");const r=Date.now(),p=await transwxmltojs.transWXMLToJS(e,{app:!0});s.push(p.code);const _=Date.now()-r;(0,monitor_1.BusinessReport)("pageframeCompile","wxml compiled",JSON.stringify({options:i,duration:_,codeLength:null===(o=p.code)||void 0===o?void 0:o.length}));const m=Date.now(),l=await transwxsstojs.transWXSSToJS(e,{app:!0});s.push((0,tools_1.wrapCodeByEval)(l.comm));const c=Date.now()-m;(0,monitor_1.BusinessReport)("pageframeCompile","wxss compiled",JSON.stringify({options:i,duration:c,codeLength:null===(n=l.comm)||void 0===n?void 0:n.length}));const d=Date.now(),u=await(0,getwxappcode_1.getPageFrameWxAppCode)(e,{app:!0,noJson:!0});s.push(`;(window.eval || __global.__hackEval)(\`${u}\`)`);const g=Date.now()-d;(0,monitor_1.BusinessReport)("pageframeCompile","wxappcode generated",JSON.stringify({options:i,duration:g,codeLength:null==u?void 0:u.length})),s.push(";__mainPageFrameReady__() ;var __pageFrameEndTime__ = Date.now()"),t||s.push("<\/script> </head> <body> <div></div> </body> </html>");const w=Date.now()-a;return(0,monitor_1.BusinessReport)("pageframeCompile","compile success",JSON.stringify({options:i,totalDuration:w,scriptCount:s.length,totalLength:s.join("").length})),s.join("\n\n")}catch(e){const t=Date.now()-a;throw(0,monitor_1.BusinessReport)("pageframeCompile","compile failed",JSON.stringify({options:i,duration:t,error:e instanceof Error?e.message:String(e)})),e}}exports.pageframePipe={name:types_1.EPipeCMD.PAGEFRAME,async execute(e,t){const{isMultiPkg:o=!1}=t||{};return await getPageframeCore(e,o)}};
1
+ !function(e,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pageframePipe=void 0,exports.getPageframeCore=p;const o=e("../utils/common/tools"),n=e("../utils/appdevserver/getwxappcode"),a=e("../../../../../../bussinessMonitor/monitor"),i=e("../../types"),s=e("../utils/trans/transwxmltojs"),r=e("../utils/trans/transwxsstojs");async function p(e,t=!1){var i,p;const _=Date.now(),c=e.project.projectContext;(0,a.BusinessReport)("pageframeCompile","compile start",JSON.stringify({options:c,isMultiPkg:t}));try{const l=[];t||l.push('\n <!DOCTYPE html>\n <html lang="zh-CN">\n <head>\n <meta charset="UTF-8" />\n <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />\n <meta http-equiv="Content-Security-Policy" content="script-src \'self\' \'unsafe-inline\' \'unsafe-eval\'">\n <link rel="icon" href="data:image/ico;base64,aWNv">\n <script>'),l.push("\n var __mainPageFrameReady__ = window.__mainPageFrameReady__ || function(){}; var __pageFrameStartTime__ = __pageFrameStartTime__ || Date.now(); var __webviewId__ = __webviewId__;\n var __wxAppCode__ = __wxAppCode__ || {}; var __WXML_GLOBAL__ = __WXML_GLOBAL__ || {entrys:{},defines:{},modules:{},ops:[],wxs_nf_init:undefined,total_ops:0}; var __vd_version_info__=__vd_version_info__||{};");const m=Date.now(),d=await s.transWXMLToJS(e,{app:!0});l.push(d.code);const u=Date.now()-m;(0,a.BusinessReport)("pageframeCompile","wxml compiled",JSON.stringify({options:c,duration:u,codeLength:null===(i=d.code)||void 0===i?void 0:i.length}));const g=Date.now(),w=await r.transWXSSToJS(e,{app:!0});l.push((0,o.wrapCodeByEval)(w.comm));const v=Date.now()-g;(0,a.BusinessReport)("pageframeCompile","wxss compiled",JSON.stringify({options:c,duration:v,codeLength:null===(p=w.comm)||void 0===p?void 0:p.length}));const f=Date.now(),h=await(0,n.getPageFrameWxAppCode)(e,{app:!0,noJson:!0});l.push(`;(window.eval || __global.__hackEval)(\`${h}\`)`);const y=Date.now()-f;(0,a.BusinessReport)("pageframeCompile","wxappcode generated",JSON.stringify({options:c,duration:y,codeLength:null==h?void 0:h.length})),l.push(";__mainPageFrameReady__() ;var __pageFrameEndTime__ = Date.now()"),t||l.push("<\/script> </head> <body> <div></div> </body> </html>");const x=Date.now()-_;return(0,a.BusinessReport)("pageframeCompile","compile success",JSON.stringify({options:c,totalDuration:x,scriptCount:l.length,totalLength:l.join("").length})),l.join("\n\n")}catch(e){const t=Date.now()-_;throw(0,a.BusinessReport)("pageframeCompile","compile failed",JSON.stringify({options:c,duration:t,error:e instanceof Error?e.message:String(e)})),e}}exports.pageframePipe={name:i.EPipeCMD.PAGEFRAME,async execute(e,t){const{isMultiPkg:o=!1}=t||{};return await p(e,o)}}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getInitJS=getInitJS,exports.getJSCodeBuild=getJSCodeBuild,exports.getBabelCodeByName=getBabelCodeByName,exports.getBabelHelperAndDepsCode=getBabelHelperAndDepsCode,exports.getAppCode=getAppCode;const tslib_1=require("tslib"),taskmanager_1=tslib_1.__importDefault(require("../../../../../../../utils/taskmanager")),tools_1=require("../../../../../../../build-server/tasks/common/utils/common/tools"),babelhelpers_1=require("../../../../../../../build-server/tasks/common/utils/babel/babelhelpers"),concat=require("licia/concat"),isEmpty=require("licia/isEmpty"),unique=require("licia/unique"),weappConfig=require("../../../../../../../build-server/tasks/common/weapp.config"),getJsFile=require("../appservice/getjsfile"),appserviceGetwxappcode=require("../appservice/getwxappcode");function getInitJS(e){e.push('\n var __wxAppData = __wxAppData || {};\n var __wxRoute = __wxRoute || "";\n var __wxRouteBegin = __wxRouteBegin || "";\n var __wxAppCode__ = __wxAppCode__ || {};\n var global = global || {};\n var __WXML_GLOBAL__=__WXML_GLOBAL__ || {};\n var __wxAppCurrentFile__=__wxAppCurrentFile__||"";\n var Component = Component || function(){};\n var definePlugin = definePlugin || function(){};\n var requirePlugin = requirePlugin || function(){};\n var Behavior = Behavior || function(){};\n var __vd_version_info__ = __vd_version_info__ || {};\n ')}async function getJSCodeBuild(e,n,r,t,o,a,i,p){const s=p.map((e=>`${e}.js`)),l=await Promise.all(s.map((n=>getJsFile(e,n,{}))));let u=[],_=[l.map((e=>(e.helpers&&(u=concat(u,e.helpers)),e.code))).join("\n")];const c=await getBabelHelperAndDepsCode(e,u);_=concat(Array.from(c.values()),_),n.push(_.join("\n")),r&&n.push("\n try {\n require(\"app.js\")\n } catch (error) {\n !error.from && console.error('app.js错误:\\n',error)\n throw error\n }")}async function getBabelCodeByName(e,n){return wrapFN(`${n}.js`,await(0,babelhelpers_1.getHelperContent)(e.project.setting,n))}async function getBabelHelperAndDepsCode(e,n){if(!isEmpty(n)){n=unique(n);const r=(0,babelhelpers_1.getHelperDeps)(e.project,new Set(n)),t=new Map;for(const n of r){const r=await getBabelCodeByName(e,n);t.set(n,r)}return t}return new Map}async function getAppCode(e,n,r,t,o){const a=new taskmanager_1.default;for(const i of t.concat(o)){const t=async function(){n.push(await appserviceGetwxappcode.getWxAppCodeOfPage(e,i,r.name))};a.addTask(t)}await a.runAllAsync()}function wrapFN(e,n){return`define("${(0,tools_1.escapeQuot)(e,'"')}", function(require, module, exports, ${weappConfig.NO_BOM_VAR.join(",")}){ ${n} \n})`}
1
+ !function(e,n){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getInitJS=function(e){e.push('\n var __wxAppData = __wxAppData || {};\n var __wxRoute = __wxRoute || "";\n var __wxRouteBegin = __wxRouteBegin || "";\n var __wxAppCode__ = __wxAppCode__ || {};\n var global = global || {};\n var __WXML_GLOBAL__=__WXML_GLOBAL__ || {};\n var __wxAppCurrentFile__=__wxAppCurrentFile__||"";\n var Component = Component || function(){};\n var definePlugin = definePlugin || function(){};\n var requirePlugin = requirePlugin || function(){};\n var Behavior = Behavior || function(){};\n var __vd_version_info__ = __vd_version_info__ || {};\n ')},exports.getJSCodeBuild=async function(e,n,r,o,t,i,s,p){const _=p.map((e=>`${e}.js`)),c=await Promise.all(_.map((n=>u(e,n,{}))));let f=[],d=[c.map((e=>(e.helpers&&(f=a(f,e.helpers)),e.code))).join("\n")];const v=await l(e,f);d=a(Array.from(v.values()),d),n.push(d.join("\n")),r&&n.push("\n try {\n require(\"app.js\")\n } catch (error) {\n !error.from && console.error('app.js错误:\\n',error)\n throw error\n }")},exports.getBabelCodeByName=c,exports.getBabelHelperAndDepsCode=l,exports.getAppCode=async function(e,n,o,t,a){const i=new r.default;for(const r of t.concat(a)){const t=async function(){n.push(await _.getWxAppCodeOfPage(e,r,o.name))};i.addTask(t)}await i.runAllAsync()};const r=e("tslib").__importDefault(e("../../../../../../../utils/taskmanager")),o=e("../../../../../../../build-server/tasks/common/utils/common/tools"),t=e("../../../../../../../build-server/tasks/common/utils/babel/babelhelpers"),a=e("licia/concat"),i=e("licia/isEmpty"),s=e("licia/unique"),p=e("../../../../../../../build-server/tasks/common/weapp.config"),u=e("../appservice/getjsfile"),_=e("../appservice/getwxappcode");async function c(e,n){return function(e,n){return`define("${(0,o.escapeQuot)(e,'"')}", function(require, module, exports, ${p.NO_BOM_VAR.join(",")}){ ${n} \n})`}(`${n}.js`,await(0,t.getHelperContent)(e.project.setting,n))}async function l(e,n){if(!i(n)){n=s(n);const r=(0,t.getHelperDeps)(e.project,new Set(n)),o=new Map;for(const n of r){const r=await c(e,n);o.set(n,r)}return o}return new Map}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPageFrameWxAppCode=getPageFrameWxAppCode;const customComponent=require("../project/customcomponent"),appConfigHelper=require("../project/appconfig"),transwxsstojs=require("../trans/transwxsstojs");async function getWxAppCodeWxmlOfPage(e,t){const o=[],p=encodeURI(e);return o.push(`__wxAppCode__[decodeURI("${p}") + ".wxml"]=${t}("./" + decodeURI("${p}") + ".wxml")`),o}async function getWxAppCodeWxssOfPage(e,t){const o=[],p=await transwxsstojs.transWXSSToJS(e,{page:t});if(p.page){const e=encodeURI(t);o.push(`__wxAppCode__[decodeURI("${e}") + ".wxss"]=${p.page}`)}return o}async function getPageFrameWxAppCode(e,t={}){const o=await appConfigHelper.getAppConfig(e),{app:p,page:s}=t;let n;if(!p&&(n=void 0,!n))return"";const a=await customComponent.getFileListJustInPack(e,o,n),r=[];for(let o=0,p=a.length;o<p;o++){const p=await getWxAppCodeWxmlOfPage(a[o],"$gwx");if(r.push(...p),!t.noWXSS){const t=await getWxAppCodeWxssOfPage(e,a[o]);r.push(...t)}}return r.join("\n")}
1
+ !function(e,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPageFrameWxAppCode=async function(e,t={}){const s=await o.getAppConfig(e),{app:p,page:r}=t;let i;if(!p&&(i=void 0,!i))return"";const u=await n.getFileListJustInPack(e,s,i),d=[];for(let n=0,o=u.length;n<o;n++){const o=await c(u[n],"$gwx");if(d.push(...o),!t.noWXSS){const t=await a(e,u[n]);d.push(...t)}}return d.join("\n")};const n=e("../project/customcomponent"),o=e("../project/appconfig"),s=e("../trans/transwxsstojs");async function c(e,t){const n=[],o=encodeURI(e);return n.push(`__wxAppCode__[decodeURI("${o}") + ".wxml"]=${t}("./" + decodeURI("${o}") + ".wxml")`),n}async function a(e,t){const n=[],o=await s.transWXSSToJS(e,{page:t});if(o.page){const e=encodeURI(t);n.push(`__wxAppCode__[decodeURI("${e}") + ".wxss"]=${o.page}`)}return n}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";const babelhelpers_1=require("../../../../../../../build-server/tasks/common/utils/babel/babelhelpers"),transformsourcemap_1=require("../../../../../../../build-server/tasks/common/utils/transformsourcemap"),generatecode_utils_1=require("../../../../../../../build-server/tasks/common/utils/project/generatecode.utils"),fileRules=require("../../../../../../../build-server/tasks/common/utils/filerules"),_=require("lodash");function transformMap2(e){if(e)try{let t="string"==typeof e?JSON.parse(e):e;return t=Object.assign(Object.assign({},t),{mappings:`;${t.mappings}`,sources:(0,transformsourcemap_1.transformSourceMapSources)(t.sources)}),t}catch(e){}return""}function wrapDefine(e,t,s){const r=transformMap2(t.map||""),i=s.hideRules||[];let o=(0,generatecode_utils_1.wrapSourceCodeInDefine)(e,`\n${t.code}`);return o=(0,generatecode_utils_1.inlineSourceMap)(o,!fileRules.isFileHidedInDevtools(e,i)&&r||"",s.sourceURL),{code:o,map:r}}async function getRuntimeJS(e,t){var s,r,i;const o=e.project,n=("miniProgram"===t.type||"game"===t.type?o.miniprogramRoot:o.pluginRoot)||"",{fileName:l}=t,a=await(0,babelhelpers_1.tryGetHelperJSFile)(o,l,t.injectHelpersSync);if(a)return{code:a,helpers:[],customTranslated:!1,isBabelIgnore:!1,needCompile:!1,isLargeFile:!1};const c=(0,babelhelpers_1.getHelperOutputPath)(o.setting),u=await e.callCompiler("compileJS",{root:n,filePath:l,babelRoot:c,setting:{enhance:null===(s=o.setting)||void 0===s?void 0:s.enhance,es6:null===(r=o.setting)||void 0===r?void 0:r.es6,minify:!1,disableUseStrict:!!o.setting.disableUseStrict,compileWorklet:!!o.setting.compileWorklet},resultType:"dev"}),p=wrapDefine(l,u,{hideRules:(null===(i=o.debugOptions)||void 0===i?void 0:i.hidedInDevtools)||[],sourceURL:t.sourceURL});return _.cloneDeep(Object.assign(Object.assign(Object.assign({},u),p),{helpers:u.helpers||[]}))}async function getJsFile(e,t,s={injectHelpers:!0}){t=decodeURI(t);const r=await getRuntimeJS(e,{type:"miniProgram",fileName:t});return{code:r.code,helpers:r.helpers,map:r.map,mtime:r.mtime}}module.exports=getJsFile;
1
+ !function(e,t){"use strict";const i=e("../../../../../../../build-server/tasks/common/utils/babel/babelhelpers"),s=e("../../../../../../../build-server/tasks/common/utils/transformsourcemap"),r=e("../../../../../../../build-server/tasks/common/utils/project/generatecode.utils"),o=e("../../../../../../../build-server/tasks/common/utils/filerules"),n=e("lodash");function l(e,t,i){const n=function(e){if(e)try{let t="string"==typeof e?JSON.parse(e):e;return t=Object.assign(Object.assign({},t),{mappings:`;${t.mappings}`,sources:(0,s.transformSourceMapSources)(t.sources)}),t}catch(e){}return""}(t.map||""),l=i.hideRules||[];let c=(0,r.wrapSourceCodeInDefine)(e,`\n${t.code}`);return c=(0,r.inlineSourceMap)(c,!o.isFileHidedInDevtools(e,l)&&n||"",i.sourceURL),{code:c,map:n}}module.exports=async function(e,t,s={injectHelpers:!0}){t=decodeURI(t);const r=await async function(e,t){var s,r,o;const c=e.project,a=("miniProgram"===t.type||"game"===t.type?c.miniprogramRoot:c.pluginRoot)||"",{fileName:u}=t,p=await(0,i.tryGetHelperJSFile)(c,u,t.injectHelpersSync);if(p)return{code:p,helpers:[],customTranslated:!1,isBabelIgnore:!1,needCompile:!1,isLargeFile:!1};const m=(0,i.getHelperOutputPath)(c.setting),d=await e.callCompiler("compileJS",{root:a,filePath:u,babelRoot:m,setting:{enhance:null===(s=c.setting)||void 0===s?void 0:s.enhance,es6:null===(r=c.setting)||void 0===r?void 0:r.es6,minify:!1,disableUseStrict:!!c.setting.disableUseStrict,compileWorklet:!!c.setting.compileWorklet},resultType:"dev"}),g=l(u,d,{hideRules:(null===(o=c.debugOptions)||void 0===o?void 0:o.hidedInDevtools)||[],sourceURL:t.sourceURL});return n.cloneDeep(Object.assign(Object.assign(Object.assign({},d),g),{helpers:d.helpers||[]}))}(e,{type:"miniProgram",fileName:t});return{code:r.code,helpers:r.helpers,map:r.map,mtime:r.mtime}}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";const tslib_1=require("tslib"),compile_1=tslib_1.__importDefault(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),appConfigHelper=require("../project/appconfig"),getMainPkgSortedJSFiles=async e=>{let t=await compile_1.default.get("getMainPkgSortedJSFiles");if(t)return reporter_1.compileCacheReporter.hitCache("getMainPkgSortedJSFiles"),t;reporter_1.compileCacheReporter.startGenCache("getMainPkgSortedJSFiles");const i=await appConfigHelper.getAppConfig(e),r=await e.callCompiler("getMainPkgSortedJSFiles");if(i.functionalPages){const e=r.functionalPageFiles.map((e=>`__wx__/${e}`));e.unshift("__wx__/functional-page"),r.functionalPageFiles=e}return t=r,await compile_1.default.set("getMainPkgSortedJSFiles",t),reporter_1.compileCacheReporter.finishGenCache("getMainPkgSortedJSFiles"),t};module.exports=getMainPkgSortedJSFiles;
1
+ !function(e,t){"use strict";const i=e("tslib").__importDefault(e("../../../../../../../build-server/tasks/common/utils/cache/compile")),a=e("../../../../../../../build-server/tasks/common/utils/cache/reporter"),r=e("../project/appconfig");module.exports=async e=>{let t=await i.default.get("getMainPkgSortedJSFiles");if(t)return a.compileCacheReporter.hitCache("getMainPkgSortedJSFiles"),t;a.compileCacheReporter.startGenCache("getMainPkgSortedJSFiles");const o=await r.getAppConfig(e),l=await e.callCompiler("getMainPkgSortedJSFiles");if(o.functionalPages){const e=l.functionalPageFiles.map((e=>`__wx__/${e}`));e.unshift("__wx__/functional-page"),l.functionalPageFiles=e}return t=l,await i.default.set("getMainPkgSortedJSFiles",t),a.compileCacheReporter.finishGenCache("getMainPkgSortedJSFiles"),t}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";const tslib_1=require("tslib"),taskmanager_1=tslib_1.__importDefault(require("../../../../../../../utils/taskmanager")),tools_1=require("../../../../../../../build-server/tasks/common/utils/common/tools"),compile_1=tslib_1.__importStar(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),getWxAppCodeJSON=require("../project/wxappcodejson"),customComponent=require("../project/customcomponent");async function getWxAppCode(e,r=!0){let o=await compile_1.default.get(compile_1.CacheKey.miniProgramAppServiceWXAppCode);if(o)return reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramAppServiceWXAppCode),o;reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramAppServiceWXAppCode);const t=await(await Promise.resolve().then((()=>tslib_1.__importStar(require("../project/appconfig"))))).getAppConfig(e),p=await customComponent.getFileListJustInPack(e,t),a=[],i=new taskmanager_1.default;for(const o of p)i.addTask(getWxAppCodeOfPage,e,o,"$gwx",r);return a.push(...await i.runAllAsync()),o=(0,tools_1.escapeScript)(a.join("\n")),await compile_1.default.set(compile_1.CacheKey.miniProgramAppServiceWXAppCode,o),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramAppServiceWXAppCode),o}async function getWxAppCodeOfPage(e,r,o,t=!0){let p={};try{p=await getWxAppCodeJSON(e,decodeURI(r))}catch(e){p={}}let a=`\n var decodePathName = decodeURI("${(0,tools_1.escapeQuot)(r,'"')}")\n __wxAppCode__[decodePathName + ".json"] = ${JSON.stringify(p)}\n __wxAppCode__[decodePathName + ".wxml"] = ${o}("./" + decodePathName + ".wxml")\n `;return t&&(a+="\n __wxRoute = decodePathName\n __wxRouteBegin = true\n __wxAppCurrentFile__ = decodePathName + \".js\"\n try {\n require(__wxAppCurrentFile__)\n } catch (error) {\n // 插件项目不能hack define和require,走这里,异常只能精准到页面,内部的多层依赖的报错无法精准\n !error.from && console.error('页面【' + decodePathName + ']错误:\\n',error)\n throw error\n }"),a}module.exports={getWxAppCode:getWxAppCode,getWxAppCodeOfPage:getWxAppCodeOfPage};
1
+ !function(e,r){"use strict";const t=e("tslib"),o=t.__importDefault(e("../../../../../../../utils/taskmanager")),a=e("../../../../../../../build-server/tasks/common/utils/common/tools"),c=t.__importStar(e("../../../../../../../build-server/tasks/common/utils/cache/compile")),i=e("../../../../../../../build-server/tasks/common/utils/cache/reporter"),n=e("../project/wxappcodejson"),p=e("../project/customcomponent");async function s(e,r,t,o=!0){let c={};try{c=await n(e,decodeURI(r))}catch(e){c={}}let i=`\n var decodePathName = decodeURI("${(0,a.escapeQuot)(r,'"')}")\n __wxAppCode__[decodePathName + ".json"] = ${JSON.stringify(c)}\n __wxAppCode__[decodePathName + ".wxml"] = ${t}("./" + decodePathName + ".wxml")\n `;return o&&(i+="\n __wxRoute = decodePathName\n __wxRouteBegin = true\n __wxAppCurrentFile__ = decodePathName + \".js\"\n try {\n require(__wxAppCurrentFile__)\n } catch (error) {\n // 插件项目不能hack define和require,走这里,异常只能精准到页面,内部的多层依赖的报错无法精准\n !error.from && console.error('页面【' + decodePathName + ']错误:\\n',error)\n throw error\n }"),i}module.exports={getWxAppCode:async function(r,n=!0){let m=await c.default.get(c.CacheKey.miniProgramAppServiceWXAppCode);if(m)return i.compileCacheReporter.hitCache(c.CacheKey.miniProgramAppServiceWXAppCode),m;i.compileCacheReporter.startGenCache(c.CacheKey.miniProgramAppServiceWXAppCode);const d=await(await Promise.resolve().then((()=>t.__importStar(e("../project/appconfig"))))).getAppConfig(r),u=await p.getFileListJustInPack(r,d),l=[],h=new o.default;for(const e of u)h.addTask(s,r,e,"$gwx",n);return l.push(...await h.runAllAsync()),m=(0,a.escapeScript)(l.join("\n")),await c.default.set(c.CacheKey.miniProgramAppServiceWXAppCode,m),i.compileCacheReporter.finishGenCache(c.CacheKey.miniProgramAppServiceWXAppCode),m},getWxAppCodeOfPage:s}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";const appErrCode={APP_JSON_READ_ERR:10001,APP_JSON_PARSE_ERR:10002,APP_JSON_PAGES_ERR:10003,APP_JSON_ENTRANCE_NOT_FOUND_ERR:1004,APP_JSON_CONTENT_ERR:10005,PAGES_JSON_PARSE_ERR:10006,APP_JSON_WXML_NOT_FOUND:10007,APP_JSON_JS_NOT_FOUND:10008,JSON_CONTENT_ERR:10009,EXT_JSON_PARSE_ERR:10011,EXT_JSON_PAGES_ERR:10012,EXT_JSON_CONTENT_ERR:10013,APPSERVICE_LOSE_WXML:10021,APPSERVICE_LOSE_JS:10022,FILE_NOT_UTF8:10031,BABEL_TRANS_JS_ERR:10032,UGLIFY_JS_ERR:10033,BABILI_JS_ERR:10034,JS_ES6_ERR:10035,FILE_FLAT_ERR:10036,POST_WXSS_ERR:10037,TRANS_WXML_JS_ERR:10040,TRANS_WXSS_JS_ERR:10041,SUMMER_PLUGIN_ERR:10045,SUMMER_PLUGIN_CODE_ERR:10046,VENDOR_MD5_NOT_MATCH:10050,VENDOR_WCC_FILE_NOT_FOUND:10051,VENDOR_WCSC_FILE_NOT_FOUND:10052,CODE_SIZE_EXCEED:10060,GET_GEO_LOCATION_ERR:10070,QCLOUD_SVR_NO_FOUND_ERR:10080,QCLOUD_SVR_POLL_TIMEOUT:10081,QCLOUD_SVR_POLL_DOING:10082,QCLOUD_SVR_UP_DIR_CHECK:10083,PLUGIN_JSON_READ_ERR:10091,PLUGIN_JSON_PARSE_ERR:10092,PLUGIN_JSON_CONTENT_ERR:10093,PLUGIN_PAGE_JSON_PARSE_ERR:10094,PLUGIN_JSON_FILE_NOT_FOUND:10095,PLUGIN_PAGE_JSON_CONTENT_ERR:10096,PLUGIN_TRANS_WXML_JS_ERR:10097,PLUGIN_TRANS_WXSS_JS_ERR:10101,PLUGIN_JS_ES6_ERR:10098,PLUGIN_ONLINE_CODE_UNPACK_ERR:10099,PAGE_JSON_PARSE_ERR:10020,SITE_MAP_JSON_CONTENT_ERROR:10100,CHECK_UPLOAD_STATUS_ERR:10200,CLEAR_SESSION_ERR:10201,GAME_CODE_LIB_MD5_ERR:10202,LOAD_QRCODE_OTHER_ERR:10203,JUMP_QCLOUD_PAGE_ERR:10204,PACK_NPM_ERR:10205,GET_PROJECT_CONFIG_ERR:10206,MINI_PROGRAM_CONSUME_TIMING:10207,MINI_GAME_CONSUME_TIMING:10208,UPLOAD_PROGRESS_FAIIL:10209,UPLOAD_PLUGIN_ERR:10210,UPLOAD_FAIILED:10211,COMPILE_CONDITION_APPID_ERR:10212,COMPILE_CONDITION_PROGRAM_ERR:10213,COMPILE_CONDITION_ERR:10214,COMPILE_CONDITION_ERR_WITH_DETAIL:10215,WIDGET_GET_SEARCH_QUERY_ERROR:10216,QCLOUD_CHOOSE_ENVIRONMENT_ERROR:10217,QCLOUD_UPLOAD_FAIL:10218,TOOLBAR_REMOTE_DEBUG_ERROR:10219,PREPROCESS_UPLOAD_ERROR:10220,DOWNLOAD_SOURCEMAP_ERROR:10221,SOURCEMAP_WRITE_ERROR:10222,CLEAN_USER_AUTH_ERROR:10223,JUMP_WXGIT_ERROR:10224,TCB_DELETE_FAILED:10225,FETCH_REMOTE_SETTING_ERROR:10226,UPLOAD_LOCAL_SETTING_ERROR:10227,UPLOAD_SOURCE_CODE_ERROR:10228,UPLOAD_EXCEED_SIZE_LIMIT:10230,PROJECT_CONFIG_JSON_ERROR:10231,TEST_CODE_RUN_ERROR:10232,AUTO_UPLOAD_ERROR:10233,CLOUD_UPLOAD_OPEN_ERROR:10234,CLOUD_BUILD_OPEN_ERROR:10201,WEBVIEW_NETWORK_ERROR:20010,APPSERVICE_NETWORK_ERROR:20011,PLUGIN_ERROR:20012,ONLINE_CODE_UNPACK_ERR:3e4,URL_SCHEME_INVALID_ERROR:31e3,URL_SCHEME_OTHER_ERROR:31001,APP_UPGRADE_ERROR:35e3,APP_ADD_AUTHO_PAGE_ERROR:35001};module.exports=appErrCode;
1
+ !function(_,R){"use strict";module.exports={APP_JSON_READ_ERR:10001,APP_JSON_PARSE_ERR:10002,APP_JSON_PAGES_ERR:10003,APP_JSON_ENTRANCE_NOT_FOUND_ERR:1004,APP_JSON_CONTENT_ERR:10005,PAGES_JSON_PARSE_ERR:10006,APP_JSON_WXML_NOT_FOUND:10007,APP_JSON_JS_NOT_FOUND:10008,JSON_CONTENT_ERR:10009,EXT_JSON_PARSE_ERR:10011,EXT_JSON_PAGES_ERR:10012,EXT_JSON_CONTENT_ERR:10013,APPSERVICE_LOSE_WXML:10021,APPSERVICE_LOSE_JS:10022,FILE_NOT_UTF8:10031,BABEL_TRANS_JS_ERR:10032,UGLIFY_JS_ERR:10033,BABILI_JS_ERR:10034,JS_ES6_ERR:10035,FILE_FLAT_ERR:10036,POST_WXSS_ERR:10037,TRANS_WXML_JS_ERR:10040,TRANS_WXSS_JS_ERR:10041,SUMMER_PLUGIN_ERR:10045,SUMMER_PLUGIN_CODE_ERR:10046,VENDOR_MD5_NOT_MATCH:10050,VENDOR_WCC_FILE_NOT_FOUND:10051,VENDOR_WCSC_FILE_NOT_FOUND:10052,CODE_SIZE_EXCEED:10060,GET_GEO_LOCATION_ERR:10070,QCLOUD_SVR_NO_FOUND_ERR:10080,QCLOUD_SVR_POLL_TIMEOUT:10081,QCLOUD_SVR_POLL_DOING:10082,QCLOUD_SVR_UP_DIR_CHECK:10083,PLUGIN_JSON_READ_ERR:10091,PLUGIN_JSON_PARSE_ERR:10092,PLUGIN_JSON_CONTENT_ERR:10093,PLUGIN_PAGE_JSON_PARSE_ERR:10094,PLUGIN_JSON_FILE_NOT_FOUND:10095,PLUGIN_PAGE_JSON_CONTENT_ERR:10096,PLUGIN_TRANS_WXML_JS_ERR:10097,PLUGIN_TRANS_WXSS_JS_ERR:10101,PLUGIN_JS_ES6_ERR:10098,PLUGIN_ONLINE_CODE_UNPACK_ERR:10099,PAGE_JSON_PARSE_ERR:10020,SITE_MAP_JSON_CONTENT_ERROR:10100,CHECK_UPLOAD_STATUS_ERR:10200,CLEAR_SESSION_ERR:10201,GAME_CODE_LIB_MD5_ERR:10202,LOAD_QRCODE_OTHER_ERR:10203,JUMP_QCLOUD_PAGE_ERR:10204,PACK_NPM_ERR:10205,GET_PROJECT_CONFIG_ERR:10206,MINI_PROGRAM_CONSUME_TIMING:10207,MINI_GAME_CONSUME_TIMING:10208,UPLOAD_PROGRESS_FAIIL:10209,UPLOAD_PLUGIN_ERR:10210,UPLOAD_FAIILED:10211,COMPILE_CONDITION_APPID_ERR:10212,COMPILE_CONDITION_PROGRAM_ERR:10213,COMPILE_CONDITION_ERR:10214,COMPILE_CONDITION_ERR_WITH_DETAIL:10215,WIDGET_GET_SEARCH_QUERY_ERROR:10216,QCLOUD_CHOOSE_ENVIRONMENT_ERROR:10217,QCLOUD_UPLOAD_FAIL:10218,TOOLBAR_REMOTE_DEBUG_ERROR:10219,PREPROCESS_UPLOAD_ERROR:10220,DOWNLOAD_SOURCEMAP_ERROR:10221,SOURCEMAP_WRITE_ERROR:10222,CLEAN_USER_AUTH_ERROR:10223,JUMP_WXGIT_ERROR:10224,TCB_DELETE_FAILED:10225,FETCH_REMOTE_SETTING_ERROR:10226,UPLOAD_LOCAL_SETTING_ERROR:10227,UPLOAD_SOURCE_CODE_ERROR:10228,UPLOAD_EXCEED_SIZE_LIMIT:10230,PROJECT_CONFIG_JSON_ERROR:10231,TEST_CODE_RUN_ERROR:10232,AUTO_UPLOAD_ERROR:10233,CLOUD_UPLOAD_OPEN_ERROR:10234,CLOUD_BUILD_OPEN_ERROR:10201,WEBVIEW_NETWORK_ERROR:20010,APPSERVICE_NETWORK_ERROR:20011,PLUGIN_ERROR:20012,ONLINE_CODE_UNPACK_ERR:3e4,URL_SCHEME_INVALID_ERROR:31e3,URL_SCHEME_OTHER_ERROR:31001,APP_UPGRADE_ERROR:35e3,APP_ADD_AUTHO_PAGE_ERROR:35001}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";function wrapCodeByEval(e){return`;(window.eval || __global.__hackEval)('${e}')`}Object.defineProperty(exports,"__esModule",{value:!0}),exports.wrapCodeByEval=wrapCodeByEval;
1
+ !function(e,r){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.wrapCodeByEval=function(e){return`;(window.eval || __global.__hackEval)('${e}')`}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";const tslib_1=require("tslib"),storeService_1=require("../../../../../../../services/store/common/storeService"),getservice_1=tslib_1.__importDefault(require("../../../../../../../services/common/getservice")),tools_1=require("../../../../../../../build-server/tasks/common/utils/common/tools"),compile_1=tslib_1.__importStar(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),theme_1=require("./helper/theme"),monitor_1=require("../../../../../../../bussinessMonitor/monitor"),path=require("path"),getCompiledAppJSON=require("./appjson"),getCompiledPageJSON=require("./pagejson");async function mergeThemeJSON(e){var o;const{project:i,isDarkMode:t,themeLocation:a,themeJSON:r,appConfig:n}=e,s=path.join(i.projectpath,i.miniprogramRoot||""),{windowConfigRules:c,tabbarRules:p,tabbarListItemRules:l}=(0,theme_1.checkThemeRules)(s,i);(0,theme_1.checkVariables)({isDarkMode:t,themeLocation:a,themeJSON:r,filePath:"app.json or ext.json",windowConfig:n.global.window,rules:c,keyPrefix:'["window"]',isPlugin:!1});for(const e in n.page){const o=e.replace(/\.html$/,"");(0,theme_1.checkVariables)({isDarkMode:t,themeLocation:a,themeJSON:r,filePath:`${o}.json`,windowConfig:n.page[e].window||{},rules:c,keyPrefix:"",isPlugin:!1})}if(n.tabBar){(0,theme_1.checkVariables)({isDarkMode:t,themeLocation:a,themeJSON:r,filePath:"app.json or ext.json",windowConfig:n.tabBar||{},rules:p,keyPrefix:'["tabBar"]',isPlugin:!1});for(let e=0;e<(null===(o=n.tabBar)||void 0===o?void 0:o.list.length);e++)(0,theme_1.checkVariables)({isDarkMode:t,themeLocation:a,themeJSON:r,filePath:"app.json or ext.json",windowConfig:n.tabBar.list[e],rules:l,keyPrefix:`["tabBar"]["list"][${e}]`,isPlugin:!1})}}function getAppConfigJSON(e,o){const i=e.subPackages||e.subpackages;return Object.assign(Object.assign({},e),{pages:e.pages||[],resizable:!!e.resizable,subPackages:i,debug:!!e.debug,widgets:e.widgets||[],customClose:!!e.customClose,workers:e.workers||"",cloud:!!e.cloud,global:{window:Object.assign(Object.assign({},(0,theme_1.getDefaultWindowConfig)(e.darkmode&&o)),e.window)},page:{},networkTimeout:Object.assign({request:6e4,uploadFile:6e4,connectSocket:6e4,downloadFile:6e4},e.networkTimeout),ext:e.ext||{},extAppid:e.extAppid||"",plugins:e.plugins||{},mainPlugins:Object.assign({},e.plugins),preloadRule:e.preloadRule,permission:e.permission,requiredBackgroundModes:e.requiredBackgroundModes,functionalPages:e.functionalPages,style:e.style,useExtendedLib:e.useExtendedLib||{},supportedMaterials:e.supportedMaterials||[],usingShopPlugin:e.usingShopPlugin||void 0,embeddedAppIdList:e.embeddedAppIdList,halfPage:e.halfPage,resolveAlias:e.resolveAlias,renderer:e.renderer,enablePassiveEvent:e.enablePassiveEvent,debugOptions:e.debugOptions,requiredPrivateInfos:e.requiredPrivateInfos||[],__warning__:e.__warning__||""})}async function checkAppConfig(e,o){const i=await getCompiledAppJSON(e),t=getAppConfigJSON(i,o),a=(e,o)=>{o.__warning__&&(t.__warning__&&(t.__warning__+="\n"),t.__warning__+=`${e}: ${o.__warning__}`)},r=t.pages;t.entryPagePath=i.entryPagePath?`${i.entryPagePath}.html`:`${r[0]}.html`;for(const o of r){const i=await getCompiledPageJSON(e,`${o}`)||{};a(o,i);const{singlePage:r}=i,n=tslib_1.__rest(i,["singlePage"]);t.page[`${o}.html`]={window:n||{},singlePage:r,renderer:i.renderer}}if(t.accountCardPackage)for(const e of t.accountCardPackage.cardList){const o=path.posix.join(t.accountCardPackage.root,e.componentPath);t.page[`${o}.html`]={window:{}}}t.page=Object.assign({},t.page);const n=Object.assign({},i.tabBar),s=[].concat(n.list||[]),c=[];for(const e of s){const o=Object.assign({},e);o.pagePath+=".html",c.push(o)}n.list=c,t.tabBar=n,i.darkmode&&(t.supportDarkmode=!0),t.lazyCodeLoading=i.lazyCodeLoading;t.publibSupportLazyload=false,t.isLazyLoad=!1;let p={};const{themeLocation:l}=i;return void 0!==l&&""!==l.trim().replace(/^\.\//,"")&&(p=await e.callCompiler("checkThemeJSON",{themeLocation:l})),await mergeThemeJSON({project:e.project,themeJSON:p,themeLocation:l,isDarkMode:i.darkmode&&o,appConfig:t}),t}async function checkLightAppConfig(e){var o,i;const t=(await(null===(i=(o=e.project).attr)||void 0===i?void 0:i.call(o))).platform;let a=await compile_1.default.get(compile_1.CacheKey.miniProgramAppConfig);if((null==a?void 0:a.value)&&a.platform===t)reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramAppConfig);else{reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramAppConfig);const o=await checkAppConfig(e,!1);a={platform:t,value:(0,tools_1.makeDeepReadonly)(o)},await compile_1.default.set(compile_1.CacheKey.miniProgramAppConfig,a),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramAppConfig)}return a.value}async function checkDarkmodeAppConfig(e){var o,i;const t=(await(null===(i=(o=e.project).attr)||void 0===i?void 0:i.call(o))).platform;let a=await compile_1.default.get(compile_1.CacheKey.miniProgramAppConfigDarkMode);if((null==a?void 0:a.value)&&a.platform===t)reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramAppConfigDarkMode);else{reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramAppConfigDarkMode);const o=await checkAppConfig(e,!0);a={platform:t,value:(0,tools_1.makeDeepReadonly)(o)},await compile_1.default.set(compile_1.CacheKey.miniProgramAppConfigDarkMode,a),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramAppConfigDarkMode)}return a.value}async function getAppConfig(e,o=!1){var i,t;const a=Date.now(),r=e.project.projectContext;(0,monitor_1.BusinessReport)("appconfig","getAppConfig start",JSON.stringify({options:r,forceDarkMode:o}));try{let n;const s=e.project.backendProjectContext;let c;n=s?s.compileOptions.deviceState.darkmode||!1:await(0,getservice_1.default)(storeService_1.IStoreService).getValue("toolbar","darkmode")||!1,c=n||o?await checkDarkmodeAppConfig(e):await checkLightAppConfig(e);const p=Date.now()-a;return(0,monitor_1.BusinessReport)("appconfig","getAppConfig success",JSON.stringify({options:r,duration:p,pageCount:(null===(i=c.pages)||void 0===i?void 0:i.length)||0,subPackageCount:(null===(t=c.subPackages||c.subpackages)||void 0===t?void 0:t.length)||0,hasDarkMode:!!n||o})),c}catch(e){const o=Date.now()-a;throw(0,monitor_1.BusinessReport)("appconfig","getAppConfig failed",JSON.stringify({options:r,duration:o,error:e instanceof Error?e.message:String(e)})),e}}module.exports={getAppConfig:getAppConfig};
1
+ !function(e,a){"use strict";const o=e("tslib"),t=e("../../../../../../../services/store/common/storeService"),i=o.__importDefault(e("../../../../../../../services/common/getservice")),n=e("../../../../../../../build-server/tasks/common/utils/common/tools"),r=o.__importStar(e("../../../../../../../build-server/tasks/common/utils/cache/compile")),s=e("../../../../../../../build-server/tasks/common/utils/cache/reporter"),c=e("./helper/theme"),l=e("../../../../../../../bussinessMonitor/monitor"),p=e("path"),g=e("./appjson"),d=e("./pagejson");async function u(e,a){const t=await g(e),i=function(e,a){const o=e.subPackages||e.subpackages;return Object.assign(Object.assign({},e),{pages:e.pages||[],resizable:!!e.resizable,subPackages:o,debug:!!e.debug,widgets:e.widgets||[],customClose:!!e.customClose,workers:e.workers||"",cloud:!!e.cloud,global:{window:Object.assign(Object.assign({},(0,c.getDefaultWindowConfig)(e.darkmode&&a)),e.window)},page:{},networkTimeout:Object.assign({request:6e4,uploadFile:6e4,connectSocket:6e4,downloadFile:6e4},e.networkTimeout),ext:e.ext||{},extAppid:e.extAppid||"",plugins:e.plugins||{},mainPlugins:Object.assign({},e.plugins),preloadRule:e.preloadRule,permission:e.permission,requiredBackgroundModes:e.requiredBackgroundModes,functionalPages:e.functionalPages,style:e.style,useExtendedLib:e.useExtendedLib||{},supportedMaterials:e.supportedMaterials||[],usingShopPlugin:e.usingShopPlugin||void 0,embeddedAppIdList:e.embeddedAppIdList,halfPage:e.halfPage,resolveAlias:e.resolveAlias,renderer:e.renderer,enablePassiveEvent:e.enablePassiveEvent,debugOptions:e.debugOptions,requiredPrivateInfos:e.requiredPrivateInfos||[],__warning__:e.__warning__||""})}(t,a),n=(e,a)=>{a.__warning__&&(i.__warning__&&(i.__warning__+="\n"),i.__warning__+=`${e}: ${a.__warning__}`)},r=i.pages;i.entryPagePath=t.entryPagePath?`${t.entryPagePath}.html`:`${r[0]}.html`;for(const a of r){const t=await d(e,`${a}`)||{};n(a,t);const{singlePage:r}=t,s=o.__rest(t,["singlePage"]);i.page[`${a}.html`]={window:s||{},singlePage:r,renderer:t.renderer}}if(i.accountCardPackage)for(const e of i.accountCardPackage.cardList){const a=p.posix.join(i.accountCardPackage.root,e.componentPath);i.page[`${a}.html`]={window:{}}}i.page=Object.assign({},i.page);const s=Object.assign({},t.tabBar),l=[].concat(s.list||[]),u=[];for(const e of l){const a=Object.assign({},e);a.pagePath+=".html",u.push(a)}s.list=u,i.tabBar=s,t.darkmode&&(i.supportDarkmode=!0),i.lazyCodeLoading=t.lazyCodeLoading,i.publibSupportLazyload=!1,i.isLazyLoad=!1;let m={};const{themeLocation:h}=t;return void 0!==h&&""!==h.trim().replace(/^\.\//,"")&&(m=await e.callCompiler("checkThemeJSON",{themeLocation:h})),await async function(e){var a;const{project:o,isDarkMode:t,themeLocation:i,themeJSON:n,appConfig:r}=e,s=p.join(o.projectpath,o.miniprogramRoot||""),{windowConfigRules:l,tabbarRules:g,tabbarListItemRules:d}=(0,c.checkThemeRules)(s,o);(0,c.checkVariables)({isDarkMode:t,themeLocation:i,themeJSON:n,filePath:"app.json or ext.json",windowConfig:r.global.window,rules:l,keyPrefix:'["window"]',isPlugin:!1});for(const e in r.page){const a=e.replace(/\.html$/,"");(0,c.checkVariables)({isDarkMode:t,themeLocation:i,themeJSON:n,filePath:`${a}.json`,windowConfig:r.page[e].window||{},rules:l,keyPrefix:"",isPlugin:!1})}if(r.tabBar){(0,c.checkVariables)({isDarkMode:t,themeLocation:i,themeJSON:n,filePath:"app.json or ext.json",windowConfig:r.tabBar||{},rules:g,keyPrefix:'["tabBar"]',isPlugin:!1});for(let e=0;e<(null===(a=r.tabBar)||void 0===a?void 0:a.list.length);e++)(0,c.checkVariables)({isDarkMode:t,themeLocation:i,themeJSON:n,filePath:"app.json or ext.json",windowConfig:r.tabBar.list[e],rules:d,keyPrefix:`["tabBar"]["list"][${e}]`,isPlugin:!1})}}({project:e.project,themeJSON:m,themeLocation:h,isDarkMode:t.darkmode&&a,appConfig:i}),i}module.exports={getAppConfig:async function(e,a=!1){var o,c;const p=Date.now(),g=e.project.projectContext;(0,l.BusinessReport)("appconfig","getAppConfig start",JSON.stringify({options:g,forceDarkMode:a}));try{let d;const m=e.project.backendProjectContext;let h;d=m?m.compileOptions.deviceState.darkmode||!1:await(0,i.default)(t.IStoreService).getValue("toolbar","darkmode")||!1,h=d||a?await async function(e){var a,o;const t=(await(null===(o=(a=e.project).attr)||void 0===o?void 0:o.call(a))).platform;let i=await r.default.get(r.CacheKey.miniProgramAppConfigDarkMode);if((null==i?void 0:i.value)&&i.platform===t)s.compileCacheReporter.hitCache(r.CacheKey.miniProgramAppConfigDarkMode);else{s.compileCacheReporter.startGenCache(r.CacheKey.miniProgramAppConfigDarkMode);const a=await u(e,!0);i={platform:t,value:(0,n.makeDeepReadonly)(a)},await r.default.set(r.CacheKey.miniProgramAppConfigDarkMode,i),s.compileCacheReporter.finishGenCache(r.CacheKey.miniProgramAppConfigDarkMode)}return i.value}(e):await async function(e){var a,o;const t=(await(null===(o=(a=e.project).attr)||void 0===o?void 0:o.call(a))).platform;let i=await r.default.get(r.CacheKey.miniProgramAppConfig);if((null==i?void 0:i.value)&&i.platform===t)s.compileCacheReporter.hitCache(r.CacheKey.miniProgramAppConfig);else{s.compileCacheReporter.startGenCache(r.CacheKey.miniProgramAppConfig);const a=await u(e,!1);i={platform:t,value:(0,n.makeDeepReadonly)(a)},await r.default.set(r.CacheKey.miniProgramAppConfig,i),s.compileCacheReporter.finishGenCache(r.CacheKey.miniProgramAppConfig)}return i.value}(e);const f=Date.now()-p;return(0,l.BusinessReport)("appconfig","getAppConfig success",JSON.stringify({options:g,duration:f,pageCount:(null===(o=h.pages)||void 0===o?void 0:o.length)||0,subPackageCount:(null===(c=h.subPackages||h.subpackages)||void 0===c?void 0:c.length)||0,hasDarkMode:!!d||a})),h}catch(e){const a=Date.now()-p;throw(0,l.BusinessReport)("appconfig","getAppConfig failed",JSON.stringify({options:g,duration:a,error:e instanceof Error?e.message:String(e)})),e}}}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";const tslib_1=require("tslib"),compile_1=tslib_1.__importStar(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),getCompiledAppJSON=async e=>{let r=await compile_1.default.get(compile_1.CacheKey.miniProgramCompiledAppJSON);if(r)return reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramCompiledAppJSON),r;reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramCompiledAppJSON);try{r=await e.callCompiler("getAppJSON")}catch(e){throw e.message=`app.json ${e.message}`,e}return await compile_1.default.set(compile_1.CacheKey.miniProgramCompiledAppJSON,r),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramCompiledAppJSON),r};module.exports=getCompiledAppJSON;
1
+ !function(e,r){"use strict";const i=e("tslib").__importStar(e("../../../../../../../build-server/tasks/common/utils/cache/compile")),a=e("../../../../../../../build-server/tasks/common/utils/cache/reporter");module.exports=async e=>{let r=await i.default.get(i.CacheKey.miniProgramCompiledAppJSON);if(r)return a.compileCacheReporter.hitCache(i.CacheKey.miniProgramCompiledAppJSON),r;a.compileCacheReporter.startGenCache(i.CacheKey.miniProgramCompiledAppJSON);try{r=await e.callCompiler("getAppJSON")}catch(e){throw e.message=`app.json ${e.message}`,e}return await i.default.set(i.CacheKey.miniProgramCompiledAppJSON,r),a.compileCacheReporter.finishGenCache(i.CacheKey.miniProgramCompiledAppJSON),r}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";const processPath_1=require("../web/processPath"),path=require("path"),friendlyPathMake=(o,t)=>path.posix.normalize(path.join(o,t).replace(/^\/+/,"")).replace(/\\/g,"/"),trailing=(o,t)=>o.endsWith(t)?o:o+t,unifyPath=o=>o.replace(/\\/g,"/"),findSubpackageForFile=(o,t)=>{let n;const e=t.subPackages||t.subpackages;if(Array.isArray(e))for(const t of e)if(t&&"string"==typeof t.root&&(0,processPath_1.isLeftSubPathOfRight)(o,trailing(t.root,"/"))){n=t;break}return n};async function getAllJSON(o){return(await o.callCompiler("getAllPageAndComponent")).map((o=>`${o}.json`))}const getCustomComponentsConfig=async(o,t)=>{const n=await getAllJSON(o),e=new Set;if(t.pages)for(const o of t.pages)e.add(o);const i=t.subPackages||t.subpackages;if(Array.isArray(i))for(const o of i)if(o&&"string"==typeof o.root&&Array.isArray(o.pages))for(const t of o.pages){const n=friendlyPathMake(o.root,String(t));e.add(n)}const s={};for(const e of n){const n=e.replace(/\.json$/,"");if("app"===(0,processPath_1.normalizePath)(n))continue;const i=await o.callCompiler("getPageJSON",n);if(i.usingComponents||i.componentGenerics||!0===i.component){const o=findSubpackageForFile(n,t);s[n]={config:o,file:e,pageJSON:i}}}for(const n of e)if(!s[n]){const e=await o.callCompiler("getPageJSON",n);s[n]={config:findSubpackageForFile(n,t),file:`${n}.json`,pageJSON:e||{}}}return s};async function getFileListJustInPack(o,t,n){const e=await getCustomComponentsConfig(o,t),i=[];for(const o in e){const t=e[o];n?t.config&&t.config.root===n.root&&i.push(o):t.config||i.push(o)}return[...i]}async function getWxssCompileConfig(o,t,n){return await getFileListJustInPack(o,t,n)}async function getWxmlCompileConfig(o,t,n){let e=[],i=0;const s=await getCustomComponentsConfig(o,t);for(const o in s){const t=s[o];if(!t)continue;if(!n&&t.config||n&&!t.config||n&&t.config&&n.root!==t.config.root)continue;const a=t.pageJSON;if(a&&(a.usingComponents||a.componentGenerics)){e.push(`./${o}.wxml`);const t=Object.assign(Object.assign({},a.usingComponents),a.componentGenerics);i++,e.push(Object.keys(t).length),e=e.concat(Object.keys(t))}}return e.unshift(i),e}async function getWxmlCompileLazyConfig(o,t,n){return(await getFileListJustInPack(o,t,n)).map((o=>`./${o}`))}module.exports={getFileListJustInPack:getFileListJustInPack,getWxssCompileConfig:getWxssCompileConfig,getWxmlCompileConfig:getWxmlCompileConfig,getWxmlCompileLazyConfig:getWxmlCompileLazyConfig,getCustomComponentsConfig:getCustomComponentsConfig,findSubpackageForFile:findSubpackageForFile};
1
+ !function(o,n){"use strict";const t=o("../web/processPath"),e=o("path"),s=(o,n)=>e.posix.normalize(e.join(o,n).replace(/^\/+/,"")).replace(/\\/g,"/"),i=(o,n)=>o.endsWith(n)?o:o+n,c=(o,n)=>{let e;const s=n.subPackages||n.subpackages;if(Array.isArray(s))for(const n of s)if(n&&"string"==typeof n.root&&(0,t.isLeftSubPathOfRight)(o,i(n.root,"/"))){e=n;break}return e};const a=async(o,n)=>{const e=await async function(o){return(await o.callCompiler("getAllPageAndComponent")).map((o=>`${o}.json`))}(o),i=new Set;if(n.pages)for(const o of n.pages)i.add(o);const a=n.subPackages||n.subpackages;if(Array.isArray(a))for(const o of a)if(o&&"string"==typeof o.root&&Array.isArray(o.pages))for(const n of o.pages){const t=s(o.root,String(n));i.add(t)}const r={};for(const s of e){const e=s.replace(/\.json$/,"");if("app"===(0,t.normalizePath)(e))continue;const i=await o.callCompiler("getPageJSON",e);if(i.usingComponents||i.componentGenerics||!0===i.component){const o=c(e,n);r[e]={config:o,file:s,pageJSON:i}}}for(const t of i)if(!r[t]){const e=await o.callCompiler("getPageJSON",t);r[t]={config:c(t,n),file:`${t}.json`,pageJSON:e||{}}}return r};async function r(o,n,t){const e=await a(o,n),s=[];for(const o in e){const n=e[o];t?n.config&&n.config.root===t.root&&s.push(o):n.config||s.push(o)}return[...s]}module.exports={getFileListJustInPack:r,getWxssCompileConfig:async function(o,n,t){return await r(o,n,t)},getWxmlCompileConfig:async function(o,n,t){let e=[],s=0;const i=await a(o,n);for(const o in i){const n=i[o];if(!n)continue;if(!t&&n.config||t&&!n.config||t&&n.config&&t.root!==n.config.root)continue;const c=n.pageJSON;if(c&&(c.usingComponents||c.componentGenerics)){e.push(`./${o}.wxml`);const n=Object.assign(Object.assign({},c.usingComponents),c.componentGenerics);s++,e.push(Object.keys(n).length),e=e.concat(Object.keys(n))}}return e.unshift(s),e},getWxmlCompileLazyConfig:async function(o,n,t){return(await r(o,n,t)).map((o=>`./${o}`))},getCustomComponentsConfig:a,findSubpackageForFile:c}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkTabbarListItemIconPath=checkTabbarListItemIconPath,exports.checkThemeRules=checkThemeRules,exports.getDefaultWindowConfig=getDefaultWindowConfig,exports.checkVariables=checkVariables;const tslib_1=require("tslib"),locales_1=require("../../../../../../../../services/locales/common/locales"),getservice_1=tslib_1.__importDefault(require("../../../../../../../../services/common/getservice")),pluginFileReader_1=require("../../../../../../../../services/pluginFileReader/common/pluginFileReader"),path=require("path"),colorUtils=require("../../../../../../../../utils/colorutils"),appErrcodeConfig=require("../../common/apperrcode.config"),TABBAR_ICON_WHITE_LIST=[".png",".jpg",".jpeg"],localesService=(0,getservice_1.default)(locales_1.ILocalesService),locales=localesService.getLocales();function checkTabbarListItemIconPath(e,o,r){const t=[],i=(0,getservice_1.default)(pluginFileReader_1.IPluginFileReaderService).stat(r,o);if(!i)return t.push(locales.config.NOT_FOUND.format(e)),t;(r.setting||{}).MaxTabbarIconSize;i.mtimeMs;const a=path.extname(o);return TABBAR_ICON_WHITE_LIST.indexOf(a)<0&&t.push(locales.config.FILE_EXT_FORMAT_ERROR.format(e,TABBAR_ICON_WHITE_LIST.join("、"))),t}function throwError(e={msg:"",filePath:"app.json"}){const{msg:o,filePath:r}=e,t=new Error(o);throw t.code=appErrcodeConfig.JSON_CONTENT_ERR,t.path=r,t}function checkThemeRules(e,o){const r=(r,t)=>{const i=path.join(e,t),a=o?checkTabbarListItemIconPath(r,i,o):[];a.length>0&&throwError({msg:a.join("\n"),filePath:"app.json or ext.json"})};return{windowConfigRules:[{key:"navigationBarTextStyle",valids:["black","white"]},{key:"backgroundTextStyle",valids:["dark","light"]},{key:"navigationBarBackgroundColor",hexColor:!0},{key:"backgroundColor",hexColor:!0},{key:"backgroundColorTop",hexColor:!0},{key:"backgroundColorBottom",hexColor:!0}],tabbarRules:[{key:"selectedColor",hexColor:!0},{key:"color",hexColor:!0},{key:"backgroundColor",hexColor:!0},{key:"borderStyle",valids:["black","white"]}],tabbarListItemRules:[{key:"iconPath",validate:r},{key:"selectedIconPath",validate:r}]}}function getDefaultWindowConfig(e){return e?{backgroundColor:"#232323",backgroundTextStyle:"light"}:{backgroundColor:"#ffffff",backgroundTextStyle:"dark"}}function checkVariables(e){var o;const{windowConfig:r,themeLocation:t,filePath:i,isDarkMode:a,themeJSON:l,rules:c,keyPrefix:n,isPlugin:s=!1}=e,h=a?l.dark||{}:l.light||{},f=a?"dark":"light";for(const e of c)if((r[e.key]||"").startsWith("@")){const a=(null===(o=r[e.key])||void 0===o?void 0:o.slice(1))||"";if(a&&void 0===t){if(s)continue;throwError({msg:locales.config.THEME_JSON_SHOULD_EXIST.format(`${n}["${e.key}"]`,`"@${a}"`,'appJSON["themeLocation"]'),filePath:i})}const l=h[a];if(void 0===l){if(s)continue;throwError({msg:locales.config.JSON_VARIABLE_VALUE_NOT_FOUND.format(`${n}["${e.key}"]: "@${a}"`,`${t}["${f}"]`),filePath:i})}void 0!==l&&(Array.isArray(e.valids)&&e.valids.indexOf(l)<0&&throwError({msg:locales.config.THEME_JSON_VALUE_SHOULD_BE.format(`${t}["${f}"]["${a}"]`,`${i} ${n}["${e.key}"]`,`${JSON.stringify(e.valids)}`),filePath:t}),e.hexColor&&!colorUtils.isHexColor(l)&&throwError({msg:locales.config.THEME_JSON_VALUE_SHOULD_BE.format(`${t}["${f}"]["${a}"]`,`${i} ${n}["${e.key}"]`,"hexColor"),filePath:t}),e.validate&&e.validate(`${n}["${e.key}"]`,l),r[e.key]=l)}}
1
+ !function(e,o){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkTabbarListItemIconPath=d,exports.checkThemeRules=function(e,o){const t=(t,i)=>{const r=n.join(e,i),a=o?d(t,r,o):[];a.length>0&&g({msg:a.join("\n"),filePath:"app.json or ext.json"})};return{windowConfigRules:[{key:"navigationBarTextStyle",valids:["black","white"]},{key:"backgroundTextStyle",valids:["dark","light"]},{key:"navigationBarBackgroundColor",hexColor:!0},{key:"backgroundColor",hexColor:!0},{key:"backgroundColorTop",hexColor:!0},{key:"backgroundColorBottom",hexColor:!0}],tabbarRules:[{key:"selectedColor",hexColor:!0},{key:"color",hexColor:!0},{key:"backgroundColor",hexColor:!0},{key:"borderStyle",valids:["black","white"]}],tabbarListItemRules:[{key:"iconPath",validate:t},{key:"selectedIconPath",validate:t}]}},exports.getDefaultWindowConfig=function(e){return e?{backgroundColor:"#232323",backgroundTextStyle:"light"}:{backgroundColor:"#ffffff",backgroundTextStyle:"dark"}},exports.checkVariables=function(e){var o;const{windowConfig:t,themeLocation:i,filePath:r,isDarkMode:a,themeJSON:n,rules:c,keyPrefix:s,isPlugin:d=!1}=e,u=a?n.dark||{}:n.light||{},k=a?"dark":"light";for(const e of c)if((t[e.key]||"").startsWith("@")){const a=(null===(o=t[e.key])||void 0===o?void 0:o.slice(1))||"";if(a&&void 0===i){if(d)continue;g({msg:f.config.THEME_JSON_SHOULD_EXIST.format(`${s}["${e.key}"]`,`"@${a}"`,'appJSON["themeLocation"]'),filePath:r})}const n=u[a];if(void 0===n){if(d)continue;g({msg:f.config.JSON_VARIABLE_VALUE_NOT_FOUND.format(`${s}["${e.key}"]: "@${a}"`,`${i}["${k}"]`),filePath:r})}void 0!==n&&(Array.isArray(e.valids)&&e.valids.indexOf(n)<0&&g({msg:f.config.THEME_JSON_VALUE_SHOULD_BE.format(`${i}["${k}"]["${a}"]`,`${r} ${s}["${e.key}"]`,`${JSON.stringify(e.valids)}`),filePath:i}),e.hexColor&&!l.isHexColor(n)&&g({msg:f.config.THEME_JSON_VALUE_SHOULD_BE.format(`${i}["${k}"]["${a}"]`,`${r} ${s}["${e.key}"]`,"hexColor"),filePath:i}),e.validate&&e.validate(`${s}["${e.key}"]`,n),t[e.key]=n)}};const t=e("tslib"),i=e("../../../../../../../../services/locales/common/locales"),r=t.__importDefault(e("../../../../../../../../services/common/getservice")),a=e("../../../../../../../../services/pluginFileReader/common/pluginFileReader"),n=e("path"),l=e("../../../../../../../../utils/colorutils"),c=e("../../common/apperrcode.config"),s=[".png",".jpg",".jpeg"],f=(0,r.default)(i.ILocalesService).getLocales();function d(e,o,t){const i=[],l=(0,r.default)(a.IPluginFileReaderService).stat(t,o);if(!l)return i.push(f.config.NOT_FOUND.format(e)),i;(t.setting||{}).MaxTabbarIconSize,l.mtimeMs;const c=n.extname(o);return s.indexOf(c)<0&&i.push(f.config.FILE_EXT_FORMAT_ERROR.format(e,s.join("、"))),i}function g(e={msg:"",filePath:"app.json"}){const{msg:o,filePath:t}=e,i=new Error(o);throw i.code=c.JSON_CONTENT_ERR,i.path=t,i}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";const tslib_1=require("tslib"),registry_1=require("../../../../../../../build-server/tasks/common/utils/interfacebuilder/registry"),compile_1=tslib_1.__importStar(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),path=require("path"),_=require("lodash"),getCompiledPageJSON=async(e,i)=>{const r=e.project,t=`${r.miniprogramRoot}${i}.json`,o=path.posix.join(r.projectpath,t);let a,s=await compile_1.default.get(compile_1.CacheKey.miniProgramCompiledPageJSON);if(s||(s={},await compile_1.default.set(compile_1.CacheKey.miniProgramCompiledPageJSON,s)),s[o]&&!r.isIB)return reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramCompiledPageJSON),_.cloneDeep(s[o]);reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramCompiledPageJSON);try{a=await e.callCompiler("getPageJSON",i),a.usingComponents||(a.usingComponents={})}catch(e){throw e.message=`${t} ${e.message}`,e}if(r.isIB&&i.indexOf("miniprogram_npm")<0){const e=registry_1.interfaceBuilderRegistry.get(registry_1.IInterfaceBuilderRegistryType.getBussinessUsingComponents);if(e){const i=e(r,a);a=Object.assign(Object.assign({},a),{usingComponents:Object.assign(Object.assign({},a.usingComponents),i)})}}return s[o]=a,await compile_1.default.set(compile_1.CacheKey.miniProgramCompiledPageJSON,s),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramCompiledPageJSON),_.cloneDeep(s[o])};module.exports=getCompiledPageJSON;
1
+ !function(e,i){"use strict";const a=e("tslib"),t=e("../../../../../../../build-server/tasks/common/utils/interfacebuilder/registry"),r=a.__importStar(e("../../../../../../../build-server/tasks/common/utils/cache/compile")),o=e("../../../../../../../build-server/tasks/common/utils/cache/reporter"),s=e("path"),n=e("lodash");module.exports=async(e,i)=>{const a=e.project,c=`${a.miniprogramRoot}${i}.json`,m=s.posix.join(a.projectpath,c);let l,p=await r.default.get(r.CacheKey.miniProgramCompiledPageJSON);if(p||(p={},await r.default.set(r.CacheKey.miniProgramCompiledPageJSON,p)),p[m]&&!a.isIB)return o.compileCacheReporter.hitCache(r.CacheKey.miniProgramCompiledPageJSON),n.cloneDeep(p[m]);o.compileCacheReporter.startGenCache(r.CacheKey.miniProgramCompiledPageJSON);try{l=await e.callCompiler("getPageJSON",i),l.usingComponents||(l.usingComponents={})}catch(e){throw e.message=`${c} ${e.message}`,e}if(a.isIB&&i.indexOf("miniprogram_npm")<0){const e=t.interfaceBuilderRegistry.get(6);if(e){const i=e(a,l);l=Object.assign(Object.assign({},l),{usingComponents:Object.assign(Object.assign({},l.usingComponents),i)})}}return p[m]=l,await r.default.set(r.CacheKey.miniProgramCompiledPageJSON,p),o.compileCacheReporter.finishGenCache(r.CacheKey.miniProgramCompiledPageJSON),n.cloneDeep(p[m])}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";const tslib_1=require("tslib"),compile_1=tslib_1.__importStar(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),_=require("lodash"),getCompiledPageJSON=require("./pagejson"),appConfigHelper=require("./appconfig");async function getWXAppCodeJSON(e,o){let i=await compile_1.default.get(compile_1.CacheKey.miniProgramWXAppCodeJSON);if(i||(i={},await compile_1.default.set(compile_1.CacheKey.miniProgramWXAppCodeJSON,i)),i[o]&&!e.project.isIB)return reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramWXAppCodeJSON),_.cloneDeep(i[o]);reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramWXAppCodeJSON);const r=await appConfigHelper.getAppConfig(e),p=await getCompiledPageJSON(e,o);if(p.usingComponents&&Object.keys(p.usingComponents).length>0){const e={};for(const o in p.usingComponents){const i=p.usingComponents[o]||"";r.plugins?e[o]=i.replace(/^plugin:\/\/([^/]*)\/(.*)/,((e,o,i,p,t)=>{var n;const a=(null===(n=r.plugins)||void 0===n?void 0:n[o])||(void 0,void 0);return a?`plugin://${a.provider}/${i}`:t})):e[o]=i}p.usingComponents=e}return i[o]=p,await compile_1.default.set(compile_1.CacheKey.miniProgramWXAppCodeJSON,i),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramWXAppCodeJSON),_.cloneDeep(i[o])}module.exports=getWXAppCodeJSON;
1
+ !function(e,o){"use strict";const i=e("tslib").__importStar(e("../../../../../../../build-server/tasks/common/utils/cache/compile")),n=e("../../../../../../../build-server/tasks/common/utils/cache/reporter"),t=e("lodash"),r=e("./pagejson"),a=e("./appconfig");module.exports=async function(e,o){let p=await i.default.get(i.CacheKey.miniProgramWXAppCodeJSON);if(p||(p={},await i.default.set(i.CacheKey.miniProgramWXAppCodeJSON,p)),p[o]&&!e.project.isIB)return n.compileCacheReporter.hitCache(i.CacheKey.miniProgramWXAppCodeJSON),t.cloneDeep(p[o]);n.compileCacheReporter.startGenCache(i.CacheKey.miniProgramWXAppCodeJSON);const c=await a.getAppConfig(e),s=await r(e,o);if(s.usingComponents&&Object.keys(s.usingComponents).length>0){const e={};for(const o in s.usingComponents){const i=s.usingComponents[o]||"";c.plugins?e[o]=i.replace(/^plugin:\/\/([^/]*)\/(.*)/,((e,o,i,n,t)=>{var r;const a=(null===(r=c.plugins)||void 0===r?void 0:r[o])||void 0;return a?`plugin://${a.provider}/${i}`:t})):e[o]=i}s.usingComponents=e}return p[o]=s,await i.default.set(i.CacheKey.miniProgramWXAppCodeJSON,p),n.compileCacheReporter.finishGenCache(i.CacheKey.miniProgramWXAppCodeJSON),t.cloneDeep(p[o])}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";const processPath_1=require("../web/processPath"),types_1=require("../../../types"),TRANS_WXML_JS_ERR=10040,customComponent=require("../project/customcomponent"),appConfigHelper=require("../project/appconfig");async function addAccountCardCode(e){const{appConfig:t,config:o,replaceContent:n}=e;return Object.assign({},n)}async function getWxmlFilesForTrans(e,t){const{appConfig:o,config:n,lazyload:a}=t,i=await e.callCompiler("getPackageWxmlAndWxsFiles",(null==n?void 0:n.root)||"__APP__");let r=i.wxmlFiles,c=i.wxsFiles;Object.entries(i.content).forEach((([e,t])=>{e.startsWith("./")||(i.content[`./${e}`]=t)}));n&&a&&(r=r.filter((e=>(0,processPath_1.isLeftSubPathOfRight)(e,n.root))),c=c.filter((e=>(0,processPath_1.isLeftSubPathOfRight)(e,n.root))));let s=r.concat(c),l=!1;(null==c?void 0:c.length)>0&&(l=!0),s=s.map((e=>`./${e}`));let p={},f=!1;i&&(p=i.content);return{srcPath:e.project.miniprogramRoot||"",files:s,hasWxs:l,usePartialReplaceContent:f,partialEnable:false,replaceContent:p}}function formateError(e){const t=new Error(e.toString());return t.code=TRANS_WXML_JS_ERR,t.msgForConsole=(null==e?void 0:e.message)||e.toString(),t}async function wxmlToJS(e,t){try{return await _wxmlToJS(e,t)}catch(e){throw formateError(e)}}async function _wxmlToJS(e,t){const{appConfig:o,config:n,lazyload:a,cut:i}=t,{srcPath:r,files:c,hasWxs:s,usePartialReplaceContent:l,partialEnable:p,replaceContent:f}=await getWxmlFilesForTrans(e,t);if(0===c.length&&a)return{pages:{},names:{}};const g=n?`$${Buffer.from(n.root).toString("hex")}`:"$gwx",u=">_<"+Date.now()%1e4,m=(await customComponent.getWxmlCompileConfig(e,o,n)).join(u);let C="";if(a){let t=await customComponent.getWxmlCompileLazyConfig(e,o,n);if(p)if(l)t=["index"];else{const e=c.map((e=>e.replace(/^\.\//,"")));t=t.filter((t=>e.includes(`${t}.wxml`.replace(/^\.\//,""))))}C=t.join(u)}return a&&!C?{pages:{},names:{}}:await e.requestPipe(types_1.EPipeCMD.WCC,{files:c,isCut:i,lazyloadConfig:C,configSplit:u,configContent:m,hasWxs:s,genfuncName:g,cwd:r,replaceContent:f,isMiniAppProject:!1})}async function transWXMLToJS(e,t={}){const o=await appConfigHelper.getAppConfig(e),{app:n,page:a,cut:i,hotReloadFile:r}=t;let c;if(r){c=void 0;const{name:t,code:n}=await wxmlToJS(e,{appConfig:o,config:c,cut:i});return{name:t,code:n}}if(!n&&(c=null,!c))return{code:"",name:"$gwx"};const s=await wxmlToJS(e,{appConfig:o,config:c,cut:i}),{name:l,code:p}=s;return{name:l,code:p}}module.exports={transWXMLToJS:transWXMLToJS};
1
+ !function(t,e){"use strict";const n=t("../web/processPath"),o=t("../../../types"),a=10040,i=t("../project/customcomponent"),c=t("../project/appconfig");async function r(t,e){try{return await async function(t,e){const{appConfig:a,config:c,lazyload:r,cut:l}=e,{srcPath:s,files:p,hasWxs:f,usePartialReplaceContent:u,partialEnable:g,replaceContent:m}=await async function(t,e){const{appConfig:o,config:a,lazyload:i}=e,c=await t.callCompiler("getPackageWxmlAndWxsFiles",(null==a?void 0:a.root)||"__APP__");let r=c.wxmlFiles,l=c.wxsFiles;Object.entries(c.content).forEach((([t,e])=>{t.startsWith("./")||(c.content[`./${t}`]=e)})),a&&i&&(r=r.filter((t=>(0,n.isLeftSubPathOfRight)(t,a.root))),l=l.filter((t=>(0,n.isLeftSubPathOfRight)(t,a.root))));let s=r.concat(l),p=!1;(null==l?void 0:l.length)>0&&(p=!0),s=s.map((t=>`./${t}`));let f={};return c&&(f=c.content),{srcPath:t.project.miniprogramRoot||"",files:s,hasWxs:p,usePartialReplaceContent:!1,partialEnable:!1,replaceContent:f}}(t,e);if(0===p.length&&r)return{pages:{},names:{}};const C=c?`$${Buffer.from(c.root).toString("hex")}`:"$gwx",d=">_<"+Date.now()%1e4,w=(await i.getWxmlCompileConfig(t,a,c)).join(d);let h="";if(r){let e=await i.getWxmlCompileLazyConfig(t,a,c);if(g)if(u)e=["index"];else{const t=p.map((t=>t.replace(/^\.\//,"")));e=e.filter((e=>t.includes(`${e}.wxml`.replace(/^\.\//,""))))}h=e.join(d)}return r&&!h?{pages:{},names:{}}:await t.requestPipe(o.EPipeCMD.WCC,{files:p,isCut:l,lazyloadConfig:h,configSplit:d,configContent:w,hasWxs:f,genfuncName:C,cwd:s,replaceContent:m,isMiniAppProject:!1})}(t,e)}catch(t){throw function(t){const e=new Error(t.toString());return e.code=a,e.msgForConsole=(null==t?void 0:t.message)||t.toString(),e}(t)}}module.exports={transWXMLToJS:async function(t,e={}){const n=await c.getAppConfig(t),{app:o,page:a,cut:i,hotReloadFile:l}=e;let s;if(l){s=void 0;const{name:e,code:o}=await r(t,{appConfig:n,config:s,cut:i});return{name:e,code:o}}if(!o&&(s=null,!s))return{code:"",name:"$gwx"};const p=await r(t,{appConfig:n,config:s,cut:i}),{name:f,code:u}=p;return{name:f,code:u}}}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";const types_1=require("../../../types"),path=require("path"),appConfigHelper=require("../project/appconfig"),customComponent=require("../project/customcomponent");function formatError(o){const t=new Error(o.toString());return t.code=10041,t.msgForConsole=o.message,console.error(o.message),t}async function wxssToJS(o,t){try{return await _wxssToJS(o,t)}catch(o){if("CustomError"===(null==o?void 0:o.type))throw o;throw formatError(o)}}async function addAccountCardCode(o){const{appConfig:t,config:e,replaceContent:n}=o;return Object.assign({},n)}async function _wxssToJS(o,t){const{appConfig:e,config:n,lazyload:s}=t,a=await o.callCompiler("getPackageWxssFiles",(null==n?void 0:n.root)||"__APP__"),r=a.wxssFiles,c={};r.forEach((o=>{c[o]=a.content[o]||""})),Object.entries(c).forEach((([o,t])=>{o.startsWith("./")||(c[`./${o}`]=t)}));const i={};r.forEach((o=>{i[o]=!0}));const p=(null==n?void 0:n.pages.map((o=>path.posix.join(n.root,o))))||e.pages,l=[];let u=0;p.forEach((o=>{i[`${o}.wxss`]&&(u++,l.push(`./${o}.wxss`),delete i[`${o}.wxss`])}));(await customComponent.getWxssCompileConfig(o,e,n)).forEach((o=>{i[`${o}.wxss`]&&(u++,l.push(`./${o}.wxss`),delete i[`${o}.wxss`])}));for(const o in i)"app.wxss"===o&&0===u&&(u=1),l.push(`./${o}`);let f={};a&&(f=a.content),f=await addAccountCardCode({appConfig:e,config:n,replaceContent:f});const g=o.project.miniprogramRoot||"";return await o.requestPipe(types_1.EPipeCMD.COMPILE_WXSS,{pageCount:u,files:l,cwd:g,subPackage:null==n?void 0:n.root,lazyload:s,replaceContent:f})}async function transWXSSToJS(o,t={}){const e=await appConfigHelper.getAppConfig(o),{app:n,page:s,hotReloadFile:a}=t;if(a){const t=void 0,n=await wxssToJS(o,{appConfig:e,config:t});return{comm:n.comm,page:(null==n?void 0:n[`./${a}`])||""}}if(n){const t=await wxssToJS(o,{appConfig:e})||{};return{comm:(null==t?void 0:t.comm)||""}}const r=`./${s}.wxss`;{const t=await wxssToJS(o,{appConfig:e});return{comm:null==t?void 0:t.comm,page:(null==t?void 0:t[r])||""}}}module.exports={transWXSSToJS:transWXSSToJS};
1
+ !function(o,t){"use strict";const n=o("../../../types"),e=o("path"),s=o("../project/appconfig"),a=o("../project/customcomponent");async function i(o,t){try{return await async function(o,t){const{appConfig:s,config:i,lazyload:c}=t,r=await o.callCompiler("getPackageWxssFiles",(null==i?void 0:i.root)||"__APP__"),p=r.wxssFiles,l={};p.forEach((o=>{l[o]=r.content[o]||""})),Object.entries(l).forEach((([o,t])=>{o.startsWith("./")||(l[`./${o}`]=t)}));const u={};p.forEach((o=>{u[o]=!0}));const g=(null==i?void 0:i.pages.map((o=>e.posix.join(i.root,o))))||s.pages,f=[];let m=0;g.forEach((o=>{u[`${o}.wxss`]&&(m++,f.push(`./${o}.wxss`),delete u[`${o}.wxss`])})),(await a.getWxssCompileConfig(o,s,i)).forEach((o=>{u[`${o}.wxss`]&&(m++,f.push(`./${o}.wxss`),delete u[`${o}.wxss`])}));for(const o in u)"app.wxss"===o&&0===m&&(m=1),f.push(`./${o}`);let w={};r&&(w=r.content),w=await async function(o){const{appConfig:t,config:n,replaceContent:e}=o;return Object.assign({},e)}({appConfig:s,config:i,replaceContent:w});const C=o.project.miniprogramRoot||"";return await o.requestPipe(n.EPipeCMD.COMPILE_WXSS,{pageCount:m,files:f,cwd:C,subPackage:null==i?void 0:i.root,lazyload:c,replaceContent:w})}(o,t)}catch(o){if("CustomError"===(null==o?void 0:o.type))throw o;throw function(o){const t=new Error(o.toString());return t.code=10041,t.msgForConsole=o.message,console.error(o.message),t}(o)}}module.exports={transWXSSToJS:async function(o,t={}){const n=await s.getAppConfig(o),{app:e,page:a,hotReloadFile:c}=t;if(c){const t=void 0,e=await i(o,{appConfig:n,config:t});return{comm:e.comm,page:(null==e?void 0:e[`./${c}`])||""}}if(e){const t=await i(o,{appConfig:n})||{};return{comm:(null==t?void 0:t.comm)||""}}const r=`./${a}.wxss`;{const t=await i(o,{appConfig:n});return{comm:null==t?void 0:t.comm,page:(null==t?void 0:t[r])||""}}}}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalizePath=normalizePath,exports.isLeftSubPathOfRight=isLeftSubPathOfRight;const tslib_1=require("tslib"),path=tslib_1.__importStar(require("path"));function normalizePath(t="",e={}){let i=path.posix.normalize(t.replace(/\\/g,"/"));return(t.startsWith("//")||t.startsWith("\\\\"))&&(i.startsWith("//")||(i=`/${i}`)),e.leading?i.startsWith(e.leading)||(i=`${e.leading}${i}`):e.noLeading&&i.startsWith(e.noLeading)&&(i=i.slice(e.noLeading.length)),e.trailing?i.endsWith(e.trailing)||(i=`${i}${e.trailing}`):e.noTrailing&&i.endsWith(e.noTrailing)&&(i=i.slice(0,-e.noTrailing.length)),i}function _isLeftSubPathOfRight(t,e){if(!e)return!0;if(e=normalizePath(e),t=normalizePath(t),!e.endsWith("/")){if(t===e)return!0;e=`${e}/`}return!!t.startsWith(e)}function isLeftSubPathOfRight(t,e){void 0===t&&(console.error(new Error("The child string is undefined here, please check!!")),t="");const i=t.startsWith(e),r=_isLeftSubPathOfRight(t,e);return i===r||r||console.error(new Error(`${t} ${e} difference check sub path here! new result: ${r}`)),r}
1
+ !function(e,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalizePath=i,exports.isLeftSubPathOfRight=function(e,t){void 0===e&&(console.error(new Error("The child string is undefined here, please check!!")),e="");const r=e.startsWith(t),n=function(e,t){if(!t)return!0;if(t=i(t),e=i(e),!t.endsWith("/")){if(e===t)return!0;t=`${t}/`}return!!e.startsWith(t)}(e,t);return r===n||n||console.error(new Error(`${e} ${t} difference check sub path here! new result: ${n}`)),n};const r=e("tslib").__importStar(e("path"));function i(e="",t={}){let i=r.posix.normalize(e.replace(/\\/g,"/"));return(e.startsWith("//")||e.startsWith("\\\\"))&&(i.startsWith("//")||(i=`/${i}`)),t.leading?i.startsWith(t.leading)||(i=`${t.leading}${i}`):t.noLeading&&i.startsWith(t.noLeading)&&(i=i.slice(t.noLeading.length)),t.trailing?i.endsWith(t.trailing)||(i=`${i}${t.trailing}`):t.noTrailing&&i.endsWith(t.noTrailing)&&(i=i.slice(0,-t.noTrailing.length)),i}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.wccPipe=void 0;const compilewxmlService_1=require("../../../../../services/compilewxml/common/compilewxmlService"),types_1=require("../types");exports.wccPipe={name:types_1.EPipeCMD.WCC,async execute(e,i){const{files:c,isCut:o,lazyloadConfig:t,configSplit:n,configContent:l,hasWxs:p,genfuncName:s,cwd:r,replaceContent:m,isMiniAppProject:a}=i;return await e.getService(compilewxmlService_1.ICompilewxmlService).compileWxml({files:c,isCut:o,lazyloadConfig:t,configSplit:n,configContent:l,hasWxs:p,genfuncName:s,cwd:r,replaceContent:m,isMiniAppProject:a})}};
1
+ !function(e,i){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.wccPipe=void 0;const c=e("../../../../../services/compilewxml/common/compilewxmlService"),o=e("../types");exports.wccPipe={name:o.EPipeCMD.WCC,async execute(e,i){const{files:o,isCut:t,lazyloadConfig:n,configSplit:r,configContent:l,hasWxs:s,genfuncName:p,cwd:a,replaceContent:m,isMiniAppProject:u}=i;return await e.getService(c.ICompilewxmlService).compileWxml({files:o,isCut:t,lazyloadConfig:n,configSplit:r,configContent:l,hasWxs:s,genfuncName:p,cwd:a,replaceContent:m,isMiniAppProject:u})}}}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";var EPipeCMD;Object.defineProperty(exports,"__esModule",{value:!0}),exports.EPipeCMD=void 0,function(E){E.WCC="WCC",E.TRANS_WXML_TO_GLASS_EASEL="TRANS_WXML_TO_GLASS_EASEL",E.COMPILE_WXSS="COMPILE_WXSS",E.PAGEFRAME="PAGEFRAME",E.PAGE_INIT_SOURCE="PAGE_INIT_SOURCE",E.APPSERVICE="APPSERVICE"}(EPipeCMD||(exports.EPipeCMD=EPipeCMD={}));
1
+ !function(E,e){"use strict";var S,_;Object.defineProperty(exports,"__esModule",{value:!0}),exports.EPipeCMD=void 0,(_=S||(exports.EPipeCMD=S={})).WCC="WCC",_.TRANS_WXML_TO_GLASS_EASEL="TRANS_WXML_TO_GLASS_EASEL",_.COMPILE_WXSS="COMPILE_WXSS",_.PAGEFRAME="PAGEFRAME",_.PAGE_INIT_SOURCE="PAGE_INIT_SOURCE",_.APPSERVICE="APPSERVICE"}(require("licia/lazyImport")(require),require);
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SummerCompiler=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=tslib_1.__importDefault(require("lodash")),locales_1=tslib_1.__importDefault(require("../../utils/locales/locales")),request_1=require("../../utils/request"),common_1=require("./original/compile/common"),tools_1=require("../../utils/tools"),white_ext_list_1=require("../../utils/white_ext_list"),config_1=require("../../config/config"),processManager_1=require("../../utils/subprocess/processManager"),messageHub_1=require("../../utils/messageHub"),singletontask_1=require("../../utils/singletontask"),uglifyfilenames_1=require("./original/protect/uglifyfilenames"),baseCompiler_1=require("./baseCompiler"),packOptionsHelper_1=tslib_1.__importDefault(require("../../utils/packOptionsHelper")),types_1=require("./summer/pipeManager/types"),getservice_1=tslib_1.__importDefault(require("../../services/common/getservice")),appDirService_1=require("../../services/app/common/appDirService"),nativeModule_1=require("../../services/nativeModule/common/nativeModule"),miniProgram=config_1.COMPILE_TYPE.miniProgram,miniGame=config_1.COMPILE_TYPE.miniGame,miniProgramPlugin=config_1.COMPILE_TYPE.miniProgramPlugin,miniGamePlugin=config_1.COMPILE_TYPE.miniGamePlugin;function performanceMark(e,t){}class SummerCompiler extends baseCompiler_1.BaseCoreCompiler{constructor(e,t,i,s,a,o,r){super(e),this.project=e,this.cachePath=t,this.projectInfo=i,this.devtoolMessagehub=s,this.analyzer=a,this._filterFactory=o,this.onInitFinished=r,this.isSummer=!0,this.promiseCache=new Map,this._taskCache=new Map,this._status=void 0,this._eventAdded=!1,this._locale="",this._initServiceForkId=0,this.devCodeCacheByPath=new Map,this.onFileChange=(e,t)=>{if("change"!==e||t.endsWith(".json"))for(const e of this.promiseCache.keys())e.startsWith("getConf-")&&this.promiseCache.delete(e);if("change"!==e){for(const e of this.promiseCache.keys())e.startsWith("getPackageFiles-")&&this.promiseCache.delete(e);for(const e of this._taskCache.keys())e.startsWith("getPackageFiles-")&&this._taskCache.delete(e)}this.invalidCodeCache(t),this.subProcessManager.sendEvent("fileChange",{type:e,targetPath:t}),packOptionsHelper_1.default.clearUnusedFiles()},this.onPreCompileOptionsChange=async e=>{await this.clearCache(),this.subProcessManager.sendEvent("precompileOptionsChange",e)},this.onProgressUpdate=(e,t,i)=>{var s;this.messageHub.showBuildLog(`${e}`,t,i),null===(s=this.progressUpdateFromCompileOptions)||void 0===s||s.call(this,{id:e.toString(),message:i,status:t})},this._getPackageFiles=async(e,t,i="dev")=>{performanceMark("request get getPackageFiles");const s=await this.safeRunTask("getPackageFiles",{graphId:e,root:t},this.onProgressUpdate);performanceMark("request get getPackageFiles",!0);const a=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,o=await this.filterFactory(i),r={},n=s.filter((t=>{const i=path_1.default.posix.join(a,t.source),s=o(e,i);return s!==config_1.EFilterCode.Include&&(r[s]||(r[s]=[]),r[s].push(i)),s===config_1.EFilterCode.Include})),c={[config_1.EFilterCode.AnalyseNoUse]:locales_1.default.config.UNUSE_FILE_LIST,[config_1.EFilterCode.PackOptionsIgnore]:locales_1.default.config.PACK_OPTIONS_IGNORE_LIST,[config_1.EFilterCode.PartialCompileNoUse]:locales_1.default.config.PARTIAL_COMPILE_IGNORE_LIST};for(const e in r)c[e]?this.onProgressUpdate(e,"warn",c[e].format(r[e].join(","))):this.onProgressUpdate(e,"warn",locales_1.default.config.UNKNOWN_REASON_INGORE_LIST.format(e,r[e].join(",")));return n},performanceMark("create summer compiler"),this.messageHub=new messageHub_1.MessageHub(s),this.ready(),global.dumpWorkerTaskStats=this.dumpWorkerTaskStats.bind(this),global.clearWorkerTaskStats=this.clearWorkerTaskStats.bind(this)}get status(){return this._status}async init(){performanceMark("init summer compiler");const e=path_1.default.posix.join(__dirname,"./summerEntryProcess.js"),t="undefined"!=typeof WEBIDE_WEBPECK_DEFINE_PLUGIN?"./summerentryprocess.js":e;this.subProcessManager=new processManager_1.SubProcessProxy(this.project,t,{cachePath:this.cachePath},this.projectInfo,8891,this.onProgressUpdate),this.addProjectListener();this.ensureInitService().then((()=>{var e;null===(e=this.onInitFinished)||void 0===e||e.call(this)}),(e=>{var t;null===(t=this.onInitFinished)||void 0===t||t.call(this,e)})),performanceMark("init summer compiler",!0)}async initServiceAndLoadStatus(){const e={};try{const t=await(0,getservice_1.default)(appDirService_1.IAppDirService).get("WeappCompileCache"),i=await(0,getservice_1.default)(nativeModule_1.INativeModuleService);e.NativeModule={WXMLParsePath:await i.getWXMLParsePath(),WXSSParsePath:await i.getWXSSParsePath(),GlassEaselLazyModulePath:await i.getGlassEaselTemplateCompilerPath()},e.AppDirService={WeappCompileCache:t}}catch(e){console.log("initServiceAndLoadStatus hasno WeappCompileCache / INativeModuleService in ci is normal")}this._status=await this.subProcessManager.runTask("initServiceAndloadStatus",{})}async ensureInitService(){await this.subProcessManager.ready(),this.subProcessManager.forkId!==this._initServiceForkId&&(await this.initServiceAndLoadStatus(),this._initServiceForkId=this.subProcessManager.forkId)}async safeRunTask(e,t,i){return await this.ensureInitService(),this.subProcessManager.runTask(e,t,i)}async loadStatus(){this._status=await this.safeRunTask("loadStatus")}destroy(){var e;null===(e=this.subProcessManager)||void 0===e||e.destroy(),this.removeProjectListener(),this._checkReadyTask=void 0}async clearCache(){await this.safeRunTask("clearCache"),this.promiseCache.clear(),this.devCodeCacheByPath.clear(),this._taskCache.clear()}async dumpWorkerTaskStats(){const e=await this.safeRunTask("getWorkerTaskStats"),t=new Map;for(const i of e){const e=`${i.workerId}_${i.taskName}`;let s=t.get(e);s||(s={workerId:i.workerId,taskName:i.taskName,count:0,total:0},t.set(e,s)),s.count++,s.total+=i.duration}const i=[...t.values()].sort(((e,t)=>String(e.workerId).localeCompare(String(t.workerId)))).map((e=>({Worker:e.workerId,Task:e.taskName,Count:e.count,"Total(ms)":e.total,"Avg(ms)":Math.round(e.total/e.count)})));console.table(i)}async clearWorkerTaskStats(){await this.safeRunTask("clearWorkerTaskStats")}getProjectInfo(){return this.projectInfo}updateOptions(e){lodash_1.default.isEqual(e,this.projectInfo)||this.updateOptionsWithoutJudge(e)}updateOptionsWithoutJudge(e){var t;this.projectInfo=e,this.promiseCache.clear(),this.devCodeCacheByPath.clear(),null===(t=this.subProcessManager)||void 0===t||t.sendEvent("updateOptions",e),this.loadStatus(),this.project.updateOptions(e)}updateOptionsWhenAttrNotChanged(e){var t;lodash_1.default.isEqual(Object.assign(Object.assign({},e),{attr:void 0}),Object.assign(Object.assign({},this.projectInfo),{attr:void 0}))||(this.projectInfo=e,this.promiseCache.clear(),this.devCodeCacheByPath.clear(),null===(t=this.subProcessManager)||void 0===t||t.sendEvent("updateOptions",e),this.loadStatus(),this.project.updateOptions(e))}addProjectListener(){var e,t;this._eventAdded&&this.removeProjectListener(),null===(e=this.project.event)||void 0===e||e.on("fileChange",this.onFileChange),null===(t=this.project.event)||void 0===t||t.on("precompileOptionsChange",this.onPreCompileOptionsChange),this._eventAdded=!0}removeProjectListener(){var e,t;null===(e=this.project.event)||void 0===e||e.off("fileChange",this.onFileChange),null===(t=this.project.event)||void 0===t||t.off("precompileOptionsChange",this.onPreCompileOptionsChange),this._eventAdded=!1}invalidCodeCache(e){const t=this.devCodeCacheByPath.get((0,tools_1.sourcePathToTargetPath)(e));t&&(t.isValid=!1)}async getConf(e){const t=`getConf-${e}`;if(this.promiseCache.has(t))return this.promiseCache.get(t);performanceMark("request get conf");const i={graphId:e},s=this.safeRunTask("getConf",i,this.onProgressUpdate);return this.promiseCache.set(t,s),performanceMark("request get conf",!0),s}async waitSubProcessReady(){await this.subProcessManager.ready()}async getPackageFiles(e,t,i="dev",s=!0){const a=`getPackageFiles-${e}-${t}-${i}`;if(this._taskCache.has(a)&&s){const e=this._taskCache.get(a);return null==e?void 0:e.getResult(!0)}const o=new singletontask_1.SingletonTask(this._getPackageFiles.bind(this,e,t,i),a);return this._taskCache.set(a,o),null==o?void 0:o.getResult(!0)}isMiniappPlatformInclude(e){const t=path_1.default.posix.join(this.project.miniprogramRoot,"app.miniapp.json");return(0,tools_1.isMiniappPlatform)(this.project.targetPlatform)&&t===e}async filterUnusedFiles(e,t,i){const s=e?"miniGame":"miniProgram";return(await this.filterFactory(i))(s,t)}async filterFactory(e){packOptionsHelper_1.default.updateState(this.project),this.onProgressUpdate("initUnusedFiles","doing","analyzing codes..."),await packOptionsHelper_1.default.initUnusedFiles(this.project,this.analyzer,"prod"===e),0!==packOptionsHelper_1.default.getUnusedFiles().size&&this.onProgressUpdate("initUnusedFiles","doing",`ignoring files: ${Array.from(packOptionsHelper_1.default.getUnusedFiles()).join(",")}`),this.onProgressUpdate("initUnusedFiles","success","analyzing codes success");const t=this._filterFactory?await this._filterFactory(e):()=>0;return(i,s)=>{const a=packOptionsHelper_1.default.relativePath(s);return this.isMiniappPlatformInclude(s)||packOptionsHelper_1.default.isFileIncluded(a)?config_1.EFilterCode.Include:packOptionsHelper_1.default.isIgnoredByRules(a)?config_1.EFilterCode.PackOptionsIgnore:i===miniProgram&&packOptionsHelper_1.default.isIgnoreByUnusedFiles(s,"prod"===e)?config_1.EFilterCode.AnalyseNoUse:t(i,s)}}async getCodeByFileList(e,t){const i={},s={},a=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,o=[];for(const e of t){const t=this.devCodeCacheByPath.get(path_1.default.posix.join(a,e)),r=null==t?void 0:t.codeFile;let n=!1;t&&t.isValid&&r&&!("error"in r)||(n=!0,o.push(e)),r&&!("error"in r)&&(n&&(i[e]=r.md5),s[e]=r)}if(o.length>0){const t=await this.safeRunTask("getDevCodeByFileList",{graphId:e,fileList:o,cacheMd5:i},this.onProgressUpdate);for(const e in t){const i=t[e],o=path_1.default.posix.join(a,e);"error"in i||""!==i.md5?this.devCodeCacheByPath.set(o,{isValid:!0,codeFile:i}):this.devCodeCacheByPath.delete(o),s[e]=i}}return s}async getExtJSON(){return(await this.getConf(miniProgram)).ext}async getAppJSON(){return(await this.getConf(miniProgram)).app}async getGameJSON(){return(await this.getConf(miniGame)).app}async getSiteMapJSON(){return(await this.getConf(miniProgram)).sitemap}async getPageJSON(e){const t=await this.getConf(miniProgram),i=t.pages[e]||t.comps[e];if(!i)throw new Error(`summer-compiler 收集json配置有遗漏, ${e}`);return i}async getAllPageAndComponent(){const e=await this.getConf(miniProgram),t=(await this.getPackageFiles(miniProgram,config_1.FullPkg)).map((e=>e.path)).filter((e=>e.endsWith(".json")));return Object.keys(e.pages).concat(Object.keys(e.comps)).filter((e=>t.includes(`${e}.json`)))}async getAllSortedJSFiles(){var e,t,i,s;const a=this.isGameType(this.project.type),o=a?miniGame:miniProgram,r=await this.getConf(o),n=Object.keys(null!==(e=r.pages)&&void 0!==e?e:{}),c=Object.keys(null!==(t=r.comps)&&void 0!==t?t:{}),l=await this.getPackageFiles(o,config_1.FullPkg),p=null!==(i=null==l?void 0:l.map((e=>e.path)).filter((e=>e.endsWith(".js"))))&&void 0!==i?i:[],h=null!==(s=null==n?void 0:n.filter((e=>!c.includes(e))).map((e=>`${e}.js`)).filter((e=>p.includes(e))))&&void 0!==s?s:[],g=c.map((e=>`${e}.js`)).filter((e=>p.includes(e))),u=p.filter((e=>e.endsWith(".js")&&e!==(a?"game.js":"app.js")&&!h.includes(e)&&!g.includes(e)));return{jsPagesFiles:h,components:g,otherJsFiles:u}}async getAllWxmlAndWxsFiles(){const e=(await this.getPackageFiles(miniProgram,config_1.FullPkg)).map((e=>e.path)),t=e.filter((e=>e.endsWith(".wxml"))),i=e.filter((e=>e.endsWith(".wxs"))),s=await this.getCodeByFileList(miniProgram,t.concat(i));return{wxmlFiles:t,wxsFiles:i,content:t.concat(i).reduce(((e,t)=>{const i=s[t];if("error"in i)throw i.error;return e[t]=i.code,e[`./${t}`]=i.code,e}),{})}}async getPackageWxmlAndWxsFiles(e){let t=(await this.getPackageFiles(miniProgram,e)).map((e=>e.path));if(e!==config_1.MainPkg&&e!==config_1.FullPkg){const e=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map((e=>e.path));t=t.concat(e)}const i=t.filter((e=>e.endsWith(".wxml"))),s=t.filter((e=>e.endsWith(".wxs"))),a=await this.getCodeByFileList(miniProgram,i.concat(s));return{wxmlFiles:i,wxsFiles:s,content:i.concat(s).reduce(((e,t)=>{const i=a[t];if(!i)throw`lack of ${t} code`;if("error"in i)throw i.error;return e[t]=i.code,e[`./${t}`]=i.code,e}),{})}}async getPackageWxssFileList(e){let t=(await this.getPackageFiles(miniProgram,e)).map((e=>e.path));if(e!==config_1.MainPkg&&e!==config_1.FullPkg){const e=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map((e=>e.path));t=t.concat(e)}return t.filter((e=>e.endsWith(".wxss")))}async getPackageWxssFiles(e){const t=await this.getPackageWxssFileList(e),i=await this.getCodeByFileList(miniProgram,t);return{wxssFiles:t,content:t.reduce(((e,t)=>{const s=i[t];if(!s)throw`lack of ${t} code`;if("error"in s)throw s.error;return e[t]=s.code,e[`./${t}`]=s.code,e}),{})}}getWxssMap(e,t){t=(0,tools_1.normalizePath)(t),e===miniProgram?t=path_1.default.posix.join(this.project.miniprogramRoot,t):e===miniProgramPlugin&&(t=path_1.default.posix.join(this.project.pluginRoot,t));const i=this.devCodeCacheByPath.get(t),s=null==i?void 0:i.codeFile;if(s&&!("error"in s))return s.map}async getMainPkgSortedJSFiles(){const e=await this.getConf(miniProgram),t=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map((e=>e.path)).filter((e=>e.endsWith(".js"))),i=[],s=[],a=[],o=[],r=[];let n=!1;const c={},l=t=>Object.keys(e.packages).find((e=>t.startsWith(e)))||config_1.MainPkg;e.app.functionalPages&&t.forEach((e=>{if(e.startsWith("functional-pages/")){const t=e.replace(/\.js$/,"");if(c[t])return;c[t]=!0,r.push(encodeURI(t))}})),e.app.workers&&t.forEach((t=>{if(t.startsWith((0,tools_1.getWorkersPath)(e.app.workers))){const e=t.replace(/\.js$/,"");if(c[e])return;c[e]=!0,o.push(e)}}));Object.keys(e.comps).filter((e=>l(e)===config_1.MainPkg)).forEach((t=>{if((t.startsWith("miniprogram_npm/weui-miniprogram")||t.startsWith("weui-miniprogram"))&&e.app.useExtendedLib&&e.app.useExtendedLib.weui)return;if(c[t])return;c[t]=!0;const i=encodeURI(t);a.push(`${i}`)}));Object.keys(e.pages).filter((e=>l(e)===config_1.MainPkg)).forEach((e=>{if(c[e])return;c[e]=!0;const t=encodeURI(e);i.push(`${t}`)})),t.forEach((e=>{const t=e.replace(/\.js$/,"");c[t]||(c[t]=!0,"app.js"!==e?s.push(`${encodeURI(t)}`):n=!0)}));const p=[...s,...a,...i];return n&&p.push("app"),{hasAppJS:n,allFiles:p,pageFiles:i,componentFiles:a,workerFiles:o,functionalPageFiles:r,otherFiles:s}}async getSubPkgSortedJSFiles(e){const t=await this.getConf(miniProgram),i=(await this.getPackageFiles(miniProgram,e)).map((e=>e.path)).filter((e=>e.endsWith(".js"))),s=[],a=[],o=[],r={},n=e=>Object.keys(t.packages).find((t=>e.startsWith(t)))||config_1.MainPkg;Object.keys(t.comps).filter((t=>n(t)===e)).forEach((e=>{if((e.startsWith("miniprogram_npm/weui-miniprogram")||e.startsWith("weui-miniprogram"))&&t.app.useExtendedLib&&t.app.useExtendedLib.weui)return;if(r[e])return;r[e]=!0;const i=encodeURI(e);o.push(`${i}`)}));Object.keys(t.pages).filter((t=>n(t)===e)).forEach((e=>{if(r[e])return;r[e]=!0;const t=encodeURI(e);s.push(`${t}`)}));let c=t.packages[e].entry||"";c&&(c=path_1.default.posix.join(e,c),c=c.replace(/\.js$/,"")),i.forEach((e=>{const t=e.replace(/\.js$/,"");r[t]||(r[t]=!0,t!==c&&a.push(`${encodeURI(t)}`))}));const l=i.map((e=>`${encodeURI(e.replace(/\.js$/,""))}`));return{entryJS:c,allFiles:l,pageFiles:s,componentFiles:o,otherFiles:a}}async compileJSList(e){const t=this.project.type;let i=config_1.COMPILE_TYPE.miniProgram;i=e.root===this.project.miniprogramRoot?this.isGameType(t)?config_1.COMPILE_TYPE.miniGame:config_1.COMPILE_TYPE.miniProgram:this.isGameType(t)?config_1.COMPILE_TYPE.miniGamePlugin:miniProgramPlugin;const s=await this.getCodeByFileList(i,e.fileList),a=[];for(const e in s){const t=s[e];if("error"in t)throw t.error;a.push(Object.assign({filePath:e,code:t.code,map:t.map,mtime:t.mtime},t.jsTag))}return a}async compileJS(e){const t=this.project.type;let i;if(e.root===this.project.miniprogramRoot){i=(await this.getCodeByFileList(this.isGameType(t)?config_1.COMPILE_TYPE.miniGame:config_1.COMPILE_TYPE.miniProgram,[e.filePath]))[e.filePath]}else{i=(await this.getCodeByFileList(this.isGameType(t)?config_1.COMPILE_TYPE.miniGamePlugin:miniProgramPlugin,[e.filePath]))[e.filePath]}if(!i){const t=new Error(`summer-compiler miss ${e.root} js file, ${e.filePath}`);throw t.code="ENOENT",t}if("error"in i)throw i.error;return Object.assign({filePath:e.filePath,code:i.code,map:i.map,mtime:i.mtime},i.jsTag)}async compile(e){Date.now();this.progressUpdateFromCompileOptions=e.onProgressUpdate;const t=(await this.getPackageFiles(this.isGameType(this.project.type)?miniGame:miniProgram,config_1.FullPkg,e.resultType,e.useCache)).map((e=>e.path)),i=await this.safeRunTask("compileNewLogic",Object.assign(Object.assign({},e),{fileList:t,analyzer:void 0}),this.onProgressUpdate),s=i.app,a=Object.keys(s).filter((e=>e.endsWith(".json"))),o=await this.compileOther(this.isGameType(this.project.type)?miniGame:miniProgram,e.resultType||"prod",a);let r={};if(this.isPluginType(this.project.type)){const t=i.plugin,a=Object.keys(t).filter((e=>e.endsWith(".json"))),n=await this.compileOther(this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin,e.resultType||"prod",a);Object.keys(o).forEach((e=>{r[path_1.default.posix.join("miniprogram",e)]=o[e]})),Object.keys(n).forEach((e=>{r[path_1.default.posix.join("plugin",e)]=n[e]})),Object.keys(s).forEach((e=>{r[path_1.default.posix.join("miniprogram",e)]=s[e]})),Object.keys(t).forEach((e=>{r[path_1.default.posix.join("plugin",e)]=t[e]})),r["project.config.json"]=JSON.stringify({miniprogramRoot:"miniprogram",pluginRoot:"plugin",__compileDebugInfo__:{useSummer:!0}})}else r=Object.assign(Object.assign({},o),s),r["project.config.json"]=JSON.stringify({miniprogramRoot:"",__compileDebugInfo__:{useSummer:!0}});this.onProgressUpdate(111,"success",locales_1.default.config.SUMMER_PACK_FILES_FINISH.format());for(const e of Object.keys(r))"object"==typeof r[e]&&"Buffer"===r[e].type&&(r[e]=Buffer.from(r[e].data));return r}async compileOther(e,t,i){const s=(0,tools_1.getSupportCodeFileExtSet)(this.project);s.delete(".json");const a=await(0,white_ext_list_1.getWhiteExtList)();let o=a.MiniProgramWhiteList;this.isGameType(this.project.type)&&(o=a.GameWhiteList);const r=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,n=await this.filterFactory(t),c=this.project.getFileList(r,"").filter((t=>{const a=path_1.default.posix.extname(t),c=path_1.default.posix.relative(r,t);return!(!o.has(a)||s.has(a)||i.includes(c))&&n(e,t)===config_1.EFilterCode.Include})),l=await(0,common_1.compileOther)(this.project,c,{onProgressUpdate:()=>{}}),p={};for(const e in l){p[path_1.default.posix.relative(r,e)]=l[e]}return p}async compile2(e){const t=await this.safeRunTask("compile",e,((t,i,s)=>{var a;null===(a=e.onProgressUpdate)||void 0===a||a.call(e,{id:t.toString(),status:i,message:s})}));for(const e of Object.keys(t))"object"==typeof t[e]&&"Buffer"===t[e].type&&(t[e]=Buffer.from(t[e].data));return t}async getPluginJSON(e=""){return(await this.getConf(this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin)).plugin}async getPluginPageJSON(e){const t=await this.getConf(miniProgramPlugin),i=t.pages[e]||t.comps[e];if(!i)throw new Error(`summer-compiler 收集plugin json配置有遗漏, ${e}`);return i}async getPluginComponents(){const e=await this.getConf(miniProgramPlugin),t=new Set(Object.keys(e.pages).concat(Object.keys(e.comps)));return Array.from(t)}async getPluginJSFiles(){const e=this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin,t=(await this.getPackageFiles(e,config_1.FullPkg)).map((e=>e.path)).filter((e=>e.endsWith(".js"))),i=await this.getCodeByFileList(e,t);return{jsFiles:t,content:t.reduce(((e,t)=>{const s=i[t];if(!s)throw`lack of ${t} code`;if("error"in s)throw s.error;return e[t]=s.code,e[`./${t}`]=s.code,e}),{})}}async getPluginWxssFiles(){const e=(await this.getPackageFiles(miniProgramPlugin,config_1.FullPkg)).map((e=>e.path)).filter((e=>e.endsWith(".wxss"))),t=await this.getCodeByFileList(miniProgramPlugin,e);return{wxssFiles:e,content:e.reduce(((e,i)=>{const s=t[i];if(!s)throw`lack of ${i} code`;if("error"in s)throw s.error;return e[i]=s.code,e[`./${i}`]=s.code,e}),{})}}async getPluginWxmlAndWxsFiles(){const e=(await this.getPackageFiles(miniProgramPlugin,config_1.FullPkg)).map((e=>e.path)),t=e.filter((e=>e.endsWith(".wxml"))),i=e.filter((e=>e.endsWith(".wxs"))),s=await this.getCodeByFileList(miniProgramPlugin,t.concat(i));return{wxmlFiles:t,wxsFiles:i,content:t.concat(i).reduce(((e,t)=>{const i=s[t];if(!i)throw`lack of ${t} code`;if("error"in i)throw i.error;return e[t]=i.code,e[`./${t}`]=i.code,e}),{})}}async checkThemeJSON(e){return(await this.getConf(miniProgram)).theme}setProxy(e){(0,request_1.setCiProxy)(e)}setLocale(e){this._locale!==e&&(this._locale=e,this.safeRunTask("setLocale",e))}async uglifyFileNames(e,t,i){return await(0,uglifyfilenames_1.uglifyFileNames)(e,t,i)}async getMPFileInfo(){return this.safeRunTask("getLocalFileList",miniProgram)}async getPluginFileInfo(){return this.safeRunTask("getLocalFileList",miniProgramPlugin)}async getCompAndPagesOfConf(){const e=await this.getConf(miniProgram);return{pages:e.pages,comps:e.comps}}async getFiltedFileListReason(e){const t=this.project.getFileList(this.project.miniprogramRoot),i=[],s=await this.filterFactory(e),a=this.isGameType(this.project.type)?miniGame:miniProgram;for(const e of t){const t=s(a,e);t!==config_1.EFilterCode.Include&&i.push({file:e,code:t})}if(this.isPluginType(this.project.type)){const e=this.project.getFileList(this.project.pluginRoot),t=this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin;for(const a of e){const e=s(t,a);e!==config_1.EFilterCode.Include&&i.push({file:a,code:e})}}return i}async executePipe(e,t){return this.safeRunTask("executePipe",{pipeName:e,params:t},this.onProgressUpdate)}async getPageframe(e=!1,t){return this.safeRunTask("executePipe",Object.assign({pipeName:types_1.EPipeCMD.PAGEFRAME,params:{isMultiPkg:e}},t),this.onProgressUpdate)}async getAppservice(e){return this.safeRunTask("executePipe",Object.assign({pipeName:types_1.EPipeCMD.APPSERVICE,params:{}},e),this.onProgressUpdate)}}exports.SummerCompiler=SummerCompiler;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SummerCompiler=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=tslib_1.__importDefault(require("lodash")),locales_1=tslib_1.__importDefault(require("../../utils/locales/locales")),request_1=require("../../utils/request"),common_1=require("./original/compile/common"),tools_1=require("../../utils/tools"),white_ext_list_1=require("../../utils/white_ext_list"),config_1=require("../../config/config"),processManager_1=require("../../utils/subprocess/processManager"),messageHub_1=require("../../utils/messageHub"),singletontask_1=require("../../utils/singletontask"),uglifyfilenames_1=require("./original/protect/uglifyfilenames"),baseCompiler_1=require("./baseCompiler"),packOptionsHelper_1=tslib_1.__importDefault(require("../../utils/packOptionsHelper")),getservice_1=tslib_1.__importDefault(require("../../services/common/getservice")),appDirService_1=require("../../services/app/common/appDirService"),nativeModule_1=require("../../services/nativeModule/common/nativeModule"),miniProgram=config_1.COMPILE_TYPE.miniProgram,miniGame=config_1.COMPILE_TYPE.miniGame,miniProgramPlugin=config_1.COMPILE_TYPE.miniProgramPlugin,miniGamePlugin=config_1.COMPILE_TYPE.miniGamePlugin;function performanceMark(e,t){}class SummerCompiler extends baseCompiler_1.BaseCoreCompiler{constructor(e,t,i,s,a,o,r){super(e),this.project=e,this.cachePath=t,this.projectInfo=i,this.devtoolMessagehub=s,this.analyzer=a,this._filterFactory=o,this.onInitFinished=r,this.isSummer=!0,this.promiseCache=new Map,this._taskCache=new Map,this._status=void 0,this._eventAdded=!1,this._locale="",this._initServiceForkId=0,this.devCodeCacheByPath=new Map,this.onFileChange=(e,t)=>{if("change"!==e||t.endsWith(".json"))for(const e of this.promiseCache.keys())e.startsWith("getConf-")&&this.promiseCache.delete(e);if("change"!==e){for(const e of this.promiseCache.keys())e.startsWith("getPackageFiles-")&&this.promiseCache.delete(e);for(const e of this._taskCache.keys())e.startsWith("getPackageFiles-")&&this._taskCache.delete(e)}this.invalidCodeCache(t),this.subProcessManager.sendEvent("fileChange",{type:e,targetPath:t}),packOptionsHelper_1.default.clearUnusedFiles()},this.onPreCompileOptionsChange=async e=>{await this.clearCache(),this.subProcessManager.sendEvent("precompileOptionsChange",e)},this.onProgressUpdate=(e,t,i)=>{var s;this.messageHub.showBuildLog(`${e}`,t,i),null===(s=this.progressUpdateFromCompileOptions)||void 0===s||s.call(this,{id:e.toString(),message:i,status:t})},this._getPackageFiles=async(e,t,i="dev")=>{performanceMark("request get getPackageFiles");const s=await this.safeRunTask("getPackageFiles",{graphId:e,root:t},this.onProgressUpdate);performanceMark("request get getPackageFiles",!0);const a=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,o=await this.filterFactory(i),r={},n=s.filter((t=>{const i=path_1.default.posix.join(a,t.source),s=o(e,i);return s!==config_1.EFilterCode.Include&&(r[s]||(r[s]=[]),r[s].push(i)),s===config_1.EFilterCode.Include})),c={[config_1.EFilterCode.AnalyseNoUse]:locales_1.default.config.UNUSE_FILE_LIST,[config_1.EFilterCode.PackOptionsIgnore]:locales_1.default.config.PACK_OPTIONS_IGNORE_LIST,[config_1.EFilterCode.PartialCompileNoUse]:locales_1.default.config.PARTIAL_COMPILE_IGNORE_LIST};for(const e in r)c[e]?this.onProgressUpdate(e,"warn",c[e].format(r[e].join(","))):this.onProgressUpdate(e,"warn",locales_1.default.config.UNKNOWN_REASON_INGORE_LIST.format(e,r[e].join(",")));return n},performanceMark("create summer compiler"),this.messageHub=new messageHub_1.MessageHub(s),this.ready(),global.dumpWorkerTaskStats=this.dumpWorkerTaskStats.bind(this),global.clearWorkerTaskStats=this.clearWorkerTaskStats.bind(this)}get status(){return this._status}async init(){performanceMark("init summer compiler");const e=path_1.default.posix.join(__dirname,"./summerEntryProcess.js"),t="undefined"!=typeof WEBIDE_WEBPECK_DEFINE_PLUGIN?"./summerentryprocess.js":e;this.subProcessManager=new processManager_1.SubProcessProxy(this.project,t,{cachePath:this.cachePath},this.projectInfo,8891,this.onProgressUpdate),this.addProjectListener();this.ensureInitService().then((()=>{var e;null===(e=this.onInitFinished)||void 0===e||e.call(this)}),(e=>{var t;null===(t=this.onInitFinished)||void 0===t||t.call(this,e)})),performanceMark("init summer compiler",!0)}async initServiceAndLoadStatus(){const e={};try{const t=await(0,getservice_1.default)(appDirService_1.IAppDirService).get("WeappCompileCache"),i=await(0,getservice_1.default)(nativeModule_1.INativeModuleService);e.NativeModule={WXMLParsePath:await i.getWXMLParsePath(),WXSSParsePath:await i.getWXSSParsePath(),GlassEaselLazyModulePath:await i.getGlassEaselTemplateCompilerPath()},e.AppDirService={WeappCompileCache:t}}catch(e){console.log("initServiceAndLoadStatus hasno WeappCompileCache / INativeModuleService in ci is normal")}this._status=await this.subProcessManager.runTask("initServiceAndloadStatus",{})}async ensureInitService(){await this.subProcessManager.ready(),this.subProcessManager.forkId!==this._initServiceForkId&&(await this.initServiceAndLoadStatus(),this._initServiceForkId=this.subProcessManager.forkId)}async safeRunTask(e,t,i){return await this.ensureInitService(),this.subProcessManager.runTask(e,t,i)}async loadStatus(){this._status=await this.safeRunTask("loadStatus")}destroy(){var e;null===(e=this.subProcessManager)||void 0===e||e.destroy(),this.removeProjectListener(),this._checkReadyTask=void 0}async clearCache(){await this.safeRunTask("clearCache"),this.promiseCache.clear(),this.devCodeCacheByPath.clear(),this._taskCache.clear()}async dumpWorkerTaskStats(){const e=await this.safeRunTask("getWorkerTaskStats"),t=new Map;for(const i of e){const e=`${i.workerId}_${i.taskName}`;let s=t.get(e);s||(s={workerId:i.workerId,taskName:i.taskName,count:0,total:0},t.set(e,s)),s.count++,s.total+=i.duration}const i=[...t.values()].sort(((e,t)=>String(e.workerId).localeCompare(String(t.workerId)))).map((e=>({Worker:e.workerId,Task:e.taskName,Count:e.count,"Total(ms)":e.total,"Avg(ms)":Math.round(e.total/e.count)})));console.table(i)}async clearWorkerTaskStats(){await this.safeRunTask("clearWorkerTaskStats")}getProjectInfo(){return this.projectInfo}updateOptions(e){lodash_1.default.isEqual(e,this.projectInfo)||this.updateOptionsWithoutJudge(e)}updateOptionsWithoutJudge(e){var t;this.projectInfo=e,this.promiseCache.clear(),this.devCodeCacheByPath.clear(),null===(t=this.subProcessManager)||void 0===t||t.sendEvent("updateOptions",e),this.loadStatus(),this.project.updateOptions(e)}updateOptionsWhenAttrNotChanged(e){var t;lodash_1.default.isEqual(Object.assign(Object.assign({},e),{attr:void 0}),Object.assign(Object.assign({},this.projectInfo),{attr:void 0}))||(this.projectInfo=e,this.promiseCache.clear(),this.devCodeCacheByPath.clear(),null===(t=this.subProcessManager)||void 0===t||t.sendEvent("updateOptions",e),this.loadStatus(),this.project.updateOptions(e))}addProjectListener(){var e,t;this._eventAdded&&this.removeProjectListener(),null===(e=this.project.event)||void 0===e||e.on("fileChange",this.onFileChange),null===(t=this.project.event)||void 0===t||t.on("precompileOptionsChange",this.onPreCompileOptionsChange),this._eventAdded=!0}removeProjectListener(){var e,t;null===(e=this.project.event)||void 0===e||e.off("fileChange",this.onFileChange),null===(t=this.project.event)||void 0===t||t.off("precompileOptionsChange",this.onPreCompileOptionsChange),this._eventAdded=!1}invalidCodeCache(e){const t=this.devCodeCacheByPath.get((0,tools_1.sourcePathToTargetPath)(e));t&&(t.isValid=!1)}async getConf(e){const t=`getConf-${e}`;if(this.promiseCache.has(t))return this.promiseCache.get(t);performanceMark("request get conf");const i={graphId:e},s=this.safeRunTask("getConf",i,this.onProgressUpdate);return this.promiseCache.set(t,s),performanceMark("request get conf",!0),s}async waitSubProcessReady(){await this.subProcessManager.ready()}async getPackageFiles(e,t,i="dev",s=!0){const a=`getPackageFiles-${e}-${t}-${i}`;if(this._taskCache.has(a)&&s){const e=this._taskCache.get(a);return null==e?void 0:e.getResult(!0)}const o=new singletontask_1.SingletonTask(this._getPackageFiles.bind(this,e,t,i),a);return this._taskCache.set(a,o),null==o?void 0:o.getResult(!0)}isMiniappPlatformInclude(e){const t=path_1.default.posix.join(this.project.miniprogramRoot,"app.miniapp.json");return(0,tools_1.isMiniappPlatform)(this.project.targetPlatform)&&t===e}async filterUnusedFiles(e,t,i){const s=e?"miniGame":"miniProgram";return(await this.filterFactory(i))(s,t)}async filterFactory(e){packOptionsHelper_1.default.updateState(this.project),this.onProgressUpdate("initUnusedFiles","doing","analyzing codes..."),await packOptionsHelper_1.default.initUnusedFiles(this.project,this.analyzer,"prod"===e),0!==packOptionsHelper_1.default.getUnusedFiles().size&&this.onProgressUpdate("initUnusedFiles","doing",`ignoring files: ${Array.from(packOptionsHelper_1.default.getUnusedFiles()).join(",")}`),this.onProgressUpdate("initUnusedFiles","success","analyzing codes success");const t=this._filterFactory?await this._filterFactory(e):()=>0;return(i,s)=>{const a=packOptionsHelper_1.default.relativePath(s);return this.isMiniappPlatformInclude(s)||packOptionsHelper_1.default.isFileIncluded(a)?config_1.EFilterCode.Include:packOptionsHelper_1.default.isIgnoredByRules(a)?config_1.EFilterCode.PackOptionsIgnore:i===miniProgram&&packOptionsHelper_1.default.isIgnoreByUnusedFiles(s,"prod"===e)?config_1.EFilterCode.AnalyseNoUse:t(i,s)}}async getCodeByFileList(e,t){const i={},s={},a=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,o=[];for(const e of t){const t=this.devCodeCacheByPath.get(path_1.default.posix.join(a,e)),r=null==t?void 0:t.codeFile;let n=!1;t&&t.isValid&&r&&!("error"in r)||(n=!0,o.push(e)),r&&!("error"in r)&&(n&&(i[e]=r.md5),s[e]=r)}if(o.length>0){const t=await this.safeRunTask("getDevCodeByFileList",{graphId:e,fileList:o,cacheMd5:i},this.onProgressUpdate);for(const e in t){const i=t[e],o=path_1.default.posix.join(a,e);"error"in i||""!==i.md5?this.devCodeCacheByPath.set(o,{isValid:!0,codeFile:i}):this.devCodeCacheByPath.delete(o),s[e]=i}}return s}async getExtJSON(){return(await this.getConf(miniProgram)).ext}async getAppJSON(){return(await this.getConf(miniProgram)).app}async getGameJSON(){return(await this.getConf(miniGame)).app}async getSiteMapJSON(){return(await this.getConf(miniProgram)).sitemap}async getPageJSON(e){const t=await this.getConf(miniProgram),i=t.pages[e]||t.comps[e];if(!i)throw new Error(`summer-compiler 收集json配置有遗漏, ${e}`);return i}async getAllPageAndComponent(){const e=await this.getConf(miniProgram),t=(await this.getPackageFiles(miniProgram,config_1.FullPkg)).map((e=>e.path)).filter((e=>e.endsWith(".json")));return Object.keys(e.pages).concat(Object.keys(e.comps)).filter((e=>t.includes(`${e}.json`)))}async getAllSortedJSFiles(){var e,t,i,s;const a=this.isGameType(this.project.type),o=a?miniGame:miniProgram,r=await this.getConf(o),n=Object.keys(null!==(e=r.pages)&&void 0!==e?e:{}),c=Object.keys(null!==(t=r.comps)&&void 0!==t?t:{}),l=await this.getPackageFiles(o,config_1.FullPkg),p=null!==(i=null==l?void 0:l.map((e=>e.path)).filter((e=>e.endsWith(".js"))))&&void 0!==i?i:[],h=null!==(s=null==n?void 0:n.filter((e=>!c.includes(e))).map((e=>`${e}.js`)).filter((e=>p.includes(e))))&&void 0!==s?s:[],g=c.map((e=>`${e}.js`)).filter((e=>p.includes(e))),u=p.filter((e=>e.endsWith(".js")&&e!==(a?"game.js":"app.js")&&!h.includes(e)&&!g.includes(e)));return{jsPagesFiles:h,components:g,otherJsFiles:u}}async getAllWxmlAndWxsFiles(){const e=(await this.getPackageFiles(miniProgram,config_1.FullPkg)).map((e=>e.path)),t=e.filter((e=>e.endsWith(".wxml"))),i=e.filter((e=>e.endsWith(".wxs"))),s=await this.getCodeByFileList(miniProgram,t.concat(i));return{wxmlFiles:t,wxsFiles:i,content:t.concat(i).reduce(((e,t)=>{const i=s[t];if("error"in i)throw i.error;return e[t]=i.code,e[`./${t}`]=i.code,e}),{})}}async getPackageWxmlAndWxsFiles(e){let t=(await this.getPackageFiles(miniProgram,e)).map((e=>e.path));if(e!==config_1.MainPkg&&e!==config_1.FullPkg){const e=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map((e=>e.path));t=t.concat(e)}const i=t.filter((e=>e.endsWith(".wxml"))),s=t.filter((e=>e.endsWith(".wxs"))),a=await this.getCodeByFileList(miniProgram,i.concat(s));return{wxmlFiles:i,wxsFiles:s,content:i.concat(s).reduce(((e,t)=>{const i=a[t];if(!i)throw`lack of ${t} code`;if("error"in i)throw i.error;return e[t]=i.code,e[`./${t}`]=i.code,e}),{})}}async getPackageWxssFileList(e){let t=(await this.getPackageFiles(miniProgram,e)).map((e=>e.path));if(e!==config_1.MainPkg&&e!==config_1.FullPkg){const e=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map((e=>e.path));t=t.concat(e)}return t.filter((e=>e.endsWith(".wxss")))}async getPackageWxssFiles(e){const t=await this.getPackageWxssFileList(e),i=await this.getCodeByFileList(miniProgram,t);return{wxssFiles:t,content:t.reduce(((e,t)=>{const s=i[t];if(!s)throw`lack of ${t} code`;if("error"in s)throw s.error;return e[t]=s.code,e[`./${t}`]=s.code,e}),{})}}getWxssMap(e,t){t=(0,tools_1.normalizePath)(t),e===miniProgram?t=path_1.default.posix.join(this.project.miniprogramRoot,t):e===miniProgramPlugin&&(t=path_1.default.posix.join(this.project.pluginRoot,t));const i=this.devCodeCacheByPath.get(t),s=null==i?void 0:i.codeFile;if(s&&!("error"in s))return s.map}async getMainPkgSortedJSFiles(){const e=await this.getConf(miniProgram),t=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map((e=>e.path)).filter((e=>e.endsWith(".js"))),i=[],s=[],a=[],o=[],r=[];let n=!1;const c={},l=t=>Object.keys(e.packages).find((e=>t.startsWith(e)))||config_1.MainPkg;e.app.functionalPages&&t.forEach((e=>{if(e.startsWith("functional-pages/")){const t=e.replace(/\.js$/,"");if(c[t])return;c[t]=!0,r.push(encodeURI(t))}})),e.app.workers&&t.forEach((t=>{if(t.startsWith((0,tools_1.getWorkersPath)(e.app.workers))){const e=t.replace(/\.js$/,"");if(c[e])return;c[e]=!0,o.push(e)}}));Object.keys(e.comps).filter((e=>l(e)===config_1.MainPkg)).forEach((t=>{if((t.startsWith("miniprogram_npm/weui-miniprogram")||t.startsWith("weui-miniprogram"))&&e.app.useExtendedLib&&e.app.useExtendedLib.weui)return;if(c[t])return;c[t]=!0;const i=encodeURI(t);a.push(`${i}`)}));Object.keys(e.pages).filter((e=>l(e)===config_1.MainPkg)).forEach((e=>{if(c[e])return;c[e]=!0;const t=encodeURI(e);i.push(`${t}`)})),t.forEach((e=>{const t=e.replace(/\.js$/,"");c[t]||(c[t]=!0,"app.js"!==e?s.push(`${encodeURI(t)}`):n=!0)}));const p=[...s,...a,...i];return n&&p.push("app"),{hasAppJS:n,allFiles:p,pageFiles:i,componentFiles:a,workerFiles:o,functionalPageFiles:r,otherFiles:s}}async getSubPkgSortedJSFiles(e){const t=await this.getConf(miniProgram),i=(await this.getPackageFiles(miniProgram,e)).map((e=>e.path)).filter((e=>e.endsWith(".js"))),s=[],a=[],o=[],r={},n=e=>Object.keys(t.packages).find((t=>e.startsWith(t)))||config_1.MainPkg;Object.keys(t.comps).filter((t=>n(t)===e)).forEach((e=>{if((e.startsWith("miniprogram_npm/weui-miniprogram")||e.startsWith("weui-miniprogram"))&&t.app.useExtendedLib&&t.app.useExtendedLib.weui)return;if(r[e])return;r[e]=!0;const i=encodeURI(e);o.push(`${i}`)}));Object.keys(t.pages).filter((t=>n(t)===e)).forEach((e=>{if(r[e])return;r[e]=!0;const t=encodeURI(e);s.push(`${t}`)}));let c=t.packages[e].entry||"";c&&(c=path_1.default.posix.join(e,c),c=c.replace(/\.js$/,"")),i.forEach((e=>{const t=e.replace(/\.js$/,"");r[t]||(r[t]=!0,t!==c&&a.push(`${encodeURI(t)}`))}));const l=i.map((e=>`${encodeURI(e.replace(/\.js$/,""))}`));return{entryJS:c,allFiles:l,pageFiles:s,componentFiles:o,otherFiles:a}}async compileJSList(e){const t=this.project.type;let i=config_1.COMPILE_TYPE.miniProgram;i=e.root===this.project.miniprogramRoot?this.isGameType(t)?config_1.COMPILE_TYPE.miniGame:config_1.COMPILE_TYPE.miniProgram:this.isGameType(t)?config_1.COMPILE_TYPE.miniGamePlugin:miniProgramPlugin;const s=await this.getCodeByFileList(i,e.fileList),a=[];for(const e in s){const t=s[e];if("error"in t)throw t.error;a.push(Object.assign({filePath:e,code:t.code,map:t.map,mtime:t.mtime},t.jsTag))}return a}async compileJS(e){const t=this.project.type;let i;if(e.root===this.project.miniprogramRoot){i=(await this.getCodeByFileList(this.isGameType(t)?config_1.COMPILE_TYPE.miniGame:config_1.COMPILE_TYPE.miniProgram,[e.filePath]))[e.filePath]}else{i=(await this.getCodeByFileList(this.isGameType(t)?config_1.COMPILE_TYPE.miniGamePlugin:miniProgramPlugin,[e.filePath]))[e.filePath]}if(!i){const t=new Error(`summer-compiler miss ${e.root} js file, ${e.filePath}`);throw t.code="ENOENT",t}if("error"in i)throw i.error;return Object.assign({filePath:e.filePath,code:i.code,map:i.map,mtime:i.mtime},i.jsTag)}async compile(e){Date.now();this.progressUpdateFromCompileOptions=e.onProgressUpdate;const t=(await this.getPackageFiles(this.isGameType(this.project.type)?miniGame:miniProgram,config_1.FullPkg,e.resultType,e.useCache)).map((e=>e.path)),i=await this.safeRunTask("compileNewLogic",Object.assign(Object.assign({},e),{fileList:t,analyzer:void 0}),this.onProgressUpdate),s=i.app,a=Object.keys(s).filter((e=>e.endsWith(".json"))),o=await this.compileOther(this.isGameType(this.project.type)?miniGame:miniProgram,e.resultType||"prod",a);let r={};if(this.isPluginType(this.project.type)){const t=i.plugin,a=Object.keys(t).filter((e=>e.endsWith(".json"))),n=await this.compileOther(this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin,e.resultType||"prod",a);Object.keys(o).forEach((e=>{r[path_1.default.posix.join("miniprogram",e)]=o[e]})),Object.keys(n).forEach((e=>{r[path_1.default.posix.join("plugin",e)]=n[e]})),Object.keys(s).forEach((e=>{r[path_1.default.posix.join("miniprogram",e)]=s[e]})),Object.keys(t).forEach((e=>{r[path_1.default.posix.join("plugin",e)]=t[e]})),r["project.config.json"]=JSON.stringify({miniprogramRoot:"miniprogram",pluginRoot:"plugin",__compileDebugInfo__:{useSummer:!0}})}else r=Object.assign(Object.assign({},o),s),r["project.config.json"]=JSON.stringify({miniprogramRoot:"",__compileDebugInfo__:{useSummer:!0}});this.onProgressUpdate(111,"success",locales_1.default.config.SUMMER_PACK_FILES_FINISH.format());for(const e of Object.keys(r))"object"==typeof r[e]&&"Buffer"===r[e].type&&(r[e]=Buffer.from(r[e].data));return r}async compileOther(e,t,i){const s=(0,tools_1.getSupportCodeFileExtSet)(this.project);s.delete(".json");const a=await(0,white_ext_list_1.getWhiteExtList)();let o=a.MiniProgramWhiteList;this.isGameType(this.project.type)&&(o=a.GameWhiteList);const r=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,n=await this.filterFactory(t),c=this.project.getFileList(r,"").filter((t=>{const a=path_1.default.posix.extname(t),c=path_1.default.posix.relative(r,t);return!(!o.has(a)||s.has(a)||i.includes(c))&&n(e,t)===config_1.EFilterCode.Include})),l=await(0,common_1.compileOther)(this.project,c,{onProgressUpdate:()=>{}}),p={};for(const e in l){p[path_1.default.posix.relative(r,e)]=l[e]}return p}async compile2(e){const t=await this.safeRunTask("compile",e,((t,i,s)=>{var a;null===(a=e.onProgressUpdate)||void 0===a||a.call(e,{id:t.toString(),status:i,message:s})}));for(const e of Object.keys(t))"object"==typeof t[e]&&"Buffer"===t[e].type&&(t[e]=Buffer.from(t[e].data));return t}async getPluginJSON(e=""){return(await this.getConf(this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin)).plugin}async getPluginPageJSON(e){const t=await this.getConf(miniProgramPlugin),i=t.pages[e]||t.comps[e];if(!i)throw new Error(`summer-compiler 收集plugin json配置有遗漏, ${e}`);return i}async getPluginComponents(){const e=await this.getConf(miniProgramPlugin),t=new Set(Object.keys(e.pages).concat(Object.keys(e.comps)));return Array.from(t)}async getPluginJSFiles(){const e=this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin,t=(await this.getPackageFiles(e,config_1.FullPkg)).map((e=>e.path)).filter((e=>e.endsWith(".js"))),i=await this.getCodeByFileList(e,t);return{jsFiles:t,content:t.reduce(((e,t)=>{const s=i[t];if(!s)throw`lack of ${t} code`;if("error"in s)throw s.error;return e[t]=s.code,e[`./${t}`]=s.code,e}),{})}}async getPluginWxssFiles(){const e=(await this.getPackageFiles(miniProgramPlugin,config_1.FullPkg)).map((e=>e.path)).filter((e=>e.endsWith(".wxss"))),t=await this.getCodeByFileList(miniProgramPlugin,e);return{wxssFiles:e,content:e.reduce(((e,i)=>{const s=t[i];if(!s)throw`lack of ${i} code`;if("error"in s)throw s.error;return e[i]=s.code,e[`./${i}`]=s.code,e}),{})}}async getPluginWxmlAndWxsFiles(){const e=(await this.getPackageFiles(miniProgramPlugin,config_1.FullPkg)).map((e=>e.path)),t=e.filter((e=>e.endsWith(".wxml"))),i=e.filter((e=>e.endsWith(".wxs"))),s=await this.getCodeByFileList(miniProgramPlugin,t.concat(i));return{wxmlFiles:t,wxsFiles:i,content:t.concat(i).reduce(((e,t)=>{const i=s[t];if(!i)throw`lack of ${t} code`;if("error"in i)throw i.error;return e[t]=i.code,e[`./${t}`]=i.code,e}),{})}}async checkThemeJSON(e){return(await this.getConf(miniProgram)).theme}setProxy(e){(0,request_1.setCiProxy)(e)}setLocale(e){this._locale!==e&&(this._locale=e,this.safeRunTask("setLocale",e))}async uglifyFileNames(e,t,i){return await(0,uglifyfilenames_1.uglifyFileNames)(e,t,i)}async getMPFileInfo(){return this.safeRunTask("getLocalFileList",miniProgram)}async getPluginFileInfo(){return this.safeRunTask("getLocalFileList",miniProgramPlugin)}async getCompAndPagesOfConf(){const e=await this.getConf(miniProgram);return{pages:e.pages,comps:e.comps}}async getFiltedFileListReason(e){const t=this.project.getFileList(this.project.miniprogramRoot),i=[],s=await this.filterFactory(e),a=this.isGameType(this.project.type)?miniGame:miniProgram;for(const e of t){const t=s(a,e);t!==config_1.EFilterCode.Include&&i.push({file:e,code:t})}if(this.isPluginType(this.project.type)){const e=this.project.getFileList(this.project.pluginRoot),t=this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin;for(const a of e){const e=s(t,a);e!==config_1.EFilterCode.Include&&i.push({file:a,code:e})}}return i}}exports.SummerCompiler=SummerCompiler;
@@ -0,0 +1 @@
1
+ !function(e,o){"use strict";const n=["window","top","document","frames","self","location","navigator","localStorage","history","Caches","screen","alert","confirm","prompt","fetch","XMLHttpRequest","WebSocket","webkit","WeixinJSCore","Reporter","print","URL","DOMParser","requestAnimationFrame","getComputedStyle","Node","upload","preview","build","showDecryptedInfo","cleanAppCache","syncMessage","checkProxy","showSystemInfo","showMyOpenId","restoreLocalData","openVendor","openCrashDir","openCache","openEngine","cleanEngineWASM","openEditorCache","openToolsLog","showRequestInfo","help","showDebugInfoTable","closeDebug","showDebugInfo","__global","getMessageTunnelInfo","loadBabelMod","openInspect","openGameEngineDebugMode","closeGameEngineDebugMode","openGameEngineAssetsInspect","openUserDataPath"].join(",");module.exports={noBrowser:n}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(e,r){"use strict";const n=e("./appservice.config");module.exports={inlineSourceMap:function(e,r,n){try{if(r){const o="string"==typeof r?r:JSON.stringify(r);return`${e}\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,${Buffer.from(o).toString("base64")}${n?`\n//# sourceURL=${n}`:""}`}}catch(e){}return e},inlineSourceMapFile:function(e,r){try{if(r)return`${e}\n//# sourceMappingURL=${r}`}catch(e){console.error(e)}return e},wrapSourceCodeInDefine:function(e,r,o=""){return`define("${e.replace(/"/g,'\\"')}", (function(require, module, exports, ${n.noBrowser}){ ${r}\n}));${o}`},wrapGameSourceCodeInDefine:function(e,r,n=""){return`define("${e.replace(/"/g,'\\"')}", (function(require, module, exports, process){ ${r}\n}));${n}`}}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(e,n){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=async function(e,n){try{return{success:!0,content:await d(e,n)}}catch(t){return{success:!1,content:await(0,i.handleError)(e,n,t)}}},exports.getBabelCodeByName=g,exports.getBabelHelperAndDepsCode=h,exports.getAppCode=v;const t=e("tslib"),r=e("../../../utils/tools"),a=e("../trans/transwxmltojs"),o=e("../../../utils/helper_util"),i=e("../utils/handleerror/handleerror"),s=t.__importDefault(e("./getjsfile")),c=e("licia/concat"),p=e("licia/isEmpty"),u=e("licia/unique"),l=e("../utils/taskmanager"),_=e("./getmainpkgsortedjsfiles"),f=e("./getwxappcode"),w=e("./appservice.config");async function d(e,n){const t=[];!function(e){e.push('\n var __wxAppData = __wxAppData || {};\n var __wxRoute = __wxRoute || "";\n var __wxRouteBegin = __wxRouteBegin || "";\n var __wxAppCode__ = __wxAppCode__ || {};\n var global = global || {};\n var __WXML_GLOBAL__=__WXML_GLOBAL__ || {};\n var __wxAppCurrentFile__=__wxAppCurrentFile__||"";\n var Component = Component || function(){};\n var definePlugin = definePlugin || function(){};\n var requirePlugin = requirePlugin || function(){};\n var Behavior = Behavior || function(){};\n var __vd_version_info__ = __vd_version_info__ || {};\n ')}(t);const r=await async function(e,n,t){const r=await(0,a.transWXMLToJS)(e,n,{app:!0});return t.push(r.code),r}(e,n,t),{hasAppJS:o,pageFiles:i,componentFiles:p,functionalPageFiles:u,otherFiles:l,allFiles:f}=await _(e,n),{otherJsFiles:w,jsPagesFiles:d,components:g}=await n.getAllSortedJSFiles(),m=w.concat(d).concat(g);return o&&m.push("app.js"),await async function(e,n,t,r,a,o,i,p,u,l){const _=u.map((e=>`${e}.js`)),f=await Promise.all(l.map((t=>{const r=(0,s.default)(e,n,t,{});return new Promise((e=>{r.then((n=>{e(Object.assign(Object.assign({},n),{scriptLink:t}))}))}))})));let w=[],d=[f.map((e=>(e.helpers&&(w=c(w,e.helpers)),_.indexOf(e.scriptLink)>-1?e.code:""))).filter((e=>!!e)).join("\n")];const g=await h(e,w);d=c(Array.from(g.values()),d),t.push(d.join("\n")),r&&t.push("\n try {\n require(\"app.js\")\n } catch (error) {\n !error.from && console.error('app.js错误:\\n',error)\n throw error\n }")}(e,n,t,o,0,0,0,0,f,m),await v(e,n,t,r,p,i),t.join("\n")}async function g(e,n){return function(e,n){return`define("${(0,r.escapeQuot)(e,'"')}", function(require, module, exports, ${w.noBrowser}){ ${n} \n})`}(`${n}.js`,await(0,o.getHelperContent)(e,n))}async function h(e,n){if(!p(n)){n=u(n);const t=(0,o.getHelperDeps)(e,new Set(n)),r=new Map;for(const n of t){const t=await g(e,n);r.set(n,t)}return r}return new Map}async function v(e,n,t,r,a,o){const i=new l;for(const s of a.concat(o)){const a=async function(){t.push(await f.getWxAppCodeOfPage(e,n,s,r.name))};i.addTask(a)}await i.runAllAsync()}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(e,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileMiniProgramJS=exports.getCompiledJS=void 0;const i=e("../../../utils/tools"),s=e("../../../utils/helper_util"),r=e("../utils/transformsourcemap"),a=e("path"),o=e("lodash");async function n(e,t,i,s){const{relativePath:a,fileName:o}=i,n=await t.compileJS({root:a,filePath:o,babelRoot:s,sourceCode:i.sourceCode,setting:e.setting||{}}),{code:c}=n;return Object.assign(Object.assign(Object.assign({},n),((e,t)=>{let i,s="",a="";if(t)try{i="string"==typeof t?JSON.parse(t):t,i=Object.assign(Object.assign({},i),{mappings:`;${i.mappings}`}),s=JSON.stringify(i),a=JSON.stringify(Object.assign(Object.assign({},i),{sources:(0,r.transformSourceMapSources)(i.sources)})),e=`\n${e}`}catch(e){s="",a="",i=void 0}return{code:e,map:i,mapString:s,basenameMapString:a}})(c,n.map)),{customTranslated:!n.isBabelIgnore&&!n.isLargeFile})}const c=async(e,t,i)=>{const r=(e=>(0,s.getHelperOutputPath)(e.setting))(e);return await n(e,t,i,r)};exports.getCompiledJS=async(e,t,s)=>{const{relativePath:r,fileName:n,onAfterRun:p}=s,l=(0,i.normalizePath)(a.posix.join(e.projectPath,r,n)),g=await c(e,t,Object.assign({},s));return g.filePath=l,"function"==typeof p&&p(),o.cloneDeep(Object.assign(Object.assign({},g),{helpers:g.helpers.reduce(((e,t)=>(e[t]=!0,e)),{})}))};exports.compileMiniProgramJS=async(e,t,i)=>await(0,exports.getCompiledJS)(e,t,{fileName:i,relativePath:e.miniprogramRoot||"",resultType:"dev",type:"miniProgram"})}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(e,o){"use strict";const r=e("tslib"),t=e("../utils/transformsourcemap"),s=r.__importDefault(e("./generatecode.utils")),i=e("./getcompiledjs"),{inlineSourceMap:c,wrapSourceCodeInDefine:n,wrapGameSourceCodeInDefine:u}=s.default;let a,l=[];let m,d=[];module.exports=async function(e,o,r,s={injectHelpers:!0}){r=decodeURI(r);let p,f="";p=await(0,i.compileMiniProgramJS)(e,o,r),p.isBabelIgnore&&!s.noWarnings&&function(e){d.push(e),m&&clearTimeout(m),m=setTimeout((()=>{d=[]}),1e3)}(r),p.isLargeFile&&!s.noWarnings&&function(e){l.push(e),a&&clearTimeout(a),a=setTimeout((()=>{a=void 0,l=[]}),1e3)}(r);const g=p.customTranslated?Object.keys(p.helpers):[],S=s.isGame?u:n,y=function(e,o){return o.injectHelpers&&(null==e?void 0:e.length)?`loadBabelMod(${JSON.stringify(e)}${o.injectHelpersSync?", {sync: true}":""});`:""}(g,s);return p.code=S(r,p.code,y),s.formatResult&&(p=s.formatResult(p)),f=p.customTranslated?s.sourceURL?c(p.code,"",s.sourceURL):c(p.code,""):p.map?s.sourceURL?c(p.code,JSON.stringify(Object.assign(Object.assign({},p.map),{sources:(0,t.transformSourceMapSources)(p.map.sources)})),s.sourceURL):c(p.code,JSON.stringify(p.map)):p.code,{code:f,helpers:g}}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(t,e){"use strict";const a=t("tslib"),i=a.__importDefault(t("../utils/appconfig/appconfig")),l=a.__importDefault(t("../../../utils/packOptionsHelper.js"));module.exports=async(t,e)=>{l.default.updateState(t);const a=await i.default.getAppConfig(t,e),n=await e.getMainPkgSortedJSFiles();let p;for(p in n)"hasAppJS"!==p&&(n[p]=l.default.filter(n[p].map((t=>`${t}.js`))).map((t=>t.replace(/\.js$/,""))));if(a.functionalPages){const t=n.functionalPageFiles.map((t=>`__wx__/${t}`));t.unshift("__wx__/functional-page"),n.functionalPageFiles=t}return n}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(e,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=async function(e,t,n){try{return{success:!0,content:await c(e,t,n)}}catch(n){return{success:!1,content:await(0,a.handleError)(e,t,n)}}},exports.getSubpackageAppServiceBuildCore=c;const n=e("tslib"),s=e("../trans/transwxmltojs"),a=e("../utils/handleerror/handleerror"),r=n.__importDefault(e("./getjsfile")),i=e("./getappservice"),o=e("./getsubpkgsortedjsfiles");async function c(e,t,n){const a=[],c=n.root,u=await async function(e,t,n,a){const r=await(0,s.transWXMLToJS)(e,t,{page:n,app:!1});return a.push(r.code),r}(e,t,c,a),{allFiles:p,componentFiles:l,pageFiles:d}=await o(e,t,c);return await async function(e,t,n,s){const a=[(await Promise.all(s.map((n=>{const s=(0,r.default)(e,t,`${n}.js`,{});return new Promise((e=>{s.then((t=>{e(Object.assign(Object.assign({},t),{scriptLink:n}))}))}))})))).map((e=>e.code)).join("\n")];n.push(a.join("\n"))}(e,t,a,p),await(0,i.getAppCode)(e,t,a,u,l,d),a.join("\n")}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(e,t){"use strict";const i=e("tslib"),l=i.__importDefault(e("../utils/appconfig/appconfig")),s=i.__importDefault(e("../../../utils/packOptionsHelper"));module.exports=async(e,t,i)=>{const a=[],r=[],n=[],c=[];if(await l.default.checkIsInSubPackage(e,t,i)){const e=await t.getSubPkgSortedJSFiles(i);let l;for(l in e)"entryJS"!==l&&(e[l]=s.default.filter(e[l].map((e=>`${e}.js`))).map((e=>e.replace(/\.js$/,""))));return Object.assign(Object.assign({},e),{allFiles:e.allFiles.concat(c),extendedLibFiles:c})}return{allFiles:[...c,...r,...n,...a],pageFiles:a,componentFiles:n,otherFiles:r,extendedLibFiles:c}}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(e,t){"use strict";const o=e("tslib"),r=e("../../../utils/tools"),n=o.__importDefault(e("../utils/appconfig/appconfig")),a=e("../utils/appconfig/checkcustomcomponent"),c=o.__importDefault(e("../utils/appconfig/wxappcodejson")),d=e("../utils/taskmanager");async function i(e,t,o,n,a=!0){let d={};try{d=await(0,c.default)(e,t,decodeURI(o))}catch(e){d={}}let i=`\n var decodePathName = decodeURI("${(0,r.escapeQuot)(o,'"')}")\n __wxAppCode__[decodePathName + ".json"] = ${JSON.stringify(d)}\n __wxAppCode__[decodePathName + ".wxml"] = ${n}("./" + decodePathName + ".wxml")\n `;return a&&(i+="\n __wxRoute = decodePathName\n __wxRouteBegin = true\n __wxAppCurrentFile__ = decodePathName + \".js\"\n try {\n require(__wxAppCurrentFile__)\n } catch (error) {\n // 插件项目不能hack define和require,走这里,异常只能精准到页面,内部的多层依赖的报错无法精准\n !error.from && console.error('页面【' + decodePathName + ']错误:\\n',error)\n throw error\n }"),i}module.exports={getWxAppCode:async function(e,t,o=!0){const c=await n.default.getAppConfig(e,t),p=await(0,a.getFileListJustInPack)(e,t,c),u=[],_=new d;for(const r of p)_.addTask(i,e,t,r,"$gwx",o);return u.push(...await _.runAllAsync()),(0,r.escapeScript)(u.join("\n"))},getWxAppCodeOfPage:i,getWxAppCodeJsonOfPage:async function(e,t,o){let n={};try{n=await(0,c.default)(e,t,decodeURI(o))}catch(e){n={}}return`\n var decodePathName = decodeURI("${(0,r.escapeQuot)(o,'"')}")\n __wxAppCode__[decodePathName + ".json"] = ${JSON.stringify(n)}\n `},getWxAppCodeWxmlOfPage:function(e,t,o,n=!0){let a=`\n var decodePathName = decodeURI("${(0,r.escapeQuot)(t,'"')}")\n __wxAppCode__[decodePathName + ".wxml"] = ${o}("./" + decodePathName + ".wxml")\n `;return n&&(a+="\n __wxRoute = decodePathName\n __wxRouteBegin = true\n __wxAppCurrentFile__ = decodePathName + \".js\"\n try {\n require(__wxAppCurrentFile__)\n } catch (error) {\n // 插件项目不能hack define和require,走这里,异常只能精准到页面,内部的多层依赖的报错无法精准\n !error.from && console.error('页面【' + decodePathName + ']错误:\\n',error)\n throw error\n }"),a}}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(_,R){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.appErrCode=void 0,exports.appErrCode={APP_JSON_READ_ERR:10001,APP_JSON_PARSE_ERR:10002,APP_JSON_PAGES_ERR:10003,APP_JSON_ENTRANCE_NOT_FOUND_ERR:1004,APP_JSON_CONTENT_ERR:10005,PAGES_JSON_PARSE_ERR:10006,APP_JSON_WXML_NOT_FOUND:10007,APP_JSON_JS_NOT_FOUND:10008,JSON_CONTENT_ERR:10009,EXT_JSON_PARSE_ERR:10011,EXT_JSON_PAGES_ERR:10012,EXT_JSON_CONTENT_ERR:10013,APPSERVICE_LOSE_WXML:10021,APPSERVICE_LOSE_JS:10022,FILE_NOT_UTF8:10031,BABEL_TRANS_JS_ERR:10032,UGLIFY_JS_ERR:10033,BABILI_JS_ERR:10034,JS_ES6_ERR:10035,FILE_FLAT_ERR:10036,POST_WXSS_ERR:10037,TRANS_WXML_JS_ERR:10040,TRANS_WXSS_JS_ERR:10041,SUMMER_PLUGIN_ERR:10045,SUMMER_PLUGIN_CODE_ERR:10046,VENDOR_MD5_NOT_MATCH:10050,VENDOR_WCC_FILE_NOT_FOUND:10051,VENDOR_WCSC_FILE_NOT_FOUND:10052,CODE_SIZE_EXCEED:10060,GET_GEO_LOCATION_ERR:10070,QCLOUD_SVR_NO_FOUND_ERR:10080,QCLOUD_SVR_POLL_TIMEOUT:10081,QCLOUD_SVR_POLL_DOING:10082,QCLOUD_SVR_UP_DIR_CHECK:10083,PLUGIN_JSON_READ_ERR:10091,PLUGIN_JSON_PARSE_ERR:10092,PLUGIN_JSON_CONTENT_ERR:10093,PLUGIN_PAGE_JSON_PARSE_ERR:10094,PLUGIN_JSON_FILE_NOT_FOUND:10095,PLUGIN_PAGE_JSON_CONTENT_ERR:10096,PLUGIN_TRANS_WXML_JS_ERR:10097,PLUGIN_TRANS_WXSS_JS_ERR:10101,PLUGIN_JS_ES6_ERR:10098,PLUGIN_ONLINE_CODE_UNPACK_ERR:10099,PAGE_JSON_PARSE_ERR:10020,SITE_MAP_JSON_CONTENT_ERROR:10100}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(e,t){"use strict";const i=e("minimatch");function r(e,t,i=!1){return i?e.startsWith(t)?e.slice(1):e:e.startsWith(t)?e:t+e}function n(e,t){const n=e.slice(e.lastIndexOf("/")+1);let s=!1;if(!t)return!1;const l=t.value.toLowerCase();if("prefix"===t.type)s=n.startsWith(l);else if("suffix"===t.type)s=n.endsWith(l);else if("folder"===t.type)s=r(e,"/").startsWith(function(e,t,i=!1){return i?e.endsWith(t)?e.slice(0,e.length-1):e:e.endsWith(t)?e:e+t}(r(l,"/"),"/"));else if("file"===t.type)s=r(e,"/")===r(l,"/");else if("glob"===t.type)try{s=i(e,l)||i(r(e,"/"),l)}catch(e){console.error(`project.config.json packOptions rule ${l} invalid; ${e}`),s=!1}else if("regexp"===t.type)try{s=new RegExp(l,"igm").test(e)||new RegExp(l,"igm").test(r(e,"/"))}catch(e){console.error(`project.config.json packOptions rule ${l} invalid; ${e}`),s=!1}return s}const s=function(e){let t=null,i=null,r=Object.create(null);return function(e,s,l=null){if(s.length<1)return!1;if(t===s&&i===l){if(void 0!==r[e])return r[e]}else t=s,i=l,r=Object.create(null);const o=e.replace(/\\/g,"/").toLowerCase();if(!o)return!1;let c=!1;for(const e of s)if(c=n(o,e),c)break;if(l){let e=!1;for(const t of l)if(e=n(o,t),e){c=!1;break}}return r[e]=c,c}};module.exports={isFileIgnored:s(),isFileIncluded:s()}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(e,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=async function(e,t){try{return{success:!0,content:await r(e,t)}}catch(s){return{success:!1,errMsg:await(0,n.handleError)(e,t,s),content:new Map}}};const s=e("tslib").__importDefault(e("path")),n=e("./utils/handleerror/handleerror");async function r(e,t){let n=[];const r=await t.getMPFileInfo(),i=await t.getCompAndPagesOfConf();return n=Object.keys(r).filter((e=>{const t=s.default.extname(e);return!(".json"===t&&(i.pages[e.slice(0,e.length-t.length)]||i.comps[e.slice(0,e.length-t.length)])||["app.json","project.config.json","project.private.config.json","sitemap.json","ext.json"].includes(e)||e.endsWith(".wxml")||e.endsWith(".wxss")||e.endsWith(".js")||e.endsWith(".ts")||e.endsWith(".scss")||e.endsWith(".sass")||e.endsWith(".scss"))})),n}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(e,n){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=async function(e,n){try{return{success:!0,content:await o(e,n)}}catch(t){return{success:!1,errMsg:await(0,a.handleError)(e,n,t),content:new Map}}};const t=e("tslib").__importDefault(e("./utils/appconfig/appconfig")),a=e("./utils/handleerror/handleerror"),r=e("./utils/tools"),s="$gwx";async function o(e,n){const a=new Map,o=await n.getAllWxmlAndWxsFiles(),i=await t.default.getAppConfig(e,n,!0);return o.wxmlFiles.forEach((e=>{const n=e.slice(0,e.length-5),t=function(e,n){let t=s;return n&&(t=`$${Buffer.from(n.root).toString("hex")}`),`\n <style> </style> <page></page>\n <script>\n var __setCssStartTime__ = Date.now();\n __wxAppCode__['${e}.wxss']();\n var __setCssEndTime__ = Date.now();\n (function() {\n var gf = ${t}( './${e}.wxml' ); \n\n if (window.__wxAppCodeReadyCallback__) {\n window.__wxAppCodeReadyCallback__(gf);\n } else {\n document.dispatchEvent(new CustomEvent( "generateFuncReady", {\n detail: {\n generateFunc: gf\n }\n }));\n }\n })();\n <\/script>`}(n,(0,r.checkIsInSubPackage)(i,n));a.set(`${n}.html`,t)})),a}}(require("licia/lazyImport")(require),require);
@@ -0,0 +1 @@
1
+ !function(e,t){"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FullCompiler=void 0,exports.checkProjectOKForWeb=w;const r=e("tslib"),o=r.__importDefault(e("path")),p=r.__importDefault(e("fs-extra")),i=e("../../utils/tools"),s=e("../../utils/miniappJson"),l=r.__importDefault(e("./appservice/getappservice")),a=r.__importDefault(e("./pageframe")),n=r.__importDefault(e("./utils/appconfig/appconfig")),u=r.__importDefault(e("./utils/filewriter")),c=r.__importDefault(e("./getallwmltohtmlmap")),d=r.__importDefault(e("./getallrawfiles")),m=r.__importDefault(e("./appservice/getsubpackage")),g=r.__importDefault(e("./pageframe/getsubpackage")),f=e("./app/app"),h=e("../../utils/env");async function j(e,t,r){let o={};try{o=r?await n.default.checkDarkmodeAppConfig(e,t):await n.default.checkLightAppConfig(e,t),o=n.default.DealSubPackages(o)}catch(e){return{success:!1,content:"{}"}}return{success:!0,content:JSON.stringify(o)}}function w(e){return["workers","functionalPages","lazyCodeLoading","serviceProviderTicket","supportedMaterials","embeddedAppIdList","halfPage"].forEach((e=>{})),["useExtendedLib","plugins"].forEach((e=>{})),!0}exports.FullCompiler=class{constructor(e,t){this.project=e,this.summerCompiler=t.summerCompiler,this.outputDir=t.outputDir}async compileFull(e={}){var t,r,p,s;let n=(null==e?void 0:e.outputDir)||this.outputDir;w(this.project)||(null===(t=(0,i.getTerm)())||void 0===t||t.error.red("\nProject is not available for web\n"),process.exit());const m=null===(r=(0,i.getTerm)())||void 0===r?void 0:r.progressBar({width:80,title:"compile miniprogram:",inline:!0,titleSize:40,percent:!0,syncMode:!0});n||(n=o.default.join(this.project.projectPath,this.project.miniprogramRoot,`../${o.default.basename(this.project.projectPath)}_web`));const g=new u.default({projectPath:o.default.join(this.project.projectPath,this.project.miniprogramRoot),dist:n}),f=g.dist;null==m||m.update({progress:.1,title:"app-service"});const h=await(0,l.default)(this.project,this.summerCompiler);if(!h.success)return null==m||m.update({progress:1,title:"done: compiled app-service error"}),null==m||m.stop(),f;g.writeFile("app/app-service.js",h.content),null==m||m.update({progress:.5,title:"app-service"}),null==m||m.update({progress:.6,title:"page-frame"});const v=await(0,a.default)(this.project,this.summerCompiler,{multi:!1});if(!v.success)return null==m||m.update({progress:1,title:"done: compiled page-frame error"}),null==m||m.stop(),f;g.writeFile("app/page-frame.html",v.content),null==m||m.update({progress:.6,title:"page-frame"}),null==m||m.update({progress:.7,title:"app/app-config.json"});const b=await j(this.project,this.summerCompiler,!1);if(!b.success)return null==m||m.update({progress:1,title:"done: compile app/app-config.json error"}),null==m||m.stop(),f;g.writeFile("app/app-config.json",b.content),null==m||m.update({progress:.75,title:"app/app-config.json"}),null==m||m.update({progress:.8,title:"app/app-config-darkmode.json"});const k=await j(this.project,this.summerCompiler,!0);if(!k.success)return null==m||m.update({progress:1,title:"done: compile app/app-config-darkmode.json error"}),null==m||m.stop(),f;g.writeFile("app/app-config-darkmode.json",k.content),null==m||m.update({progress:.85,title:"app/app-config-darkmode.json"}),null==m||m.update({progress:.9,title:"pages's html"});const C=await(0,c.default)(this.project,this.summerCompiler);if(!C.success)return null==m||m.update({progress:1,title:"done: compile getAllWXMLToHTMLMap error"}),null==m||m.stop(),f;C.content.forEach(((e,t)=>{g.writeFile(o.default.join("app",t),e)})),null==m||m.update({progress:.95,title:"copy raw files"});const F=await(0,d.default)(this.project,this.summerCompiler);return F.success?(F.content.forEach((e=>{g.copyFile(e,"app")})),null==m||m.update({progress:1,title:"done"}),null===(p=(0,i.getTerm)())||void 0===p||p("\n\n"),null===(s=(0,i.getTerm)())||void 0===s||s.column(1),e.genWxapkg,f):(null==m||m.update({progress:1,title:"done: compile getAllRawFilesMap error"}),null==m||m.stop(),f)}async compileMulti(e={}){var t,r,p,s;let f=(null==e?void 0:e.outputDir)||this.outputDir;w(this.project)||(null===(t=(0,i.getTerm)())||void 0===t||t.error.red("\nProject is not available for web\n"),process.exit()),f||(f=o.default.join(this.project.projectPath,this.project.miniprogramRoot,`../${o.default.basename(this.project.projectPath)}_web`));const h=null===(r=(0,i.getTerm)())||void 0===r?void 0:r.progressBar({width:80,title:"compile miniprogram:",percent:!0,titleSize:50,inline:!0,syncMode:!0}),v=new u.default({projectPath:o.default.join(this.project.projectPath,this.project.miniprogramRoot),dist:f}),b=v.dist;null==h||h.update({progress:.1,title:"app-service"});const k=await(0,l.default)(this.project,this.summerCompiler);if(!k.success)return null==h||h.update({progress:1,title:"done: compiled app-service error"}),null==h||h.stop(),b;v.writeFile("app/app-service.js",k.content),null==h||h.update({progress:.3,title:"app-service"}),null==h||h.update({progress:.3,title:"page-frame"});const C=await(0,a.default)(this.project,this.summerCompiler,{multi:!0});if(!C.success)return null==h||h.update({progress:1,title:"done: compiled page-frame error"}),null==h||h.stop(),b;v.writeFile("app/app-wxss.js",C.content),v.writeFile("app/page-frame.js","var __pageFrameJsStartTime__ = Date.now();"),null==h||h.update({progress:.5,title:"page-frame"}),null==h||h.update({progress:.5,title:"app/app-config.json"});const F=await j(this.project,this.summerCompiler,!1);if(!F.success)return null==h||h.update({progress:1,title:"done: compile app/app-config.json error"}),null==h||h.stop(),b;v.writeFile("app/app-config.json",F.content),null==h||h.update({progress:.6,title:"app/app-config.json"}),null==h||h.update({progress:.6,title:"app/app-config-darkmode.json"});const P=await j(this.project,this.summerCompiler,!0);if(!P.success)return null==h||h.update({progress:1,title:"done: compile app/app-config-darkmode.json error"}),null==h||h.stop(),b;v.writeFile("app/app-config-darkmode.json",P.content),null==h||h.update({progress:.7,title:"app/app-config-darkmode.json"}),null==h||h.update({progress:.7,title:"subpackages's pages"});const _=await n.default.getAppConfig(this.project,this.summerCompiler,!0);if(_.subpackages||_.subPackages){const e=_.subpackages||_.subPackages;for(const t of e){null==h||h.update({progress:.8,title:`${t.root} subpackages app-service.js html`});const e=await(0,m.default)(this.project,this.summerCompiler,t),r=t.root;if(!e.success)return null==h||h.update({progress:1,title:`error! compile subpackages ${t.root}'s app-service.js html.`}),null==h||h.stop(),b;{const t=o.default.join("app",r,"app-service.js");v.writeFile(t,e.content)}null==h||h.update({progress:.8,title:`subpackages: ${t.root}'s page-frame.js html`});const p=await(0,g.default)(this.project,this.summerCompiler,{subpkgConfig:t});if(!p.success)return null==h||h.update({progress:1,title:`error! compile subpackages ${t.root}'s page-frame.js html.`}),null==h||h.stop(),b;{const e=o.default.join("app",r,"page-frame.js");v.writeFile(e,p.content)}}}null==h||h.update({progress:.9,title:"pages's html"});const D=await(0,c.default)(this.project,this.summerCompiler);if(!D.success)return null==h||h.update({progress:1,title:"done: compile getAllWXMLToHTMLMap error"}),null==h||h.stop(),b;D.content.forEach(((e,t)=>{v.writeFile(o.default.join("app",t),e)})),null==h||h.update({progress:.9,title:"copy raw files"});const y=await(0,d.default)(this.project,this.summerCompiler);return y.success?(y.content.forEach((e=>{v.copyFile(e,"app")})),null==h||h.update({progress:1,title:"done"}),null===(p=(0,i.getTerm)())||void 0===p||p.column(1),null===(s=(0,i.getTerm)())||void 0===s||s("\n\n"),e.genWxapkg,b):(null==h||h.update({progress:1,title:"done: compile getAllRawFilesMap error"}),null==h||h.stop(),b)}async genSubPkgAppInfo(e,t,r,i,l,a,n,u,c,d){var m;const g=null==c?void 0:c.remoteDebugWsEndpoint,j=(0,s.getMiniappJson)(this.project.projectPath,this.project.targetPlatform),w=j.icon,v=j.name,b=await this.summerCompiler.getAppJSON(),k=(null===(m=null==b?void 0:b.window)||void 0===m?void 0:m.pageOrientation)||"portrait",C=await(0,f.generateSubPkgAppInfoJson)({miniModuleId:e,nickName:v,brandIconURL:w,pageOrientation:k,buildVersion:i,subpkgs:t,contact:l,cpfWxaAttrSyncResponse:a,miniappPkgType:n,miniappConnectType:d||f.IMiniappConnectType.LAN});u&&"string"==typeof u&&(C.devtoolsLocalServerUrl=u),C.devtoolsPlatform=h.isWin?"Windows":"Mac",g&&"string"==typeof g&&(C.remoteDebugWsEndpoint=g),(null==c?void 0:c.androidRemoteConfigForUSB)&&(C.appClientPortForotReloadServer=c.androidRemoteConfigForUSB.appClientPortForotReloadServer,C.appClientPortForRemoteDebugServer=c.androidRemoteConfigForUSB.appClientPortForRemoteDebugServer),p.default.ensureDirSync(o.default.dirname(r)),p.default.writeJSONSync(r,C)}}}(require("licia/lazyImport")(require),require);