miniprogram-ci 2.1.34 → 2.1.36

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 (520) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/README.md +4 -0
  3. package/dist/@types/common/code-analyse/index.d.ts +2 -0
  4. package/dist/@types/config/config.d.ts +1 -1
  5. package/dist/@types/modules/corecompiler/original/workerThread/config.d.ts +4 -3
  6. package/dist/@types/modules/corecompiler/summer/plugins/script_task/babel_script_task.d.ts +1 -0
  7. package/dist/@types/modules/corecompiler/summerCompiler.d.ts +1 -0
  8. package/dist/@types/modules/nativecompiler/ios/buildCloud.d.ts +2 -0
  9. package/dist/@types/schema/@types/appjson.d.ts +3 -0
  10. package/dist/@types/types/miniprogram-json/app.d.ts +8 -0
  11. package/dist/@types/utils/asar.d.ts +1 -0
  12. package/dist/@types/utils/customError.d.ts +1 -1
  13. package/dist/@types/utils/packOptionsHelper.d.ts +1 -1
  14. package/dist/common/code-analyse/index.js +1 -1
  15. package/dist/config/config.js +1 -1
  16. package/dist/modules/corecompiler/original/protect/fileFlatter.js +1 -1
  17. package/dist/modules/corecompiler/original/protect/uglifyfilenames.js +1 -1
  18. package/dist/modules/corecompiler/original/workerThread/config.js +1 -1
  19. package/dist/modules/corecompiler/original/workerThread/worker.js +1 -1
  20. package/dist/modules/corecompiler/original/workerThread/workerManager.js +1 -1
  21. package/dist/modules/corecompiler/summer/graph/appconf.js +1 -1
  22. package/dist/modules/corecompiler/summer/plugins/filetask/script.js +1 -1
  23. package/dist/modules/corecompiler/summer/plugins/script_task/babel_script_task.js +1 -1
  24. package/dist/modules/corecompiler/summer/plugins/script_task/swc_task.js +1 -1
  25. package/dist/modules/corecompiler/summer/worker.js +1 -1
  26. package/dist/modules/corecompiler/summerCompiler.js +1 -1
  27. package/dist/modules/nativecompiler/ios/buildCloud.js +1 -1
  28. package/dist/schema/dist/app.js +18 -0
  29. package/dist/services/common/getservice.js +1 -1
  30. package/dist/services/multiTaskManager/electron/multiTaskManager.js +1 -1
  31. package/dist/utils/asar.js +1 -0
  32. package/dist/utils/codesign.js +1 -1
  33. package/dist/utils/customError.js +1 -1
  34. package/dist/utils/packOptionsHelper.js +1 -1
  35. package/dist/utils/swc_config.js +1 -1
  36. package/dist/vendor/swc_runtime/_apply_decorated_descriptor.js +1 -1
  37. package/dist/vendor/swc_runtime/_apply_decs_2203_r.js +1 -1
  38. package/dist/vendor/swc_runtime/_array_like_to_array.js +1 -1
  39. package/dist/vendor/swc_runtime/_array_with_holes.js +1 -1
  40. package/dist/vendor/swc_runtime/_array_without_holes.js +1 -1
  41. package/dist/vendor/swc_runtime/_assert_this_initialized.js +1 -1
  42. package/dist/vendor/swc_runtime/_async_generator.js +1 -1
  43. package/dist/vendor/swc_runtime/_async_generator_delegate.js +1 -1
  44. package/dist/vendor/swc_runtime/_async_iterator.js +1 -1
  45. package/dist/vendor/swc_runtime/_async_to_generator.js +1 -1
  46. package/dist/vendor/swc_runtime/_await_async_generator.js +1 -1
  47. package/dist/vendor/swc_runtime/_await_value.js +1 -1
  48. package/dist/vendor/swc_runtime/_call_super.js +1 -0
  49. package/dist/vendor/swc_runtime/_check_private_redeclaration.js +1 -1
  50. package/dist/vendor/swc_runtime/_class_apply_descriptor_destructure.js +1 -1
  51. package/dist/vendor/swc_runtime/_class_apply_descriptor_get.js +1 -1
  52. package/dist/vendor/swc_runtime/_class_apply_descriptor_set.js +1 -1
  53. package/dist/vendor/swc_runtime/_class_apply_descriptor_update.js +1 -1
  54. package/dist/vendor/swc_runtime/_class_call_check.js +1 -1
  55. package/dist/vendor/swc_runtime/_class_check_private_static_access.js +1 -1
  56. package/dist/vendor/swc_runtime/_class_check_private_static_field_descriptor.js +1 -1
  57. package/dist/vendor/swc_runtime/_class_extract_field_descriptor.js +1 -1
  58. package/dist/vendor/swc_runtime/_class_name_tdz_error.js +1 -1
  59. package/dist/vendor/swc_runtime/_class_private_field_destructure.js +1 -1
  60. package/dist/vendor/swc_runtime/_class_private_field_get.js +1 -1
  61. package/dist/vendor/swc_runtime/_class_private_field_init.js +1 -1
  62. package/dist/vendor/swc_runtime/_class_private_field_loose_base.js +1 -1
  63. package/dist/vendor/swc_runtime/_class_private_field_loose_key.js +1 -1
  64. package/dist/vendor/swc_runtime/_class_private_field_set.js +1 -1
  65. package/dist/vendor/swc_runtime/_class_private_field_update.js +1 -1
  66. package/dist/vendor/swc_runtime/_class_private_method_get.js +1 -1
  67. package/dist/vendor/swc_runtime/_class_private_method_init.js +1 -1
  68. package/dist/vendor/swc_runtime/_class_private_method_set.js +1 -1
  69. package/dist/vendor/swc_runtime/_class_static_private_field_destructure.js +1 -1
  70. package/dist/vendor/swc_runtime/_class_static_private_field_spec_get.js +1 -1
  71. package/dist/vendor/swc_runtime/_class_static_private_field_spec_set.js +1 -1
  72. package/dist/vendor/swc_runtime/_class_static_private_field_update.js +1 -1
  73. package/dist/vendor/swc_runtime/_class_static_private_method_get.js +1 -1
  74. package/dist/vendor/swc_runtime/_construct.js +1 -1
  75. package/dist/vendor/swc_runtime/_create_class.js +1 -1
  76. package/dist/vendor/swc_runtime/_create_for_of_iterator_helper_loose.js +1 -1
  77. package/dist/vendor/swc_runtime/_create_super.js +1 -1
  78. package/dist/vendor/swc_runtime/_decorate.js +1 -1
  79. package/dist/vendor/swc_runtime/_defaults.js +1 -1
  80. package/dist/vendor/swc_runtime/_define_enumerable_properties.js +1 -1
  81. package/dist/vendor/swc_runtime/_define_property.js +1 -1
  82. package/dist/vendor/swc_runtime/_dispose.js +1 -1
  83. package/dist/vendor/swc_runtime/_export_star.js +1 -1
  84. package/dist/vendor/swc_runtime/_extends.js +1 -1
  85. package/dist/vendor/swc_runtime/_get.js +1 -1
  86. package/dist/vendor/swc_runtime/_get_prototype_of.js +1 -1
  87. package/dist/vendor/swc_runtime/_identity.js +1 -1
  88. package/dist/vendor/swc_runtime/_inherits.js +1 -1
  89. package/dist/vendor/swc_runtime/_inherits_loose.js +1 -1
  90. package/dist/vendor/swc_runtime/_initializer_define_property.js +1 -1
  91. package/dist/vendor/swc_runtime/_initializer_warning_helper.js +1 -1
  92. package/dist/vendor/swc_runtime/_instanceof.js +1 -1
  93. package/dist/vendor/swc_runtime/_interop_require_default.js +1 -1
  94. package/dist/vendor/swc_runtime/_interop_require_wildcard.js +1 -1
  95. package/dist/vendor/swc_runtime/_is_native_function.js +1 -1
  96. package/dist/vendor/swc_runtime/_is_native_reflect_construct.js +1 -1
  97. package/dist/vendor/swc_runtime/_iterable_to_array.js +1 -1
  98. package/dist/vendor/swc_runtime/_iterable_to_array_limit.js +1 -1
  99. package/dist/vendor/swc_runtime/_iterable_to_array_limit_loose.js +1 -1
  100. package/dist/vendor/swc_runtime/_jsx.js +1 -1
  101. package/dist/vendor/swc_runtime/_new_arrow_check.js +1 -1
  102. package/dist/vendor/swc_runtime/_non_iterable_rest.js +1 -1
  103. package/dist/vendor/swc_runtime/_non_iterable_spread.js +1 -1
  104. package/dist/vendor/swc_runtime/_object_destructuring_empty.js +1 -1
  105. package/dist/vendor/swc_runtime/_object_spread.js +1 -1
  106. package/dist/vendor/swc_runtime/_object_spread_props.js +1 -1
  107. package/dist/vendor/swc_runtime/_object_without_properties.js +1 -1
  108. package/dist/vendor/swc_runtime/_object_without_properties_loose.js +1 -1
  109. package/dist/vendor/swc_runtime/_overload_yield.js +1 -0
  110. package/dist/vendor/swc_runtime/_possible_constructor_return.js +1 -1
  111. package/dist/vendor/swc_runtime/_read_only_error.js +1 -1
  112. package/dist/vendor/swc_runtime/_set.js +1 -1
  113. package/dist/vendor/swc_runtime/_set_prototype_of.js +1 -1
  114. package/dist/vendor/swc_runtime/_skip_first_generator_next.js +1 -1
  115. package/dist/vendor/swc_runtime/_sliced_to_array.js +1 -1
  116. package/dist/vendor/swc_runtime/_sliced_to_array_loose.js +1 -1
  117. package/dist/vendor/swc_runtime/_super_prop_base.js +1 -1
  118. package/dist/vendor/swc_runtime/_tagged_template_literal.js +1 -1
  119. package/dist/vendor/swc_runtime/_tagged_template_literal_loose.js +1 -1
  120. package/dist/vendor/swc_runtime/_throw.js +1 -1
  121. package/dist/vendor/swc_runtime/_to_array.js +1 -1
  122. package/dist/vendor/swc_runtime/_to_consumable_array.js +1 -1
  123. package/dist/vendor/swc_runtime/_to_primitive.js +1 -1
  124. package/dist/vendor/swc_runtime/_to_property_key.js +1 -1
  125. package/dist/vendor/swc_runtime/_ts_add_disposable_resource.js +1 -0
  126. package/dist/vendor/swc_runtime/_ts_decorate.js +1 -1
  127. package/dist/vendor/swc_runtime/_ts_dispose_resources.js +1 -0
  128. package/dist/vendor/swc_runtime/_ts_generator.js +1 -1
  129. package/dist/vendor/swc_runtime/_ts_metadata.js +1 -1
  130. package/dist/vendor/swc_runtime/_ts_param.js +1 -1
  131. package/dist/vendor/swc_runtime/_ts_values.js +1 -1
  132. package/dist/vendor/swc_runtime/_type_of.js +1 -1
  133. package/dist/vendor/swc_runtime/_unsupported_iterable_to_array.js +1 -1
  134. package/dist/vendor/swc_runtime/_update.js +1 -1
  135. package/dist/vendor/swc_runtime/_using.js +1 -1
  136. package/dist/vendor/swc_runtime/_using_ctx.js +1 -0
  137. package/dist/vendor/swc_runtime/_wrap_async_generator.js +1 -1
  138. package/dist/vendor/swc_runtime/_wrap_native_super.js +1 -1
  139. package/dist/vendor/swc_runtime/_write_only_error.js +1 -1
  140. package/dist/vendor/swc_runtime/index.js +1 -1
  141. package/package.json +3 -3
  142. package/dist/@types/build-server/constant.d.ts +0 -42
  143. package/dist/@types/build-server/ctxManager.d.ts +0 -2
  144. package/dist/@types/build-server/fileCacheManager.d.ts +0 -43
  145. package/dist/@types/build-server/fileTaskDriver.d.ts +0 -36
  146. package/dist/@types/build-server/subProcess.d.ts +0 -1
  147. package/dist/@types/build-server/subTaskManager.d.ts +0 -8
  148. package/dist/@types/build-server/taskDriver.d.ts +0 -68
  149. package/dist/@types/build-server/taskFactory.d.ts +0 -22
  150. package/dist/@types/build-server/tasks/appserviceCompile/index.d.ts +0 -1
  151. package/dist/@types/build-server/tasks/appserviceCompile/utils/appdevserver/getAppService.d.ts +0 -5
  152. package/dist/@types/build-server/tasks/appserviceCompile/utils/appservice/getjsfile.d.ts +0 -19
  153. package/dist/@types/build-server/tasks/appserviceCompile/utils/appservice/getmainpkgsortedjsfiles.d.ts +0 -10
  154. package/dist/@types/build-server/tasks/appserviceCompile/utils/appservice/getwxappcode.d.ts +0 -23
  155. package/dist/@types/build-server/tasks/baseFileCompiler/OTService.d.ts +0 -7
  156. package/dist/@types/build-server/tasks/baseFileCompiler/enhance.d.ts +0 -29
  157. package/dist/@types/build-server/tasks/baseFileCompiler/es6module.d.ts +0 -44
  158. package/dist/@types/build-server/tasks/baseFileCompiler/index.d.ts +0 -3
  159. package/dist/@types/build-server/tasks/baseFileCompiler/javascript.d.ts +0 -36
  160. package/dist/@types/build-server/tasks/baseFileCompiler/less.d.ts +0 -43
  161. package/dist/@types/build-server/tasks/baseFileCompiler/minifywxml.d.ts +0 -10
  162. package/dist/@types/build-server/tasks/baseFileCompiler/readFile.d.ts +0 -2
  163. package/dist/@types/build-server/tasks/baseFileCompiler/sass.d.ts +0 -50
  164. package/dist/@types/build-server/tasks/baseFileCompiler/terser.d.ts +0 -20
  165. package/dist/@types/build-server/tasks/baseFileCompiler/typescript.d.ts +0 -25
  166. package/dist/@types/build-server/tasks/baseFileCompiler/worklet.d.ts +0 -13
  167. package/dist/@types/build-server/tasks/baseFileCompiler/wxss.d.ts +0 -33
  168. package/dist/@types/build-server/tasks/common/apperrcode.config.d.ts +0 -92
  169. package/dist/@types/build-server/tasks/common/compiletype.config.d.ts +0 -17
  170. package/dist/@types/build-server/tasks/common/constants.config.d.ts +0 -549
  171. package/dist/@types/build-server/tasks/common/simulatortype.config.d.ts +0 -15
  172. package/dist/@types/build-server/tasks/common/utils/appdevserver/getwxappcode.d.ts +0 -3
  173. package/dist/@types/build-server/tasks/common/utils/babel/babelhelpers.d.ts +0 -11
  174. package/dist/@types/build-server/tasks/common/utils/builder/builder.d.ts +0 -35
  175. package/dist/@types/build-server/tasks/common/utils/builder/filter.d.ts +0 -1
  176. package/dist/@types/build-server/tasks/common/utils/builder/index.d.ts +0 -10
  177. package/dist/@types/build-server/tasks/common/utils/cache/compile.d.ts +0 -72
  178. package/dist/@types/build-server/tasks/common/utils/cache/config.d.ts +0 -16
  179. package/dist/@types/build-server/tasks/common/utils/cache/filecompile.d.ts +0 -16
  180. package/dist/@types/build-server/tasks/common/utils/cache/jspersistcache.d.ts +0 -11
  181. package/dist/@types/build-server/tasks/common/utils/cache/manager.d.ts +0 -18
  182. package/dist/@types/build-server/tasks/common/utils/cache/persistcache.d.ts +0 -17
  183. package/dist/@types/build-server/tasks/common/utils/cache/reporter.d.ts +0 -9
  184. package/dist/@types/build-server/tasks/common/utils/colorutils.d.ts +0 -4
  185. package/dist/@types/build-server/tasks/common/utils/common/bindActionTools.d.ts +0 -8
  186. package/dist/@types/build-server/tasks/common/utils/common/schema.helper.d.ts +0 -0
  187. package/dist/@types/build-server/tasks/common/utils/common/tools.d.ts +0 -17
  188. package/dist/@types/build-server/tasks/common/utils/common/waitable.d.ts +0 -14
  189. package/dist/@types/build-server/tasks/common/utils/filerules.d.ts +0 -13
  190. package/dist/@types/build-server/tasks/common/utils/fsutils.d.ts +0 -7
  191. package/dist/@types/build-server/tasks/common/utils/handleError.d.ts +0 -0
  192. package/dist/@types/build-server/tasks/common/utils/helper/vendorValidate.d.ts +0 -0
  193. package/dist/@types/build-server/tasks/common/utils/interfacebuilder/registry/index.d.ts +0 -22
  194. package/dist/@types/build-server/tasks/common/utils/partialcompile.d.ts +0 -0
  195. package/dist/@types/build-server/tasks/common/utils/project/appconfig.d.ts +0 -5
  196. package/dist/@types/build-server/tasks/common/utils/project/appjson.d.ts +0 -2
  197. package/dist/@types/build-server/tasks/common/utils/project/customcomponent.d.ts +0 -20
  198. package/dist/@types/build-server/tasks/common/utils/project/generatecode.utils.d.ts +0 -5
  199. package/dist/@types/build-server/tasks/common/utils/project/getcompiledjs.d.ts +0 -30
  200. package/dist/@types/build-server/tasks/common/utils/project/helper/index.d.ts +0 -21
  201. package/dist/@types/build-server/tasks/common/utils/project/helper/projectconfigjsonutils.d.ts +0 -142
  202. package/dist/@types/build-server/tasks/common/utils/project/helper/reserveddirectories.d.ts +0 -3
  203. package/dist/@types/build-server/tasks/common/utils/project/helper/theme.d.ts +0 -39
  204. package/dist/@types/build-server/tasks/common/utils/project/online/appconfig.d.ts +0 -0
  205. package/dist/@types/build-server/tasks/common/utils/project/pagejson.d.ts +0 -2
  206. package/dist/@types/build-server/tasks/common/utils/project/projectconfigjson.d.ts +0 -8
  207. package/dist/@types/build-server/tasks/common/utils/project/wxappcodejson.d.ts +0 -2
  208. package/dist/@types/build-server/tasks/common/utils/subpackageUtils.d.ts +0 -0
  209. package/dist/@types/build-server/tasks/common/utils/tracing/Trace.d.ts +0 -50
  210. package/dist/@types/build-server/tasks/common/utils/tracing/aegis.d.ts +0 -3
  211. package/dist/@types/build-server/tasks/common/utils/tracing/index.d.ts +0 -34
  212. package/dist/@types/build-server/tasks/common/utils/tracing/readiness.d.ts +0 -11
  213. package/dist/@types/build-server/tasks/common/utils/tracing/report.d.ts +0 -14
  214. package/dist/@types/build-server/tasks/common/utils/trans/transwxmltojs.d.ts +0 -28
  215. package/dist/@types/build-server/tasks/common/utils/transformsourcemap.d.ts +0 -1
  216. package/dist/@types/build-server/tasks/common/utils/web/glasseaselUtils.d.ts +0 -1
  217. package/dist/@types/build-server/tasks/common/utils/web/md5.d.ts +0 -2
  218. package/dist/@types/build-server/tasks/common/utils/web/processPath.d.ts +0 -9
  219. package/dist/@types/build-server/tasks/common/weapp.config.d.ts +0 -108
  220. package/dist/@types/build-server/tasks/pageInitSourceCompile/index.d.ts +0 -2
  221. package/dist/@types/build-server/tasks/pageframeCompile/index.d.ts +0 -1
  222. package/dist/@types/build-server/tasks/pageframeCompile/utils/appdevserver/getwxappcode.d.ts +0 -8
  223. package/dist/@types/build-server/tasks/pageframeCompile/utils/trans/transwxsstojs.d.ts +0 -26
  224. package/dist/@types/build-server/testAppConfig.d.ts +0 -1
  225. package/dist/@types/build-server/testAppservice.d.ts +0 -1
  226. package/dist/@types/build-server/testInitSourceCompile.d.ts +0 -1
  227. package/dist/@types/build-server/testPageframe.d.ts +0 -1
  228. package/dist/@types/build-server/testSubProcess.d.ts +0 -1
  229. package/dist/@types/build-server/utils/fileTask.d.ts +0 -5
  230. package/dist/@types/build-server/utils/getFileOrCache.d.ts +0 -24
  231. package/dist/@types/build-server/utils/process.d.ts +0 -0
  232. package/dist/@types/build-server/utils/request.d.ts +0 -47
  233. package/dist/@types/bussinessMonitor/monitor.d.ts +0 -1
  234. package/dist/@types/modules/corecompiler/summer/pipeManager/index.d.ts +0 -6
  235. package/dist/@types/modules/corecompiler/summer/pipeManager/pipeCPProject.d.ts +0 -17
  236. package/dist/@types/modules/corecompiler/summer/pipeManager/pipeContext.d.ts +0 -10
  237. package/dist/@types/modules/corecompiler/summer/pipeManager/pipeManager.d.ts +0 -12
  238. package/dist/@types/modules/corecompiler/summer/pipeManager/pipeWorker.d.ts +0 -2
  239. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/appservicePipe/index.d.ts +0 -3
  240. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/compileWxmlToGlassEaselPipe.d.ts +0 -3
  241. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/compileWxssPipe.d.ts +0 -3
  242. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/index.d.ts +0 -2
  243. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/pageInitSourcePipe/index.d.ts +0 -4
  244. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/pageframePipe/index.d.ts +0 -3
  245. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getAppService.d.ts +0 -6
  246. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getwxappcode.d.ts +0 -9
  247. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getjsfile.d.ts +0 -12
  248. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getmainpkgsortedjsfiles.d.ts +0 -11
  249. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getwxappcode.d.ts +0 -8
  250. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/common/apperrcode.config.d.ts +0 -92
  251. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/common/tools.d.ts +0 -1
  252. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/appconfig.d.ts +0 -6
  253. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/appjson.d.ts +0 -3
  254. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/customcomponent.d.ts +0 -21
  255. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/helper/theme.d.ts +0 -40
  256. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/pagejson.d.ts +0 -3
  257. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/wxappcodejson.d.ts +0 -3
  258. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxmltojs.d.ts +0 -19
  259. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxsstojs.d.ts +0 -15
  260. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/web/processPath.d.ts +0 -9
  261. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/wccPipe.d.ts +0 -3
  262. package/dist/@types/modules/corecompiler/summer/pipeManager/types.d.ts +0 -100
  263. package/dist/@types/modules/fullcompiler/appservice/appservice.config.d.ts +0 -4
  264. package/dist/@types/modules/fullcompiler/appservice/generatecode.utils.d.ts +0 -12
  265. package/dist/@types/modules/fullcompiler/appservice/getappservice.d.ts +0 -9
  266. package/dist/@types/modules/fullcompiler/appservice/getcompiledjs.d.ts +0 -32
  267. package/dist/@types/modules/fullcompiler/appservice/getjsfile.d.ts +0 -18
  268. package/dist/@types/modules/fullcompiler/appservice/getmainpkgsortedjsfiles.d.ts +0 -12
  269. package/dist/@types/modules/fullcompiler/appservice/getsubpackage.d.ts +0 -7
  270. package/dist/@types/modules/fullcompiler/appservice/getsubpkgsortedjsfiles.d.ts +0 -10
  271. package/dist/@types/modules/fullcompiler/appservice/getwxappcode.d.ts +0 -13
  272. package/dist/@types/modules/fullcompiler/config/apperrcode.config.d.ts +0 -48
  273. package/dist/@types/modules/fullcompiler/filerules.d.ts +0 -5
  274. package/dist/@types/modules/fullcompiler/getallrawfiles.d.ts +0 -11
  275. package/dist/@types/modules/fullcompiler/getallwmltohtmlmap.d.ts +0 -11
  276. package/dist/@types/modules/fullcompiler/index.d.ts +0 -31
  277. package/dist/@types/modules/fullcompiler/pageframe/getsubpackage.d.ts +0 -10
  278. package/dist/@types/modules/fullcompiler/pageframe/getwxappcode.d.ts +0 -13
  279. package/dist/@types/modules/fullcompiler/pageframe/index.d.ts +0 -10
  280. package/dist/@types/modules/fullcompiler/trans/transwxmltojs.d.ts +0 -11
  281. package/dist/@types/modules/fullcompiler/trans/transwxsstojs.d.ts +0 -21
  282. package/dist/@types/modules/fullcompiler/trans/wxml/compilewxml.d.ts +0 -18
  283. package/dist/@types/modules/fullcompiler/trans/wxss/compilewxss.d.ts +0 -11
  284. package/dist/@types/modules/fullcompiler/utils/appconfig/appconfig.d.ts +0 -12
  285. package/dist/@types/modules/fullcompiler/utils/appconfig/appjson.d.ts +0 -3
  286. package/dist/@types/modules/fullcompiler/utils/appconfig/checkcustomcomponent.d.ts +0 -14
  287. package/dist/@types/modules/fullcompiler/utils/appconfig/pagejson.d.ts +0 -3
  288. package/dist/@types/modules/fullcompiler/utils/appconfig/wxappcodejson.d.ts +0 -3
  289. package/dist/@types/modules/fullcompiler/utils/filewriter/index.d.ts +0 -14
  290. package/dist/@types/modules/fullcompiler/utils/handleerror/errorconfig.d.ts +0 -9
  291. package/dist/@types/modules/fullcompiler/utils/handleerror/handleerror.d.ts +0 -3
  292. package/dist/@types/modules/fullcompiler/utils/handleerror/parseerr.d.ts +0 -42
  293. package/dist/@types/modules/fullcompiler/utils/index.d.ts +0 -4
  294. package/dist/@types/modules/fullcompiler/utils/taskmanager.d.ts +0 -23
  295. package/dist/@types/modules/fullcompiler/utils/theme/index.d.ts +0 -40
  296. package/dist/@types/modules/fullcompiler/utils/tools.d.ts +0 -15
  297. package/dist/@types/modules/fullcompiler/utils/transformsourcemap.d.ts +0 -1
  298. package/dist/@types/project/serverProject.d.ts +0 -38
  299. package/dist/@types/services/app/server/appDirService.d.ts +0 -6
  300. package/dist/@types/services/builder/server/builder.d.ts +0 -4
  301. package/dist/@types/services/compileCacheManager/common/compileCacheManager.d.ts +0 -23
  302. package/dist/@types/services/compileCacheManager/nw/compileCacheManager.d.ts +0 -16
  303. package/dist/@types/services/compileCacheManager/server/compileCacheManager.d.ts +0 -26
  304. package/dist/@types/services/compilewxml/server/compilewxmlService.d.ts +0 -5
  305. package/dist/@types/services/compilewxml/server/wccWorker.d.ts +0 -1
  306. package/dist/@types/services/compilewxss/server/compilewxssService.d.ts +0 -4
  307. package/dist/@types/services/compilewxss/server/wcscWorker.d.ts +0 -1
  308. package/dist/@types/services/consoledisplay/server/consoledisplay.d.ts +0 -4
  309. package/dist/@types/services/fileUtilsManager/server/fileUtilsManager.d.ts +0 -4
  310. package/dist/@types/services/fs/server/fileService.d.ts +0 -27
  311. package/dist/@types/services/genTempFile/server/genTempFileService.d.ts +0 -3
  312. package/dist/@types/services/global/server/global.d.ts +0 -6
  313. package/dist/@types/services/initializeCheck/server/initializeCheck.d.ts +0 -4
  314. package/dist/@types/services/locales/server/const.d.ts +0 -5
  315. package/dist/@types/services/locales/server/locales.d.ts +0 -5
  316. package/dist/@types/services/log/server/logService.d.ts +0 -9
  317. package/dist/@types/services/miniappjson/server/miniappjson.d.ts +0 -4
  318. package/dist/@types/services/multiTaskManager/server/multiTaskManager.d.ts +0 -5
  319. package/dist/@types/services/multiTaskManager/server/pm2TaskWorker.d.ts +0 -1
  320. package/dist/@types/services/multiTaskManager/server/pm2WorkerManager.d.ts +0 -18
  321. package/dist/@types/services/nativeModule/server/nativeModule.d.ts +0 -3
  322. package/dist/@types/services/performance/server/performance.d.ts +0 -7
  323. package/dist/@types/services/pluginFileReader/server/pluginFileReader.d.ts +0 -18
  324. package/dist/@types/services/projectManager/server/buildServerProjectManager.d.ts +0 -11
  325. package/dist/@types/services/projectManager/server/projectManager.d.ts +0 -7
  326. package/dist/@types/services/root/server/root.d.ts +0 -11
  327. package/dist/@types/services/root/server/rootService.d.ts +0 -2
  328. package/dist/@types/services/staticConfig/server/staticConfigService.d.ts +0 -4
  329. package/dist/@types/services/store/server/storeService.d.ts +0 -11
  330. package/dist/@types/services/uniapp/server/uniapp.d.ts +0 -4
  331. package/dist/build-server/constant.js +0 -1
  332. package/dist/build-server/ctxManager.js +0 -1
  333. package/dist/build-server/fileCacheManager.js +0 -1
  334. package/dist/build-server/fileTaskDriver.js +0 -1
  335. package/dist/build-server/subProcess.js +0 -1
  336. package/dist/build-server/subTaskManager.js +0 -1
  337. package/dist/build-server/taskDriver.js +0 -1
  338. package/dist/build-server/taskFactory.js +0 -1
  339. package/dist/build-server/tasks/appserviceCompile/index.js +0 -1
  340. package/dist/build-server/tasks/appserviceCompile/utils/appdevserver/getAppService.js +0 -1
  341. package/dist/build-server/tasks/appserviceCompile/utils/appservice/getjsfile.js +0 -1
  342. package/dist/build-server/tasks/appserviceCompile/utils/appservice/getmainpkgsortedjsfiles.js +0 -1
  343. package/dist/build-server/tasks/appserviceCompile/utils/appservice/getwxappcode.js +0 -1
  344. package/dist/build-server/tasks/baseFileCompiler/OTService.js +0 -1
  345. package/dist/build-server/tasks/baseFileCompiler/enhance.js +0 -1
  346. package/dist/build-server/tasks/baseFileCompiler/es6module.js +0 -1
  347. package/dist/build-server/tasks/baseFileCompiler/index.js +0 -1
  348. package/dist/build-server/tasks/baseFileCompiler/javascript.js +0 -1
  349. package/dist/build-server/tasks/baseFileCompiler/less.js +0 -1
  350. package/dist/build-server/tasks/baseFileCompiler/minifywxml.js +0 -1
  351. package/dist/build-server/tasks/baseFileCompiler/readFile.js +0 -1
  352. package/dist/build-server/tasks/baseFileCompiler/sass.js +0 -1
  353. package/dist/build-server/tasks/baseFileCompiler/terser.js +0 -1
  354. package/dist/build-server/tasks/baseFileCompiler/typescript.js +0 -1
  355. package/dist/build-server/tasks/baseFileCompiler/worklet.js +0 -1
  356. package/dist/build-server/tasks/baseFileCompiler/wxss.js +0 -1
  357. package/dist/build-server/tasks/common/apperrcode.config.js +0 -1
  358. package/dist/build-server/tasks/common/compiletype.config.js +0 -1
  359. package/dist/build-server/tasks/common/constants.config.js +0 -1
  360. package/dist/build-server/tasks/common/simulatortype.config.js +0 -1
  361. package/dist/build-server/tasks/common/utils/appdevserver/getwxappcode.js +0 -1
  362. package/dist/build-server/tasks/common/utils/babel/babelhelpers.js +0 -1
  363. package/dist/build-server/tasks/common/utils/builder/builder.js +0 -1
  364. package/dist/build-server/tasks/common/utils/builder/filter.js +0 -1
  365. package/dist/build-server/tasks/common/utils/builder/index.js +0 -1
  366. package/dist/build-server/tasks/common/utils/cache/compile.js +0 -1
  367. package/dist/build-server/tasks/common/utils/cache/config.js +0 -1
  368. package/dist/build-server/tasks/common/utils/cache/filecompile.js +0 -1
  369. package/dist/build-server/tasks/common/utils/cache/jspersistcache.js +0 -1
  370. package/dist/build-server/tasks/common/utils/cache/manager.js +0 -1
  371. package/dist/build-server/tasks/common/utils/cache/persistcache.js +0 -1
  372. package/dist/build-server/tasks/common/utils/cache/reporter.js +0 -1
  373. package/dist/build-server/tasks/common/utils/colorutils.js +0 -1
  374. package/dist/build-server/tasks/common/utils/common/bindActionTools.js +0 -1
  375. package/dist/build-server/tasks/common/utils/common/schema.helper.js +0 -1
  376. package/dist/build-server/tasks/common/utils/common/tools.js +0 -1
  377. package/dist/build-server/tasks/common/utils/common/waitable.js +0 -1
  378. package/dist/build-server/tasks/common/utils/filerules.js +0 -1
  379. package/dist/build-server/tasks/common/utils/fsutils.js +0 -1
  380. package/dist/build-server/tasks/common/utils/handleError.js +0 -1
  381. package/dist/build-server/tasks/common/utils/helper/vendorValidate.js +0 -1
  382. package/dist/build-server/tasks/common/utils/interfacebuilder/registry/index.js +0 -1
  383. package/dist/build-server/tasks/common/utils/partialcompile.js +0 -1
  384. package/dist/build-server/tasks/common/utils/project/appconfig.js +0 -1
  385. package/dist/build-server/tasks/common/utils/project/appjson.js +0 -1
  386. package/dist/build-server/tasks/common/utils/project/customcomponent.js +0 -1
  387. package/dist/build-server/tasks/common/utils/project/generatecode.utils.js +0 -1
  388. package/dist/build-server/tasks/common/utils/project/getcompiledjs.js +0 -1
  389. package/dist/build-server/tasks/common/utils/project/helper/index.js +0 -1
  390. package/dist/build-server/tasks/common/utils/project/helper/projectconfigjsonutils.js +0 -1
  391. package/dist/build-server/tasks/common/utils/project/helper/reserveddirectories.js +0 -1
  392. package/dist/build-server/tasks/common/utils/project/helper/theme.js +0 -1
  393. package/dist/build-server/tasks/common/utils/project/online/appconfig.js +0 -1
  394. package/dist/build-server/tasks/common/utils/project/pagejson.js +0 -1
  395. package/dist/build-server/tasks/common/utils/project/projectconfigjson.js +0 -1
  396. package/dist/build-server/tasks/common/utils/project/wxappcodejson.js +0 -1
  397. package/dist/build-server/tasks/common/utils/subpackageUtils.js +0 -1
  398. package/dist/build-server/tasks/common/utils/tracing/Trace.js +0 -1
  399. package/dist/build-server/tasks/common/utils/tracing/aegis.js +0 -1
  400. package/dist/build-server/tasks/common/utils/tracing/index.js +0 -1
  401. package/dist/build-server/tasks/common/utils/tracing/readiness.js +0 -1
  402. package/dist/build-server/tasks/common/utils/tracing/report.js +0 -1
  403. package/dist/build-server/tasks/common/utils/trans/transwxmltojs.js +0 -1
  404. package/dist/build-server/tasks/common/utils/transformsourcemap.js +0 -1
  405. package/dist/build-server/tasks/common/utils/web/glasseaselUtils.js +0 -1
  406. package/dist/build-server/tasks/common/utils/web/md5.js +0 -1
  407. package/dist/build-server/tasks/common/utils/web/processPath.js +0 -1
  408. package/dist/build-server/tasks/common/weapp.config.js +0 -1
  409. package/dist/build-server/tasks/pageInitSourceCompile/index.js +0 -1
  410. package/dist/build-server/tasks/pageframeCompile/index.js +0 -1
  411. package/dist/build-server/tasks/pageframeCompile/utils/appdevserver/getwxappcode.js +0 -1
  412. package/dist/build-server/tasks/pageframeCompile/utils/trans/transwxsstojs.js +0 -1
  413. package/dist/build-server/testAppConfig.js +0 -1
  414. package/dist/build-server/testAppservice.js +0 -1
  415. package/dist/build-server/testInitSourceCompile.js +0 -1
  416. package/dist/build-server/testPageframe.js +0 -1
  417. package/dist/build-server/testSubProcess.js +0 -1
  418. package/dist/build-server/utils/fileTask.js +0 -1
  419. package/dist/build-server/utils/getFileOrCache.js +0 -1
  420. package/dist/build-server/utils/process.js +0 -1
  421. package/dist/build-server/utils/request.js +0 -1
  422. package/dist/bussinessMonitor/monitor.js +0 -1
  423. package/dist/manifest.json +0 -4
  424. package/dist/modules/corecompiler/summer/pipeManager/index.js +0 -1
  425. package/dist/modules/corecompiler/summer/pipeManager/pipeCPProject.js +0 -1
  426. package/dist/modules/corecompiler/summer/pipeManager/pipeContext.js +0 -1
  427. package/dist/modules/corecompiler/summer/pipeManager/pipeManager.js +0 -1
  428. package/dist/modules/corecompiler/summer/pipeManager/pipeWorker.js +0 -1
  429. package/dist/modules/corecompiler/summer/pipeManager/pipes/appservicePipe/index.js +0 -1
  430. package/dist/modules/corecompiler/summer/pipeManager/pipes/compileWxmlToGlassEaselPipe.js +0 -1
  431. package/dist/modules/corecompiler/summer/pipeManager/pipes/compileWxssPipe.js +0 -1
  432. package/dist/modules/corecompiler/summer/pipeManager/pipes/index.js +0 -1
  433. package/dist/modules/corecompiler/summer/pipeManager/pipes/pageInitSourcePipe/index.js +0 -1
  434. package/dist/modules/corecompiler/summer/pipeManager/pipes/pageframePipe/index.js +0 -1
  435. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getAppService.js +0 -1
  436. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getwxappcode.js +0 -1
  437. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getjsfile.js +0 -1
  438. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getmainpkgsortedjsfiles.js +0 -1
  439. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getwxappcode.js +0 -1
  440. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/common/apperrcode.config.js +0 -1
  441. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/common/tools.js +0 -1
  442. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/appconfig.js +0 -1
  443. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/appjson.js +0 -1
  444. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/customcomponent.js +0 -1
  445. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/helper/theme.js +0 -1
  446. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/pagejson.js +0 -1
  447. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/wxappcodejson.js +0 -1
  448. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxmltojs.js +0 -1
  449. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxsstojs.js +0 -1
  450. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/web/processPath.js +0 -1
  451. package/dist/modules/corecompiler/summer/pipeManager/pipes/wccPipe.js +0 -1
  452. package/dist/modules/corecompiler/summer/pipeManager/types.js +0 -1
  453. package/dist/modules/fullcompiler/appservice/appservice.config.js +0 -1
  454. package/dist/modules/fullcompiler/appservice/generatecode.utils.js +0 -1
  455. package/dist/modules/fullcompiler/appservice/getappservice.js +0 -1
  456. package/dist/modules/fullcompiler/appservice/getcompiledjs.js +0 -1
  457. package/dist/modules/fullcompiler/appservice/getjsfile.js +0 -1
  458. package/dist/modules/fullcompiler/appservice/getmainpkgsortedjsfiles.js +0 -1
  459. package/dist/modules/fullcompiler/appservice/getsubpackage.js +0 -1
  460. package/dist/modules/fullcompiler/appservice/getsubpkgsortedjsfiles.js +0 -1
  461. package/dist/modules/fullcompiler/appservice/getwxappcode.js +0 -1
  462. package/dist/modules/fullcompiler/config/apperrcode.config.js +0 -1
  463. package/dist/modules/fullcompiler/filerules.js +0 -1
  464. package/dist/modules/fullcompiler/getallrawfiles.js +0 -1
  465. package/dist/modules/fullcompiler/getallwmltohtmlmap.js +0 -1
  466. package/dist/modules/fullcompiler/index.js +0 -1
  467. package/dist/modules/fullcompiler/pageframe/getsubpackage.js +0 -1
  468. package/dist/modules/fullcompiler/pageframe/getwxappcode.js +0 -1
  469. package/dist/modules/fullcompiler/pageframe/index.js +0 -1
  470. package/dist/modules/fullcompiler/trans/transwxmltojs.js +0 -1
  471. package/dist/modules/fullcompiler/trans/transwxsstojs.js +0 -1
  472. package/dist/modules/fullcompiler/trans/wxml/compilewxml.js +0 -1
  473. package/dist/modules/fullcompiler/trans/wxss/compilewxss.js +0 -1
  474. package/dist/modules/fullcompiler/utils/appconfig/appconfig.js +0 -1
  475. package/dist/modules/fullcompiler/utils/appconfig/appjson.js +0 -1
  476. package/dist/modules/fullcompiler/utils/appconfig/checkcustomcomponent.js +0 -1
  477. package/dist/modules/fullcompiler/utils/appconfig/pagejson.js +0 -1
  478. package/dist/modules/fullcompiler/utils/appconfig/wxappcodejson.js +0 -1
  479. package/dist/modules/fullcompiler/utils/filewriter/index.js +0 -1
  480. package/dist/modules/fullcompiler/utils/handleerror/errorconfig.js +0 -1
  481. package/dist/modules/fullcompiler/utils/handleerror/handleerror.js +0 -1
  482. package/dist/modules/fullcompiler/utils/handleerror/parseerr.js +0 -1
  483. package/dist/modules/fullcompiler/utils/index.js +0 -1
  484. package/dist/modules/fullcompiler/utils/taskmanager.js +0 -1
  485. package/dist/modules/fullcompiler/utils/theme/index.js +0 -1
  486. package/dist/modules/fullcompiler/utils/tools.js +0 -1
  487. package/dist/modules/fullcompiler/utils/transformsourcemap.js +0 -1
  488. package/dist/project/serverProject.js +0 -1
  489. package/dist/services/app/server/appDirService.js +0 -1
  490. package/dist/services/builder/server/builder.js +0 -1
  491. package/dist/services/compileCacheManager/common/compileCacheManager.js +0 -1
  492. package/dist/services/compileCacheManager/nw/compileCacheManager.js +0 -1
  493. package/dist/services/compileCacheManager/server/compileCacheManager.js +0 -1
  494. package/dist/services/compilewxml/server/compilewxmlService.js +0 -1
  495. package/dist/services/compilewxml/server/wccWorker.js +0 -1
  496. package/dist/services/compilewxss/server/compilewxssService.js +0 -1
  497. package/dist/services/compilewxss/server/wcscWorker.js +0 -1
  498. package/dist/services/consoledisplay/server/consoledisplay.js +0 -1
  499. package/dist/services/fileUtilsManager/server/fileUtilsManager.js +0 -1
  500. package/dist/services/fs/server/fileService.js +0 -1
  501. package/dist/services/genTempFile/server/genTempFileService.js +0 -1
  502. package/dist/services/global/server/global.js +0 -1
  503. package/dist/services/initializeCheck/server/initializeCheck.js +0 -1
  504. package/dist/services/locales/server/const.js +0 -1
  505. package/dist/services/locales/server/locales.js +0 -1
  506. package/dist/services/log/server/logService.js +0 -1
  507. package/dist/services/miniappjson/server/miniappjson.js +0 -1
  508. package/dist/services/multiTaskManager/server/multiTaskManager.js +0 -1
  509. package/dist/services/multiTaskManager/server/pm2TaskWorker.js +0 -1
  510. package/dist/services/multiTaskManager/server/pm2WorkerManager.js +0 -1
  511. package/dist/services/nativeModule/server/nativeModule.js +0 -1
  512. package/dist/services/performance/server/performance.js +0 -1
  513. package/dist/services/pluginFileReader/server/pluginFileReader.js +0 -1
  514. package/dist/services/projectManager/server/buildServerProjectManager.js +0 -1
  515. package/dist/services/projectManager/server/projectManager.js +0 -1
  516. package/dist/services/root/server/root.js +0 -1
  517. package/dist/services/root/server/rootService.js +0 -1
  518. package/dist/services/staticConfig/server/staticConfigService.js +0 -1
  519. package/dist/services/store/server/storeService.js +0 -1
  520. package/dist/services/uniapp/server/uniapp.js +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.remoteBuildProjectMaterialAbsoluteCacheDir=void 0;const tslib_1=require("tslib"),child_process=tslib_1.__importStar(require("child_process")),path_1=tslib_1.__importDefault(require("path")),fs_extra_1=tslib_1.__importDefault(require("fs-extra")),glob_1=tslib_1.__importDefault(require("glob")),env_1=require("../../../utils/env"),miniapp_builder_1=require("../../../utils/miniapp-builder"),codesign_1=require("../../../utils/codesign"),miniappJson_1=require("../../../utils/miniappJson"),lodash_1=require("lodash"),tools_1=require("../../../utils/tools"),uuidv4=require("uuid/v4"),sizeOf=require("image-size"),plist=require("simple-plist"),errorIOSSdkVersions=["1.0.19"],APPEX_PROFILES_MAPS_FILE="__appexProfilesCacheDir__/profilesMap.json",APPEX_PROFILES_MAPS_FOR_SHELL_FILE="__appexProfilesCacheDir__/profilesMapForShell.txt",defaultIconDirPath=path_1.default.join(__dirname,"../../../static/images/"),getDepReg=e=>new RegExp(`s.subspec '${e}'.*\n(?:.*\n)*?(?:.*sp.vendored_frameworks = \\[\n)((?:.*'.*?'.*\n)*?)(?:.*\\]\n)`,"m"),allowTheme=["Light","LightSpecial","Dark","DarkSpecial","Default"];exports.remoteBuildProjectMaterialAbsoluteCacheDir="__absoluteFile";const iconInfoMap={appStore1024:{size:[1024,1024],scale:1,idiom:"ios-marketing",required:!0},appStore1024Other:{size:[1024,1024],scale:1,idiom:"ios-marketing-other"},mainIcon120:{size:[60,60],scale:2,idiom:"iphone",required:!0},mainIcon180:{size:[60,60],scale:3,idiom:"iphone"},spotlightIcon80:{size:[40,40],scale:2,idiom:"iphone"},spotlightIcon120:{size:[40,40],scale:3,idiom:"iphone"},settingsIcon58:{size:[29,29],scale:2,idiom:"iphone"},settingsIcon87:{size:[29,29],scale:3,idiom:"iphone"},notificationIcon40:{size:[20,20],scale:2,idiom:"iphone"},notificationIcon60:{size:[20,20],scale:3,idiom:"iphone"},ipadMainIcon152:{size:[76,76],scale:2,idiom:"ipad"},ipadMainIcon167:{size:[83.5,83.5],scale:2,idiom:"ipad"},ipadSpotlightIcon40:{size:[40,40],scale:1,idiom:"ipad"},ipadSpotlightIcon80:{size:[40,40],scale:2,idiom:"ipad"},ipadSettingsIcon29:{size:[29,29],scale:1,idiom:"ipad"},ipadSpotlightIcon58:{size:[29,29],scale:2,idiom:"ipad"},ipadNotificationIcon20:{size:[20,20],scale:1,idiom:"ipad"},ipadNotificationIcon40:{size:[20,20],scale:2,idiom:"ipad"}};class buildCloudManager{generateTempDemoIpaPath(e){const i=path_1.default.join(e,"../.."),t=path_1.default.basename(i),n=path_1.default.dirname(i),a=path_1.default.join(n,`${t}-operateDir`);fs_extra_1.default.existsSync(a)&&fs_extra_1.default.removeSync(a),fs_extra_1.default.ensureDirSync(a);const s=path_1.default.join(a,"Payload/demo.app");return fs_extra_1.default.copySync(e,s),s}generateInfoPlistCFBundleURLTypesItem(e){const i={};return e.CFBundleURLName&&(i.CFBundleURLName=e.CFBundleURLName),e.CFBundleURLSchemes&&(Array.isArray(e.CFBundleURLSchemes)?i.CFBundleURLSchemes=e.CFBundleURLSchemes:i.CFBundleURLSchemes=[e.CFBundleURLSchemes]),e.CFBundleTypeRole&&(i.CFBundleTypeRole=e.CFBundleTypeRole),i}updatePrivacyBackgroundImage(e,i,t,n,a){t.message("doing",`updatePrivacyBackgroundImage ${n}`);if(fs_extra_1.default.readdirSync(i).forEach((e=>{`privacy_${n}`===path_1.default.basename(e,path_1.default.extname(e))&&fs_extra_1.default.removeSync(path_1.default.join(i,e))})),!a)return;path_1.default.isAbsolute(a)||(a=path_1.default.join(e,a)),a=this.getMaterialFilePath(e,a);const s=path_1.default.extname(a),o=path_1.default.join(i,`privacy_${n}${s}`);try{fs_extra_1.default.copyFileSync(a,o)}catch(e){throw t.message("error",`copy privacy image failed: ${n}, ${a} to ${o}`),e}}async updateIOSInfoPlistInfo(e,i,t,n,a,s){var o,r,l,p,d,c,u,f,_,h,y,g;a.progress("update app base info...");const{mobileapp_info:m={}}=i,S=m.mobileapp_id,I=path_1.default.join(t,"Info.plist"),v={},x=(e,i)=>{var t,n;if((null==i?void 0:i.startsWith("%"))&&(null==i?void 0:i.endsWith("%"))){const o=i.slice(1,-1);v[e]=o;const r=(null===(n=null===(t=null==s?void 0:s.base)||void 0===t?void 0:t.ios)||void 0===n?void 0:n[o])||"";return r||a.message("error",`未在国际化配置 base.json 中找到字段 ${o},请检查`),r}return i};x("UISplashScreenImageName",null===(o=null==n?void 0:n.splashscreen)||void 0===o?void 0:o.customImage),x("UISplashScreenVideoName",null===(r=null==n?void 0:n.splashscreen)||void 0===r?void 0:r.customVideo),x("UILaunchStoryboardName",null===(l=null==n?void 0:n.splashscreen)||void 0===l?void 0:l.customImage);const b=plist.readFileSync(I);if(b.UIBackgroundModes=[],!0===(null===(p=null==n?void 0:n.infoPlist)||void 0===p?void 0:p.AudioInBackgroundMode)&&b.UIBackgroundModes.push("audio"),!0===(null===(d=null==n?void 0:n.infoPlist)||void 0===d?void 0:d.LocationInBackgroundMode)&&b.UIBackgroundModes.push("location"),"object"==typeof n.customInfoPlist&&!Array.isArray(n.customInfoPlist)){a.progress("initiating user custom info.plist config");const e=n.customInfoPlist;for(const i in e)b[i]=e[i]}if(b.CFBundleName=x("CFBundleName",n.name),b.CFBundleDisplayName=x("CFBundleDisplayName",n.name),b.CFBundleShortVersionString=n.version,"number"==typeof n.versionCode?b.CFBundleVersion=parseInt(n.versionCode.toString(),10).toString():b.CFBundleVersion=(parseInt(b.CFBundleVersion,10)+1).toString(),b.CFBundleIdentifier=this.getBundleIdentifier(m),Array.isArray(null==n?void 0:n.openMimeTypes)&&this.validateCFBundleDocumentTypes(n.openMimeTypes,a)&&(b.CFBundleDocumentTypes=n.openMimeTypes,a.message("doing","openMimeTypes 应用成功")),Array.isArray(b.CFBundleURLTypes)||(b.CFBundleURLTypes=[]),(null===(u=null===(c=b.CFBundleURLTypes)||void 0===c?void 0:c[0])||void 0===u?void 0:u.CFBundleURLSchemes)&&(b.CFBundleURLTypes[0].CFBundleURLSchemes=[S]),b.CFBundleURLTypes[0]&&(b.CFBundleURLTypes=[b.CFBundleURLTypes[0]]),Object.keys(miniappJson_1.iosPrivacyDescObj).forEach((e=>{var i,t;(null===(i=null==n?void 0:n.privateDescriptions)||void 0===i?void 0:i[e])?b[e]=x(e,null===(t=n.privateDescriptions)||void 0===t?void 0:t[e]):delete b[e]})),!0===(null===(f=null==n?void 0:n.infoPlist)||void 0===f?void 0:f.DisableAppUsesNonExemptEncryption)?b.ITSAppUsesNonExemptEncryption=!1:delete b.ITSAppUsesNonExemptEncryption,!0===(null===(_=null==n?void 0:n.infoPlist)||void 0===_?void 0:_.requiresFullScreen)?b.UIRequiresFullScreen=!0:delete b.UIRequiresFullScreen,"object"==typeof(null===(h=null==n?void 0:n.infoPlist)||void 0===h?void 0:h.CFBundleURLTypes)){const e=this.generateInfoPlistCFBundleURLTypesItem(n.infoPlist.CFBundleURLTypes);b.CFBundleURLTypes.push(e);const{additionalCFBundleURLTypes:i}=n.infoPlist.CFBundleURLTypes;Array.isArray(i)&&i.forEach((e=>{if("object"==typeof e){const i=this.generateInfoPlistCFBundleURLTypesItem(e);b.CFBundleURLTypes.push(i)}}))}if(null===(y=null==n?void 0:n.useExtendedSdk)||void 0===y?void 0:y.WeAppGoogleLogin){if(!(null==n?void 0:n.googleLoginClientID)||!(null==n?void 0:n.googleLoginBundleUrlType))throw new Error("勾选了 Google Login 拓展模块但未填写 googleLoginClientID 或 googleLoginBundleUrlType 将导致拓展模块无法使用");b.GIDClientID=n.googleLoginClientID,Array.isArray(b.CFBundleURLTypes)?b.CFBundleURLTypes.push({CFBundleURLSchemes:[n.googleLoginBundleUrlType]}):b.CFBundleURLTypes=[{CFBundleURLSchemes:[n.googleLoginBundleUrlType]}]}if(!0===n.enableIpad)if(Array.isArray(n.iPadUISupportedInterfaceOrientations)){const e={Portrait:"UIInterfaceOrientationPortrait",PortraitUpsideDown:"UIInterfaceOrientationPortraitUpsideDown",LandscapeLeft:"UIInterfaceOrientationLandscapeLeft",LandscapeRight:"UIInterfaceOrientationLandscapeRight"},i=n.iPadUISupportedInterfaceOrientations.map((i=>e[i])).filter((e=>!!e));b["UISupportedInterfaceOrientations~ipad"]=i}else(0,miniappJson_1.iOSAppJsonIsUsingIPadResizable)(e)?(b["UISupportedInterfaceOrientations~ipad"]=["UIInterfaceOrientationPortrait","UIInterfaceOrientationPortraitUpsideDown","UIInterfaceOrientationLandscapeLeft","UIInterfaceOrientationLandscapeRight"],a.progress("ipad is support Landscape")):(b["UISupportedInterfaceOrientations~ipad"]=["UIInterfaceOrientationPortrait","UIInterfaceOrientationPortraitUpsideDown"],a.progress("ipad is not support Landscape"));if(null===(g=n.infoPlist)||void 0===g?void 0:g.LSApplicationQueriesSchemes){const e=n.infoPlist.LSApplicationQueriesSchemes.split(",");e.length&&b.LSApplicationQueriesSchemes.push(...e.filter((e=>e)))}try{plist.writeFileSync(I,b)}catch(e){throw new Error(`write info.plist failed!!${e.messenge}`)}return await this.writeI18NInfoFile(t,s,v),b.CFBundleVersion}getBundleIdentifier(e){return e.ios_flag&&e.bundle_id||e.debug_ios_bundle_id}validateCFBundleDocumentTypes(e,i){const t=["Owner","Default"," Alternate","None"],n=["Editor","Viewer"," Shell","None"],a=new Set;for(const s of e){if(a.has(s.CFBundleTypeName))return i.message("error",`openMimeTypes 应用失败,存在重复定义的 CFBundleTypeName: ${s.CFBundleTypeName}`),!1;if(a.add(s.CFBundleTypeName),!t.includes(s.LSHandlerRank))return i.message("error",`openMimeTypes 应用失败,存在不合法的 LSHandlerRank: ${s.LSHandlerRank}`),!1;if(!n.includes(s.CFBundleTypeRole))return i.message("error",`openMimeTypes 应用失败,存在不合法的 CFBundleTypeRole: ${s.CFBundleTypeRole}`),!1;if(!Array.isArray(s.LSItemContentTypes))return i.message("error","openMimeTypes 应用失败,LSItemContentTypes 类型不合法"),!1}return!0}useGDT(e){return(0,miniappJson_1.iOSMiniAppJsonIsUsingGDT)(e)}async updateIOSAppConfigPlistInfo(e,i,t,n,a,s,o,r="Dark",l){var p,d,c,u,f,_,h;o.progress("update app module info...");const{module_info:y={},cpa_info:g={},cpa_package_info:m={enable_remove_watermark:!1}}=i;if(!g.sdk_key||!g.sdk_key_secret)throw new Error("sdkKey and sdkSecret not found");const S=path_1.default.join(t,"MiniApp.bundle"),I=path_1.default.join(S,"AppConfig.plist"),v=plist.readFileSync(I);m.enable_remove_watermark?v.enableRemoveWatermark=!0:v.splashscreenTheme=r,v.miniModuleId=y.module_id,v.sdkKey=g.sdk_key,v.sdkSecret=g.sdk_key_secret;const{privacy:x={}}=n;v.privacy||(v.privacy={}),v.privacy.enable=!!x.enable,v.privacy.enableViewOnly=!!x.enableViewOnly;const b="configs/privacy.json",F=path_1.default.posix.join(S,b),{contentViewImage:P,cancelButtonImage:j,confirmButtonImage:B,template:L}=x;if(x.enable){let i=L||"";if(fs_extra_1.default.ensureDirSync(path_1.default.posix.join(S,"configs")),i.startsWith("%")&&i.endsWith("%")){const t=L.slice(1,-1);i=(null===(d=null===(p=null==l?void 0:l.base)||void 0===p?void 0:p.ios)||void 0===d?void 0:d[t])||"",i||o.message("error",`未在国际化配置 base.json 中找到字段 ${t},请检查`),Object.keys(l).forEach((i=>{var n,a;if("base"===i)return;let s=null===(a=null===(n=l[i])||void 0===n?void 0:n.ios)||void 0===a?void 0:a[t];if(s){s=this.getMaterialFilePath(e,s);const t=`configs/privacy-${i}.json`,n=path_1.default.posix.join(S,t);fs_extra_1.default.existsSync(s)?fs_extra_1.default.copyFileSync(s,n):o.message("error",`未找到隐私协议在国际化配置 ${i}.json 中配置的文件 ${s},请检查`)}}))}i?(i=this.getMaterialFilePath(e,i),fs_extra_1.default.existsSync(i)?(fs_extra_1.default.copyFileSync(i,F),v.privacy.template=b):(o.message("error",`未找到隐私协议中配置的文件 ${i},请检查`),v.privacy.template="configs/defaultPrivacy.json")):v.privacy.template="configs/defaultPrivacy.json",!0===x.enableNativePlugin&&"string"==typeof x.nativePluginId&&x.nativePluginId.length>2&&(v.privacy.plugin={pluginId:x.nativePluginId,enable:!0})}else v.privacy.template="",fs_extra_1.default.removeSync(F);this.updatePrivacyBackgroundImage(e,t,o,"contentViewImage",P),this.updatePrivacyBackgroundImage(e,t,o,"confirmButtonImage",B),this.updatePrivacyBackgroundImage(e,t,o,"cancelButtonImage",j);const{appMenuEnable:$=!0}=n;v.appMenuEnable=$;const{enableVConsole:C="undefined"}=n;if(v.enableVConsole=C,null===(c=n.useExtendedSdk)||void 0===c?void 0:c.WeAppLive){const{weAppLiveLicenseUrl:e,weAppLiveLicenseKey:i}=n.liveInfo||{};e&&i&&(v.weAppLiveLicenseUrl=e,v.weAppLiveLicenseKey=i)}const{tpush:w}=n;let A=!1;if("object"==typeof w){const e=path_1.default.posix.join(t,"PlugIns/TPNSService.appex"),i=path_1.default.posix.join(e,"AppConfig.plist");if(this.useTpush(n)){v.TPNSAccessID=w.accessID,v.TPNSAccessKey=w.accessKey,w.clusterDomainName?v.clusterDomainName=w.clusterDomainName:delete v.clusterDomainName;const t=s?"x86_64":"arm64",n=path_1.default.join(a,`appex/${t}/TPNSService.appex`);if(!fs_extra_1.default.existsSync(n))throw new Error(`can not found extendsdk: ${n}`);try{fs_extra_1.default.copySync(n,e),plist.writeFileSync(i,v),A=!0}catch(e){throw new Error(`copy TPNSService.appex to app failed: ${e}`)}}}if(!A)try{const e=path_1.default.posix.join(t,"PlugIns");fs_extra_1.default.existsSync(e)?(fs_extra_1.default.removeSync(e),o.progress("removed PlugIns folder...")):o.progress("no PlugIns folder...")}catch(e){throw new Error(`remove TPNSService.appex from app failed: ${e}`)}if(null===(u=n.useExtendedSdk)||void 0===u?void 0:u.WeAppLBS){if(!n.qmapAPIKey)throw new Error("You need to provide the Tencent Location Service API Key when using LBS SDK.");v.qmapAPIKey=n.qmapAPIKey}const{gdt:U}=n,D=this.useGDT(n);if(v.GDTAd=D?{appid:U.appid,enable:!0,SplashAd:{placementId:U.splashAd_placementId,fetchDelay:U.splashAd_fetchDelay||3,defaultEnable:null===(f=U.splashAd_defaultEnable)||void 0===f||f}}:{appid:"",enable:!1,SplashAd:{placementId:"",fetchDelay:3}},n["mini-plugin"]&&Array.isArray(n["mini-plugin"].ios)){const e=n["mini-plugin"].ios,i=e.filter((e=>!!(e.open&&e.pluginId&&e.loadWhenStart))).map((e=>e.pluginId)),t=e.map((e=>e.open?{pluginId:e.pluginId,version:e.isFromLocal?"dev":e.pluginVersion}:void 0)).filter((e=>e));v.plugins={loadWhenStart:i,pluginInfoList:t}}const{enableDebugLog:E=!1}=n;v.enableDebugLog=E;const{debugLogSizeLimit:O=10}=n;isNaN(Number(O))?o.message("error",`ios debugLogSizeLimit ${O} is NaN`):v.debugLogSizeLimit=Number(O);const{enableOpenUrlNavigate:k=!1}=n;v.enableOpenUrlNavigate=k;const T=path_1.default.posix.join(S,"configs/locales");if(fs_extra_1.default.ensureDirSync(T),null===(h=null===(_=null==l?void 0:l.base)||void 0===_?void 0:_.ios)||void 0===h?void 0:h.LOCALES){const i=this.getMaterialFilePath(e,l.base.ios.LOCALES);fs_extra_1.default.existsSync(i)?(fs_extra_1.default.copyFileSync(i,path_1.default.posix.join(T,"common-base.json")),o.progress("复制基础语言 locales 配置成功")):o.message("error",`未找到基础语言 locales 配置文件: ${i}`)}Object.keys(l).forEach((i=>{var t,n;if("base"===i)return;const a=null===(n=null===(t=l[i])||void 0===t?void 0:t.ios)||void 0===n?void 0:n.LOCALES;if(a){const t=this.getMaterialFilePath(e,a);fs_extra_1.default.existsSync(t)?(fs_extra_1.default.copyFileSync(t,path_1.default.posix.join(T,`common-${i}.json`)),o.progress(`复制 ${i} 语言 locales 配置成功`)):o.message("error",`未找到 ${i} 语言 locales 配置文件: ${t}`)}})),plist.writeFileSync(I,v)}async updateIOSAppexInfoPlistInfo(e,i,t,n,a){if(this.useTpush(t)){a.progress("update appex for notification base info...");const{mobileapp_info:s={}}=e,o=path_1.default.join(i,"PlugIns/TPNSService.appex"),r=path_1.default.join(o,"Info.plist"),l=plist.readFileSync(r);l.CFBundleShortVersionString=t.version,a.progress(`update appex for CFBundleVersion: ${n}`),l.CFBundleVersion=n;const p=s.ios_flag&&s.bundle_id||s.debug_ios_bundle_id;l.CFBundleIdentifier=t.tpush.serviceBundleId||`${p}.service`,a.progress(`update appex bundle identifier for infoPlist : ${l.CFBundleIdentifier}`),plist.writeFileSync(r,l)}else a.progress("not using tpush...")}updateBundleIcons(e,i,t,n,a){const s=[],o=[],r=[];for(const l in t){if(!t[l])continue;const p=this.getMaterialFilePath(e,t[l]);if(!p)return void a.message("error",`getMatrialFailed: ${t[l]}`);const d=iconInfoMap[l];try{const e=sizeOf(p),i=d.size[0]*d.scale,n=d.size[1]*d.scale;if(e.width!==i||e.height!==n){a.progress(`check ${l} size failed, require [${i}, ${n}] but [${e.width}, ${e.height}] ingore ${t[l]} `);continue}}catch(e){a.progress(`get ${l} info failed, ingore ${t[l]}(e: ${e.message})`);continue}const c=path_1.default.extname(p),u=1===d.scale?"":`@${d.scale}x`,f=`${d.size[0]}x${d.size[1]}`,_=l.startsWith("ipad"),h="appStore1024"===l||"appStore1024Other"===l,y="appStore1024Other"===l?`${n}Other`:n,g=path_1.default.join(i,`${y}${f}${u}${_?"~ipad":""}${c}`),m={from:p,to:g,filename:path_1.default.basename(g),size:f,scale:`${d.scale}x`,idiom:d.idiom,key:l};s.push(m),h||(_?r.includes(`${y}${f}`)||r.push(`${y}${f}${u}`):o.includes(`${y}${f}`)||o.push(`${y}${f}${u}`))}return{iphoneBundleIconFiles:o,ipadBundleIconFiles:r,addFiles:s}}async updateIOSIcons(e,i,t,n,a,s,o=!1,r=""){s.progress("update app icons...");const{icons:l={}}=n,p=(o||a)&&!!t;s.progress(`genAssetCar: ${p}`);const d=glob_1.default.sync("AppIcon*.+(png|jpg|jpeg|webp)",{nodir:!0,cwd:i}).map((e=>path_1.default.join(i,e))),c=`AppIcon-${uuidv4().slice(0,8)}`,u=this.updateBundleIcons(e,i,l,c,s);if(!u)throw new Error("updateBundleIcons failed");const{iphoneBundleIconFiles:f=[],ipadBundleIconFiles:_=[],addFiles:h=[]}=u,y={};for(const e in iconInfoMap){if(!iconInfoMap[e].required||l[e])continue;const i=iconInfoMap[e].size[0]*iconInfoMap[e].scale,t=iconInfoMap[e].size[1]*iconInfoMap[e].scale;if(y[e]=path_1.default.join(defaultIconDirPath,`donut-icon${i}x${t}.png`),s.progress(`using default app icons when ${e} is not config...`),!fs_extra_1.default.existsSync(y[e]))throw new Error(`required ${e} but not default or set`)}const g=this.updateBundleIcons(e,i,y,c,s);if(!g)throw new Error("updateBundleIcons WithDefaultIcon failed");const{iphoneBundleIconFiles:m,ipadBundleIconFiles:S,addFiles:I}=g;if(f.push(...m),_.push(...S),h.push(...I),!f.length&&!_.length)return;d.forEach((e=>{fs_extra_1.default.existsSync(e)&&fs_extra_1.default.removeSync(e)}));const v=path_1.default.join(t,"__assetCarOperateDir/assetsCar/"),x=path_1.default.join(v,`Assets.xcassets/${c}.appiconset/`);p&&(fs_extra_1.default.ensureDirSync(x),fs_extra_1.default.emptyDirSync(x));const b=[];let F=!1;if(h.forEach((e=>{fs_extra_1.default.existsSync(e.to)&&fs_extra_1.default.removeSync(e.to),fs_extra_1.default.copyFileSync(e.from,e.to),p&&(fs_extra_1.default.copySync(e.from,path_1.default.join(x,e.filename)),"ios-marketing-other"===e.idiom&&(F=!0),b.push({filename:e.filename,size:e.size,scale:e.scale,idiom:e.idiom}))})),p&&fs_extra_1.default.writeJsonSync(path_1.default.join(x,"Contents.json"),{images:b,info:{author:"xcode",version:1}},{spaces:"\t"}),p){const e=path_1.default.join(__dirname,"../../../static/scripts/assetsCar/"),t=path_1.default.join(v,"createAssetsCar");fs_extra_1.default.copySync(e,v);try{await(0,codesign_1.checkXcodeEnv)(s),child_process.execSync(`"${t}" ${c}`,{env:(0,env_1.getProcessEnv)()})}catch(e){throw new Error(`createAssetsCar failed ${e.message||""}`)}const n=path_1.default.join(v,"build/Assets.car"),a=path_1.default.join(i,"Assets.car");fs_extra_1.default.copyFileSync(n,a)}else if(r&&fs_extra_1.default.existsSync(r))s.message("success","命中缓存,正在使用缓存的 AssetCar"),fs_extra_1.default.copyFileSync(r,path_1.default.join(i,"Assets.car"));else{const e=path_1.default.join(i,"Assets.car");fs_extra_1.default.removeSync(e),s.message("warn","更新 App 图标可能不生效,可使用远程构建验证图标设置;工具将会缓存图标构建结果")}const P=path_1.default.join(i,"Info.plist"),j=plist.readFileSync(P);if(!j.CFBundleIcons){const e={CFBundlePrimaryIcon:{}};j.CFBundleIcons=e}F&&(j.CFBundleIcons.CFBundleAlternateIcons={OtherAppStoreIcon:{CFBundleIconFiles:[`${c}Other`],CFBundleIconName:"OtherAppStoreIcon"}}),j.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconName=c,j.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles=f,j["CFBundleIcons~ipad"]||(j["CFBundleIcons~ipad"]={CFBundlePrimaryIcon:{}}),j["CFBundleIcons~ipad"].CFBundlePrimaryIcon.CFBundleIconName=c,j["CFBundleIcons~ipad"].CFBundlePrimaryIcon.CFBundleIconFiles=_,j.NSAppTransportSecurity={NSAllowsArbitraryLoads:!0},plist.writeFileSync(P,j)}replaceLaunchScreenImage(e,i,t,n,a,s){const o=path_1.default.join(e,"01J-lp-oVM-view-Ze5-6b-2t3.nib");let r=fs_extra_1.default.readFileSync(o).toString("hex");if(!i.endsWith(".png"))return void n.message("error",`IOS 启动页图片配置格式错误,必须为 PNG 格式, 错误配置:${i}`);const l=this.getMaterialFilePath(a,i),p=`${t}.png`,d=`LaunchScreen-${uuidv4().slice(0,12)}`,c=`${d}.png`,u=path_1.default.join(s,c);fs_extra_1.default.copyFileSync(l,u);const f=Buffer.from(p,"utf-8").toString("hex"),_=Buffer.from(c,"utf-8").toString("hex");return-1!==r.indexOf(f)?(r=r.replace(f,_),console.log("replace storyboard customImage success")):console.log("replace storyboard customImage fail"),fs_extra_1.default.writeFileSync(o,Buffer.from(r,"hex")),d}replaceLaunchScreenVideo(e,i,t,n){const a=path_1.default.extname(e);if([".mp4",".mov"].indexOf(a)<0)return void i.message("error",`IOS 启动页视频配置格式错误,必须为 mp4 mov 格式, 错误配置:${e}`);const s=this.getMaterialFilePath(t,e),o=`${`LaunchScreen-${uuidv4().slice(0,12)}`}${a}`,r=path_1.default.join(n,o);return fs_extra_1.default.copyFileSync(s,r),o}async updateSplashScreen(e,i,t,n,a="Dark",s){var o,r,l;let p;n.progress("update splashscreen image..."),allowTheme.includes(a)&&(p=path_1.default.join(i,`/Base.lproj/LaunchScreen${a}.storyboardc`)),p&&fs_extra_1.default.existsSync(p)&&fs_extra_1.default.copySync(p,path_1.default.join(i,"/Base.lproj/LaunchScreen.storyboardc")),allowTheme.forEach((e=>{const t=path_1.default.join(i,`/Base.lproj/LaunchScreen${e}.storyboardc`);fs_extra_1.default.existsSync(t)&&fs_extra_1.default.removeSync(t)}));let d=null===(o=null==t?void 0:t.splashscreen)||void 0===o?void 0:o.customImage;if(!d)return;const c=path_1.default.join(i,"Info.plist"),u=plist.readFileSync(c),f=u.UISplashScreenImageName;if(glob_1.default.sync("LaunchScreen-*.+(png|jpg|jpeg|webp)",{nodir:!0,cwd:i}).forEach((e=>{const t=path_1.default.join(i,e);fs_extra_1.default.removeSync(t)})),d.startsWith("%")&&(null==d?void 0:d.endsWith("%"))){const t=d.slice(1,-1),a=(null===(l=null===(r=null==s?void 0:s.base)||void 0===r?void 0:r.ios)||void 0===l?void 0:l[t])||"";if(!a)return void n.message("error",`未在国际化配置 base.json 中找到字段 ${t},请检查,启动页国际化配置失败`);d=a,Object.keys(s).forEach((a=>{var o,r;if("base"===a)return;const l=null===(r=null===(o=s[a])||void 0===o?void 0:o.ios)||void 0===r?void 0:r[t];if(l){const t=path_1.default.join(i,`/${a}.lproj/LaunchScreen_${a}.storyboardc`);fs_extra_1.default.ensureDirSync(path_1.default.join(t,"..")),fs_extra_1.default.copySync(path_1.default.join(i,"/Base.lproj/LaunchScreen.storyboardc"),t);const s=this.replaceLaunchScreenImage(t,this.getMaterialFilePath(e,l),f,n,e,i);n.progress(`update ${a} splashscreen image...`);const o=fs_extra_1.default.readFileSync(path_1.default.join(i,`${a}.lproj/InfoPlist.strings`),"utf8");let r="";r=s?o.replace("__UISplashScreenImageName__",`UISplashScreenImageName = "${s}";\n`).replace("__UILaunchStoryboardName__",`UILaunchStoryboardName = "LaunchScreen_${a}";\n`):o.replace("__UISplashScreenImageName__","").replace("__UILaunchStoryboardName__",""),fs_extra_1.default.writeFileSync(path_1.default.join(i,`${a}.lproj/InfoPlist.strings`),r),n.progress(`update ${a} splashscreen image success`)}}))}n.progress("update base splashscreen image...");const _=this.replaceLaunchScreenImage(path_1.default.join(i,"/Base.lproj/LaunchScreen.storyboardc"),this.getMaterialFilePath(e,d),f,n,e,i);n.progress("update base splashscreen image success"),_&&(u.UISplashScreenImageName=_,u.UILaunchStoryboardName="LaunchScreen",plist.writeFileSync(c,u))}async updateSplashScreenVideo(e,i,t,n,a){var s,o,r;n.progress("update splashscreen video...");let l=null===(s=null==t?void 0:t.splashscreen)||void 0===s?void 0:s.customVideo;if(!l)return;const p=path_1.default.join(i,"Info.plist"),d=plist.readFileSync(p);if(l.startsWith("%")&&(null==l?void 0:l.endsWith("%"))){const t=l.slice(1,-1),s=(null===(r=null===(o=null==a?void 0:a.base)||void 0===o?void 0:o.ios)||void 0===r?void 0:r[t])||"";if(!s)return void n.message("error",`未在国际化配置 base.json 中找到字段 ${t},请检查,启动页视频国际化配置失败`);l=s,Object.keys(a).forEach((s=>{var o,r;if("base"===s)return;const l=null===(r=null===(o=a[s])||void 0===o?void 0:o.ios)||void 0===r?void 0:r[t];if(l){const t=this.replaceLaunchScreenVideo(this.getMaterialFilePath(e,l),n,e,i);n.progress(`update ${s} splashscreen video...`);const a=fs_extra_1.default.readFileSync(path_1.default.join(i,`${s}.lproj/InfoPlist.strings`),"utf8");let o="";o=t?a.replace("__UISplashScreenVideoName__",`UISplashScreenVideoName = "${t}";\n`):a.replace("__UISplashScreenVideoName__",""),fs_extra_1.default.writeFileSync(path_1.default.join(i,`${s}.lproj/InfoPlist.strings`),o),n.progress(`update ${s} splashscreen video success`)}}))}n.progress("update base splashscreen video...");const c=this.replaceLaunchScreenVideo(this.getMaterialFilePath(e,l),n,e,i);n.progress("update base splashscreen video success"),c&&(d.UISplashScreenVideoName=c,plist.writeFileSync(p,d))}genUseExtendedSdk(e,i){const t="useExtendedLib_",n=Object.assign({},e.useExtendedSdk||{});for(const i in e)if("object"==typeof e[i])for(const a in e[i])if(a.startsWith(`${t}WeApp`)&&!0===e[i][a]){n[a.slice(15)]=!0}return!n.WeAppLBS||n.WeAppOpenFuns||n.WeAppOpenFuns_HasPay||(n.WeAppOpenFuns=!0),"RemoteDebug"===(null==i?void 0:i.debugType)&&(n.WeAppUSB=!0),n}async updateExtendedSdk(e,i,t,n,a,s,o){const r=path_1.default.join(i,"Frameworks");fs_extra_1.default.ensureDirSync(r),o.progress("update extendsdk...");const l=path_1.default.join(t,"WeAppSDK.podspec"),p=fs_extra_1.default.readFileSync(l,"utf-8"),d=this.genUseExtendedSdk(a,s);o.progress(`useExtendedSdks: ${JSON.stringify(d)}`);const{mobileapp_info:c={}}=e,u=this.getBundleIdentifier(c);if(d.WeAppOpenFuns&&d.WeAppOpenFuns_HasPay)throw new Error("OpenFuncs SDK 只可勾选使用一个,请按需勾选使用");const f={},_=["WeAppUSB"];for(const e in d){if(!d[e])continue;const i=getDepReg(e),a=p.match(i);if(!(null==a?void 0:a[1])){if(_.includes(e))continue;throw new Error(`拓展模块 ${e} 不存在或已被移除,请检查 project.miniapp.json -> 对应平台 -> useExtendedSdk 删除配置 ${e},版本配置差异请参考更新日志或 https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/miniapp/changelog/difflog.html`)}const s=[];if(a[1].split("\n").forEach((e=>{const i=e.match(/.*'(.*?)',/);if(null==i?void 0:i[1]){const e=i[1].split("/").pop(),a=path_1.default.join(t,"Libs",n,e);if(!fs_extra_1.default.existsSync(a)){if(_.includes(`${e}.framework`))return;throw new Error(`拓展模块 ${e} 不存在或已被移除,请检查 project.miniapp.json -> 对应平台 -> useExtendedSdk 删除配置 ${e},版本配置差异请参考更新日志或 https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/miniapp/changelog/difflog.html`)}const o=path_1.default.join(r,e);fs_extra_1.default.copySync(a,o),s.push(path_1.default.basename(e));const l=path_1.default.join(o,"info.plist");if(!fs_extra_1.default.existsSync(l))throw new Error(`can not found extendsdk info.plist: ${e}`);this.changeExtendSDKInfoplistBundleId(l,u,e)}})),s.length){f[s.shift()]=s}}const h=path_1.default.join(i,"DyFrameworks.plist");fs_extra_1.default.existsSync(h)&&fs_extra_1.default.removeSync(h),plist.writeFileSync(h,f)}async updatePrivacyInfo(e,i,t){var n;const a=null===(n=null==i?void 0:i.privacy)||void 0===n?void 0:n.privacyInfo;a&&(a.endsWith("PrivacyInfo.xcprivacy")?fs_extra_1.default.existsSync(a)?(fs_extra_1.default.copySync(a,path_1.default.join(e,"/PrivacyInfo.xcprivacy")),t.progress("隐私清单文件替换成功")):t.message("error","隐私清单文件替换失败,文件不存在,将使用默认文件"):t.message("error","隐私清单文件替换失败,文件名必须为 PrivacyInfo.xcprivacy,将使用默认文件"))}async updatePlugin(e,i,t,n,a,s,o,r){const l={},p={},d=[];if(n["mini-plugin"]&&Array.isArray(n["mini-plugin"].ios)){n["mini-plugin"].ios.forEach((e=>{e.open&&e.pluginId?("string"==typeof e.resourcePath&&e.resourcePath.length>0&&(l[e.pluginId]=e.resourcePath),"object"==typeof e.resourceObjects&&Object.keys(e.resourceObjects).length>0&&(p[e.pluginId]=e.resourceObjects)):d.push(e.pluginId)}))}if(d.length>0&&r.message("warn",`下列插件未启用,请确认project.miniapp.json中的配置:${d.join(", ")}`),!i.length)return;const c=path_1.default.join(e,"Frameworks"),u=path_1.default.join(e,"PlugIns");fs_extra_1.default.ensureDirSync(c),r.progress("update plugin...");const f=this.prepareAppexProfileConfig(i,n,t,a,s,o,n.version,r);if(!f)throw new Error("依赖的多端插件需要配置对应的profile");i.forEach((i=>{const{pluginId:n}=i,a=i.dir,s=`${n}.framework`,o=path_1.default.join(c,s);if(-1!==a.indexOf("local-miniapp-plugin")){const e=fs_extra_1.default.statSync(a),{mtime:i}=e;r.progress(`${n}.framework 正在使用本地版本,修改时间为 ${i}`)}fs_extra_1.default.existsSync(o)&&fs_extra_1.default.removeSync(o);const d=path_1.default.join(a,s);if(fs_extra_1.default.existsSync(d)){fs_extra_1.default.copySync(d,o),this.copyResourcesToMainBundle(d,e),this.copyUserResourcePathIntoPlugins(n,t,l[n],p[n],path_1.default.join(o,"MiniPlugin.bundle"),r);fs_extra_1.default.readdirSync(a).forEach((i=>{if(i.endsWith(".appex")){const s=path_1.default.parse(i).name,o=f[s],d=path_1.default.join(u,i);if(!o||!0!==o.enable)return;r.progress(`${n} 插件使用 appex 中 : ${i}`),fs_extra_1.default.existsSync(d)&&fs_extra_1.default.removeSync(d),fs_extra_1.default.ensureDirSync(d);const c=path_1.default.join(a,i);fs_extra_1.default.copySync(c,d),(null==o?void 0:o.profilePath)&&fs_extra_1.default.copySync(o.profilePath,path_1.default.join(d,"embedded.mobileprovision")),this.copyResourcesToMainBundle(c,e),this.copyUserResourcePathIntoPlugins(n,t,l[n],p[n],path_1.default.join(d,"MiniPlugin.bundle"),r)}else if(i.endsWith("framework")&&i!==s){const e=path_1.default.join(c,i),t=path_1.default.join(a,i);fs_extra_1.default.existsSync(e)&&fs_extra_1.default.removeSync(e),fs_extra_1.default.copySync(t,e)}}))}else fs_extra_1.default.copySync(a,o),this.copyResourcesToMainBundle(a,e),this.copyUserResourcePathIntoPlugins(n,t,l[n],p[n],path_1.default.join(o,"MiniPlugin.bundle"),r)}))}copyUserResourcePathIntoPlugins(e,i,t,n,a,s){const o=a;if(t){const n=path_1.default.basename(t),a=this.getMaterialFilePath(i,t);if(a){s.progress(`${e}.framework 正在拷贝配置的资源:${t}`);const i=fs_extra_1.default.lstatSync(a);fs_extra_1.default.ensureDirSync(o),i.isDirectory()?fs_extra_1.default.copySync(a,o):i.isFile()&&fs_extra_1.default.copyFileSync(a,path_1.default.join(o,n))}}if(n){s.progress(`${e}.framework 正在写入配置的资源`),fs_extra_1.default.ensureDirSync(o);for(const e in n){const i=n[e],t=path_1.default.join(o,e);fs_extra_1.default.ensureDirSync(o),fs_extra_1.default.ensureFileSync(t),fs_extra_1.default.writeFileSync(t,i)}}}copyResourcesToMainBundle(e,i){const t=path_1.default.join(e,"MiniPlugin.bundle"),n=path_1.default.join(t,"PluginConfig.plist");if(fs_extra_1.default.existsSync(n)){const e=plist.readFileSync(n).CopyResourcesToMainBundle;(null==e?void 0:e.length)&&e.forEach((e=>{const n=path_1.default.join(t,e);fs_extra_1.default.existsSync(n)&&fs_extra_1.default.copySync(n,path_1.default.join(i,e))}))}}prepareAppexProfileConfig(e,i,t,n,a,s,o,r){if(!n)return void r.message("doing","miniappCacheDirPath is missing");let l=!1;const p={};if(i["mini-plugin"]&&Array.isArray(i["mini-plugin"].ios)){i["mini-plugin"].ios.forEach((e=>{if(e.open&&e.pluginId&&"object"==typeof e.appexProfiles)for(const i in e.appexProfiles){r.message("doing",`检查插件 ${e.pluginId} ${i} appex 配置中 ...`);const n=e.appexProfiles[i];if(!0===n.enable){const s=`${e.pluginId}_${i}`;p[s]={enable:!0};let o=n.profilePath;if(a&&(o=n.distributeProfilePath),n.bundleID&&o){const a=path_1.default.join(t,o);fs_extra_1.default.existsSync(a)?(p[s].bundleID=n.bundleID,p[s].profilePath=path_1.default.join(t,o)):(l=!0,r.message("error",`${e.pluginId} 中 ${i} 的 profilePath 无法找到对应的文件:${a}(需要在小程序项目路径下,填入相对于项目根目录的路径)`))}else l=!0,r.message("error",`${e.pluginId}中${i} 是 无效的appexProfiles配置。需要配置 bundleID,profilePath,distributeProfilePath。profile 文件需要放置在小程序项目内,然后配置相对于小程序项目根目录的相对路径。分发证书构建的情况下, 一定需要配置distributeProfilePath。查看文档了解详情。`)}}}))}if(e.forEach((e=>{fs_extra_1.default.readdirSync(e.dir).forEach((i=>{if(i.endsWith(".appex")){const t=path_1.default.parse(i).name,n=p[t];if(n&&!0===n.enable)if(n.bundleID&&n.profilePath){if(n.bundleID&&n.profilePath){const t=path_1.default.join(e.dir,i,"info.plist"),a=n.bundleID;this.changeInfoplistBundleId(t,a),this.changeInfoplistBundleVersion(t,s,o),r.message("doing",`${e.pluginId} ${i} ${a} ${t} 处理 appex bundle ID 中`)}}else l=!0,r.message("error",`${e.pluginId} 的 多端插件包含了${t.slice(e.pluginId.length+1)} 的 appex。开发者需要在project.miniapp.json 中 mini-plugin 配置下对应合理的 profile 文件。查看文档了解详情。`)}}))})),l)return!1;if(!(0,lodash_1.isEmpty)(p)){const e=path_1.default.join(n,APPEX_PROFILES_MAPS_FILE);fs_extra_1.default.existsSync(e)&&fs_extra_1.default.removeSync(e),fs_extra_1.default.ensureFileSync(e);const i={};for(const e in p)i[e]={bundleID:p[e].bundleID,profilePath:p[e].profilePath};fs_extra_1.default.writeFileSync(e,JSON.stringify(i));const t=path_1.default.join(n,APPEX_PROFILES_MAPS_FOR_SHELL_FILE);fs_extra_1.default.existsSync(t)&&fs_extra_1.default.removeSync(t),fs_extra_1.default.ensureFileSync(t);const a=Object.keys(p).map((e=>{const i=p[e];return`pluginAppexName:${e};_;_;bundleID:${i.bundleID};_;_;profile:${i.profilePath}\n\n`})).join("");fs_extra_1.default.writeFileSync(t,a)}return p}changeExtendSDKInfoplistBundleId(e,i,t){const n=`${i}.${path_1.default.parse(t).name.replace(/_/g,"")}`;return this.changeInfoplistBundleId(e,n)}changeInfoplistBundleId(e,i){const t=plist.readFileSync(e);return t.CFBundleIdentifier=i,plist.writeFileSync(e,t),t.CFBundleIdentifier}changeInfoplistBundleVersion(e,i,t){const n=plist.readFileSync(e);return n.CFBundleVersion=i,n.CFBundleShortVersionString=t,plist.writeFileSync(e,n),n.CFBundleIdentifier}async getEntitlements(e,i,t,n){const{mobileapp_info:a={}}=e;let s=a.ios_universal_link||a.debug_ios_universal_link;s=this.polyfillUniversalLink(s);let o=[];t.universalLink&&(o=t.universalLink.split(","),o=o.filter((e=>"string"==typeof e&&e.length>0)).map((e=>this.polyfillUniversalLink(e))));let r=[];if(Array.isArray(t.__customAssociatedDomains)){r=(t.__customAssociatedDomains||[]).filter((e=>"string"==typeof e&&e.length>0)).map((e=>this.polyfillUniversalLink(e)))}return{"com.apple.developer.associated-domains":[s,...o,...r].join("_$_ULinK_$_")}}polyfillUniversalLink(e){let i=e;return(i.startsWith("https://")||i.startsWith("http://"))&&(i=i.replace(/^http(s)?:\/\//g,"applinks:")),i}useTpush(e){return(0,miniappJson_1.iOSMiniAppJsonIsUsingTpush)(e)}async buildCloud(e,i){const{projectPath:t,demoIpaPath:n,sdkPath:a,arch:s="arm64",bindingInfo:o,certificateInfo:r,output:l,miniappCacheDirPath:p,pluginDirList:d,inLandun:c,theme:u,i18nInfo:f,debugInfo:_,CILocalBuild:h,cacheAssetCarPath:y}=e,g=this.generateTempDemoIpaPath(n),{selfCertificate:m={}}=r,S=(null==m?void 0:m.isPublish)||!1,I=(0,miniappJson_1.tryGetIOSMiniappJson)(t),v=this.useTpush(I);if((0,lodash_1.isEmpty)(I))throw new Error("获取project.miniapp.json失败");if(errorIOSSdkVersions.includes(I.sdkVersion))throw new Error("当前 mini-ios.sdkVersion 存在缺陷,请参考更新日志进行修改");let x=o;if(r.signType===miniapp_builder_1.miniappSinTypes.appleId.type){const{mobileapp_info:e={}}=x;x=Object.assign(Object.assign({},x),{mobileapp_info:Object.assign(Object.assign({},e),{bundle_id:miniapp_builder_1.DEFAULT_BUNDLE_ID,debug_ios_bundle_id:miniapp_builder_1.DEFAULT_BUNDLE_ID})})}const b=await this.updateIOSInfoPlistInfo(t,x,g,I,i,f);await this.updateIOSAppConfigPlistInfo(t,x,g,I,a,!1,i,u,f),await this.updateIOSAppexInfoPlistInfo(x,g,I,b,i),await this.updateIOSIcons(t,g,p,I,S,i,!0===c,y),await this.updateSplashScreen(t,g,I,i,u,f),await this.updateSplashScreenVideo(t,g,I,i,f),await this.updateExtendedSdk(x,g,a,s,I,_,i),await this.updatePlugin(g,d,t,I,p,S,b,i),await this.updatePrivacyInfo(g,I,i),await this.updateIOSAppResource(t,g,I,i);const F=await this.getEntitlements(x,g,I,i),{mobileapp_info:P={}}=x;let j;j=r.signType===miniapp_builder_1.miniappSinTypes.appleId.type?miniapp_builder_1.DEFAULT_BUNDLE_ID:P.ios_flag&&P.bundle_id||P.debug_ios_bundle_id;const B={bundleId:j,output:l,entitlements:F,isPublish:m.isPublish};if(I.buildCloud&&(I.buildCloud.certificate&&"string"==typeof I.buildCloud.certificate&&(B.certificate=I.buildCloud.certificate),I.buildCloud.profile&&"string"==typeof I.buildCloud.profile&&(B.profile=path_1.default.join(t,I.buildCloud.profile)),v&&I.buildCloud.tpnsProfile&&"string"==typeof I.buildCloud.tpnsProfile&&(B.tpnsProfile=path_1.default.join(t,I.buildCloud.tpnsProfile))),h&&(B.profile=m.profilePath,B.certificate=m.certificateName),m.isPublish||h){const e=await(0,codesign_1.codesignAndExport)(t,g,p||"",B,i,v,!0===c);if(!0!==e.success)throw new Error(`Build ipa failed:${e.errMsg||"codesignAndExport failed"}`)}return{projectPath:t,demoIpaPath:g,opts:B,iosMiniappJson:I,isPublish:S}}async writeI18NInfoFile(e,i,t){Object.keys(i).forEach((n=>{if("base"===n)return;let a="";Object.keys(t).forEach((e=>{var s,o,r,l;"UISplashScreenImageName"!==e?"UISplashScreenVideoName"!==e?"UILaunchStoryboardName"!==e?(null===(o=null===(s=i[n])||void 0===s?void 0:s.ios)||void 0===o?void 0:o[t[e]])&&(a+=`${e} = "${null===(l=null===(r=i[n])||void 0===r?void 0:r.ios)||void 0===l?void 0:l[t[e]]}";\n`):a+="__UILaunchStoryboardName__\n":a+="__UISplashScreenVideoName__\n":a+="__UISplashScreenImageName__\n"})),a&&(fs_extra_1.default.ensureDirSync(path_1.default.join(e,`${n}.lproj`)),fs_extra_1.default.writeFileSync(path_1.default.join(e,`${n}.lproj/InfoPlist.strings`),a))}))}getMaterialFilePath(e,i){if(!i)return"";let t=i;if(path_1.default.isAbsolute(i)||(t=path_1.default.join(e,i)),fs_extra_1.default.existsSync(t))return t;const n=(0,tools_1.generateMD5)(i),a=path_1.default.basename(i),s=path_1.default.join(e,exports.remoteBuildProjectMaterialAbsoluteCacheDir,`${n}_${a}`);return fs_extra_1.default.existsSync(s)?s:""}updateIOSAppResource(e,i,t,n){const a=t.resourcePath;if(!a)return;const s=this.getMaterialFilePath(e,a);if(s){n.progress(`正在拷贝资源至主包:${s}`);const e=fs_extra_1.default.lstatSync(s);if(e.isDirectory())this.copyDirectory(s,i,!1);else if(e.isFile()){const e=path_1.default.basename(a),t=path_1.default.join(i,e);if(fs_extra_1.default.existsSync(t))throw new Error(`fail to copy ${s}, overwrite is not allowed`);fs_extra_1.default.copyFileSync(s,t)}}}copyDirectory(e,i,t=!0){if(fs_extra_1.default.ensureDirSync(i),t)fs_extra_1.default.copySync(e,i);else{fs_extra_1.default.readdirSync(e).forEach((n=>{const a=path_1.default.join(e,n),s=path_1.default.join(i,n);if(fs_extra_1.default.statSync(a).isDirectory())this.copyDirectory(a,s,t);else{if(fs_extra_1.default.existsSync(s))throw new Error(`fail to copy ${a}, overwrite is not allowed`);fs_extra_1.default.copyFileSync(a,s)}}))}}}exports.default=new buildCloudManager;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.remoteBuildProjectMaterialAbsoluteCacheDir=void 0;const tslib_1=require("tslib"),child_process=tslib_1.__importStar(require("child_process")),path_1=tslib_1.__importDefault(require("path")),fs_extra_1=tslib_1.__importDefault(require("fs-extra")),glob_1=tslib_1.__importDefault(require("glob")),env_1=require("../../../utils/env"),asar_1=require("../../../utils/asar"),miniapp_builder_1=require("../../../utils/miniapp-builder"),codesign_1=require("../../../utils/codesign"),miniappJson_1=require("../../../utils/miniappJson"),lodash_1=require("lodash"),tools_1=require("../../../utils/tools"),uuidv4=require("uuid/v4"),sizeOf=require("image-size"),plist=require("simple-plist"),errorIOSSdkVersions=["1.0.19"],APPEX_PROFILES_MAPS_FILE="__appexProfilesCacheDir__/profilesMap.json",APPEX_PROFILES_MAPS_FOR_SHELL_FILE="__appexProfilesCacheDir__/profilesMapForShell.txt",defaultIconDirPath=path_1.default.join(__dirname,"../../../static/images/"),getDepReg=e=>new RegExp(`s.subspec '${e}'.*\n(?:.*\n)*?(?:.*sp.vendored_frameworks = \\[\n)((?:.*'.*?'.*\n)*?)(?:.*\\]\n)`,"m"),allowTheme=["Light","LightSpecial","Dark","DarkSpecial","Default"];exports.remoteBuildProjectMaterialAbsoluteCacheDir="__absoluteFile";const iconInfoMap={appStore1024:{size:[1024,1024],scale:1,idiom:"ios-marketing",required:!0},appStore1024Other:{size:[1024,1024],scale:1,idiom:"ios-marketing-other"},mainIcon120:{size:[60,60],scale:2,idiom:"iphone",required:!0},mainIcon180:{size:[60,60],scale:3,idiom:"iphone"},spotlightIcon80:{size:[40,40],scale:2,idiom:"iphone"},spotlightIcon120:{size:[40,40],scale:3,idiom:"iphone"},settingsIcon58:{size:[29,29],scale:2,idiom:"iphone"},settingsIcon87:{size:[29,29],scale:3,idiom:"iphone"},notificationIcon40:{size:[20,20],scale:2,idiom:"iphone"},notificationIcon60:{size:[20,20],scale:3,idiom:"iphone"},ipadMainIcon152:{size:[76,76],scale:2,idiom:"ipad"},ipadMainIcon167:{size:[83.5,83.5],scale:2,idiom:"ipad"},ipadSpotlightIcon40:{size:[40,40],scale:1,idiom:"ipad"},ipadSpotlightIcon80:{size:[40,40],scale:2,idiom:"ipad"},ipadSettingsIcon29:{size:[29,29],scale:1,idiom:"ipad"},ipadSpotlightIcon58:{size:[29,29],scale:2,idiom:"ipad"},ipadNotificationIcon20:{size:[20,20],scale:1,idiom:"ipad"},ipadNotificationIcon40:{size:[20,20],scale:2,idiom:"ipad"}};class buildCloudManager{generateTempDemoIpaPath(e){const i=path_1.default.join(e,"../.."),t=path_1.default.basename(i),n=path_1.default.dirname(i),a=path_1.default.join(n,`${t}-operateDir`);fs_extra_1.default.existsSync(a)&&fs_extra_1.default.removeSync(a),fs_extra_1.default.ensureDirSync(a);const s=path_1.default.join(a,"Payload/demo.app");return fs_extra_1.default.copySync(e,s),s}generateInfoPlistCFBundleURLTypesItem(e){const i={};return e.CFBundleURLName&&(i.CFBundleURLName=e.CFBundleURLName),e.CFBundleURLSchemes&&(Array.isArray(e.CFBundleURLSchemes)?i.CFBundleURLSchemes=e.CFBundleURLSchemes:i.CFBundleURLSchemes=[e.CFBundleURLSchemes]),e.CFBundleTypeRole&&(i.CFBundleTypeRole=e.CFBundleTypeRole),i}updatePrivacyBackgroundImage(e,i,t,n,a){t.message("doing",`updatePrivacyBackgroundImage ${n}`);if(fs_extra_1.default.readdirSync(i).forEach((e=>{`privacy_${n}`===path_1.default.basename(e,path_1.default.extname(e))&&fs_extra_1.default.removeSync(path_1.default.join(i,e))})),!a)return;path_1.default.isAbsolute(a)||(a=path_1.default.join(e,a)),a=this.getMaterialFilePath(e,a);const s=path_1.default.extname(a),o=path_1.default.join(i,`privacy_${n}${s}`);try{fs_extra_1.default.copyFileSync(a,o)}catch(e){throw t.message("error",`copy privacy image failed: ${n}, ${a} to ${o}`),e}}async updateIOSInfoPlistInfo(e,i,t,n,a,s){var o,r,l,d,p,c,u,f,_,h,y,m;a.progress("update app base info...");const{mobileapp_info:g={}}=i,S=g.mobileapp_id,I=path_1.default.join(t,"Info.plist"),v={},x=(e,i)=>{var t,n;if((null==i?void 0:i.startsWith("%"))&&(null==i?void 0:i.endsWith("%"))){const o=i.slice(1,-1);v[e]=o;const r=(null===(n=null===(t=null==s?void 0:s.base)||void 0===t?void 0:t.ios)||void 0===n?void 0:n[o])||"";return r||a.message("error",`未在国际化配置 base.json 中找到字段 ${o},请检查`),r}return i};x("UISplashScreenImageName",null===(o=null==n?void 0:n.splashscreen)||void 0===o?void 0:o.customImage),x("UISplashScreenVideoName",null===(r=null==n?void 0:n.splashscreen)||void 0===r?void 0:r.customVideo),x("UILaunchStoryboardName",null===(l=null==n?void 0:n.splashscreen)||void 0===l?void 0:l.customImage);const b=plist.readFileSync(I);if(b.UIBackgroundModes=[],!0===(null===(d=null==n?void 0:n.infoPlist)||void 0===d?void 0:d.AudioInBackgroundMode)&&b.UIBackgroundModes.push("audio"),!0===(null===(p=null==n?void 0:n.infoPlist)||void 0===p?void 0:p.LocationInBackgroundMode)&&b.UIBackgroundModes.push("location"),"object"==typeof n.customInfoPlist&&!Array.isArray(n.customInfoPlist)){a.progress("initiating user custom info.plist config");const e=n.customInfoPlist;for(const i in e)b[i]=e[i]}if(b.CFBundleName=x("CFBundleName",n.name),b.CFBundleDisplayName=x("CFBundleDisplayName",n.name),b.CFBundleShortVersionString=n.version,"number"==typeof n.versionCode?b.CFBundleVersion=parseInt(n.versionCode.toString(),10).toString():b.CFBundleVersion=(parseInt(b.CFBundleVersion,10)+1).toString(),b.CFBundleIdentifier=this.getBundleIdentifier(g),Array.isArray(null==n?void 0:n.openMimeTypes)&&this.validateCFBundleDocumentTypes(n.openMimeTypes,a)&&(b.CFBundleDocumentTypes=n.openMimeTypes,a.message("doing","openMimeTypes 应用成功")),Array.isArray(b.CFBundleURLTypes)||(b.CFBundleURLTypes=[]),(null===(u=null===(c=b.CFBundleURLTypes)||void 0===c?void 0:c[0])||void 0===u?void 0:u.CFBundleURLSchemes)&&(b.CFBundleURLTypes[0].CFBundleURLSchemes=[S]),b.CFBundleURLTypes[0]&&(b.CFBundleURLTypes=[b.CFBundleURLTypes[0]]),Object.keys(miniappJson_1.iosPrivacyDescObj).forEach((e=>{var i,t;(null===(i=null==n?void 0:n.privateDescriptions)||void 0===i?void 0:i[e])?b[e]=x(e,null===(t=n.privateDescriptions)||void 0===t?void 0:t[e]):delete b[e]})),!0===(null===(f=null==n?void 0:n.infoPlist)||void 0===f?void 0:f.DisableAppUsesNonExemptEncryption)?b.ITSAppUsesNonExemptEncryption=!1:delete b.ITSAppUsesNonExemptEncryption,!0===(null===(_=null==n?void 0:n.infoPlist)||void 0===_?void 0:_.requiresFullScreen)?b.UIRequiresFullScreen=!0:delete b.UIRequiresFullScreen,"object"==typeof(null===(h=null==n?void 0:n.infoPlist)||void 0===h?void 0:h.CFBundleURLTypes)){const e=this.generateInfoPlistCFBundleURLTypesItem(n.infoPlist.CFBundleURLTypes);b.CFBundleURLTypes.push(e);const{additionalCFBundleURLTypes:i}=n.infoPlist.CFBundleURLTypes;Array.isArray(i)&&i.forEach((e=>{if("object"==typeof e){const i=this.generateInfoPlistCFBundleURLTypesItem(e);b.CFBundleURLTypes.push(i)}}))}if(null===(y=null==n?void 0:n.useExtendedSdk)||void 0===y?void 0:y.WeAppGoogleLogin){if(!(null==n?void 0:n.googleLoginClientID)||!(null==n?void 0:n.googleLoginBundleUrlType))throw new Error("勾选了 Google Login 拓展模块但未填写 googleLoginClientID 或 googleLoginBundleUrlType 将导致拓展模块无法使用");b.GIDClientID=n.googleLoginClientID,Array.isArray(b.CFBundleURLTypes)?b.CFBundleURLTypes.push({CFBundleURLSchemes:[n.googleLoginBundleUrlType]}):b.CFBundleURLTypes=[{CFBundleURLSchemes:[n.googleLoginBundleUrlType]}]}if(!0===n.enableIpad)if(Array.isArray(n.iPadUISupportedInterfaceOrientations)){const e={Portrait:"UIInterfaceOrientationPortrait",PortraitUpsideDown:"UIInterfaceOrientationPortraitUpsideDown",LandscapeLeft:"UIInterfaceOrientationLandscapeLeft",LandscapeRight:"UIInterfaceOrientationLandscapeRight"},i=n.iPadUISupportedInterfaceOrientations.map((i=>e[i])).filter((e=>!!e));b["UISupportedInterfaceOrientations~ipad"]=i}else(0,miniappJson_1.iOSAppJsonIsUsingIPadResizable)(e)?(b["UISupportedInterfaceOrientations~ipad"]=["UIInterfaceOrientationPortrait","UIInterfaceOrientationPortraitUpsideDown","UIInterfaceOrientationLandscapeLeft","UIInterfaceOrientationLandscapeRight"],a.progress("ipad is support Landscape")):(b["UISupportedInterfaceOrientations~ipad"]=["UIInterfaceOrientationPortrait","UIInterfaceOrientationPortraitUpsideDown"],a.progress("ipad is not support Landscape"));if(null===(m=n.infoPlist)||void 0===m?void 0:m.LSApplicationQueriesSchemes){const e=n.infoPlist.LSApplicationQueriesSchemes.split(",");e.length&&b.LSApplicationQueriesSchemes.push(...e.filter((e=>e)))}try{plist.writeFileSync(I,b)}catch(e){throw new Error(`write info.plist failed!!${e.messenge}`)}return await this.writeI18NInfoFile(t,s,v),b.CFBundleVersion}getBundleIdentifier(e){return e.ios_flag&&e.bundle_id||e.debug_ios_bundle_id}validateCFBundleDocumentTypes(e,i){const t=["Owner","Default"," Alternate","None"],n=["Editor","Viewer"," Shell","None"],a=new Set;for(const s of e){if(a.has(s.CFBundleTypeName))return i.message("error",`openMimeTypes 应用失败,存在重复定义的 CFBundleTypeName: ${s.CFBundleTypeName}`),!1;if(a.add(s.CFBundleTypeName),!t.includes(s.LSHandlerRank))return i.message("error",`openMimeTypes 应用失败,存在不合法的 LSHandlerRank: ${s.LSHandlerRank}`),!1;if(!n.includes(s.CFBundleTypeRole))return i.message("error",`openMimeTypes 应用失败,存在不合法的 CFBundleTypeRole: ${s.CFBundleTypeRole}`),!1;if(!Array.isArray(s.LSItemContentTypes))return i.message("error","openMimeTypes 应用失败,LSItemContentTypes 类型不合法"),!1}return!0}useGDT(e){return(0,miniappJson_1.iOSMiniAppJsonIsUsingGDT)(e)}async updateIOSAppConfigPlistInfo(e,i,t,n,a,s,o,r="Dark",l){var d,p,c,u,f,_,h;o.progress("update app module info...");const{module_info:y={},cpa_info:m={},cpa_package_info:g={enable_remove_watermark:!1}}=i;if(!m.sdk_key||!m.sdk_key_secret)throw new Error("sdkKey and sdkSecret not found");const S=path_1.default.join(t,"MiniApp.bundle"),I=path_1.default.join(S,"AppConfig.plist"),v=plist.readFileSync(I);g.enable_remove_watermark?v.enableRemoveWatermark=!0:v.splashscreenTheme=r,v.miniModuleId=y.module_id,v.sdkKey=m.sdk_key,v.sdkSecret=m.sdk_key_secret;const{privacy:x={}}=n;v.privacy||(v.privacy={}),v.privacy.enable=!!x.enable,v.privacy.enableViewOnly=!!x.enableViewOnly;const b="configs/privacy.json",F=path_1.default.posix.join(S,b),{contentViewImage:P,cancelButtonImage:j,confirmButtonImage:B,template:L}=x;if(x.enable){let i=L||"";if(fs_extra_1.default.ensureDirSync(path_1.default.posix.join(S,"configs")),i.startsWith("%")&&i.endsWith("%")){const t=L.slice(1,-1);i=(null===(p=null===(d=null==l?void 0:l.base)||void 0===d?void 0:d.ios)||void 0===p?void 0:p[t])||"",i||o.message("error",`未在国际化配置 base.json 中找到字段 ${t},请检查`),Object.keys(l).forEach((i=>{var n,a;if("base"===i)return;let s=null===(a=null===(n=l[i])||void 0===n?void 0:n.ios)||void 0===a?void 0:a[t];if(s){s=this.getMaterialFilePath(e,s);const t=`configs/privacy-${i}.json`,n=path_1.default.posix.join(S,t);fs_extra_1.default.existsSync(s)?fs_extra_1.default.copyFileSync(s,n):o.message("error",`未找到隐私协议在国际化配置 ${i}.json 中配置的文件 ${s},请检查`)}}))}i?(i=this.getMaterialFilePath(e,i),fs_extra_1.default.existsSync(i)?(fs_extra_1.default.copyFileSync(i,F),v.privacy.template=b):(o.message("error",`未找到隐私协议中配置的文件 ${i},请检查`),v.privacy.template="configs/defaultPrivacy.json")):v.privacy.template="configs/defaultPrivacy.json",!0===x.enableNativePlugin&&"string"==typeof x.nativePluginId&&x.nativePluginId.length>2&&(v.privacy.plugin={pluginId:x.nativePluginId,enable:!0})}else v.privacy.template="",fs_extra_1.default.removeSync(F);this.updatePrivacyBackgroundImage(e,t,o,"contentViewImage",P),this.updatePrivacyBackgroundImage(e,t,o,"confirmButtonImage",B),this.updatePrivacyBackgroundImage(e,t,o,"cancelButtonImage",j);const{appMenuEnable:$=!0}=n;v.appMenuEnable=$;const{enableVConsole:C="undefined"}=n;if(v.enableVConsole=C,null===(c=n.useExtendedSdk)||void 0===c?void 0:c.WeAppLive){const{weAppLiveLicenseUrl:e,weAppLiveLicenseKey:i}=n.liveInfo||{};e&&i&&(v.weAppLiveLicenseUrl=e,v.weAppLiveLicenseKey=i)}const{tpush:w}=n;let A=!1;if("object"==typeof w){const e=path_1.default.posix.join(t,"PlugIns/TPNSService.appex"),i=path_1.default.posix.join(e,"AppConfig.plist");if(this.useTpush(n)){v.TPNSAccessID=w.accessID,v.TPNSAccessKey=w.accessKey,w.clusterDomainName?v.clusterDomainName=w.clusterDomainName:delete v.clusterDomainName;const t=s?"x86_64":"arm64",n=path_1.default.join(a,`appex/${t}/TPNSService.appex`);if(!fs_extra_1.default.existsSync(n))throw new Error(`can not found extendsdk: ${n}`);try{fs_extra_1.default.copySync(n,e),plist.writeFileSync(i,v),A=!0}catch(e){throw new Error(`copy TPNSService.appex to app failed: ${e}`)}}}if(!A)try{const e=path_1.default.posix.join(t,"PlugIns");fs_extra_1.default.existsSync(e)?(fs_extra_1.default.removeSync(e),o.progress("removed PlugIns folder...")):o.progress("no PlugIns folder...")}catch(e){throw new Error(`remove TPNSService.appex from app failed: ${e}`)}if(null===(u=n.useExtendedSdk)||void 0===u?void 0:u.WeAppLBS){if(!n.qmapAPIKey)throw new Error("You need to provide the Tencent Location Service API Key when using LBS SDK.");v.qmapAPIKey=n.qmapAPIKey}const{gdt:D}=n,U=this.useGDT(n);if(v.GDTAd=U?{appid:D.appid,enable:!0,SplashAd:{placementId:D.splashAd_placementId,fetchDelay:D.splashAd_fetchDelay||3,defaultEnable:null===(f=D.splashAd_defaultEnable)||void 0===f||f}}:{appid:"",enable:!1,SplashAd:{placementId:"",fetchDelay:3}},n["mini-plugin"]&&Array.isArray(n["mini-plugin"].ios)){const e=n["mini-plugin"].ios,i=e.filter((e=>!!(e.open&&e.pluginId&&e.loadWhenStart))).map((e=>e.pluginId)),t=e.map((e=>e.open?{pluginId:e.pluginId,version:e.isFromLocal?"dev":e.pluginVersion}:void 0)).filter((e=>e));v.plugins={loadWhenStart:i,pluginInfoList:t}}const{enableDebugLog:E=!1}=n;v.enableDebugLog=E;const{debugLogSizeLimit:O=10}=n;isNaN(Number(O))?o.message("error",`ios debugLogSizeLimit ${O} is NaN`):v.debugLogSizeLimit=Number(O);const{enableOpenUrlNavigate:T=!1}=n;v.enableOpenUrlNavigate=T;const k=path_1.default.posix.join(S,"configs/locales");if(fs_extra_1.default.ensureDirSync(k),null===(h=null===(_=null==l?void 0:l.base)||void 0===_?void 0:_.ios)||void 0===h?void 0:h.LOCALES){const i=this.getMaterialFilePath(e,l.base.ios.LOCALES);fs_extra_1.default.existsSync(i)?(fs_extra_1.default.copyFileSync(i,path_1.default.posix.join(k,"common-base.json")),o.progress("复制基础语言 locales 配置成功")):o.message("error",`未找到基础语言 locales 配置文件: ${i}`)}Object.keys(l).forEach((i=>{var t,n;if("base"===i)return;const a=null===(n=null===(t=l[i])||void 0===t?void 0:t.ios)||void 0===n?void 0:n.LOCALES;if(a){const t=this.getMaterialFilePath(e,a);fs_extra_1.default.existsSync(t)?(fs_extra_1.default.copyFileSync(t,path_1.default.posix.join(k,`common-${i}.json`)),o.progress(`复制 ${i} 语言 locales 配置成功`)):o.message("error",`未找到 ${i} 语言 locales 配置文件: ${t}`)}})),plist.writeFileSync(I,v)}async updateIOSAppexInfoPlistInfo(e,i,t,n,a){if(this.useTpush(t)){a.progress("update appex for notification base info...");const{mobileapp_info:s={}}=e,o=path_1.default.join(i,"PlugIns/TPNSService.appex"),r=path_1.default.join(o,"Info.plist"),l=plist.readFileSync(r);l.CFBundleShortVersionString=t.version,a.progress(`update appex for CFBundleVersion: ${n}`),l.CFBundleVersion=n;const d=s.ios_flag&&s.bundle_id||s.debug_ios_bundle_id;l.CFBundleIdentifier=t.tpush.serviceBundleId||`${d}.service`,a.progress(`update appex bundle identifier for infoPlist : ${l.CFBundleIdentifier}`),plist.writeFileSync(r,l)}else a.progress("not using tpush...")}updateBundleIcons(e,i,t,n,a){const s=[],o=[],r=[];for(const l in t){if(!t[l])continue;const d=this.getMaterialFilePath(e,t[l]);if(!d)return void a.message("error",`getMatrialFailed: ${t[l]}`);const p=iconInfoMap[l];try{const e=sizeOf(d),i=p.size[0]*p.scale,n=p.size[1]*p.scale;if(e.width!==i||e.height!==n){a.progress(`check ${l} size failed, require [${i}, ${n}] but [${e.width}, ${e.height}] ingore ${t[l]} `);continue}}catch(e){a.progress(`get ${l} info failed, ingore ${t[l]}(e: ${e.message})`);continue}const c=path_1.default.extname(d),u=1===p.scale?"":`@${p.scale}x`,f=`${p.size[0]}x${p.size[1]}`,_=l.startsWith("ipad"),h="appStore1024"===l||"appStore1024Other"===l,y="appStore1024Other"===l?`${n}Other`:n,m=path_1.default.join(i,`${y}${f}${u}${_?"~ipad":""}${c}`),g={from:d,to:m,filename:path_1.default.basename(m),size:f,scale:`${p.scale}x`,idiom:p.idiom,key:l};s.push(g),h||(_?r.includes(`${y}${f}`)||r.push(`${y}${f}${u}`):o.includes(`${y}${f}`)||o.push(`${y}${f}${u}`))}return{iphoneBundleIconFiles:o,ipadBundleIconFiles:r,addFiles:s}}async updateIOSIcons(e,i,t,n,a,s,o=!1,r=""){s.progress("update app icons...");const{icons:l={}}=n,d=(o||a)&&!!t;s.progress(`genAssetCar: ${d}`);const p=glob_1.default.sync("AppIcon*.+(png|jpg|jpeg|webp)",{nodir:!0,cwd:i}).map((e=>path_1.default.join(i,e))),c=`AppIcon-${uuidv4().slice(0,8)}`,u=this.updateBundleIcons(e,i,l,c,s);if(!u)throw new Error("updateBundleIcons failed");const{iphoneBundleIconFiles:f=[],ipadBundleIconFiles:_=[],addFiles:h=[]}=u,y={};for(const e in iconInfoMap){if(!iconInfoMap[e].required||l[e])continue;const i=iconInfoMap[e].size[0]*iconInfoMap[e].scale,t=iconInfoMap[e].size[1]*iconInfoMap[e].scale;if(y[e]=path_1.default.join(defaultIconDirPath,`donut-icon${i}x${t}.png`),s.progress(`using default app icons when ${e} is not config...`),!fs_extra_1.default.existsSync(y[e]))throw new Error(`required ${e} but not default or set`)}const m=this.updateBundleIcons(e,i,y,c,s);if(!m)throw new Error("updateBundleIcons WithDefaultIcon failed");const{iphoneBundleIconFiles:g,ipadBundleIconFiles:S,addFiles:I}=m;if(f.push(...g),_.push(...S),h.push(...I),!f.length&&!_.length)return;p.forEach((e=>{fs_extra_1.default.existsSync(e)&&fs_extra_1.default.removeSync(e)}));const v=path_1.default.join(t,"__assetCarOperateDir/assetsCar/"),x=path_1.default.join(v,`Assets.xcassets/${c}.appiconset/`);d&&(this.resetAssetCarOperateDir(v),fs_extra_1.default.ensureDirSync(x));const b=[];let F=!1;if(h.forEach((e=>{fs_extra_1.default.existsSync(e.to)&&fs_extra_1.default.removeSync(e.to),fs_extra_1.default.copyFileSync(e.from,e.to),d&&(fs_extra_1.default.copySync(e.from,path_1.default.join(x,e.filename)),"ios-marketing-other"===e.idiom&&(F=!0),b.push({filename:e.filename,size:e.size,scale:e.scale,idiom:e.idiom}))})),d&&fs_extra_1.default.writeJsonSync(path_1.default.join(x,"Contents.json"),{images:b,info:{author:"xcode",version:1}},{spaces:"\t"}),d){const e=(0,asar_1.preferUnpackedPath)(path_1.default.join(__dirname,"../../../static/scripts/assetsCar/")),t=path_1.default.join(v,"createAssetsCar");fs_extra_1.default.copySync(e,v);try{await(0,codesign_1.checkXcodeEnv)(s),child_process.execSync(`"${t}" ${c}`,{env:(0,env_1.getProcessEnv)()})}catch(e){throw new Error(`createAssetsCar failed ${e.message||""}`)}const n=path_1.default.join(v,"build/Assets.car"),a=path_1.default.join(i,"Assets.car");fs_extra_1.default.copyFileSync(n,a)}else if(r&&fs_extra_1.default.existsSync(r))s.message("success","命中缓存,正在使用缓存的 AssetCar"),fs_extra_1.default.copyFileSync(r,path_1.default.join(i,"Assets.car"));else{const e=path_1.default.join(i,"Assets.car");fs_extra_1.default.removeSync(e),s.message("warn","更新 App 图标可能不生效,可使用远程构建验证图标设置;工具将会缓存图标构建结果")}const P=path_1.default.join(i,"Info.plist"),j=plist.readFileSync(P);if(!j.CFBundleIcons){const e={CFBundlePrimaryIcon:{}};j.CFBundleIcons=e}F&&(j.CFBundleIcons.CFBundleAlternateIcons={OtherAppStoreIcon:{CFBundleIconFiles:[`${c}Other`],CFBundleIconName:"OtherAppStoreIcon"}}),j.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconName=c,j.CFBundleIcons.CFBundlePrimaryIcon.CFBundleIconFiles=f,j["CFBundleIcons~ipad"]||(j["CFBundleIcons~ipad"]={CFBundlePrimaryIcon:{}}),j["CFBundleIcons~ipad"].CFBundlePrimaryIcon.CFBundleIconName=c,j["CFBundleIcons~ipad"].CFBundlePrimaryIcon.CFBundleIconFiles=_,j.NSAppTransportSecurity={NSAllowsArbitraryLoads:!0},plist.writeFileSync(P,j)}chmodDirectoryTree(e){if(!fs_extra_1.default.existsSync(e))return;fs_extra_1.default.lstatSync(e).isDirectory()&&(fs_extra_1.default.chmodSync(e,493),fs_extra_1.default.readdirSync(e).forEach((i=>{this.chmodDirectoryTree(path_1.default.join(e,i))})))}resetAssetCarOperateDir(e){fs_extra_1.default.existsSync(e)&&(this.chmodDirectoryTree(e),fs_extra_1.default.removeSync(e))}replaceLaunchScreenImage(e,i,t,n,a,s){const o=path_1.default.join(e,"01J-lp-oVM-view-Ze5-6b-2t3.nib");let r=fs_extra_1.default.readFileSync(o).toString("hex");if(!i.endsWith(".png"))return void n.message("error",`IOS 启动页图片配置格式错误,必须为 PNG 格式, 错误配置:${i}`);const l=this.getMaterialFilePath(a,i),d=`${t}.png`,p=`LaunchScreen-${uuidv4().slice(0,12)}`,c=`${p}.png`,u=path_1.default.join(s,c);fs_extra_1.default.copyFileSync(l,u);const f=Buffer.from(d,"utf-8").toString("hex"),_=Buffer.from(c,"utf-8").toString("hex");return-1!==r.indexOf(f)?(r=r.replace(f,_),console.log("replace storyboard customImage success")):console.log("replace storyboard customImage fail"),fs_extra_1.default.writeFileSync(o,Buffer.from(r,"hex")),p}replaceLaunchScreenVideo(e,i,t,n){const a=path_1.default.extname(e);if([".mp4",".mov"].indexOf(a)<0)return void i.message("error",`IOS 启动页视频配置格式错误,必须为 mp4 mov 格式, 错误配置:${e}`);const s=this.getMaterialFilePath(t,e),o=`${`LaunchScreen-${uuidv4().slice(0,12)}`}${a}`,r=path_1.default.join(n,o);return fs_extra_1.default.copyFileSync(s,r),o}async updateSplashScreen(e,i,t,n,a="Dark",s){var o,r,l;let d;n.progress("update splashscreen image..."),allowTheme.includes(a)&&(d=path_1.default.join(i,`/Base.lproj/LaunchScreen${a}.storyboardc`)),d&&fs_extra_1.default.existsSync(d)&&fs_extra_1.default.copySync(d,path_1.default.join(i,"/Base.lproj/LaunchScreen.storyboardc")),allowTheme.forEach((e=>{const t=path_1.default.join(i,`/Base.lproj/LaunchScreen${e}.storyboardc`);fs_extra_1.default.existsSync(t)&&fs_extra_1.default.removeSync(t)}));let p=null===(o=null==t?void 0:t.splashscreen)||void 0===o?void 0:o.customImage;if(!p)return;const c=path_1.default.join(i,"Info.plist"),u=plist.readFileSync(c),f=u.UISplashScreenImageName;if(glob_1.default.sync("LaunchScreen-*.+(png|jpg|jpeg|webp)",{nodir:!0,cwd:i}).forEach((e=>{const t=path_1.default.join(i,e);fs_extra_1.default.removeSync(t)})),p.startsWith("%")&&(null==p?void 0:p.endsWith("%"))){const t=p.slice(1,-1),a=(null===(l=null===(r=null==s?void 0:s.base)||void 0===r?void 0:r.ios)||void 0===l?void 0:l[t])||"";if(!a)return void n.message("error",`未在国际化配置 base.json 中找到字段 ${t},请检查,启动页国际化配置失败`);p=a,Object.keys(s).forEach((a=>{var o,r;if("base"===a)return;const l=null===(r=null===(o=s[a])||void 0===o?void 0:o.ios)||void 0===r?void 0:r[t];if(l){const t=path_1.default.join(i,`/${a}.lproj/LaunchScreen_${a}.storyboardc`);fs_extra_1.default.ensureDirSync(path_1.default.join(t,"..")),fs_extra_1.default.copySync(path_1.default.join(i,"/Base.lproj/LaunchScreen.storyboardc"),t);const s=this.replaceLaunchScreenImage(t,this.getMaterialFilePath(e,l),f,n,e,i);n.progress(`update ${a} splashscreen image...`);const o=fs_extra_1.default.readFileSync(path_1.default.join(i,`${a}.lproj/InfoPlist.strings`),"utf8");let r="";r=s?o.replace("__UISplashScreenImageName__",`UISplashScreenImageName = "${s}";\n`).replace("__UILaunchStoryboardName__",`UILaunchStoryboardName = "LaunchScreen_${a}";\n`):o.replace("__UISplashScreenImageName__","").replace("__UILaunchStoryboardName__",""),fs_extra_1.default.writeFileSync(path_1.default.join(i,`${a}.lproj/InfoPlist.strings`),r),n.progress(`update ${a} splashscreen image success`)}}))}n.progress("update base splashscreen image...");const _=this.replaceLaunchScreenImage(path_1.default.join(i,"/Base.lproj/LaunchScreen.storyboardc"),this.getMaterialFilePath(e,p),f,n,e,i);n.progress("update base splashscreen image success"),_&&(u.UISplashScreenImageName=_,u.UILaunchStoryboardName="LaunchScreen",plist.writeFileSync(c,u))}async updateSplashScreenVideo(e,i,t,n,a){var s,o,r;n.progress("update splashscreen video...");let l=null===(s=null==t?void 0:t.splashscreen)||void 0===s?void 0:s.customVideo;if(!l)return;const d=path_1.default.join(i,"Info.plist"),p=plist.readFileSync(d);if(l.startsWith("%")&&(null==l?void 0:l.endsWith("%"))){const t=l.slice(1,-1),s=(null===(r=null===(o=null==a?void 0:a.base)||void 0===o?void 0:o.ios)||void 0===r?void 0:r[t])||"";if(!s)return void n.message("error",`未在国际化配置 base.json 中找到字段 ${t},请检查,启动页视频国际化配置失败`);l=s,Object.keys(a).forEach((s=>{var o,r;if("base"===s)return;const l=null===(r=null===(o=a[s])||void 0===o?void 0:o.ios)||void 0===r?void 0:r[t];if(l){const t=this.replaceLaunchScreenVideo(this.getMaterialFilePath(e,l),n,e,i);n.progress(`update ${s} splashscreen video...`);const a=fs_extra_1.default.readFileSync(path_1.default.join(i,`${s}.lproj/InfoPlist.strings`),"utf8");let o="";o=t?a.replace("__UISplashScreenVideoName__",`UISplashScreenVideoName = "${t}";\n`):a.replace("__UISplashScreenVideoName__",""),fs_extra_1.default.writeFileSync(path_1.default.join(i,`${s}.lproj/InfoPlist.strings`),o),n.progress(`update ${s} splashscreen video success`)}}))}n.progress("update base splashscreen video...");const c=this.replaceLaunchScreenVideo(this.getMaterialFilePath(e,l),n,e,i);n.progress("update base splashscreen video success"),c&&(p.UISplashScreenVideoName=c,plist.writeFileSync(d,p))}genUseExtendedSdk(e,i){const t="useExtendedLib_",n=Object.assign({},e.useExtendedSdk||{});for(const i in e)if("object"==typeof e[i])for(const a in e[i])if(a.startsWith(`${t}WeApp`)&&!0===e[i][a]){n[a.slice(15)]=!0}return!n.WeAppLBS||n.WeAppOpenFuns||n.WeAppOpenFuns_HasPay||(n.WeAppOpenFuns=!0),"RemoteDebug"===(null==i?void 0:i.debugType)&&(n.WeAppUSB=!0),n}async updateExtendedSdk(e,i,t,n,a,s,o){const r=path_1.default.join(i,"Frameworks");fs_extra_1.default.ensureDirSync(r),o.progress("update extendsdk...");const l=path_1.default.join(t,"WeAppSDK.podspec"),d=fs_extra_1.default.readFileSync(l,"utf-8"),p=this.genUseExtendedSdk(a,s);o.progress(`useExtendedSdks: ${JSON.stringify(p)}`);const{mobileapp_info:c={}}=e,u=this.getBundleIdentifier(c);if(p.WeAppOpenFuns&&p.WeAppOpenFuns_HasPay)throw new Error("OpenFuncs SDK 只可勾选使用一个,请按需勾选使用");const f={},_=["WeAppUSB"];for(const e in p){if(!p[e])continue;const i=getDepReg(e),a=d.match(i);if(!(null==a?void 0:a[1])){if(_.includes(e))continue;throw new Error(`拓展模块 ${e} 不存在或已被移除,请检查 project.miniapp.json -> 对应平台 -> useExtendedSdk 删除配置 ${e},版本配置差异请参考更新日志或 https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/miniapp/changelog/difflog.html`)}const s=[];if(a[1].split("\n").forEach((e=>{const i=e.match(/.*'(.*?)',/);if(null==i?void 0:i[1]){const e=i[1].split("/").pop(),a=path_1.default.join(t,"Libs",n,e);if(!fs_extra_1.default.existsSync(a)){if(_.includes(`${e}.framework`))return;throw new Error(`拓展模块 ${e} 不存在或已被移除,请检查 project.miniapp.json -> 对应平台 -> useExtendedSdk 删除配置 ${e},版本配置差异请参考更新日志或 https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/miniapp/changelog/difflog.html`)}const o=path_1.default.join(r,e);fs_extra_1.default.copySync(a,o),s.push(path_1.default.basename(e));const l=path_1.default.join(o,"info.plist");if(!fs_extra_1.default.existsSync(l))throw new Error(`can not found extendsdk info.plist: ${e}`);this.changeExtendSDKInfoplistBundleId(l,u,e)}})),s.length){f[s.shift()]=s}}const h=path_1.default.join(i,"DyFrameworks.plist");fs_extra_1.default.existsSync(h)&&fs_extra_1.default.removeSync(h),plist.writeFileSync(h,f)}async updatePrivacyInfo(e,i,t){var n;const a=null===(n=null==i?void 0:i.privacy)||void 0===n?void 0:n.privacyInfo;a&&(a.endsWith("PrivacyInfo.xcprivacy")?fs_extra_1.default.existsSync(a)?(fs_extra_1.default.copySync(a,path_1.default.join(e,"/PrivacyInfo.xcprivacy")),t.progress("隐私清单文件替换成功")):t.message("error","隐私清单文件替换失败,文件不存在,将使用默认文件"):t.message("error","隐私清单文件替换失败,文件名必须为 PrivacyInfo.xcprivacy,将使用默认文件"))}async updatePlugin(e,i,t,n,a,s,o,r){const l={},d={},p=[];if(n["mini-plugin"]&&Array.isArray(n["mini-plugin"].ios)){n["mini-plugin"].ios.forEach((e=>{e.open&&e.pluginId?("string"==typeof e.resourcePath&&e.resourcePath.length>0&&(l[e.pluginId]=e.resourcePath),"object"==typeof e.resourceObjects&&Object.keys(e.resourceObjects).length>0&&(d[e.pluginId]=e.resourceObjects)):p.push(e.pluginId)}))}if(p.length>0&&r.message("warn",`下列插件未启用,请确认project.miniapp.json中的配置:${p.join(", ")}`),!i.length)return;const c=path_1.default.join(e,"Frameworks"),u=path_1.default.join(e,"PlugIns");fs_extra_1.default.ensureDirSync(c),r.progress("update plugin...");const f=this.prepareAppexProfileConfig(i,n,t,a,s,o,n.version,r);if(!f)throw new Error("依赖的多端插件需要配置对应的profile");i.forEach((i=>{const{pluginId:n}=i,a=i.dir,s=`${n}.framework`,o=path_1.default.join(c,s);if(-1!==a.indexOf("local-miniapp-plugin")){const e=fs_extra_1.default.statSync(a),{mtime:i}=e;r.progress(`${n}.framework 正在使用本地版本,修改时间为 ${i}`)}fs_extra_1.default.existsSync(o)&&fs_extra_1.default.removeSync(o);const p=path_1.default.join(a,s);if(fs_extra_1.default.existsSync(p)){fs_extra_1.default.copySync(p,o),this.copyResourcesToMainBundle(p,e),this.copyUserResourcePathIntoPlugins(n,t,l[n],d[n],path_1.default.join(o,"MiniPlugin.bundle"),r);fs_extra_1.default.readdirSync(a).forEach((i=>{if(i.endsWith(".appex")){const s=path_1.default.parse(i).name,o=f[s],p=path_1.default.join(u,i);if(!o||!0!==o.enable)return;r.progress(`${n} 插件使用 appex 中 : ${i}`),fs_extra_1.default.existsSync(p)&&fs_extra_1.default.removeSync(p),fs_extra_1.default.ensureDirSync(p);const c=path_1.default.join(a,i);fs_extra_1.default.copySync(c,p),(null==o?void 0:o.profilePath)&&fs_extra_1.default.copySync(o.profilePath,path_1.default.join(p,"embedded.mobileprovision")),this.copyResourcesToMainBundle(c,e),this.copyUserResourcePathIntoPlugins(n,t,l[n],d[n],path_1.default.join(p,"MiniPlugin.bundle"),r)}else if(i.endsWith("framework")&&i!==s){const e=path_1.default.join(c,i),t=path_1.default.join(a,i);fs_extra_1.default.existsSync(e)&&fs_extra_1.default.removeSync(e),fs_extra_1.default.copySync(t,e)}}))}else fs_extra_1.default.copySync(a,o),this.copyResourcesToMainBundle(a,e),this.copyUserResourcePathIntoPlugins(n,t,l[n],d[n],path_1.default.join(o,"MiniPlugin.bundle"),r)}))}copyUserResourcePathIntoPlugins(e,i,t,n,a,s){const o=a;if(t){const n=path_1.default.basename(t),a=this.getMaterialFilePath(i,t);if(a){s.progress(`${e}.framework 正在拷贝配置的资源:${t}`);const i=fs_extra_1.default.lstatSync(a);fs_extra_1.default.ensureDirSync(o),i.isDirectory()?fs_extra_1.default.copySync(a,o):i.isFile()&&fs_extra_1.default.copyFileSync(a,path_1.default.join(o,n))}}if(n){s.progress(`${e}.framework 正在写入配置的资源`),fs_extra_1.default.ensureDirSync(o);for(const e in n){const i=n[e],t=path_1.default.join(o,e);fs_extra_1.default.ensureDirSync(o),fs_extra_1.default.ensureFileSync(t),fs_extra_1.default.writeFileSync(t,i)}}}copyResourcesToMainBundle(e,i){const t=path_1.default.join(e,"MiniPlugin.bundle"),n=path_1.default.join(t,"PluginConfig.plist");if(fs_extra_1.default.existsSync(n)){const e=plist.readFileSync(n).CopyResourcesToMainBundle;(null==e?void 0:e.length)&&e.forEach((e=>{const n=path_1.default.join(t,e);fs_extra_1.default.existsSync(n)&&fs_extra_1.default.copySync(n,path_1.default.join(i,e))}))}}prepareAppexProfileConfig(e,i,t,n,a,s,o,r){if(!n)return void r.message("doing","miniappCacheDirPath is missing");let l=!1;const d={};if(i["mini-plugin"]&&Array.isArray(i["mini-plugin"].ios)){i["mini-plugin"].ios.forEach((e=>{if(e.open&&e.pluginId&&"object"==typeof e.appexProfiles)for(const i in e.appexProfiles){r.message("doing",`检查插件 ${e.pluginId} ${i} appex 配置中 ...`);const n=e.appexProfiles[i];if(!0===n.enable){const s=`${e.pluginId}_${i}`;d[s]={enable:!0};let o=n.profilePath;if(a&&(o=n.distributeProfilePath),n.bundleID&&o){const a=path_1.default.join(t,o);fs_extra_1.default.existsSync(a)?(d[s].bundleID=n.bundleID,d[s].profilePath=path_1.default.join(t,o)):(l=!0,r.message("error",`${e.pluginId} 中 ${i} 的 profilePath 无法找到对应的文件:${a}(需要在小程序项目路径下,填入相对于项目根目录的路径)`))}else l=!0,r.message("error",`${e.pluginId}中${i} 是 无效的appexProfiles配置。需要配置 bundleID,profilePath,distributeProfilePath。profile 文件需要放置在小程序项目内,然后配置相对于小程序项目根目录的相对路径。分发证书构建的情况下, 一定需要配置distributeProfilePath。查看文档了解详情。`)}}}))}if(e.forEach((e=>{fs_extra_1.default.readdirSync(e.dir).forEach((i=>{if(i.endsWith(".appex")){const t=path_1.default.parse(i).name,n=d[t];if(n&&!0===n.enable)if(n.bundleID&&n.profilePath){if(n.bundleID&&n.profilePath){const t=path_1.default.join(e.dir,i,"info.plist"),a=n.bundleID;this.changeInfoplistBundleId(t,a),this.changeInfoplistBundleVersion(t,s,o),r.message("doing",`${e.pluginId} ${i} ${a} ${t} 处理 appex bundle ID 中`)}}else l=!0,r.message("error",`${e.pluginId} 的 多端插件包含了${t.slice(e.pluginId.length+1)} 的 appex。开发者需要在project.miniapp.json 中 mini-plugin 配置下对应合理的 profile 文件。查看文档了解详情。`)}}))})),l)return!1;if(!(0,lodash_1.isEmpty)(d)){const e=path_1.default.join(n,APPEX_PROFILES_MAPS_FILE);fs_extra_1.default.existsSync(e)&&fs_extra_1.default.removeSync(e),fs_extra_1.default.ensureFileSync(e);const i={};for(const e in d)i[e]={bundleID:d[e].bundleID,profilePath:d[e].profilePath};fs_extra_1.default.writeFileSync(e,JSON.stringify(i));const t=path_1.default.join(n,APPEX_PROFILES_MAPS_FOR_SHELL_FILE);fs_extra_1.default.existsSync(t)&&fs_extra_1.default.removeSync(t),fs_extra_1.default.ensureFileSync(t);const a=Object.keys(d).map((e=>{const i=d[e];return`pluginAppexName:${e};_;_;bundleID:${i.bundleID};_;_;profile:${i.profilePath}\n\n`})).join("");fs_extra_1.default.writeFileSync(t,a)}return d}changeExtendSDKInfoplistBundleId(e,i,t){const n=`${i}.${path_1.default.parse(t).name.replace(/_/g,"")}`;return this.changeInfoplistBundleId(e,n)}changeInfoplistBundleId(e,i){const t=plist.readFileSync(e);return t.CFBundleIdentifier=i,plist.writeFileSync(e,t),t.CFBundleIdentifier}changeInfoplistBundleVersion(e,i,t){const n=plist.readFileSync(e);return n.CFBundleVersion=i,n.CFBundleShortVersionString=t,plist.writeFileSync(e,n),n.CFBundleIdentifier}async getEntitlements(e,i,t,n){const{mobileapp_info:a={}}=e;let s=a.ios_universal_link||a.debug_ios_universal_link;s=this.polyfillUniversalLink(s);let o=[];t.universalLink&&(o=t.universalLink.split(","),o=o.filter((e=>"string"==typeof e&&e.length>0)).map((e=>this.polyfillUniversalLink(e))));let r=[];if(Array.isArray(t.__customAssociatedDomains)){r=(t.__customAssociatedDomains||[]).filter((e=>"string"==typeof e&&e.length>0)).map((e=>this.polyfillUniversalLink(e)))}return{"com.apple.developer.associated-domains":[s,...o,...r].join("_$_ULinK_$_")}}polyfillUniversalLink(e){let i=e;return(i.startsWith("https://")||i.startsWith("http://"))&&(i=i.replace(/^http(s)?:\/\//g,"applinks:")),i}useTpush(e){return(0,miniappJson_1.iOSMiniAppJsonIsUsingTpush)(e)}async buildCloud(e,i){const{projectPath:t,demoIpaPath:n,sdkPath:a,arch:s="arm64",bindingInfo:o,certificateInfo:r,output:l,miniappCacheDirPath:d,pluginDirList:p,inLandun:c,theme:u,i18nInfo:f,debugInfo:_,CILocalBuild:h,cacheAssetCarPath:y}=e,m=this.generateTempDemoIpaPath(n),{selfCertificate:g={}}=r,S=(null==g?void 0:g.isPublish)||!1,I=(0,miniappJson_1.tryGetIOSMiniappJson)(t),v=this.useTpush(I);if((0,lodash_1.isEmpty)(I))throw new Error("获取project.miniapp.json失败");if(errorIOSSdkVersions.includes(I.sdkVersion))throw new Error("当前 mini-ios.sdkVersion 存在缺陷,请参考更新日志进行修改");let x=o;if(r.signType===miniapp_builder_1.miniappSinTypes.appleId.type){const{mobileapp_info:e={}}=x;x=Object.assign(Object.assign({},x),{mobileapp_info:Object.assign(Object.assign({},e),{bundle_id:miniapp_builder_1.DEFAULT_BUNDLE_ID,debug_ios_bundle_id:miniapp_builder_1.DEFAULT_BUNDLE_ID})})}const b=await this.updateIOSInfoPlistInfo(t,x,m,I,i,f);await this.updateIOSAppConfigPlistInfo(t,x,m,I,a,!1,i,u,f),await this.updateIOSAppexInfoPlistInfo(x,m,I,b,i),await this.updateIOSIcons(t,m,d,I,S,i,!0===c,y),await this.updateSplashScreen(t,m,I,i,u,f),await this.updateSplashScreenVideo(t,m,I,i,f),await this.updateExtendedSdk(x,m,a,s,I,_,i),await this.updatePlugin(m,p,t,I,d,S,b,i),await this.updatePrivacyInfo(m,I,i),await this.updateIOSAppResource(t,m,I,i);const F=await this.getEntitlements(x,m,I,i),{mobileapp_info:P={}}=x;let j;j=r.signType===miniapp_builder_1.miniappSinTypes.appleId.type?miniapp_builder_1.DEFAULT_BUNDLE_ID:P.ios_flag&&P.bundle_id||P.debug_ios_bundle_id;const B={bundleId:j,output:l,entitlements:F,isPublish:g.isPublish};if(I.buildCloud&&(I.buildCloud.certificate&&"string"==typeof I.buildCloud.certificate&&(B.certificate=I.buildCloud.certificate),I.buildCloud.profile&&"string"==typeof I.buildCloud.profile&&(B.profile=path_1.default.join(t,I.buildCloud.profile)),v&&I.buildCloud.tpnsProfile&&"string"==typeof I.buildCloud.tpnsProfile&&(B.tpnsProfile=path_1.default.join(t,I.buildCloud.tpnsProfile))),h&&(B.profile=g.profilePath,B.certificate=g.certificateName),g.isPublish||h){const e=await(0,codesign_1.codesignAndExport)(t,m,d||"",B,i,v,!0===c);if(!0!==e.success)throw new Error(`Build ipa failed:${e.errMsg||"codesignAndExport failed"}`)}return{projectPath:t,demoIpaPath:m,opts:B,iosMiniappJson:I,isPublish:S}}async writeI18NInfoFile(e,i,t){Object.keys(i).forEach((n=>{if("base"===n)return;let a="";Object.keys(t).forEach((e=>{var s,o,r,l;"UISplashScreenImageName"!==e?"UISplashScreenVideoName"!==e?"UILaunchStoryboardName"!==e?(null===(o=null===(s=i[n])||void 0===s?void 0:s.ios)||void 0===o?void 0:o[t[e]])&&(a+=`${e} = "${null===(l=null===(r=i[n])||void 0===r?void 0:r.ios)||void 0===l?void 0:l[t[e]]}";\n`):a+="__UILaunchStoryboardName__\n":a+="__UISplashScreenVideoName__\n":a+="__UISplashScreenImageName__\n"})),a&&(fs_extra_1.default.ensureDirSync(path_1.default.join(e,`${n}.lproj`)),fs_extra_1.default.writeFileSync(path_1.default.join(e,`${n}.lproj/InfoPlist.strings`),a))}))}getMaterialFilePath(e,i){if(!i)return"";let t=i;if(path_1.default.isAbsolute(i)||(t=path_1.default.join(e,i)),fs_extra_1.default.existsSync(t))return t;const n=(0,tools_1.generateMD5)(i),a=path_1.default.basename(i),s=path_1.default.join(e,exports.remoteBuildProjectMaterialAbsoluteCacheDir,`${n}_${a}`);return fs_extra_1.default.existsSync(s)?s:""}updateIOSAppResource(e,i,t,n){const a=t.resourcePath;if(!a)return;const s=this.getMaterialFilePath(e,a);if(s){n.progress(`正在拷贝资源至主包:${s}`);const e=fs_extra_1.default.lstatSync(s);if(e.isDirectory())this.copyDirectory(s,i,!1);else if(e.isFile()){const e=path_1.default.basename(a),t=path_1.default.join(i,e);if(fs_extra_1.default.existsSync(t))throw new Error(`fail to copy ${s}, overwrite is not allowed`);fs_extra_1.default.copyFileSync(s,t)}}}copyDirectory(e,i,t=!0){if(fs_extra_1.default.ensureDirSync(i),t)fs_extra_1.default.copySync(e,i);else{fs_extra_1.default.readdirSync(e).forEach((n=>{const a=path_1.default.join(e,n),s=path_1.default.join(i,n);if(fs_extra_1.default.statSync(a).isDirectory())this.copyDirectory(a,s,t);else{if(fs_extra_1.default.existsSync(s))throw new Error(`fail to copy ${a}, overwrite is not allowed`);fs_extra_1.default.copyFileSync(a,s)}}))}}}exports.default=new buildCloudManager;
@@ -85,6 +85,9 @@ module.exports = {
85
85
  }
86
86
  ]
87
87
  },
88
+ "agent": {
89
+ "type": "object"
90
+ },
88
91
  "subPackages": {
89
92
  "type": "array",
90
93
  "items": {
@@ -587,6 +590,9 @@ module.exports = {
587
590
  }
588
591
  ]
589
592
  },
593
+ "agent": {
594
+ "type": "object"
595
+ },
590
596
  "subPackages": {
591
597
  "type": "array",
592
598
  "items": {
@@ -1089,6 +1095,9 @@ module.exports = {
1089
1095
  }
1090
1096
  ]
1091
1097
  },
1098
+ "agent": {
1099
+ "type": "object"
1100
+ },
1092
1101
  "subPackages": {
1093
1102
  "type": "array",
1094
1103
  "items": {
@@ -1587,6 +1596,9 @@ module.exports = {
1587
1596
  }
1588
1597
  ]
1589
1598
  },
1599
+ "agent": {
1600
+ "type": "object"
1601
+ },
1590
1602
  "subPackages": {
1591
1603
  "type": "array",
1592
1604
  "items": {
@@ -2224,6 +2236,12 @@ module.exports = {
2224
2236
  "boolean"
2225
2237
  ]
2226
2238
  }
2239
+ },
2240
+ "componentFramework": {
2241
+ "type": "string"
2242
+ },
2243
+ "renderer": {
2244
+ "type": "string"
2227
2245
  }
2228
2246
  },
2229
2247
  "additionalProperties": false,
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EServiceEnviroment=void 0,exports.initServices=initServices,exports.getServicesEnv=getServicesEnv,exports.initServicesByEnv=initServicesByEnv;const vsbase_1=require("../common/vsbase"),nativeModule_1=require("../nativeModule/common/nativeModule"),createService_1=require("../root/common/createService"),appDirService_1=require("../app/common/appDirService");var EServiceEnviroment;let _env;function getRootFactory(){let e;if(console.log("[miniprogram-builder] getservice",_env),_env===EServiceEnviroment.SERVER)e=require("../root/server/root").Root;else if(_env===EServiceEnviroment.ELECTRON)e=require("../root/electron/root").Root;else if(_env===EServiceEnviroment.NW)e=require("../root/nw/root").Root;else if(_env===EServiceEnviroment.CI)e=require("../root/ci/root").Root;else{if(_env!==EServiceEnviroment.WEBIDE)throw new Error("[Builder Services] Not Define Env");e=require("../root/webide/root").Root}return e}!function(e){e.ELECTRON="ELECTRON",e.SERVER="SERVER",e.NW="NW",e.CI="CI",e.WEBIDE="WEBIDE"}(EServiceEnviroment||(exports.EServiceEnviroment=EServiceEnviroment={}));let _Root=null;function getServiceFactory(){return function(e){var r;let i;return _Root||(_Root=getRootFactory()),null===(r=_Root.iis)||void 0===r||r.invokeFunction((r=>{i=r.get(e)})),i}}function initServices(e,r,i){let o,t;if(i&&(0,vsbase_1.setGetVsBaseBundle)(i),_env=e,console.log("[miniprogram-builder] initservices",_env),e===EServiceEnviroment.SERVER)t=require("../root/server/root").Root,o=require("../root/server/rootService").getSingletonServiceDescriptors;else if(e===EServiceEnviroment.ELECTRON)t=require("../root/electron/root").Root,o=require("../root/electron/rootService").getSingletonServiceDescriptors;else if(e===EServiceEnviroment.NW)t=require("../root/nw/root").Root,o=require("../root/nw/rootService").getSingletonServiceDescriptors;else if(e===EServiceEnviroment.CI)t=require("../root/ci/root").Root,o=require("../root/ci/rootService").getSingletonServiceDescriptors;else{if(e!==EServiceEnviroment.WEBIDE)throw new Error("[Builder Services] Not Define Env");t=require("../root/webide/root").Root,o=require("../root/webide/rootService").getSingletonServiceDescriptors}const n=(0,createService_1.createService)(o());t.initIisWithServices(n.instantiationService),t.iis.invokeFunction((e=>{"NativeModule"in r&&(e.get(nativeModule_1.INativeModuleService).setWXMLParsePath(r.NativeModule.WXMLParsePath),e.get(nativeModule_1.INativeModuleService).setWXSSParsePath(r.NativeModule.WXSSParsePath),e.get(nativeModule_1.INativeModuleService).setGlassEaselTemplateCompilerPath(r.NativeModule.GlassEaselLazyModulePath),e.get(appDirService_1.IAppDirService).init(r.AppDirService))}))}function getServicesEnv(){let e=EServiceEnviroment.ELECTRON;return e=EServiceEnviroment.CI,e}function initServicesByEnv(){let e=EServiceEnviroment.ELECTRON;e=EServiceEnviroment.CI,e===EServiceEnviroment.ELECTRON&&global.BACKEND||initServices(e,{})}exports.default=getServiceFactory();
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.EServiceEnviroment=void 0,exports.initServices=initServices,exports.getServicesEnv=getServicesEnv,exports.initServicesByEnv=initServicesByEnv;const vsbase_1=require("../common/vsbase"),nativeModule_1=require("../nativeModule/common/nativeModule"),createService_1=require("../root/common/createService"),appDirService_1=require("../app/common/appDirService");var EServiceEnviroment;let _env;function getRootFactory(){let e;if(console.log("[miniprogram-builder] getservice",_env),_env===EServiceEnviroment.SERVER)e=require("../root/server/root").Root;else if(_env===EServiceEnviroment.ELECTRON)e=require("../root/electron/root").Root;else if(_env===EServiceEnviroment.NW)e=require("../root/nw/root").Root;else if(_env===EServiceEnviroment.CI)e=require("../root/ci/root").Root;else{if(_env!==EServiceEnviroment.WEBIDE){const e=(new Error).stack;throw new Error(`[Builder Services] getRootFactory Not Define Env ${e}`)}e=require("../root/webide/root").Root}return e}!function(e){e.ELECTRON="ELECTRON",e.SERVER="SERVER",e.NW="NW",e.CI="CI",e.WEBIDE="WEBIDE"}(EServiceEnviroment||(exports.EServiceEnviroment=EServiceEnviroment={}));let _Root=null;function getServiceFactory(){return function(e){var r;let i;return _Root||(_Root=getRootFactory()),null===(r=_Root.iis)||void 0===r||r.invokeFunction((r=>{i=r.get(e)})),i}}function initServices(e,r,i){let o,t;if(i&&(0,vsbase_1.setGetVsBaseBundle)(i),_env=e,console.log("[miniprogram-builder] initservices",_env),e===EServiceEnviroment.SERVER)t=require("../root/server/root").Root,o=require("../root/server/rootService").getSingletonServiceDescriptors;else if(e===EServiceEnviroment.ELECTRON)t=require("../root/electron/root").Root,o=require("../root/electron/rootService").getSingletonServiceDescriptors;else if(e===EServiceEnviroment.NW)t=require("../root/nw/root").Root,o=require("../root/nw/rootService").getSingletonServiceDescriptors;else if(e===EServiceEnviroment.CI)t=require("../root/ci/root").Root,o=require("../root/ci/rootService").getSingletonServiceDescriptors;else{if(e!==EServiceEnviroment.WEBIDE){const e=(new Error).stack;throw new Error(`[Builder Services] initServices Not Define Env ${e}`)}t=require("../root/webide/root").Root,o=require("../root/webide/rootService").getSingletonServiceDescriptors}const n=(0,createService_1.createService)(o());t.initIisWithServices(n.instantiationService),t.iis.invokeFunction((e=>{"NativeModule"in r&&(e.get(nativeModule_1.INativeModuleService).setWXMLParsePath(r.NativeModule.WXMLParsePath),e.get(nativeModule_1.INativeModuleService).setWXSSParsePath(r.NativeModule.WXSSParsePath),e.get(nativeModule_1.INativeModuleService).setGlassEaselTemplateCompilerPath(r.NativeModule.GlassEaselLazyModulePath),e.get(appDirService_1.IAppDirService).init(r.AppDirService))}))}function getServicesEnv(){let e=EServiceEnviroment.ELECTRON;return e=EServiceEnviroment.CI,e}function initServicesByEnv(){let e=EServiceEnviroment.ELECTRON;e=EServiceEnviroment.CI,e===EServiceEnviroment.ELECTRON&&global.BACKEND||initServices(e,{})}exports.default=getServiceFactory();
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ElectronMultiTaskManagerService=void 0;const workerManager_1=require("../../../modules/corecompiler/original/workerThread/workerManager");class ElectronMultiTaskManagerService{async runTask(r,e,a){try{const t=(0,workerManager_1.getWorkerManager)(!0);return await t.runTask(r,e,a)}catch(a){throw new Error(`runTask ${r}, ${e.filePath} catch error ${a}`)}}}exports.ElectronMultiTaskManagerService=ElectronMultiTaskManagerService;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ElectronMultiTaskManagerService=void 0;const workerManager_1=require("../../../modules/corecompiler/original/workerThread/workerManager");class ElectronMultiTaskManagerService{async runTask(r,e,a){try{const o=(0,workerManager_1.getWorkerManager)(!0);return await o.runTask(r,e,a)}catch(a){throw console.error(`runTask ${r}, ${e.filePath} catch error ${a}`),a}}}exports.ElectronMultiTaskManagerService=ElectronMultiTaskManagerService;
@@ -0,0 +1 @@
1
+ "use strict";function preferUnpackedPath(e){return e.replace(/\.asar(?=\/|\\|$)/,".asar.unpacked")}Object.defineProperty(exports,"__esModule",{value:!0}),exports.preferUnpackedPath=preferUnpackedPath;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.codesignAndExport=codesignAndExport,exports.checkXcodeEnv=checkXcodeEnv;const generateIpa_1=require("./generateIpa"),singletontask_1=require("./singletontask"),cp_1=require("./cp"),env_1=require("./env"),path=require("path"),signAndInstallTask={};async function codesignAndExport(e,n,t,s,i,r,a,c){var o;const{output:p}=s,d=path.join(__dirname,"../static/scripts/resignIpa"),l=!!s.isPublish,g=await(0,generateIpa_1.generateIpa)(n,l,i),u=(null===(o=s.entitlements)||void 0===o?void 0:o["com.apple.developer.associated-domains"])||"";try{await checkXcodeEnv(i);const e=[g,p,s.outputAppWithName?s.outputAppWithName:"false",r?"true":"",u,t];let n=!1;if(s.certificate?(e.push(s.certificate),s.profile?(e.push(s.profile),n=!0,s.tpnsProfile&&(e.push(s.tpnsProfile),i.message("doing","certificate: find tpns profile"))):i.message("error","certificate: cant find profile")):!0===c?n=!0:i.message("error","certificate: cant find certificate"),!n)throw i.message("error","codesignAndExport missing needed info"),new Error("Failed! codesignAndExport missing needed info");return signAndInstallTask[g]||(signAndInstallTask[g]=new singletontask_1.SingletonTask(cp_1.spawnSyncExecShell.bind(null,d,e,{},i))),await signAndInstallTask[g].getResult(!0),{success:!0}}catch(e){return{success:!1,errMsg:e.message}}finally{delete signAndInstallTask[g]}}async function checkXcodeEnv(e){if(env_1.isWin)throw new Error("windows下不能使用分发证书签名。需启用远程构建");const n=path.join(__dirname,"../static/scripts/checkXcodeEnv");await(0,cp_1.spawnSyncExecShell)(n,[],{},e)}
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.codesignAndExport=codesignAndExport,exports.checkXcodeEnv=checkXcodeEnv;const generateIpa_1=require("./generateIpa"),singletontask_1=require("./singletontask"),cp_1=require("./cp"),env_1=require("./env"),asar_1=require("./asar"),path=require("path"),signAndInstallTask={};async function codesignAndExport(e,n,t,s,i,a,r,c){var o;const{output:p}=s,d=(0,asar_1.preferUnpackedPath)(path.join(__dirname,"../static/scripts/resignIpa")),l=!!s.isPublish,g=await(0,generateIpa_1.generateIpa)(n,l,i),u=(null===(o=s.entitlements)||void 0===o?void 0:o["com.apple.developer.associated-domains"])||"";try{await checkXcodeEnv(i);const e=[g,p,s.outputAppWithName?s.outputAppWithName:"false",a?"true":"",u,t];let n=!1;if(s.certificate?(e.push(s.certificate),s.profile?(e.push(s.profile),n=!0,s.tpnsProfile&&(e.push(s.tpnsProfile),i.message("doing","certificate: find tpns profile"))):i.message("error","certificate: cant find profile")):!0===c?n=!0:i.message("error","certificate: cant find certificate"),!n)throw i.message("error","codesignAndExport missing needed info"),new Error("Failed! codesignAndExport missing needed info");return signAndInstallTask[g]||(signAndInstallTask[g]=new singletontask_1.SingletonTask(cp_1.spawnSyncExecShell.bind(null,d,e,{},i))),await signAndInstallTask[g].getResult(!0),{success:!0}}catch(e){return{success:!1,errMsg:e.message}}finally{delete signAndInstallTask[g]}}async function checkXcodeEnv(e){if(env_1.isWin)throw new Error("windows下不能使用分发证书签名。需启用远程构建");const n=(0,asar_1.preferUnpackedPath)(path.join(__dirname,"../static/scripts/checkXcodeEnv"));await(0,cp_1.spawnSyncExecShell)(n,[],{},e)}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CustomErrors=exports.CustomError=void 0,exports.makeCustomError=makeCustomError;const config_1=require("../config/config");class CustomError extends Error{constructor(r){super(r.message),this.stack=r.stack,r.code&&(this.code=r.code),r.path&&(this.path=r.path),r.plugin&&(this.plugin=r.plugin),r.hook&&(this.hook=r.hook)}toString(){return`${super.toString()}${this.path?`\nFile: ${this.path}`:""}`}toJSON(){return{type:"CustomError",message:this.message,stack:this.stack,code:this.code,path:this.path,plugin:this.plugin,hook:this.hook}}}function makeCustomError(r,o,t){if(r instanceof CustomError)return o&&!r.code&&(r.code=o),t&&!r.path&&(r.path=t),r;return new CustomError({code:o||exports.CustomErrors.SUMMER_PLUGIN_ERR,message:r instanceof Error?r.toString():"string"==typeof r?r:`Unknown Error Message ${r}`,path:t,stack:r instanceof Error?null==r?void 0:r.stack:void 0})}exports.CustomError=CustomError,exports.CustomErrors={SUMMER_PLUGIN_ERR:config_1.SUMMER_PLUGIN_ERR,SUMMER_PLUGIN_CODE_ERR:config_1.SUMMER_PLUGIN_CODE_ERR};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CustomErrors=exports.CustomError=void 0,exports.makeCustomError=makeCustomError;const config_1=require("../config/config");class CustomError extends Error{constructor(r){super(r.message),this.stack=r.stack,r.code&&(this.code=r.code),r.path&&(this.path=r.path),r.plugin&&(this.plugin=r.plugin),r.hook&&(this.hook=r.hook)}toString(){return`${super.toString()}${this.path?`\nFile: ${this.path}`:""}`}toJSON(){return{type:"CustomError",message:this.message,stack:this.stack,code:this.code,path:this.path,plugin:this.plugin,hook:this.hook}}}function removeANSI(r){return r.replace(/\x1b\[[0-9;]*m/g,"")}function makeCustomError(r,o,t){if(r instanceof CustomError)return o&&!r.code&&(r.code=o),t&&!r.path&&(r.path=t),r;let s;if(r instanceof Error)s=r.toString();else if("string"==typeof r)s=r;else if(r.message&&"string"==typeof r.message)s=r.message;else try{s=`Unknown Error Message ${JSON.stringify(r)}`}catch(r){s="Unknown Error Message [unserializable]"}return new CustomError({code:o||exports.CustomErrors.SUMMER_PLUGIN_ERR,message:removeANSI(s),path:t,stack:r instanceof Error?null==r?void 0:r.stack:void 0})}exports.CustomError=CustomError,exports.CustomErrors={SUMMER_PLUGIN_ERR:config_1.SUMMER_PLUGIN_ERR,SUMMER_PLUGIN_CODE_ERR:config_1.SUMMER_PLUGIN_CODE_ERR};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PackOptionsHelper=void 0;const tslib_1=require("tslib"),path=tslib_1.__importStar(require("path")),filerules_1=tslib_1.__importDefault(require("../utils/filerules")),tools_1=require("./tools"),config_1=require("../config/config");class PackOptionsHelper{constructor(){this.packOptionIgnores=[],this.packOptionIncludes=[],this.ignoreUploadUnusedFiles=!1,this.ignoreDevUnusedFiles=!1,this.unusedFiles=new Set,this.projectRoot="",this.extOpts={include:[],ignore:[]}}setExtOpts(e={}){this.extOpts.include=e.include||[],this.extOpts.ignore=e.ignore||[]}updateState(e){var s,i;this.packOptionIgnores=(null===(s=e.packOptions)||void 0===s?void 0:s.ignore)||[],this.packOptionIncludes=(null===(i=e.packOptions)||void 0===i?void 0:i.include)||[],this.projectRoot=e.miniprogramRoot||"",this.ignoreUploadUnusedFiles=!1,this.ignoreDevUnusedFiles=!1,e.type===config_1.COMPILE_TYPE.miniProgram&&(this.ignoreUploadUnusedFiles=Boolean(e.setting.ignoreUploadUnusedFiles),this.ignoreDevUnusedFiles=Boolean(e.setting.ignoreDevUnusedFiles)),(0,tools_1.isPluginType)(e)&&(this.projectRoot=e.pluginRoot||"")}isUnuserFilesEnable(e=!1){return e?!1!==this.ignoreUploadUnusedFiles:!0===this.ignoreDevUnusedFiles||!1!==this.ignoreDevUnusedFiles}filter(e,s=!1){return e.filter((e=>this.isNotIgnored(e,s)))}isIgnored(e,s=!1){return this.isIgnoredByRules(e)||this.isIgnoreByUnusedFiles(e,s)}isNotIgnored(e,s=!1){return!this.isIgnored(e,s)}isIgnoredByRules(e,s={}){return!this.isFileIncluded(e,s.include)&&this.isFileIgnored(e,s.ignore)}relativePath(e){return path.posix.relative(this.projectRoot,e)}isFileIgnored(e,s){return s||(s=[...this.packOptionIgnores,...this.extOpts.ignore]),filerules_1.default.isFileIgnored(e,s)}isFileIncluded(e,s){return s||(s=[...this.packOptionIncludes,...this.extOpts.include]),filerules_1.default.isFileIncluded(e,s)}isIgnoreByUnusedFiles(e,s=!1){return!!this.isUnuserFilesEnable(s)&&(!this.isFileIncluded(e)&&this.unusedFiles.has((0,tools_1.sourcePathToTargetPath)(e)))}getUnusedFiles(){return this.unusedFiles}isScssOnlyImportedByFile(e){const s=path.extname(e.path);if("Wxss"===e.type&&[".scss",".sass",".less"].includes(s)&&e.parentDeps){let s=!0;return e.parentDeps.forEach((e=>{"file"!==e.from&&(s=!1)})),s}return!1}clearUnusedFiles(){this.unusedFiles.clear()}async initUnusedFiles(e,s,i=!1){if(!(this.unusedFiles.size>0)&&(this.updateState(e),this.isUnuserFilesEnable(i)&&s))try{await s.analyse();const i=s.fileHelper.getFileList("").filter((e=>(0,tools_1.isCodeFile)(path.posix.extname(e)))),t=new Set;s.graph.modules.forEach((e=>{const s=i.find((s=>s===e.path));if(s){if(this.isScssOnlyImportedByFile(e))return;t.add((0,tools_1.sourcePathToTargetPath)(s))}}));const n=new Set;i.forEach((s=>{const i=(0,tools_1.sourcePathToTargetPath)(s);t.has(i)||n.add(path.posix.join(e.miniprogramRoot,i))})),this.unusedFiles=n}catch(e){console.error("initUnusedFiles error",e)}}}exports.PackOptionsHelper=PackOptionsHelper,exports.default=new PackOptionsHelper;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PackOptionsHelper=void 0;const tslib_1=require("tslib"),path=tslib_1.__importStar(require("path")),filerules_1=tslib_1.__importDefault(require("../utils/filerules")),tools_1=require("./tools"),config_1=require("../config/config");class PackOptionsHelper{constructor(){this.packOptionIgnores=[],this.packOptionIncludes=[],this.ignoreUploadUnusedFiles=!1,this.ignoreDevUnusedFiles=!1,this.unusedFiles=new Set,this.projectRoot="",this.extOpts={include:[],ignore:[]}}setExtOpts(e={}){this.extOpts.include=e.include||[],this.extOpts.ignore=e.ignore||[]}updateState(e){var s,i;this.packOptionIgnores=(null===(s=e.packOptions)||void 0===s?void 0:s.ignore)||[],this.packOptionIncludes=(null===(i=e.packOptions)||void 0===i?void 0:i.include)||[],this.projectRoot=e.miniprogramRoot||"",this.ignoreUploadUnusedFiles=!1,this.ignoreDevUnusedFiles=!1,e.type===config_1.COMPILE_TYPE.miniProgram&&(this.ignoreUploadUnusedFiles=Boolean(e.setting.ignoreUploadUnusedFiles),this.ignoreDevUnusedFiles=Boolean(e.setting.ignoreDevUnusedFiles)),(0,tools_1.isPluginType)(e)&&(this.projectRoot=e.pluginRoot||"")}isUnuserFilesEnable(e=!1){return e?!1!==this.ignoreUploadUnusedFiles:!0===this.ignoreDevUnusedFiles||!1!==this.ignoreDevUnusedFiles}filter(e,s=!1){return e.filter((e=>this.isNotIgnored(e,s)))}isIgnored(e,s=!1){return this.isIgnoredByRules(e)||this.isIgnoreByUnusedFiles(e,s)}isNotIgnored(e,s=!1){return!this.isIgnored(e,s)}isIgnoredByRules(e,s={}){return!this.isFileIncluded(e,s.include)&&this.isFileIgnored(e,s.ignore)}relativePath(e){return path.posix.relative(this.projectRoot,e)}isFileIgnored(e,s){return s||(s=[...this.packOptionIgnores,...this.extOpts.ignore]),filerules_1.default.isFileIgnored(e,s)}isFileIncluded(e,s){return s||(s=[...this.packOptionIncludes,...this.extOpts.include]),filerules_1.default.isFileIncluded(e,s)}isIgnoreByUnusedFiles(e,s=!1){return!!this.isUnuserFilesEnable(s)&&(!this.isFileIncluded(e)&&this.unusedFiles.has((0,tools_1.sourcePathToTargetPath)(e)))}getUnusedFiles(){return this.unusedFiles}isScssOnlyImportedByFile(e){const s=path.extname(e.path);if("Wxss"===e.type&&[".scss",".sass",".less"].includes(s)&&e.parentDeps){let s=!0;return e.parentDeps.forEach((e=>{"file"!==e.from&&(s=!1)})),s}return!1}clearUnusedFiles(){this.unusedFiles.clear()}async initUnusedFiles(e,s,i=!1,t){if(!(this.unusedFiles.size>0)&&(this.updateState(e),this.isUnuserFilesEnable(i)&&s)){null==t||t("initUnusedFiles","doing","analyzing codes...");try{await s.analyse();const i=s.fileHelper.getFileList("").filter((e=>(0,tools_1.isCodeFile)(path.posix.extname(e)))),t=new Set;s.graph.modules.forEach((e=>{const s=i.find((s=>s===e.path));if(s){if(this.isScssOnlyImportedByFile(e))return;t.add((0,tools_1.sourcePathToTargetPath)(s))}}));const n=new Set;i.forEach((s=>{const i=(0,tools_1.sourcePathToTargetPath)(s);t.has(i)||n.add(path.posix.join(e.miniprogramRoot,i))})),this.unusedFiles=n}catch(e){console.error("initUnusedFiles error",e)}if(0!==this.getUnusedFiles().size){const e=Array.from(this.getUnusedFiles()),s=e.length>5?`${e.slice(0,5).join(",")}... (${e.length} files)`:e.join(",");null==t||t("initUnusedFiles","doing",`ignoring files: ${s}`)}null==t||t("initUnusedFiles","success","analyzing codes success")}}}exports.PackOptionsHelper=PackOptionsHelper,exports.default=new PackOptionsHelper;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DepMap=void 0,exports.DepMap={_apply_decorated_descriptor:[],_apply_decs_2203_r:[],_array_like_to_array:[],_array_with_holes:[],_array_without_holes:["_array_like_to_array"],_assert_this_initialized:[],_async_generator:["_await_value"],_async_generator_delegate:[],_async_iterator:[],_async_to_generator:[],_await_async_generator:["_await_value"],_await_value:[],_check_private_redeclaration:[],_class_apply_descriptor_destructure:[],_class_apply_descriptor_get:[],_class_apply_descriptor_set:[],_class_apply_descriptor_update:[],_class_call_check:[],_class_check_private_static_access:[],_class_check_private_static_field_descriptor:[],_class_extract_field_descriptor:[],_class_name_tdz_error:[],_class_private_field_destructure:["_class_apply_descriptor_destructure","_class_extract_field_descriptor"],_class_private_field_get:["_class_apply_descriptor_get","_class_extract_field_descriptor"],_class_private_field_init:["_check_private_redeclaration"],_class_private_field_loose_base:[],_class_private_field_loose_key:[],_class_private_field_set:["_class_apply_descriptor_set","_class_extract_field_descriptor"],_class_private_field_update:["_class_apply_descriptor_update","_class_extract_field_descriptor"],_class_private_method_get:[],_class_private_method_init:["_check_private_redeclaration"],_class_private_method_set:[],_class_static_private_field_destructure:["_class_apply_descriptor_destructure","_class_check_private_static_access","_class_check_private_static_field_descriptor"],_class_static_private_field_spec_get:["_class_apply_descriptor_get","_class_check_private_static_access","_class_check_private_static_field_descriptor"],_class_static_private_field_spec_set:["_class_apply_descriptor_set","_class_check_private_static_access","_class_check_private_static_field_descriptor"],_class_static_private_field_update:["_class_apply_descriptor_update","_class_check_private_static_access","_class_check_private_static_field_descriptor"],_class_static_private_method_get:["_class_check_private_static_access"],_construct:["_is_native_reflect_construct","_set_prototype_of"],_create_class:[],_create_for_of_iterator_helper_loose:["_unsupported_iterable_to_array"],_create_super:["_get_prototype_of","_is_native_reflect_construct","_possible_constructor_return"],_decorate:["_to_array","_to_property_key","_type_of"],_defaults:[],_define_enumerable_properties:[],_define_property:[],_dispose:[],_export_star:[],_extends:[],_get:["_super_prop_base"],_get_prototype_of:[],_identity:[],_inherits:["_set_prototype_of"],_inherits_loose:[],_initializer_define_property:[],_initializer_warning_helper:[],_instanceof:[],_interop_require_default:[],_interop_require_wildcard:[],_is_native_function:[],_is_native_reflect_construct:[],_iterable_to_array:[],_iterable_to_array_limit:[],_iterable_to_array_limit_loose:[],_jsx:[],_new_arrow_check:[],_non_iterable_rest:[],_non_iterable_spread:[],_object_destructuring_empty:[],_object_spread:["_define_property"],_object_spread_props:[],_object_without_properties:["_object_without_properties_loose"],_object_without_properties_loose:[],_possible_constructor_return:["_assert_this_initialized","_type_of"],_read_only_error:[],_set:["_define_property","_super_prop_base"],_set_prototype_of:[],_skip_first_generator_next:[],_sliced_to_array:["_array_with_holes","_iterable_to_array_limit","_non_iterable_rest","_unsupported_iterable_to_array"],_sliced_to_array_loose:["_array_with_holes","_iterable_to_array_limit_loose","_non_iterable_rest","_unsupported_iterable_to_array"],_super_prop_base:["_get_prototype_of"],_tagged_template_literal:[],_tagged_template_literal_loose:[],_throw:[],_to_array:["_array_with_holes","_iterable_to_array","_non_iterable_rest","_unsupported_iterable_to_array"],_to_consumable_array:["_array_without_holes","_iterable_to_array","_non_iterable_spread","_unsupported_iterable_to_array"],_to_primitive:["_type_of"],_to_property_key:["_to_primitive","_type_of"],_ts_decorate:[],_ts_generator:[],_ts_metadata:[],_ts_param:[],_ts_values:[],_type_of:[],_unsupported_iterable_to_array:["_array_like_to_array"],_update:["_get","_set"],_using:[],_wrap_async_generator:["_async_generator"],_wrap_native_super:["_construct","_get_prototype_of","_is_native_function","_set_prototype_of"],_write_only_error:[]};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.DepMap=void 0,exports.DepMap={_apply_decorated_descriptor:[],_apply_decs_2203_r:[],_array_like_to_array:[],_array_with_holes:[],_array_without_holes:["_array_like_to_array"],_assert_this_initialized:[],_async_generator:["_overload_yield"],_async_generator_delegate:["_overload_yield"],_async_iterator:[],_async_to_generator:[],_await_async_generator:["_overload_yield"],_await_value:[],_call_super:["_get_prototype_of","_is_native_reflect_construct","_possible_constructor_return"],_check_private_redeclaration:[],_class_apply_descriptor_destructure:[],_class_apply_descriptor_get:[],_class_apply_descriptor_set:[],_class_apply_descriptor_update:[],_class_call_check:[],_class_check_private_static_access:[],_class_check_private_static_field_descriptor:[],_class_extract_field_descriptor:[],_class_name_tdz_error:[],_class_private_field_destructure:["_class_apply_descriptor_destructure","_class_extract_field_descriptor"],_class_private_field_get:["_class_apply_descriptor_get","_class_extract_field_descriptor"],_class_private_field_init:["_check_private_redeclaration"],_class_private_field_loose_base:[],_class_private_field_loose_key:[],_class_private_field_set:["_class_apply_descriptor_set","_class_extract_field_descriptor"],_class_private_field_update:["_class_apply_descriptor_update","_class_extract_field_descriptor"],_class_private_method_get:[],_class_private_method_init:["_check_private_redeclaration"],_class_private_method_set:[],_class_static_private_field_destructure:["_class_apply_descriptor_destructure","_class_check_private_static_access","_class_check_private_static_field_descriptor"],_class_static_private_field_spec_get:["_class_apply_descriptor_get","_class_check_private_static_access","_class_check_private_static_field_descriptor"],_class_static_private_field_spec_set:["_class_apply_descriptor_set","_class_check_private_static_access","_class_check_private_static_field_descriptor"],_class_static_private_field_update:["_class_apply_descriptor_update","_class_check_private_static_access","_class_check_private_static_field_descriptor"],_class_static_private_method_get:["_class_check_private_static_access"],_construct:["_is_native_reflect_construct","_set_prototype_of"],_create_class:[],_create_for_of_iterator_helper_loose:["_unsupported_iterable_to_array"],_create_super:["_get_prototype_of","_is_native_reflect_construct","_possible_constructor_return"],_decorate:["_to_array","_to_property_key","_type_of"],_defaults:[],_define_enumerable_properties:[],_define_property:[],_dispose:[],_export_star:[],_extends:[],_get:["_super_prop_base"],_get_prototype_of:[],_identity:[],_inherits:["_set_prototype_of"],_inherits_loose:[],_initializer_define_property:[],_initializer_warning_helper:[],_instanceof:[],_interop_require_default:[],_interop_require_wildcard:[],_is_native_function:[],_is_native_reflect_construct:[],_iterable_to_array:[],_iterable_to_array_limit:[],_iterable_to_array_limit_loose:[],_jsx:[],_new_arrow_check:[],_non_iterable_rest:[],_non_iterable_spread:[],_object_destructuring_empty:[],_object_spread:["_define_property"],_object_spread_props:[],_object_without_properties:["_object_without_properties_loose"],_object_without_properties_loose:[],_overload_yield:[],_possible_constructor_return:["_assert_this_initialized","_type_of"],_read_only_error:[],_set:["_define_property","_super_prop_base"],_set_prototype_of:[],_skip_first_generator_next:[],_sliced_to_array:["_array_with_holes","_iterable_to_array_limit","_non_iterable_rest","_unsupported_iterable_to_array"],_sliced_to_array_loose:["_array_with_holes","_iterable_to_array_limit_loose","_non_iterable_rest","_unsupported_iterable_to_array"],_super_prop_base:["_get_prototype_of"],_tagged_template_literal:[],_tagged_template_literal_loose:[],_throw:[],_to_array:["_array_with_holes","_iterable_to_array","_non_iterable_rest","_unsupported_iterable_to_array"],_to_consumable_array:["_array_without_holes","_iterable_to_array","_non_iterable_spread","_unsupported_iterable_to_array"],_to_primitive:["_type_of"],_to_property_key:["_to_primitive","_type_of"],_ts_add_disposable_resource:[],_ts_decorate:[],_ts_dispose_resources:[],_ts_generator:[],_ts_metadata:[],_ts_param:[],_ts_values:[],_type_of:[],_unsupported_iterable_to_array:["_array_like_to_array"],_update:["_get","_set"],_using:[],_using_ctx:[],_wrap_async_generator:["_async_generator"],_wrap_native_super:["_construct","_get_prototype_of","_is_native_function","_set_prototype_of"],_write_only_error:[]};
@@ -1 +1 @@
1
- "use strict";function _apply_decorated_descriptor(e,i,r,t,l){var a={};Object.keys(t).forEach(function(e){a[e]=t[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=r.slice().reverse().reduce(function(r,t){return t&&t(e,i,r)||r},a);var o=Object.prototype.hasOwnProperty.call(a,"get")||Object.prototype.hasOwnProperty.call(a,"set");return l&&void 0!==a.initializer&&!o&&(a.value=a.initializer?a.initializer.call(l):void 0,a.initializer=void 0),o&&(delete a.writable,delete a.initializer,delete a.value),void 0===a.initializer&&(Object.defineProperty(e,i,a),a=null),a}exports._=exports._apply_decorated_descriptor=_apply_decorated_descriptor;
1
+ "use strict";function _apply_decorated_descriptor(e,i,r,t,l){var a={};Object.keys(t).forEach(function(e){a[e]=t[e]}),a.enumerable=!!a.enumerable,a.configurable=!!a.configurable,("value"in a||a.initializer)&&(a.writable=!0),a=r.slice().reverse().reduce(function(r,t){return t&&t(e,i,r)||r},a);var n=Object.prototype.hasOwnProperty.call(a,"get")||Object.prototype.hasOwnProperty.call(a,"set");return l&&void 0!==a.initializer&&!n&&(a.value=a.initializer?a.initializer.call(l):void 0,a.initializer=void 0),n&&(delete a.writable,delete a.initializer,delete a.value),void 0===a.initializer&&(Object.defineProperty(e,i,a),a=null),a}exports._=_apply_decorated_descriptor;
@@ -1 +1 @@
1
- "use strict";function _apply_decs_2203_r(t,e,r,n){function o(t,e){return function(r){(function(t,e){if(t.v)throw Error("attempted to call "+e+" after decoration was finished")})(e,"addInitializer"),i(r,"An initializer"),t.push(r)}}function a(t,e,r,n,a,i,s,c,u){switch(a){case 1:l="accessor";break;case 2:l="method";break;case 3:l="getter";break;case 4:l="setter";break;default:l="field"}var l,f,d,p={kind:l,name:s?"#"+e:e,static:i,private:s,metadata:c},v={v:!1};p.addInitializer=o(n,v),0===a?s?(f=r.get,d=r.set):(f=function(){return this[e]},d=function(t){this[e]=t}):2===a?f=function(){return r.value}:((1===a||3===a)&&(f=function(){return r.get.call(this)}),(1===a||4===a)&&(d=function(t){r.set.call(this,t)})),p.access=f&&d?{get:f,set:d}:f?{get:f}:{set:d};try{return t(u,p)}finally{v.v=!0}}function i(t,e){if("function"!=typeof t)throw TypeError(e+" must be a function")}function s(t,e){var r=typeof e;if(1===t){if("object"!==r||null===e)throw TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==e.get&&i(e.get,"accessor.get"),void 0!==e.set&&i(e.set,"accessor.set"),void 0!==e.init&&i(e.init,"accessor.init")}else if("function"!==r)throw TypeError((0===t?"field":10===t?"class":"method")+" decorators must return a function or void 0")}function c(t,e){e&&t.push(function(t){for(var r=0;r<e.length;r++)e[r].call(t);return t})}function u(t,e){return Object.defineProperty(t,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:e})}return exports._=exports._apply_decs_2203_r=_apply_decs_2203_r=function(t,e,r,n){if(void 0!==n)var i=n[Symbol.metadata||Symbol.for("Symbol.metadata")];var l=Object.create(void 0===i?null:i),f=function(t,e,r){for(var n=[],o=new Map,i=new Map,u=0;u<e.length;u++){var l,f,d,p,v=e[u];if(Array.isArray(v)){var g=v[1],h=v[2],y=v.length>3,m=g>=5;if(m?(d=t,g-=5,p=f=f||[]):(d=t.prototype,p=l=l||[]),0!==g&&!y){var _=m?i:o,b=_.get(h)||0;if(!0===b||3===b&&4!==g||4===b&&3!==g)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+h);!b&&g>2?_.set(h,g):_.set(h,!0)}!function(t,e,r,n,o,i,c,u,l){var f,d,p,v,g,h,y=r[0];if(c?f=0===o||1===o?{get:r[3],set:r[4]}:3===o?{get:r[3]}:4===o?{set:r[3]}:{value:r[3]}:0!==o&&(f=Object.getOwnPropertyDescriptor(e,n)),1===o?p={get:f.get,set:f.set}:2===o?p=f.value:3===o?p=f.get:4===o&&(p=f.set),"function"==typeof y)void 0!==(v=a(y,n,f,u,o,i,c,l,p))&&(s(o,v),0===o?d=v:1===o?(d=v.init,p={get:v.get||p.get,set:v.set||p.set}):p=v);else for(var m=y.length-1;m>=0;m--)void 0!==(v=a(y[m],n,f,u,o,i,c,l,p))&&(s(o,v),0===o?h=v:1===o?(h=v.init,p={get:v.get||p.get,set:v.set||p.set}):p=v,void 0!==h&&(void 0===d?d=h:"function"==typeof d?d=[d,h]:d.push(h)));if(0===o||1===o){if(void 0===d)d=function(t,e){return e};else if("function"!=typeof d){var _=d;d=function(t,e){for(var r=e,n=0;n<_.length;n++)r=_[n].call(t,r);return r}}else{var b=d;d=function(t,e){return b.call(t,e)}}t.push(d)}0!==o&&(1===o?(f.get=p.get,f.set=p.set):2===o?f.value=p:3===o?f.get=p:4===o&&(f.set=p),c?1===o?(t.push(function(t,e){return p.get.call(t,e)}),t.push(function(t,e){return p.set.call(t,e)})):2===o?t.push(p):t.push(function(t,e){return p.call(t,e)}):Object.defineProperty(e,n,f))}(n,d,v,h,g,m,y,p,r)}}return c(n,l),c(n,f),n}(t,e,l);return r.length||u(t,l),{e:f,get c(){return function(t,e,r){if(e.length>0){for(var n=[],a=t,i=t.name,c=e.length-1;c>=0;c--){var l={v:!1};try{var f=e[c](a,{kind:"class",name:i,addInitializer:o(n,l),metadata:r})}finally{l.v=!0}void 0!==f&&(s(10,f),a=f)}return[u(a,r),function(){for(var t=0;t<n.length;t++)n[t].call(a)}]}}(t,r,l)}}},_apply_decs_2203_r(t,e,r,n)}exports._=exports._apply_decs_2203_r=_apply_decs_2203_r;
1
+ "use strict";function _apply_decs_2203_r(t,e,r,n){function o(t,e){return function(r){(function(t,e){if(t.v)throw Error("attempted to call "+e+" after decoration was finished")})(e,"addInitializer"),a(r,"An initializer"),t.push(r)}}function i(t,e,r,n,i,a,s,c,u){switch(i){case 1:l="accessor";break;case 2:l="method";break;case 3:l="getter";break;case 4:l="setter";break;default:l="field"}var l,f,d,p={kind:l,name:s?"#"+e:e,static:a,private:s,metadata:c},v={v:!1};p.addInitializer=o(n,v),0===i?s?(f=r.get,d=r.set):(f=function(){return this[e]},d=function(t){this[e]=t}):2===i?f=function(){return r.value}:((1===i||3===i)&&(f=function(){return r.get.call(this)}),(1===i||4===i)&&(d=function(t){r.set.call(this,t)})),p.access=f&&d?{get:f,set:d}:f?{get:f}:{set:d};try{return t(u,p)}finally{v.v=!0}}function a(t,e){if("function"!=typeof t)throw TypeError(e+" must be a function")}function s(t,e){var r=typeof e;if(1===t){if("object"!==r||null===e)throw TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==e.get&&a(e.get,"accessor.get"),void 0!==e.set&&a(e.set,"accessor.set"),void 0!==e.init&&a(e.init,"accessor.init")}else if("function"!==r)throw TypeError((0===t?"field":10===t?"class":"method")+" decorators must return a function or void 0")}function c(t,e){e&&t.push(function(t){for(var r=0;r<e.length;r++)e[r].call(t);return t})}function u(t,e){return Object.defineProperty(t,Symbol.metadata||Symbol.for("Symbol.metadata"),{configurable:!0,enumerable:!0,value:e})}return exports._=_apply_decs_2203_r=function(t,e,r,n){if(void 0!==n)var a=n[Symbol.metadata||Symbol.for("Symbol.metadata")];var l=Object.create(void 0===a?null:a),f=function(t,e,r){for(var n=[],o=new Map,a=new Map,u=0;u<e.length;u++){var l,f,d,p,v=e[u];if(Array.isArray(v)){var g=v[1],h=v[2],y=v.length>3,m=g>=5;if(m?(d=t,g-=5,p=f=f||[]):(d=t.prototype,p=l=l||[]),0!==g&&!y){var b=m?a:o,_=b.get(h)||0;if(!0===_||3===_&&4!==g||4===_&&3!==g)throw Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+h);!_&&g>2?b.set(h,g):b.set(h,!0)}!function(t,e,r,n,o,a,c,u,l){var f,d,p,v,g,h,y=r[0];if(c?f=0===o||1===o?{get:r[3],set:r[4]}:3===o?{get:r[3]}:4===o?{set:r[3]}:{value:r[3]}:0!==o&&(f=Object.getOwnPropertyDescriptor(e,n)),1===o?p={get:f.get,set:f.set}:2===o?p=f.value:3===o?p=f.get:4===o&&(p=f.set),"function"==typeof y)void 0!==(v=i(y,n,f,u,o,a,c,l,p))&&(s(o,v),0===o?d=v:1===o?(d=v.init,p={get:g=v.get||p.get,set:v.set||p.set}):p=v);else for(var m=y.length-1;m>=0;m--)void 0!==(v=i(y[m],n,f,u,o,a,c,l,p))&&(s(o,v),0===o?h=v:1===o?(h=v.init,p={get:g=v.get||p.get,set:v.set||p.set}):p=v,void 0!==h&&(void 0===d?d=h:"function"==typeof d?d=[d,h]:d.push(h)));if(0===o||1===o){if(void 0===d)d=function(t,e){return e};else if("function"!=typeof d){var b=d;d=function(t,e){for(var r=e,n=0;n<b.length;n++)r=b[n].call(t,r);return r}}else{var _=d;d=function(t,e){return _.call(t,e)}}t.push(d)}0!==o&&(1===o?(f.get=p.get,f.set=p.set):2===o?f.value=p:3===o?f.get=p:4===o&&(f.set=p),c?1===o?(t.push(function(t,e){return p.get.call(t,e)}),t.push(function(t,e){return p.set.call(t,e)})):2===o?t.push(p):t.push(function(t,e){return p.call(t,e)}):Object.defineProperty(e,n,f))}(n,d,v,h,g,m,y,p,r)}}return c(n,l),c(n,f),n}(t,e,l);return r.length||u(t,l),{e:f,get c(){return function(t,e,r){if(e.length>0){for(var n=[],i=t,a=t.name,c=e.length-1;c>=0;c--){var l={v:!1};try{var f=e[c](i,{kind:"class",name:a,addInitializer:o(n,l),metadata:r})}finally{l.v=!0}void 0!==f&&(s(10,f),i=f)}return[u(i,r),function(){for(var t=0;t<n.length;t++)n[t].call(i)}]}}(t,r,l)}}},_apply_decs_2203_r(t,e,r,n)}exports._=_apply_decs_2203_r;
@@ -1 +1 @@
1
- "use strict";function _array_like_to_array(r,a){(null==a||a>r.length)&&(a=r.length);for(var _=0,t=Array(a);_<a;_++)t[_]=r[_];return t}exports._=exports._array_like_to_array=_array_like_to_array;
1
+ "use strict";function _array_like_to_array(r,a){(null==a||a>r.length)&&(a=r.length);for(var t=0,_=Array(a);t<a;t++)_[t]=r[t];return _}exports._=_array_like_to_array;
@@ -1 +1 @@
1
- "use strict";function _array_with_holes(r){if(Array.isArray(r))return r}exports._=exports._array_with_holes=_array_with_holes;
1
+ "use strict";function _array_with_holes(r){if(Array.isArray(r))return r}exports._=_array_with_holes;
@@ -1 +1 @@
1
- "use strict";var _array_like_to_array=require("./_array_like_to_array.js");function _array_without_holes(r){if(Array.isArray(r))return _array_like_to_array._(r)}exports._=exports._array_without_holes=_array_without_holes;
1
+ "use strict";var _array_like_to_array=require("./_array_like_to_array.js");function _array_without_holes(r){if(Array.isArray(r))return _array_like_to_array._(r)}exports._=_array_without_holes;
@@ -1 +1 @@
1
- "use strict";function _assert_this_initialized(i){if(void 0===i)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i}exports._=exports._assert_this_initialized=_assert_this_initialized;
1
+ "use strict";function _assert_this_initialized(i){if(void 0===i)throw ReferenceError("this hasn't been initialised - super() hasn't been called");return i}exports._=_assert_this_initialized;
@@ -1 +1 @@
1
- "use strict";var _await_value=require("./_await_value.js");function _async_generator(e){var t,r;function n(t,r){try{var a=e[t](r),u=a.value,i=u instanceof _await_value._;Promise.resolve(i?u.wrapped:u).then(function(e){if(i){n("next",e);return}o(a.done?"return":"normal",e)},function(e){n("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":t.resolve({value:o,done:!0});break;case"throw":t.reject(o);break;default:t.resolve({value:o,done:!1})}(t=t.next)?n(t.key,t.arg):r=null}this._invoke=function(e,o){return new Promise(function(a,u){var i={key:e,arg:o,resolve:a,reject:u,next:null};r?r=r.next=i:(t=r=i,n(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}exports._=exports._async_generator=_async_generator,"function"==typeof Symbol&&Symbol.asyncIterator&&(_async_generator.prototype[Symbol.asyncIterator]=function(){return this}),_async_generator.prototype.next=function(e){return this._invoke("next",e)},_async_generator.prototype.throw=function(e){return this._invoke("throw",e)},_async_generator.prototype.return=function(e){return this._invoke("return",e)};
1
+ "use strict";var _overload_yield=require("./_overload_yield.js");function _async_generator(e){var r,n;function t(r,n){try{var a=e[r](n),u=a.value,i=u instanceof _overload_yield._;Promise.resolve(i?u.v:u).then(function(n){if(i){var c="return"===r?"return":"next";if(!u.k||n.done)return t(c,n);n=e[c](n).value}o(a.done?"return":"normal",n)},function(e){t("throw",e)})}catch(e){o("throw",e)}}function o(e,o){switch(e){case"return":r.resolve({value:o,done:!0});break;case"throw":r.reject(o);break;default:r.resolve({value:o,done:!1})}(r=r.next)?t(r.key,r.arg):n=null}this._invoke=function(e,o){return new Promise(function(a,u){var i={key:e,arg:o,resolve:a,reject:u,next:null};n?n=n.next=i:(r=n=i,t(e,o))})},"function"!=typeof e.return&&(this.return=void 0)}_async_generator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},_async_generator.prototype.next=function(e){return this._invoke("next",e)},_async_generator.prototype.throw=function(e){return this._invoke("throw",e)},_async_generator.prototype.return=function(e){return this._invoke("return",e)},exports._=_async_generator;
@@ -1 +1 @@
1
- "use strict";function _async_generator_delegate(t,n){var e={},r=!1;function o(e,o){return r=!0,{done:!1,value:n(o=new Promise(function(n){n(t[e](o))}))}}return"function"==typeof Symbol&&Symbol.iterator&&(e[Symbol.iterator]=function(){return this}),e.next=function(t){return r?(r=!1,t):o("next",t)},"function"==typeof t.throw&&(e.throw=function(t){if(r)throw r=!1,t;return o("throw",t)}),"function"==typeof t.return&&(e.return=function(t){return o("return",t)}),e}exports._=exports._async_generator_delegate=_async_generator_delegate;
1
+ "use strict";var _overload_yield=require("./_overload_yield.js");function _async_generator_delegate(e){var r={},t=!1;function n(r,n){return t=!0,n=new Promise(function(t){t(e[r](n))}),{done:!1,value:new _overload_yield._(n,1)}}return r["u">typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},r.next=function(e){return t?(t=!1,e):n("next",e)},"function"==typeof e.throw&&(r.throw=function(e){if(t)throw t=!1,e;return n("throw",e)}),"function"==typeof e.return&&(r.return=function(e){return t?(t=!1,e):n("return",e)}),r}exports._=_async_generator_delegate;
@@ -1 +1 @@
1
- "use strict";function _async_iterator(r){var t,n,e,o=2;for("undefined"!=typeof Symbol&&(n=Symbol.asyncIterator,e=Symbol.iterator);o--;){if(n&&null!=(t=r[n]))return t.call(r);if(e&&null!=(t=r[e]))return new AsyncFromSyncIterator(t.call(r));n="@@asyncIterator",e="@@iterator"}throw TypeError("Object is not async iterable")}function AsyncFromSyncIterator(r){function t(r){if(Object(r)!==r)return Promise.reject(TypeError(r+" is not an object."));var t=r.done;return Promise.resolve(r.value).then(function(r){return{value:r,done:t}})}return(AsyncFromSyncIterator=function(r){this.s=r,this.n=r.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(r){var n=this.s.return;return void 0===n?Promise.resolve({value:r,done:!0}):t(n.apply(this.s,arguments))},throw:function(r){var n=this.s.return;return void 0===n?Promise.reject(r):t(n.apply(this.s,arguments))}},new AsyncFromSyncIterator(r)}exports._=exports._async_iterator=_async_iterator;
1
+ "use strict";function _async_iterator(r){var t,n,e,o=2;for("u">typeof Symbol&&(n=Symbol.asyncIterator,e=Symbol.iterator);o--;){if(n&&null!=(t=r[n]))return t.call(r);if(e&&null!=(t=r[e]))return new AsyncFromSyncIterator(t.call(r));n="@@asyncIterator",e="@@iterator"}throw TypeError("Object is not async iterable")}function AsyncFromSyncIterator(r){function t(r){if(Object(r)!==r)return Promise.reject(TypeError(r+" is not an object."));var t=r.done;return Promise.resolve(r.value).then(function(r){return{value:r,done:t}})}return(AsyncFromSyncIterator=function(r){this.s=r,this.n=r.next}).prototype={s:null,n:null,next:function(){return t(this.n.apply(this.s,arguments))},return:function(r){var n=this.s.return;return void 0===n?Promise.resolve({value:r,done:!0}):t(n.apply(this.s,arguments))},throw:function(r){var n=this.s.return;return void 0===n?Promise.reject(r):t(n.apply(this.s,arguments))}},new AsyncFromSyncIterator(r)}exports._=_async_iterator;
@@ -1 +1 @@
1
- "use strict";function asyncGeneratorStep(n,t,e,r,o,a,c){try{var s=n[a](c),i=s.value}catch(n){e(n);return}s.done?t(i):Promise.resolve(i).then(r,o)}function _async_to_generator(n){return function(){var t=this,e=arguments;return new Promise(function(r,o){var a=n.apply(t,e);function c(n){asyncGeneratorStep(a,r,o,c,s,"next",n)}function s(n){asyncGeneratorStep(a,r,o,c,s,"throw",n)}c(void 0)})}}exports._=exports._async_to_generator=_async_to_generator;
1
+ "use strict";function asyncGeneratorStep(n,r,e,t,o,a,c){try{var s=n[a](c),i=s.value}catch(n){e(n);return}s.done?r(i):Promise.resolve(i).then(t,o)}function _async_to_generator(n){return function(){var r=this,e=arguments;return new Promise(function(t,o){var a=n.apply(r,e);function c(n){asyncGeneratorStep(a,t,o,c,s,"next",n)}function s(n){asyncGeneratorStep(a,t,o,c,s,"throw",n)}c(void 0)})}}exports._=_async_to_generator;
@@ -1 +1 @@
1
- "use strict";var _await_value=require("./_await_value.js");function _await_async_generator(a){return new _await_value._(a)}exports._=exports._await_async_generator=_await_async_generator;
1
+ "use strict";var _overload_yield=require("./_overload_yield.js");function _await_async_generator(e){return new _overload_yield._(e,0)}exports._=_await_async_generator;
@@ -1 +1 @@
1
- "use strict";function _await_value(a){this.wrapped=a}exports._=exports._await_value=_await_value;
1
+ "use strict";function _await_value(a){this.wrapped=a}exports._=_await_value;
@@ -0,0 +1 @@
1
+ "use strict";var _get_prototype_of=require("./_get_prototype_of.js"),_is_native_reflect_construct=require("./_is_native_reflect_construct.js"),_possible_constructor_return=require("./_possible_constructor_return.js");function _call_super(t,_,r){return _=_get_prototype_of._(_),_possible_constructor_return._(t,_is_native_reflect_construct._()?Reflect.construct(_,r||[],_get_prototype_of._(t).constructor):_.apply(t,r))}exports._=_call_super;
@@ -1 +1 @@
1
- "use strict";function _check_private_redeclaration(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}exports._=exports._check_private_redeclaration=_check_private_redeclaration;
1
+ "use strict";function _check_private_redeclaration(e,t){if(t.has(e))throw TypeError("Cannot initialize the same private elements twice on an object")}exports._=_check_private_redeclaration;
@@ -1 +1 @@
1
- "use strict";function _class_apply_descriptor_destructure(t,e){if(e.set)return"__destrObj"in e||(e.__destrObj={set value(v){e.set.call(t,v)}}),e.__destrObj;if(!e.writable)throw TypeError("attempted to set read only private field");return e}exports._=exports._class_apply_descriptor_destructure=_class_apply_descriptor_destructure;
1
+ "use strict";function _class_apply_descriptor_destructure(t,e){if(e.set)return"__destrObj"in e||(e.__destrObj={set value(v){e.set.call(t,v)}}),e.__destrObj;if(!e.writable)throw TypeError("attempted to set read only private field");return e}exports._=_class_apply_descriptor_destructure;
@@ -1 +1 @@
1
- "use strict";function _class_apply_descriptor_get(t,e){return e.get?e.get.call(t):e.value}exports._=exports._class_apply_descriptor_get=_class_apply_descriptor_get;
1
+ "use strict";function _class_apply_descriptor_get(t,e){return e.get?e.get.call(t):e.value}exports._=_class_apply_descriptor_get;
@@ -1 +1 @@
1
- "use strict";function _class_apply_descriptor_set(e,t,s){if(t.set)t.set.call(e,s);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=s}}exports._=exports._class_apply_descriptor_set=_class_apply_descriptor_set;
1
+ "use strict";function _class_apply_descriptor_set(e,t,s){if(t.set)t.set.call(e,s);else{if(!t.writable)throw TypeError("attempted to set read only private field");t.value=s}}exports._=_class_apply_descriptor_set;
@@ -1 +1 @@
1
- "use strict";function _class_apply_descriptor_update(e,t){if(t.set){if(!t.get)throw TypeError("attempted to read set only private field");return"__destrWrapper"in t||(t.__destrWrapper={set value(v){t.set.call(e,v)},get value(){return t.get.call(e)}}),t.__destrWrapper}if(!t.writable)throw TypeError("attempted to set read only private field");return t}exports._=exports._class_apply_descriptor_update=_class_apply_descriptor_update;
1
+ "use strict";function _class_apply_descriptor_update(e,t){if(t.set){if(!t.get)throw TypeError("attempted to read set only private field");return"__destrWrapper"in t||(t.__destrWrapper={set value(v){t.set.call(e,v)},get value(){return t.get.call(e)}}),t.__destrWrapper}if(!t.writable)throw TypeError("attempted to set read only private field");return t}exports._=_class_apply_descriptor_update;
@@ -1 +1 @@
1
- "use strict";function _class_call_check(c,s){if(!(c instanceof s))throw TypeError("Cannot call a class as a function")}exports._=exports._class_call_check=_class_call_check;
1
+ "use strict";function _class_call_check(c,a){if(!(c instanceof a))throw TypeError("Cannot call a class as a function")}exports._=_class_call_check;
@@ -1 +1 @@
1
- "use strict";function _class_check_private_static_access(c,s){if(c!==s)throw TypeError("Private static access of wrong provenance")}exports._=exports._class_check_private_static_access=_class_check_private_static_access;
1
+ "use strict";function _class_check_private_static_access(c,s){if(c!==s)throw TypeError("Private static access of wrong provenance")}exports._=_class_check_private_static_access;
@@ -1 +1 @@
1
- "use strict";function _class_check_private_static_field_descriptor(t,e){if(void 0===t)throw TypeError("attempted to "+e+" private static field before its declaration")}exports._=exports._class_check_private_static_field_descriptor=_class_check_private_static_field_descriptor;
1
+ "use strict";function _class_check_private_static_field_descriptor(t,e){if(void 0===t)throw TypeError("attempted to "+e+" private static field before its declaration")}exports._=_class_check_private_static_field_descriptor;
@@ -1 +1 @@
1
- "use strict";function _class_extract_field_descriptor(t,e,r){if(!e.has(t))throw TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}exports._=exports._class_extract_field_descriptor=_class_extract_field_descriptor;
1
+ "use strict";function _class_extract_field_descriptor(t,e,r){if(!e.has(t))throw TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}exports._=_class_extract_field_descriptor;
@@ -1 +1 @@
1
- "use strict";function _class_name_tdz_error(r){throw Error('Class "'+r+'" cannot be referenced in computed property keys.')}exports._=exports._class_name_tdz_error=_class_name_tdz_error;
1
+ "use strict";function _class_name_tdz_error(r){throw Error('Class "'+r+'" cannot be referenced in computed property keys.')}exports._=_class_name_tdz_error;
@@ -1 +1 @@
1
- "use strict";var _class_apply_descriptor_destructure=require("./_class_apply_descriptor_destructure.js"),_class_extract_field_descriptor=require("./_class_extract_field_descriptor.js");function _class_private_field_destructure(r,e){var _=_class_extract_field_descriptor._(r,e,"set");return _class_apply_descriptor_destructure._(r,_)}exports._=exports._class_private_field_destructure=_class_private_field_destructure;
1
+ "use strict";var _class_apply_descriptor_destructure=require("./_class_apply_descriptor_destructure.js"),_class_extract_field_descriptor=require("./_class_extract_field_descriptor.js");function _class_private_field_destructure(r,_){var e=_class_extract_field_descriptor._(r,_,"set");return _class_apply_descriptor_destructure._(r,e)}exports._=_class_private_field_destructure;
@@ -1 +1 @@
1
- "use strict";var _class_apply_descriptor_get=require("./_class_apply_descriptor_get.js"),_class_extract_field_descriptor=require("./_class_extract_field_descriptor.js");function _class_private_field_get(_,e){var s=_class_extract_field_descriptor._(_,e,"get");return _class_apply_descriptor_get._(_,s)}exports._=exports._class_private_field_get=_class_private_field_get;
1
+ "use strict";var _class_apply_descriptor_get=require("./_class_apply_descriptor_get.js"),_class_extract_field_descriptor=require("./_class_extract_field_descriptor.js");function _class_private_field_get(_,e){var r=_class_extract_field_descriptor._(_,e,"get");return _class_apply_descriptor_get._(_,r)}exports._=_class_private_field_get;
@@ -1 +1 @@
1
- "use strict";var _check_private_redeclaration=require("./_check_private_redeclaration.js");function _class_private_field_init(e,_,i){_check_private_redeclaration._(e,_),_.set(e,i)}exports._=exports._class_private_field_init=_class_private_field_init;
1
+ "use strict";var _check_private_redeclaration=require("./_check_private_redeclaration.js");function _class_private_field_init(e,_,i){_check_private_redeclaration._(e,_),_.set(e,i)}exports._=_class_private_field_init;
@@ -1 +1 @@
1
- "use strict";function _class_private_field_loose_base(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}exports._=exports._class_private_field_loose_base=_class_private_field_loose_base;
1
+ "use strict";function _class_private_field_loose_base(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}exports._=_class_private_field_loose_base;
@@ -1 +1 @@
1
- "use strict";var id=0;function _class_private_field_loose_key(_){return"__private_"+id+++"_"+_}exports._=exports._class_private_field_loose_key=_class_private_field_loose_key;
1
+ "use strict";var id=0;function _class_private_field_loose_key(_){return"__private_"+id+++"_"+_}exports._=_class_private_field_loose_key;
@@ -1 +1 @@
1
- "use strict";var _class_apply_descriptor_set=require("./_class_apply_descriptor_set.js"),_class_extract_field_descriptor=require("./_class_extract_field_descriptor.js");function _class_private_field_set(_,s,e){var r=_class_extract_field_descriptor._(_,s,"set");return _class_apply_descriptor_set._(_,r,e),e}exports._=exports._class_private_field_set=_class_private_field_set;
1
+ "use strict";var _class_apply_descriptor_set=require("./_class_apply_descriptor_set.js"),_class_extract_field_descriptor=require("./_class_extract_field_descriptor.js");function _class_private_field_set(_,s,e){var r=_class_extract_field_descriptor._(_,s,"set");return _class_apply_descriptor_set._(_,r,e),e}exports._=_class_private_field_set;
@@ -1 +1 @@
1
- "use strict";var _class_apply_descriptor_update=require("./_class_apply_descriptor_update.js"),_class_extract_field_descriptor=require("./_class_extract_field_descriptor.js");function _class_private_field_update(_,e){var s=_class_extract_field_descriptor._(_,e,"update");return _class_apply_descriptor_update._(_,s)}exports._=exports._class_private_field_update=_class_private_field_update;
1
+ "use strict";var _class_apply_descriptor_update=require("./_class_apply_descriptor_update.js"),_class_extract_field_descriptor=require("./_class_extract_field_descriptor.js");function _class_private_field_update(_,e){var r=_class_extract_field_descriptor._(_,e,"update");return _class_apply_descriptor_update._(_,r)}exports._=_class_private_field_update;
@@ -1 +1 @@
1
- "use strict";function _class_private_method_get(t,e,r){if(!e.has(t))throw TypeError("attempted to get private field on non-instance");return r}exports._=exports._class_private_method_get=_class_private_method_get;
1
+ "use strict";function _class_private_method_get(t,e,r){if(!e.has(t))throw TypeError("attempted to get private field on non-instance");return r}exports._=_class_private_method_get;
@@ -1 +1 @@
1
- "use strict";var _check_private_redeclaration=require("./_check_private_redeclaration.js");function _class_private_method_init(e,_){_check_private_redeclaration._(e,_),_.add(e)}exports._=exports._class_private_method_init=_class_private_method_init;
1
+ "use strict";var _check_private_redeclaration=require("./_check_private_redeclaration.js");function _class_private_method_init(e,_){_check_private_redeclaration._(e,_),_.add(e)}exports._=_class_private_method_init;
@@ -1 +1 @@
1
- "use strict";function _class_private_method_set(){throw TypeError("attempted to reassign private method")}exports._=exports._class_private_method_set=_class_private_method_set;
1
+ "use strict";function _class_private_method_set(){throw TypeError("attempted to reassign private method")}exports._=_class_private_method_set;
@@ -1 +1 @@
1
- "use strict";var _class_apply_descriptor_destructure=require("./_class_apply_descriptor_destructure.js"),_class_check_private_static_access=require("./_class_check_private_static_access.js"),_class_check_private_static_field_descriptor=require("./_class_check_private_static_field_descriptor.js");function _class_static_private_field_destructure(_,s,c){return _class_check_private_static_access._(_,s),_class_check_private_static_field_descriptor._(c,"set"),_class_apply_descriptor_destructure._(_,c)}exports._=exports._class_static_private_field_destructure=_class_static_private_field_destructure;
1
+ "use strict";var _class_apply_descriptor_destructure=require("./_class_apply_descriptor_destructure.js"),_class_check_private_static_access=require("./_class_check_private_static_access.js"),_class_check_private_static_field_descriptor=require("./_class_check_private_static_field_descriptor.js");function _class_static_private_field_destructure(_,s,c){return _class_check_private_static_access._(_,s),_class_check_private_static_field_descriptor._(c,"set"),_class_apply_descriptor_destructure._(_,c)}exports._=_class_static_private_field_destructure;
@@ -1 +1 @@
1
- "use strict";var _class_apply_descriptor_get=require("./_class_apply_descriptor_get.js"),_class_check_private_static_access=require("./_class_check_private_static_access.js"),_class_check_private_static_field_descriptor=require("./_class_check_private_static_field_descriptor.js");function _class_static_private_field_spec_get(_,s,c){return _class_check_private_static_access._(_,s),_class_check_private_static_field_descriptor._(c,"get"),_class_apply_descriptor_get._(_,c)}exports._=exports._class_static_private_field_spec_get=_class_static_private_field_spec_get;
1
+ "use strict";var _class_apply_descriptor_get=require("./_class_apply_descriptor_get.js"),_class_check_private_static_access=require("./_class_check_private_static_access.js"),_class_check_private_static_field_descriptor=require("./_class_check_private_static_field_descriptor.js");function _class_static_private_field_spec_get(_,s,c){return _class_check_private_static_access._(_,s),_class_check_private_static_field_descriptor._(c,"get"),_class_apply_descriptor_get._(_,c)}exports._=_class_static_private_field_spec_get;
@@ -1 +1 @@
1
- "use strict";var _class_apply_descriptor_set=require("./_class_apply_descriptor_set.js"),_class_check_private_static_access=require("./_class_check_private_static_access.js"),_class_check_private_static_field_descriptor=require("./_class_check_private_static_field_descriptor.js");function _class_static_private_field_spec_set(_,s,c,e){return _class_check_private_static_access._(_,s),_class_check_private_static_field_descriptor._(c,"set"),_class_apply_descriptor_set._(_,c,e),e}exports._=exports._class_static_private_field_spec_set=_class_static_private_field_spec_set;
1
+ "use strict";var _class_apply_descriptor_set=require("./_class_apply_descriptor_set.js"),_class_check_private_static_access=require("./_class_check_private_static_access.js"),_class_check_private_static_field_descriptor=require("./_class_check_private_static_field_descriptor.js");function _class_static_private_field_spec_set(_,s,c,e){return _class_check_private_static_access._(_,s),_class_check_private_static_field_descriptor._(c,"set"),_class_apply_descriptor_set._(_,c,e),e}exports._=_class_static_private_field_spec_set;