miniprogram-ci 1.9.6 → 1.9.7

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 (207) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/dist/@types/ci/project.d.ts +3 -3
  3. package/dist/@types/ci/upload.d.ts +2 -2
  4. package/dist/@types/config.d.ts +1 -1
  5. package/dist/@types/core/json/projectWithMockBuffer.d.ts +1 -1
  6. package/dist/@types/core/json/reactiveCache.d.ts +1 -1
  7. package/dist/@types/core/utils/env.d.ts +2 -2
  8. package/dist/@types/core/utils/logger.d.ts +2 -2
  9. package/dist/@types/core/validate/schemaValidate.d.ts +1 -1
  10. package/dist/@types/core/validate/validate.d.ts +1 -1
  11. package/dist/@types/summer/devtool.d.ts +12 -12
  12. package/dist/@types/summer/graph/basegraph.d.ts +2 -2
  13. package/dist/@types/summer/plugin_driver.d.ts +4 -4
  14. package/dist/@types/summer/project.d.ts +3 -3
  15. package/dist/@types/summer/resolver.d.ts +2 -2
  16. package/dist/@types/summer/types.d.ts +21 -21
  17. package/dist/@types/summer/worker.d.ts +2 -2
  18. package/dist/@types/types/index.d.ts +4 -4
  19. package/dist/@types/utils/interruptibletask.d.ts +1 -1
  20. package/dist/@types/utils/report.d.ts +1 -1
  21. package/dist/@types/vendor/cloud-api/src/transaction/contracts/factory.d.ts +2 -2
  22. package/dist/@types/vendor/cloud-api/src/utils/validator.d.ts +7 -7
  23. package/dist/ci/code-analyse.js +1 -1
  24. package/dist/ci/cos-upload.js +1 -1
  25. package/dist/ci/getCompiledResult.js +1 -1
  26. package/dist/ci/getDevSourceMap.js +1 -1
  27. package/dist/ci/getLatestVersion.js +1 -1
  28. package/dist/ci/jsserver.js +1 -1
  29. package/dist/ci/preview.js +1 -1
  30. package/dist/ci/project.js +1 -1
  31. package/dist/ci/projectattr.js +1 -1
  32. package/dist/ci/upload.js +1 -1
  33. package/dist/ci/utils/filterUnusedFile.js +1 -1
  34. package/dist/ci/utils/packfile.js +1 -1
  35. package/dist/cli.js +1 -1
  36. package/dist/cloud/cloudapi.js +1 -1
  37. package/dist/cloud/createTimeTrigger.js +1 -1
  38. package/dist/cloud/uploadContainer.js +1 -1
  39. package/dist/cloud/uploadFile.js +1 -1
  40. package/dist/cloud/uploadFunction.js +1 -1
  41. package/dist/cloud/utils.js +1 -1
  42. package/dist/config.js +1 -1
  43. package/dist/core/compile/common.js +1 -1
  44. package/dist/core/compile/game.js +1 -1
  45. package/dist/core/compile/game_plugin.js +1 -1
  46. package/dist/core/compile/handler/js.js +1 -1
  47. package/dist/core/compile/handler/mpjson.js +1 -1
  48. package/dist/core/compile/handler/wxml.js +1 -1
  49. package/dist/core/compile/handler/wxss.js +1 -1
  50. package/dist/core/compile/index.js +1 -1
  51. package/dist/core/compile/mini_program.js +1 -1
  52. package/dist/core/compile/mini_program_plugin.js +1 -1
  53. package/dist/core/js/enhance.js +1 -1
  54. package/dist/core/js/index.js +1 -1
  55. package/dist/core/js/minifyjs_after_wrap.js +1 -1
  56. package/dist/core/json/app/checkAppFields.js +1 -1
  57. package/dist/core/json/app/getAppJSON.js +1 -1
  58. package/dist/core/json/app/getExtJSON.js +1 -1
  59. package/dist/core/json/app/index.js +1 -1
  60. package/dist/core/json/common.js +1 -1
  61. package/dist/core/json/game.js +1 -1
  62. package/dist/core/json/page/checkPageJSON.js +1 -1
  63. package/dist/core/json/page/getPageJSON.js +1 -1
  64. package/dist/core/json/plugin/plugin.js +1 -1
  65. package/dist/core/json/plugin/plugin_page.js +1 -1
  66. package/dist/core/json/projectWithMockBuffer.js +1 -1
  67. package/dist/core/json/projectconfig.js +1 -1
  68. package/dist/core/json/reactiveCache.js +1 -1
  69. package/dist/core/json/signaturejson.js +1 -1
  70. package/dist/core/json/sitemap.js +1 -1
  71. package/dist/core/json/theme.js +1 -1
  72. package/dist/core/npm/filterdeps.js +1 -1
  73. package/dist/core/npm/packnpm.js +1 -1
  74. package/dist/core/protect/file_flatter.js +1 -1
  75. package/dist/core/protect/uglifyfilenames.js +1 -1
  76. package/dist/core/validate/validate.js +1 -1
  77. package/dist/core/worker_thread/childprocess.js +1 -1
  78. package/dist/core/worker_thread/childprocess_manager.js +1 -1
  79. package/dist/core/worker_thread/fork.js +1 -1
  80. package/dist/core/worker_thread/index.js +1 -1
  81. package/dist/core/worker_thread/task/call_func.js +1 -1
  82. package/dist/core/worker_thread/task/compilejs.js +1 -1
  83. package/dist/core/worker_thread/task/compilewxss.js +1 -1
  84. package/dist/core/worker_thread/task/func.js +1 -1
  85. package/dist/core/worker_thread/task/minifywxml.js +1 -1
  86. package/dist/core/worker_thread/worker.js +1 -1
  87. package/dist/core/worker_thread/worker_manager.js +1 -1
  88. package/dist/core.js +1 -1
  89. package/dist/index.js +1 -1
  90. package/dist/manifest.json +2 -2
  91. package/dist/summer/devtool.js +1 -1
  92. package/dist/summer/entry_process.js +1 -1
  93. package/dist/summer/graph/appconf.js +1 -1
  94. package/dist/summer/graph/basegraph.js +1 -1
  95. package/dist/summer/graph/pluginconf.js +1 -1
  96. package/dist/summer/initPlugin.js +1 -1
  97. package/dist/summer/persist_cache.js +1 -1
  98. package/dist/summer/plugins/base/javascript.js +1 -1
  99. package/dist/summer/plugins/base/wxss.js +1 -1
  100. package/dist/summer/plugins/enhance.js +1 -1
  101. package/dist/summer/plugins/less.js +1 -1
  102. package/dist/summer/plugins/minifywxml.js +1 -1
  103. package/dist/summer/plugins/sass.js +1 -1
  104. package/dist/summer/plugins/typescript.js +1 -1
  105. package/dist/summer/project.js +1 -1
  106. package/dist/summer/resolver.js +1 -1
  107. package/dist/summer/summer.js +1 -1
  108. package/dist/types/index.js +1 -1
  109. package/dist/types/miniprogram-json/index.js +1 -1
  110. package/dist/utils/babel_helper.js +1 -1
  111. package/dist/utils/common.js +1 -1
  112. package/dist/utils/error.js +1 -1
  113. package/dist/utils/fsagent.js +1 -1
  114. package/dist/utils/glob.js +1 -1
  115. package/dist/utils/jsonParse.js +1 -1
  116. package/dist/utils/locales/locales.js +1 -1
  117. package/dist/utils/request.js +1 -1
  118. package/dist/utils/sign.js +1 -1
  119. package/dist/utils/taskstatus.js +1 -1
  120. package/dist/utils/tools.js +1 -1
  121. package/dist/utils/white_ext_list.js +1 -1
  122. package/dist/vendor/babel_runtime/helpers/AsyncGenerator.js +1 -1
  123. package/dist/vendor/babel_runtime/helpers/OverloadYield.js +1 -0
  124. package/dist/vendor/babel_runtime/helpers/applyDecs.js +1 -0
  125. package/dist/vendor/babel_runtime/helpers/applyDecs2203.js +1 -0
  126. package/dist/vendor/babel_runtime/helpers/applyDecs2203R.js +1 -0
  127. package/dist/vendor/babel_runtime/helpers/applyDecs2301.js +1 -0
  128. package/dist/vendor/babel_runtime/helpers/asyncGeneratorDelegate.js +1 -1
  129. package/dist/vendor/babel_runtime/helpers/asyncIterator.js +1 -1
  130. package/dist/vendor/babel_runtime/helpers/awaitAsyncGenerator.js +1 -1
  131. package/dist/vendor/babel_runtime/helpers/checkInRHS.js +1 -0
  132. package/dist/vendor/babel_runtime/helpers/checkPrivateRedeclaration.js +1 -0
  133. package/dist/vendor/babel_runtime/helpers/classApplyDescriptorDestructureSet.js +1 -0
  134. package/dist/vendor/babel_runtime/helpers/classApplyDescriptorGet.js +1 -0
  135. package/dist/vendor/babel_runtime/helpers/classApplyDescriptorSet.js +1 -0
  136. package/dist/vendor/babel_runtime/helpers/classCheckPrivateStaticAccess.js +1 -0
  137. package/dist/vendor/babel_runtime/helpers/classCheckPrivateStaticFieldDescriptor.js +1 -0
  138. package/dist/vendor/babel_runtime/helpers/classExtractFieldDescriptor.js +1 -0
  139. package/dist/vendor/babel_runtime/helpers/classNameTDZError.js +1 -1
  140. package/dist/vendor/babel_runtime/helpers/classPrivateFieldDestructureSet.js +1 -1
  141. package/dist/vendor/babel_runtime/helpers/classPrivateFieldGet.js +1 -1
  142. package/dist/vendor/babel_runtime/helpers/classPrivateFieldInitSpec.js +1 -0
  143. package/dist/vendor/babel_runtime/helpers/classPrivateFieldSet.js +1 -1
  144. package/dist/vendor/babel_runtime/helpers/classPrivateMethodInitSpec.js +1 -0
  145. package/dist/vendor/babel_runtime/helpers/classStaticPrivateFieldDestructureSet.js +1 -0
  146. package/dist/vendor/babel_runtime/helpers/classStaticPrivateFieldSpecGet.js +1 -1
  147. package/dist/vendor/babel_runtime/helpers/classStaticPrivateFieldSpecSet.js +1 -1
  148. package/dist/vendor/babel_runtime/helpers/classStaticPrivateMethodGet.js +1 -1
  149. package/dist/vendor/babel_runtime/helpers/construct.js +1 -1
  150. package/dist/vendor/babel_runtime/helpers/createClass.js +1 -1
  151. package/dist/vendor/babel_runtime/helpers/createForOfIteratorHelper.js +1 -1
  152. package/dist/vendor/babel_runtime/helpers/createForOfIteratorHelperLoose.js +1 -1
  153. package/dist/vendor/babel_runtime/helpers/defineAccessor.js +1 -0
  154. package/dist/vendor/babel_runtime/helpers/defineEnumerableProperties.js +1 -1
  155. package/dist/vendor/babel_runtime/helpers/defineProperty.js +1 -1
  156. package/dist/vendor/babel_runtime/helpers/extends.js +1 -1
  157. package/dist/vendor/babel_runtime/helpers/get.js +1 -1
  158. package/dist/vendor/babel_runtime/helpers/getPrototypeOf.js +1 -1
  159. package/dist/vendor/babel_runtime/helpers/identity.js +1 -0
  160. package/dist/vendor/babel_runtime/helpers/inherits.js +1 -1
  161. package/dist/vendor/babel_runtime/helpers/inheritsLoose.js +1 -1
  162. package/dist/vendor/babel_runtime/helpers/interopRequireDefault.js +1 -1
  163. package/dist/vendor/babel_runtime/helpers/interopRequireWildcard.js +1 -1
  164. package/dist/vendor/babel_runtime/helpers/isNativeReflectConstruct.js +1 -1
  165. package/dist/vendor/babel_runtime/helpers/iterableToArray.js +1 -1
  166. package/dist/vendor/babel_runtime/helpers/iterableToArrayLimit.js +1 -1
  167. package/dist/vendor/babel_runtime/helpers/iterableToArrayLimitLoose.js +1 -1
  168. package/dist/vendor/babel_runtime/helpers/objectDestructuringEmpty.js +1 -1
  169. package/dist/vendor/babel_runtime/helpers/objectSpread.js +1 -1
  170. package/dist/vendor/babel_runtime/helpers/possibleConstructorReturn.js +1 -1
  171. package/dist/vendor/babel_runtime/helpers/readOnlyError.js +1 -1
  172. package/dist/vendor/babel_runtime/helpers/regeneratorRuntime.js +1 -0
  173. package/dist/vendor/babel_runtime/helpers/set.js +1 -1
  174. package/dist/vendor/babel_runtime/helpers/setPrototypeOf.js +1 -1
  175. package/dist/vendor/babel_runtime/helpers/toPrimitive.js +1 -1
  176. package/dist/vendor/babel_runtime/helpers/toPropertyKey.js +1 -1
  177. package/dist/vendor/babel_runtime/helpers/typeof.js +1 -1
  178. package/dist/vendor/babel_runtime/helpers/wrapRegExp.js +1 -1
  179. package/dist/vendor/babel_runtime/helpers/writeOnlyError.js +1 -0
  180. package/dist/vendor/cloud-api/src/apis/apis.js +1 -1
  181. package/dist/vendor/cloud-api/src/apis/cdn/cdn.apis.js +1 -1
  182. package/dist/vendor/cloud-api/src/apis/cdn/index.js +1 -1
  183. package/dist/vendor/cloud-api/src/apis/flexdb/flexdb.apis.js +1 -1
  184. package/dist/vendor/cloud-api/src/apis/flexdb/index.js +1 -1
  185. package/dist/vendor/cloud-api/src/apis/scf/index.js +1 -1
  186. package/dist/vendor/cloud-api/src/apis/scf/scf.apis.js +1 -1
  187. package/dist/vendor/cloud-api/src/apis/ssl/index.js +1 -1
  188. package/dist/vendor/cloud-api/src/apis/ssl/ssl.apis.js +1 -1
  189. package/dist/vendor/cloud-api/src/apis/tcb/general.apis.js +1 -1
  190. package/dist/vendor/cloud-api/src/apis/tcb/index.js +1 -1
  191. package/dist/vendor/cloud-api/src/apis/tcb/tcb.apis.js +1 -1
  192. package/dist/vendor/cloud-api/src/index.js +1 -1
  193. package/dist/vendor/cloud-api/src/transaction/contracts/cdn.contracts.js +1 -1
  194. package/dist/vendor/cloud-api/src/transaction/contracts/contracts.js +1 -1
  195. package/dist/vendor/cloud-api/src/transaction/contracts/flexdb.contracts.js +1 -1
  196. package/dist/vendor/cloud-api/src/transaction/contracts/scf.contracts.js +1 -1
  197. package/dist/vendor/cloud-api/src/transaction/contracts/ssl.contracts.js +1 -1
  198. package/dist/vendor/cloud-api/src/transaction/contracts/tcb.contracts.js +1 -1
  199. package/dist/vendor/cloud-api/src/transaction/validations/cdn.validations.js +1 -1
  200. package/dist/vendor/cloud-api/src/transaction/validations/common.validations.js +1 -1
  201. package/dist/vendor/cloud-api/src/transaction/validations/flexdb.validations.js +1 -1
  202. package/dist/vendor/cloud-api/src/transaction/validations/scf.validations.js +1 -1
  203. package/dist/vendor/cloud-api/src/transaction/validations/ssl.validations.js +1 -1
  204. package/dist/vendor/cloud-api/src/transaction/validations/tcb.validations.js +1 -1
  205. package/dist/vendor/cloud-api/src/transaction/validations/validations.js +1 -1
  206. package/dist/vendor/cloud-api/src/utils/common.js +1 -1
  207. package/package.json +23 -22
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppConf=exports.resolvePath=void 0;const tslib_1=require("tslib"),path_1=(0,tslib_1.__importDefault)(require("path")),core_1=require("../../core"),common_1=require("../../core/json/common"),locales_1=(0,tslib_1.__importDefault)(require("../../utils/locales/locales"));function resolvePath(t,o){const e=path_1.default.posix.dirname(t);let s=null;return s=o.startsWith("/")?o.replace(/^\//,""):path_1.default.posix.join(e,o),s}function isPluginPath(t){return t.startsWith("plugin://")||t.startsWith("plugin-private://")}exports.resolvePath=resolvePath;class AppConf{constructor(t,o){this.graph=o,this.packages=new Map,this.pages=new Map,this.comps=new Map,this.onFileChange=(t,o)=>{},this.proxyProject=t.proxyProject,this.proxyProject.addResolver(o.resolver)}destroy(){this.proxyProject.removeResolver(this.graph.resolver)}async build(t){this.resetState(),await this.loadApp(t)}async resetState(){this.app=void 0,this.packages.clear(),this.pages.clear(),this.comps.clear(),this.sitemap=void 0,this.theme=void 0}async loadApp(t){const o=await t.run(locales_1.default.config.SUMMER_COMPILE.format("app.json"),()=>(0,core_1.getAppJSON)(this.proxyProject));this.app=o;const e=new Set;for(const t of o.pages)e.add(t);const s=o.subPackages||[];for(const t of s){const o=t.root;this.packages.set(o,t);for(const s of t.pages)e.add(path_1.default.posix.join(o,s))}await t.run(locales_1.default.config.SUMMER_COMPILE_PAGE_JSON.format(e.size),async()=>{var t;for(const[t]of e.entries())isPluginPath(t)||await this.loadPage(t);for(const t of Object.values(o.usingComponents||{}))if(!isPluginPath(t)){const o=resolvePath("app.json",t);await this.loadComp(o,t,"app.json")}if(null===(t=o.tabBar)||void 0===t?void 0:t.custom){const t=resolvePath("app.json","custom-tab-bar/index");await this.loadComp(t,"custom-tab-bar/index","app.json")}}),o.themeLocation&&await t.run(locales_1.default.config.SUMMER_COMPILE.format(o.themeLocation),()=>this.loadTheme(o.themeLocation))}async loadPage(t){const o=await(0,core_1.getPageJSON)(this.proxyProject,{miniprogramRoot:this.graph.root,pagePath:t});this.pages.set(t,o);const e=async o=>{if(isPluginPath(o))return;const e=resolvePath(t,o);await this.loadComp(e,o,t)};if(o.usingComponents)for(const t of Object.values(o.usingComponents))await e(t);if(o.componentGenerics)for(const t of Object.values(o.componentGenerics)){const o=t.default;o&&await e(o)}}async loadComp(t,o,e){if(await this.isExtendedLibComp(t,e))return;if(this.comps.has(t))return;if(!this.proxyProject.stat(this.graph.root,t+".json"))throw new Error(`[summer-compiler] Couldn't found the '${o}.json' file relative to '${e}.json'`);const s=await(0,core_1.getPageJSON)(this.proxyProject,{miniprogramRoot:this.graph.root,pagePath:t});this.comps.set(t,s);const a=async o=>{if(isPluginPath(o))return;const e=resolvePath(t,o);await this.loadComp(e,o,t)};if(s.usingComponents)for(const t of Object.values(s.usingComponents))await a(t);if(s.componentGenerics)for(const t of Object.values(s.componentGenerics)){const o=t.default;o&&await a(o)}}async loadTheme(t){const o=await(0,core_1.checkThemeJSON)(this.proxyProject,{themeLocation:t});this.theme=o}async isExtendedLibComp(t,o){if(t.startsWith("miniprogram_npm/")){const e=(0,common_1.getUseExtendLib)(this.proxyProject,o);if(e.length>0){const o=e.map(t=>"miniprogram_npm/"+t);for(const e of o)if(t.startsWith(e))return!0}}return!1}}exports.AppConf=AppConf;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppConf=exports.resolvePath=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),core_1=require("../../core"),common_1=require("../../core/json/common"),locales_1=tslib_1.__importDefault(require("../../utils/locales/locales"));function resolvePath(t,o){const e=path_1.default.posix.dirname(t);let s=null;return s=o.startsWith("/")?o.replace(/^\//,""):path_1.default.posix.join(e,o),s}function isPluginPath(t){return t.startsWith("plugin://")||t.startsWith("plugin-private://")}exports.resolvePath=resolvePath;class AppConf{constructor(t,o){this.graph=o,this.packages=new Map,this.pages=new Map,this.comps=new Map,this.onFileChange=(t,o)=>{},this.proxyProject=t.proxyProject,this.proxyProject.addResolver(o.resolver)}destroy(){this.proxyProject.removeResolver(this.graph.resolver)}async build(t){this.resetState(),await this.loadApp(t)}async resetState(){this.app=void 0,this.packages.clear(),this.pages.clear(),this.comps.clear(),this.sitemap=void 0,this.theme=void 0}async loadApp(t){const o=await t.run(locales_1.default.config.SUMMER_COMPILE.format("app.json"),()=>(0,core_1.getAppJSON)(this.proxyProject));this.app=o;const e=new Set;for(const t of o.pages)e.add(t);const s=o.subPackages||[];for(const t of s){const o=t.root;this.packages.set(o,t);for(const s of t.pages)e.add(path_1.default.posix.join(o,s))}await t.run(locales_1.default.config.SUMMER_COMPILE_PAGE_JSON.format(e.size),async()=>{var t;for(const[t]of e.entries())isPluginPath(t)||await this.loadPage(t);for(const t of Object.values(o.usingComponents||{}))if(!isPluginPath(t)){const o=resolvePath("app.json",t);await this.loadComp(o,t,"app.json")}if(null===(t=o.tabBar)||void 0===t?void 0:t.custom){const t=resolvePath("app.json","custom-tab-bar/index");await this.loadComp(t,"custom-tab-bar/index","app.json")}}),o.themeLocation&&await t.run(locales_1.default.config.SUMMER_COMPILE.format(o.themeLocation),()=>this.loadTheme(o.themeLocation))}async loadPage(t){const o=await(0,core_1.getPageJSON)(this.proxyProject,{miniprogramRoot:this.graph.root,pagePath:t});this.pages.set(t,o);const e=async o=>{if(isPluginPath(o))return;const e=resolvePath(t,o);await this.loadComp(e,o,t)};if(o.usingComponents)for(const t of Object.values(o.usingComponents))await e(t);if(o.componentGenerics)for(const t of Object.values(o.componentGenerics)){const o=t.default;o&&await e(o)}}async loadComp(t,o,e){if(await this.isExtendedLibComp(t,e))return;if(this.comps.has(t))return;if(!this.proxyProject.stat(this.graph.root,t+".json"))throw new Error(`[summer-compiler] Couldn't found the '${o}.json' file relative to '${e}.json'`);const s=await(0,core_1.getPageJSON)(this.proxyProject,{miniprogramRoot:this.graph.root,pagePath:t});this.comps.set(t,s);const a=async o=>{if(isPluginPath(o))return;const e=resolvePath(t,o);await this.loadComp(e,o,t)};if(s.usingComponents)for(const t of Object.values(s.usingComponents))await a(t);if(s.componentGenerics)for(const t of Object.values(s.componentGenerics)){const o=t.default;o&&await a(o)}}async loadTheme(t){const o=await(0,core_1.checkThemeJSON)(this.proxyProject,{themeLocation:t});this.theme=o}async isExtendedLibComp(t,o){if(t.startsWith("miniprogram_npm/")){const e=(0,common_1.getUseExtendLib)(this.proxyProject,o);if(e.length>0){const o=e.map(t=>"miniprogram_npm/"+t);for(const e of o)if(t.startsWith(e))return!0}}return!1}}exports.AppConf=AppConf;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseGraph=void 0;const tslib_1=require("tslib"),plugin_driver_1=require("../plugin_driver"),types_1=require("../types"),module_1=(0,tslib_1.__importDefault)(require("../module")),path_1=(0,tslib_1.__importDefault)(require("path")),fs_1=(0,tslib_1.__importDefault)(require("fs")),devtool_1=require("../devtool"),resolver_1=require("../resolver"),white_ext_list_1=require("../../utils/white_ext_list"),common_1=require("../../core/compile/common"),tools_1=require("../../utils/tools"),babel_helper_1=require("../../utils/babel_helper"),recorder_1=require("../recorder"),locales_1=(0,tslib_1.__importDefault)(require("../../utils/locales/locales")),lodash_1=require("lodash"),error_1=require("../error");let MiniProgramWhiteList;function getFileType(e){let t=path_1.default.extname(e);if(t.startsWith(".")){if(t=t.slice(1),t===types_1.FileType.JS)return types_1.FileType.JS;if(t===types_1.FileType.WXML)return types_1.FileType.WXML;if(t===types_1.FileType.WXSS)return types_1.FileType.WXSS;if(t===types_1.FileType.WXS)return types_1.FileType.WXS;if(t===types_1.FileType.JSON)return types_1.FileType.JSON}throw Error("unknown the filetype of "+e)}class BaseGraph{constructor(e){this.invalidated=!0,this.running=!1,this.onFileChange=(e,t)=>{t.startsWith(this.root)&&(t=t.replace(new RegExp("^"+this.root),""),this.resolver.onFileChange(e,t),"change"!==e&&"unlink"!==e||this.invalidateModules(t),this.onFileChangeForGraph(e,t))},this.type=e.type,this.root=e.root,this.rootPath=path_1.default.posix.join(e.compiler.project.projectPath,this.root),this.persistCache=e.persistCache,this.compiler=e.compiler,this.project=this.compiler.project,this.cachedModules=new Map,this.pluginDriver=new plugin_driver_1.PluginDriver(this,e),this.modulesByPath=new Map,this.resolver=new resolver_1.Resolver(this,this.root,this.pluginDriver.resolveExtConf),this.project.event.on("fileChange",this.onFileChange)}destroy(){}clearCache(){this.modulesByPath.clear()}invalidateModules(e){for(const t of this.modulesByPath.values())(t.sourcePath===e||t.depFiles.includes(e))&&this.modulesByPath.delete(t.path)}async loadModuleFromFile(e,t){var i;let o=this.modulesByPath.get(e.path);if(null==o?void 0:o.loadingPromise)return await o.loadingPromise,this.loadModuleFromFile(e,t);let r=!o||o.sourcePath!==e.source||o.independentRoot!==e.independentRoot;if(!r&&(null==o?void 0:o.error)){if(o.loadEnd+1e3>Date.now())return o;r=!0}if(r){const r=getFileType(e.path);o=new module_1.default(this,e.path,e.source,r),o.independentRoot=e.independentRoot,e.isBabelIgnore&&(null===(i=o.jsTag)||void 0===i||i.setBabelIgnore()),this.modulesByPath.set(e.path,o),o.loadingPromise=t.run(locales_1.default.config.SUMMER_COMPILING_MODULE.format(e.source),()=>this.loadSourceForModule(o)),await o.loadingPromise,o.loadingPromise=void 0}return o}async loadSourceForModule(e){var t,i;try{const o=path_1.default.posix.join(this.rootPath,e.sourcePath),r=t=>Object.assign(Object.assign({},t),{rootPath:this.rootPath,addWatchFile:t=>{const i=(0,tools_1.normalizePath)(t);if(!i.startsWith(this.rootPath))throw(0,error_1.makeSummerError)(`The file (${t}) required by ${e.sourcePath} is outside the project`,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR,e.path);e.addWatchFile(path_1.default.posix.relative(this.rootPath,i))}}),s=null!==(i=await this.pluginDriver.hookFirst("load",[e.path,o,{independentRoot:e.independentRoot,isBabelIgnore:(null===(t=e.jsTag)||void 0===t?void 0:t.isBabelIgnore)||!1}],r))&&void 0!==i?i:await this.readFile(o),a="string"==typeof s?{sourceCode:s}:s,l=await this.tranform(a,e,r);return e.setSource(l),!0}catch(t){return t.path=path_1.default.posix.join(this.root,e.sourcePath),e.setError(t),!1}}async doCompileSingleCode(e,t){const i=getFileType(e.path),o=new module_1.default(this,e.path,e.source,i);if(await this.loadSourceForModule(o),o.error)throw o.error;return o.target||(o.target=await this.generate(o.source,o)),o.toCodeFile()}async getCodeFiles(e,t,i=!0){const o={};return await Promise.all(e.map(async e=>{if(i&&!this.modulesByPath.get(e.path)&&e.path.endsWith(".js")){const t=await this.persistCache.get(this.project.projectPath,this.root,e);if(t)return console.log("use cache",e.path),o[e.path]=t,void this.loadModuleFromFile(e,recorder_1.silentRecorder)}const r=await this.loadModuleFromFile(e,t);r.error||r.target||(r.target=await this.generate(r.source,r));const s=r.toCodeFile();o[r.path]=s,!("error"in s)&&e.path.endsWith(".js")&&this.persistCache.set(this.project.projectPath,this.root,e,s)})),o}async readFile(e){return fs_1.default.promises.readFile(e,{encoding:"utf-8"})}async tranform(e,t,i){var o;return await this.pluginDriver.hookReduceArg0("transform",[e,t.path,t.sourcePath,{independentRoot:t.independentRoot,isBabelIgnore:(null===(o=t.jsTag)||void 0===o?void 0:o.isBabelIgnore)||!1}],(function(e,t){return"string"==typeof t?{sourceCode:t}:t}),i)}async generate(e,t){var i;let o=await this.pluginDriver.hookFirst("generate",[e,t.path,t.sourcePath,{independentRoot:t.independentRoot,isBabelIgnore:(null===(i=t.jsTag)||void 0===i?void 0:i.isBabelIgnore)||!1}]);return void 0===o||(0,lodash_1.isNull)(o)?{code:e.sourceCode,map:e.inputMap}:("string"==typeof o&&(o={code:o}),o)}async compile(e){const{conf:t,jsons:i}=await e.run(locales_1.default.config.SUMMER_COMPILE_JSON.format(),()=>this.compileJSON(e)),o=await this.compileCodeWithoutJSON(e);function r(e,t){return t}const s=await e.run(locales_1.default.config.SUMMER_OPTIMIZE_CODE.format(),()=>this.pluginDriver.hookReduceArg0("optimize",[o,t],r,e=>e)),a=await e.run(locales_1.default.config.SUMMER_PACK_FILES.format(),()=>this.compileOther(Object.keys(i))),l=Object.assign(Object.assign(Object.assign({},a),s),i),n=await e.run(locales_1.default.config.SUMMER_COMPRESS_PACK.format(),()=>this.pluginDriver.hookReduceArg0("compress",[l],(e,t)=>t,e=>e));return await e.run(locales_1.default.config.SUMMER_SEAL_PACK.format(),()=>this.pluginDriver.hookParallel("sealed",[n])),n}async getLocalFileList(){const e=this.getLocalCodeFileList(),t=new Set(this.resolver.allExts.map(e=>"."+e));if(!MiniProgramWhiteList){const e=await(0,white_ext_list_1.getWhiteExtList)();MiniProgramWhiteList=e.MiniProgramWhiteList}const i=this.project.getFileList(this.root,"").filter(e=>{const i=path_1.default.posix.extname(e);return MiniProgramWhiteList.has(i)&&!t.has(i)}).map(e=>e.replace(new RegExp("^"+this.root),"")),o={};for(const t of e.concat(i))o[t]={size:this.project.getFileSize(this.root,t)};return o}async compileOther(e){const t=new Set(this.resolver.allExts.map(e=>"."+e));if(t.delete(".json"),!MiniProgramWhiteList){const e=await(0,white_ext_list_1.getWhiteExtList)();MiniProgramWhiteList=e.MiniProgramWhiteList}const i=this.project.getFileList(this.root,"").filter(e=>{const i=path_1.default.posix.extname(e);return MiniProgramWhiteList.has(i)&&!t.has(i)}),o=await(0,common_1.compileOther)(this.project,i,{onProgressUpdate:()=>{}}),r={};for(const t in o){const i=path_1.default.posix.relative(this.root,t);e.includes(i)||(r[i]=o[t])}return r}async compileCodeWithoutJSON(e){var t;const i={},o=await this.getProdCode(e,{package:devtool_1.FullPkg}),r=new Set;for(const e in o){const s=o[e];if("error"in s)throw s.error;if(s.path.endsWith(".js")){((null===(t=s.jsTag)||void 0===t?void 0:t.helpers)||[]).forEach(e=>{r.add(e)}),i[e]=s.code;const o=s.map&&(0,tools_1.formatSourceMap)(s.map);o&&(i[e+".map"]=o)}else i[e]=s.code}return await e.run(locales_1.default.config.SUMMER_APPEND_BABEL_HELPERS.format(),()=>(0,babel_helper_1.appendBabelHelpers)(r,"","@babel/runtime",i)),i}isBabelSettingIgnore(e){var t;let i=!1;if(e.path.endsWith(".js")){const o=null===(t=this.compiler.getBabelSetting())||void 0===t?void 0:t.ignore;o&&(i=(0,babel_helper_1.isIgnore)(o,e.source))}return i}}exports.BaseGraph=BaseGraph;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseGraph=void 0;const tslib_1=require("tslib"),plugin_driver_1=require("../plugin_driver"),types_1=require("../types"),module_1=tslib_1.__importDefault(require("../module")),path_1=tslib_1.__importDefault(require("path")),fs_1=tslib_1.__importDefault(require("fs")),devtool_1=require("../devtool"),resolver_1=require("../resolver"),white_ext_list_1=require("../../utils/white_ext_list"),common_1=require("../../core/compile/common"),tools_1=require("../../utils/tools"),babel_helper_1=require("../../utils/babel_helper"),recorder_1=require("../recorder"),locales_1=tslib_1.__importDefault(require("../../utils/locales/locales")),lodash_1=require("lodash"),error_1=require("../error");let MiniProgramWhiteList;function getFileType(e){let t=path_1.default.extname(e);if(t.startsWith(".")){if(t=t.slice(1),t===types_1.FileType.JS)return types_1.FileType.JS;if(t===types_1.FileType.WXML)return types_1.FileType.WXML;if(t===types_1.FileType.WXSS)return types_1.FileType.WXSS;if(t===types_1.FileType.WXS)return types_1.FileType.WXS;if(t===types_1.FileType.JSON)return types_1.FileType.JSON}throw Error("unknown the filetype of "+e)}class BaseGraph{constructor(e){this.invalidated=!0,this.running=!1,this.onFileChange=(e,t)=>{t.startsWith(this.root)&&(t=t.replace(new RegExp("^"+this.root),""),this.resolver.onFileChange(e,t),"change"!==e&&"unlink"!==e||this.invalidateModules(t),this.onFileChangeForGraph(e,t))},this.type=e.type,this.root=e.root,this.rootPath=path_1.default.posix.join(e.compiler.project.projectPath,this.root),this.persistCache=e.persistCache,this.compiler=e.compiler,this.project=this.compiler.project,this.cachedModules=new Map,this.pluginDriver=new plugin_driver_1.PluginDriver(this,e),this.modulesByPath=new Map,this.resolver=new resolver_1.Resolver(this,this.root,this.pluginDriver.resolveExtConf),this.project.event.on("fileChange",this.onFileChange)}destroy(){}clearCache(){this.modulesByPath.clear()}invalidateModules(e){for(const t of this.modulesByPath.values())(t.sourcePath===e||t.depFiles.includes(e))&&this.modulesByPath.delete(t.path)}async loadModuleFromFile(e,t){var i;let o=this.modulesByPath.get(e.path);if(null==o?void 0:o.loadingPromise)return await o.loadingPromise,this.loadModuleFromFile(e,t);let r=!o||o.sourcePath!==e.source||o.independentRoot!==e.independentRoot;if(!r&&(null==o?void 0:o.error)){if(o.loadEnd+1e3>Date.now())return o;r=!0}if(r){const r=getFileType(e.path);o=new module_1.default(this,e.path,e.source,r),o.independentRoot=e.independentRoot,e.isBabelIgnore&&(null===(i=o.jsTag)||void 0===i||i.setBabelIgnore()),this.modulesByPath.set(e.path,o),o.loadingPromise=t.run(locales_1.default.config.SUMMER_COMPILING_MODULE.format(e.source),()=>this.loadSourceForModule(o)),await o.loadingPromise,o.loadingPromise=void 0}return o}async loadSourceForModule(e){var t,i;try{const o=path_1.default.posix.join(this.rootPath,e.sourcePath),r=t=>Object.assign(Object.assign({},t),{rootPath:this.rootPath,addWatchFile:t=>{const i=(0,tools_1.normalizePath)(t);if(!i.startsWith(this.rootPath))throw(0,error_1.makeSummerError)(`The file (${t}) required by ${e.sourcePath} is outside the project`,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR,e.path);e.addWatchFile(path_1.default.posix.relative(this.rootPath,i))}}),s=null!==(i=await this.pluginDriver.hookFirst("load",[e.path,o,{independentRoot:e.independentRoot,isBabelIgnore:(null===(t=e.jsTag)||void 0===t?void 0:t.isBabelIgnore)||!1}],r))&&void 0!==i?i:await this.readFile(o),a="string"==typeof s?{sourceCode:s}:s,l=await this.tranform(a,e,r);return e.setSource(l),!0}catch(t){return t.path=path_1.default.posix.join(this.root,e.sourcePath),e.setError(t),!1}}async doCompileSingleCode(e,t){const i=getFileType(e.path),o=new module_1.default(this,e.path,e.source,i);if(await this.loadSourceForModule(o),o.error)throw o.error;return o.target||(o.target=await this.generate(o.source,o)),o.toCodeFile()}async getCodeFiles(e,t,i=!0){const o={};return await Promise.all(e.map(async e=>{if(i&&!this.modulesByPath.get(e.path)&&e.path.endsWith(".js")){const t=await this.persistCache.get(this.project.projectPath,this.root,e);if(t)return console.log("use cache",e.path),o[e.path]=t,void this.loadModuleFromFile(e,recorder_1.silentRecorder)}const r=await this.loadModuleFromFile(e,t);r.error||r.target||(r.target=await this.generate(r.source,r));const s=r.toCodeFile();o[r.path]=s,!("error"in s)&&e.path.endsWith(".js")&&this.persistCache.set(this.project.projectPath,this.root,e,s)})),o}async readFile(e){return fs_1.default.promises.readFile(e,{encoding:"utf-8"})}async tranform(e,t,i){var o;return await this.pluginDriver.hookReduceArg0("transform",[e,t.path,t.sourcePath,{independentRoot:t.independentRoot,isBabelIgnore:(null===(o=t.jsTag)||void 0===o?void 0:o.isBabelIgnore)||!1}],(function(e,t){return"string"==typeof t?{sourceCode:t}:t}),i)}async generate(e,t){var i;let o=await this.pluginDriver.hookFirst("generate",[e,t.path,t.sourcePath,{independentRoot:t.independentRoot,isBabelIgnore:(null===(i=t.jsTag)||void 0===i?void 0:i.isBabelIgnore)||!1}]);return void 0===o||(0,lodash_1.isNull)(o)?{code:e.sourceCode,map:e.inputMap}:("string"==typeof o&&(o={code:o}),o)}async compile(e){const{conf:t,jsons:i}=await e.run(locales_1.default.config.SUMMER_COMPILE_JSON.format(),()=>this.compileJSON(e)),o=await this.compileCodeWithoutJSON(e);function r(e,t){return t}const s=await e.run(locales_1.default.config.SUMMER_OPTIMIZE_CODE.format(),()=>this.pluginDriver.hookReduceArg0("optimize",[o,t],r,e=>e)),a=await e.run(locales_1.default.config.SUMMER_PACK_FILES.format(),()=>this.compileOther(Object.keys(i))),l=Object.assign(Object.assign(Object.assign({},a),s),i),n=await e.run(locales_1.default.config.SUMMER_COMPRESS_PACK.format(),()=>this.pluginDriver.hookReduceArg0("compress",[l],(e,t)=>t,e=>e));return await e.run(locales_1.default.config.SUMMER_SEAL_PACK.format(),()=>this.pluginDriver.hookParallel("sealed",[n])),n}async getLocalFileList(){const e=this.getLocalCodeFileList(),t=new Set(this.resolver.allExts.map(e=>"."+e));if(!MiniProgramWhiteList){const e=await(0,white_ext_list_1.getWhiteExtList)();MiniProgramWhiteList=e.MiniProgramWhiteList}const i=this.project.getFileList(this.root,"").filter(e=>{const i=path_1.default.posix.extname(e);return MiniProgramWhiteList.has(i)&&!t.has(i)}).map(e=>e.replace(new RegExp("^"+this.root),"")),o={};for(const t of e.concat(i))o[t]={size:this.project.getFileSize(this.root,t)};return o}async compileOther(e){const t=new Set(this.resolver.allExts.map(e=>"."+e));if(t.delete(".json"),!MiniProgramWhiteList){const e=await(0,white_ext_list_1.getWhiteExtList)();MiniProgramWhiteList=e.MiniProgramWhiteList}const i=this.project.getFileList(this.root,"").filter(e=>{const i=path_1.default.posix.extname(e);return MiniProgramWhiteList.has(i)&&!t.has(i)}),o=await(0,common_1.compileOther)(this.project,i,{onProgressUpdate:()=>{}}),r={};for(const t in o){const i=path_1.default.posix.relative(this.root,t);e.includes(i)||(r[i]=o[t])}return r}async compileCodeWithoutJSON(e){var t;const i={},o=await this.getProdCode(e,{package:devtool_1.FullPkg}),r=new Set;for(const e in o){const s=o[e];if("error"in s)throw s.error;if(s.path.endsWith(".js")){((null===(t=s.jsTag)||void 0===t?void 0:t.helpers)||[]).forEach(e=>{r.add(e)}),i[e]=s.code;const o=s.map&&(0,tools_1.formatSourceMap)(s.map);o&&(i[e+".map"]=o)}else i[e]=s.code}return await e.run(locales_1.default.config.SUMMER_APPEND_BABEL_HELPERS.format(),()=>(0,babel_helper_1.appendBabelHelpers)(r,"","@babel/runtime",i)),i}isBabelSettingIgnore(e){var t;let i=!1;if(e.path.endsWith(".js")){const o=null===(t=this.compiler.getBabelSetting())||void 0===t?void 0:t.ignore;o&&(i=(0,babel_helper_1.isIgnore)(o,e.source))}return i}}exports.BaseGraph=BaseGraph;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PluginConf=exports.resolvePath=void 0;const tslib_1=require("tslib"),path_1=(0,tslib_1.__importDefault)(require("path")),core_1=require("../../core"),locales_1=(0,tslib_1.__importDefault)(require("../../utils/locales/locales"));function resolvePath(t,o){const e=path_1.default.posix.dirname(t);let s=null;return s=o.startsWith("/")?o.replace(/^\//,""):path_1.default.posix.join(e,o),s}exports.resolvePath=resolvePath;class PluginConf{constructor(t,o){this.graph=o,this.pages=new Map,this.comps=new Map,this.proxyProject=t.proxyProject,this.proxyProject.addResolver(o.resolver)}destroy(){this.proxyProject.removeResolver(this.graph.resolver)}async build(t){this.resetState(),await this.loadPlugin(t)}async resetState(){this.plugin=void 0,this.pages.clear(),this.comps.clear()}async loadPlugin(t){const o=await t.run(locales_1.default.config.SUMMER_COMPILE.format("plugin.json"),()=>(0,core_1.getPluginJSON)(this.proxyProject));this.plugin=o;const e=new Set;for(const t of Object.values(o.pages||{}))e.add(t);await t.run(locales_1.default.config.SUMMER_COMPILE_PLUGIN_PAGE_JSON.format(e.size),async()=>{for(const[t]of e.entries())await this.loadPage(t);for(const t of Object.values(o.publicComponents||{}))await this.loadComp(t);for(const t of Object.values(o.usingComponents||{}))await this.loadComp(t)})}async loadPage(t){const o=await(0,core_1.getPluginPageJSON)({project:this.proxyProject,root:this.graph.root,filePath:path_1.default.posix.join(this.graph.root,t+".json")});this.pages.set(t,o);for(const e of Object.values(o.usingComponents||{})){const o=resolvePath(t,e);await this.loadComp(o)}}async loadComp(t){if(this.comps.has(t))return;const o=await(0,core_1.getPluginPageJSON)({project:this.proxyProject,root:this.graph.root,filePath:path_1.default.posix.join(this.graph.root,t+".json")});this.comps.set(t,o);for(const e of Object.values(o.usingComponents||{})){const o=resolvePath(t,e);await this.loadComp(o)}}}exports.PluginConf=PluginConf;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PluginConf=exports.resolvePath=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),core_1=require("../../core"),locales_1=tslib_1.__importDefault(require("../../utils/locales/locales"));function resolvePath(t,o){const e=path_1.default.posix.dirname(t);let s=null;return s=o.startsWith("/")?o.replace(/^\//,""):path_1.default.posix.join(e,o),s}exports.resolvePath=resolvePath;class PluginConf{constructor(t,o){this.graph=o,this.pages=new Map,this.comps=new Map,this.proxyProject=t.proxyProject,this.proxyProject.addResolver(o.resolver)}destroy(){this.proxyProject.removeResolver(this.graph.resolver)}async build(t){this.resetState(),await this.loadPlugin(t)}async resetState(){this.plugin=void 0,this.pages.clear(),this.comps.clear()}async loadPlugin(t){const o=await t.run(locales_1.default.config.SUMMER_COMPILE.format("plugin.json"),()=>(0,core_1.getPluginJSON)(this.proxyProject));this.plugin=o;const e=new Set;for(const t of Object.values(o.pages||{}))e.add(t);await t.run(locales_1.default.config.SUMMER_COMPILE_PLUGIN_PAGE_JSON.format(e.size),async()=>{for(const[t]of e.entries())await this.loadPage(t);for(const t of Object.values(o.publicComponents||{}))await this.loadComp(t);for(const t of Object.values(o.usingComponents||{}))await this.loadComp(t)})}async loadPage(t){const o=await(0,core_1.getPluginPageJSON)({project:this.proxyProject,root:this.graph.root,filePath:path_1.default.posix.join(this.graph.root,t+".json")});this.pages.set(t,o);for(const e of Object.values(o.usingComponents||{})){const o=resolvePath(t,e);await this.loadComp(o)}}async loadComp(t){if(this.comps.has(t))return;const o=await(0,core_1.getPluginPageJSON)({project:this.proxyProject,root:this.graph.root,filePath:path_1.default.posix.join(this.graph.root,t+".json")});this.comps.set(t,o);for(const e of Object.values(o.usingComponents||{})){const o=resolvePath(t,e);await this.loadComp(o)}}}exports.PluginConf=PluginConf;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.initPlugin=void 0;const tslib_1=require("tslib"),index_1=(0,tslib_1.__importDefault)(require("./plugins/index"));function initPlugin(i,e,t){i.startsWith("summer-")&&(i=i.replace("summer-",""));const n=index_1.default.load(i);if(n)return n(e,t);throw new Error("not found plugin for "+i)}exports.initPlugin=initPlugin;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.initPlugin=void 0;const tslib_1=require("tslib"),index_1=tslib_1.__importDefault(require("./plugins/index"));function initPlugin(i,e,t){i.startsWith("summer-")&&(i=i.replace("summer-",""));const n=index_1.default.load(i);if(n)return n(e,t);throw new Error("not found plugin for "+i)}exports.initPlugin=initPlugin;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),tools_1=require("../utils/tools"),fs=(0,tslib_1.__importStar)(require("fs-extra")),path_1=(0,tslib_1.__importDefault)(require("path"));class PersistCache{constructor(e){this.cachePath=e}getFilePath(e){const t=(0,tools_1.generateMD5)(e);return{cacheFile:path_1.default.join(this.cachePath,t),infoFile:path_1.default.join(this.cachePath,t+".json")}}async get(e){const{cacheFile:t,infoFile:a}=this.getFilePath(e);try{const e=await fs.readFile(a,"utf8"),s=JSON.parse(e);return{data:await fs.readFile(t,{encoding:s.encoding||null}),info:s}}catch(e){}return{}}async set(e,t){var a;const{cacheFile:s,infoFile:i}=this.getFilePath(e);try{const e=(null===(a=t.info)||void 0===a?void 0:a.encoding)||null;await fs.writeFile(s,t.data,e),await fs.writeFile(i,JSON.stringify(t.info),"utf8")}catch(e){}}async remove(e){const{cacheFile:t,infoFile:a}=this.getFilePath(e);try{await fs.unlink(t),await fs.unlink(a)}catch(e){}}async clean(){const e=fs.readdirSync(this.cachePath);await Promise.all(e.map(async e=>{try{await fs.unlink(path_1.default.join(this.cachePath,e))}catch(e){}}))}}class FakePersistCache{async get(e){return{}}async set(e,t){}async remove(e){}async clean(){}}class LogicPersistCache{constructor(e,t){this.baseCacheKey=t,this.persistCache=e?new PersistCache(e):new FakePersistCache}updateBaseCacheKey(e){this.baseCacheKey!==e&&(this.persistCache.clean(),this.baseCacheKey=e)}getCacheKey(e){return`${e.independentRoot}|${e.source}`}async get(e,t,a){var s;const i=path_1.default.posix.join(e,t,a.path),c=path_1.default.posix.join(e,t,a.source),n=await this.persistCache.get(i);if((null===(s=n.info)||void 0===s?void 0:s.baseCacheKey)===this.baseCacheKey){if(n.info&&n.info.cacheKey===this.getCacheKey(a)){const e=fs.statSync(c);if(n.info.mtimeMs===e.mtimeMs)return console.log("use cache",a.path),JSON.parse(n.data)}}else this.persistCache.remove(i)}async set(e,t,a,s){const i=path_1.default.posix.join(e,t,a.path),c=path_1.default.posix.join(e,t,a.source),n=fs.statSync(c);this.persistCache.set(i,{info:{encoding:"utf8",cacheKey:this.getCacheKey(a),baseCacheKey:this.baseCacheKey,mtimeMs:n.mtimeMs},data:JSON.stringify(s)})}async clean(){this.persistCache.clean()}}exports.default=LogicPersistCache;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),tools_1=require("../utils/tools"),fs=tslib_1.__importStar(require("fs-extra")),path_1=tslib_1.__importDefault(require("path"));class PersistCache{constructor(e){this.cachePath=e}getFilePath(e){const t=(0,tools_1.generateMD5)(e);return{cacheFile:path_1.default.join(this.cachePath,t),infoFile:path_1.default.join(this.cachePath,t+".json")}}async get(e){const{cacheFile:t,infoFile:a}=this.getFilePath(e);try{const e=await fs.readFile(a,"utf8"),s=JSON.parse(e);return{data:await fs.readFile(t,{encoding:s.encoding||null}),info:s}}catch(e){}return{}}async set(e,t){var a;const{cacheFile:s,infoFile:i}=this.getFilePath(e);try{const e=(null===(a=t.info)||void 0===a?void 0:a.encoding)||null;await fs.writeFile(s,t.data,e),await fs.writeFile(i,JSON.stringify(t.info),"utf8")}catch(e){}}async remove(e){const{cacheFile:t,infoFile:a}=this.getFilePath(e);try{await fs.unlink(t),await fs.unlink(a)}catch(e){}}async clean(){const e=fs.readdirSync(this.cachePath);await Promise.all(e.map(async e=>{try{await fs.unlink(path_1.default.join(this.cachePath,e))}catch(e){}}))}}class FakePersistCache{async get(e){return{}}async set(e,t){}async remove(e){}async clean(){}}class LogicPersistCache{constructor(e,t){this.baseCacheKey=t,this.persistCache=e?new PersistCache(e):new FakePersistCache}updateBaseCacheKey(e){this.baseCacheKey!==e&&(this.persistCache.clean(),this.baseCacheKey=e)}getCacheKey(e){return`${e.independentRoot}|${e.source}`}async get(e,t,a){var s;const i=path_1.default.posix.join(e,t,a.path),c=path_1.default.posix.join(e,t,a.source),n=await this.persistCache.get(i);if((null===(s=n.info)||void 0===s?void 0:s.baseCacheKey)===this.baseCacheKey){if(n.info&&n.info.cacheKey===this.getCacheKey(a)){const e=fs.statSync(c);if(n.info.mtimeMs===e.mtimeMs)return console.log("use cache",a.path),JSON.parse(n.data)}}else this.persistCache.remove(i)}async set(e,t,a,s){const i=path_1.default.posix.join(e,t,a.path),c=path_1.default.posix.join(e,t,a.source),n=fs.statSync(c);this.persistCache.set(i,{info:{encoding:"utf8",cacheKey:this.getCacheKey(a),baseCacheKey:this.baseCacheKey,mtimeMs:n.mtimeMs},data:JSON.stringify(s)})}async clean(){this.persistCache.clean()}}exports.default=LogicPersistCache;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MAX_CODE_LENGTH=void 0;const tslib_1=require("tslib"),fs_extra_1=(0,tslib_1.__importDefault)(require("fs-extra")),path_1=(0,tslib_1.__importDefault)(require("path")),jsonParse_1=require("../../../utils/jsonParse"),sourcemap=()=>require("source-map");async function tryGetInputSourceMap(e,t){try{const s=/\/\/[#|@] sourceMappingURL=[\s]*(\S*)[\s]*$/m.exec(e),r=path_1.default.posix.dirname(t),a=path_1.default.posix.basename(t);let o;if(null==s?void 0:s[1])if(/\.js\.map$/.test(s[1]))o=await fs_extra_1.default.readFile(path_1.default.posix.join(r,s[1]),"utf-8");else{const e=s[1].split("base64,")[1];o=Buffer.from(e,"base64").toString()}else{const e=path_1.default.posix.join(r,a+".map");fs_extra_1.default.existsSync(e)&&(o=await fs_extra_1.default.readFile(e,"utf-8"))}if(o){const e=(0,jsonParse_1.jsonParse)(o);new(require("source-map").SourceMapConsumer)(e);return await insertSourcesContent(e,t),e}}catch(e){console.log(`try to get input sourcemap of ${t} catch error ${e}`)}}exports.MAX_CODE_LENGTH=512e3;const insertSourcesContent=async(e,t)=>{if(Array.isArray(e.sources)&&!Array.isArray(e.sourcesContent)){const s=e.sourcesContent;try{const s=path_1.default.posix.dirname(t),r=[],a=e.sources;for(const e of a){const t=await fs_extra_1.default.readFile(path_1.default.posix.join(s,e),"utf-8");r.push(t)}e.sourcesContent=r}catch(t){e.sourcesContent=s}}};function default_1(){return{name:"summer-javascript",async load(e,t){if(t.endsWith(".js")){const e=await fs_extra_1.default.readFile(t,{encoding:"utf-8"}),s=await tryGetInputSourceMap(e,t);return{sourceCode:e,inputMap:null!=s?s:void 0,astInfo:void 0,largeFile:e.length>=exports.MAX_CODE_LENGTH}}}}}exports.default=default_1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MAX_CODE_LENGTH=void 0;const tslib_1=require("tslib"),fs_extra_1=tslib_1.__importDefault(require("fs-extra")),path_1=tslib_1.__importDefault(require("path")),jsonParse_1=require("../../../utils/jsonParse"),sourcemap=()=>require("source-map");async function tryGetInputSourceMap(e,t){try{const s=/\/\/[#|@] sourceMappingURL=[\s]*(\S*)[\s]*$/m.exec(e),r=path_1.default.posix.dirname(t),a=path_1.default.posix.basename(t);let o;if(null==s?void 0:s[1])if(/\.js\.map$/.test(s[1]))o=await fs_extra_1.default.readFile(path_1.default.posix.join(r,s[1]),"utf-8");else{const e=s[1].split("base64,")[1];o=Buffer.from(e,"base64").toString()}else{const e=path_1.default.posix.join(r,a+".map");fs_extra_1.default.existsSync(e)&&(o=await fs_extra_1.default.readFile(e,"utf-8"))}if(o){const e=(0,jsonParse_1.jsonParse)(o);new(require("source-map").SourceMapConsumer)(e);return await insertSourcesContent(e,t),e}}catch(e){console.log(`try to get input sourcemap of ${t} catch error ${e}`)}}exports.MAX_CODE_LENGTH=512e3;const insertSourcesContent=async(e,t)=>{if(Array.isArray(e.sources)&&!Array.isArray(e.sourcesContent)){const s=e.sourcesContent;try{const s=path_1.default.posix.dirname(t),r=[],a=e.sources;for(const e of a){const t=await fs_extra_1.default.readFile(path_1.default.posix.join(s,e),"utf-8");r.push(t)}e.sourcesContent=r}catch(t){e.sourcesContent=s}}};function default_1(){return{name:"summer-javascript",async load(e,t){if(t.endsWith(".js")){const e=await fs_extra_1.default.readFile(t,{encoding:"utf-8"}),s=await tryGetInputSourceMap(e,t);return{sourceCode:e,inputMap:null!=s?s:void 0,astInfo:void 0,largeFile:e.length>=exports.MAX_CODE_LENGTH}}}}}exports.default=default_1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),postcss_1=(0,tslib_1.__importDefault)(require("postcss")),autoprefixer_1=(0,tslib_1.__importDefault)(require("autoprefixer")),cssnano_1=(0,tslib_1.__importDefault)(require("cssnano")),tools_1=require("../../../utils/tools"),config_1=require("../../../config"),log_1=(0,tslib_1.__importDefault)(require("../../../utils/log")),error_1=require("../../error");function default_1(e,r){const{autoPrefix:s=!0,minify:t=!0}=r||{},o=["iOS >= 8","Chrome >= 37"];return{name:"summer-wxss",async optimize(e){const r={};if(s||t)for(const i of Object.keys(e).filter(e=>e.endsWith(".wxss")))try{const u=[];s&&u.push((0,autoprefixer_1.default)({overrideBrowserslist:o,remove:!1})),t&&u.push((0,cssnano_1.default)({preset:["default",{reduceTransforms:!1,calc:!1,minifySelectors:!1,normalizeUrl:!1}]}));const l=await(0,postcss_1.default)(u).process(e[i],{from:(0,tools_1.leading)(i,"/")});r[i]=l.css.replace(/\r\n/g,"\n")}catch(e){throw log_1.default.error(e),(0,error_1.makeSummerError)(e,config_1.POST_WXSS_ERR,i)}return Object.assign(Object.assign({},e),r)}}}process.env.BROWSERSLIST=process.env.BROWSERSLIST||"iOS >= 8, Chrome >= 37",exports.default=default_1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),postcss_1=tslib_1.__importDefault(require("postcss")),autoprefixer_1=tslib_1.__importDefault(require("autoprefixer")),cssnano_1=tslib_1.__importDefault(require("cssnano")),tools_1=require("../../../utils/tools"),config_1=require("../../../config"),log_1=tslib_1.__importDefault(require("../../../utils/log")),error_1=require("../../error");function default_1(e,r){const{autoPrefix:s=!0,minify:t=!0}=r||{},o=["iOS >= 8","Chrome >= 37"];return{name:"summer-wxss",async optimize(e){const r={};if(s||t)for(const i of Object.keys(e).filter(e=>e.endsWith(".wxss")))try{const u=[];s&&u.push((0,autoprefixer_1.default)({overrideBrowserslist:o,remove:!1})),t&&u.push((0,cssnano_1.default)({preset:["default",{reduceTransforms:!1,calc:!1,minifySelectors:!1,normalizeUrl:!1}]}));const l=await(0,postcss_1.default)(u).process(e[i],{from:(0,tools_1.leading)(i,"/")});r[i]=l.css.replace(/\r\n/g,"\n")}catch(e){throw log_1.default.error(e),(0,error_1.makeSummerError)(e,config_1.POST_WXSS_ERR,i)}return Object.assign(Object.assign({},e),r)}}}process.env.BROWSERSLIST=process.env.BROWSERSLIST||"iOS >= 8, Chrome >= 37",exports.default=default_1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const types_1=require("../types"),config_1=require("../../config"),babel_helper_1=require("../../utils/babel_helper"),es6module_1=require("./base/es6module"),_transformRuntimeCustom=()=>require("../../utils/babel_transform_plugin"),_pluginTransformRuntime=()=>require("@babel/plugin-transform-runtime"),_pluginTransformWorklet=()=>require("../../utils/babel_plugin_worklet"),babel7=()=>require("@babel/core"),_presetEnv=()=>require("@babel/preset-env");function getEnhancePluginsList(e){const r=[[require("../../utils/babel_transform_plugin")],[require("@babel/plugin-transform-runtime"),{corejs:!1,helpers:!0,regenerator:!0,version:"7.12.1"}]].concat((0,babel_helper_1.getCustomPlugins)([]));return e.supportWorklet&&r.push([require("../../utils/babel_plugin_worklet")]),r}const enhance=(e,r)=>{const t=babel7(),s=e.sourceCode.includes('"worklet"')||e.sourceCode.includes("'worklet'");let o;try{const n={presets:[[require("@babel/preset-env"),{targets:{chrome:53,ios:8},modules:!1,include:["@babel/plugin-transform-computed-properties"]}]],babelrc:!1,plugins:getEnhancePluginsList({supportWorklet:s}),sourceFileName:r,inputSourceMap:!1,configFile:!1,code:!1,ast:!0,cloneInputAst:!1};if(e.astInfo){if(e.astInfo.type!==types_1.AstType.Babel)throw new Error("ast type is not babel");o=t.transformFromAstSync(e.astInfo.ast,e.sourceCode,n)}else{if(null===e.sourceCode)throw new Error("source.targetCode is null");o=babel7().transform(e.sourceCode,n)}}catch(e){const t=`file: ${r}\n ${e.message}`,s=new Error(t);throw s.code=config_1.BABEL_TRANS_JS_ERR,s}return{sourceCode:e.sourceCode,inputMap:e.inputMap,astInfo:{ast:o.ast,type:types_1.AstType.Babel}}};function default_1(e,r){return{name:"summer-enhance",workerMethods:{doTransform(e,r,t,s){const o=enhance(e,r),n=(0,es6module_1.transformES6ModuleAndGenCode)(o,r,t,s);return Object.assign(Object.assign({},o),{target:n})}},async transform(e,t,s,{independentRoot:o,isBabelIgnore:n}){if(t.endsWith(".js")&&!e.largeFile&&!n){const t=(0,es6module_1.getBabelRoot)(o);return await this.runWorkerMethod("doTransform",e,s,t,r.disableUseStrict)}return e}}}exports.default=default_1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const types_1=require("../types"),config_1=require("../../config"),babel_helper_1=require("../../utils/babel_helper"),es6module_1=require("./base/es6module"),_transformRuntimeCustom=()=>require("../../utils/babel_transform_plugin"),_pluginTransformRuntime=()=>require("@babel/plugin-transform-runtime"),_pluginTransformWorklet=()=>require("../../utils/babel_plugin_worklet"),babel7=()=>require("@babel/core"),_presetEnv=()=>require("@babel/preset-env");function getEnhancePluginsList(e){const r=[[require("../../utils/babel_transform_plugin")],[require("@babel/plugin-transform-runtime"),{corejs:!1,helpers:!0,regenerator:!0,version:"7.21.0"}]].concat((0,babel_helper_1.getCustomPlugins)([]));return e.supportWorklet&&r.push([require("../../utils/babel_plugin_worklet")]),r}const enhance=(e,r)=>{const t=babel7(),s=e.sourceCode.includes('"worklet"')||e.sourceCode.includes("'worklet'");let o;try{const n={presets:[[require("@babel/preset-env"),{targets:{chrome:53,ios:8},modules:!1,include:["@babel/plugin-transform-computed-properties"]}]],babelrc:!1,plugins:getEnhancePluginsList({supportWorklet:s}),sourceFileName:r,inputSourceMap:!1,configFile:!1,code:!1,ast:!0,cloneInputAst:!1};if(e.astInfo){if(e.astInfo.type!==types_1.AstType.Babel)throw new Error("ast type is not babel");o=t.transformFromAstSync(e.astInfo.ast,e.sourceCode,n)}else{if(null===e.sourceCode)throw new Error("source.targetCode is null");o=babel7().transform(e.sourceCode,n)}}catch(e){const t=`file: ${r}\n ${e.message}`,s=new Error(t);throw s.code=config_1.BABEL_TRANS_JS_ERR,s}return{sourceCode:e.sourceCode,inputMap:e.inputMap,astInfo:{ast:o.ast,type:types_1.AstType.Babel}}};function default_1(e,r){return{name:"summer-enhance",workerMethods:{doTransform(e,r,t,s){const o=enhance(e,r),n=(0,es6module_1.transformES6ModuleAndGenCode)(o,r,t,s);return Object.assign(Object.assign({},o),{target:n})}},async transform(e,t,s,{independentRoot:o,isBabelIgnore:n}){if(t.endsWith(".js")&&!e.largeFile&&!n){const t=(0,es6module_1.getBabelRoot)(o);return await this.runWorkerMethod("doTransform",e,s,t,r.disableUseStrict)}return e}}}exports.default=default_1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importWxssCssReg=exports.importWxssReg=void 0;const tslib_1=require("tslib"),fs_extra_1=(0,tslib_1.__importDefault)(require("fs-extra")),path_1=(0,tslib_1.__importDefault)(require("path")),error_1=require("../error"),less=()=>require("less");function default_1(s,e){return{name:"summer-less",resolveExt:{wxss:"less"},async load(r,t){var o;if(t.endsWith(".less")){let r=await fs_extra_1.default.readFile(t,"utf-8");const a=[];r=r.replace(exports.importWxssReg,(s,e,r)=>(a.push(r),s.replace(r,r+"?css")));try{const i=await require("less").render(r,{sourceMap:{outputSourceFiles:!0},paths:this.rootPath?[this.rootPath]:[],filename:t,globalVars:null!==(o=null==e?void 0:e.globalVars)&&void 0!==o?o:{}}),l=i.css.replace(exports.importWxssCssReg,(s,e,r)=>{const t=r.slice(0,-4);return a.includes(t)?s.replace(r,t):s});if(i.imports.length)for(const s of i.imports)this.addWatchFile(s);let p=void 0;return i.map&&(p=JSON.parse(i.map),p.sources=p.sources.map(e=>path_1.default.posix.relative(s,e))),{sourceCode:l,inputMap:p}}catch(s){throw(0,error_1.makeSummerError)(s,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR)}}}}}exports.importWxssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.wxss)\1(?:\s*);/g,exports.importWxssCssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.wxss\?css)\1(?:\s*);/g,exports.default=default_1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.importWxssCssReg=exports.importWxssReg=void 0;const tslib_1=require("tslib"),fs_extra_1=tslib_1.__importDefault(require("fs-extra")),path_1=tslib_1.__importDefault(require("path")),error_1=require("../error"),less=()=>require("less");function default_1(s,e){return{name:"summer-less",resolveExt:{wxss:"less"},async load(r,t){var o;if(t.endsWith(".less")){let r=await fs_extra_1.default.readFile(t,"utf-8");const a=[];r=r.replace(exports.importWxssReg,(s,e,r)=>(a.push(r),s.replace(r,r+"?css")));try{const i=await require("less").render(r,{sourceMap:{outputSourceFiles:!0},paths:this.rootPath?[this.rootPath]:[],filename:t,globalVars:null!==(o=null==e?void 0:e.globalVars)&&void 0!==o?o:{}}),l=i.css.replace(exports.importWxssCssReg,(s,e,r)=>{const t=r.slice(0,-4);return a.includes(t)?s.replace(r,t):s});if(i.imports.length)for(const s of i.imports)this.addWatchFile(s);let p=void 0;return i.map&&(p=JSON.parse(i.map),p.sources=p.sources.map(e=>path_1.default.posix.relative(s,e))),{sourceCode:l,inputMap:p}}catch(s){throw(0,error_1.makeSummerError)(s,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR)}}}}}exports.importWxssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.wxss)\1(?:\s*);/g,exports.importWxssCssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.wxss\?css)\1(?:\s*);/g,exports.default=default_1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),config_1=require("../../config"),log_1=(0,tslib_1.__importDefault)(require("../../utils/log")),error_1=require("../error"),minifyWXMLMod=require("../../core/worker_thread/task/minifywxml"),{generateWXMLFromTokens:generateWXMLFromTokens,Tokenizer:Tokenizer}=minifyWXMLMod;function default_1(e,r){const{minify:o=!0}=r||{};return{name:"summer-minifywxml",workerMethods:{async doCompress(e,r){try{const o=new Tokenizer(e.replace(/\r\n/g,"\n"),r),t=[],n=o.generateTokens(t);if(0!==n)throw new Error("minifywxml tokenizer error ret: "+n);return generateWXMLFromTokens(t)}catch(e){throw log_1.default.error(e),(0,error_1.makeSummerError)(e.msg,config_1.MINIFY_WXML_ERR,r)}}},async compress(e){const r={};if(o){const o=Object.keys(e).filter(e=>e.endsWith(".wxml"));await Promise.all(o.map(async o=>{const t=e[o];if(t&&t.length>0){const t=await this.runWorkerMethod("doCompress",e[o],o);r[o]=t}}))}return Object.assign(Object.assign({},e),r)}}}exports.default=default_1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),config_1=require("../../config"),log_1=tslib_1.__importDefault(require("../../utils/log")),error_1=require("../error"),minifyWXMLMod=require("../../core/worker_thread/task/minifywxml"),{generateWXMLFromTokens:generateWXMLFromTokens,Tokenizer:Tokenizer}=minifyWXMLMod;function default_1(e,r){const{minify:o=!0}=r||{};return{name:"summer-minifywxml",workerMethods:{async doCompress(e,r){try{const o=new Tokenizer(e.replace(/\r\n/g,"\n"),r),t=[],n=o.generateTokens(t);if(0!==n)throw new Error("minifywxml tokenizer error ret: "+n);return generateWXMLFromTokens(t)}catch(e){throw log_1.default.error(e),(0,error_1.makeSummerError)(e.msg,config_1.MINIFY_WXML_ERR,r)}}},async compress(e){const r={};if(o){const o=Object.keys(e).filter(e=>e.endsWith(".wxml"));await Promise.all(o.map(async o=>{const t=e[o];if(t&&t.length>0){const t=await this.runWorkerMethod("doCompress",e[o],o);r[o]=t}}))}return Object.assign(Object.assign({},e),r)}}}exports.default=default_1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.random=void 0;const tslib_1=require("tslib"),tools_1=require("../../utils/tools"),error_1=require("../error"),fs_extra_1=(0,tslib_1.__importDefault)(require("fs-extra")),path_1=(0,tslib_1.__importDefault)(require("path")),sass=()=>require("sass");function random(){return(0,tools_1.generateMD5)(`${Math.random()}${Date.now()}`)}exports.random=random;const importWxssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.wxss)\1(?:\s*);/g,importCssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.css)\1(?:\s*);/g;function default_1(s){return{name:"summer-sass",resolveExt:{wxss:["sass","scss"]},async load(e,r){if(r.endsWith(".scss")||r.endsWith(".sass")){let e=await fs_extra_1.default.readFile(r,"utf-8");const t=[];e=e.replace(importWxssReg,(s,e,r)=>(t.push(r),s.replace(r,r.slice(0,-4)+"css")));const o=path_1.default.posix.dirname(path_1.default.relative(s,r));return new Promise((s,a)=>{require("sass").render({file:r,data:e,sourceMap:!0,sourceMapContents:!0,omitSourceMapUrl:!0,outFile:r.slice(0,-5)+".wxss",includePaths:this.rootPath?[this.rootPath]:[]},(e,i)=>{if(e){const s=(0,error_1.makeSummerError)(e,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR);return void a(s)}if(!i)return void a(new Error("no result"));const n=i.css.toString("utf-8").replace(importCssReg,(s,e,r)=>{const o=r.slice(0,-3)+"wxss";return t.includes(o)?s.replace(r,o):s});if(i.stats.includedFiles.length>0)for(const s of i.stats.includedFiles)s!==r&&this.addWatchFile(s);const u=i.map?JSON.parse(i.map.toString("utf-8")):void 0;u&&(u.sourceRoot=o),s({sourceCode:n,inputMap:u})})})}}}}exports.default=default_1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.random=void 0;const tslib_1=require("tslib"),tools_1=require("../../utils/tools"),error_1=require("../error"),fs_extra_1=tslib_1.__importDefault(require("fs-extra")),path_1=tslib_1.__importDefault(require("path")),sass=()=>require("sass");function random(){return(0,tools_1.generateMD5)(`${Math.random()}${Date.now()}`)}exports.random=random;const importWxssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.wxss)\1(?:\s*);/g,importCssReg=/(?:^|\s)?(?:@import)(?:\s*)?(["'])([^"']+.css)\1(?:\s*);/g;function default_1(s){return{name:"summer-sass",resolveExt:{wxss:["sass","scss"]},async load(e,r){if(r.endsWith(".scss")||r.endsWith(".sass")){let e=await fs_extra_1.default.readFile(r,"utf-8");const t=[];e=e.replace(importWxssReg,(s,e,r)=>(t.push(r),s.replace(r,r.slice(0,-4)+"css")));const o=path_1.default.posix.dirname(path_1.default.relative(s,r));return new Promise((s,a)=>{require("sass").render({file:r,data:e,sourceMap:!0,sourceMapContents:!0,omitSourceMapUrl:!0,outFile:r.slice(0,-5)+".wxss",includePaths:this.rootPath?[this.rootPath]:[]},(e,i)=>{if(e){const s=(0,error_1.makeSummerError)(e,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR);return void a(s)}if(!i)return void a(new Error("no result"));const n=i.css.toString("utf-8").replace(importCssReg,(s,e,r)=>{const o=r.slice(0,-3)+"wxss";return t.includes(o)?s.replace(r,o):s});if(i.stats.includedFiles.length>0)for(const s of i.stats.includedFiles)s!==r&&this.addWatchFile(s);const u=i.map?JSON.parse(i.map.toString("utf-8")):void 0;u&&(u.sourceRoot=o),s({sourceCode:n,inputMap:u})})})}}}}exports.default=default_1;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),types_1=require("../types"),fs_1=(0,tslib_1.__importDefault)(require("fs")),error_1=require("../error"),babel7=()=>require("@babel/core"),pluginTransformTypescript=()=>require("@babel/plugin-transform-typescript"),pluginReplaceTsExportAssignment=e=>{const r=e.template("\n module.exports = ASSIGNMENT;\n ");return{name:"replace-ts-export-assignment",visitor:{TSExportAssignment(e){e.replaceWith(r({ASSIGNMENT:e.node.expression}))}}}},pluginReplaceTsImportEqualsDeclaration=e=>{const r=e.template("\n const ID = require(SOURCE);\n ");return{name:"replace-ts-import-equals-declaration",visitor:{TSImportEqualsDeclaration(e){e.replaceWith(r({ID:e.node.id,SOURCE:e.node.moduleReference.expression}))}}}};function default_1(){return{name:"summer-typescript",resolveExt:{js:"ts"},workerMethods:{doTransform(e,r){let t;try{t=require("@babel/core").transform(e,{babelrc:!1,plugins:[[pluginReplaceTsImportEqualsDeclaration,{}],[pluginReplaceTsExportAssignment,{}],[require("@babel/plugin-transform-typescript"),{}]],sourceFileName:r,sourceMaps:!1,ast:!0,configFile:!1,code:!1})}catch(e){throw(0,error_1.makeSummerError)(e,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR,r)}return{sourceCode:e,inputMap:void 0,astInfo:{ast:t.ast,type:types_1.AstType.Babel}}}},async load(e,r){if(r.endsWith(".ts")){const e=fs_1.default.readFileSync(r,{encoding:"utf-8"});return await this.runWorkerMethod("doTransform",e,r)}}}}exports.default=default_1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),types_1=require("../types"),fs_1=tslib_1.__importDefault(require("fs")),error_1=require("../error"),babel7=()=>require("@babel/core"),pluginTransformTypescript=()=>require("@babel/plugin-transform-typescript"),pluginReplaceTsExportAssignment=e=>{const r=e.template("\n module.exports = ASSIGNMENT;\n ");return{name:"replace-ts-export-assignment",visitor:{TSExportAssignment(e){e.replaceWith(r({ASSIGNMENT:e.node.expression}))}}}},pluginReplaceTsImportEqualsDeclaration=e=>{const r=e.template("\n const ID = require(SOURCE);\n ");return{name:"replace-ts-import-equals-declaration",visitor:{TSImportEqualsDeclaration(e){e.replaceWith(r({ID:e.node.id,SOURCE:e.node.moduleReference.expression}))}}}};function default_1(){return{name:"summer-typescript",resolveExt:{js:"ts"},workerMethods:{doTransform(e,r){let t;try{t=require("@babel/core").transform(e,{babelrc:!1,plugins:[[pluginReplaceTsImportEqualsDeclaration,{}],[pluginReplaceTsExportAssignment,{}],[require("@babel/plugin-transform-typescript"),{}]],sourceFileName:r,sourceMaps:!1,ast:!0,configFile:!1,code:!1})}catch(e){throw(0,error_1.makeSummerError)(e,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR,r)}return{sourceCode:e,inputMap:void 0,astInfo:{ast:t.ast,type:types_1.AstType.Babel}}}},async load(e,r){if(r.endsWith(".ts")){const e=fs_1.default.readFileSync(r,{encoding:"utf-8"});return await this.runWorkerMethod("doTransform",e,r)}}}}exports.default=default_1;
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Project=void 0;const tslib_1=require("tslib"),path_1=(0,tslib_1.__importDefault)(require("path")),fs_1=(0,tslib_1.__importDefault)(require("fs")),tools_1=require("../utils/tools"),events_1=(0,tslib_1.__importDefault)(require("events"));class Project{constructor(t,e,i,r){this.projectPath=t,this._dirSet=new Set,this._fileSet=new Set,this.type="miniProgram",this.privateKey="",this.event=new events_1.default,this.updateOptions(r),this._fileSet=new Set(e.filter(t=>!this.isIgnore(t))),this._dirSet=new Set(i)}getFilesAndDirs(){return{files:Array.from(this._fileSet),dirs:Array.from(this._dirSet)}}async attr(){return this._attr}updateOptions(t){this.appid=t.appid,this._attr=t.attr,this.updateType(t.attr,t.compileType),this.miniprogramRoot=t.miniprogramRoot,this.pluginRoot=t.pluginRoot}updateType(t,e){if(null==t?void 0:t.gameApp)return"miniGamePlugin"===e?void(this.type="miniGamePlugin"):void(this.type="miniGame");this.type=e}getExtAppid(){throw new Error("Method not implemented.")}updateFiles(){throw new Error("Method not implemented.")}isIgnore(t){return t.endsWith(".d.ts")}cacheDirName(t){this._dirSet.has(t)||(this._dirSet.add(t),this.cacheDirName(path_1.default.posix.dirname(t)))}getTargetPath(t,e){return(0,tools_1.normalizePath)(path_1.default.posix.join(t,e)).replace(/\/$/,"").replace(/^\//,"")}stat(t,e){const i=this.getTargetPath(t,e);return this._fileSet.has(i)?{isFile:!0,isDirectory:!1}:this._dirSet.has(i)?{isFile:!1,isDirectory:!0}:void 0}getFileSize(t,e){const i=this.getTargetPath(t,e),r=(0,tools_1.normalizePath)(path_1.default.posix.join(this.projectPath,i));return fs_1.default.statSync(r).size}getFile(t,e){const i=this.getTargetPath(t,e),r=(0,tools_1.normalizePath)(path_1.default.posix.join(this.projectPath,i));return fs_1.default.readFileSync(r,null)}getJson(t,e){const i=this.getFile(t,e).toString("utf-8");try{return JSON.parse(i)}catch(i){throw new Error("JSON parse failed: "+this.getTargetPath(t,e))}}getFileList(t,e=""){return Array.from(this._fileSet).filter(i=>(!e||path_1.default.posix.extname(i)===e)&&(!t||0===i.indexOf(t)))}onFileChange(t,e){if("add"!==t&&"addDir"!==t||(this.cacheDirName(path_1.default.posix.dirname(e)),this.isIgnore(e)||this._fileSet.add(e)),"addDir"===t&&this.cacheDirName(e),"unlink"===t&&this._fileSet.has(e)&&this._fileSet.delete(e),"unlinkDir"===t&&this._dirSet.has(e)){this._dirSet.delete(e);const t=e+"/",i=Array.from(this._dirSet);for(const e of i)0===e.indexOf(t)&&this._dirSet.delete(e);const r=Array.from(this._fileSet);for(const e of r)0===e.indexOf(t)&&this._fileSet.delete(e)}this.event.emit("fileChange",t,e)}}exports.Project=Project;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Project=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),fs_1=tslib_1.__importDefault(require("fs")),tools_1=require("../utils/tools"),events_1=tslib_1.__importDefault(require("events"));class Project{constructor(t,e,i,r){this.projectPath=t,this._dirSet=new Set,this._fileSet=new Set,this.type="miniProgram",this.privateKey="",this.event=new events_1.default,this.updateOptions(r),this._fileSet=new Set(e.filter(t=>!this.isIgnore(t))),this._dirSet=new Set(i)}getFilesAndDirs(){return{files:Array.from(this._fileSet),dirs:Array.from(this._dirSet)}}async attr(){return this._attr}updateOptions(t){this.appid=t.appid,this._attr=t.attr,this.updateType(t.attr,t.compileType),this.miniprogramRoot=t.miniprogramRoot,this.pluginRoot=t.pluginRoot}updateType(t,e){if(null==t?void 0:t.gameApp)return"miniGamePlugin"===e?void(this.type="miniGamePlugin"):void(this.type="miniGame");this.type=e}getExtAppid(){throw new Error("Method not implemented.")}updateFiles(){throw new Error("Method not implemented.")}isIgnore(t){return t.endsWith(".d.ts")}cacheDirName(t){this._dirSet.has(t)||(this._dirSet.add(t),this.cacheDirName(path_1.default.posix.dirname(t)))}getTargetPath(t,e){return(0,tools_1.normalizePath)(path_1.default.posix.join(t,e)).replace(/\/$/,"").replace(/^\//,"")}stat(t,e){const i=this.getTargetPath(t,e);return this._fileSet.has(i)?{isFile:!0,isDirectory:!1}:this._dirSet.has(i)?{isFile:!1,isDirectory:!0}:void 0}getFileSize(t,e){const i=this.getTargetPath(t,e),r=(0,tools_1.normalizePath)(path_1.default.posix.join(this.projectPath,i));return fs_1.default.statSync(r).size}getFile(t,e){const i=this.getTargetPath(t,e),r=(0,tools_1.normalizePath)(path_1.default.posix.join(this.projectPath,i));return fs_1.default.readFileSync(r,null)}getJson(t,e){const i=this.getFile(t,e).toString("utf-8");try{return JSON.parse(i)}catch(i){throw new Error("JSON parse failed: "+this.getTargetPath(t,e))}}getFileList(t,e=""){return Array.from(this._fileSet).filter(i=>(!e||path_1.default.posix.extname(i)===e)&&(!t||0===i.indexOf(t)))}onFileChange(t,e){if("add"!==t&&"addDir"!==t||(this.cacheDirName(path_1.default.posix.dirname(e)),this.isIgnore(e)||this._fileSet.add(e)),"addDir"===t&&this.cacheDirName(e),"unlink"===t&&this._fileSet.has(e)&&this._fileSet.delete(e),"unlinkDir"===t&&this._dirSet.has(e)){this._dirSet.delete(e);const t=e+"/",i=Array.from(this._dirSet);for(const e of i)0===e.indexOf(t)&&this._dirSet.delete(e);const r=Array.from(this._fileSet);for(const e of r)0===e.indexOf(t)&&this._fileSet.delete(e)}this.event.emit("fileChange",t,e)}}exports.Project=Project;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Resolver=void 0;const tslib_1=require("tslib"),path_1=(0,tslib_1.__importDefault)(require("path")),targetCodeExts=["json","wxml","wxss","js","wxs"];function getAllExts(t){const e=[];for(const s of targetCodeExts)for(const o of t[s])e.includes(o)||e.push(o);return e}function getExtToTarget(t){const e={};for(const s of targetCodeExts){const o=[];for(const i of t[s])e[i]=e[i]||{},e[i][s]=[...o],o.push(i)}return e}class Resolver{constructor(t,e,s){this.graph=t,this.root=e,this.extConf=s,this.fileSet=new Set,this.resolveInfoMap=new Map,this.onFileChange=(t,e)=>{var s;if(this.isCodeFile(e)&&("unlink"===t||"add"===t))if("add"===t)this.updateFile(e);else{const t=this.getExt(e),o=this.resolve(e);for(const e of o){const o=this.getExt(e.path);this.resolveInfoMap.delete(e.path);for(const i of this.extToTarget[t][o]){const t=e.path.slice(0,e.path.length-o.length)+i;if(null===(s=this.graph.project.stat(this.root,t))||void 0===s?void 0:s.isFile){this.updateFile(t);break}}}}},this.allExts=getAllExts(s),this.extToTarget=getExtToTarget(s),this.updateFiles()}updateFiles(){const t=this.graph.project.getFileList(this.root).map(t=>t.replace(new RegExp("^"+this.root),""));for(const e of t){const t=this.getExt(e);this.allExts.includes(t)&&(this.fileSet.add(e),this.updateFile(e))}}resolve(t){const e=[];if(this.isCodeFile(t))for(const s of this.resolveInfoMap.values())s.source===t&&e.push(s);return e}stat(t){return this.resolveInfoMap.has(t)?{isFile:!0,isDirectory:!1}:void 0}isCodeFile(t){const e=path_1.default.extname(t).replace(/^./,"");return this.allExts.includes(e)}getExt(t){return path_1.default.extname(t).replace(/^./,"")}updateFile(t){if(t.endsWith(".d.ts"))return;const e=this.getExt(t);for(const s of targetCodeExts)if(this.extToTarget[e][s]){const o=t.substr(0,t.length-e.length)+s,i=this.resolveInfoMap.get(o);if(i){if(!this.extToTarget[e][s].includes(i.sourceExt))continue}this.resolveInfoMap.set(o,{path:o,source:t,sourceExt:e})}}}exports.Resolver=Resolver;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Resolver=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),targetCodeExts=["json","wxml","wxss","js","wxs"];function getAllExts(t){const e=[];for(const s of targetCodeExts)for(const o of t[s])e.includes(o)||e.push(o);return e}function getExtToTarget(t){const e={};for(const s of targetCodeExts){const o=[];for(const i of t[s])e[i]=e[i]||{},e[i][s]=[...o],o.push(i)}return e}class Resolver{constructor(t,e,s){this.graph=t,this.root=e,this.extConf=s,this.fileSet=new Set,this.resolveInfoMap=new Map,this.onFileChange=(t,e)=>{var s;if(this.isCodeFile(e)&&("unlink"===t||"add"===t))if("add"===t)this.updateFile(e);else{const t=this.getExt(e),o=this.resolve(e);for(const e of o){const o=this.getExt(e.path);this.resolveInfoMap.delete(e.path);for(const i of this.extToTarget[t][o]){const t=e.path.slice(0,e.path.length-o.length)+i;if(null===(s=this.graph.project.stat(this.root,t))||void 0===s?void 0:s.isFile){this.updateFile(t);break}}}}},this.allExts=getAllExts(s),this.extToTarget=getExtToTarget(s),this.updateFiles()}updateFiles(){const t=this.graph.project.getFileList(this.root).map(t=>t.replace(new RegExp("^"+this.root),""));for(const e of t){const t=this.getExt(e);this.allExts.includes(t)&&(this.fileSet.add(e),this.updateFile(e))}}resolve(t){const e=[];if(this.isCodeFile(t))for(const s of this.resolveInfoMap.values())s.source===t&&e.push(s);return e}stat(t){return this.resolveInfoMap.has(t)?{isFile:!0,isDirectory:!1}:void 0}isCodeFile(t){const e=path_1.default.extname(t).replace(/^./,"");return this.allExts.includes(e)}getExt(t){return path_1.default.extname(t).replace(/^./,"")}updateFile(t){if(t.endsWith(".d.ts"))return;const e=this.getExt(t);for(const s of targetCodeExts)if(this.extToTarget[e][s]){const o=t.substr(0,t.length-e.length)+s,i=this.resolveInfoMap.get(o);if(i){if(!this.extToTarget[e][s].includes(i.sourceExt))continue}this.resolveInfoMap.set(o,{path:o,source:t,sourceExt:e})}}}exports.Resolver=Resolver;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SummerCompiler=void 0;const tslib_1=require("tslib"),plugingraph_1=require("./graph/plugingraph"),appgraph_1=require("./graph/appgraph"),path_1=(0,tslib_1.__importDefault)(require("path")),reactiveCache_1=require("../core/json/reactiveCache"),initPlugin_1=require("./initPlugin"),lodash_1=require("lodash"),locales_1=(0,tslib_1.__importDefault)(require("../utils/locales/locales")),plugin_driver_1=require("./plugin_driver"),persist_cache_1=(0,tslib_1.__importDefault)(require("./persist_cache")),tools_1=require("../utils/tools");let proxyProject;function initProxyProjectForJSON(t){if(proxyProject&&proxyProject.projectPath!==t.projectPath&&(proxyProject.clearResolver(),proxyProject=void 0),!proxyProject){let e={};function i(i,r){const o=t.stat(i,r);if(o)return o;const p=t.getTargetPath(i,r);for(const t in e)if(p.startsWith(t))return e[t].stat(path_1.default.posix.relative(t,p))}proxyProject=new Proxy(t,{get:(t,e,r)=>"stat"===e?i:Reflect.get(t,e,r)}),proxyProject.addResolver=t=>{(0,reactiveCache_1.cleanReactiveCache)(),e[t.root]=t},proxyProject.removeResolver=t=>{(0,reactiveCache_1.cleanReactiveCache)(),delete e[t.root]},proxyProject.clearResolver=()=>{e={},(0,reactiveCache_1.cleanReactiveCache)()}}return proxyProject}function getCacheBaseKey(t){const i=`${t.miniprogramRoot}|${t.pluginRoot}|${t.summerPlugins.join(",")}`;return(0,tools_1.generateMD5)(i)}class SummerCompiler{constructor(t,i,e){this.project=t,this.cachePath=i,this.options=e,this.proxyProject=initProxyProjectForJSON(t),this.projectPath=t.projectPath,this.persistCache=new persist_cache_1.default(i,getCacheBaseKey(e)),this.initPlugins(),this.initAppGraph(),"miniProgramPlugin"===this.options.compileType&&this.initPluginGraph()}getBabelSetting(){return this.options.babelSetting}initPlugins(){this.plugins=this.options.summerPlugins.map(t=>{let i,e={};return"string"==typeof t?i=t:(i=t[0],e=t[1]),(0,initPlugin_1.initPlugin)(i,this.project.projectPath,e)})}initAppGraph(){this.appGraph=new appgraph_1.AppGraph({type:"miniprogram",root:this.project.miniprogramRoot,persistCache:this.persistCache,plugins:this.plugins,compiler:this})}initPluginGraph(){this.pluginGraph=new plugingraph_1.PluginGraph({type:"plugin",root:this.project.pluginRoot,persistCache:this.persistCache,plugins:this.plugins,compiler:this})}updateOptions(t){var i,e;const r=this.options;if(this.options=t,this.persistCache.updateBaseCacheKey(getCacheBaseKey(t)),!(0,lodash_1.isEqual)(t.babelSetting,r.babelSetting)||!(0,lodash_1.isEqual)(this.options.summerPlugins,r.summerPlugins))return this.initPlugins(),this.appGraph.destroy(),null===(i=this.pluginGraph)||void 0===i||i.destroy(),this.initAppGraph(),void("miniProgramPlugin"===this.options.compileType&&this.initPluginGraph());this.options.compileType!==r.compileType&&("miniProgramPlugin"===this.options.compileType?this.initPluginGraph():(null===(e=this.pluginGraph)||void 0===e||e.destroy(),this.pluginGraph=void 0)),this.appGraph.root!==this.project.miniprogramRoot&&(this.appGraph.destroy(),this.initAppGraph()),this.pluginGraph&&this.pluginGraph.root!==this.project.pluginRoot&&(this.pluginGraph.destroy(),this.initPluginGraph())}destroy(){var t;this.appGraph.destroy(),null===(t=this.pluginGraph)||void 0===t||t.destroy(),this.proxyProject.clearResolver()}getStatus(){const t=(0,plugin_driver_1.genResovleExtConf)(this.plugins),i={},e=new Set;for(const r of["json","js","wxml","wxss","wxs"])i[r]={exts:t[r].reverse()},t[r].forEach(t=>{e.add(t)});return{codeExts:Array.from(e.keys()),codeConf:i}}clearCache(){var t;this.appGraph.clearCache(),null===(t=this.pluginGraph)||void 0===t||t.clearCache(),this.persistCache.clean(),(0,reactiveCache_1.cleanReactiveCache)()}async getConf({graphId:t},i){if("miniprogram"===t){return await this.appGraph.getConf(i)}if("plugin"===t){return await this.pluginGraph.getConf(i)}throw new Error("no support getConf for "+t)}async getCode(t,i){if("miniprogram"===t.graphId){return await this.appGraph.getDevCode(i,{package:t.package})}if("plugin"===t.graphId){return await this.pluginGraph.getDevCode(i)}throw new Error("no support getCode for "+t.graphId)}async getLocalFileList(t){if("miniprogram"===t)return await this.appGraph.getLocalFileList();if("plugin"===t)return await this.pluginGraph.getLocalFileList();throw new Error("no support getCode for "+t)}async compileSingleCode(t,i){if("miniprogram"===t.graphId){return await this.appGraph.compileSingleCode(t.filePath,t.sourceCode)}if("plugin"===t.graphId){return await this.pluginGraph.compileSingleCode(t.filePath,t.sourceCode)}throw new Error("no support getCode for "+t.graphId)}async compile(t,i){const e=await i.run(locales_1.default.config.SUMMER_COMPILE_MINIPROGRAM.format(),()=>this.appGraph.compile(i));if("miniProgram"===this.project.type)return e["project.config.json"]=JSON.stringify({miniprogramRoot:"",__compileDebugInfo__:{useSummer:!0}}),e;if("miniProgramPlugin"===this.project.type){const t={},r=await(await i.run(locales_1.default.config.SUMMER_COMPILE_PLUGIN.format(),()=>this.pluginGraph.compile(i)));return Object.keys(e).forEach(i=>{t[path_1.default.posix.join(this.project.miniprogramRoot,i)]=e[i]}),Object.keys(r).forEach(i=>{t[path_1.default.posix.join(this.project.pluginRoot,i)]=r[i]}),t["project.config.json"]=JSON.stringify({miniprogramRoot:this.project.miniprogramRoot,pluginRoot:this.project.pluginRoot,__compileDebugInfo__:{useSummer:!0}}),t}throw new Error("no support compile for "+this.project.type)}}exports.SummerCompiler=SummerCompiler;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SummerCompiler=void 0;const tslib_1=require("tslib"),plugingraph_1=require("./graph/plugingraph"),appgraph_1=require("./graph/appgraph"),path_1=tslib_1.__importDefault(require("path")),reactiveCache_1=require("../core/json/reactiveCache"),initPlugin_1=require("./initPlugin"),lodash_1=require("lodash"),locales_1=tslib_1.__importDefault(require("../utils/locales/locales")),plugin_driver_1=require("./plugin_driver"),persist_cache_1=tslib_1.__importDefault(require("./persist_cache")),tools_1=require("../utils/tools");let proxyProject;function initProxyProjectForJSON(t){if(proxyProject&&proxyProject.projectPath!==t.projectPath&&(proxyProject.clearResolver(),proxyProject=void 0),!proxyProject){let e={};function i(i,r){const o=t.stat(i,r);if(o)return o;const p=t.getTargetPath(i,r);for(const t in e)if(p.startsWith(t))return e[t].stat(path_1.default.posix.relative(t,p))}proxyProject=new Proxy(t,{get:(t,e,r)=>"stat"===e?i:Reflect.get(t,e,r)}),proxyProject.addResolver=t=>{(0,reactiveCache_1.cleanReactiveCache)(),e[t.root]=t},proxyProject.removeResolver=t=>{(0,reactiveCache_1.cleanReactiveCache)(),delete e[t.root]},proxyProject.clearResolver=()=>{e={},(0,reactiveCache_1.cleanReactiveCache)()}}return proxyProject}function getCacheBaseKey(t){const i=`${t.miniprogramRoot}|${t.pluginRoot}|${t.summerPlugins.join(",")}`;return(0,tools_1.generateMD5)(i)}class SummerCompiler{constructor(t,i,e){this.project=t,this.cachePath=i,this.options=e,this.proxyProject=initProxyProjectForJSON(t),this.projectPath=t.projectPath,this.persistCache=new persist_cache_1.default(i,getCacheBaseKey(e)),this.initPlugins(),this.initAppGraph(),"miniProgramPlugin"===this.options.compileType&&this.initPluginGraph()}getBabelSetting(){return this.options.babelSetting}initPlugins(){this.plugins=this.options.summerPlugins.map(t=>{let i,e={};return"string"==typeof t?i=t:(i=t[0],e=t[1]),(0,initPlugin_1.initPlugin)(i,this.project.projectPath,e)})}initAppGraph(){this.appGraph=new appgraph_1.AppGraph({type:"miniprogram",root:this.project.miniprogramRoot,persistCache:this.persistCache,plugins:this.plugins,compiler:this})}initPluginGraph(){this.pluginGraph=new plugingraph_1.PluginGraph({type:"plugin",root:this.project.pluginRoot,persistCache:this.persistCache,plugins:this.plugins,compiler:this})}updateOptions(t){var i,e;const r=this.options;if(this.options=t,this.persistCache.updateBaseCacheKey(getCacheBaseKey(t)),!(0,lodash_1.isEqual)(t.babelSetting,r.babelSetting)||!(0,lodash_1.isEqual)(this.options.summerPlugins,r.summerPlugins))return this.initPlugins(),this.appGraph.destroy(),null===(i=this.pluginGraph)||void 0===i||i.destroy(),this.initAppGraph(),void("miniProgramPlugin"===this.options.compileType&&this.initPluginGraph());this.options.compileType!==r.compileType&&("miniProgramPlugin"===this.options.compileType?this.initPluginGraph():(null===(e=this.pluginGraph)||void 0===e||e.destroy(),this.pluginGraph=void 0)),this.appGraph.root!==this.project.miniprogramRoot&&(this.appGraph.destroy(),this.initAppGraph()),this.pluginGraph&&this.pluginGraph.root!==this.project.pluginRoot&&(this.pluginGraph.destroy(),this.initPluginGraph())}destroy(){var t;this.appGraph.destroy(),null===(t=this.pluginGraph)||void 0===t||t.destroy(),this.proxyProject.clearResolver()}getStatus(){const t=(0,plugin_driver_1.genResovleExtConf)(this.plugins),i={},e=new Set;for(const r of["json","js","wxml","wxss","wxs"])i[r]={exts:t[r].reverse()},t[r].forEach(t=>{e.add(t)});return{codeExts:Array.from(e.keys()),codeConf:i}}clearCache(){var t;this.appGraph.clearCache(),null===(t=this.pluginGraph)||void 0===t||t.clearCache(),this.persistCache.clean(),(0,reactiveCache_1.cleanReactiveCache)()}async getConf({graphId:t},i){if("miniprogram"===t){return await this.appGraph.getConf(i)}if("plugin"===t){return await this.pluginGraph.getConf(i)}throw new Error("no support getConf for "+t)}async getCode(t,i){if("miniprogram"===t.graphId){return await this.appGraph.getDevCode(i,{package:t.package})}if("plugin"===t.graphId){return await this.pluginGraph.getDevCode(i)}throw new Error("no support getCode for "+t.graphId)}async getLocalFileList(t){if("miniprogram"===t)return await this.appGraph.getLocalFileList();if("plugin"===t)return await this.pluginGraph.getLocalFileList();throw new Error("no support getCode for "+t)}async compileSingleCode(t,i){if("miniprogram"===t.graphId){return await this.appGraph.compileSingleCode(t.filePath,t.sourceCode)}if("plugin"===t.graphId){return await this.pluginGraph.compileSingleCode(t.filePath,t.sourceCode)}throw new Error("no support getCode for "+t.graphId)}async compile(t,i){const e=await i.run(locales_1.default.config.SUMMER_COMPILE_MINIPROGRAM.format(),()=>this.appGraph.compile(i));if("miniProgram"===this.project.type)return e["project.config.json"]=JSON.stringify({miniprogramRoot:"",__compileDebugInfo__:{useSummer:!0}}),e;if("miniProgramPlugin"===this.project.type){const t={},r=await(await i.run(locales_1.default.config.SUMMER_COMPILE_PLUGIN.format(),()=>this.pluginGraph.compile(i)));return Object.keys(e).forEach(i=>{t[path_1.default.posix.join(this.project.miniprogramRoot,i)]=e[i]}),Object.keys(r).forEach(i=>{t[path_1.default.posix.join(this.project.pluginRoot,i)]=r[i]}),t["project.config.json"]=JSON.stringify({miniprogramRoot:this.project.miniprogramRoot,pluginRoot:this.project.pluginRoot,__compileDebugInfo__:{useSummer:!0}}),t}throw new Error("no support compile for "+this.project.type)}}exports.SummerCompiler=SummerCompiler;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");(0,tslib_1.__exportStar)(require("./miniprogram-json/index"),exports);
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");tslib_1.__exportStar(require("./miniprogram-json/index"),exports);
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");(0,tslib_1.__exportStar)(require("./app"),exports),(0,tslib_1.__exportStar)(require("./ext"),exports),(0,tslib_1.__exportStar)(require("./sitemap"),exports),(0,tslib_1.__exportStar)(require("./page"),exports),(0,tslib_1.__exportStar)(require("./plugin"),exports),(0,tslib_1.__exportStar)(require("./projectconfig"),exports),(0,tslib_1.__exportStar)(require("./game"),exports),(0,tslib_1.__exportStar)(require("./theme"),exports);
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");tslib_1.__exportStar(require("./app"),exports),tslib_1.__exportStar(require("./ext"),exports),tslib_1.__exportStar(require("./sitemap"),exports),tslib_1.__exportStar(require("./page"),exports),tslib_1.__exportStar(require("./plugin"),exports),tslib_1.__exportStar(require("./projectconfig"),exports),tslib_1.__exportStar(require("./game"),exports),tslib_1.__exportStar(require("./theme"),exports);
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.appendBabelHelpers=exports.getBabelOutputPath=exports.isValidBabelHelperFunc=exports.collectBabelHelpers=exports.replaceBabelHelpers=exports.searchBabelModule=exports.isIgnore=exports.getHelperContent=exports.getHelperDeps=exports.getCustomPlugins=exports.getDefaultPlugins=void 0;const tslib_1=require("tslib"),fs=(0,tslib_1.__importStar)(require("fs-extra")),path=(0,tslib_1.__importStar)(require("path")),tools_1=require("./tools"),DepMap={applyDecoratedDescriptor:[],arrayLikeToArray:[],arrayWithHoles:[],arrayWithoutHoles:["arrayLikeToArray"],assertThisInitialized:[],AsyncGenerator:["AwaitValue"],asyncGeneratorDelegate:[],asyncIterator:[],asyncToGenerator:[],awaitAsyncGenerator:["AwaitValue"],AwaitValue:[],classCallCheck:[],classNameTDZError:[],classPrivateFieldDestructureSet:[],classPrivateFieldGet:[],classPrivateFieldLooseBase:[],classPrivateFieldLooseKey:[],classPrivateFieldSet:[],classPrivateMethodGet:[],classPrivateMethodSet:[],classStaticPrivateFieldSpecGet:[],classStaticPrivateFieldSpecSet:[],classStaticPrivateMethodGet:[],classStaticPrivateMethodSet:[],construct:["setPrototypeOf","isNativeReflectConstruct"],createClass:[],createForOfIteratorHelper:["unsupportedIterableToArray"],createForOfIteratorHelperLoose:["unsupportedIterableToArray"],createSuper:["getPrototypeOf","isNativeReflectConstruct","possibleConstructorReturn"],decorate:["toArray","toPropertyKey"],defaults:[],defineEnumerableProperties:[],defineProperty:[],extends:[],get:["superPropBase"],getPrototypeOf:[],inherits:["setPrototypeOf"],inheritsLoose:[],initializerDefineProperty:[],initializerWarningHelper:[],instanceof:[],interopRequireDefault:[],interopRequireWildcard:["typeof"],isNativeFunction:[],isNativeReflectConstruct:[],iterableToArray:[],iterableToArrayLimit:[],iterableToArrayLimitLoose:[],jsx:[],maybeArrayLike:["arrayLikeToArray"],newArrowCheck:[],nonIterableRest:[],nonIterableSpread:[],objectDestructuringEmpty:[],objectSpread:["defineProperty"],objectSpread2:["defineProperty"],objectWithoutProperties:["objectWithoutPropertiesLoose"],objectWithoutPropertiesLoose:[],possibleConstructorReturn:["typeof","assertThisInitialized"],readOnlyError:[],set:["superPropBase","defineProperty"],setPrototypeOf:[],skipFirstGeneratorNext:[],slicedToArray:["arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest"],slicedToArrayLoose:["arrayWithHoles","iterableToArrayLimitLoose","unsupportedIterableToArray","nonIterableRest"],superPropBase:["getPrototypeOf"],taggedTemplateLiteral:[],taggedTemplateLiteralLoose:[],tdz:[],temporalRef:["temporalUndefined","tdz"],temporalUndefined:[],toArray:["arrayWithHoles","iterableToArray","unsupportedIterableToArray","nonIterableRest"],toConsumableArray:["arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread"],toPrimitive:["typeof"],toPropertyKey:["typeof","toPrimitive"],typeof:[],unsupportedIterableToArray:["arrayLikeToArray"],wrapAsyncGenerator:["AsyncGenerator"],wrapNativeSuper:["getPrototypeOf","setPrototypeOf","isNativeFunction","construct"],wrapRegExp:["typeof","wrapNativeSuper","getPrototypeOf","possibleConstructorReturn","inherits"],regenerator:[],Objectentries:[],Objectvalues:[],Arrayincludes:[]};function getDefaultPlugins(){const e=require("@babel/plugin-proposal-class-properties").default,r=require("@babel/plugin-proposal-decorators").default,t=require("@babel/plugin-proposal-function-sent").default,o=require("@babel/plugin-proposal-throw-expressions").default,a=require("@babel/plugin-proposal-export-default-from").default,s=require("@babel/plugin-proposal-pipeline-operator").default,l=require("@babel/plugin-proposal-do-expressions").default,i=require("@babel/plugin-proposal-function-bind").default,p=require("@babel/plugin-proposal-private-methods").default;return new Map([[i,0],[a,0],[s,{proposal:"minimal"}],[l,0],[r,{legacy:!0}],[t,0],[o,0],[e,{loose:!0}],[p,{loose:!0}]])}function getCustomPlugins(e=[]){const r=getDefaultPlugins(),t=[];for(const[e,o]of r)0===o?t.push(e):t.push([e,o]);return t}function getHelperDeps(e,r){const t={};for(;e.length;){const o=e.shift()||"",a=o.substr(0,o.indexOf(r)+r.length),s=o.replace(a+"/helpers/","");s in DepMap&&DepMap[s].forEach(r=>{const o=`${a}/helpers/${r}`;t[o]||(e.push(o),t[o]=!0)}),t[o]=!0}return t}function getHelperContent(e,r){const t=e.substr(0,e.indexOf(r)+r.length),o=e.replace(t,"babel_runtime"),a=(0,tools_1.normalizePath)(path.join(__dirname,"../vendor/",o+".js"));return fs.readFile(a,"utf8")}function isIgnore(e,r){const t=e||[],o=r.split(path.sep).join("/");for(const e of t){if(r===e)return!0;if(!/^[./\\]+/.test(e)&&/.+\/\*$/.test(e)&&-1!==o.indexOf(e.substr(0,e.length-1)))return!0}return!1}function searchBabelModule(e,r){const t=[],o=new RegExp(`require\\("[\\.\\/]*(${r}[^"]+)"\\)`,"gi");return e.replace(o,(e,o)=>{const a=o.replace(r,"").match(/\/(helpers|regenerator)\/?(.+)?/);return(a&&"regenerator"===a[1]||a&&"helpers"===a[1]&&DepMap.hasOwnProperty(a[2]))&&t.push(o),e}),t}function replaceBabelHelpers(e,r={},t,o){const a=new Set,s=t.split("/").map((e,r)=>0===r?"":"../").join("");return{transformCode:e.replace(/require\("(@babel\/runtime\/[^"]+)"\)/gi,(e,t)=>{const l=t.replace(/@babel\/runtime\/(helpers\/)?/,"").replace(/\.js$/,""),i=t.replace("@babel/runtime",o),p=DepMap.hasOwnProperty(l);return!r[t]&&p?(a.add(i),`require("${s+i}")`):e}),helpers:Array.from(a)}}function collectBabelHelpers(e){const r={};return e.replace(/require\("(@babel\/runtime\/[^"]+)"\)/gi,(e,t)=>(r[t]=!0,e)),r}function isValidBabelHelperFunc(e){return DepMap.hasOwnProperty(e)}function getBabelOutputPath(e){var r;let t=(null===(r=e.setting)||void 0===r?void 0:r.babelSetting)?e.setting.babelSetting.outputPath:"";return t?(t=(0,tools_1.normalizePath)(t),t.replace(/(^[./\\])|(\/$)/g,""),t):"@babel/runtime"}async function appendBabelHelpers(e,r,t,o){const a=getHelperDeps(Array.from(e),t),s=Object.keys(a).map(async e=>{try{const a=await getHelperContent(e,t),s=(0,tools_1.normalizePath)(path.posix.join(r,/\.js$/.test(e)?""+e:e+".js"));o[s]||(o[s]=a)}catch(e){if("EEXIST"===e.code);else if("ENOENT"!==e.code)throw e}});return Promise.all(s)}exports.getDefaultPlugins=getDefaultPlugins,exports.getCustomPlugins=getCustomPlugins,exports.getHelperDeps=getHelperDeps,exports.getHelperContent=getHelperContent,exports.isIgnore=isIgnore,exports.searchBabelModule=searchBabelModule,exports.replaceBabelHelpers=replaceBabelHelpers,exports.collectBabelHelpers=collectBabelHelpers,exports.isValidBabelHelperFunc=isValidBabelHelperFunc,exports.getBabelOutputPath=getBabelOutputPath,exports.appendBabelHelpers=appendBabelHelpers;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.appendBabelHelpers=exports.getBabelOutputPath=exports.isValidBabelHelperFunc=exports.collectBabelHelpers=exports.replaceBabelHelpers=exports.searchBabelModule=exports.isIgnore=exports.getHelperContent=exports.getHelperDeps=exports.getCustomPlugins=exports.getDefaultPlugins=void 0;const tslib_1=require("tslib"),fs=tslib_1.__importStar(require("fs-extra")),path=tslib_1.__importStar(require("path")),tools_1=require("./tools"),DepMap={Arrayincludes:[],AsyncGenerator:["OverloadYield"],AwaitValue:[],Objectentries:[],Objectvalues:[],OverloadYield:[],applyDecoratedDescriptor:[],applyDecs:["typeof"],applyDecs2203:["typeof"],applyDecs2203R:["typeof"],applyDecs2301:["typeof","checkInRHS"],arrayLikeToArray:[],arrayWithHoles:[],arrayWithoutHoles:["arrayLikeToArray"],assertThisInitialized:[],asyncGeneratorDelegate:["OverloadYield"],asyncIterator:[],asyncToGenerator:[],awaitAsyncGenerator:["OverloadYield"],checkInRHS:["typeof"],checkPrivateRedeclaration:[],classApplyDescriptorDestructureSet:[],classApplyDescriptorGet:[],classApplyDescriptorSet:[],classCallCheck:[],classCheckPrivateStaticAccess:[],classCheckPrivateStaticFieldDescriptor:[],classExtractFieldDescriptor:[],classNameTDZError:[],classPrivateFieldDestructureSet:["classApplyDescriptorDestructureSet","classExtractFieldDescriptor"],classPrivateFieldGet:["classApplyDescriptorGet","classExtractFieldDescriptor"],classPrivateFieldInitSpec:["checkPrivateRedeclaration"],classPrivateFieldLooseBase:[],classPrivateFieldLooseKey:[],classPrivateFieldSet:["classApplyDescriptorSet","classExtractFieldDescriptor"],classPrivateMethodGet:[],classPrivateMethodInitSpec:["checkPrivateRedeclaration"],classPrivateMethodSet:[],classStaticPrivateFieldDestructureSet:["classApplyDescriptorDestructureSet","classCheckPrivateStaticAccess","classCheckPrivateStaticFieldDescriptor"],classStaticPrivateFieldSpecGet:["classApplyDescriptorGet","classCheckPrivateStaticAccess","classCheckPrivateStaticFieldDescriptor"],classStaticPrivateFieldSpecSet:["classApplyDescriptorSet","classCheckPrivateStaticAccess","classCheckPrivateStaticFieldDescriptor"],classStaticPrivateMethodGet:["classCheckPrivateStaticAccess"],classStaticPrivateMethodSet:[],construct:["setPrototypeOf","isNativeReflectConstruct"],createClass:["toPropertyKey"],createForOfIteratorHelper:["unsupportedIterableToArray"],createForOfIteratorHelperLoose:["unsupportedIterableToArray"],createSuper:["getPrototypeOf","isNativeReflectConstruct","possibleConstructorReturn"],decorate:["toArray","toPropertyKey"],defaults:[],defineAccessor:[],defineEnumerableProperties:[],defineProperty:["toPropertyKey"],extends:[],get:["superPropBase"],getPrototypeOf:[],identity:[],inherits:["setPrototypeOf"],inheritsLoose:["setPrototypeOf"],initializerDefineProperty:[],initializerWarningHelper:[],instanceof:[],interopRequireDefault:[],interopRequireWildcard:["typeof"],isNativeFunction:[],isNativeReflectConstruct:[],iterableToArray:[],iterableToArrayLimit:[],iterableToArrayLimitLoose:[],jsx:[],maybeArrayLike:["arrayLikeToArray"],newArrowCheck:[],nonIterableRest:[],nonIterableSpread:[],objectDestructuringEmpty:[],objectSpread:["defineProperty"],objectSpread2:["defineProperty"],objectWithoutProperties:["objectWithoutPropertiesLoose"],objectWithoutPropertiesLoose:[],possibleConstructorReturn:["typeof","assertThisInitialized"],readOnlyError:[],regeneratorRuntime:["typeof"],set:["superPropBase","defineProperty"],setPrototypeOf:[],skipFirstGeneratorNext:[],slicedToArray:["arrayWithHoles","iterableToArrayLimit","unsupportedIterableToArray","nonIterableRest"],slicedToArrayLoose:["arrayWithHoles","iterableToArrayLimitLoose","unsupportedIterableToArray","nonIterableRest"],superPropBase:["getPrototypeOf"],taggedTemplateLiteral:[],taggedTemplateLiteralLoose:[],tdz:[],temporalRef:["temporalUndefined","tdz"],temporalUndefined:[],toArray:["arrayWithHoles","iterableToArray","unsupportedIterableToArray","nonIterableRest"],toConsumableArray:["arrayWithoutHoles","iterableToArray","unsupportedIterableToArray","nonIterableSpread"],toPrimitive:["typeof"],toPropertyKey:["typeof","toPrimitive"],typeof:[],unsupportedIterableToArray:["arrayLikeToArray"],wrapAsyncGenerator:["AsyncGenerator"],wrapNativeSuper:["getPrototypeOf","setPrototypeOf","isNativeFunction","construct"],wrapRegExp:["typeof","setPrototypeOf","inherits"],writeOnlyError:[]};function getDefaultPlugins(){const e=require("@babel/plugin-proposal-class-properties").default,t=require("@babel/plugin-proposal-decorators").default,r=require("@babel/plugin-proposal-function-sent").default,a=require("@babel/plugin-proposal-throw-expressions").default,s=require("@babel/plugin-proposal-export-default-from").default,o=require("@babel/plugin-proposal-pipeline-operator").default,l=require("@babel/plugin-proposal-do-expressions").default,i=require("@babel/plugin-proposal-function-bind").default,p=require("@babel/plugin-proposal-private-methods").default,c=require("@babel/plugin-proposal-private-property-in-object").default;return new Map([[i,0],[s,0],[o,{proposal:"minimal"}],[l,0],[t,{legacy:!0}],[r,0],[a,0],[e,{loose:!0}],[p,{loose:!0}],[c,{loose:!0}]])}function getCustomPlugins(e=[]){const t=getDefaultPlugins(),r=[];for(const[e,a]of t)0===a?r.push(e):r.push([e,a]);return r}function getHelperDeps(e,t){const r={};for(;e.length;){const a=e.shift()||"",s=a.substr(0,a.indexOf(t)+t.length),o=a.replace(s+"/helpers/","");o in DepMap&&DepMap[o].forEach(t=>{const a=`${s}/helpers/${t}`;r[a]||(e.push(a),r[a]=!0)}),r[a]=!0}return r}function getHelperContent(e,t){const r=e.substr(0,e.indexOf(t)+t.length),a=e.replace(r,"babel_runtime"),s=(0,tools_1.normalizePath)(path.join(__dirname,"../vendor/",a+".js"));return fs.readFile(s,"utf8")}function isIgnore(e,t){const r=e||[],a=t.split(path.sep).join("/");for(const e of r){if(t===e)return!0;if(!/^[./\\]+/.test(e)&&/.+\/\*$/.test(e)&&-1!==a.indexOf(e.substr(0,e.length-1)))return!0}return!1}function searchBabelModule(e,t){const r=[],a=new RegExp(`require\\("[\\.\\/]*(${t}[^"]+)"\\)`,"gi");return e.replace(a,(e,a)=>{const s=a.replace(t,"").match(/\/(helpers|regenerator)\/?(.+)?/);return(s&&"regenerator"===s[1]||s&&"helpers"===s[1]&&DepMap.hasOwnProperty(s[2]))&&r.push(a),e}),r}function replaceBabelHelpers(e,t={},r,a){const s=new Set,o=r.split("/").map((e,t)=>0===t?"":"../").join("");return{transformCode:e.replace(/require\("(@babel\/runtime\/[^"]+)"\)/gi,(e,r)=>{const l=r.replace(/@babel\/runtime\/(helpers\/)?/,"").replace(/\.js$/,""),i=r.replace("@babel/runtime",a),p=DepMap.hasOwnProperty(l);return!t[r]&&p?(s.add(i),`require("${o+i}")`):e}),helpers:Array.from(s)}}function collectBabelHelpers(e){const t={};return e.replace(/require\("(@babel\/runtime\/[^"]+)"\)/gi,(e,r)=>(t[r]=!0,e)),t}function isValidBabelHelperFunc(e){return DepMap.hasOwnProperty(e)}function getBabelOutputPath(e){var t;let r=(null===(t=e.setting)||void 0===t?void 0:t.babelSetting)?e.setting.babelSetting.outputPath:"";return r?(r=(0,tools_1.normalizePath)(r),r.replace(/(^[./\\])|(\/$)/g,""),r):"@babel/runtime"}async function appendBabelHelpers(e,t,r,a){const s=getHelperDeps(Array.from(e),r),o=Object.keys(s).map(async e=>{try{const s=await getHelperContent(e,r),o=(0,tools_1.normalizePath)(path.posix.join(t,/\.js$/.test(e)?""+e:e+".js"));a[o]||(a[o]=s)}catch(e){if("EEXIST"===e.code);else if("ENOENT"!==e.code)throw e}});return Promise.all(o)}exports.getDefaultPlugins=getDefaultPlugins,exports.getCustomPlugins=getCustomPlugins,exports.getHelperDeps=getHelperDeps,exports.getHelperContent=getHelperContent,exports.isIgnore=isIgnore,exports.searchBabelModule=searchBabelModule,exports.replaceBabelHelpers=replaceBabelHelpers,exports.collectBabelHelpers=collectBabelHelpers,exports.isValidBabelHelperFunc=isValidBabelHelperFunc,exports.getBabelOutputPath=getBabelOutputPath,exports.appendBabelHelpers=appendBabelHelpers;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllTargetTypeFilesWithOtherTypeFilesOfSameName=exports.checkPath=exports.ECheckPathType=exports.checkUTF8=exports.throwError=exports.getAllPagesInfo=exports.getAllPages=void 0;const tslib_1=require("tslib"),tools_1=require("./tools"),config_1=require("../config"),path_1=(0,tslib_1.__importDefault)(require("path")),locales_1=(0,tslib_1.__importDefault)(require("./locales/locales")),getAllPages=e=>{const t=[...e.pages];if(e.subPackages)for(const o of e.subPackages)for(const e of o.pages)t.push((0,tools_1.normalizePath)(path_1.default.posix.join(o.root,e)));return t};exports.getAllPages=getAllPages;const getAllPagesInfo=e=>{const t=e.pages.map(e=>({path:e,root:config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT,name:config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT}));if(e.subPackages)for(const o of e.subPackages)for(const e of o.pages)t.push({path:(0,tools_1.normalizePath)(path_1.default.posix.join(o.root,e)),root:o.root,name:o.name||""});return t};function throwError(e){const{msg:t,code:o=config_1.JSON_CONTENT_ERR,filePath:r}=e,a=new Error(`${r}: ${t}`);throw a.code=o,a.path=r,a}function checkUTF8(e,t){let o="";try{o=(0,tools_1.bufferToUtf8String)(e)}catch(e){o=""}return void 0===o&&throwError({msg:locales_1.default.config.FILE_NOT_UTF8.format(t),code:config_1.FILE_NOT_UTF8,filePath:t}),o}var ECheckPathType;function checkPath(e){const{value:t,tips:o,filePath:r="app.json",code:a=config_1.JSON_CONTENT_ERR,checkPathType:s=e.checkPathType||ECheckPathType.NORMAL}=e;"string"!==(0,tools_1.getType)(t)&&throwError({msg:locales_1.default.config.JSON_CONTENT_SHOULD_BE.format([o,"string"]),code:a,filePath:r}),""===t&&throwError({msg:locales_1.default.config.JSON_CONTENT_SHOULD_NOT_BE.format([o,"''"]),code:a,filePath:r}),t.includes("\\")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format([o,"\\"]),code:a,filePath:r}),t.includes("//")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format([o,"//"]),code:a,filePath:r}),s===ECheckPathType.NORMAL&&t.startsWith(".")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_START_WITH.format([o,"."]),code:a,filePath:r}),s===ECheckPathType.NORMAL&&t.startsWith("/")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_START_WITH.format([o,"/"]),code:a,filePath:r}),t.startsWith(" ")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_START_WITH.format([o," "]),code:a,filePath:r}),(t.includes("../")||t.endsWith("/.."))&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format([o,"../"]),code:a,filePath:r})}function getAllTargetTypeFilesWithOtherTypeFilesOfSameName(e,t,o,r){if(!t)return[];const a=e.getFileList(r,t);if(!o||0===o.length)return a;const s=o.map(t=>new Set(e.getFileList(r,t).map(e=>e.slice(0,-t.length))));return a.map(e=>e.slice(0,-t.length)).filter(e=>s.every(t=>t.has(e))).map(e=>`${e}${t}`)}exports.getAllPagesInfo=getAllPagesInfo,exports.throwError=throwError,exports.checkUTF8=checkUTF8,function(e){e.NORMAL="NORMAL",e.TAB_BAR_ICON="TAB_BAR_ICON"}(ECheckPathType=exports.ECheckPathType||(exports.ECheckPathType={})),exports.checkPath=checkPath,exports.getAllTargetTypeFilesWithOtherTypeFilesOfSameName=getAllTargetTypeFilesWithOtherTypeFilesOfSameName;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAllTargetTypeFilesWithOtherTypeFilesOfSameName=exports.checkPath=exports.ECheckPathType=exports.checkUTF8=exports.throwError=exports.getAllPagesInfo=exports.getAllPages=void 0;const tslib_1=require("tslib"),tools_1=require("./tools"),config_1=require("../config"),path_1=tslib_1.__importDefault(require("path")),locales_1=tslib_1.__importDefault(require("./locales/locales")),getAllPages=e=>{const t=[...e.pages];if(e.subPackages)for(const o of e.subPackages)for(const e of o.pages)t.push((0,tools_1.normalizePath)(path_1.default.posix.join(o.root,e)));return t};exports.getAllPages=getAllPages;const getAllPagesInfo=e=>{const t=e.pages.map(e=>({path:e,root:config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT,name:config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT}));if(e.subPackages)for(const o of e.subPackages)for(const e of o.pages)t.push({path:(0,tools_1.normalizePath)(path_1.default.posix.join(o.root,e)),root:o.root,name:o.name||""});return t};function throwError(e){const{msg:t,code:o=config_1.JSON_CONTENT_ERR,filePath:r}=e,a=new Error(`${r}: ${t}`);throw a.code=o,a.path=r,a}function checkUTF8(e,t){let o="";try{o=(0,tools_1.bufferToUtf8String)(e)}catch(e){o=""}return void 0===o&&throwError({msg:locales_1.default.config.FILE_NOT_UTF8.format(t),code:config_1.FILE_NOT_UTF8,filePath:t}),o}var ECheckPathType;function checkPath(e){const{value:t,tips:o,filePath:r="app.json",code:a=config_1.JSON_CONTENT_ERR,checkPathType:s=e.checkPathType||ECheckPathType.NORMAL}=e;"string"!==(0,tools_1.getType)(t)&&throwError({msg:locales_1.default.config.JSON_CONTENT_SHOULD_BE.format([o,"string"]),code:a,filePath:r}),""===t&&throwError({msg:locales_1.default.config.JSON_CONTENT_SHOULD_NOT_BE.format([o,"''"]),code:a,filePath:r}),t.includes("\\")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format([o,"\\"]),code:a,filePath:r}),t.includes("//")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format([o,"//"]),code:a,filePath:r}),s===ECheckPathType.NORMAL&&t.startsWith(".")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_START_WITH.format([o,"."]),code:a,filePath:r}),s===ECheckPathType.NORMAL&&t.startsWith("/")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_START_WITH.format([o,"/"]),code:a,filePath:r}),t.startsWith(" ")&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_START_WITH.format([o," "]),code:a,filePath:r}),(t.includes("../")||t.endsWith("/.."))&&throwError({msg:locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format([o,"../"]),code:a,filePath:r})}function getAllTargetTypeFilesWithOtherTypeFilesOfSameName(e,t,o,r){if(!t)return[];const a=e.getFileList(r,t);if(!o||0===o.length)return a;const s=o.map(t=>new Set(e.getFileList(r,t).map(e=>e.slice(0,-t.length))));return a.map(e=>e.slice(0,-t.length)).filter(e=>s.every(t=>t.has(e))).map(e=>`${e}${t}`)}exports.getAllPagesInfo=getAllPagesInfo,exports.throwError=throwError,exports.checkUTF8=checkUTF8,function(e){e.NORMAL="NORMAL",e.TAB_BAR_ICON="TAB_BAR_ICON"}(ECheckPathType=exports.ECheckPathType||(exports.ECheckPathType={})),exports.checkPath=checkPath,exports.getAllTargetTypeFilesWithOtherTypeFilesOfSameName=getAllTargetTypeFilesWithOtherTypeFilesOfSameName;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeError=void 0;const tslib_1=require("tslib"),log_1=(0,tslib_1.__importDefault)(require("./log"));class CodeError extends Error{constructor(r,e){super(r),log_1.default.error(e,r),this.code=e}}exports.CodeError=CodeError;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeError=void 0;const tslib_1=require("tslib"),log_1=tslib_1.__importDefault(require("./log"));class CodeError extends Error{constructor(r,e){super(r),log_1.default.error(e,r),this.code=e}}exports.CodeError=CodeError;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FSAgent=void 0;const tslib_1=require("tslib"),fs_1=(0,tslib_1.__importDefault)(require("fs")),log_1=(0,tslib_1.__importDefault)(require("./log")),tools_1=require("./tools");class FSAgent{constructor(e){e&&(this._agent=e)}setAgent(e){this._agent=e}stat(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.stat)?(log_1.default.debug("FSAgent use agent.stat for "+e),this._agent.stat(e)):new Promise((t,r)=>{log_1.default.debug("FSAgent use fs.stat for "+e),fs_1.default.stat(e,(e,i)=>{if(e)return r(e);t(i)})})}exists(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.exists)?(log_1.default.debug("FSAgent use agent.exists for "+e),this._agent.exists(e)):new Promise((t,r)=>{log_1.default.debug("FSAgent use fs.exists for "+e),fs_1.default.exists(e,e=>{t(e)})})}readFile(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.readFile)?(log_1.default.debug("FSAgent use agent.readFile for "+e),this._agent.readFile(e)):new Promise((t,r)=>{log_1.default.debug("FSAgent use fs.readFile for "+e),fs_1.default.readFile(e,null,(e,i)=>{if(e)return r(e);t(i)})})}writeFile(e,t,r=null){var i;return e=(0,tools_1.normalizePath)(e),(null===(i=this._agent)||void 0===i?void 0:i.writeFile)?(log_1.default.debug("FSAgent use agent.writeFile for "+e),this._agent.writeFile(e,t,r)):new Promise((i,s)=>{log_1.default.debug("FSAgent use fs.writeFile for "+e),fs_1.default.writeFile(e,t,r,e=>{if(e)return s(e);i()})})}readdir(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.readdir)?(log_1.default.debug("FSAgent use agent.readdir for "+e),this._agent.readdir(e)):new Promise((t,r)=>{fs_1.default.readdir(e,(e,i)=>{if(e)return r(e);t(i)})})}}exports.FSAgent=FSAgent;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.FSAgent=void 0;const tslib_1=require("tslib"),fs_1=tslib_1.__importDefault(require("fs")),log_1=tslib_1.__importDefault(require("./log")),tools_1=require("./tools");class FSAgent{constructor(e){e&&(this._agent=e)}setAgent(e){this._agent=e}stat(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.stat)?(log_1.default.debug("FSAgent use agent.stat for "+e),this._agent.stat(e)):new Promise((t,r)=>{log_1.default.debug("FSAgent use fs.stat for "+e),fs_1.default.stat(e,(e,i)=>{if(e)return r(e);t(i)})})}exists(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.exists)?(log_1.default.debug("FSAgent use agent.exists for "+e),this._agent.exists(e)):new Promise((t,r)=>{log_1.default.debug("FSAgent use fs.exists for "+e),fs_1.default.exists(e,e=>{t(e)})})}readFile(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.readFile)?(log_1.default.debug("FSAgent use agent.readFile for "+e),this._agent.readFile(e)):new Promise((t,r)=>{log_1.default.debug("FSAgent use fs.readFile for "+e),fs_1.default.readFile(e,null,(e,i)=>{if(e)return r(e);t(i)})})}writeFile(e,t,r=null){var i;return e=(0,tools_1.normalizePath)(e),(null===(i=this._agent)||void 0===i?void 0:i.writeFile)?(log_1.default.debug("FSAgent use agent.writeFile for "+e),this._agent.writeFile(e,t,r)):new Promise((i,s)=>{log_1.default.debug("FSAgent use fs.writeFile for "+e),fs_1.default.writeFile(e,t,r,e=>{if(e)return s(e);i()})})}readdir(e){var t;return e=(0,tools_1.normalizePath)(e),(null===(t=this._agent)||void 0===t?void 0:t.readdir)?(log_1.default.debug("FSAgent use agent.readdir for "+e),this._agent.readdir(e)):new Promise((t,r)=>{fs_1.default.readdir(e,(e,i)=>{if(e)return r(e);t(i)})})}}exports.FSAgent=FSAgent;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.glob=void 0;const tslib_1=require("tslib"),path_1=(0,tslib_1.__importDefault)(require("path")),minimatch_1=require("minimatch"),fs_1=(0,tslib_1.__importDefault)(require("./fs")),tools_1=require("./tools"),log_1=(0,tslib_1.__importDefault)(require("./log"));function ignoreMap(t){let e=null;if("/**"===t.slice(-3)){const r=t.replace(/(\/\*\*)+$/,"");e=new minimatch_1.Minimatch(r,{dot:!0})}return{matcher:new minimatch_1.Minimatch(t,{dot:!0}),gmatcher:e}}async function readdir(t,e){const{ignore:r,cwd:i}=e;return(await fs_1.default.readdir(path_1.default.posix.join(i,t))).filter(e=>{const i=(0,tools_1.normalizePath)(path_1.default.posix.join(t,e)),o=isIgnored(i,r);return o&&log_1.default.debug(`file '${i}' has been ignore`),!o})}function childrenIgnored(t,e){return!!e.length&&e.some(e=>{var r;return!!(null===(r=e.gmatcher)||void 0===r?void 0:r.match(t))})}function isIgnored(t,e){return!!e.length&&e.some(e=>{var r;return e.matcher.match(t)||!!(null===(r=e.gmatcher)||void 0===r?void 0:r.match(t))})}async function _glob(t,e){const{cwd:r,ignore:i,dir:o}=e,n=path_1.default.posix.join(r,t),a=await fs_1.default.stat(n);if(!a)return[];if(a.isFile())return[(0,tools_1.normalizePath)(t)];if(a.isDirectory()){if(childrenIgnored(t,i))return log_1.default.debug(`directory '${n}' has been ignore`),[];let r=[];o&&t&&r.push((0,tools_1.normalizePath)(t+"/"));const a=await readdir(t,e);for(const i of a){const o=await _glob(path_1.default.posix.join(t,i),e);r=r.concat(o)}return r}return[]}async function glob(t){const{cwd:e,ignore:r,dir:i=!1}=t;let o=[];return Array.isArray(r)&&(o=r.map(ignoreMap)),_glob("",{cwd:e,ignore:o,dir:i})}exports.glob=glob;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.glob=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),minimatch_1=require("minimatch"),fs_1=tslib_1.__importDefault(require("./fs")),tools_1=require("./tools"),log_1=tslib_1.__importDefault(require("./log"));function ignoreMap(t){let e=null;if("/**"===t.slice(-3)){const r=t.replace(/(\/\*\*)+$/,"");e=new minimatch_1.Minimatch(r,{dot:!0})}return{matcher:new minimatch_1.Minimatch(t,{dot:!0}),gmatcher:e}}async function readdir(t,e){const{ignore:r,cwd:i}=e;return(await fs_1.default.readdir(path_1.default.posix.join(i,t))).filter(e=>{const i=(0,tools_1.normalizePath)(path_1.default.posix.join(t,e)),o=isIgnored(i,r);return o&&log_1.default.debug(`file '${i}' has been ignore`),!o})}function childrenIgnored(t,e){return!!e.length&&e.some(e=>{var r;return!!(null===(r=e.gmatcher)||void 0===r?void 0:r.match(t))})}function isIgnored(t,e){return!!e.length&&e.some(e=>{var r;return e.matcher.match(t)||!!(null===(r=e.gmatcher)||void 0===r?void 0:r.match(t))})}async function _glob(t,e){const{cwd:r,ignore:i,dir:o}=e,n=path_1.default.posix.join(r,t),a=await fs_1.default.stat(n);if(!a)return[];if(a.isFile())return[(0,tools_1.normalizePath)(t)];if(a.isDirectory()){if(childrenIgnored(t,i))return log_1.default.debug(`directory '${n}' has been ignore`),[];let r=[];o&&t&&r.push((0,tools_1.normalizePath)(t+"/"));const a=await readdir(t,e);for(const i of a){const o=await _glob(path_1.default.posix.join(t,i),e);r=r.concat(o)}return r}return[]}async function glob(t){const{cwd:e,ignore:r,dir:i=!1}=t;let o=[];return Array.isArray(r)&&(o=r.map(ignoreMap)),_glob("",{cwd:e,ignore:o,dir:i})}exports.glob=glob;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.jsonRespParse=exports.jsonParse=void 0;const tslib_1=require("tslib"),log_1=(0,tslib_1.__importDefault)(require("./log"));function jsonParse(e){try{return JSON.parse(e)}catch(r){throw log_1.default.info("jsonParse error, input string:"),log_1.default.info(e),r}}function jsonRespParse(e,r=""){try{return JSON.parse(e)}catch(s){throw log_1.default.info(`CGI[${r}] response parse error, response body: ${e}`),s}}exports.jsonParse=jsonParse,exports.jsonRespParse=jsonRespParse;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.jsonRespParse=exports.jsonParse=void 0;const tslib_1=require("tslib"),log_1=tslib_1.__importDefault(require("./log"));function jsonParse(e){try{return JSON.parse(e)}catch(r){throw log_1.default.info("jsonParse error, input string:"),log_1.default.info(e),r}}function jsonRespParse(e,r=""){try{return JSON.parse(e)}catch(s){throw log_1.default.info(`CGI[${r}] response parse error, response body: ${e}`),s}}exports.jsonParse=jsonParse,exports.jsonRespParse=jsonRespParse;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),en_1=(0,tslib_1.__importDefault)(require("./en")),zh_1=(0,tslib_1.__importDefault)(require("./zh")),systemLocale="$SYSTEM",supportedLocales=["zh","en"];let locale="en";const toSupportedLocale=e=>("$SYSTEM"===e&&"zh_CN"===(e=navigator.language)&&(e="zh"),supportedLocales.find(t=>e.toLowerCase().includes(t))||"zh"),setLocale=e=>{locale=toSupportedLocale(e)};exports.default={get config(){return"en"===locale?en_1.default:zh_1.default},setLocale:setLocale};
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),en_1=tslib_1.__importDefault(require("./en")),zh_1=tslib_1.__importDefault(require("./zh")),systemLocale="$SYSTEM",supportedLocales=["zh","en"];let locale="en";const toSupportedLocale=e=>("$SYSTEM"===e&&"zh_CN"===(e=navigator.language)&&(e="zh"),supportedLocales.find(t=>e.toLowerCase().includes(t))||"zh"),setLocale=e=>{locale=toSupportedLocale(e)};exports.default={get config(){return"en"===locale?en_1.default:zh_1.default},setLocale:setLocale};
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.initGlobalProxy=exports.getCiProxy=exports.setCiProxy=exports.request=void 0;const tslib_1=require("tslib"),log_1=(0,tslib_1.__importDefault)(require("./log")),interruptibletask_1=require("./interruptibletask"),req=require("request"),getGlobalProxySettings=require("get-proxy");class RequestTask extends interruptibletask_1.InterruptibleTask{constructor(e){super(e),this._alreadyRefresh=!1,this._promise.catch(e=>{log_1.default.error(`${this._opt.url} ${e}`)})}static async formateQuery(e){const t=Object.assign({},e),{needRandom:r}=t;delete t.needRandom;const s=(t.url||"").split("?"),o=s[0],i=[];return-1!==r&&i.push("_r="+Math.random()),s[1]&&i.push(s[1]),t.url=`${o}?${i.join("&")}`,t}abort(){this._aborted||(this._aborted=!0,this._realRequest&&"function"==typeof this._realRequest.abort&&this._realRequest.abort())}async request(){if(this._aborted)throw interruptibletask_1.AbortEvent;const e=await RequestTask.formateQuery(this._opt);return RequestTask.requestProxy&&(e.proxy=RequestTask.requestProxy),new Promise((t,r)=>{this._realRequest=req(e,(e,s,o)=>{e?r(e):t({resp:s,body:o})}),this._realRequest.on("abort",()=>{r(interruptibletask_1.AbortEvent)})})}async run(e){return this._opt=Object.assign({},e),await this.request()}}function request(e){return new RequestTask(e)}function setCiProxy(e){RequestTask.requestProxy=e,log_1.default.info("miniprogram-ci is using proxy: "+e)}function getCiProxy(){return RequestTask.requestProxy}function initGlobalProxy(){const e=getCiProxy(),t=`${process.env.no_proxy||""},${process.env.NO_PROXY||""}`.split(",").map(e=>e.trim());if(!e&&!t.includes("servicewechat.com")){const e=getGlobalProxySettings();e&&setCiProxy(e)}}RequestTask.requestProxy="",exports.request=request,exports.setCiProxy=setCiProxy,exports.getCiProxy=getCiProxy,exports.initGlobalProxy=initGlobalProxy;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.initGlobalProxy=exports.getCiProxy=exports.setCiProxy=exports.request=void 0;const tslib_1=require("tslib"),log_1=tslib_1.__importDefault(require("./log")),interruptibletask_1=require("./interruptibletask"),req=require("request"),getGlobalProxySettings=require("get-proxy");class RequestTask extends interruptibletask_1.InterruptibleTask{constructor(e){super(e),this._alreadyRefresh=!1,this._promise.catch(e=>{log_1.default.error(`${this._opt.url} ${e}`)})}static async formateQuery(e){const t=Object.assign({},e),{needRandom:r}=t;delete t.needRandom;const s=(t.url||"").split("?"),o=s[0],i=[];return-1!==r&&i.push("_r="+Math.random()),s[1]&&i.push(s[1]),t.url=`${o}?${i.join("&")}`,t}abort(){this._aborted||(this._aborted=!0,this._realRequest&&"function"==typeof this._realRequest.abort&&this._realRequest.abort())}async request(){if(this._aborted)throw interruptibletask_1.AbortEvent;const e=await RequestTask.formateQuery(this._opt);return RequestTask.requestProxy&&(e.proxy=RequestTask.requestProxy),new Promise((t,r)=>{this._realRequest=req(e,(e,s,o)=>{e?r(e):t({resp:s,body:o})}),this._realRequest.on("abort",()=>{r(interruptibletask_1.AbortEvent)})})}async run(e){return this._opt=Object.assign({},e),await this.request()}}function request(e){return new RequestTask(e)}function setCiProxy(e){RequestTask.requestProxy=e,log_1.default.info("miniprogram-ci is using proxy: "+e)}function getCiProxy(){return RequestTask.requestProxy}function initGlobalProxy(){const e=getCiProxy(),t=`${process.env.no_proxy||""},${process.env.NO_PROXY||""}`.split(",").map(e=>e.trim());if(!e&&!t.includes("servicewechat.com")){const e=getGlobalProxySettings();e&&setCiProxy(e)}}RequestTask.requestProxy="",exports.request=request,exports.setCiProxy=setCiProxy,exports.getCiProxy=getCiProxy,exports.initGlobalProxy=initGlobalProxy;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSignature=exports.getRandomString=void 0;const tslib_1=require("tslib"),config_1=require("../config"),crypto_1=(0,tslib_1.__importDefault)(require("crypto")),request_1=require("./request"),error_1=require("./error"),locales_1=(0,tslib_1.__importDefault)(require("./locales/locales")),url_config_1=require("./url_config"),jsonParse_1=require("./jsonParse");async function getRandomString(r){try{const{body:e}=await(0,request_1.request)({url:url_config_1.GET_RAND_STRING,method:"post",body:JSON.stringify({appid:r,clientRand:Math.floor(1e8*Math.random())}),headers:{"content-type":"application/json"}}),t=(0,jsonParse_1.jsonRespParse)(e,url_config_1.GET_RAND_STRING);if(0===t.errCode)return t.data.randomString;throw new Error(`errCode: ${t.errCode}; errMsg: ${t.errMsg}`)}catch(r){throw new error_1.CodeError(r.toString(),config_1.GET_SIGNATURE_RAND_STRING_ERR)}}async function getSignature(r,e){const t={appid:e,rand_str:await getRandomString(e)};try{return crypto_1.default.privateEncrypt({key:r,padding:crypto_1.default.constants.RSA_PKCS1_PADDING},Buffer.from(JSON.stringify(t))).toString("base64")}catch(r){throw new error_1.CodeError(locales_1.default.config.GENERATE_LOCAL_SIGNATURE_FAIL.format(r.toString()),config_1.GENERATE_LOCAL_SIGNATURE_ERR)}}exports.getRandomString=getRandomString,exports.getSignature=getSignature;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getSignature=exports.getRandomString=void 0;const tslib_1=require("tslib"),config_1=require("../config"),crypto_1=tslib_1.__importDefault(require("crypto")),request_1=require("./request"),error_1=require("./error"),locales_1=tslib_1.__importDefault(require("./locales/locales")),url_config_1=require("./url_config"),jsonParse_1=require("./jsonParse");async function getRandomString(r){try{const{body:e}=await(0,request_1.request)({url:url_config_1.GET_RAND_STRING,method:"post",body:JSON.stringify({appid:r,clientRand:Math.floor(1e8*Math.random())}),headers:{"content-type":"application/json"}}),t=(0,jsonParse_1.jsonRespParse)(e,url_config_1.GET_RAND_STRING);if(0===t.errCode)return t.data.randomString;throw new Error(`errCode: ${t.errCode}; errMsg: ${t.errMsg}`)}catch(r){throw new error_1.CodeError(r.toString(),config_1.GET_SIGNATURE_RAND_STRING_ERR)}}async function getSignature(r,e){const t={appid:e,rand_str:await getRandomString(e)};try{return crypto_1.default.privateEncrypt({key:r,padding:crypto_1.default.constants.RSA_PKCS1_PADDING},Buffer.from(JSON.stringify(t))).toString("base64")}catch(r){throw new error_1.CodeError(locales_1.default.config.GENERATE_LOCAL_SIGNATURE_FAIL.format(r.toString()),config_1.GENERATE_LOCAL_SIGNATURE_ERR)}}exports.getRandomString=getRandomString,exports.getSignature=getSignature;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TaskStatus=void 0;const tslib_1=require("tslib"),locales_1=(0,tslib_1.__importDefault)(require("./locales/locales"));class TaskStatus{constructor(t){this._status="doing",this._msg="",this._id=`${Math.random()}${Date.now()}`,this._msg=t}get id(){return this._id}get status(){return this._status}get message(){return this._msg}done(){this._status="done"}toString(){return"doing"===this._status?locales_1.default.config.PROCESSING.format(this._msg):"done"===this._status?locales_1.default.config.DONE.format(this._msg):this._msg}}exports.TaskStatus=TaskStatus;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.TaskStatus=void 0;const tslib_1=require("tslib"),locales_1=tslib_1.__importDefault(require("./locales/locales"));class TaskStatus{constructor(t){this._status="doing",this._msg="",this._id=`${Math.random()}${Date.now()}`,this._msg=t}get id(){return this._id}get status(){return this._status}get message(){return this._msg}done(){this._status="done"}toString(){return"doing"===this._status?locales_1.default.config.PROCESSING.format(this._msg):"done"===this._status?locales_1.default.config.DONE.format(this._msg):this._msg}}exports.TaskStatus=TaskStatus;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getWorkersPath=exports.formatTime=exports.formatNumber=exports.generateMD5=exports.formatSourceMap=exports.isFileIncluded=exports.isFileIgnored=exports.leading=exports.trailing=exports.escapeQuot=exports.mkdirSync=exports.rmSync=exports.isHexColor=exports.formatJSONParseErr=exports.bufferToUtf8String=exports.getType=exports.normalizePath=void 0;const tslib_1=require("tslib"),fs_1=(0,tslib_1.__importDefault)(require("fs")),path_1=(0,tslib_1.__importDefault)(require("path")),babel_code_frame_1=(0,tslib_1.__importDefault)(require("babel-code-frame")),minimatch_1=(0,tslib_1.__importDefault)(require("minimatch")),crypto_1=(0,tslib_1.__importDefault)(require("crypto")),jsonlint=require("./jsonlint");function normalizePath(e=""){const t=path_1.default.posix.normalize(e.replace(/\\/g,"/"));return!e.startsWith("//")&&!e.startsWith("\\\\")||t.startsWith("//")?t:"/"+t}function getType(e){return Object.prototype.toString.call(e).toLowerCase().split(" ")[1].replace("]","")}exports.normalizePath=normalizePath,exports.getType=getType;const bufferToUtf8String=e=>{const t=e.toString();if(0===Buffer.compare(Buffer.from(t,"utf8"),e))return t};function getErrLine(e,t,r,o){r=r>0?r:1;return`${o}\n${(0,babel_code_frame_1.default)(e,t,r)}`}exports.bufferToUtf8String=bufferToUtf8String;const formatJSONParseErr=e=>{const t=e.data||"";try{jsonlint.parser.parse(t)}catch(r){try{const o=`Expecting ${r.expected}, got ${r.token}`,n=getErrLine(t,r.line,r.loc.first_column,o);return`${e.filePath}\n${n}`}catch(e){}}return`${e.filePath}\n${e.error}`};exports.formatJSONParseErr=formatJSONParseErr;const isHexColor=e=>/^#[a-f\d]{3}$/i.test(e)||/^#[a-f\d]{4}$/i.test(e)||/^#[a-f\d]{6}$/i.test(e)||/^#[a-f\d]{8}$/i.test(e);function rmSync(e){try{if(e=path_1.default.resolve(e),!fs_1.default.existsSync(e))return;if(fs_1.default.lstatSync(e).isDirectory()){const t=fs_1.default.readdirSync(e);if(t.length>0)for(let r=0,o=t.length;r<o;r++)rmSync(path_1.default.posix.join(e,t[r]));fs_1.default.rmdirSync(e)}else fs_1.default.unlinkSync(e)}catch(e){}}function mkdirSync(e){if(e=path_1.default.resolve(e),fs_1.default.existsSync(e)){if(fs_1.default.lstatSync(e).isDirectory())return;fs_1.default.unlinkSync(e)}mkdirSync(path_1.default.dirname(e)),fs_1.default.mkdirSync(e)}function escapeQuot(e,t="`"){return e?"`"===t?e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$/g,"\\$"):'"'===t?e.replace(/\\/g,"\\\\").replace(/\r\n/g,"\n").replace(/\n/g,"\\n").replace(/"/g,'\\"'):"'"===t?e.replace(/\\/g,"\\\\").replace(/\r\n/g,"\n").replace(/\n/g,"\\n").replace(/'/g,"\\'"):e:e}function trailing(e,t,r=!1){return r?e.endsWith(t)?e.slice(0,e.length-1):e:e.endsWith(t)?e:e+t}function leading(e,t,r=!1){return r?e.startsWith(t)?e.slice(1):e:e.startsWith(t)?e:t+e}exports.isHexColor=isHexColor,exports.rmSync=rmSync,exports.mkdirSync=mkdirSync,exports.escapeQuot=escapeQuot,exports.trailing=trailing,exports.leading=leading;const FFSPRGRulesFactory=function(e){let t=null,r=Object.create(null);return function(e,o){if(o.length<1)return!1;if(t===o){if(void 0!==r[e])return r[e]}else t=o,r=Object.create(null);const n=e.replace(/\\/g,"/").toLowerCase();if(!n)return!1;const i=n.slice(n.lastIndexOf("/")+1);let a=!1;for(const e of o){if(!e)continue;const t=e.value.toLowerCase();if("prefix"===e.type)a=i.startsWith(t);else if("suffix"===e.type)a=i.endsWith(t);else if("folder"===e.type)a=leading(n,"/").startsWith(trailing(leading(t,"/"),"/"));else if("file"===e.type)a=leading(n,"/")===leading(t,"/");else if("glob"===e.type)try{a=(0,minimatch_1.default)(n,t)||(0,minimatch_1.default)(leading(n,"/"),t)}catch(e){a=!1}else if("regexp"===e.type)try{a=new RegExp(t,"igm").test(n)||new RegExp(t,"igm").test(leading(n,"/"))}catch(e){a=!1}if(a)break}return r[e]=a,a}};function formatSourceMap(e){if(e){if("string"===getType(e))return e;try{return JSON.stringify(e)}catch(e){}}}function generateMD5(e){const t=crypto_1.default.createHash("md5");return t.update(e),t.digest("hex")}exports.isFileIgnored=FFSPRGRulesFactory(),exports.isFileIncluded=FFSPRGRulesFactory(),exports.formatSourceMap=formatSourceMap,exports.generateMD5=generateMD5;const formatNumber=e=>e>9?""+e:"0"+e;exports.formatNumber=formatNumber;const formatTime=e=>{const t=e.getFullYear(),r=e.getMonth()+1,o=e.getDate(),n=e.getHours(),i=e.getMinutes(),a=e.getSeconds();return`${[t,r,o].map(exports.formatNumber).join("/")} ${[n,i,a].map(exports.formatNumber).join(":")}`};exports.formatTime=formatTime;const getWorkersPath=e=>"string"==typeof e?e:e.path;exports.getWorkersPath=getWorkersPath;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getWorkersPath=exports.formatTime=exports.formatNumber=exports.generateMD5=exports.formatSourceMap=exports.isFileIncluded=exports.isFileIgnored=exports.leading=exports.trailing=exports.escapeQuot=exports.mkdirSync=exports.rmSync=exports.isHexColor=exports.formatJSONParseErr=exports.bufferToUtf8String=exports.getType=exports.normalizePath=void 0;const tslib_1=require("tslib"),fs_1=tslib_1.__importDefault(require("fs")),path_1=tslib_1.__importDefault(require("path")),babel_code_frame_1=tslib_1.__importDefault(require("babel-code-frame")),minimatch_1=tslib_1.__importDefault(require("minimatch")),crypto_1=tslib_1.__importDefault(require("crypto")),jsonlint=require("./jsonlint");function normalizePath(e=""){const t=path_1.default.posix.normalize(e.replace(/\\/g,"/"));return!e.startsWith("//")&&!e.startsWith("\\\\")||t.startsWith("//")?t:"/"+t}function getType(e){return Object.prototype.toString.call(e).toLowerCase().split(" ")[1].replace("]","")}exports.normalizePath=normalizePath,exports.getType=getType;const bufferToUtf8String=e=>{const t=e.toString();if(0===Buffer.compare(Buffer.from(t,"utf8"),e))return t};function getErrLine(e,t,r,o){r=r>0?r:1;return`${o}\n${(0,babel_code_frame_1.default)(e,t,r)}`}exports.bufferToUtf8String=bufferToUtf8String;const formatJSONParseErr=e=>{const t=e.data||"";try{jsonlint.parser.parse(t)}catch(r){try{const o=`Expecting ${r.expected}, got ${r.token}`,n=getErrLine(t,r.line,r.loc.first_column,o);return`${e.filePath}\n${n}`}catch(e){}}return`${e.filePath}\n${e.error}`};exports.formatJSONParseErr=formatJSONParseErr;const isHexColor=e=>/^#[a-f\d]{3}$/i.test(e)||/^#[a-f\d]{4}$/i.test(e)||/^#[a-f\d]{6}$/i.test(e)||/^#[a-f\d]{8}$/i.test(e);function rmSync(e){try{if(e=path_1.default.resolve(e),!fs_1.default.existsSync(e))return;if(fs_1.default.lstatSync(e).isDirectory()){const t=fs_1.default.readdirSync(e);if(t.length>0)for(let r=0,o=t.length;r<o;r++)rmSync(path_1.default.posix.join(e,t[r]));fs_1.default.rmdirSync(e)}else fs_1.default.unlinkSync(e)}catch(e){}}function mkdirSync(e){if(e=path_1.default.resolve(e),fs_1.default.existsSync(e)){if(fs_1.default.lstatSync(e).isDirectory())return;fs_1.default.unlinkSync(e)}mkdirSync(path_1.default.dirname(e)),fs_1.default.mkdirSync(e)}function escapeQuot(e,t="`"){return e?"`"===t?e.replace(/\\/g,"\\\\").replace(/`/g,"\\`").replace(/\$/g,"\\$"):'"'===t?e.replace(/\\/g,"\\\\").replace(/\r\n/g,"\n").replace(/\n/g,"\\n").replace(/"/g,'\\"'):"'"===t?e.replace(/\\/g,"\\\\").replace(/\r\n/g,"\n").replace(/\n/g,"\\n").replace(/'/g,"\\'"):e:e}function trailing(e,t,r=!1){return r?e.endsWith(t)?e.slice(0,e.length-1):e:e.endsWith(t)?e:e+t}function leading(e,t,r=!1){return r?e.startsWith(t)?e.slice(1):e:e.startsWith(t)?e:t+e}exports.isHexColor=isHexColor,exports.rmSync=rmSync,exports.mkdirSync=mkdirSync,exports.escapeQuot=escapeQuot,exports.trailing=trailing,exports.leading=leading;const FFSPRGRulesFactory=function(e){let t=null,r=Object.create(null);return function(e,o){if(o.length<1)return!1;if(t===o){if(void 0!==r[e])return r[e]}else t=o,r=Object.create(null);const n=e.replace(/\\/g,"/").toLowerCase();if(!n)return!1;const i=n.slice(n.lastIndexOf("/")+1);let a=!1;for(const e of o){if(!e)continue;const t=e.value.toLowerCase();if("prefix"===e.type)a=i.startsWith(t);else if("suffix"===e.type)a=i.endsWith(t);else if("folder"===e.type)a=leading(n,"/").startsWith(trailing(leading(t,"/"),"/"));else if("file"===e.type)a=leading(n,"/")===leading(t,"/");else if("glob"===e.type)try{a=(0,minimatch_1.default)(n,t)||(0,minimatch_1.default)(leading(n,"/"),t)}catch(e){a=!1}else if("regexp"===e.type)try{a=new RegExp(t,"igm").test(n)||new RegExp(t,"igm").test(leading(n,"/"))}catch(e){a=!1}if(a)break}return r[e]=a,a}};function formatSourceMap(e){if(e){if("string"===getType(e))return e;try{return JSON.stringify(e)}catch(e){}}}function generateMD5(e){const t=crypto_1.default.createHash("md5");return t.update(e),t.digest("hex")}exports.isFileIgnored=FFSPRGRulesFactory(),exports.isFileIncluded=FFSPRGRulesFactory(),exports.formatSourceMap=formatSourceMap,exports.generateMD5=generateMD5;const formatNumber=e=>e>9?""+e:"0"+e;exports.formatNumber=formatNumber;const formatTime=e=>{const t=e.getFullYear(),r=e.getMonth()+1,o=e.getDate(),n=e.getHours(),i=e.getMinutes(),a=e.getSeconds();return`${[t,r,o].map(exports.formatNumber).join("/")} ${[n,i,a].map(exports.formatNumber).join(":")}`};exports.formatTime=formatTime;const getWorkersPath=e=>"string"==typeof e?e:e.path;exports.getWorkersPath=getWorkersPath;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1,3 +1,3 @@
1
1
  !function(require, directRequire){
2
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getWhiteExtList=exports.GameWhiteList=exports.MiniProgramWhiteList=void 0;const tslib_1=require("tslib"),url_config_1=require("./url_config"),request_1=require("./request"),log_1=(0,tslib_1.__importDefault)(require("./log")),jsonParse_1=require("./jsonParse");let cacheResult;async function getWhiteExtList(){if(cacheResult)return cacheResult;try{const{body:t}=await(0,request_1.request)({url:url_config_1.GET_WHITE_EXT_LIST,method:"get"}),e=(0,jsonParse_1.jsonRespParse)(t,url_config_1.GET_WHITE_EXT_LIST);if(0===e.errCode&&e.data)return cacheResult={GameWhiteList:new Set(e.data.game||exports.GameWhiteList),MiniProgramWhiteList:new Set(e.data.miniProgram||exports.MiniProgramWhiteList)},cacheResult}catch(t){log_1.default.error("get white ext list fail "+t)}return{GameWhiteList:new Set(exports.GameWhiteList),MiniProgramWhiteList:new Set(exports.MiniProgramWhiteList)}}exports.MiniProgramWhiteList=[".wxml",".wxss",".wxs",".png",".jpg",".jpeg",".gif",".svg",".js",".json",".cer",".mp3",".aac",".m4a",".mp4",".wav",".ogg",".silk",".wasm",".br",".cur",".ico",".skel",".crt",".cert"],exports.GameWhiteList=[".png",".jpg",".jpeg",".gif",".svg",".js",".json",".cer",".obj",".dae",".fbx",".mtl",".stl",".3ds",".mp3",".pvr",".wav",".plist",".ttf",".fnt",".gz",".ccz",".m4a",".mp4",".bmp",".atlas",".swf",".ani",".part",".proto",".bin",".sk",".mipmaps",".txt",".zip",".ogg",".silk",".dbbin",".dbmv",".etc",".lmat",".lm",".ls",".lh",".lani",".lav",".lsani",".ltc",".csv",".scene",".prefab",".lml",".lmani",".ktx",".dds",".xml",".aac",".pkm",".skel",".cur",".ico",".wasm",".br",".gltf",".glb",".astc",".dat",".tt"],exports.getWhiteExtList=getWhiteExtList;
2
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getWhiteExtList=exports.GameWhiteList=exports.MiniProgramWhiteList=void 0;const tslib_1=require("tslib"),url_config_1=require("./url_config"),request_1=require("./request"),log_1=tslib_1.__importDefault(require("./log")),jsonParse_1=require("./jsonParse");let cacheResult;async function getWhiteExtList(){if(cacheResult)return cacheResult;try{const{body:t}=await(0,request_1.request)({url:url_config_1.GET_WHITE_EXT_LIST,method:"get"}),e=(0,jsonParse_1.jsonRespParse)(t,url_config_1.GET_WHITE_EXT_LIST);if(0===e.errCode&&e.data)return cacheResult={GameWhiteList:new Set(e.data.game||exports.GameWhiteList),MiniProgramWhiteList:new Set(e.data.miniProgram||exports.MiniProgramWhiteList)},cacheResult}catch(t){log_1.default.error("get white ext list fail "+t)}return{GameWhiteList:new Set(exports.GameWhiteList),MiniProgramWhiteList:new Set(exports.MiniProgramWhiteList)}}exports.MiniProgramWhiteList=[".wxml",".wxss",".wxs",".png",".jpg",".jpeg",".gif",".svg",".js",".json",".cer",".mp3",".aac",".m4a",".mp4",".wav",".ogg",".silk",".wasm",".br",".cur",".ico",".skel",".crt",".cert"],exports.GameWhiteList=[".png",".jpg",".jpeg",".gif",".svg",".js",".json",".cer",".obj",".dae",".fbx",".mtl",".stl",".3ds",".mp3",".pvr",".wav",".plist",".ttf",".fnt",".gz",".ccz",".m4a",".mp4",".bmp",".atlas",".swf",".ani",".part",".proto",".bin",".sk",".mipmaps",".txt",".zip",".ogg",".silk",".dbbin",".dbmv",".etc",".lmat",".lm",".ls",".lh",".lani",".lav",".lsani",".ltc",".csv",".scene",".prefab",".lml",".lmani",".ktx",".dds",".xml",".aac",".pkm",".skel",".cur",".ico",".wasm",".br",".gltf",".glb",".astc",".dat",".tt"],exports.getWhiteExtList=getWhiteExtList;
3
3
  }(require("licia/lazyImport")(require), require)
@@ -1 +1 @@
1
- var AwaitValue=require("./AwaitValue");function AsyncGenerator(e){var t,n;function r(t,n){try{var u=e[t](n),a=u.value,i=a instanceof AwaitValue;Promise.resolve(i?a.wrapped:a).then((function(e){i?r("return"===t?"return":"next",e):o(u.done?"return":"normal",e)}),(function(e){r("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)?r(t.key,t.arg):n=null}this._invoke=function(e,o){return new Promise((function(u,a){var i={key:e,arg:o,resolve:u,reject:a,next:null};n?n=n.next=i:(t=n=i,r(e,o))}))},"function"!=typeof e.return&&(this.return=void 0)}"function"==typeof Symbol&&Symbol.asyncIterator&&(AsyncGenerator.prototype[Symbol.asyncIterator]=function(){return this}),AsyncGenerator.prototype.next=function(e){return this._invoke("next",e)},AsyncGenerator.prototype.throw=function(e){return this._invoke("throw",e)},AsyncGenerator.prototype.return=function(e){return this._invoke("return",e)},module.exports=AsyncGenerator;
1
+ var OverloadYield=require("./OverloadYield");function AsyncGenerator(e){var r,n;function t(r,n){try{var u=e[r](n),i=u.value,a=i instanceof OverloadYield;Promise.resolve(a?i.v:i).then((function(n){if(a){var c="return"===r?"return":"next";if(!i.k||n.done)return t(c,n);n=e[c](n).value}o(u.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(u,i){var a={key:e,arg:o,resolve:u,reject:i,next:null};n?n=n.next=a:(r=n=a,t(e,o))}))},"function"!=typeof e.return&&(this.return=void 0)}AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},AsyncGenerator.prototype.next=function(e){return this._invoke("next",e)},AsyncGenerator.prototype.throw=function(e){return this._invoke("throw",e)},AsyncGenerator.prototype.return=function(e){return this._invoke("return",e)},module.exports=AsyncGenerator;
@@ -0,0 +1 @@
1
+ function _OverloadYield(e,d){this.v=e,this.k=d}module.exports=_OverloadYield;
@@ -0,0 +1 @@
1
+ var _typeof=require("./typeof");function old_createMetadataMethodsForProperty(e,t,a,r){return{getMetadata:function(o){old_assertNotFinished(r,"getMetadata"),old_assertMetadataKey(o);var i=e[o];if(void 0!==i)if(1===t){var n=i.public;if(void 0!==n)return n[a]}else if(2===t){var l=i.private;if(void 0!==l)return l.get(a)}else if(Object.hasOwnProperty.call(i,"constructor"))return i.constructor},setMetadata:function(o,i){old_assertNotFinished(r,"setMetadata"),old_assertMetadataKey(o);var n=e[o];if(void 0===n&&(n=e[o]={}),1===t){var l=n.public;void 0===l&&(l=n.public={}),l[a]=i}else if(2===t){var s=n.priv;void 0===s&&(s=n.private=new Map),s.set(a,i)}else n.constructor=i}}}function old_convertMetadataMapToFinal(e,t){var a=e[Symbol.metadata||Symbol.for("Symbol.metadata")],r=Object.getOwnPropertySymbols(t);if(0!==r.length){for(var o=0;o<r.length;o++){var i=r[o],n=t[i],l=a?a[i]:null,s=n.public,c=l?l.public:null;s&&c&&Object.setPrototypeOf(s,c);var d=n.private;if(d){var u=Array.from(d.values()),f=l?l.private:null;f&&(u=u.concat(f)),n.private=u}l&&Object.setPrototypeOf(n,l)}a&&Object.setPrototypeOf(t,a),e[Symbol.metadata||Symbol.for("Symbol.metadata")]=t}}function old_createAddInitializerMethod(e,t){return function(a){old_assertNotFinished(t,"addInitializer"),old_assertCallable(a,"An initializer"),e.push(a)}}function old_memberDec(e,t,a,r,o,i,n,l,s){var c;switch(i){case 1:c="accessor";break;case 2:c="method";break;case 3:c="getter";break;case 4:c="setter";break;default:c="field"}var d,u,f={kind:c,name:l?"#"+t:t,isStatic:n,isPrivate:l},p={v:!1};if(0!==i&&(f.addInitializer=old_createAddInitializerMethod(o,p)),l){d=2,u=Symbol(t);var v={};0===i?(v.get=a.get,v.set=a.set):2===i?v.get=function(){return a.value}:(1!==i&&3!==i||(v.get=function(){return a.get.call(this)}),1!==i&&4!==i||(v.set=function(e){a.set.call(this,e)})),f.access=v}else d=1,u=t;try{return e(s,Object.assign(f,old_createMetadataMethodsForProperty(r,d,u,p)))}finally{p.v=!0}}function old_assertNotFinished(e,t){if(e.v)throw new Error("attempted to call "+t+" after decoration was finished")}function old_assertMetadataKey(e){if("symbol"!=_typeof(e))throw new TypeError("Metadata keys must be symbols, received: "+e)}function old_assertCallable(e,t){if("function"!=typeof e)throw new TypeError(t+" must be a function")}function old_assertValidReturnValue(e,t){var a=_typeof(t);if(1===e){if("object"!==a||null===t)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==t.get&&old_assertCallable(t.get,"accessor.get"),void 0!==t.set&&old_assertCallable(t.set,"accessor.set"),void 0!==t.init&&old_assertCallable(t.init,"accessor.init"),void 0!==t.initializer&&old_assertCallable(t.initializer,"accessor.initializer")}else if("function"!==a)throw new TypeError((0===e?"field":10===e?"class":"method")+" decorators must return a function or void 0")}function old_getInit(e){var t;return null==(t=e.init)&&(t=e.initializer)&&"undefined"!=typeof console&&console.warn(".initializer has been renamed to .init as of March 2022"),t}function old_applyMemberDec(e,t,a,r,o,i,n,l,s){var c,d,u,f,p,v,y=a[0];if(n?c=0===o||1===o?{get:a[3],set:a[4]}:3===o?{get:a[3]}:4===o?{set:a[3]}:{value:a[3]}:0!==o&&(c=Object.getOwnPropertyDescriptor(t,r)),1===o?u={get:c.get,set:c.set}:2===o?u=c.value:3===o?u=c.get:4===o&&(u=c.set),"function"==typeof y)void 0!==(f=old_memberDec(y,r,c,l,s,o,i,n,u))&&(old_assertValidReturnValue(o,f),0===o?d=f:1===o?(d=old_getInit(f),p=f.get||u.get,v=f.set||u.set,u={get:p,set:v}):u=f);else for(var h=y.length-1;h>=0;h--){var b;void 0!==(f=old_memberDec(y[h],r,c,l,s,o,i,n,u))&&(old_assertValidReturnValue(o,f),0===o?b=f:1===o?(b=old_getInit(f),p=f.get||u.get,v=f.set||u.set,u={get:p,set:v}):u=f,void 0!==b&&(void 0===d?d=b:"function"==typeof d?d=[d,b]:d.push(b)))}if(0===o||1===o){if(void 0===d)d=function(e,t){return t};else if("function"!=typeof d){var g=d;d=function(e,t){for(var a=t,r=0;r<g.length;r++)a=g[r].call(e,a);return a}}else{var _=d;d=function(e,t){return _.call(e,t)}}e.push(d)}0!==o&&(1===o?(c.get=u.get,c.set=u.set):2===o?c.value=u:3===o?c.get=u:4===o&&(c.set=u),n?1===o?(e.push((function(e,t){return u.get.call(e,t)})),e.push((function(e,t){return u.set.call(e,t)}))):2===o?e.push(u):e.push((function(e,t){return u.call(e,t)})):Object.defineProperty(t,r,c))}function old_applyMemberDecs(e,t,a,r,o){for(var i,n,l=new Map,s=new Map,c=0;c<o.length;c++){var d=o[c];if(Array.isArray(d)){var u,f,p,v=d[1],y=d[2],h=d.length>3,b=v>=5;if(b?(u=t,f=r,0!=(v-=5)&&(p=n=n||[])):(u=t.prototype,f=a,0!==v&&(p=i=i||[])),0!==v&&!h){var g=b?s:l,_=g.get(y)||0;if(!0===_||3===_&&4!==v||4===_&&3!==v)throw new 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: "+y);!_&&v>2?g.set(y,v):g.set(y,!0)}old_applyMemberDec(e,u,d,y,v,b,h,f,p)}}old_pushInitializers(e,i),old_pushInitializers(e,n)}function old_pushInitializers(e,t){t&&e.push((function(e){for(var a=0;a<t.length;a++)t[a].call(e);return e}))}function old_applyClassDecs(e,t,a,r){if(r.length>0){for(var o=[],i=t,n=t.name,l=r.length-1;l>=0;l--){var s={v:!1};try{var c=Object.assign({kind:"class",name:n,addInitializer:old_createAddInitializerMethod(o,s)},old_createMetadataMethodsForProperty(a,0,n,s)),d=r[l](i,c)}finally{s.v=!0}void 0!==d&&(old_assertValidReturnValue(10,d),i=d)}e.push(i,(function(){for(var e=0;e<o.length;e++)o[e].call(i)}))}}function applyDecs(e,t,a){var r=[],o={},i={};return old_applyMemberDecs(r,e,i,o,t),old_convertMetadataMapToFinal(e.prototype,i),old_applyClassDecs(r,e,o,a),old_convertMetadataMapToFinal(e,o),r}module.exports=applyDecs;
@@ -0,0 +1 @@
1
+ var applyDecs2203Impl,_typeof=require("./typeof");function applyDecs2203Factory(){function t(t,e){return function(n){!function(t,e){if(t.v)throw new Error("attempted to call addInitializer after decoration was finished")}(e),r(n,"An initializer"),t.push(n)}}function e(e,r,n,i,o,a,s,c){var u;switch(o){case 1:u="accessor";break;case 2:u="method";break;case 3:u="getter";break;case 4:u="setter";break;default:u="field"}var f,l,p={kind:u,name:s?"#"+r:r,static:a,private:s},v={v:!1};0!==o&&(p.addInitializer=t(i,v)),0===o?s?(f=n.get,l=n.set):(f=function(){return this[r]},l=function(t){this[r]=t}):2===o?f=function(){return n.value}:(1!==o&&3!==o||(f=function(){return n.get.call(this)}),1!==o&&4!==o||(l=function(t){n.set.call(this,t)})),p.access=f&&l?{get:f,set:l}:f?{get:f}:{set:l};try{return e(c,p)}finally{v.v=!0}}function r(t,e){if("function"!=typeof t)throw new TypeError(e+" must be a function")}function n(t,e){var n=_typeof(e);if(1===t){if("object"!==n||null===e)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==e.get&&r(e.get,"accessor.get"),void 0!==e.set&&r(e.set,"accessor.set"),void 0!==e.init&&r(e.init,"accessor.init")}else if("function"!==n)throw new TypeError((0===t?"field":10===t?"class":"method")+" decorators must return a function or void 0")}function i(t,r,i,o,a,s,c,u){var f,l,p,v,d,h,g=i[0];if(c?f=0===a||1===a?{get:i[3],set:i[4]}:3===a?{get:i[3]}:4===a?{set:i[3]}:{value:i[3]}:0!==a&&(f=Object.getOwnPropertyDescriptor(r,o)),1===a?p={get:f.get,set:f.set}:2===a?p=f.value:3===a?p=f.get:4===a&&(p=f.set),"function"==typeof g)void 0!==(v=e(g,o,f,u,a,s,c,p))&&(n(a,v),0===a?l=v:1===a?(l=v.init,d=v.get||p.get,h=v.set||p.set,p={get:d,set:h}):p=v);else for(var y=g.length-1;y>=0;y--){var m;void 0!==(v=e(g[y],o,f,u,a,s,c,p))&&(n(a,v),0===a?m=v:1===a?(m=v.init,d=v.get||p.get,h=v.set||p.set,p={get:d,set:h}):p=v,void 0!==m&&(void 0===l?l=m:"function"==typeof l?l=[l,m]:l.push(m)))}if(0===a||1===a){if(void 0===l)l=function(t,e){return e};else if("function"!=typeof l){var w=l;l=function(t,e){for(var r=e,n=0;n<w.length;n++)r=w[n].call(t,r);return r}}else{var b=l;l=function(t,e){return b.call(t,e)}}t.push(l)}0!==a&&(1===a?(f.get=p.get,f.set=p.set):2===a?f.value=p:3===a?f.get=p:4===a&&(f.set=p),c?1===a?(t.push((function(t,e){return p.get.call(t,e)})),t.push((function(t,e){return p.set.call(t,e)}))):2===a?t.push(p):t.push((function(t,e){return p.call(t,e)})):Object.defineProperty(r,o,f))}function o(t,e){e&&t.push((function(t){for(var r=0;r<e.length;r++)e[r].call(t);return t}))}return function(e,r,a){var s=[];return function(t,e,r){for(var n,a,s=new Map,c=new Map,u=0;u<r.length;u++){var f=r[u];if(Array.isArray(f)){var l,p,v=f[1],d=f[2],h=f.length>3,g=v>=5;if(g?(l=e,0!=(v-=5)&&(p=a=a||[])):(l=e.prototype,0!==v&&(p=n=n||[])),0!==v&&!h){var y=g?c:s,m=y.get(d)||0;if(!0===m||3===m&&4!==v||4===m&&3!==v)throw new 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: "+d);!m&&v>2?y.set(d,v):y.set(d,!0)}i(t,l,f,d,v,g,h,p)}}o(t,n),o(t,a)}(s,e,r),function(e,r,i){if(i.length>0){for(var o=[],a=r,s=r.name,c=i.length-1;c>=0;c--){var u={v:!1};try{var f=i[c](a,{kind:"class",name:s,addInitializer:t(o,u)})}finally{u.v=!0}void 0!==f&&(n(10,f),a=f)}e.push(a,(function(){for(var t=0;t<o.length;t++)o[t].call(a)}))}}(s,e,a),s}}function applyDecs2203(t,e,r){return(applyDecs2203Impl=applyDecs2203Impl||applyDecs2203Factory())(t,e,r)}module.exports=applyDecs2203;
@@ -0,0 +1 @@
1
+ var _typeof=require("./typeof");function applyDecs2203RFactory(){function t(t,e){return function(n){!function(t,e){if(t.v)throw new Error("attempted to call addInitializer after decoration was finished")}(e),r(n,"An initializer"),t.push(n)}}function e(e,r,n,o,i,a,s,c){var u;switch(i){case 1:u="accessor";break;case 2:u="method";break;case 3:u="getter";break;case 4:u="setter";break;default:u="field"}var f,l,p={kind:u,name:s?"#"+r:r,static:a,private:s},v={v:!1};0!==i&&(p.addInitializer=t(o,v)),0===i?s?(f=n.get,l=n.set):(f=function(){return this[r]},l=function(t){this[r]=t}):2===i?f=function(){return n.value}:(1!==i&&3!==i||(f=function(){return n.get.call(this)}),1!==i&&4!==i||(l=function(t){n.set.call(this,t)})),p.access=f&&l?{get:f,set:l}:f?{get:f}:{set:l};try{return e(c,p)}finally{v.v=!0}}function r(t,e){if("function"!=typeof t)throw new TypeError(e+" must be a function")}function n(t,e){var n=_typeof(e);if(1===t){if("object"!==n||null===e)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==e.get&&r(e.get,"accessor.get"),void 0!==e.set&&r(e.set,"accessor.set"),void 0!==e.init&&r(e.init,"accessor.init")}else if("function"!==n)throw new TypeError((0===t?"field":10===t?"class":"method")+" decorators must return a function or void 0")}function o(t,r,o,i,a,s,c,u){var f,l,p,v,d,h,g=o[0];if(c?f=0===a||1===a?{get:o[3],set:o[4]}:3===a?{get:o[3]}:4===a?{set:o[3]}:{value:o[3]}:0!==a&&(f=Object.getOwnPropertyDescriptor(r,i)),1===a?p={get:f.get,set:f.set}:2===a?p=f.value:3===a?p=f.get:4===a&&(p=f.set),"function"==typeof g)void 0!==(v=e(g,i,f,u,a,s,c,p))&&(n(a,v),0===a?l=v:1===a?(l=v.init,d=v.get||p.get,h=v.set||p.set,p={get:d,set:h}):p=v);else for(var y=g.length-1;y>=0;y--){var m;void 0!==(v=e(g[y],i,f,u,a,s,c,p))&&(n(a,v),0===a?m=v:1===a?(m=v.init,d=v.get||p.get,h=v.set||p.set,p={get:d,set:h}):p=v,void 0!==m&&(void 0===l?l=m:"function"==typeof l?l=[l,m]:l.push(m)))}if(0===a||1===a){if(void 0===l)l=function(t,e){return e};else if("function"!=typeof l){var w=l;l=function(t,e){for(var r=e,n=0;n<w.length;n++)r=w[n].call(t,r);return r}}else{var b=l;l=function(t,e){return b.call(t,e)}}t.push(l)}0!==a&&(1===a?(f.get=p.get,f.set=p.set):2===a?f.value=p:3===a?f.get=p:4===a&&(f.set=p),c?1===a?(t.push((function(t,e){return p.get.call(t,e)})),t.push((function(t,e){return p.set.call(t,e)}))):2===a?t.push(p):t.push((function(t,e){return p.call(t,e)})):Object.defineProperty(r,i,f))}function i(t,e){for(var r,n,i=[],s=new Map,c=new Map,u=0;u<e.length;u++){var f=e[u];if(Array.isArray(f)){var l,p,v=f[1],d=f[2],h=f.length>3,g=v>=5;if(g?(l=t,0!=(v-=5)&&(p=n=n||[])):(l=t.prototype,0!==v&&(p=r=r||[])),0!==v&&!h){var y=g?c:s,m=y.get(d)||0;if(!0===m||3===m&&4!==v||4===m&&3!==v)throw new 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: "+d);!m&&v>2?y.set(d,v):y.set(d,!0)}o(i,l,f,d,v,g,h,p)}}return a(i,r),a(i,n),i}function a(t,e){e&&t.push((function(t){for(var r=0;r<e.length;r++)e[r].call(t);return t}))}return function(e,r,o){return{e:i(e,r),get c(){return function(e,r){if(r.length>0){for(var o=[],i=e,a=e.name,s=r.length-1;s>=0;s--){var c={v:!1};try{var u=r[s](i,{kind:"class",name:a,addInitializer:t(o,c)})}finally{c.v=!0}void 0!==u&&(n(10,u),i=u)}return[i,function(){for(var t=0;t<o.length;t++)o[t].call(i)}]}}(e,o)}}}}function applyDecs2203R(t,e,r){return(module.exports=applyDecs2203R=applyDecs2203RFactory())(t,e,r)}module.exports=applyDecs2203R;
@@ -0,0 +1 @@
1
+ var _typeof=require("./typeof"),checkInRHS=require("./checkInRHS");function createAddInitializerMethod(e,t){return function(r){assertNotFinished(t,"addInitializer"),assertCallable(r,"An initializer"),e.push(r)}}function assertInstanceIfPrivate(e,t){if(!e(t))throw new TypeError("Attempted to access private element on non-instance")}function memberDec(e,t,r,n,a,i,s,o,c){var u;switch(a){case 1:u="accessor";break;case 2:u="method";break;case 3:u="getter";break;case 4:u="setter";break;default:u="field"}var l,f,p={kind:u,name:s?"#"+t:t,static:i,private:s},d={v:!1};if(0!==a&&(p.addInitializer=createAddInitializerMethod(n,d)),s||0!==a&&2!==a)if(2===a)l=function(e){return assertInstanceIfPrivate(c,e),r.value};else{var h=0===a||1===a;(h||3===a)&&(l=s?function(e){return assertInstanceIfPrivate(c,e),r.get.call(e)}:function(e){return r.get.call(e)}),(h||4===a)&&(f=s?function(e,t){assertInstanceIfPrivate(c,e),r.set.call(e,t)}:function(e,t){r.set.call(e,t)})}else l=function(e){return e[t]},0===a&&(f=function(e,r){e[t]=r});var v=s?c.bind():function(e){return t in e};p.access=l&&f?{get:l,set:f,has:v}:l?{get:l,has:v}:{set:f,has:v};try{return e(o,p)}finally{d.v=!0}}function assertNotFinished(e,t){if(e.v)throw new Error("attempted to call "+t+" after decoration was finished")}function assertCallable(e,t){if("function"!=typeof e)throw new TypeError(t+" must be a function")}function assertValidReturnValue(e,t){var r=_typeof(t);if(1===e){if("object"!==r||null===t)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");void 0!==t.get&&assertCallable(t.get,"accessor.get"),void 0!==t.set&&assertCallable(t.set,"accessor.set"),void 0!==t.init&&assertCallable(t.init,"accessor.init")}else if("function"!==r)throw new TypeError((0===e?"field":10===e?"class":"method")+" decorators must return a function or void 0")}function curryThis1(e){return function(){return e(this)}}function curryThis2(e){return function(t){e(this,t)}}function applyMemberDec(e,t,r,n,a,i,s,o,c){var u,l,f,p,d,h,v=r[0];if(s?u=0===a||1===a?{get:curryThis1(r[3]),set:curryThis2(r[4])}:3===a?{get:r[3]}:4===a?{set:r[3]}:{value:r[3]}:0!==a&&(u=Object.getOwnPropertyDescriptor(t,n)),1===a?f={get:u.get,set:u.set}:2===a?f=u.value:3===a?f=u.get:4===a&&(f=u.set),"function"==typeof v)void 0!==(p=memberDec(v,n,u,o,a,i,s,f,c))&&(assertValidReturnValue(a,p),0===a?l=p:1===a?(l=p.init,d=p.get||f.get,h=p.set||f.set,f={get:d,set:h}):f=p);else for(var g=v.length-1;g>=0;g--){var y;void 0!==(p=memberDec(v[g],n,u,o,a,i,s,f,c))&&(assertValidReturnValue(a,p),0===a?y=p:1===a?(y=p.init,d=p.get||f.get,h=p.set||f.set,f={get:d,set:h}):f=p,void 0!==y&&(void 0===l?l=y:"function"==typeof l?l=[l,y]:l.push(y)))}if(0===a||1===a){if(void 0===l)l=function(e,t){return t};else if("function"!=typeof l){var m=l;l=function(e,t){for(var r=t,n=0;n<m.length;n++)r=m[n].call(e,r);return r}}else{var b=l;l=function(e,t){return b.call(e,t)}}e.push(l)}0!==a&&(1===a?(u.get=f.get,u.set=f.set):2===a?u.value=f:3===a?u.get=f:4===a&&(u.set=f),s?1===a?(e.push((function(e,t){return f.get.call(e,t)})),e.push((function(e,t){return f.set.call(e,t)}))):2===a?e.push(f):e.push((function(e,t){return f.call(e,t)})):Object.defineProperty(t,n,u))}function applyMemberDecs(e,t,r){for(var n,a,i,s=[],o=new Map,c=new Map,u=0;u<t.length;u++){var l=t[u];if(Array.isArray(l)){var f,p,d=l[1],h=l[2],v=l.length>3,g=d>=5,y=r;if(g?(f=e,0!=(d-=5)&&(p=a=a||[]),v&&!i&&(i=function(t){return checkInRHS(t)===e}),y=i):(f=e.prototype,0!==d&&(p=n=n||[])),0!==d&&!v){var m=g?c:o,b=m.get(h)||0;if(!0===b||3===b&&4!==d||4===b&&3!==d)throw new 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&&d>2?m.set(h,d):m.set(h,!0)}applyMemberDec(s,f,l,h,d,g,v,p,y)}}return pushInitializers(s,n),pushInitializers(s,a),s}function pushInitializers(e,t){t&&e.push((function(e){for(var r=0;r<t.length;r++)t[r].call(e);return e}))}function applyClassDecs(e,t){if(t.length>0){for(var r=[],n=e,a=e.name,i=t.length-1;i>=0;i--){var s={v:!1};try{var o=t[i](n,{kind:"class",name:a,addInitializer:createAddInitializerMethod(r,s)})}finally{s.v=!0}void 0!==o&&(assertValidReturnValue(10,o),n=o)}return[n,function(){for(var e=0;e<r.length;e++)r[e].call(n)}]}}function applyDecs2301(e,t,r,n){return{e:applyMemberDecs(e,t,n),get c(){return applyClassDecs(e,r)}}}module.exports=applyDecs2301;
@@ -1 +1 @@
1
- function _asyncGeneratorDelegate(t,n){var r={},e=!1;function o(r,o){return e=!0,o=new Promise((function(n){n(t[r](o))})),{done:!1,value:n(o)}}return"function"==typeof Symbol&&Symbol.iterator&&(r[Symbol.iterator]=function(){return this}),r.next=function(t){return e?(e=!1,t):o("next",t)},"function"==typeof t.throw&&(r.throw=function(t){if(e)throw e=!1,t;return o("throw",t)}),"function"==typeof t.return&&(r.return=function(t){return e?(e=!1,t):o("return",t)}),r}module.exports=_asyncGeneratorDelegate;
1
+ var OverloadYield=require("./OverloadYield");function _asyncGeneratorDelegate(e){var r={},n=!1;function t(r,t){return n=!0,t=new Promise((function(n){n(e[r](t))})),{done:!1,value:new OverloadYield(t,1)}}return r["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},r.next=function(e){return n?(n=!1,e):t("next",e)},"function"==typeof e.throw&&(r.throw=function(e){if(n)throw n=!1,e;return t("throw",e)}),"function"==typeof e.return&&(r.return=function(e){return n?(n=!1,e):t("return",e)}),r}module.exports=_asyncGeneratorDelegate;