miniprogram-ci 2.1.33 → 2.1.35

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 (200) hide show
  1. package/CHANGELOG.md +3 -1
  2. package/README.md +3 -1
  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/index.d.ts +0 -2
  6. package/dist/@types/modules/corecompiler/original/workerThread/config.d.ts +4 -3
  7. package/dist/@types/modules/corecompiler/original/workerThread/task/func.d.ts +0 -4
  8. package/dist/@types/modules/corecompiler/summerCompiler.d.ts +1 -4
  9. package/dist/@types/modules/nativecompiler/ios/buildCloud.d.ts +2 -0
  10. package/dist/@types/schema/@types/appjson.d.ts +3 -0
  11. package/dist/@types/services/pluginFileReader/common/pluginFileReader.d.ts +3 -4
  12. package/dist/@types/utils/asar.d.ts +1 -0
  13. package/dist/@types/utils/customError.d.ts +1 -1
  14. package/dist/@types/utils/packOptionsHelper.d.ts +1 -1
  15. package/dist/common/code-analyse/index.js +1 -1
  16. package/dist/config/config.js +1 -1
  17. package/dist/index.js +1 -1
  18. package/dist/modules/corecompiler/original/workerThread/config.js +1 -1
  19. package/dist/modules/corecompiler/original/workerThread/task/func.js +1 -1
  20. package/dist/modules/corecompiler/original/workerThread/worker.js +1 -1
  21. package/dist/modules/corecompiler/original/workerThread/workerManager.js +1 -1
  22. package/dist/modules/corecompiler/processHandler.js +1 -1
  23. package/dist/modules/corecompiler/summer/graph/appconf.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/subprocess/processService.js +1 -1
  36. package/dist/utils/swc_config.js +1 -1
  37. package/dist/vendor/swc_runtime/_apply_decorated_descriptor.js +1 -1
  38. package/dist/vendor/swc_runtime/_apply_decs_2203_r.js +1 -1
  39. package/dist/vendor/swc_runtime/_array_like_to_array.js +1 -1
  40. package/dist/vendor/swc_runtime/_array_with_holes.js +1 -1
  41. package/dist/vendor/swc_runtime/_array_without_holes.js +1 -1
  42. package/dist/vendor/swc_runtime/_assert_this_initialized.js +1 -1
  43. package/dist/vendor/swc_runtime/_async_generator.js +1 -1
  44. package/dist/vendor/swc_runtime/_async_generator_delegate.js +1 -1
  45. package/dist/vendor/swc_runtime/_async_iterator.js +1 -1
  46. package/dist/vendor/swc_runtime/_async_to_generator.js +1 -1
  47. package/dist/vendor/swc_runtime/_await_async_generator.js +1 -1
  48. package/dist/vendor/swc_runtime/_await_value.js +1 -1
  49. package/dist/vendor/swc_runtime/_call_super.js +1 -0
  50. package/dist/vendor/swc_runtime/_check_private_redeclaration.js +1 -1
  51. package/dist/vendor/swc_runtime/_class_apply_descriptor_destructure.js +1 -1
  52. package/dist/vendor/swc_runtime/_class_apply_descriptor_get.js +1 -1
  53. package/dist/vendor/swc_runtime/_class_apply_descriptor_set.js +1 -1
  54. package/dist/vendor/swc_runtime/_class_apply_descriptor_update.js +1 -1
  55. package/dist/vendor/swc_runtime/_class_call_check.js +1 -1
  56. package/dist/vendor/swc_runtime/_class_check_private_static_access.js +1 -1
  57. package/dist/vendor/swc_runtime/_class_check_private_static_field_descriptor.js +1 -1
  58. package/dist/vendor/swc_runtime/_class_extract_field_descriptor.js +1 -1
  59. package/dist/vendor/swc_runtime/_class_name_tdz_error.js +1 -1
  60. package/dist/vendor/swc_runtime/_class_private_field_destructure.js +1 -1
  61. package/dist/vendor/swc_runtime/_class_private_field_get.js +1 -1
  62. package/dist/vendor/swc_runtime/_class_private_field_init.js +1 -1
  63. package/dist/vendor/swc_runtime/_class_private_field_loose_base.js +1 -1
  64. package/dist/vendor/swc_runtime/_class_private_field_loose_key.js +1 -1
  65. package/dist/vendor/swc_runtime/_class_private_field_set.js +1 -1
  66. package/dist/vendor/swc_runtime/_class_private_field_update.js +1 -1
  67. package/dist/vendor/swc_runtime/_class_private_method_get.js +1 -1
  68. package/dist/vendor/swc_runtime/_class_private_method_init.js +1 -1
  69. package/dist/vendor/swc_runtime/_class_private_method_set.js +1 -1
  70. package/dist/vendor/swc_runtime/_class_static_private_field_destructure.js +1 -1
  71. package/dist/vendor/swc_runtime/_class_static_private_field_spec_get.js +1 -1
  72. package/dist/vendor/swc_runtime/_class_static_private_field_spec_set.js +1 -1
  73. package/dist/vendor/swc_runtime/_class_static_private_field_update.js +1 -1
  74. package/dist/vendor/swc_runtime/_class_static_private_method_get.js +1 -1
  75. package/dist/vendor/swc_runtime/_construct.js +1 -1
  76. package/dist/vendor/swc_runtime/_create_class.js +1 -1
  77. package/dist/vendor/swc_runtime/_create_for_of_iterator_helper_loose.js +1 -1
  78. package/dist/vendor/swc_runtime/_create_super.js +1 -1
  79. package/dist/vendor/swc_runtime/_decorate.js +1 -1
  80. package/dist/vendor/swc_runtime/_defaults.js +1 -1
  81. package/dist/vendor/swc_runtime/_define_enumerable_properties.js +1 -1
  82. package/dist/vendor/swc_runtime/_define_property.js +1 -1
  83. package/dist/vendor/swc_runtime/_dispose.js +1 -1
  84. package/dist/vendor/swc_runtime/_export_star.js +1 -1
  85. package/dist/vendor/swc_runtime/_extends.js +1 -1
  86. package/dist/vendor/swc_runtime/_get.js +1 -1
  87. package/dist/vendor/swc_runtime/_get_prototype_of.js +1 -1
  88. package/dist/vendor/swc_runtime/_identity.js +1 -1
  89. package/dist/vendor/swc_runtime/_inherits.js +1 -1
  90. package/dist/vendor/swc_runtime/_inherits_loose.js +1 -1
  91. package/dist/vendor/swc_runtime/_initializer_define_property.js +1 -1
  92. package/dist/vendor/swc_runtime/_initializer_warning_helper.js +1 -1
  93. package/dist/vendor/swc_runtime/_instanceof.js +1 -1
  94. package/dist/vendor/swc_runtime/_interop_require_default.js +1 -1
  95. package/dist/vendor/swc_runtime/_interop_require_wildcard.js +1 -1
  96. package/dist/vendor/swc_runtime/_is_native_function.js +1 -1
  97. package/dist/vendor/swc_runtime/_is_native_reflect_construct.js +1 -1
  98. package/dist/vendor/swc_runtime/_iterable_to_array.js +1 -1
  99. package/dist/vendor/swc_runtime/_iterable_to_array_limit.js +1 -1
  100. package/dist/vendor/swc_runtime/_iterable_to_array_limit_loose.js +1 -1
  101. package/dist/vendor/swc_runtime/_jsx.js +1 -1
  102. package/dist/vendor/swc_runtime/_new_arrow_check.js +1 -1
  103. package/dist/vendor/swc_runtime/_non_iterable_rest.js +1 -1
  104. package/dist/vendor/swc_runtime/_non_iterable_spread.js +1 -1
  105. package/dist/vendor/swc_runtime/_object_destructuring_empty.js +1 -1
  106. package/dist/vendor/swc_runtime/_object_spread.js +1 -1
  107. package/dist/vendor/swc_runtime/_object_spread_props.js +1 -1
  108. package/dist/vendor/swc_runtime/_object_without_properties.js +1 -1
  109. package/dist/vendor/swc_runtime/_object_without_properties_loose.js +1 -1
  110. package/dist/vendor/swc_runtime/_overload_yield.js +1 -0
  111. package/dist/vendor/swc_runtime/_possible_constructor_return.js +1 -1
  112. package/dist/vendor/swc_runtime/_read_only_error.js +1 -1
  113. package/dist/vendor/swc_runtime/_set.js +1 -1
  114. package/dist/vendor/swc_runtime/_set_prototype_of.js +1 -1
  115. package/dist/vendor/swc_runtime/_skip_first_generator_next.js +1 -1
  116. package/dist/vendor/swc_runtime/_sliced_to_array.js +1 -1
  117. package/dist/vendor/swc_runtime/_sliced_to_array_loose.js +1 -1
  118. package/dist/vendor/swc_runtime/_super_prop_base.js +1 -1
  119. package/dist/vendor/swc_runtime/_tagged_template_literal.js +1 -1
  120. package/dist/vendor/swc_runtime/_tagged_template_literal_loose.js +1 -1
  121. package/dist/vendor/swc_runtime/_throw.js +1 -1
  122. package/dist/vendor/swc_runtime/_to_array.js +1 -1
  123. package/dist/vendor/swc_runtime/_to_consumable_array.js +1 -1
  124. package/dist/vendor/swc_runtime/_to_primitive.js +1 -1
  125. package/dist/vendor/swc_runtime/_to_property_key.js +1 -1
  126. package/dist/vendor/swc_runtime/_ts_add_disposable_resource.js +1 -0
  127. package/dist/vendor/swc_runtime/_ts_decorate.js +1 -1
  128. package/dist/vendor/swc_runtime/_ts_dispose_resources.js +1 -0
  129. package/dist/vendor/swc_runtime/_ts_generator.js +1 -1
  130. package/dist/vendor/swc_runtime/_ts_metadata.js +1 -1
  131. package/dist/vendor/swc_runtime/_ts_param.js +1 -1
  132. package/dist/vendor/swc_runtime/_ts_values.js +1 -1
  133. package/dist/vendor/swc_runtime/_type_of.js +1 -1
  134. package/dist/vendor/swc_runtime/_unsupported_iterable_to_array.js +1 -1
  135. package/dist/vendor/swc_runtime/_update.js +1 -1
  136. package/dist/vendor/swc_runtime/_using.js +1 -1
  137. package/dist/vendor/swc_runtime/_using_ctx.js +1 -0
  138. package/dist/vendor/swc_runtime/_wrap_async_generator.js +1 -1
  139. package/dist/vendor/swc_runtime/_wrap_native_super.js +1 -1
  140. package/dist/vendor/swc_runtime/_write_only_error.js +1 -1
  141. package/dist/vendor/swc_runtime/index.js +1 -1
  142. package/package.json +3 -60
  143. package/dist/@types/modules/corecompiler/summer/pipeManager/index.d.ts +0 -6
  144. package/dist/@types/modules/corecompiler/summer/pipeManager/pipeCPProject.d.ts +0 -17
  145. package/dist/@types/modules/corecompiler/summer/pipeManager/pipeContext.d.ts +0 -10
  146. package/dist/@types/modules/corecompiler/summer/pipeManager/pipeManager.d.ts +0 -12
  147. package/dist/@types/modules/corecompiler/summer/pipeManager/pipeWorker.d.ts +0 -2
  148. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/appservicePipe/index.d.ts +0 -3
  149. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/compileWxmlToGlassEaselPipe.d.ts +0 -3
  150. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/compileWxssPipe.d.ts +0 -3
  151. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/index.d.ts +0 -2
  152. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/pageInitSourcePipe/index.d.ts +0 -4
  153. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/pageframePipe/index.d.ts +0 -3
  154. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getAppService.d.ts +0 -6
  155. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getwxappcode.d.ts +0 -9
  156. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getjsfile.d.ts +0 -12
  157. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getmainpkgsortedjsfiles.d.ts +0 -11
  158. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getwxappcode.d.ts +0 -8
  159. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/common/apperrcode.config.d.ts +0 -92
  160. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/common/tools.d.ts +0 -1
  161. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/appconfig.d.ts +0 -6
  162. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/appjson.d.ts +0 -3
  163. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/customcomponent.d.ts +0 -21
  164. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/helper/theme.d.ts +0 -40
  165. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/pagejson.d.ts +0 -3
  166. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/wxappcodejson.d.ts +0 -3
  167. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxmltojs.d.ts +0 -19
  168. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxsstojs.d.ts +0 -15
  169. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/web/processPath.d.ts +0 -9
  170. package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/wccPipe.d.ts +0 -3
  171. package/dist/@types/modules/corecompiler/summer/pipeManager/types.d.ts +0 -100
  172. package/dist/modules/corecompiler/summer/pipeManager/index.js +0 -1
  173. package/dist/modules/corecompiler/summer/pipeManager/pipeCPProject.js +0 -1
  174. package/dist/modules/corecompiler/summer/pipeManager/pipeContext.js +0 -1
  175. package/dist/modules/corecompiler/summer/pipeManager/pipeManager.js +0 -1
  176. package/dist/modules/corecompiler/summer/pipeManager/pipeWorker.js +0 -1
  177. package/dist/modules/corecompiler/summer/pipeManager/pipes/appservicePipe/index.js +0 -1
  178. package/dist/modules/corecompiler/summer/pipeManager/pipes/compileWxmlToGlassEaselPipe.js +0 -1
  179. package/dist/modules/corecompiler/summer/pipeManager/pipes/compileWxssPipe.js +0 -1
  180. package/dist/modules/corecompiler/summer/pipeManager/pipes/index.js +0 -1
  181. package/dist/modules/corecompiler/summer/pipeManager/pipes/pageInitSourcePipe/index.js +0 -1
  182. package/dist/modules/corecompiler/summer/pipeManager/pipes/pageframePipe/index.js +0 -1
  183. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getAppService.js +0 -1
  184. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getwxappcode.js +0 -1
  185. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getjsfile.js +0 -1
  186. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getmainpkgsortedjsfiles.js +0 -1
  187. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getwxappcode.js +0 -1
  188. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/common/apperrcode.config.js +0 -1
  189. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/common/tools.js +0 -1
  190. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/appconfig.js +0 -1
  191. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/appjson.js +0 -1
  192. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/customcomponent.js +0 -1
  193. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/helper/theme.js +0 -1
  194. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/pagejson.js +0 -1
  195. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/wxappcodejson.js +0 -1
  196. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxmltojs.js +0 -1
  197. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxsstojs.js +0 -1
  198. package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/web/processPath.js +0 -1
  199. package/dist/modules/corecompiler/summer/pipeManager/pipes/wccPipe.js +0 -1
  200. package/dist/modules/corecompiler/summer/pipeManager/types.js +0 -1
@@ -1,92 +0,0 @@
1
- declare const appErrCode: {
2
- APP_JSON_READ_ERR: number;
3
- APP_JSON_PARSE_ERR: number;
4
- APP_JSON_PAGES_ERR: number;
5
- APP_JSON_ENTRANCE_NOT_FOUND_ERR: number;
6
- APP_JSON_CONTENT_ERR: number;
7
- PAGES_JSON_PARSE_ERR: number;
8
- APP_JSON_WXML_NOT_FOUND: number;
9
- APP_JSON_JS_NOT_FOUND: number;
10
- JSON_CONTENT_ERR: number;
11
- EXT_JSON_PARSE_ERR: number;
12
- EXT_JSON_PAGES_ERR: number;
13
- EXT_JSON_CONTENT_ERR: number;
14
- APPSERVICE_LOSE_WXML: number;
15
- APPSERVICE_LOSE_JS: number;
16
- FILE_NOT_UTF8: number;
17
- BABEL_TRANS_JS_ERR: number;
18
- UGLIFY_JS_ERR: number;
19
- BABILI_JS_ERR: number;
20
- JS_ES6_ERR: number;
21
- FILE_FLAT_ERR: number;
22
- POST_WXSS_ERR: number;
23
- TRANS_WXML_JS_ERR: number;
24
- TRANS_WXSS_JS_ERR: number;
25
- SUMMER_PLUGIN_ERR: number;
26
- SUMMER_PLUGIN_CODE_ERR: number;
27
- VENDOR_MD5_NOT_MATCH: number;
28
- VENDOR_WCC_FILE_NOT_FOUND: number;
29
- VENDOR_WCSC_FILE_NOT_FOUND: number;
30
- CODE_SIZE_EXCEED: number;
31
- GET_GEO_LOCATION_ERR: number;
32
- QCLOUD_SVR_NO_FOUND_ERR: number;
33
- QCLOUD_SVR_POLL_TIMEOUT: number;
34
- QCLOUD_SVR_POLL_DOING: number;
35
- QCLOUD_SVR_UP_DIR_CHECK: number;
36
- PLUGIN_JSON_READ_ERR: number;
37
- PLUGIN_JSON_PARSE_ERR: number;
38
- PLUGIN_JSON_CONTENT_ERR: number;
39
- PLUGIN_PAGE_JSON_PARSE_ERR: number;
40
- PLUGIN_JSON_FILE_NOT_FOUND: number;
41
- PLUGIN_PAGE_JSON_CONTENT_ERR: number;
42
- PLUGIN_TRANS_WXML_JS_ERR: number;
43
- PLUGIN_TRANS_WXSS_JS_ERR: number;
44
- PLUGIN_JS_ES6_ERR: number;
45
- PLUGIN_ONLINE_CODE_UNPACK_ERR: number;
46
- PAGE_JSON_PARSE_ERR: number;
47
- SITE_MAP_JSON_CONTENT_ERROR: number;
48
- CHECK_UPLOAD_STATUS_ERR: number;
49
- CLEAR_SESSION_ERR: number;
50
- GAME_CODE_LIB_MD5_ERR: number;
51
- LOAD_QRCODE_OTHER_ERR: number;
52
- JUMP_QCLOUD_PAGE_ERR: number;
53
- PACK_NPM_ERR: number;
54
- GET_PROJECT_CONFIG_ERR: number;
55
- MINI_PROGRAM_CONSUME_TIMING: number;
56
- MINI_GAME_CONSUME_TIMING: number;
57
- UPLOAD_PROGRESS_FAIIL: number;
58
- UPLOAD_PLUGIN_ERR: number;
59
- UPLOAD_FAIILED: number;
60
- COMPILE_CONDITION_APPID_ERR: number;
61
- COMPILE_CONDITION_PROGRAM_ERR: number;
62
- COMPILE_CONDITION_ERR: number;
63
- COMPILE_CONDITION_ERR_WITH_DETAIL: number;
64
- WIDGET_GET_SEARCH_QUERY_ERROR: number;
65
- QCLOUD_CHOOSE_ENVIRONMENT_ERROR: number;
66
- QCLOUD_UPLOAD_FAIL: number;
67
- TOOLBAR_REMOTE_DEBUG_ERROR: number;
68
- PREPROCESS_UPLOAD_ERROR: number;
69
- DOWNLOAD_SOURCEMAP_ERROR: number;
70
- SOURCEMAP_WRITE_ERROR: number;
71
- CLEAN_USER_AUTH_ERROR: number;
72
- JUMP_WXGIT_ERROR: number;
73
- TCB_DELETE_FAILED: number;
74
- FETCH_REMOTE_SETTING_ERROR: number;
75
- UPLOAD_LOCAL_SETTING_ERROR: number;
76
- UPLOAD_SOURCE_CODE_ERROR: number;
77
- UPLOAD_EXCEED_SIZE_LIMIT: number;
78
- PROJECT_CONFIG_JSON_ERROR: number;
79
- TEST_CODE_RUN_ERROR: number;
80
- AUTO_UPLOAD_ERROR: number;
81
- CLOUD_UPLOAD_OPEN_ERROR: number;
82
- CLOUD_BUILD_OPEN_ERROR: number;
83
- WEBVIEW_NETWORK_ERROR: number;
84
- APPSERVICE_NETWORK_ERROR: number;
85
- PLUGIN_ERROR: number;
86
- ONLINE_CODE_UNPACK_ERR: number;
87
- URL_SCHEME_INVALID_ERROR: number;
88
- URL_SCHEME_OTHER_ERROR: number;
89
- APP_UPGRADE_ERROR: number;
90
- APP_ADD_AUTHO_PAGE_ERROR: number;
91
- };
92
- export = appErrCode;
@@ -1 +0,0 @@
1
- export declare function wrapCodeByEval(code: string): string;
@@ -1,6 +0,0 @@
1
- import { IPipeContext } from '../../../types';
2
- declare function getAppConfig(context: IPipeContext, forceDarkMode?: boolean): Promise<DR<AppConfig.IAppConfig>>;
3
- declare const _default: {
4
- getAppConfig: typeof getAppConfig;
5
- };
6
- export = _default;
@@ -1,3 +0,0 @@
1
- import { IPipeContext } from '../../../types';
2
- declare const getCompiledAppJSON: (context: IPipeContext) => Promise<any>;
3
- export = getCompiledAppJSON;
@@ -1,21 +0,0 @@
1
- import { IPipeContext } from '../../../types';
2
- interface IComponentsConfigReturn {
3
- [p: string]: {
4
- file: string;
5
- config: DR<AppConfig.ISubpackageItem> | undefined;
6
- pageJSON: IPageJSON;
7
- };
8
- }
9
- declare function getFileListJustInPack(context: IPipeContext, appConfig: DR<AppConfig.IAppConfig>, config?: DR<AppConfig.ISubpackageItem>): Promise<string[]>;
10
- declare function getWxssCompileConfig(context: IPipeContext, appConfig: DR<AppConfig.IAppConfig>, config?: DR<AppConfig.ISubpackageItem>): Promise<string[]>;
11
- declare function getWxmlCompileConfig(context: IPipeContext, appConfig: DR<AppConfig.IAppConfig>, config?: DR<AppConfig.ISubpackageItem>): Promise<any[]>;
12
- declare function getWxmlCompileLazyConfig(context: IPipeContext, appConfig: DR<AppConfig.IAppConfig>, config?: DR<AppConfig.ISubpackageItem>): Promise<string[]>;
13
- declare const _default: {
14
- getFileListJustInPack: typeof getFileListJustInPack;
15
- getWxssCompileConfig: typeof getWxssCompileConfig;
16
- getWxmlCompileConfig: typeof getWxmlCompileConfig;
17
- getWxmlCompileLazyConfig: typeof getWxmlCompileLazyConfig;
18
- getCustomComponentsConfig: (context: IPipeContext, appConfig: DR<AppConfig.IAppConfig>) => Promise<IComponentsConfigReturn>;
19
- findSubpackageForFile: (file: string, appConfig: DR<AppConfig.IAppConfig>) => DR<AppConfig.ISubpackageItem> | undefined;
20
- };
21
- export = _default;
@@ -1,40 +0,0 @@
1
- import { PipeCPProject } from '../../../../pipeCPProject';
2
- export declare function checkTabbarListItemIconPath(prefix: string, absolutePath: string, project: PipeCPProject): any[];
3
- export declare function checkThemeRules(projectPath: string, project?: PipeCPProject): {
4
- windowConfigRules: ({
5
- key: string;
6
- valids: string[];
7
- hexColor?: undefined;
8
- } | {
9
- key: string;
10
- hexColor: boolean;
11
- valids?: undefined;
12
- })[];
13
- tabbarRules: ({
14
- key: string;
15
- hexColor: boolean;
16
- valids?: undefined;
17
- } | {
18
- key: string;
19
- valids: string[];
20
- hexColor?: undefined;
21
- })[];
22
- tabbarListItemRules: {
23
- key: string;
24
- validate: (key: string, value: string) => void;
25
- }[];
26
- };
27
- export declare function getDefaultWindowConfig(isDarkMode: boolean): {
28
- backgroundColor: string;
29
- backgroundTextStyle: string;
30
- };
31
- export declare function checkVariables(options: {
32
- isDarkMode: boolean;
33
- themeLocation: string;
34
- filePath: string;
35
- windowConfig: IStringKeyMap;
36
- themeJSON: IStringKeyMap;
37
- rules: any[];
38
- keyPrefix: string;
39
- isPlugin?: boolean;
40
- }): void;
@@ -1,3 +0,0 @@
1
- import { IPipeContext } from '../../../types';
2
- declare const getCompiledPageJSON: (context: IPipeContext, pagePath: string) => Promise<any>;
3
- export = getCompiledPageJSON;
@@ -1,3 +0,0 @@
1
- import { IPipeContext } from '../../../types';
2
- declare function getWXAppCodeJSON(context: IPipeContext, pagePath: string): Promise<any>;
3
- export = getWXAppCodeJSON;
@@ -1,19 +0,0 @@
1
- import { IPipeContext } from '../../../types';
2
- interface ITransWxmlOptions {
3
- app?: boolean;
4
- page?: string;
5
- cut?: boolean;
6
- hotReloadFile?: string;
7
- }
8
- interface IWXMLReturn {
9
- name: string;
10
- comm?: string;
11
- code: string;
12
- names?: AnyObject;
13
- pages?: AnyObject;
14
- }
15
- declare function transWXMLToJS(context: IPipeContext, options?: ITransWxmlOptions): Promise<IWXMLReturn>;
16
- declare const _default: {
17
- transWXMLToJS: typeof transWXMLToJS;
18
- };
19
- export = _default;
@@ -1,15 +0,0 @@
1
- import { IPipeContext } from '../../../types';
2
- interface ITransWxssOptions {
3
- app?: boolean;
4
- page?: string;
5
- hotReloadFile?: string;
6
- }
7
- interface IWxssReturn {
8
- comm: string;
9
- page?: string;
10
- }
11
- declare function transWXSSToJS(context: IPipeContext, options?: ITransWxssOptions): Promise<IWxssReturn>;
12
- declare const _default: {
13
- transWXSSToJS: typeof transWXSSToJS;
14
- };
15
- export = _default;
@@ -1,9 +0,0 @@
1
- interface INormalizePathOptions {
2
- leading?: string;
3
- noLeading?: string;
4
- trailing?: string;
5
- noTrailing?: string;
6
- }
7
- export declare function normalizePath(pathName?: string, options?: INormalizePathOptions): string;
8
- export declare function isLeftSubPathOfRight(child: string, parent: string): boolean;
9
- export {};
@@ -1,3 +0,0 @@
1
- import { ICompileWxmlOptions } from '~/services/compilewxml/common/compilewxmlService';
2
- import { IPipeDefinition } from '../types';
3
- export declare const wccPipe: IPipeDefinition<ICompileWxmlOptions>;
@@ -1,100 +0,0 @@
1
- import { ICompileResult, ICompileWxmlOptions, ICompileWxmlToGlassEasel, IGlassEaselCompileResult } from '~/services/compilewxml/common/compilewxmlService';
2
- import { ICompileWxssOptions, ICompileWxssResult } from '~/services/compilewxss/common/compilewxssService';
3
- import { vsbase } from '../../../../services/common/vsbase';
4
- import { MiniProgramCore } from '../../../../types';
5
- import { PipeCPProject } from './pipeCPProject';
6
- import type { IBackendContextFromWeb } from '~/types/type';
7
- type ServiceIdentifier<T> = vsbase.vs.platform.instantiation.common.instantiation.$types.ServiceIdentifier<T>;
8
- export declare enum EPipeCMD {
9
- WCC = "WCC",
10
- TRANS_WXML_TO_GLASS_EASEL = "TRANS_WXML_TO_GLASS_EASEL",
11
- COMPILE_WXSS = "COMPILE_WXSS",
12
- PAGEFRAME = "PAGEFRAME",
13
- PAGE_INIT_SOURCE = "PAGE_INIT_SOURCE",
14
- APPSERVICE = "APPSERVICE"
15
- }
16
- export interface IPipiInputOutputType<T, P> {
17
- input: T;
18
- output: P;
19
- }
20
- export type IPipeParamOutputTypeMap = {
21
- [EPipeCMD.WCC]: IPipiInputOutputType<ICompileWxmlOptions, ICompileResult>;
22
- [EPipeCMD.TRANS_WXML_TO_GLASS_EASEL]: IPipiInputOutputType<ICompileWxmlToGlassEasel, IGlassEaselCompileResult>;
23
- [EPipeCMD.COMPILE_WXSS]: IPipiInputOutputType<ICompileWxssOptions, ICompileWxssResult>;
24
- [EPipeCMD.PAGEFRAME]: IPipiInputOutputType<{
25
- isMultiPkg?: boolean;
26
- }, string>;
27
- [EPipeCMD.PAGE_INIT_SOURCE]: IPipiInputOutputType<{
28
- filepath: string;
29
- }, string>;
30
- [EPipeCMD.APPSERVICE]: IPipiInputOutputType<Record<string, never>, string>;
31
- };
32
- export interface IPipeDefinition<TParams = any, TOutput = unknown> {
33
- name: string;
34
- timeout?: number;
35
- execute(context: IPipeContext, params: TParams): Promise<TOutput>;
36
- }
37
- export interface IPipeContext {
38
- requestPipe<T = unknown>(pipeName: string, params?: Record<string, unknown>): Promise<T>;
39
- callCompiler<T = unknown>(method: string, ...args: unknown[]): Promise<T>;
40
- project: PipeCPProject;
41
- getService<T>(id: ServiceIdentifier<T>): T;
42
- }
43
- export interface IPipeProjectSerializeInfo {
44
- appid: string;
45
- attr: any;
46
- type: MiniProgramCore.ProjectType;
47
- projectPath: string;
48
- projectArchitecture: MiniProgramCore.IProjectArchitecture;
49
- miniprogramRoot: string;
50
- pluginRoot: string;
51
- setting: any;
52
- backendProjectContext?: IBackendContextFromWeb;
53
- projectContext?: {
54
- projectId: string;
55
- versionId: string;
56
- ticket: string;
57
- sessionId: string;
58
- };
59
- }
60
- export type IPipeRequest = {
61
- type: 'pipe';
62
- requestId: string;
63
- name: string;
64
- params?: Record<string, unknown>;
65
- } | {
66
- type: 'compiler';
67
- requestId: string;
68
- method: string;
69
- args: unknown[];
70
- };
71
- export interface IPipeResponse {
72
- requestId: string;
73
- data?: any;
74
- error?: {
75
- code: number;
76
- message: string;
77
- stack: string;
78
- };
79
- }
80
- export interface IPipeTaskData {
81
- pipeName: string;
82
- params?: Record<string, unknown>;
83
- projectInfo: IPipeProjectSerializeInfo;
84
- }
85
- export interface IPipeTaskResult {
86
- error?: any;
87
- result?: any;
88
- }
89
- export interface IExecutePipeData {
90
- pipeName: string;
91
- params?: Record<string, unknown>;
92
- backendProjectContext?: IBackendContextFromWeb;
93
- projectContext?: {
94
- projectId: string;
95
- versionId: string;
96
- ticket: string;
97
- sessionId: string;
98
- };
99
- }
100
- export {};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.allPipes=exports.runPipeTask=exports.PipeContext=exports.PipeCPProject=exports.PipeManager=void 0;var pipeManager_1=require("./pipeManager");Object.defineProperty(exports,"PipeManager",{enumerable:!0,get:function(){return pipeManager_1.PipeManager}});var pipeCPProject_1=require("./pipeCPProject");Object.defineProperty(exports,"PipeCPProject",{enumerable:!0,get:function(){return pipeCPProject_1.PipeCPProject}});var pipeContext_1=require("./pipeContext");Object.defineProperty(exports,"PipeContext",{enumerable:!0,get:function(){return pipeContext_1.PipeContext}});var pipeWorker_1=require("./pipeWorker");Object.defineProperty(exports,"runPipeTask",{enumerable:!0,get:function(){return pipeWorker_1.runPipeTask}});var index_1=require("./pipes/index");Object.defineProperty(exports,"allPipes",{enumerable:!0,get:function(){return index_1.allPipes}});
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PipeCPProject=void 0;const tools_1=require("../../../../utils/tools"),baseProject_1=require("../../../../project/baseProject");class PipeCPProject extends baseProject_1.BaseProject{constructor(t){super(),this._projectPath=(0,tools_1.normalizePath)(t.projectPath),this._appid=t.appid,this._attr=t.attr,this._type=this.getProjectType(t.attr,t.type),this._miniprogramRoot=t.miniprogramRoot,this._pluginRoot=t.pluginRoot,this._projectArchitecture=t.projectArchitecture,this.setting=t.setting,this.backendProjectContext=t.backendProjectContext,this.projectContext=t.projectContext}init(){}updateFileAndDirs(){}static async serializeForPipe(t){const e=await t.serialize();return{appid:e.appid,attr:e.attr,type:e.type,projectPath:e.projectPath,projectArchitecture:e.projectArchitecture,miniprogramRoot:e.miniprogramRoot,pluginRoot:e.pluginRoot,setting:e.setting}}}exports.PipeCPProject=PipeCPProject;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PipeContext=void 0;const tslib_1=require("tslib"),getservice_1=tslib_1.__importDefault(require("../../../../services/common/getservice"));let requestIdCounter=0;function genRequestId(){return`pipe-req-${++requestIdCounter}-${Date.now()}`}class PipeContext{constructor(e,t){this.project=e,this.sendRequest=t}async requestPipe(e,t){const r=genRequestId(),s=await this.sendRequest({type:"pipe",requestId:r,name:e,params:t});if(s.error)throw new Error(s.error.message);return s.data}async callCompiler(e,...t){const r=genRequestId(),s=await this.sendRequest({type:"compiler",requestId:r,method:e,args:t});if(s.error)throw new Error(s.error.message);return s.data}getService(e){return(0,getservice_1.default)(e)}}exports.PipeContext=PipeContext;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PipeManager=void 0;const workerThread_1=require("../../original/workerThread"),config_1=require("../../original/workerThread/config"),pipeCPProject_1=require("./pipeCPProject"),DEFAULT_PIPE_TIMEOUT=6e4;class PipeManager{constructor(e){this.compiler=e}async executePipe(e,r){return this.runPipeTask(e,r)}async handlePipeIPC(e,r){if("compiler"===e.type)return this.executeCompilerMethod(e.method,e.args,r);if("pipe"===e.type)return this.runPipeTask({pipeName:e.name,params:e.params},r);throw new Error(`unknown pipe request type: ${e.type}`)}destroy(){}async executeCompilerMethod(e,r,t){const o=this.compiler[e];if("function"!=typeof o)throw new Error(`SummerCompiler has no method "${e}"`);return o.call(this.compiler,...r,t)}async runPipeTask(e,r){const{pipeName:t,params:o,backendProjectContext:i,projectContext:p}=e,n=this.compiler.project,a=await pipeCPProject_1.PipeCPProject.serializeForPipe(n);i&&(a.backendProjectContext=i),p&&(a.projectContext=p);const s={pipeName:t,params:o,projectInfo:a||{}},c=await promiseWithTimeout((0,workerThread_1.runTask)(config_1.TASK_NAME.PIPE_TASK,s),6e4,t);if(c.error){const e=c.error;throw"string"==typeof e?new Error(e):Object.assign(new Error(e.message||"pipe task error"),e)}return c.result}}function promiseWithTimeout(e,r,t){return new Promise(((o,i)=>{const p=setTimeout((()=>{i(new Error(`pipe "${t}" timed out after ${r}ms`))}),r);e.then((e=>{clearTimeout(p),o(e)}),(e=>{clearTimeout(p),i(e)}))}))}exports.PipeManager=PipeManager;
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.runPipeTask=runPipeTask;const call_func_1=require("../../original/workerThread/task/call_func"),pipeCPProject_1=require("./pipeCPProject"),pipeContext_1=require("./pipeContext"),index_1=require("./pipes/index"),pipeRegistry=new Map;for(const e of index_1.allPipes)pipeRegistry.set(e.name,e);async function runPipeTask(e){const{pipeName:r,params:t,projectInfo:s}=e,i=pipeRegistry.get(r);if(!i)return{error:{message:`pipe "${r}" is not registered in worker`}};try{const e=new pipeCPProject_1.PipeCPProject(s),r=new pipeContext_1.PipeContext(e,sendRequestToSummerProcess);return{result:await i.execute(r,t)}}catch(e){return{error:{code:e.code||-1,message:e.message||String(e),stack:e.stack||""}}}}async function sendRequestToSummerProcess(e){try{const r=await(0,call_func_1.call)("handlePipeIPC",e);return{requestId:e.requestId,data:r}}catch(r){return{requestId:e.requestId,error:{code:-1,message:"string"==typeof r?r:r.message||String(r),stack:"string"==typeof r?"":r.stack||""}}}}
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.appservicePipe=void 0,exports.getAppserviceCore=getAppserviceCore;const getAppService_1=require("../utils/appdevserver/getAppService"),monitor_1=require("../../../../../../bussinessMonitor/monitor"),types_1=require("../../types"),getMainPkgSortedJSFiles=require("../utils/appservice/getmainpkgsortedjsfiles"),transwxmltojs=require("../utils/trans/transwxmltojs");async function getAppserviceCore(e){var t;const o=Date.now(),i=e.project.projectContext;(0,monitor_1.BusinessReport)("appserviceCompile","compile start",JSON.stringify({options:i}));try{const n=[];(0,getAppService_1.getInitJS)(n);const s=Date.now(),r=await getWXMLJS(e,n),p=Date.now()-s;(0,monitor_1.BusinessReport)("appserviceCompile","wxml compiled",JSON.stringify({options:i,duration:p,codeLength:null===(t=r.code)||void 0===t?void 0:t.length}));const a=Date.now(),{hasAppJS:c,pageFiles:l,componentFiles:u,functionalPageFiles:g,otherFiles:d,allFiles:v}=await getMainPkgSortedJSFiles(e),m=Date.now()-a;(0,monitor_1.BusinessReport)("appserviceCompile","js files sorted",JSON.stringify({options:i,duration:m,hasAppJS:c,pageCount:(null==l?void 0:l.length)||0,componentCount:(null==u?void 0:u.length)||0,totalCount:(null==v?void 0:v.length)||0}));const S=Date.now();await(0,getAppService_1.getJSCodeBuild)(e,n,c,l,u,g,d,v);const w=Date.now()-S;(0,monitor_1.BusinessReport)("appserviceCompile","js code built",JSON.stringify({options:i,duration:w,fileCount:(null==v?void 0:v.length)||0}));const C=Date.now();await(0,getAppService_1.getAppCode)(e,n,r,u,l);const f=Date.now()-C;(0,monitor_1.BusinessReport)("appserviceCompile","appcode generated",JSON.stringify({options:i,duration:f}));const J=n.join("\n"),_=Date.now()-o;return(0,monitor_1.BusinessReport)("appserviceCompile","compile success",JSON.stringify({options:i,totalDuration:_,scriptCount:n.length,contentLength:J.length})),J}catch(e){const t=Date.now()-o;throw(0,monitor_1.BusinessReport)("appserviceCompile","compile failed",JSON.stringify({options:i,duration:t,error:e instanceof Error?e.message:String(e)})),e}}async function getWXMLJS(e,t){const o=await transwxmltojs.transWXMLToJS(e,{app:!0,cut:!0});return t.push(o.code),o}exports.appservicePipe={name:types_1.EPipeCMD.APPSERVICE,execute:async(e,t)=>await getAppserviceCore(e)};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileWxmlToGlassEaselPipe=void 0;const compilewxmlService_1=require("../../../../../services/compilewxml/common/compilewxmlService"),types_1=require("../types");exports.compileWxmlToGlassEaselPipe={name:types_1.EPipeCMD.TRANS_WXML_TO_GLASS_EASEL,execute:async(e,l)=>await e.getService(compilewxmlService_1.ICompilewxmlService).compileWxmlToGlassEasel(l)};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileWxssPipe=void 0;const compilewxssService_1=require("../../../../../services/compilewxss/common/compilewxssService"),types_1=require("../types");exports.compileWxssPipe={name:types_1.EPipeCMD.COMPILE_WXSS,execute:async(e,s)=>await e.getService(compilewxssService_1.ICompilewxssService).compileWxss(s)};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.allPipes=void 0;const wccPipe_1=require("./wccPipe"),compileWxmlToGlassEaselPipe_1=require("./compileWxmlToGlassEaselPipe"),compileWxssPipe_1=require("./compileWxssPipe");exports.allPipes=[wccPipe_1.wccPipe,compileWxmlToGlassEaselPipe_1.compileWxmlToGlassEaselPipe,compileWxssPipe_1.compileWxssPipe];
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pageInitSourcePipe=exports.getPageInitResourceCore=exports.getPageInitResource=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),monitor_1=require("../../../../../../bussinessMonitor/monitor"),types_1=require("../../types"),funcName="$gwx",getPageInitResource=async function(e,t){const n=path_1.default.join("app",t);return(0,exports.getPageInitResourceCore)(e,n)};exports.getPageInitResource=getPageInitResource;const getPageInitResourceCore=async function(e,t){var n;const o=Date.now(),r=null===(n=e.project.projectContext)||void 0===n?void 0:n.projectId;(0,monitor_1.BusinessReport)("pageInitSourceCompile","compile start",JSON.stringify({projectId:r,filePath:t}));try{const e=t.slice(4,t.length-5),n=`\n <style> </style> <page></page>\n <script>\n var __setCssStartTime__ = Date.now();\n __wxAppCode__['${e}.wxss']();\n var __setCssEndTime__ = Date.now();\n (function() {\n var gf = ${"$gwx"}( './${e}.wxml' );\n\n if (window.__wxAppCodeReadyCallback__) {\n window.__wxAppCodeReadyCallback__(gf);\n } else {\n document.dispatchEvent(new CustomEvent( "generateFuncReady", {\n detail: {\n generateFunc: gf\n }\n }));\n }\n })();\n <\/script>`,i=Date.now()-o;return(0,monitor_1.BusinessReport)("pageInitSourceCompile","compile success",JSON.stringify({projectId:r,filePath:t,rawPath:e,duration:i,contentLength:n.length})),n}catch(e){const n=Date.now()-o;throw(0,monitor_1.BusinessReport)("pageInitSourceCompile","compile failed",JSON.stringify({projectId:r,filePath:t,duration:n,error:e instanceof Error?e.message:String(e)})),e}};exports.getPageInitResourceCore=getPageInitResourceCore,exports.pageInitSourcePipe={name:types_1.EPipeCMD.PAGE_INIT_SOURCE,async execute(e,t){const{filepath:n}=t;return await(0,exports.getPageInitResource)(e,n)}};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pageframePipe=void 0,exports.getPageframeCore=getPageframeCore;const tools_1=require("../utils/common/tools"),getwxappcode_1=require("../utils/appdevserver/getwxappcode"),monitor_1=require("../../../../../../bussinessMonitor/monitor"),types_1=require("../../types"),transwxmltojs=require("../utils/trans/transwxmltojs"),transwxsstojs=require("../utils/trans/transwxsstojs");async function getPageframeCore(e,t=!1){var o,n;const a=Date.now(),i=e.project.projectContext;(0,monitor_1.BusinessReport)("pageframeCompile","compile start",JSON.stringify({options:i,isMultiPkg:t}));try{const s=[];t||s.push('\n <!DOCTYPE html>\n <html lang="zh-CN">\n <head>\n <meta charset="UTF-8" />\n <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, viewport-fit=cover" />\n <meta http-equiv="Content-Security-Policy" content="script-src \'self\' \'unsafe-inline\' \'unsafe-eval\'">\n <link rel="icon" href="data:image/ico;base64,aWNv">\n <script>'),s.push("\n var __mainPageFrameReady__ = window.__mainPageFrameReady__ || function(){}; var __pageFrameStartTime__ = __pageFrameStartTime__ || Date.now(); var __webviewId__ = __webviewId__;\n var __wxAppCode__ = __wxAppCode__ || {}; var __WXML_GLOBAL__ = __WXML_GLOBAL__ || {entrys:{},defines:{},modules:{},ops:[],wxs_nf_init:undefined,total_ops:0}; var __vd_version_info__=__vd_version_info__||{};");const r=Date.now(),p=await transwxmltojs.transWXMLToJS(e,{app:!0});s.push(p.code);const _=Date.now()-r;(0,monitor_1.BusinessReport)("pageframeCompile","wxml compiled",JSON.stringify({options:i,duration:_,codeLength:null===(o=p.code)||void 0===o?void 0:o.length}));const m=Date.now(),l=await transwxsstojs.transWXSSToJS(e,{app:!0});s.push((0,tools_1.wrapCodeByEval)(l.comm));const c=Date.now()-m;(0,monitor_1.BusinessReport)("pageframeCompile","wxss compiled",JSON.stringify({options:i,duration:c,codeLength:null===(n=l.comm)||void 0===n?void 0:n.length}));const d=Date.now(),u=await(0,getwxappcode_1.getPageFrameWxAppCode)(e,{app:!0,noJson:!0});s.push(`;(window.eval || __global.__hackEval)(\`${u}\`)`);const g=Date.now()-d;(0,monitor_1.BusinessReport)("pageframeCompile","wxappcode generated",JSON.stringify({options:i,duration:g,codeLength:null==u?void 0:u.length})),s.push(";__mainPageFrameReady__() ;var __pageFrameEndTime__ = Date.now()"),t||s.push("<\/script> </head> <body> <div></div> </body> </html>");const w=Date.now()-a;return(0,monitor_1.BusinessReport)("pageframeCompile","compile success",JSON.stringify({options:i,totalDuration:w,scriptCount:s.length,totalLength:s.join("").length})),s.join("\n\n")}catch(e){const t=Date.now()-a;throw(0,monitor_1.BusinessReport)("pageframeCompile","compile failed",JSON.stringify({options:i,duration:t,error:e instanceof Error?e.message:String(e)})),e}}exports.pageframePipe={name:types_1.EPipeCMD.PAGEFRAME,async execute(e,t){const{isMultiPkg:o=!1}=t||{};return await getPageframeCore(e,o)}};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getInitJS=getInitJS,exports.getJSCodeBuild=getJSCodeBuild,exports.getBabelCodeByName=getBabelCodeByName,exports.getBabelHelperAndDepsCode=getBabelHelperAndDepsCode,exports.getAppCode=getAppCode;const tslib_1=require("tslib"),taskmanager_1=tslib_1.__importDefault(require("../../../../../../../utils/taskmanager")),tools_1=require("../../../../../../../build-server/tasks/common/utils/common/tools"),babelhelpers_1=require("../../../../../../../build-server/tasks/common/utils/babel/babelhelpers"),concat=require("licia/concat"),isEmpty=require("licia/isEmpty"),unique=require("licia/unique"),weappConfig=require("../../../../../../../build-server/tasks/common/weapp.config"),getJsFile=require("../appservice/getjsfile"),appserviceGetwxappcode=require("../appservice/getwxappcode");function getInitJS(e){e.push('\n var __wxAppData = __wxAppData || {};\n var __wxRoute = __wxRoute || "";\n var __wxRouteBegin = __wxRouteBegin || "";\n var __wxAppCode__ = __wxAppCode__ || {};\n var global = global || {};\n var __WXML_GLOBAL__=__WXML_GLOBAL__ || {};\n var __wxAppCurrentFile__=__wxAppCurrentFile__||"";\n var Component = Component || function(){};\n var definePlugin = definePlugin || function(){};\n var requirePlugin = requirePlugin || function(){};\n var Behavior = Behavior || function(){};\n var __vd_version_info__ = __vd_version_info__ || {};\n ')}async function getJSCodeBuild(e,n,r,t,o,a,i,p){const s=p.map((e=>`${e}.js`)),l=await Promise.all(s.map((n=>getJsFile(e,n,{}))));let u=[],_=[l.map((e=>(e.helpers&&(u=concat(u,e.helpers)),e.code))).join("\n")];const c=await getBabelHelperAndDepsCode(e,u);_=concat(Array.from(c.values()),_),n.push(_.join("\n")),r&&n.push("\n try {\n require(\"app.js\")\n } catch (error) {\n !error.from && console.error('app.js错误:\\n',error)\n throw error\n }")}async function getBabelCodeByName(e,n){return wrapFN(`${n}.js`,await(0,babelhelpers_1.getHelperContent)(e.project.setting,n))}async function getBabelHelperAndDepsCode(e,n){if(!isEmpty(n)){n=unique(n);const r=(0,babelhelpers_1.getHelperDeps)(e.project,new Set(n)),t=new Map;for(const n of r){const r=await getBabelCodeByName(e,n);t.set(n,r)}return t}return new Map}async function getAppCode(e,n,r,t,o){const a=new taskmanager_1.default;for(const i of t.concat(o)){const t=async function(){n.push(await appserviceGetwxappcode.getWxAppCodeOfPage(e,i,r.name))};a.addTask(t)}await a.runAllAsync()}function wrapFN(e,n){return`define("${(0,tools_1.escapeQuot)(e,'"')}", function(require, module, exports, ${weappConfig.NO_BOM_VAR.join(",")}){ ${n} \n})`}
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getPageFrameWxAppCode=getPageFrameWxAppCode;const customComponent=require("../project/customcomponent"),appConfigHelper=require("../project/appconfig"),transwxsstojs=require("../trans/transwxsstojs");async function getWxAppCodeWxmlOfPage(e,t){const o=[],p=encodeURI(e);return o.push(`__wxAppCode__[decodeURI("${p}") + ".wxml"]=${t}("./" + decodeURI("${p}") + ".wxml")`),o}async function getWxAppCodeWxssOfPage(e,t){const o=[],p=await transwxsstojs.transWXSSToJS(e,{page:t});if(p.page){const e=encodeURI(t);o.push(`__wxAppCode__[decodeURI("${e}") + ".wxss"]=${p.page}`)}return o}async function getPageFrameWxAppCode(e,t={}){const o=await appConfigHelper.getAppConfig(e),{app:p,page:s}=t;let n;if(!p&&(n=void 0,!n))return"";const a=await customComponent.getFileListJustInPack(e,o,n),r=[];for(let o=0,p=a.length;o<p;o++){const p=await getWxAppCodeWxmlOfPage(a[o],"$gwx");if(r.push(...p),!t.noWXSS){const t=await getWxAppCodeWxssOfPage(e,a[o]);r.push(...t)}}return r.join("\n")}
@@ -1 +0,0 @@
1
- "use strict";const babelhelpers_1=require("../../../../../../../build-server/tasks/common/utils/babel/babelhelpers"),transformsourcemap_1=require("../../../../../../../build-server/tasks/common/utils/transformsourcemap"),generatecode_utils_1=require("../../../../../../../build-server/tasks/common/utils/project/generatecode.utils"),fileRules=require("../../../../../../../build-server/tasks/common/utils/filerules"),_=require("lodash");function transformMap2(e){if(e)try{let t="string"==typeof e?JSON.parse(e):e;return t=Object.assign(Object.assign({},t),{mappings:`;${t.mappings}`,sources:(0,transformsourcemap_1.transformSourceMapSources)(t.sources)}),t}catch(e){}return""}function wrapDefine(e,t,s){const r=transformMap2(t.map||""),i=s.hideRules||[];let o=(0,generatecode_utils_1.wrapSourceCodeInDefine)(e,`\n${t.code}`);return o=(0,generatecode_utils_1.inlineSourceMap)(o,!fileRules.isFileHidedInDevtools(e,i)&&r||"",s.sourceURL),{code:o,map:r}}async function getRuntimeJS(e,t){var s,r,i;const o=e.project,n=("miniProgram"===t.type||"game"===t.type?o.miniprogramRoot:o.pluginRoot)||"",{fileName:l}=t,a=await(0,babelhelpers_1.tryGetHelperJSFile)(o,l,t.injectHelpersSync);if(a)return{code:a,helpers:[],customTranslated:!1,isBabelIgnore:!1,needCompile:!1,isLargeFile:!1};const c=(0,babelhelpers_1.getHelperOutputPath)(o.setting),u=await e.callCompiler("compileJS",{root:n,filePath:l,babelRoot:c,setting:{enhance:null===(s=o.setting)||void 0===s?void 0:s.enhance,es6:null===(r=o.setting)||void 0===r?void 0:r.es6,minify:!1,disableUseStrict:!!o.setting.disableUseStrict,compileWorklet:!!o.setting.compileWorklet},resultType:"dev"}),p=wrapDefine(l,u,{hideRules:(null===(i=o.debugOptions)||void 0===i?void 0:i.hidedInDevtools)||[],sourceURL:t.sourceURL});return _.cloneDeep(Object.assign(Object.assign(Object.assign({},u),p),{helpers:u.helpers||[]}))}async function getJsFile(e,t,s={injectHelpers:!0}){t=decodeURI(t);const r=await getRuntimeJS(e,{type:"miniProgram",fileName:t});return{code:r.code,helpers:r.helpers,map:r.map,mtime:r.mtime}}module.exports=getJsFile;
@@ -1 +0,0 @@
1
- "use strict";const tslib_1=require("tslib"),compile_1=tslib_1.__importDefault(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),appConfigHelper=require("../project/appconfig"),getMainPkgSortedJSFiles=async e=>{let t=await compile_1.default.get("getMainPkgSortedJSFiles");if(t)return reporter_1.compileCacheReporter.hitCache("getMainPkgSortedJSFiles"),t;reporter_1.compileCacheReporter.startGenCache("getMainPkgSortedJSFiles");const i=await appConfigHelper.getAppConfig(e),r=await e.callCompiler("getMainPkgSortedJSFiles");if(i.functionalPages){const e=r.functionalPageFiles.map((e=>`__wx__/${e}`));e.unshift("__wx__/functional-page"),r.functionalPageFiles=e}return t=r,await compile_1.default.set("getMainPkgSortedJSFiles",t),reporter_1.compileCacheReporter.finishGenCache("getMainPkgSortedJSFiles"),t};module.exports=getMainPkgSortedJSFiles;
@@ -1 +0,0 @@
1
- "use strict";const tslib_1=require("tslib"),taskmanager_1=tslib_1.__importDefault(require("../../../../../../../utils/taskmanager")),tools_1=require("../../../../../../../build-server/tasks/common/utils/common/tools"),compile_1=tslib_1.__importStar(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),getWxAppCodeJSON=require("../project/wxappcodejson"),customComponent=require("../project/customcomponent");async function getWxAppCode(e,r=!0){let o=await compile_1.default.get(compile_1.CacheKey.miniProgramAppServiceWXAppCode);if(o)return reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramAppServiceWXAppCode),o;reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramAppServiceWXAppCode);const t=await(await Promise.resolve().then((()=>tslib_1.__importStar(require("../project/appconfig"))))).getAppConfig(e),p=await customComponent.getFileListJustInPack(e,t),a=[],i=new taskmanager_1.default;for(const o of p)i.addTask(getWxAppCodeOfPage,e,o,"$gwx",r);return a.push(...await i.runAllAsync()),o=(0,tools_1.escapeScript)(a.join("\n")),await compile_1.default.set(compile_1.CacheKey.miniProgramAppServiceWXAppCode,o),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramAppServiceWXAppCode),o}async function getWxAppCodeOfPage(e,r,o,t=!0){let p={};try{p=await getWxAppCodeJSON(e,decodeURI(r))}catch(e){p={}}let a=`\n var decodePathName = decodeURI("${(0,tools_1.escapeQuot)(r,'"')}")\n __wxAppCode__[decodePathName + ".json"] = ${JSON.stringify(p)}\n __wxAppCode__[decodePathName + ".wxml"] = ${o}("./" + decodePathName + ".wxml")\n `;return t&&(a+="\n __wxRoute = decodePathName\n __wxRouteBegin = true\n __wxAppCurrentFile__ = decodePathName + \".js\"\n try {\n require(__wxAppCurrentFile__)\n } catch (error) {\n // 插件项目不能hack define和require,走这里,异常只能精准到页面,内部的多层依赖的报错无法精准\n !error.from && console.error('页面【' + decodePathName + ']错误:\\n',error)\n throw error\n }"),a}module.exports={getWxAppCode:getWxAppCode,getWxAppCodeOfPage:getWxAppCodeOfPage};
@@ -1 +0,0 @@
1
- "use strict";const appErrCode={APP_JSON_READ_ERR:10001,APP_JSON_PARSE_ERR:10002,APP_JSON_PAGES_ERR:10003,APP_JSON_ENTRANCE_NOT_FOUND_ERR:1004,APP_JSON_CONTENT_ERR:10005,PAGES_JSON_PARSE_ERR:10006,APP_JSON_WXML_NOT_FOUND:10007,APP_JSON_JS_NOT_FOUND:10008,JSON_CONTENT_ERR:10009,EXT_JSON_PARSE_ERR:10011,EXT_JSON_PAGES_ERR:10012,EXT_JSON_CONTENT_ERR:10013,APPSERVICE_LOSE_WXML:10021,APPSERVICE_LOSE_JS:10022,FILE_NOT_UTF8:10031,BABEL_TRANS_JS_ERR:10032,UGLIFY_JS_ERR:10033,BABILI_JS_ERR:10034,JS_ES6_ERR:10035,FILE_FLAT_ERR:10036,POST_WXSS_ERR:10037,TRANS_WXML_JS_ERR:10040,TRANS_WXSS_JS_ERR:10041,SUMMER_PLUGIN_ERR:10045,SUMMER_PLUGIN_CODE_ERR:10046,VENDOR_MD5_NOT_MATCH:10050,VENDOR_WCC_FILE_NOT_FOUND:10051,VENDOR_WCSC_FILE_NOT_FOUND:10052,CODE_SIZE_EXCEED:10060,GET_GEO_LOCATION_ERR:10070,QCLOUD_SVR_NO_FOUND_ERR:10080,QCLOUD_SVR_POLL_TIMEOUT:10081,QCLOUD_SVR_POLL_DOING:10082,QCLOUD_SVR_UP_DIR_CHECK:10083,PLUGIN_JSON_READ_ERR:10091,PLUGIN_JSON_PARSE_ERR:10092,PLUGIN_JSON_CONTENT_ERR:10093,PLUGIN_PAGE_JSON_PARSE_ERR:10094,PLUGIN_JSON_FILE_NOT_FOUND:10095,PLUGIN_PAGE_JSON_CONTENT_ERR:10096,PLUGIN_TRANS_WXML_JS_ERR:10097,PLUGIN_TRANS_WXSS_JS_ERR:10101,PLUGIN_JS_ES6_ERR:10098,PLUGIN_ONLINE_CODE_UNPACK_ERR:10099,PAGE_JSON_PARSE_ERR:10020,SITE_MAP_JSON_CONTENT_ERROR:10100,CHECK_UPLOAD_STATUS_ERR:10200,CLEAR_SESSION_ERR:10201,GAME_CODE_LIB_MD5_ERR:10202,LOAD_QRCODE_OTHER_ERR:10203,JUMP_QCLOUD_PAGE_ERR:10204,PACK_NPM_ERR:10205,GET_PROJECT_CONFIG_ERR:10206,MINI_PROGRAM_CONSUME_TIMING:10207,MINI_GAME_CONSUME_TIMING:10208,UPLOAD_PROGRESS_FAIIL:10209,UPLOAD_PLUGIN_ERR:10210,UPLOAD_FAIILED:10211,COMPILE_CONDITION_APPID_ERR:10212,COMPILE_CONDITION_PROGRAM_ERR:10213,COMPILE_CONDITION_ERR:10214,COMPILE_CONDITION_ERR_WITH_DETAIL:10215,WIDGET_GET_SEARCH_QUERY_ERROR:10216,QCLOUD_CHOOSE_ENVIRONMENT_ERROR:10217,QCLOUD_UPLOAD_FAIL:10218,TOOLBAR_REMOTE_DEBUG_ERROR:10219,PREPROCESS_UPLOAD_ERROR:10220,DOWNLOAD_SOURCEMAP_ERROR:10221,SOURCEMAP_WRITE_ERROR:10222,CLEAN_USER_AUTH_ERROR:10223,JUMP_WXGIT_ERROR:10224,TCB_DELETE_FAILED:10225,FETCH_REMOTE_SETTING_ERROR:10226,UPLOAD_LOCAL_SETTING_ERROR:10227,UPLOAD_SOURCE_CODE_ERROR:10228,UPLOAD_EXCEED_SIZE_LIMIT:10230,PROJECT_CONFIG_JSON_ERROR:10231,TEST_CODE_RUN_ERROR:10232,AUTO_UPLOAD_ERROR:10233,CLOUD_UPLOAD_OPEN_ERROR:10234,CLOUD_BUILD_OPEN_ERROR:10201,WEBVIEW_NETWORK_ERROR:20010,APPSERVICE_NETWORK_ERROR:20011,PLUGIN_ERROR:20012,ONLINE_CODE_UNPACK_ERR:3e4,URL_SCHEME_INVALID_ERROR:31e3,URL_SCHEME_OTHER_ERROR:31001,APP_UPGRADE_ERROR:35e3,APP_ADD_AUTHO_PAGE_ERROR:35001};module.exports=appErrCode;
@@ -1 +0,0 @@
1
- "use strict";function wrapCodeByEval(e){return`;(window.eval || __global.__hackEval)('${e}')`}Object.defineProperty(exports,"__esModule",{value:!0}),exports.wrapCodeByEval=wrapCodeByEval;
@@ -1 +0,0 @@
1
- "use strict";const tslib_1=require("tslib"),storeService_1=require("../../../../../../../services/store/common/storeService"),getservice_1=tslib_1.__importDefault(require("../../../../../../../services/common/getservice")),tools_1=require("../../../../../../../build-server/tasks/common/utils/common/tools"),compile_1=tslib_1.__importStar(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),theme_1=require("./helper/theme"),monitor_1=require("../../../../../../../bussinessMonitor/monitor"),path=require("path"),getCompiledAppJSON=require("./appjson"),getCompiledPageJSON=require("./pagejson");async function mergeThemeJSON(e){var o;const{project:i,isDarkMode:t,themeLocation:a,themeJSON:r,appConfig:n}=e,s=path.join(i.projectpath,i.miniprogramRoot||""),{windowConfigRules:c,tabbarRules:p,tabbarListItemRules:l}=(0,theme_1.checkThemeRules)(s,i);(0,theme_1.checkVariables)({isDarkMode:t,themeLocation:a,themeJSON:r,filePath:"app.json or ext.json",windowConfig:n.global.window,rules:c,keyPrefix:'["window"]',isPlugin:!1});for(const e in n.page){const o=e.replace(/\.html$/,"");(0,theme_1.checkVariables)({isDarkMode:t,themeLocation:a,themeJSON:r,filePath:`${o}.json`,windowConfig:n.page[e].window||{},rules:c,keyPrefix:"",isPlugin:!1})}if(n.tabBar){(0,theme_1.checkVariables)({isDarkMode:t,themeLocation:a,themeJSON:r,filePath:"app.json or ext.json",windowConfig:n.tabBar||{},rules:p,keyPrefix:'["tabBar"]',isPlugin:!1});for(let e=0;e<(null===(o=n.tabBar)||void 0===o?void 0:o.list.length);e++)(0,theme_1.checkVariables)({isDarkMode:t,themeLocation:a,themeJSON:r,filePath:"app.json or ext.json",windowConfig:n.tabBar.list[e],rules:l,keyPrefix:`["tabBar"]["list"][${e}]`,isPlugin:!1})}}function getAppConfigJSON(e,o){const i=e.subPackages||e.subpackages;return Object.assign(Object.assign({},e),{pages:e.pages||[],resizable:!!e.resizable,subPackages:i,debug:!!e.debug,widgets:e.widgets||[],customClose:!!e.customClose,workers:e.workers||"",cloud:!!e.cloud,global:{window:Object.assign(Object.assign({},(0,theme_1.getDefaultWindowConfig)(e.darkmode&&o)),e.window)},page:{},networkTimeout:Object.assign({request:6e4,uploadFile:6e4,connectSocket:6e4,downloadFile:6e4},e.networkTimeout),ext:e.ext||{},extAppid:e.extAppid||"",plugins:e.plugins||{},mainPlugins:Object.assign({},e.plugins),preloadRule:e.preloadRule,permission:e.permission,requiredBackgroundModes:e.requiredBackgroundModes,functionalPages:e.functionalPages,style:e.style,useExtendedLib:e.useExtendedLib||{},supportedMaterials:e.supportedMaterials||[],usingShopPlugin:e.usingShopPlugin||void 0,embeddedAppIdList:e.embeddedAppIdList,halfPage:e.halfPage,resolveAlias:e.resolveAlias,renderer:e.renderer,enablePassiveEvent:e.enablePassiveEvent,debugOptions:e.debugOptions,requiredPrivateInfos:e.requiredPrivateInfos||[],__warning__:e.__warning__||""})}async function checkAppConfig(e,o){const i=await getCompiledAppJSON(e),t=getAppConfigJSON(i,o),a=(e,o)=>{o.__warning__&&(t.__warning__&&(t.__warning__+="\n"),t.__warning__+=`${e}: ${o.__warning__}`)},r=t.pages;t.entryPagePath=i.entryPagePath?`${i.entryPagePath}.html`:`${r[0]}.html`;for(const o of r){const i=await getCompiledPageJSON(e,`${o}`)||{};a(o,i);const{singlePage:r}=i,n=tslib_1.__rest(i,["singlePage"]);t.page[`${o}.html`]={window:n||{},singlePage:r,renderer:i.renderer}}if(t.accountCardPackage)for(const e of t.accountCardPackage.cardList){const o=path.posix.join(t.accountCardPackage.root,e.componentPath);t.page[`${o}.html`]={window:{}}}t.page=Object.assign({},t.page);const n=Object.assign({},i.tabBar),s=[].concat(n.list||[]),c=[];for(const e of s){const o=Object.assign({},e);o.pagePath+=".html",c.push(o)}n.list=c,t.tabBar=n,i.darkmode&&(t.supportDarkmode=!0),t.lazyCodeLoading=i.lazyCodeLoading;t.publibSupportLazyload=false,t.isLazyLoad=!1;let p={};const{themeLocation:l}=i;return void 0!==l&&""!==l.trim().replace(/^\.\//,"")&&(p=await e.callCompiler("checkThemeJSON",{themeLocation:l})),await mergeThemeJSON({project:e.project,themeJSON:p,themeLocation:l,isDarkMode:i.darkmode&&o,appConfig:t}),t}async function checkLightAppConfig(e){var o,i;const t=(await(null===(i=(o=e.project).attr)||void 0===i?void 0:i.call(o))).platform;let a=await compile_1.default.get(compile_1.CacheKey.miniProgramAppConfig);if((null==a?void 0:a.value)&&a.platform===t)reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramAppConfig);else{reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramAppConfig);const o=await checkAppConfig(e,!1);a={platform:t,value:(0,tools_1.makeDeepReadonly)(o)},await compile_1.default.set(compile_1.CacheKey.miniProgramAppConfig,a),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramAppConfig)}return a.value}async function checkDarkmodeAppConfig(e){var o,i;const t=(await(null===(i=(o=e.project).attr)||void 0===i?void 0:i.call(o))).platform;let a=await compile_1.default.get(compile_1.CacheKey.miniProgramAppConfigDarkMode);if((null==a?void 0:a.value)&&a.platform===t)reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramAppConfigDarkMode);else{reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramAppConfigDarkMode);const o=await checkAppConfig(e,!0);a={platform:t,value:(0,tools_1.makeDeepReadonly)(o)},await compile_1.default.set(compile_1.CacheKey.miniProgramAppConfigDarkMode,a),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramAppConfigDarkMode)}return a.value}async function getAppConfig(e,o=!1){var i,t;const a=Date.now(),r=e.project.projectContext;(0,monitor_1.BusinessReport)("appconfig","getAppConfig start",JSON.stringify({options:r,forceDarkMode:o}));try{let n;const s=e.project.backendProjectContext;let c;n=s?s.compileOptions.deviceState.darkmode||!1:await(0,getservice_1.default)(storeService_1.IStoreService).getValue("toolbar","darkmode")||!1,c=n||o?await checkDarkmodeAppConfig(e):await checkLightAppConfig(e);const p=Date.now()-a;return(0,monitor_1.BusinessReport)("appconfig","getAppConfig success",JSON.stringify({options:r,duration:p,pageCount:(null===(i=c.pages)||void 0===i?void 0:i.length)||0,subPackageCount:(null===(t=c.subPackages||c.subpackages)||void 0===t?void 0:t.length)||0,hasDarkMode:!!n||o})),c}catch(e){const o=Date.now()-a;throw(0,monitor_1.BusinessReport)("appconfig","getAppConfig failed",JSON.stringify({options:r,duration:o,error:e instanceof Error?e.message:String(e)})),e}}module.exports={getAppConfig:getAppConfig};
@@ -1 +0,0 @@
1
- "use strict";const tslib_1=require("tslib"),compile_1=tslib_1.__importStar(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),getCompiledAppJSON=async e=>{let r=await compile_1.default.get(compile_1.CacheKey.miniProgramCompiledAppJSON);if(r)return reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramCompiledAppJSON),r;reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramCompiledAppJSON);try{r=await e.callCompiler("getAppJSON")}catch(e){throw e.message=`app.json ${e.message}`,e}return await compile_1.default.set(compile_1.CacheKey.miniProgramCompiledAppJSON,r),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramCompiledAppJSON),r};module.exports=getCompiledAppJSON;
@@ -1 +0,0 @@
1
- "use strict";const processPath_1=require("../web/processPath"),path=require("path"),friendlyPathMake=(o,t)=>path.posix.normalize(path.join(o,t).replace(/^\/+/,"")).replace(/\\/g,"/"),trailing=(o,t)=>o.endsWith(t)?o:o+t,unifyPath=o=>o.replace(/\\/g,"/"),findSubpackageForFile=(o,t)=>{let n;const e=t.subPackages||t.subpackages;if(Array.isArray(e))for(const t of e)if(t&&"string"==typeof t.root&&(0,processPath_1.isLeftSubPathOfRight)(o,trailing(t.root,"/"))){n=t;break}return n};async function getAllJSON(o){return(await o.callCompiler("getAllPageAndComponent")).map((o=>`${o}.json`))}const getCustomComponentsConfig=async(o,t)=>{const n=await getAllJSON(o),e=new Set;if(t.pages)for(const o of t.pages)e.add(o);const i=t.subPackages||t.subpackages;if(Array.isArray(i))for(const o of i)if(o&&"string"==typeof o.root&&Array.isArray(o.pages))for(const t of o.pages){const n=friendlyPathMake(o.root,String(t));e.add(n)}const s={};for(const e of n){const n=e.replace(/\.json$/,"");if("app"===(0,processPath_1.normalizePath)(n))continue;const i=await o.callCompiler("getPageJSON",n);if(i.usingComponents||i.componentGenerics||!0===i.component){const o=findSubpackageForFile(n,t);s[n]={config:o,file:e,pageJSON:i}}}for(const n of e)if(!s[n]){const e=await o.callCompiler("getPageJSON",n);s[n]={config:findSubpackageForFile(n,t),file:`${n}.json`,pageJSON:e||{}}}return s};async function getFileListJustInPack(o,t,n){const e=await getCustomComponentsConfig(o,t),i=[];for(const o in e){const t=e[o];n?t.config&&t.config.root===n.root&&i.push(o):t.config||i.push(o)}return[...i]}async function getWxssCompileConfig(o,t,n){return await getFileListJustInPack(o,t,n)}async function getWxmlCompileConfig(o,t,n){let e=[],i=0;const s=await getCustomComponentsConfig(o,t);for(const o in s){const t=s[o];if(!t)continue;if(!n&&t.config||n&&!t.config||n&&t.config&&n.root!==t.config.root)continue;const a=t.pageJSON;if(a&&(a.usingComponents||a.componentGenerics)){e.push(`./${o}.wxml`);const t=Object.assign(Object.assign({},a.usingComponents),a.componentGenerics);i++,e.push(Object.keys(t).length),e=e.concat(Object.keys(t))}}return e.unshift(i),e}async function getWxmlCompileLazyConfig(o,t,n){return(await getFileListJustInPack(o,t,n)).map((o=>`./${o}`))}module.exports={getFileListJustInPack:getFileListJustInPack,getWxssCompileConfig:getWxssCompileConfig,getWxmlCompileConfig:getWxmlCompileConfig,getWxmlCompileLazyConfig:getWxmlCompileLazyConfig,getCustomComponentsConfig:getCustomComponentsConfig,findSubpackageForFile:findSubpackageForFile};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkTabbarListItemIconPath=checkTabbarListItemIconPath,exports.checkThemeRules=checkThemeRules,exports.getDefaultWindowConfig=getDefaultWindowConfig,exports.checkVariables=checkVariables;const tslib_1=require("tslib"),locales_1=require("../../../../../../../../services/locales/common/locales"),getservice_1=tslib_1.__importDefault(require("../../../../../../../../services/common/getservice")),pluginFileReader_1=require("../../../../../../../../services/pluginFileReader/common/pluginFileReader"),path=require("path"),colorUtils=require("../../../../../../../../utils/colorutils"),appErrcodeConfig=require("../../common/apperrcode.config"),TABBAR_ICON_WHITE_LIST=[".png",".jpg",".jpeg"],localesService=(0,getservice_1.default)(locales_1.ILocalesService),locales=localesService.getLocales();function checkTabbarListItemIconPath(e,o,r){const t=[],i=(0,getservice_1.default)(pluginFileReader_1.IPluginFileReaderService).stat(r,o);if(!i)return t.push(locales.config.NOT_FOUND.format(e)),t;(r.setting||{}).MaxTabbarIconSize;i.mtimeMs;const a=path.extname(o);return TABBAR_ICON_WHITE_LIST.indexOf(a)<0&&t.push(locales.config.FILE_EXT_FORMAT_ERROR.format(e,TABBAR_ICON_WHITE_LIST.join("、"))),t}function throwError(e={msg:"",filePath:"app.json"}){const{msg:o,filePath:r}=e,t=new Error(o);throw t.code=appErrcodeConfig.JSON_CONTENT_ERR,t.path=r,t}function checkThemeRules(e,o){const r=(r,t)=>{const i=path.join(e,t),a=o?checkTabbarListItemIconPath(r,i,o):[];a.length>0&&throwError({msg:a.join("\n"),filePath:"app.json or ext.json"})};return{windowConfigRules:[{key:"navigationBarTextStyle",valids:["black","white"]},{key:"backgroundTextStyle",valids:["dark","light"]},{key:"navigationBarBackgroundColor",hexColor:!0},{key:"backgroundColor",hexColor:!0},{key:"backgroundColorTop",hexColor:!0},{key:"backgroundColorBottom",hexColor:!0}],tabbarRules:[{key:"selectedColor",hexColor:!0},{key:"color",hexColor:!0},{key:"backgroundColor",hexColor:!0},{key:"borderStyle",valids:["black","white"]}],tabbarListItemRules:[{key:"iconPath",validate:r},{key:"selectedIconPath",validate:r}]}}function getDefaultWindowConfig(e){return e?{backgroundColor:"#232323",backgroundTextStyle:"light"}:{backgroundColor:"#ffffff",backgroundTextStyle:"dark"}}function checkVariables(e){var o;const{windowConfig:r,themeLocation:t,filePath:i,isDarkMode:a,themeJSON:l,rules:c,keyPrefix:n,isPlugin:s=!1}=e,h=a?l.dark||{}:l.light||{},f=a?"dark":"light";for(const e of c)if((r[e.key]||"").startsWith("@")){const a=(null===(o=r[e.key])||void 0===o?void 0:o.slice(1))||"";if(a&&void 0===t){if(s)continue;throwError({msg:locales.config.THEME_JSON_SHOULD_EXIST.format(`${n}["${e.key}"]`,`"@${a}"`,'appJSON["themeLocation"]'),filePath:i})}const l=h[a];if(void 0===l){if(s)continue;throwError({msg:locales.config.JSON_VARIABLE_VALUE_NOT_FOUND.format(`${n}["${e.key}"]: "@${a}"`,`${t}["${f}"]`),filePath:i})}void 0!==l&&(Array.isArray(e.valids)&&e.valids.indexOf(l)<0&&throwError({msg:locales.config.THEME_JSON_VALUE_SHOULD_BE.format(`${t}["${f}"]["${a}"]`,`${i} ${n}["${e.key}"]`,`${JSON.stringify(e.valids)}`),filePath:t}),e.hexColor&&!colorUtils.isHexColor(l)&&throwError({msg:locales.config.THEME_JSON_VALUE_SHOULD_BE.format(`${t}["${f}"]["${a}"]`,`${i} ${n}["${e.key}"]`,"hexColor"),filePath:t}),e.validate&&e.validate(`${n}["${e.key}"]`,l),r[e.key]=l)}}
@@ -1 +0,0 @@
1
- "use strict";const tslib_1=require("tslib"),registry_1=require("../../../../../../../build-server/tasks/common/utils/interfacebuilder/registry"),compile_1=tslib_1.__importStar(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),path=require("path"),_=require("lodash"),getCompiledPageJSON=async(e,i)=>{const r=e.project,t=`${r.miniprogramRoot}${i}.json`,o=path.posix.join(r.projectpath,t);let a,s=await compile_1.default.get(compile_1.CacheKey.miniProgramCompiledPageJSON);if(s||(s={},await compile_1.default.set(compile_1.CacheKey.miniProgramCompiledPageJSON,s)),s[o]&&!r.isIB)return reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramCompiledPageJSON),_.cloneDeep(s[o]);reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramCompiledPageJSON);try{a=await e.callCompiler("getPageJSON",i),a.usingComponents||(a.usingComponents={})}catch(e){throw e.message=`${t} ${e.message}`,e}if(r.isIB&&i.indexOf("miniprogram_npm")<0){const e=registry_1.interfaceBuilderRegistry.get(registry_1.IInterfaceBuilderRegistryType.getBussinessUsingComponents);if(e){const i=e(r,a);a=Object.assign(Object.assign({},a),{usingComponents:Object.assign(Object.assign({},a.usingComponents),i)})}}return s[o]=a,await compile_1.default.set(compile_1.CacheKey.miniProgramCompiledPageJSON,s),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramCompiledPageJSON),_.cloneDeep(s[o])};module.exports=getCompiledPageJSON;
@@ -1 +0,0 @@
1
- "use strict";const tslib_1=require("tslib"),compile_1=tslib_1.__importStar(require("../../../../../../../build-server/tasks/common/utils/cache/compile")),reporter_1=require("../../../../../../../build-server/tasks/common/utils/cache/reporter"),_=require("lodash"),getCompiledPageJSON=require("./pagejson"),appConfigHelper=require("./appconfig");async function getWXAppCodeJSON(e,o){let i=await compile_1.default.get(compile_1.CacheKey.miniProgramWXAppCodeJSON);if(i||(i={},await compile_1.default.set(compile_1.CacheKey.miniProgramWXAppCodeJSON,i)),i[o]&&!e.project.isIB)return reporter_1.compileCacheReporter.hitCache(compile_1.CacheKey.miniProgramWXAppCodeJSON),_.cloneDeep(i[o]);reporter_1.compileCacheReporter.startGenCache(compile_1.CacheKey.miniProgramWXAppCodeJSON);const r=await appConfigHelper.getAppConfig(e),p=await getCompiledPageJSON(e,o);if(p.usingComponents&&Object.keys(p.usingComponents).length>0){const e={};for(const o in p.usingComponents){const i=p.usingComponents[o]||"";r.plugins?e[o]=i.replace(/^plugin:\/\/([^/]*)\/(.*)/,((e,o,i,p,t)=>{var n;const a=(null===(n=r.plugins)||void 0===n?void 0:n[o])||(void 0,void 0);return a?`plugin://${a.provider}/${i}`:t})):e[o]=i}p.usingComponents=e}return i[o]=p,await compile_1.default.set(compile_1.CacheKey.miniProgramWXAppCodeJSON,i),reporter_1.compileCacheReporter.finishGenCache(compile_1.CacheKey.miniProgramWXAppCodeJSON),_.cloneDeep(i[o])}module.exports=getWXAppCodeJSON;
@@ -1 +0,0 @@
1
- "use strict";const processPath_1=require("../web/processPath"),types_1=require("../../../types"),TRANS_WXML_JS_ERR=10040,customComponent=require("../project/customcomponent"),appConfigHelper=require("../project/appconfig");async function addAccountCardCode(e){const{appConfig:t,config:o,replaceContent:n}=e;return Object.assign({},n)}async function getWxmlFilesForTrans(e,t){const{appConfig:o,config:n,lazyload:a}=t,i=await e.callCompiler("getPackageWxmlAndWxsFiles",(null==n?void 0:n.root)||"__APP__");let r=i.wxmlFiles,c=i.wxsFiles;Object.entries(i.content).forEach((([e,t])=>{e.startsWith("./")||(i.content[`./${e}`]=t)}));n&&a&&(r=r.filter((e=>(0,processPath_1.isLeftSubPathOfRight)(e,n.root))),c=c.filter((e=>(0,processPath_1.isLeftSubPathOfRight)(e,n.root))));let s=r.concat(c),l=!1;(null==c?void 0:c.length)>0&&(l=!0),s=s.map((e=>`./${e}`));let p={},f=!1;i&&(p=i.content);return{srcPath:e.project.miniprogramRoot||"",files:s,hasWxs:l,usePartialReplaceContent:f,partialEnable:false,replaceContent:p}}function formateError(e){const t=new Error(e.toString());return t.code=TRANS_WXML_JS_ERR,t.msgForConsole=(null==e?void 0:e.message)||e.toString(),t}async function wxmlToJS(e,t){try{return await _wxmlToJS(e,t)}catch(e){throw formateError(e)}}async function _wxmlToJS(e,t){const{appConfig:o,config:n,lazyload:a,cut:i}=t,{srcPath:r,files:c,hasWxs:s,usePartialReplaceContent:l,partialEnable:p,replaceContent:f}=await getWxmlFilesForTrans(e,t);if(0===c.length&&a)return{pages:{},names:{}};const g=n?`$${Buffer.from(n.root).toString("hex")}`:"$gwx",u=">_<"+Date.now()%1e4,m=(await customComponent.getWxmlCompileConfig(e,o,n)).join(u);let C="";if(a){let t=await customComponent.getWxmlCompileLazyConfig(e,o,n);if(p)if(l)t=["index"];else{const e=c.map((e=>e.replace(/^\.\//,"")));t=t.filter((t=>e.includes(`${t}.wxml`.replace(/^\.\//,""))))}C=t.join(u)}return a&&!C?{pages:{},names:{}}:await e.requestPipe(types_1.EPipeCMD.WCC,{files:c,isCut:i,lazyloadConfig:C,configSplit:u,configContent:m,hasWxs:s,genfuncName:g,cwd:r,replaceContent:f,isMiniAppProject:!1})}async function transWXMLToJS(e,t={}){const o=await appConfigHelper.getAppConfig(e),{app:n,page:a,cut:i,hotReloadFile:r}=t;let c;if(r){c=void 0;const{name:t,code:n}=await wxmlToJS(e,{appConfig:o,config:c,cut:i});return{name:t,code:n}}if(!n&&(c=null,!c))return{code:"",name:"$gwx"};const s=await wxmlToJS(e,{appConfig:o,config:c,cut:i}),{name:l,code:p}=s;return{name:l,code:p}}module.exports={transWXMLToJS:transWXMLToJS};
@@ -1 +0,0 @@
1
- "use strict";const types_1=require("../../../types"),path=require("path"),appConfigHelper=require("../project/appconfig"),customComponent=require("../project/customcomponent");function formatError(o){const t=new Error(o.toString());return t.code=10041,t.msgForConsole=o.message,console.error(o.message),t}async function wxssToJS(o,t){try{return await _wxssToJS(o,t)}catch(o){if("CustomError"===(null==o?void 0:o.type))throw o;throw formatError(o)}}async function addAccountCardCode(o){const{appConfig:t,config:e,replaceContent:n}=o;return Object.assign({},n)}async function _wxssToJS(o,t){const{appConfig:e,config:n,lazyload:s}=t,a=await o.callCompiler("getPackageWxssFiles",(null==n?void 0:n.root)||"__APP__"),r=a.wxssFiles,c={};r.forEach((o=>{c[o]=a.content[o]||""})),Object.entries(c).forEach((([o,t])=>{o.startsWith("./")||(c[`./${o}`]=t)}));const i={};r.forEach((o=>{i[o]=!0}));const p=(null==n?void 0:n.pages.map((o=>path.posix.join(n.root,o))))||e.pages,l=[];let u=0;p.forEach((o=>{i[`${o}.wxss`]&&(u++,l.push(`./${o}.wxss`),delete i[`${o}.wxss`])}));(await customComponent.getWxssCompileConfig(o,e,n)).forEach((o=>{i[`${o}.wxss`]&&(u++,l.push(`./${o}.wxss`),delete i[`${o}.wxss`])}));for(const o in i)"app.wxss"===o&&0===u&&(u=1),l.push(`./${o}`);let f={};a&&(f=a.content),f=await addAccountCardCode({appConfig:e,config:n,replaceContent:f});const g=o.project.miniprogramRoot||"";return await o.requestPipe(types_1.EPipeCMD.COMPILE_WXSS,{pageCount:u,files:l,cwd:g,subPackage:null==n?void 0:n.root,lazyload:s,replaceContent:f})}async function transWXSSToJS(o,t={}){const e=await appConfigHelper.getAppConfig(o),{app:n,page:s,hotReloadFile:a}=t;if(a){const t=void 0,n=await wxssToJS(o,{appConfig:e,config:t});return{comm:n.comm,page:(null==n?void 0:n[`./${a}`])||""}}if(n){const t=await wxssToJS(o,{appConfig:e})||{};return{comm:(null==t?void 0:t.comm)||""}}const r=`./${s}.wxss`;{const t=await wxssToJS(o,{appConfig:e});return{comm:null==t?void 0:t.comm,page:(null==t?void 0:t[r])||""}}}module.exports={transWXSSToJS:transWXSSToJS};
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.normalizePath=normalizePath,exports.isLeftSubPathOfRight=isLeftSubPathOfRight;const tslib_1=require("tslib"),path=tslib_1.__importStar(require("path"));function normalizePath(t="",e={}){let i=path.posix.normalize(t.replace(/\\/g,"/"));return(t.startsWith("//")||t.startsWith("\\\\"))&&(i.startsWith("//")||(i=`/${i}`)),e.leading?i.startsWith(e.leading)||(i=`${e.leading}${i}`):e.noLeading&&i.startsWith(e.noLeading)&&(i=i.slice(e.noLeading.length)),e.trailing?i.endsWith(e.trailing)||(i=`${i}${e.trailing}`):e.noTrailing&&i.endsWith(e.noTrailing)&&(i=i.slice(0,-e.noTrailing.length)),i}function _isLeftSubPathOfRight(t,e){if(!e)return!0;if(e=normalizePath(e),t=normalizePath(t),!e.endsWith("/")){if(t===e)return!0;e=`${e}/`}return!!t.startsWith(e)}function isLeftSubPathOfRight(t,e){void 0===t&&(console.error(new Error("The child string is undefined here, please check!!")),t="");const i=t.startsWith(e),r=_isLeftSubPathOfRight(t,e);return i===r||r||console.error(new Error(`${t} ${e} difference check sub path here! new result: ${r}`)),r}
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.wccPipe=void 0;const compilewxmlService_1=require("../../../../../services/compilewxml/common/compilewxmlService"),types_1=require("../types");exports.wccPipe={name:types_1.EPipeCMD.WCC,async execute(e,i){const{files:c,isCut:o,lazyloadConfig:t,configSplit:n,configContent:l,hasWxs:p,genfuncName:s,cwd:r,replaceContent:m,isMiniAppProject:a}=i;return await e.getService(compilewxmlService_1.ICompilewxmlService).compileWxml({files:c,isCut:o,lazyloadConfig:t,configSplit:n,configContent:l,hasWxs:p,genfuncName:s,cwd:r,replaceContent:m,isMiniAppProject:a})}};
@@ -1 +0,0 @@
1
- "use strict";var EPipeCMD;Object.defineProperty(exports,"__esModule",{value:!0}),exports.EPipeCMD=void 0,function(E){E.WCC="WCC",E.TRANS_WXML_TO_GLASS_EASEL="TRANS_WXML_TO_GLASS_EASEL",E.COMPILE_WXSS="COMPILE_WXSS",E.PAGEFRAME="PAGEFRAME",E.PAGE_INIT_SOURCE="PAGE_INIT_SOURCE",E.APPSERVICE="APPSERVICE"}(EPipeCMD||(exports.EPipeCMD=EPipeCMD={}));