miniprogram-ci 1.9.26 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -166
- package/README.md +10 -5
- package/bin/.DS_Store +0 -0
- package/bin/miniprogram-ci.js +1 -1
- package/dist/@types/ci/checkCodeQuality.d.ts +2 -2
- package/dist/@types/ci/cloud/cloudapi.d.ts +7 -0
- package/dist/@types/ci/cloud/createTimeTrigger.d.ts +13 -0
- package/dist/@types/ci/cloud/uploadContainer.d.ts +71 -0
- package/dist/@types/ci/cloud/uploadFile.d.ts +9 -0
- package/dist/@types/ci/cloud/uploadFunction.d.ts +13 -0
- package/dist/@types/ci/cloud/utils.d.ts +17 -0
- package/dist/@types/ci/code-analyse.d.ts +1 -1
- package/dist/@types/ci/getcompiler.d.ts +5 -0
- package/dist/@types/ci/index.d.ts +39 -0
- package/dist/@types/ci/project.d.ts +1 -47
- package/dist/@types/ci/utils/codeDenpendencyQualityChecker.d.ts +1 -1
- package/dist/@types/ci/utils/tools.d.ts +5 -0
- package/dist/@types/cli/cmdForDonutH5.d.ts +22 -0
- package/dist/@types/common/cloud-api/src/apis/tcb/tcb.apis.d.ts +180 -0
- package/dist/@types/common/cloud-api/src/transaction/contracts/account.contracts.d.ts +2 -0
- package/dist/@types/common/cloud-api/src/transaction/contracts/contracts.d.ts +9 -0
- package/dist/@types/common/cloud-api/src/transaction/contracts/lowcode.contracts.d.ts +3 -0
- package/dist/@types/common/cloud-api/src/transaction/contracts/tcb.contracts.d.ts +183 -0
- package/dist/@types/common/cloud-api/src/transaction/validations/account.validations.d.ts +2 -0
- package/dist/@types/common/cloud-api/src/transaction/validations/common.validations.d.ts +118 -0
- package/dist/@types/common/cloud-api/src/transaction/validations/lowcode.validations.d.ts +3 -0
- package/dist/@types/common/cloud-api/src/transaction/validations/tcb.validations.d.ts +188 -0
- package/dist/@types/common/cloud-api/src/transaction/validations/validations.d.ts +8 -0
- package/dist/@types/common/code-analyse/index.d.ts +371 -0
- package/dist/@types/config/compiletype.config.d.ts +17 -0
- package/dist/@types/config/config.d.ts +93 -0
- package/dist/@types/config/define.d.ts +5 -0
- package/dist/@types/config/url.config.d.ts +25 -0
- package/dist/@types/index.d.ts +27 -38
- package/dist/@types/modules/corecompiler/baseCompiler.d.ts +132 -0
- package/dist/@types/modules/corecompiler/original/analyse/partial.d.ts +25 -0
- package/dist/@types/modules/corecompiler/original/compile/common.d.ts +17 -0
- package/dist/@types/modules/corecompiler/original/compile/game.d.ts +5 -0
- package/dist/@types/modules/corecompiler/original/compile/gamePlugin.d.ts +8 -0
- package/dist/@types/modules/corecompiler/original/compile/handler/js.d.ts +15 -0
- package/dist/@types/modules/corecompiler/original/compile/handler/mpjson.d.ts +10 -0
- package/dist/@types/modules/corecompiler/original/compile/handler/wxml.d.ts +9 -0
- package/dist/@types/modules/corecompiler/original/compile/handler/wxss.d.ts +10 -0
- package/dist/@types/modules/corecompiler/original/compile/index.d.ts +5 -0
- package/dist/@types/modules/corecompiler/original/compile/miniprogram.d.ts +5 -0
- package/dist/@types/modules/corecompiler/original/compile/miniprogramPlugin.d.ts +8 -0
- package/dist/@types/modules/corecompiler/original/index.d.ts +51 -0
- package/dist/@types/modules/corecompiler/original/js/index.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/js/minifyjs.d.ts +16 -0
- package/dist/@types/modules/corecompiler/original/js/minifyjsAfterWrap.d.ts +12 -0
- package/dist/@types/modules/corecompiler/original/json/app/appJSON.d.ts +6 -0
- package/dist/@types/modules/corecompiler/original/json/app/checkAppFields.d.ts +43 -0
- package/dist/@types/modules/corecompiler/original/json/app/extJSON.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/json/app/index.d.ts +4 -0
- package/dist/@types/modules/corecompiler/original/json/common.d.ts +19 -0
- package/dist/@types/modules/corecompiler/original/json/game.d.ts +4 -0
- package/dist/@types/modules/corecompiler/original/json/page/checkPageJSON.d.ts +6 -0
- package/dist/@types/modules/corecompiler/original/json/page/getPageJSON.d.ts +14 -0
- package/dist/@types/modules/corecompiler/original/json/plugin/plugin.d.ts +12 -0
- package/dist/@types/modules/corecompiler/original/json/plugin/pluginPage.d.ts +9 -0
- package/dist/@types/modules/corecompiler/original/json/projectconfig.d.ts +2 -0
- package/dist/@types/modules/corecompiler/original/json/reactiveCache.d.ts +24 -0
- package/dist/@types/modules/corecompiler/original/json/signaturejson.d.ts +21 -0
- package/dist/@types/modules/corecompiler/original/json/sitemap.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/json/theme.d.ts +18 -0
- package/dist/@types/modules/corecompiler/original/npm/packnpm.d.ts +13 -0
- package/dist/@types/modules/corecompiler/original/protect/uglifyfilenames.d.ts +9 -0
- package/dist/@types/modules/corecompiler/original/utils/env.d.ts +7 -0
- package/dist/@types/modules/corecompiler/original/validate/appjson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/validate/extjson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/validate/gamejson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/validate/gamepluginjson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/validate/pagejson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/validate/pluginjson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/validate/pluginpagejson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/validate/projectconfig.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/validate/schemaValidate.d.ts +8 -0
- package/dist/@types/modules/corecompiler/original/validate/signaturejson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/validate/sitemapjson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/workerThread/childprocessManager.d.ts +16 -0
- package/dist/@types/modules/corecompiler/original/workerThread/index.d.ts +4 -0
- package/dist/@types/modules/corecompiler/original/workerThread/task/compilejs.d.ts +43 -0
- package/dist/@types/modules/corecompiler/original/workerThread/task/compilewxss.d.ts +21 -0
- package/dist/@types/modules/corecompiler/original/workerThread/task/index.d.ts +2 -0
- package/dist/@types/modules/corecompiler/original/workerThread/task/minifywxml.d.ts +46 -0
- package/dist/@types/modules/corecompiler/original/workerThread/workerManager.d.ts +19 -0
- package/dist/@types/modules/corecompiler/originalCompiler.d.ts +106 -0
- package/dist/@types/modules/corecompiler/summer/graph/appconf.d.ts +36 -0
- package/dist/@types/modules/corecompiler/summer/graph/appgraph.d.ts +24 -0
- package/dist/@types/modules/corecompiler/summer/graph/baseconf.d.ts +16 -0
- package/dist/@types/modules/corecompiler/summer/graph/basegraph.d.ts +88 -0
- package/dist/@types/modules/corecompiler/summer/graph/gameconf.d.ts +20 -0
- package/dist/@types/modules/corecompiler/summer/graph/gamegraph.d.ts +24 -0
- package/dist/@types/modules/corecompiler/summer/graph/gamepluginconf.d.ts +11 -0
- package/dist/@types/modules/corecompiler/summer/graph/gameplugingraph.d.ts +23 -0
- package/dist/@types/modules/corecompiler/summer/graph/pluginconf.d.ts +21 -0
- package/dist/@types/modules/corecompiler/summer/graph/plugingraph.d.ts +23 -0
- package/dist/@types/modules/corecompiler/summer/graph/util.d.ts +2 -0
- package/dist/@types/modules/corecompiler/summer/index.d.ts +3 -0
- package/dist/@types/modules/corecompiler/summer/initPlugin.d.ts +2 -0
- package/dist/@types/modules/corecompiler/summer/module.d.ts +44 -0
- package/dist/@types/modules/corecompiler/summer/persistCache.d.ts +13 -0
- package/dist/@types/modules/corecompiler/summer/pluginDriver.d.ts +45 -0
- package/dist/@types/modules/corecompiler/summer/pluginconfig.d.ts +4 -0
- package/dist/@types/modules/corecompiler/summer/plugins/base/es6module.d.ts +21 -0
- package/dist/@types/modules/corecompiler/summer/plugins/base/javascript.d.ts +3 -0
- package/dist/@types/modules/corecompiler/summer/plugins/base/swc.d.ts +6 -0
- package/dist/@types/modules/corecompiler/summer/plugins/base/wxss.d.ts +6 -0
- package/dist/@types/modules/corecompiler/summer/plugins/enhance.d.ts +4 -0
- package/dist/@types/modules/corecompiler/summer/plugins/less.d.ts +5 -0
- package/dist/@types/modules/corecompiler/summer/plugins/minifywxml.d.ts +5 -0
- package/dist/@types/modules/corecompiler/summer/plugins/sass.d.ts +3 -0
- package/dist/@types/modules/corecompiler/summer/plugins/terser.d.ts +2 -0
- package/dist/@types/modules/corecompiler/summer/plugins/typescript.d.ts +2 -0
- package/dist/@types/modules/corecompiler/summer/plugins/worklet.d.ts +4 -0
- package/dist/@types/modules/corecompiler/summer/resolver.d.ts +29 -0
- package/dist/@types/modules/corecompiler/summer/summer.d.ts +40 -0
- package/dist/@types/modules/corecompiler/summer/utils/ensureArray.d.ts +1 -0
- package/dist/@types/modules/corecompiler/summer/utils/inputsourcemap.d.ts +2 -0
- package/dist/@types/modules/corecompiler/summer/worker.d.ts +16 -0
- package/dist/@types/modules/corecompiler/summerCompiler.d.ts +121 -0
- package/dist/@types/modules/createSummer.d.ts +18 -0
- package/dist/@types/modules/fullcompiler/app/app.d.ts +74 -0
- package/dist/@types/modules/fullcompiler/app/contactandlaunch/originalcontactbase64.d.ts +2 -0
- package/dist/@types/modules/fullcompiler/app/contactandlaunch/originallaunchbase64.d.ts +2 -0
- package/dist/@types/modules/fullcompiler/app/contactandlaunch/updateContactForSubpkg.d.ts +2 -0
- package/dist/@types/modules/fullcompiler/app/contactandlaunch/updatecontactandlaunch.d.ts +3 -0
- package/dist/@types/modules/fullcompiler/appservice/appservice.config.d.ts +4 -0
- package/dist/@types/modules/fullcompiler/appservice/generatecode.utils.d.ts +12 -0
- package/dist/@types/modules/fullcompiler/appservice/getappservice.d.ts +9 -0
- package/dist/@types/modules/fullcompiler/appservice/getcompiledjs.d.ts +32 -0
- package/dist/@types/modules/fullcompiler/appservice/getjsfile.d.ts +18 -0
- package/dist/@types/modules/fullcompiler/appservice/getmainpkgsortedjsfiles.d.ts +12 -0
- package/dist/@types/modules/fullcompiler/appservice/getsubpackage.d.ts +7 -0
- package/dist/@types/modules/fullcompiler/appservice/getsubpkgsortedjsfiles.d.ts +10 -0
- package/dist/@types/modules/fullcompiler/appservice/getwxappcode.d.ts +13 -0
- package/dist/@types/modules/fullcompiler/config/apperrcode.config.d.ts +48 -0
- package/dist/@types/modules/fullcompiler/filerules.d.ts +5 -0
- package/dist/@types/modules/fullcompiler/getallrawfiles.d.ts +11 -0
- package/dist/@types/modules/fullcompiler/getallwmltohtmlmap.d.ts +11 -0
- package/dist/@types/modules/fullcompiler/index.d.ts +28 -0
- package/dist/@types/modules/fullcompiler/pageframe/getsubpackage.d.ts +10 -0
- package/dist/@types/modules/fullcompiler/pageframe/getwxappcode.d.ts +13 -0
- package/dist/@types/modules/fullcompiler/pageframe/index.d.ts +10 -0
- package/dist/@types/modules/fullcompiler/trans/transwxmltojs.d.ts +11 -0
- package/dist/@types/modules/fullcompiler/trans/transwxsstojs.d.ts +21 -0
- package/dist/@types/modules/fullcompiler/trans/wcc/index.d.ts +2 -0
- package/dist/@types/modules/fullcompiler/trans/wxml/compilewxml.d.ts +18 -0
- package/dist/@types/modules/fullcompiler/trans/wxss/compilewxss.d.ts +11 -0
- package/dist/@types/modules/fullcompiler/utils/appconfig/appconfig.d.ts +12 -0
- package/dist/@types/modules/fullcompiler/utils/appconfig/appjson.d.ts +3 -0
- package/dist/@types/modules/fullcompiler/utils/appconfig/checkcustomcomponent.d.ts +14 -0
- package/dist/@types/modules/fullcompiler/utils/appconfig/pagejson.d.ts +3 -0
- package/dist/@types/modules/fullcompiler/utils/appconfig/wxappcodejson.d.ts +3 -0
- package/dist/@types/modules/fullcompiler/utils/filewriter/index.d.ts +14 -0
- package/dist/@types/modules/fullcompiler/utils/handleerror/errorconfig.d.ts +9 -0
- package/dist/@types/modules/fullcompiler/utils/handleerror/handleError.d.ts +3 -0
- package/dist/@types/modules/fullcompiler/utils/handleerror/parseerr.d.ts +41 -0
- package/dist/@types/modules/fullcompiler/utils/index.d.ts +4 -0
- package/dist/@types/modules/fullcompiler/utils/taskmanager.d.ts +23 -0
- package/dist/@types/modules/fullcompiler/utils/theme/index.d.ts +40 -0
- package/dist/@types/modules/fullcompiler/utils/tools.d.ts +15 -0
- package/dist/@types/modules/fullcompiler/utils/transformsourcemap.d.ts +1 -0
- package/dist/@types/modules/index.d.ts +52 -0
- package/dist/@types/modules/nativecompiler/android/adb.d.ts +7 -0
- package/dist/@types/modules/nativecompiler/android/device.d.ts +15 -0
- package/dist/@types/modules/nativecompiler/android/index.d.ts +17 -0
- package/dist/@types/modules/nativecompiler/android/projectconfig.d.ts +11 -0
- package/dist/@types/modules/nativecompiler/index.d.ts +32 -0
- package/dist/@types/modules/nativecompiler/ios/buildCloud.d.ts +56 -0
- package/dist/@types/modules/nativecompiler/ios/device.d.ts +24 -0
- package/dist/@types/modules/nativecompiler/ios/index.d.ts +52 -0
- package/dist/@types/modules/nativecompiler/ios/projectconfig.d.ts +3 -0
- package/dist/@types/modules/nativecompiler/nativeCompiler.d.ts +40 -0
- package/dist/@types/modules/nativecompiler/nativeEntryProcess.d.ts +1 -0
- package/dist/@types/modules/precompiler/conditioncompile/compiler/base.d.ts +27 -0
- package/dist/@types/modules/precompiler/conditioncompile/compiler/json.d.ts +10 -0
- package/dist/@types/modules/precompiler/conditioncompile/compiler/macro.d.ts +44 -0
- package/dist/@types/modules/precompiler/conditioncompile/compiler/plant.d.ts +10 -0
- package/dist/@types/modules/precompiler/conditioncompile/define.d.ts +18 -0
- package/dist/@types/modules/precompiler/conditioncompile/index.d.ts +24 -0
- package/dist/@types/modules/precompiler/index.d.ts +10 -0
- package/dist/@types/project/advance/precompileProject.d.ts +35 -0
- package/dist/@types/project/advance/reactiveProject.d.ts +39 -0
- package/dist/@types/project/baseProject.d.ts +74 -0
- package/dist/@types/project/ciProject.d.ts +25 -0
- package/dist/@types/project/ciProjectWithMockBuffer.d.ts +11 -0
- package/dist/@types/project/devtoolsProject.d.ts +11 -0
- package/dist/@types/project/summerCPProject.d.ts +14 -0
- package/dist/@types/project/webProject.d.ts +10 -0
- package/dist/@types/types/ci.d.ts +182 -0
- package/dist/@types/types/core.d.ts +129 -0
- package/dist/@types/types/devtools.d.ts +220 -0
- package/dist/@types/types/index.d.ts +5 -169
- package/dist/@types/types/miniapp/index.d.ts +246 -0
- package/dist/@types/types/miniprogram-json/app.d.ts +26 -11
- package/dist/@types/types/miniprogram-json/index.d.ts +1 -0
- package/dist/@types/types/miniprogram-json/page.d.ts +5 -1
- package/dist/@types/types/miniprogram-json/plugin.d.ts +6 -1
- package/dist/@types/types/miniprogram-json/projectconfig.d.ts +6 -9
- package/dist/@types/types/summer.d.ts +161 -0
- package/dist/@types/utils/babel_helper.d.ts +7 -4
- package/dist/@types/utils/babel_plugin_worklet.d.ts +0 -1
- package/dist/@types/utils/codesign.d.ts +19 -0
- package/dist/@types/utils/common.d.ts +2 -4
- package/dist/@types/utils/cp.d.ts +3 -0
- package/dist/@types/utils/customError.d.ts +22 -0
- package/dist/@types/utils/download.d.ts +1 -0
- package/dist/@types/utils/env.d.ts +2 -0
- package/dist/@types/utils/expression.d.ts +61 -0
- package/dist/@types/utils/filerules.d.ts +0 -0
- package/dist/@types/utils/fs.d.ts +3 -3
- package/dist/@types/utils/fsagent.d.ts +9 -9
- package/dist/@types/utils/generateIpa.d.ts +2 -0
- package/dist/@types/utils/helper_util.d.ts +11 -0
- package/dist/@types/utils/interruptibletask.d.ts +4 -4
- package/dist/@types/utils/jsonlint.d.ts +2 -2
- package/dist/@types/utils/locales/locales.d.ts +18 -0
- package/dist/@types/utils/locales/zh.d.ts +18 -0
- package/dist/@types/utils/log.d.ts +13 -19
- package/dist/@types/utils/messageHub.d.ts +17 -0
- package/dist/@types/utils/miniapp-builder.d.ts +68 -0
- package/dist/@types/utils/miniappJson.d.ts +151 -0
- package/dist/@types/utils/packOptionsHelper.d.ts +17 -0
- package/dist/@types/utils/progressRecorder.d.ts +14 -0
- package/dist/@types/utils/request.d.ts +4 -4
- package/dist/@types/utils/signature.d.ts +13 -0
- package/dist/@types/utils/singletontask.d.ts +29 -0
- package/dist/@types/utils/subprocess/entryProcess.d.ts +7 -0
- package/dist/@types/utils/subprocess/processManager.d.ts +25 -0
- package/dist/@types/utils/swc_config.d.ts +3 -0
- package/dist/@types/utils/swc_helper.d.ts +11 -0
- package/dist/@types/utils/taskmanager.d.ts +22 -0
- package/dist/@types/utils/taskqueue.d.ts +0 -0
- package/dist/@types/utils/taskstatus.d.ts +2 -2
- package/dist/@types/utils/tools.d.ts +16 -1
- package/dist/@types/utils/waitable.d.ts +12 -0
- package/dist/@types/utils/wxapkg/pack.d.ts +7 -0
- package/dist/@types/utils/zip.d.ts +3 -0
- package/dist/ci/checkCodeQuality.js +1 -3
- package/dist/ci/cloud/cloudapi.js +1 -0
- package/dist/ci/cloud/createTimeTrigger.js +1 -0
- package/dist/ci/cloud/uploadContainer.js +1 -0
- package/dist/ci/cloud/uploadFile.js +1 -0
- package/dist/ci/cloud/uploadFunction.js +1 -0
- package/dist/ci/cloud/utils.js +1 -0
- package/dist/ci/code-analyse.js +1 -3
- package/dist/ci/cos-upload.js +1 -3
- package/dist/ci/getCompiledResult.js +1 -3
- package/dist/ci/getDevSourceMap.js +1 -3
- package/dist/ci/getLatestVersion.js +1 -3
- package/dist/ci/getcompiler.js +1 -0
- package/dist/ci/index.js +1 -0
- package/dist/ci/jsserver.js +1 -3
- package/dist/ci/preview.js +1 -3
- package/dist/ci/project.js +1 -3
- package/dist/ci/projectattr.js +1 -3
- package/dist/ci/upload.js +1 -3
- package/dist/ci/utils/codeDenpendencyQualityChecker.js +1 -3
- package/dist/ci/utils/filterUnusedFile.js +1 -3
- package/dist/ci/utils/pack.js +1 -3
- package/dist/ci/utils/packfile.js +1 -3
- package/dist/ci/utils/qualitycheckoption.js +1 -3
- package/dist/ci/utils/terminalQrcode.js +1 -3
- package/dist/ci/utils/tools.js +1 -0
- package/dist/cli/index.js +1 -0
- package/dist/common/cloud-api/index.js +279 -0
- package/dist/common/cloud-api/src/apis/apis.js +1 -0
- package/dist/common/cloud-api/src/apis/cdn/cdn.apis.js +1 -0
- package/dist/common/cloud-api/src/apis/cdn/index.js +1 -0
- package/dist/common/cloud-api/src/apis/flexdb/flexdb.apis.js +1 -0
- package/dist/common/cloud-api/src/apis/flexdb/index.js +1 -0
- package/dist/common/cloud-api/src/apis/scf/index.js +1 -0
- package/dist/common/cloud-api/src/apis/scf/scf.apis.js +1 -0
- package/dist/common/cloud-api/src/apis/ssl/index.js +1 -0
- package/dist/common/cloud-api/src/apis/ssl/ssl.apis.js +1 -0
- package/dist/common/cloud-api/src/apis/tcb/general.apis.js +1 -0
- package/dist/common/cloud-api/src/apis/tcb/index.js +1 -0
- package/dist/common/cloud-api/src/apis/tcb/tcb.apis.js +1 -0
- package/dist/common/cloud-api/src/index.js +1 -0
- package/dist/common/cloud-api/src/transaction/contracts/account.contracts.js +1 -0
- package/dist/common/cloud-api/src/transaction/contracts/cdn.contracts.js +1 -0
- package/dist/common/cloud-api/src/transaction/contracts/contracts.js +1 -0
- package/dist/common/cloud-api/src/transaction/contracts/factory.js +1 -0
- package/dist/common/cloud-api/src/transaction/contracts/flexdb.contracts.js +1 -0
- package/dist/common/cloud-api/src/transaction/contracts/lowcode.contracts.js +1 -0
- package/dist/common/cloud-api/src/transaction/contracts/scf.contracts.js +1 -0
- package/dist/common/cloud-api/src/transaction/contracts/ssl.contracts.js +1 -0
- package/dist/common/cloud-api/src/transaction/contracts/tcb.contracts.js +1 -0
- package/dist/common/cloud-api/src/transaction/transactor.js +1 -0
- package/dist/common/cloud-api/src/transaction/validations/account.validations.js +1 -0
- package/dist/common/cloud-api/src/transaction/validations/cdn.validations.js +1 -0
- package/dist/common/cloud-api/src/transaction/validations/common.validations.js +1 -0
- package/dist/common/cloud-api/src/transaction/validations/flexdb.validations.js +1 -0
- package/dist/common/cloud-api/src/transaction/validations/lowcode.validations.js +1 -0
- package/dist/common/cloud-api/src/transaction/validations/scf.validations.js +1 -0
- package/dist/common/cloud-api/src/transaction/validations/ssl.validations.js +1 -0
- package/dist/common/cloud-api/src/transaction/validations/tcb.validations.js +1 -0
- package/dist/common/cloud-api/src/transaction/validations/validations.js +1 -0
- package/dist/common/cloud-api/src/utils/common.js +1 -0
- package/dist/common/cloud-api/src/utils/validator.js +1 -0
- package/dist/common/code-analyse/index.js +2 -0
- package/dist/config/compiletype.config.js +1 -0
- package/dist/config/config.js +1 -0
- package/dist/config/define.js +1 -0
- package/dist/config/url.config.js +1 -0
- package/dist/index.js +1 -3
- package/dist/manifest.json +2 -2
- package/dist/modules/corecompiler/baseCompiler.js +1 -0
- package/dist/modules/corecompiler/original/analyse/partial.js +1 -0
- package/dist/modules/corecompiler/original/compile/common.js +1 -0
- package/dist/modules/corecompiler/original/compile/game.js +1 -0
- package/dist/modules/corecompiler/original/compile/gamePlugin.js +1 -0
- package/dist/modules/corecompiler/original/compile/handler/js.js +1 -0
- package/dist/modules/corecompiler/original/compile/handler/mpjson.js +1 -0
- package/dist/modules/corecompiler/original/compile/handler/wxml.js +1 -0
- package/dist/modules/corecompiler/original/compile/handler/wxss.js +1 -0
- package/dist/modules/corecompiler/original/compile/index.js +1 -0
- package/dist/modules/corecompiler/original/compile/miniprogram.js +1 -0
- package/dist/modules/corecompiler/original/compile/miniprogramPlugin.js +1 -0
- package/dist/modules/corecompiler/original/index.js +1 -0
- package/dist/modules/corecompiler/original/js/enhance.js +1 -0
- package/dist/modules/corecompiler/original/js/es6Transform.js +1 -0
- package/dist/modules/corecompiler/original/js/index.js +1 -0
- package/dist/modules/corecompiler/original/js/minifyjs.js +1 -0
- package/dist/modules/corecompiler/original/js/minifyjsAfterWrap.js +1 -0
- package/dist/modules/corecompiler/original/js/workletCompile.js +1 -0
- package/dist/modules/corecompiler/original/json/app/appJSON.js +1 -0
- package/dist/modules/corecompiler/original/json/app/checkAppFields.js +1 -0
- package/dist/modules/corecompiler/original/json/app/extJSON.js +1 -0
- package/dist/modules/corecompiler/original/json/app/index.js +1 -0
- package/dist/modules/corecompiler/original/json/common.js +1 -0
- package/dist/modules/corecompiler/original/json/game.js +1 -0
- package/dist/modules/corecompiler/original/json/page/checkPageJSON.js +1 -0
- package/dist/modules/corecompiler/original/json/page/getPageJSON.js +1 -0
- package/dist/modules/corecompiler/original/json/plugin/plugin.js +1 -0
- package/dist/modules/corecompiler/original/json/plugin/pluginPage.js +1 -0
- package/dist/modules/corecompiler/original/json/projectconfig.js +1 -0
- package/dist/modules/corecompiler/original/json/reactiveCache.js +1 -0
- package/dist/modules/corecompiler/original/json/signaturejson.js +1 -0
- package/dist/modules/corecompiler/original/json/sitemap.js +1 -0
- package/dist/modules/corecompiler/original/json/theme.js +1 -0
- package/dist/modules/corecompiler/original/npm/filterdeps.js +1 -0
- package/dist/modules/corecompiler/original/npm/packnpm.js +1 -0
- package/dist/modules/corecompiler/original/protect/fileFlatter.js +1 -0
- package/dist/modules/corecompiler/original/protect/uglifyfilenames.js +1 -0
- package/dist/modules/corecompiler/original/utils/env.js +1 -0
- package/dist/modules/corecompiler/original/utils/logger.js +1 -0
- package/dist/modules/corecompiler/original/validate/appjson.js +1 -0
- package/dist/modules/corecompiler/original/validate/extjson.js +1 -0
- package/dist/modules/corecompiler/original/validate/gamejson.js +1 -0
- package/dist/modules/corecompiler/original/validate/gamepluginjson.js +1 -0
- package/dist/modules/corecompiler/original/validate/pagejson.js +1 -0
- package/dist/modules/corecompiler/original/validate/pluginjson.js +1 -0
- package/dist/modules/corecompiler/original/validate/pluginpagejson.js +1 -0
- package/dist/modules/corecompiler/original/validate/projectconfig.js +1 -0
- package/dist/modules/corecompiler/original/validate/schemaValidate.js +1 -0
- package/dist/modules/corecompiler/original/validate/signaturejson.js +1 -0
- package/dist/modules/corecompiler/original/validate/sitemapjson.js +1 -0
- package/dist/modules/corecompiler/original/validate/validate.js +1 -0
- package/dist/modules/corecompiler/original/workerThread/childprocess.js +1 -0
- package/dist/modules/corecompiler/original/workerThread/childprocessManager.js +1 -0
- package/dist/modules/corecompiler/original/workerThread/fork.js +1 -0
- package/dist/modules/corecompiler/original/workerThread/index.js +1 -0
- package/dist/modules/corecompiler/original/workerThread/task/compilejs.js +1 -0
- package/dist/modules/corecompiler/original/workerThread/task/compilewxss.js +1 -0
- package/dist/modules/corecompiler/original/workerThread/task/minifywxml.js +1 -0
- package/dist/modules/corecompiler/original/workerThread/worker.js +1 -0
- package/dist/modules/corecompiler/original/workerThread/workerManager.js +1 -0
- package/dist/modules/corecompiler/originalCompiler.js +1 -0
- package/dist/modules/corecompiler/summer/graph/appconf.js +1 -0
- package/dist/modules/corecompiler/summer/graph/appgraph.js +1 -0
- package/dist/modules/corecompiler/summer/graph/baseconf.js +1 -0
- package/dist/modules/corecompiler/summer/graph/basegraph.js +1 -0
- package/dist/modules/corecompiler/summer/graph/gameconf.js +1 -0
- package/dist/modules/corecompiler/summer/graph/gamegraph.js +1 -0
- package/dist/modules/corecompiler/summer/graph/gamepluginconf.js +1 -0
- package/dist/modules/corecompiler/summer/graph/gameplugingraph.js +1 -0
- package/dist/modules/corecompiler/summer/graph/pluginconf.js +1 -0
- package/dist/modules/corecompiler/summer/graph/plugingraph.js +1 -0
- package/dist/modules/corecompiler/summer/graph/util.js +1 -0
- package/dist/modules/corecompiler/summer/index.js +1 -0
- package/dist/modules/corecompiler/summer/initPlugin.js +1 -0
- package/dist/modules/corecompiler/summer/module.js +1 -0
- package/dist/modules/corecompiler/summer/persistCache.js +1 -0
- package/dist/modules/corecompiler/summer/pluginDriver.js +1 -0
- package/dist/modules/corecompiler/summer/pluginconfig.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/base/es6module.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/base/javascript.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/base/swc.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/base/wxss.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/enhance.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/index.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/less.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/minifywxml.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/sass.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/terser.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/typescript.js +1 -0
- package/dist/modules/corecompiler/summer/plugins/worklet.js +1 -0
- package/dist/modules/corecompiler/summer/resolver.js +1 -0
- package/dist/modules/corecompiler/summer/summer.js +1 -0
- package/dist/modules/corecompiler/summer/utils/async.js +1 -0
- package/dist/modules/corecompiler/summer/utils/ensureArray.js +1 -0
- package/dist/modules/corecompiler/summer/utils/inputsourcemap.js +1 -0
- package/dist/modules/corecompiler/summer/worker.js +1 -0
- package/dist/modules/corecompiler/summerCompiler.js +1 -0
- package/dist/modules/corecompiler/summerEntryProcess.js +1 -0
- package/dist/modules/createSummer.js +1 -0
- package/dist/modules/fullcompiler/app/app.js +1 -0
- package/dist/modules/fullcompiler/app/contactandlaunch/originalcontactbase64.js +1 -0
- package/dist/modules/fullcompiler/app/contactandlaunch/originallaunchbase64.js +1 -0
- package/dist/modules/fullcompiler/app/contactandlaunch/updateContactForSubpkg.js +1 -0
- package/dist/modules/fullcompiler/app/contactandlaunch/updatecontactandlaunch.js +1 -0
- package/dist/modules/fullcompiler/appservice/appservice.config.js +1 -0
- package/dist/modules/fullcompiler/appservice/generatecode.utils.js +1 -0
- package/dist/modules/fullcompiler/appservice/getappservice.js +1 -0
- package/dist/modules/fullcompiler/appservice/getcompiledjs.js +1 -0
- package/dist/modules/fullcompiler/appservice/getjsfile.js +1 -0
- package/dist/modules/fullcompiler/appservice/getmainpkgsortedjsfiles.js +1 -0
- package/dist/modules/fullcompiler/appservice/getsubpackage.js +1 -0
- package/dist/modules/fullcompiler/appservice/getsubpkgsortedjsfiles.js +1 -0
- package/dist/modules/fullcompiler/appservice/getwxappcode.js +1 -0
- package/dist/modules/fullcompiler/config/apperrcode.config.js +1 -0
- package/dist/modules/fullcompiler/filerules.js +1 -0
- package/dist/modules/fullcompiler/getallrawfiles.js +1 -0
- package/dist/modules/fullcompiler/getallwmltohtmlmap.js +1 -0
- package/dist/modules/fullcompiler/index.js +1 -0
- package/dist/modules/fullcompiler/pageframe/getsubpackage.js +1 -0
- package/dist/modules/fullcompiler/pageframe/getwxappcode.js +1 -0
- package/dist/modules/fullcompiler/pageframe/index.js +1 -0
- package/dist/modules/fullcompiler/trans/transwxmltojs.js +1 -0
- package/dist/modules/fullcompiler/trans/transwxsstojs.js +1 -0
- package/dist/modules/fullcompiler/trans/wcc/build/darwin_arm64/wcc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/build/darwin_arm64/wcsc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/build/darwin_x64/wcc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/build/darwin_x64/wcsc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/build/node_16.1.0_darwin_arm64_release/wcc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/build/node_16.1.0_darwin_arm64_release/wcsc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/build/node_16.1.0_darwin_x64_release/wcc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/build/node_16.1.0_darwin_x64_release/wcsc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/build/win32_ia32/wcc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/build/win32_ia32/wcsc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/build/win32_x64/wcc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/build/win32_x64/wcsc.node +0 -0
- package/dist/modules/fullcompiler/trans/wcc/index.js +1 -0
- package/dist/modules/fullcompiler/trans/wcc/lib/addonVersion.js +19 -0
- package/dist/modules/fullcompiler/trans/wcc/lib/index.js +4 -0
- package/dist/modules/fullcompiler/trans/wcc/lib/util.js +1134 -0
- package/dist/modules/fullcompiler/trans/wcc/lib/wcc.js +94 -0
- package/dist/modules/fullcompiler/trans/wcc/lib/wcsc.js +93 -0
- package/dist/modules/fullcompiler/trans/wxml/compilewxml.js +1 -0
- package/dist/modules/fullcompiler/trans/wxss/compilewxss.js +1 -0
- package/dist/modules/fullcompiler/utils/appconfig/appconfig.js +1 -0
- package/dist/modules/fullcompiler/utils/appconfig/appjson.js +1 -0
- package/dist/modules/fullcompiler/utils/appconfig/checkcustomcomponent.js +1 -0
- package/dist/modules/fullcompiler/utils/appconfig/pagejson.js +1 -0
- package/dist/modules/fullcompiler/utils/appconfig/wxappcodejson.js +1 -0
- package/dist/modules/fullcompiler/utils/filewriter/index.js +1 -0
- package/dist/modules/fullcompiler/utils/handleerror/errorconfig.js +1 -0
- package/dist/modules/fullcompiler/utils/handleerror/handleError.js +1 -0
- package/dist/modules/fullcompiler/utils/handleerror/parseerr.js +1 -0
- package/dist/modules/fullcompiler/utils/index.js +1 -0
- package/dist/modules/fullcompiler/utils/taskmanager.js +1 -0
- package/dist/modules/fullcompiler/utils/theme/index.js +1 -0
- package/dist/modules/fullcompiler/utils/tools.js +1 -0
- package/dist/modules/fullcompiler/utils/transformsourcemap.js +1 -0
- package/dist/modules/index.js +1 -0
- package/dist/modules/nativecompiler/android/adb.js +1 -0
- package/dist/modules/nativecompiler/android/device.js +1 -0
- package/dist/modules/nativecompiler/android/index.js +1 -0
- package/dist/modules/nativecompiler/android/projectconfig.js +1 -0
- package/dist/modules/nativecompiler/index.js +1 -0
- package/dist/modules/nativecompiler/ios/buildCloud.js +1 -0
- package/dist/modules/nativecompiler/ios/device.js +1 -0
- package/dist/modules/nativecompiler/ios/index.js +1 -0
- package/dist/modules/nativecompiler/ios/projectconfig.js +1 -0
- package/dist/modules/nativecompiler/nativeCompiler.js +1 -0
- package/dist/modules/nativecompiler/nativeEntryProcess.js +1 -0
- package/dist/modules/precompiler/conditioncompile/compiler/base.js +1 -0
- package/dist/modules/precompiler/conditioncompile/compiler/json.js +1 -0
- package/dist/modules/precompiler/conditioncompile/compiler/macro.js +1 -0
- package/dist/modules/precompiler/conditioncompile/compiler/plant.js +1 -0
- package/dist/modules/precompiler/conditioncompile/define.js +1 -0
- package/dist/modules/precompiler/conditioncompile/index.js +1 -0
- package/dist/modules/precompiler/index.js +1 -0
- package/dist/project/advance/precompileProject.js +1 -0
- package/dist/project/advance/reactiveProject.js +1 -0
- package/dist/project/baseProject.js +1 -0
- package/dist/project/ciProject.js +1 -0
- package/dist/project/ciProjectWithMockBuffer.js +1 -0
- package/dist/project/devtoolsProject.js +1 -0
- package/dist/project/summerCPProject.js +1 -0
- package/dist/project/webProject.js +1 -0
- package/dist/schema/dist/app.js +2221 -0
- package/dist/schema/dist/ext.js +1088 -0
- package/dist/schema/dist/game.js +211 -0
- package/dist/schema/dist/page.js +516 -0
- package/dist/schema/dist/plugin.js +53 -0
- package/dist/schema/dist/pluginpage.js +14 -0
- package/dist/schema/dist/projectconfig.js +655 -0
- package/dist/schema/dist/projectprivateconfig.js +371 -0
- package/dist/schema/dist/sitemap.js +53 -0
- package/dist/schema/dist/theme.js +20 -0
- package/dist/static/images/donut-icon1024x1024.png +0 -0
- package/dist/static/images/donut-icon120x120.png +0 -0
- package/dist/static/images/donut-icon152x152.png +0 -0
- package/dist/static/images/donut-icon167x167.png +0 -0
- package/dist/static/scripts/assetsCar/Assets.xcassets/AppIcon.appiconset/Contents.json +119 -0
- package/dist/static/scripts/assetsCar/Assets.xcassets/Contents.json +6 -0
- package/dist/static/scripts/assetsCar/Assets.xcassets/disconnect.imageset/Contents.json +21 -0
- package/dist/static/scripts/assetsCar/Assets.xcassets/disconnect.imageset/disconnect.png +0 -0
- package/dist/static/scripts/assetsCar/createAssetsCar +9 -0
- package/dist/static/scripts/checkXcodeEnv +18 -0
- package/dist/static/scripts/resignIpa +269 -0
- package/dist/types/ci.js +1 -0
- package/dist/types/core.js +1 -0
- package/dist/types/devtools.js +1 -0
- package/dist/types/index.js +1 -3
- package/dist/types/miniapp/index.js +1 -0
- package/dist/types/miniprogram-json/app.js +1 -3
- package/dist/types/miniprogram-json/base.js +1 -3
- package/dist/types/miniprogram-json/ext.js +1 -3
- package/dist/types/miniprogram-json/game.js +1 -3
- package/dist/types/miniprogram-json/index.js +1 -3
- package/dist/types/miniprogram-json/page.js +1 -3
- package/dist/types/miniprogram-json/plugin.js +1 -3
- package/dist/types/miniprogram-json/projectconfig.js +1 -3
- package/dist/types/miniprogram-json/sitemap.js +1 -3
- package/dist/types/miniprogram-json/theme.js +1 -3
- package/dist/types/summer.js +1 -0
- package/dist/utils/babel_helper.js +1 -3
- package/dist/utils/babel_plugin_worklet.js +1 -3
- package/dist/utils/babel_transform_plugin.js +1 -3
- package/dist/utils/cache.js +1 -3
- package/dist/utils/codesign.js +1 -0
- package/dist/utils/common.js +1 -3
- package/dist/utils/cp.js +1 -0
- package/dist/utils/customError.js +1 -0
- package/dist/utils/download.js +1 -0
- package/dist/utils/env.js +1 -0
- package/dist/utils/error.js +1 -3
- package/dist/utils/expression.js +1 -0
- package/dist/utils/filerules.js +1 -0
- package/dist/utils/fs.js +1 -3
- package/dist/utils/fsagent.js +1 -3
- package/dist/utils/generateIpa.js +1 -0
- package/dist/utils/glob.js +1 -3
- package/dist/utils/hackrequire/fs.js +1 -1
- package/dist/utils/hackrequire/module.js +1 -1
- package/dist/utils/helper_util.js +1 -0
- package/dist/utils/interruptibletask.js +1 -3
- package/dist/utils/jsonParse.js +1 -3
- package/dist/utils/jsonlint.js +1 -3
- package/dist/utils/locales/en.js +1 -3
- package/dist/utils/locales/fomatable_string.js +1 -3
- package/dist/utils/locales/locales.js +1 -3
- package/dist/utils/locales/zh.js +1 -3
- package/dist/utils/log.js +1 -3
- package/dist/utils/messageHub.js +1 -0
- package/dist/utils/miniapp-builder.js +1 -0
- package/dist/utils/miniappJson.js +1 -0
- package/dist/utils/packOptionsHelper.js +1 -0
- package/dist/utils/progressRecorder.js +1 -0
- package/dist/utils/report.js +1 -3
- package/dist/utils/request.js +1 -3
- package/dist/utils/sign.js +1 -3
- package/dist/utils/signature.js +1 -0
- package/dist/utils/singletontask.js +1 -0
- package/dist/utils/subprocess/entryProcess.js +1 -0
- package/dist/utils/subprocess/processManager.js +1 -0
- package/dist/utils/swc_config.js +1 -0
- package/dist/utils/swc_helper.js +1 -0
- package/dist/utils/taskmanager.js +1 -0
- package/dist/utils/taskqueue.js +1 -0
- package/dist/utils/taskstatus.js +1 -3
- package/dist/utils/tools.js +1 -3
- package/dist/utils/waitable.js +1 -0
- package/dist/utils/white_ext_list.js +1 -3
- package/dist/utils/wxapkg/pack.js +1 -0
- package/dist/utils/wxvpkgreader/wxvpkg/unpack/version0.js +1 -1
- package/dist/utils/wxvpkgreader/wxvpkg/unpack/version10.js +1 -1
- package/dist/utils/wxvpkgreader/wxvpkgreader.js +1 -1
- package/dist/utils/zip.js +1 -0
- package/dist/vendor/ios-deploy/ios-deploy +0 -0
- package/dist/vendor/swc_runtime/_apply_decorated_descriptor.js +1 -0
- package/dist/vendor/swc_runtime/_apply_decs_2203_r.js +1 -0
- package/dist/vendor/swc_runtime/_array_like_to_array.js +1 -0
- package/dist/vendor/swc_runtime/_array_with_holes.js +1 -0
- package/dist/vendor/swc_runtime/_array_without_holes.js +1 -0
- package/dist/vendor/swc_runtime/_assert_this_initialized.js +1 -0
- package/dist/vendor/swc_runtime/_async_generator.js +1 -0
- package/dist/vendor/swc_runtime/_async_generator_delegate.js +1 -0
- package/dist/vendor/swc_runtime/_async_iterator.js +1 -0
- package/dist/vendor/swc_runtime/_async_to_generator.js +1 -0
- package/dist/vendor/swc_runtime/_await_async_generator.js +1 -0
- package/dist/vendor/swc_runtime/_await_value.js +1 -0
- package/dist/vendor/swc_runtime/_check_private_redeclaration.js +1 -0
- package/dist/vendor/swc_runtime/_class_apply_descriptor_destructure.js +1 -0
- package/dist/vendor/swc_runtime/_class_apply_descriptor_get.js +1 -0
- package/dist/vendor/swc_runtime/_class_apply_descriptor_set.js +1 -0
- package/dist/vendor/swc_runtime/_class_apply_descriptor_update.js +1 -0
- package/dist/vendor/swc_runtime/_class_call_check.js +1 -0
- package/dist/vendor/swc_runtime/_class_check_private_static_access.js +1 -0
- package/dist/vendor/swc_runtime/_class_check_private_static_field_descriptor.js +1 -0
- package/dist/vendor/swc_runtime/_class_extract_field_descriptor.js +1 -0
- package/dist/vendor/swc_runtime/_class_name_tdz_error.js +1 -0
- package/dist/vendor/swc_runtime/_class_private_field_destructure.js +1 -0
- package/dist/vendor/swc_runtime/_class_private_field_get.js +1 -0
- package/dist/vendor/swc_runtime/_class_private_field_init.js +1 -0
- package/dist/vendor/swc_runtime/_class_private_field_loose_base.js +1 -0
- package/dist/vendor/swc_runtime/_class_private_field_loose_key.js +1 -0
- package/dist/vendor/swc_runtime/_class_private_field_set.js +1 -0
- package/dist/vendor/swc_runtime/_class_private_field_update.js +1 -0
- package/dist/vendor/swc_runtime/_class_private_method_get.js +1 -0
- package/dist/vendor/swc_runtime/_class_private_method_init.js +1 -0
- package/dist/vendor/swc_runtime/_class_private_method_set.js +1 -0
- package/dist/vendor/swc_runtime/_class_static_private_field_destructure.js +1 -0
- package/dist/vendor/swc_runtime/_class_static_private_field_spec_get.js +1 -0
- package/dist/vendor/swc_runtime/_class_static_private_field_spec_set.js +1 -0
- package/dist/vendor/swc_runtime/_class_static_private_field_update.js +1 -0
- package/dist/vendor/swc_runtime/_class_static_private_method_get.js +1 -0
- package/dist/vendor/swc_runtime/_construct.js +1 -0
- package/dist/vendor/swc_runtime/_create_class.js +1 -0
- package/dist/vendor/swc_runtime/_create_for_of_iterator_helper_loose.js +1 -0
- package/dist/vendor/swc_runtime/_create_super.js +1 -0
- package/dist/vendor/swc_runtime/_decorate.js +1 -0
- package/dist/vendor/swc_runtime/_defaults.js +1 -0
- package/dist/vendor/swc_runtime/_define_enumerable_properties.js +1 -0
- package/dist/vendor/swc_runtime/_define_property.js +1 -0
- package/dist/vendor/swc_runtime/_dispose.js +1 -0
- package/dist/vendor/swc_runtime/_export_star.js +1 -0
- package/dist/vendor/swc_runtime/_extends.js +1 -0
- package/dist/vendor/swc_runtime/_get.js +1 -0
- package/dist/vendor/swc_runtime/_get_prototype_of.js +1 -0
- package/dist/vendor/swc_runtime/_identity.js +1 -0
- package/dist/vendor/swc_runtime/_inherits.js +1 -0
- package/dist/vendor/swc_runtime/_inherits_loose.js +1 -0
- package/dist/vendor/swc_runtime/_initializer_define_property.js +1 -0
- package/dist/vendor/swc_runtime/_initializer_warning_helper.js +1 -0
- package/dist/vendor/swc_runtime/_instanceof.js +1 -0
- package/dist/vendor/swc_runtime/_interop_require_default.js +1 -0
- package/dist/vendor/swc_runtime/_interop_require_wildcard.js +1 -0
- package/dist/vendor/swc_runtime/_is_native_function.js +1 -0
- package/dist/vendor/swc_runtime/_is_native_reflect_construct.js +1 -0
- package/dist/vendor/swc_runtime/_iterable_to_array.js +1 -0
- package/dist/vendor/swc_runtime/_iterable_to_array_limit.js +1 -0
- package/dist/vendor/swc_runtime/_iterable_to_array_limit_loose.js +1 -0
- package/dist/vendor/swc_runtime/_jsx.js +1 -0
- package/dist/vendor/swc_runtime/_new_arrow_check.js +1 -0
- package/dist/vendor/swc_runtime/_non_iterable_rest.js +1 -0
- package/dist/vendor/swc_runtime/_non_iterable_spread.js +1 -0
- package/dist/vendor/swc_runtime/_object_destructuring_empty.js +1 -0
- package/dist/vendor/swc_runtime/_object_spread.js +1 -0
- package/dist/vendor/swc_runtime/_object_spread_props.js +1 -0
- package/dist/vendor/swc_runtime/_object_without_properties.js +1 -0
- package/dist/vendor/swc_runtime/_object_without_properties_loose.js +1 -0
- package/dist/vendor/swc_runtime/_possible_constructor_return.js +1 -0
- package/dist/vendor/swc_runtime/_read_only_error.js +1 -0
- package/dist/vendor/swc_runtime/_set.js +1 -0
- package/dist/vendor/swc_runtime/_set_prototype_of.js +1 -0
- package/dist/vendor/swc_runtime/_skip_first_generator_next.js +1 -0
- package/dist/vendor/swc_runtime/_sliced_to_array.js +1 -0
- package/dist/vendor/swc_runtime/_sliced_to_array_loose.js +1 -0
- package/dist/vendor/swc_runtime/_super_prop_base.js +1 -0
- package/dist/vendor/swc_runtime/_tagged_template_literal.js +1 -0
- package/dist/vendor/swc_runtime/_tagged_template_literal_loose.js +1 -0
- package/dist/vendor/swc_runtime/_throw.js +1 -0
- package/dist/vendor/swc_runtime/_to_array.js +1 -0
- package/dist/vendor/swc_runtime/_to_consumable_array.js +1 -0
- package/dist/vendor/swc_runtime/_to_primitive.js +1 -0
- package/dist/vendor/swc_runtime/_to_property_key.js +1 -0
- package/dist/vendor/swc_runtime/_ts_decorate.js +1 -0
- package/dist/vendor/swc_runtime/_ts_generator.js +1 -0
- package/dist/vendor/swc_runtime/_ts_metadata.js +1 -0
- package/dist/vendor/swc_runtime/_ts_param.js +1 -0
- package/dist/vendor/swc_runtime/_ts_values.js +1 -0
- package/dist/vendor/swc_runtime/_type_of.js +1 -0
- package/dist/vendor/swc_runtime/_unsupported_iterable_to_array.js +1 -0
- package/dist/vendor/swc_runtime/_update.js +1 -0
- package/dist/vendor/swc_runtime/_using.js +1 -0
- package/dist/vendor/swc_runtime/_wrap_async_generator.js +1 -0
- package/dist/vendor/swc_runtime/_wrap_native_super.js +1 -0
- package/dist/vendor/swc_runtime/_write_only_error.js +1 -0
- package/dist/vendor/swc_runtime/index.js +1 -0
- package/package.json +46 -10
- package/dist/@types/cloud/cloudapi.d.ts +0 -7
- package/dist/@types/cloud/createTimeTrigger.d.ts +0 -13
- package/dist/@types/cloud/uploadContainer.d.ts +0 -71
- package/dist/@types/cloud/uploadFile.d.ts +0 -9
- package/dist/@types/cloud/uploadFunction.d.ts +0 -13
- package/dist/@types/cloud/utils.d.ts +0 -17
- package/dist/@types/config.d.ts +0 -78
- package/dist/@types/core/analyse/partial.d.ts +0 -25
- package/dist/@types/core/compile/common.d.ts +0 -17
- package/dist/@types/core/compile/game.d.ts +0 -5
- package/dist/@types/core/compile/game_plugin.d.ts +0 -8
- package/dist/@types/core/compile/handler/js.d.ts +0 -15
- package/dist/@types/core/compile/handler/mpjson.d.ts +0 -10
- package/dist/@types/core/compile/handler/wxml.d.ts +0 -9
- package/dist/@types/core/compile/handler/wxss.d.ts +0 -10
- package/dist/@types/core/compile/index.d.ts +0 -5
- package/dist/@types/core/compile/mini_program.d.ts +0 -5
- package/dist/@types/core/compile/mini_program_plugin.d.ts +0 -8
- package/dist/@types/core/js/index.d.ts +0 -3
- package/dist/@types/core/js/minifyjs.d.ts +0 -16
- package/dist/@types/core/js/minifyjs_after_wrap.d.ts +0 -12
- package/dist/@types/core/json/app/checkAppFields.d.ts +0 -42
- package/dist/@types/core/json/app/getAppJSON.d.ts +0 -10
- package/dist/@types/core/json/app/getExtJSON.d.ts +0 -5
- package/dist/@types/core/json/app/index.d.ts +0 -5
- package/dist/@types/core/json/common.d.ts +0 -20
- package/dist/@types/core/json/game.d.ts +0 -6
- package/dist/@types/core/json/page/checkPageJSON.d.ts +0 -6
- package/dist/@types/core/json/page/getPageJSON.d.ts +0 -10
- package/dist/@types/core/json/plugin/plugin.d.ts +0 -14
- package/dist/@types/core/json/plugin/plugin_page.d.ts +0 -9
- package/dist/@types/core/json/projectWithMockBuffer.d.ts +0 -14
- package/dist/@types/core/json/projectconfig.d.ts +0 -3
- package/dist/@types/core/json/reactiveCache.d.ts +0 -63
- package/dist/@types/core/json/signaturejson.d.ts +0 -21
- package/dist/@types/core/json/sitemap.d.ts +0 -5
- package/dist/@types/core/json/theme.d.ts +0 -20
- package/dist/@types/core/npm/packnpm.d.ts +0 -17
- package/dist/@types/core/protect/uglifyfilenames.d.ts +0 -9
- package/dist/@types/core/utils/env.d.ts +0 -6
- package/dist/@types/core/validate/appjson.d.ts +0 -3
- package/dist/@types/core/validate/extjson.d.ts +0 -3
- package/dist/@types/core/validate/gamejson.d.ts +0 -3
- package/dist/@types/core/validate/gamepluginjson.d.ts +0 -3
- package/dist/@types/core/validate/pagejson.d.ts +0 -3
- package/dist/@types/core/validate/pluginjson.d.ts +0 -3
- package/dist/@types/core/validate/pluginpagejson.d.ts +0 -3
- package/dist/@types/core/validate/projectconfig.d.ts +0 -3
- package/dist/@types/core/validate/schemaValidate.d.ts +0 -7
- package/dist/@types/core/validate/signaturejson.d.ts +0 -3
- package/dist/@types/core/validate/sitemapjson.d.ts +0 -3
- package/dist/@types/core/worker_thread/childprocess_manager.d.ts +0 -16
- package/dist/@types/core/worker_thread/index.d.ts +0 -4
- package/dist/@types/core/worker_thread/task/compilejs.d.ts +0 -43
- package/dist/@types/core/worker_thread/task/compilewxss.d.ts +0 -21
- package/dist/@types/core/worker_thread/task/index.d.ts +0 -28
- package/dist/@types/core/worker_thread/task/minifywxml.d.ts +0 -46
- package/dist/@types/core/worker_thread/worker_manager.d.ts +0 -19
- package/dist/@types/core.d.ts +0 -26
- package/dist/@types/summer/ci.d.ts +0 -3
- package/dist/@types/summer/devtool.d.ts +0 -254
- package/dist/@types/summer/error.d.ts +0 -22
- package/dist/@types/summer/graph/appconf.d.ts +0 -25
- package/dist/@types/summer/graph/appgraph.d.ts +0 -25
- package/dist/@types/summer/graph/basegraph.d.ts +0 -64
- package/dist/@types/summer/graph/pluginconf.d.ts +0 -19
- package/dist/@types/summer/graph/plugingraph.d.ts +0 -22
- package/dist/@types/summer/index.d.ts +0 -1
- package/dist/@types/summer/initPlugin.d.ts +0 -2
- package/dist/@types/summer/module.d.ts +0 -42
- package/dist/@types/summer/persist_cache.d.ts +0 -12
- package/dist/@types/summer/plugin_driver.d.ts +0 -45
- package/dist/@types/summer/plugins/base/es6module.d.ts +0 -18
- package/dist/@types/summer/plugins/base/javascript.d.ts +0 -3
- package/dist/@types/summer/plugins/base/wxss.d.ts +0 -6
- package/dist/@types/summer/plugins/enhance.d.ts +0 -4
- package/dist/@types/summer/plugins/less.d.ts +0 -5
- package/dist/@types/summer/plugins/minifywxml.d.ts +0 -5
- package/dist/@types/summer/plugins/sass.d.ts +0 -3
- package/dist/@types/summer/plugins/terser.d.ts +0 -2
- package/dist/@types/summer/plugins/typescript.d.ts +0 -2
- package/dist/@types/summer/plugins/worklet.d.ts +0 -4
- package/dist/@types/summer/project.d.ts +0 -47
- package/dist/@types/summer/recorder.d.ts +0 -12
- package/dist/@types/summer/resolver.d.ts +0 -28
- package/dist/@types/summer/summer.d.ts +0 -32
- package/dist/@types/summer/types.d.ts +0 -164
- package/dist/@types/summer/utils/ensureArray.d.ts +0 -1
- package/dist/@types/summer/worker.d.ts +0 -16
- package/dist/@types/utils/url_config.d.ts +0 -19
- package/dist/@types/vendor/cloud-api/src/apis/tcb/tcb.apis.d.ts +0 -162
- package/dist/@types/vendor/cloud-api/src/transaction/contracts/contracts.d.ts +0 -7
- package/dist/@types/vendor/cloud-api/src/transaction/contracts/tcb.contracts.d.ts +0 -165
- package/dist/@types/vendor/cloud-api/src/transaction/validations/common.validations.d.ts +0 -106
- package/dist/@types/vendor/cloud-api/src/transaction/validations/tcb.validations.d.ts +0 -170
- package/dist/@types/vendor/cloud-api/src/transaction/validations/validations.d.ts +0 -6
- package/dist/@types/vendor/code-analyse/index.d.ts +0 -374
- package/dist/cli.js +0 -3
- package/dist/cloud/cloudapi.js +0 -3
- package/dist/cloud/createTimeTrigger.js +0 -3
- package/dist/cloud/uploadContainer.js +0 -3
- package/dist/cloud/uploadFile.js +0 -3
- package/dist/cloud/uploadFunction.js +0 -3
- package/dist/cloud/utils.js +0 -3
- package/dist/config.js +0 -3
- package/dist/core/analyse/partial.js +0 -3
- package/dist/core/compile/common.js +0 -3
- package/dist/core/compile/game.js +0 -3
- package/dist/core/compile/game_plugin.js +0 -3
- package/dist/core/compile/handler/js.js +0 -3
- package/dist/core/compile/handler/mpjson.js +0 -3
- package/dist/core/compile/handler/wxml.js +0 -3
- package/dist/core/compile/handler/wxss.js +0 -3
- package/dist/core/compile/index.js +0 -3
- package/dist/core/compile/mini_program.js +0 -3
- package/dist/core/compile/mini_program_plugin.js +0 -3
- package/dist/core/js/enhance.js +0 -1
- package/dist/core/js/es6_transform.js +0 -1
- package/dist/core/js/index.js +0 -1
- package/dist/core/js/minifyjs.js +0 -1
- package/dist/core/js/minifyjs_after_wrap.js +0 -1
- package/dist/core/js/workletCompile.js +0 -1
- package/dist/core/json/app/checkAppFields.js +0 -3
- package/dist/core/json/app/getAppJSON.js +0 -3
- package/dist/core/json/app/getExtJSON.js +0 -3
- package/dist/core/json/app/index.js +0 -3
- package/dist/core/json/common.js +0 -3
- package/dist/core/json/game.js +0 -3
- package/dist/core/json/page/checkPageJSON.js +0 -3
- package/dist/core/json/page/getPageJSON.js +0 -3
- package/dist/core/json/plugin/plugin.js +0 -3
- package/dist/core/json/plugin/plugin_page.js +0 -3
- package/dist/core/json/projectWithMockBuffer.js +0 -3
- package/dist/core/json/projectconfig.js +0 -3
- package/dist/core/json/reactiveCache.js +0 -3
- package/dist/core/json/signaturejson.js +0 -3
- package/dist/core/json/sitemap.js +0 -3
- package/dist/core/json/theme.js +0 -3
- package/dist/core/npm/filterdeps.js +0 -3
- package/dist/core/npm/packnpm.js +0 -3
- package/dist/core/protect/file_flatter.js +0 -3
- package/dist/core/protect/uglifyfilenames.js +0 -3
- package/dist/core/utils/env.js +0 -3
- package/dist/core/utils/logger.js +0 -3
- package/dist/core/validate/appjson.js +0 -1
- package/dist/core/validate/extjson.js +0 -1
- package/dist/core/validate/gamejson.js +0 -1
- package/dist/core/validate/gamepluginjson.js +0 -1
- package/dist/core/validate/pagejson.js +0 -1
- package/dist/core/validate/pluginjson.js +0 -1
- package/dist/core/validate/pluginpagejson.js +0 -1
- package/dist/core/validate/projectconfig.js +0 -1
- package/dist/core/validate/schemaValidate.js +0 -1
- package/dist/core/validate/signaturejson.js +0 -1
- package/dist/core/validate/sitemapjson.js +0 -1
- package/dist/core/validate/validate.js +0 -1
- package/dist/core/worker_thread/childprocess.js +0 -1
- package/dist/core/worker_thread/childprocess_manager.js +0 -1
- package/dist/core/worker_thread/fork.js +0 -1
- package/dist/core/worker_thread/index.js +0 -1
- package/dist/core/worker_thread/task/compilejs.js +0 -1
- package/dist/core/worker_thread/task/compilewxss.js +0 -1
- package/dist/core/worker_thread/task/minifywxml.js +0 -1
- package/dist/core/worker_thread/worker.js +0 -1
- package/dist/core/worker_thread/worker_manager.js +0 -1
- package/dist/core.js +0 -3
- package/dist/summer/ci.js +0 -3
- package/dist/summer/devtool.js +0 -3
- package/dist/summer/entry_process.js +0 -1
- package/dist/summer/error.js +0 -3
- package/dist/summer/graph/appconf.js +0 -3
- package/dist/summer/graph/appgraph.js +0 -3
- package/dist/summer/graph/basegraph.js +0 -3
- package/dist/summer/graph/pluginconf.js +0 -3
- package/dist/summer/graph/plugingraph.js +0 -3
- package/dist/summer/index.js +0 -3
- package/dist/summer/initPlugin.js +0 -3
- package/dist/summer/module.js +0 -3
- package/dist/summer/persist_cache.js +0 -3
- package/dist/summer/plugin_driver.js +0 -3
- package/dist/summer/plugins/base/es6module.js +0 -1
- package/dist/summer/plugins/base/javascript.js +0 -1
- package/dist/summer/plugins/base/wxss.js +0 -1
- package/dist/summer/plugins/enhance.js +0 -1
- package/dist/summer/plugins/index.js +0 -1
- package/dist/summer/plugins/less.js +0 -1
- package/dist/summer/plugins/minifywxml.js +0 -1
- package/dist/summer/plugins/sass.js +0 -1
- package/dist/summer/plugins/terser.js +0 -1
- package/dist/summer/plugins/typescript.js +0 -1
- package/dist/summer/plugins/worklet.js +0 -1
- package/dist/summer/project.js +0 -3
- package/dist/summer/recorder.js +0 -3
- package/dist/summer/resolver.js +0 -3
- package/dist/summer/summer.js +0 -3
- package/dist/summer/types.js +0 -3
- package/dist/summer/utils/async.js +0 -3
- package/dist/summer/utils/ensureArray.js +0 -3
- package/dist/summer/worker.js +0 -3
- package/dist/utils/url_config.js +0 -3
- package/dist/vendor/cloud-api/index.js +0 -2
- package/dist/vendor/cloud-api/src/apis/apis.js +0 -3
- package/dist/vendor/cloud-api/src/apis/cdn/cdn.apis.js +0 -3
- package/dist/vendor/cloud-api/src/apis/cdn/index.js +0 -3
- package/dist/vendor/cloud-api/src/apis/flexdb/flexdb.apis.js +0 -3
- package/dist/vendor/cloud-api/src/apis/flexdb/index.js +0 -3
- package/dist/vendor/cloud-api/src/apis/scf/index.js +0 -3
- package/dist/vendor/cloud-api/src/apis/scf/scf.apis.js +0 -3
- package/dist/vendor/cloud-api/src/apis/ssl/index.js +0 -3
- package/dist/vendor/cloud-api/src/apis/ssl/ssl.apis.js +0 -3
- package/dist/vendor/cloud-api/src/apis/tcb/general.apis.js +0 -3
- package/dist/vendor/cloud-api/src/apis/tcb/index.js +0 -3
- package/dist/vendor/cloud-api/src/apis/tcb/tcb.apis.js +0 -3
- package/dist/vendor/cloud-api/src/index.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/contracts/cdn.contracts.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/contracts/contracts.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/contracts/factory.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/contracts/flexdb.contracts.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/contracts/scf.contracts.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/contracts/ssl.contracts.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/contracts/tcb.contracts.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/transactor.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/validations/cdn.validations.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/validations/common.validations.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/validations/flexdb.validations.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/validations/scf.validations.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/validations/ssl.validations.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/validations/tcb.validations.js +0 -3
- package/dist/vendor/cloud-api/src/transaction/validations/validations.js +0 -3
- package/dist/vendor/cloud-api/src/utils/common.js +0 -3
- package/dist/vendor/cloud-api/src/utils/validator.js +0 -3
- package/dist/vendor/code-analyse/index.js +0 -2
- package/dist/vendor/schema/dist/app.js +0 -618
- package/dist/vendor/schema/dist/ext.js +0 -862
- package/dist/vendor/schema/dist/game.js +0 -211
- package/dist/vendor/schema/dist/page.js +0 -313
- package/dist/vendor/schema/dist/plugin.js +0 -41
- package/dist/vendor/schema/dist/pluginpage.js +0 -14
- package/dist/vendor/schema/dist/projectconfig.js +0 -474
- package/dist/vendor/schema/dist/projectprivateconfig.js +0 -358
- package/dist/vendor/schema/dist/sitemap.js +0 -53
- package/dist/vendor/schema/dist/theme.js +0 -20
- /package/dist/@types/{cli.d.ts → cli/index.d.ts} +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/apis/apis.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/apis/cdn/cdn.apis.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/apis/cdn/index.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/apis/flexdb/flexdb.apis.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/apis/flexdb/index.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/apis/scf/index.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/apis/scf/scf.apis.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/apis/ssl/index.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/apis/ssl/ssl.apis.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/apis/tcb/general.apis.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/apis/tcb/index.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/index.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/transaction/contracts/cdn.contracts.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/transaction/contracts/factory.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/transaction/contracts/flexdb.contracts.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/transaction/contracts/scf.contracts.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/transaction/contracts/ssl.contracts.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/transaction/transactor.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/transaction/validations/cdn.validations.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/transaction/validations/flexdb.validations.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/transaction/validations/scf.validations.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/transaction/validations/ssl.validations.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/utils/common.d.ts +0 -0
- /package/dist/@types/{vendor → common}/cloud-api/src/utils/validator.d.ts +0 -0
- /package/dist/@types/{core → modules/corecompiler/original}/js/enhance.d.ts +0 -0
- /package/dist/@types/{core/js/es6_transform.d.ts → modules/corecompiler/original/js/es6Transform.d.ts} +0 -0
- /package/dist/@types/{core → modules/corecompiler/original}/js/generateMap.d.ts +0 -0
- /package/dist/@types/{core → modules/corecompiler/original}/js/workletCompile.d.ts +0 -0
- /package/dist/@types/{core → modules/corecompiler/original}/npm/filterdeps.d.ts +0 -0
- /package/dist/@types/{core/protect/file_flatter.d.ts → modules/corecompiler/original/protect/fileFlatter.d.ts} +0 -0
- /package/dist/@types/{core → modules/corecompiler/original}/utils/logger.d.ts +0 -0
- /package/dist/@types/{core → modules/corecompiler/original}/validate/validate.d.ts +0 -0
- /package/dist/@types/{core/worker_thread → modules/corecompiler/original/workerThread}/childprocess.d.ts +0 -0
- /package/dist/@types/{core/worker_thread → modules/corecompiler/original/workerThread}/config.d.ts +0 -0
- /package/dist/@types/{core/worker_thread → modules/corecompiler/original/workerThread}/fork.d.ts +0 -0
- /package/dist/@types/{core/worker_thread → modules/corecompiler/original/workerThread}/task/call_func.d.ts +0 -0
- /package/dist/@types/{core/worker_thread → modules/corecompiler/original/workerThread}/task/func.d.ts +0 -0
- /package/dist/@types/{core/worker_thread → modules/corecompiler/original/workerThread}/worker.d.ts +0 -0
- /package/dist/@types/{summer → modules/corecompiler/summer}/plugins/index.d.ts +0 -0
- /package/dist/@types/{summer → modules/corecompiler/summer}/utils/async.d.ts +0 -0
- /package/dist/@types/{summer/entry_process.d.ts → modules/corecompiler/summerEntryProcess.d.ts} +0 -0
- /package/dist/{schema → @types/schema}/dist/index.d.ts +0 -0
- /package/dist/{core → modules/corecompiler/original}/js/generateMap.js +0 -0
- /package/dist/{core/worker_thread → modules/corecompiler/original/workerThread}/config.js +0 -0
- /package/dist/{core/worker_thread → modules/corecompiler/original/workerThread}/task/call_func.js +0 -0
- /package/dist/{core/worker_thread → modules/corecompiler/original/workerThread}/task/func.js +0 -0
- /package/dist/{core/worker_thread → modules/corecompiler/original/workerThread}/task/index.js +0 -0
- /package/dist/{vendor/schema → schema}/dist/index.js +0 -0
package/dist/core/utils/env.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";function getProcessEnv(){const s=process.env.cpprocessEnv;return"childprocess"===s||"workerthread"===s||"workerprocess"===s?s:"main"}function getHostEnv(){var s;return(null===(s=process.env)||void 0===s?void 0:s.isDevtools)||process.__nwjs&&"wechatwebdevtools"===nw.App.manifest.appname?"devtools":"ci"}Object.defineProperty(exports,"__esModule",{value:!0}),exports.summerProcess=exports.hostEnv=exports.processEnv=void 0,exports.processEnv=getProcessEnv(),exports.hostEnv=getHostEnv(),exports.summerProcess="1"===process.env.summerProcess;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.logger=void 0;const worker_thread_1=require("../worker_thread"),env_1=require("./env");function pad(e,t=2){return e>10**t?String(e):`${new Array(t).join("0")}${e}`.slice(-t)}const LevelMap={trace:1,info:2,log:3,warn:4,error:5};class Logger{constructor(e){this.output=e,this.enableLevel=LevelMap.log,this.ready=!1,this.logs=[]}setOutput(e){this.output=e}setEnableLevel(e){this.enableLevel=e}setReady(){if(this.ready=!0,this.logs.length>0)for(const e of this.logs)this.output(e.level,e.args)}send(e,t){this.ready?this.output(e,t):this.logs.push({level:e,args:t})}getPrintTime(){const e=new Date;return`${String(e.getFullYear())}-${pad(e.getMonth()+1)}-${pad(e.getDate())} ${pad(e.getHours())}:${pad(e.getMinutes())}:${pad(e.getSeconds())}.${pad(e.getMilliseconds(),3)}`}_receive(e,t,r){const s=LevelMap[e];this.enableLevel>s||(r=[t=`[compiler][${env_1.processEnv}][${this.getPrintTime()}] ${t}`,...r],this.send(e,r))}info(e,...t){this._receive("info",e,t)}log(e,...t){this._receive("log",e,t)}error(e,...t){this._receive("error",e,t)}}if(exports.logger=new Logger((e,t)=>{console[e](...t)}),exports.logger.setReady(),"ci"===env_1.hostEnv&&("compiler"===process.env.debug?exports.logger.setEnableLevel(LevelMap.info):exports.logger.setEnableLevel(LevelMap.warn)),"childprocess"===env_1.processEnv&&exports.logger.setOutput((e,t)=>{process.send({command:worker_thread_1.COMMAND.SEND_LOG,data:{level:e,args:t}})}),"workerthread"===env_1.processEnv){const e=require("worker_threads").parentPort;e&&exports.logger.setOutput((t,r)=>{e.postMessage({command:worker_thread_1.COMMAND.SEND_LOG,data:{level:t,args:r}})})}
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const T=require("./validate");module.exports=new T("object",!0,{pages:new T("array",!0,new T("string",!0)),window:new T("object",!1,{backgroundColorTop:new T("string",!1),backgroundColorBottom:new T("string",!1),backgroundColor:new T("string",!1),enablePullDownRefresh:new T("boolean",!1),navigationBarTextStyle:new T("string",!1,["black","white"]),navigationBarTitleText:new T("string",!1),navigationStyle:new T("string",!1,["default","custom"]),backgroundTextStyle:new T("string",!1,["dark","light"]),onReachBottomDistance:new T("number",!1),pageOrientation:new T("string",!1,["portrait","auto","landscape"]),navigationBarBackgroundColor:new T("string",!1),renderingMode:new T("string",!1,["seperated","mixed"]),restartStrategy:new T("string",!1,["homePage","homePageAndLatestPage"])}),plugins:new T("object",!1,new T("object",!1,{provider:new T("string",!0),version:new T("string",!0)})),entryPagePath:new T("string",!1),permission:new T("object",!1,{"scope.userLocation":new T("object",!1,{desc:new T("string",!0)})}),workers:new T("string",!1),subPackages:new T("array",!1,new T("object",!1,{name:new T("string",!1),root:new T("string",!0),pages:new T("array",!0,new T("string",!1)),independent:new T("boolean",!1),plugins:new T("object",!1,new T("object",!1,{provider:new T("string",!0),version:new T("string",!0)}))})),subpackages:new T("array",!1,new T("object",!1,{name:new T("string",!1),root:new T("string",!0),pages:new T("array",!0,new T("string",!1)),plugins:new T("object",!1,new T("object",!1,{provider:new T("string",!0),version:new T("string",!0)}))})),preloadRule:new T("object",!1,new T("object",!1,{network:new T("string",!1,["all","wifi"]),packages:new T("array",!0,new T("string",!1))})),usingComponents:new T("object",!1,new T("string",!0)),tabBar:new T("object",!1,{custom:new T("boolean",!1),list:new T("array",!0,new T("object",!0,{pagePath:new T("string",!0),text:new T("string",!1),iconPath:new T("string",!1),selectedIconPath:new T("string",!1)})),borderStyle:new T("string",!1,["black","white"]),position:new T("string",!1,["bottom","top"]),color:new T("string",!1),selectedColor:new T("string",!1),backgroundColor:new T("string",!1)}),requiredBackgroundModes:new T("array",!1,new T("string",!0)),navigateToMiniProgramAppIdList:new T("array",!1,new T("string",!1)),mimeTypeDeclarations:new T("object",!1,new T("array",!1,new T("string",!1))),networkTimeout:new T("object",!1,{request:new T("number",!1),connectSocket:new T("number",!1),uploadFile:new T("number",!1),downloadFile:new T("number",!1)}),debug:new T("boolean",!1),resizable:new T("boolean",!1),functionalPages:new T("ignore",!1),cloud:new T("boolean",!1),openLocationPagePath:new T("string",!1),sitemapLocation:new T("string",!1),serviceProviderTicket:new T("string",!1),style:new T("string",!1,["v2"]),entranceDeclare:new T("object",!1,{locationMessage:new T("object",!1,{path:new T("string",!1),query:new T("string",!1)})})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const T=require("./validate"),appJSON=require("./appjson"),pageJSON=require("./pagejson");module.exports=new T("object",!1,Object.assign(Object.assign({},appJSON.value),{extEnable:new T("boolean",!0),extAppid:new T("string",!0),directCommit:new T("boolean",!1),ext:new T("object",!1),extPages:new T("object",!1,pageJSON),pages:new T("array",!1,new T("string",!0))}));
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const T=require("./validate");module.exports=new T("object",!1,{deviceOrientation:new T("string",!1,["portrait","landscape","landscapeLeft","landscapeRight"]),networkTimeout:new T("object",!1,{request:new T("number",!1),connectSocket:new T("number",!1),uploadFile:new T("number",!1),downloadFile:new T("number",!1)}),openDataContext:new T("string",!1),showStatusBar:new T("boolean",!1),workers:new T("string",!1),navigateToMiniProgramAppIdList:new T("array",!1,new T("string",!1)),disableSetUserStorageFromMiniProgram:new T("boolean",!1),permission:new T("object",!1,{"scope.userLocation":new T("object",!1,{desc:new T("string",!0)})}),subPackages:new T("array",!1,new T("object",!1,{root:new T("string",!0),name:new T("string",!1),independent:new T("boolean",!1),plugins:new T("object",!1,new T("object",!1,{provider:new T("string",!0),version:new T("string",!0),path:new T("string",!1)}))})),loadingImageInfo:new T("object",!1,{path:new T("string",!0),progressBarColor:new T("string",!1)}),subpackages:new T("array",!1,new T("object",!1,{root:new T("string",!0),name:new T("string",!1),independent:new T("boolean",!1),plugins:new T("object",!1,new T("object",!1,{provider:new T("string",!0),version:new T("string",!0),path:new T("string",!1)}))})),plugins:new T("object",!1,new T("object",!1,{provider:new T("string",!0),version:new T("string",!0),path:new T("string",!1)}))});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const T=require("./validate");module.exports=new T("object",!1,{main:new T("string",!1)});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const T=require("./validate");module.exports=new T("object",!1,{navigationBarBackgroundColor:new T("string",!1),navigationBarTextStyle:new T("string",!1,["black","white"]),navigationBarTitleText:new T("string",!1),navigationStyle:new T("string",!1,["default","custom"]),backgroundColor:new T("string",!1),backgroundTextStyle:new T("string",!1,["dark","light"]),enablePullDownRefresh:new T("boolean",!1),onReachBottomDistance:new T("number",!1),disableScroll:new T("boolean",!1),disableSwipeBack:new T("boolean",!1),backgroundColorTop:new T("string",!1),backgroundColorBottom:new T("string",!1),usingComponents:new T("object",!1,new T("string",!0)),pageOrientation:new T("string",!1,["auto","portrait","landscape"]),component:new T("boolean",!1),restartStrategy:new T("string",!1,["homePage","homePageAndLatestPage"])});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const T=require("./validate");module.exports=new T("object",!1,{publicComponents:new T("object",!1,new T("string",!0)),usingComponents:new T("object",!1,new T("string",!0)),pages:new T("object",!1,new T("string",!0)),main:new T("string",!1)});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const T=require("./validate");module.exports=new T("object",!1,{usingComponents:new T("object",!1,new T("string",!0))});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const T=require("./validate");module.exports=new T("object",!1,{miniprogramRoot:new T("string",!1),pluginRoot:new T("string",!1),packOptions:new T("object",!1,{ignore:new T("array",!1,new T("object",!1,{type:new T("string",!0),value:new T("string",!0)}))}),setting:new T("object",!1,{babelSetting:new T("object",!1,{outputPath:new T("string",!1)})})});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.NEW_CHECK_JSON_WAY=exports.schemaValidate=exports.config=void 0;const jsonschema_1=require("jsonschema"),validator=new jsonschema_1.Validator,app=require("../../vendor/schema/dist/app.js"),ext=require("../../vendor/schema/dist/ext.js"),game=require("../../vendor/schema/dist/game.js"),page=require("../../vendor/schema/dist/page.js"),plugin=require("../../vendor/schema/dist/plugin.js"),pluginpage=require("../../vendor/schema/dist/pluginpage.js"),projectconfig=require("../../vendor/schema/dist/projectconfig.js"),sitemap=require("../../vendor/schema/dist/sitemap.js"),theme=require("../../vendor/schema/dist/theme.js");exports.config={app:app,ext:ext,game:game,page:page,plugin:plugin,pluginpage:pluginpage,projectconfig:projectconfig,sitemap:sitemap,theme:theme};const SchemaMap=Object.assign({},exports.config);function schemaValidate(e,r){const a=validator.validate(r,SchemaMap[e]).errors,t=a.filter(e=>"additionalProperties"===e.name),n=a.filter(e=>"additionalProperties"!==e.name).map(e=>{if("type"===e.name||"enum"===e.name||"anyOf"===e.name){let r=e.argument;if("string"==typeof r&&(r=[r]),"anyOf"===e.name){r=[(e.schema.anyOf||[]).map(e=>e.type).join(", ")]}const a=e.property.replace(/^instance\.?/,"");return{errorType:e.name,errorProperty:a,correctType:r}}return{errorType:e.name,errorProperty:e.property.replace(/^instance\.?/,""),requireProperty:e.argument}});return{warning:t.map(r=>{const a=r.property.replace(/^instance\.?/,"");return`${e}.json ${a.length?a:""}["${r.argument}"]`}).join("、")||"",error:n}}exports.schemaValidate=schemaValidate,exports.NEW_CHECK_JSON_WAY=!0;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const T=require("./validate");module.exports=new T("object",!1,{signature:new T("array",!0,new T("object",!1,{path:new T("string",!0),md5:new T("string",!0)})),provider:new T("string",!0)});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const T=require("./validate");module.exports=new T("object",!1,{desc:new T("string",!1),rules:new T("array",!0,new T("object",!0,{action:new T("string",!0,["allow","disallow"]),page:new T("string",!0),params:new T("array",!1),matching:new T("string",!1,["inclusive","exact","exclusive","partial"]),priority:new T("number",!1)}))});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const tslib_1=require("tslib"),locales_1=tslib_1.__importDefault(require("../../utils/locales/locales"));function getType(e){return Object.prototype.toString.call(e).toLowerCase().split(" ")[1].replace("]","")}class T{constructor(e,t,r){this.type=e,this.required=t||!1;const o=this.valueType=getType(r);if("undefined"!==o)if(r instanceof T){if("array"!==e&&"object"!==e)throw new Error("value can be instance of ValidateType only when type is object or array");this.value=r}else if("array"!==o)if("regexp"!==o)if("object"!==o){if(e!==o)throw new Error(`value should be ${e} instead of ${o}`);this.value=r}else{if("object"!==e)throw new Error(e+" could not have object value");for(const e in r)if(!(r[e]instanceof T))throw new Error(`value["${e}"] should be instance of ValidateType`);this.value=r}else{if("regexp"!==e&&"string"!==e)throw new Error(e+" could not have regexp value");this.value=r}else{if("array"===e||"object"===e||"function"===e)throw new Error(e+" could not have optional value");for(let t=0,o=r.length;t<o;t++){const o=getType(r[t]);if(o!==e)throw new Error(`value[${t}] should be ${e} instead of ${o}`)}this.value=r}}static invalidKeys(e,t){const r=[];if(e instanceof T){try{e.check(t)}catch(e){return}if("object"!==e.type||"object"!==e.valueType||"object"!==getType(t))return;const o=e.value instanceof T;for(const i in t){let n=[];if(o)n=T.invalidKeys(e.value,t[i]);else{if(!e.value.hasOwnProperty(i)){r.push(`["${i}"]`);continue}n=T.invalidKeys(e.value[i],t[i])}n&&n.forEach(e=>{r.push(`["${i}"]${e}`)})}}else for(const o in t){if(!e.hasOwnProperty(o)){r.push(`["${o}"]`);continue}const i=T.invalidKeys(e[o],t[o]);i&&i.forEach(e=>{r.push(`["${o}"]${e}`)})}if(r.length>0)return r}check(e){const t=getType(e);if(!this.required&&"undefined"===t)return;if("ignore"===this.type)return;if(t!==this.type)throw new Error(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(["",this.type]));const r=this.valueType;if("undefined"!==r){if(this.value instanceof T){if("object"===this.type){for(const t in e)try{this.value.check(e[t])}catch(e){throw new Error(`["${t}"]${e.message}`)}return}if("array"===this.type){if(0===e.length&&this.value.required)throw new Error(locales_1.default.config.SHOULD_AT_LEAST_ONE_ITEM.format(""));for(let t=0,r=e.length;t<r;t++)try{this.value.check(e[t])}catch(e){throw new Error(`[${t}]${e.message}`)}return}}if("array"!==r)if("object"!==r)if("regexp"!==r){if(this.value!==e)throw new Error(locales_1.default.config.SHOULD_EQUAL.format(["",this.value.toString()]))}else{if("string"===this.type){if(!this.value.test(e))throw new Error(locales_1.default.config.SHOULD_MATCH.format(["",this.value.toString()]));return}if("regexp"===this.type&&this.value.toString()!==e.toString())throw new Error(locales_1.default.config.SHOULD_EQUAL.format(["",this.value.toString()]))}else for(const t in this.value){const r=this.value[t];try{r.check(e[t])}catch(e){throw new Error(`["${t}"]${e.message}`)}}else{let t=!1;for(const r of this.value)if(r===e){t=!0;break}if(!t)throw new Error(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(["",this.value.join(` ${locales_1.default.config.OR} `)]))}}}}module.exports=T;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _a;process.env&&process.env.isDevtools&&require("../../utils/hackrequire/index"),Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");(null===(_a=process.env)||void 0===_a?void 0:_a.isDevtools)&&require("../../utils/hackrequire/index");const config_1=require("./config"),worker_manager_1=require("./worker_manager"),log_1=tslib_1.__importDefault(require("../../utils/log")),logger_1=require("../utils/logger"),workerManager=(0,worker_manager_1.getWorkerManager)(!!process.env.isDevtools);class TaskManager{constructor(){this._taskSet=new Set,this._suicideTime=config_1.SUICIDE_TIME["miniprogram-ci"],process.env.isDevtools&&(this._suicideTime=config_1.SUICIDE_TIME.devtools)}runTask(e,s,i){clearTimeout(this._suicideTimer),this._taskSet.add(e),workerManager.runTask(s,i).then(this.onResolve.bind(this,e)).catch(this.onReject.bind(this,e))}onResolve(e,s){this._taskSet.delete(e),process.send({command:config_1.COMMAND.TASK_DONE,data:{taskId:e,result:s}}),this.setUpSuicideTimer()}onReject(e,s){process.send({command:config_1.COMMAND.TASK_DONE,data:{taskId:e,result:{error:s.toString()}}}),this.setUpSuicideTimer()}setUpSuicideTimer(){this._taskSet.size>0||(this._suicideTimer=setTimeout(()=>{clearTimeout(this._suicideTimer),process.exit(0)},this._suicideTime))}}const taskManager=new TaskManager;function suicide(){try{process.exit(0),setTimeout(()=>{process.kill(process.pid,"SIGTERM")},5e3)}catch(e){process.kill(process.pid,"SIGTERM")}}process.on("message",e=>{if("object"!=typeof e)return void log_1.default.error("child process unrecognized message "+e);const{command:s,data:i}=e;s===config_1.COMMAND.RUN_TASK?(logger_1.logger.info("child-process recieve message",s,i.filePath),taskManager.runTask(i.taskId,i.taskName,i.data)):log_1.default.error("child process unrecognized message "+e)}),process.on("disconnect",()=>{suicide()});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.childProcessManager=exports.ChildProcessCrashedError=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),child_process_1=require("child_process"),config_1=require("./config"),events_1=tslib_1.__importDefault(require("events")),log_1=tslib_1.__importDefault(require("../../utils/log")),os=tslib_1.__importStar(require("os")),logger_1=require("../utils/logger"),cpus=os.cpus().length,FORK_PATH=path_1.default.posix.join(__dirname,"./childprocess.js"),MAX_TASK_TRY_TIME=2;class ChildProcessCrashedError extends Error{constructor(s,e){super(e),this.type=s}}exports.ChildProcessCrashedError=ChildProcessCrashedError;class ChildProcessInstance extends events_1.default{constructor(s){super(),this.status=config_1.EChildProcessStatus.free,this._lastActiveTime=0,this._taskMap={},this._fullload_task_count=4,this._suicideTime=config_1.SUICIDE_TIME["miniprogram-ci"],this._fullload_task_count=s;const e={stdio:["pipe","pipe","pipe","ipc"],env:Object.assign(Object.assign({},process.env),{cpprocessEnv:"childprocess"})};if(e.env.isDevtools=process.__nwjs&&"wechatwebdevtools"===nw.App.manifest.appname,e.env.isDevtools){this._suicideTime=config_1.SUICIDE_TIME.devtools;let s=path_1.default.join(path_1.default.dirname(process.execPath),"node");"darwin"!==process.platform&&(s+=".exe"),e.execPath=s}logger_1.logger.info("fork childprocess start");const t=(0,child_process_1.fork)(FORK_PATH,["--expose-gc"],e);t.stdout.setEncoding("utf8"),logger_1.logger.info("fork childprocess end"),t.stdout.on("data",s=>{log_1.default.log("child process stdout: "+s)}),t.stderr.on("data",s=>{log_1.default.error("child process stderr: "+s),this.checkIfProcessCrashed(s.toString())}),t.on("message",this.onChildProcessMessage.bind(this,t)),t.on("exit",s=>{this.emit("exit",{code:s,crashedReason:this.crashedReason,status:this.status,tasks:Object.values(this._taskMap),pid:t.pid})}),t.unref(),this._instance=t}checkIfProcessCrashed(s){s.includes("ERR_WORKER_OUT_OF_MEMORY")&&(this.crashedReason=new ChildProcessCrashedError("ERR_WORKER_OUT_OF_MEMORY",s))}onChildProcessMessage(s,e){if("object"!=typeof e)return void logger_1.logger.error("unrecognized message from child process",e);const{command:t,data:i}=e;t!==config_1.COMMAND.SEND_LOG?(logger_1.logger.info("onChildProcessMessage "+t,i),t===config_1.COMMAND.TASK_DONE?this.onTaskDone(i):t===config_1.COMMAND.SEND_LOG&&logger_1.logger.send(i.level,i.args)):logger_1.logger.send(i.level,i.args)}onTaskDone(s){const{taskId:e,result:t}=s,i=this._taskMap[e];delete this._taskMap[e],i?(i.resolve&&(i.onStatusUpdate(config_1.ETaskStatus.done),i.resolve(t)),0===Object.keys(this._taskMap).length&&(this.status=config_1.EChildProcessStatus.free,this.setUpSuicideTimer()),this.emit("taskDone")):log_1.default.error(`child process task: ${e} not found`)}setUpSuicideTimer(){this._suicideTimer=setTimeout(()=>{clearTimeout(this._suicideTimer),this.status===config_1.EChildProcessStatus.free?(this.status=config_1.EChildProcessStatus.dying,this._instance.kill("SIGTERM")):this._suicideTimer||this.setUpSuicideTimer()},this._suicideTime)}runTask(s){clearTimeout(this._suicideTimer),this.status=config_1.EChildProcessStatus.busy,this._lastActiveTime=Date.now();const e=getId();this._taskMap[e]=s,Object.keys(this._taskMap).length>=this._fullload_task_count?this.status=config_1.EChildProcessStatus.fullload:this.status=config_1.EChildProcessStatus.busy,s.onStatusUpdate(config_1.ETaskStatus.progress),this._instance.send({command:config_1.COMMAND.RUN_TASK,data:{taskId:e,taskName:s.name,data:s.data}})}}const getId=(()=>{let s=0;return()=>s++})();class TaskManager{constructor(){this._taskQueue=[],this.onChildProcessExit=s=>{const{code:e,crashedReason:t,status:i,tasks:o,pid:r}=s;if(this._instance=void 0,i===config_1.EChildProcessStatus.busy||i===config_1.EChildProcessStatus.fullload)for(const s of o)s.retryTimes+=1,s.retryTimes<=2?(log_1.default.error(`child process: ${r} exit with code: ${e} when it is busy, retry running ${s.retryTimes} times`),this._taskQueue.push(s)):t?s.reject(t):s.reject(`child process exit with code: ${e} when it is busy`);this._run()},this.onTaskDone=()=>{this._run()}}runTask(s,e,t=(()=>{})){return new Promise((i,o)=>{const r={name:s,data:e,resolve:i,reject:o,retryTimes:0,onStatusUpdate:t};t(config_1.ETaskStatus.waiting),this._taskQueue.push(r),this._run()})}_run(){if(0===this._taskQueue.length)return;const s=this.allocChildProcess();s.status!==config_1.EChildProcessStatus.fullload&&s.status!==config_1.EChildProcessStatus.dying&&(s.runTask(this._taskQueue.shift()),this._run())}allocChildProcess(){return this._instance||(this._instance=new ChildProcessInstance(2*cpus),this._instance.on("exit",this.onChildProcessExit),this._instance.on("taskDone",this.onTaskDone)),this._instance}}exports.childProcessManager=new TaskManager;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),index_1=tslib_1.__importDefault(require("./task/index")),config_1=require("./config"),log_1=tslib_1.__importDefault(require("../../utils/log"));let isbusy=!1;process.on("message",e=>{const{command:s,data:i}=e;s===config_1.COMMAND.RUN_TASK&&(isbusy=!0,(0,index_1.default)(i.taskName,i.data).then(e=>{isbusy=!1,process.send({command:config_1.COMMAND.TASK_DONE,data:e})}).catch(e=>{isbusy=!1,process.send({command:config_1.COMMAND.TASK_DONE,data:{error:e.toString()}})}))}),process.on("SIGTERM",()=>{isbusy&&(log_1.default.error("forked sub process is kill when busy"),process.exit(1)),process.exit(0)});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.abortTask=exports.runTask=void 0;const tslib_1=require("tslib"),worker_manager_1=require("./worker_manager"),childprocess_manager_1=require("./childprocess_manager"),index_1=tslib_1.__importDefault(require("./task/index")),logger_1=require("../utils/logger");tslib_1.__exportStar(require("./config"),exports);const isDevtools=void 0!==process.env.__nwjs;async function runTask(r,e,a=(()=>{})){if(logger_1.logger.info("runTask",r,e.filePath),global.__MINIPROGRAM_CI_TEST__)return(0,index_1.default)(r,e);try{if(process.__nwjs&&"wechatwebdevtools"===nw.App.manifest.appname)return await childprocess_manager_1.childProcessManager.runTask(r,e,a);const o=(0,worker_manager_1.getWorkerManager)(isDevtools);return await o.runTask(r,e,a)}catch(a){if(a===worker_manager_1.AbortEvent)throw a;if(logger_1.logger.error(`runTask ${r}, ${e.filePath} catch error ${a}`),a instanceof childprocess_manager_1.ChildProcessCrashedError)throw new Error(`runTask ${r}, ${e.filePath} catch error ${a}`);return(0,index_1.default)(r,e)}}function abortTask(r){(0,worker_manager_1.getWorkerManager)(isDevtools).abort(r)}exports.runTask=runTask,exports.abortTask=abortTask;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const tslib_1=require("tslib"),fs_1=tslib_1.__importDefault(require("fs")),path_1=tslib_1.__importDefault(require("path")),locales_1=tslib_1.__importDefault(require("../../../utils/locales/locales")),tools_1=require("../../../utils/tools"),config_1=require("../../../config"),call_func_1=require("./call_func"),log_1=tslib_1.__importDefault(require("../../../utils/log")),babel_helper_1=require("../../../utils/babel_helper"),jsonParse_1=require("../../../utils/jsonParse"),sourcemap=()=>require("source-map"),enhanceCompile=()=>require("../../js/enhance"),workletCompile=()=>require("../../js/workletCompile"),es6Compile=()=>require("../../js/es6_transform"),minifyJS=()=>require("../../js/minifyjs"),minifyJSAfterWrap=()=>require("../../js/minifyjs_after_wrap"),MAX_CODE_LENGTH=2048e3;async function tryGetInputSourceMap(e,r){try{const t=/\/\/[#|@] sourceMappingURL=[\s]*(\S*)[\s]*$/m.exec(e),s=path_1.default.posix.dirname(r),o=path_1.default.posix.basename(r);let i;if(null==t?void 0:t[1])if(/\.js\.map$/.test(t[1]))i=await(0,call_func_1.call)("readFileAsync",path_1.default.posix.join(s,t[1]),"utf-8");else{const e=t[1].split("base64,")[1];i=Buffer.from(e,"base64").toString()}else{const e=path_1.default.posix.join(s,o+".map");fs_1.default.existsSync(e)&&(i=await(0,call_func_1.call)("readFileAsync",e,"utf-8"))}if(i){const e=(0,jsonParse_1.jsonParse)(i);new(require("source-map").SourceMapConsumer)(e);return await insertSourcesContent(e,r),e}}catch(e){log_1.default.log(`try to get input sourcemap of ${r} catch error ${e}`)}}const insertSourcesContent=async(e,r)=>{if(Array.isArray(e.sources)&&!Array.isArray(e.sourcesContent)){const t=e.sourcesContent;try{const t=path_1.default.posix.dirname(r),s=[],o=e.sources;for(const e of o){const r=await(0,call_func_1.call)("readFileAsync",path_1.default.posix.join(t,e),"utf-8");s.push(r)}e.sourcesContent=s}catch(r){e.sourcesContent=t}}};async function compileJS(e){const{code:r,filePath:t,projectPath:s,setting:o,babelRoot:i="@babel/runtime",root:a="",babelIgnore:n=[]}=e,{es7:l,es6:c,disableUseStrict:u,compileWorklet:p}=o,f="string"==typeof r?r:(0,tools_1.bufferToUtf8String)(Buffer.from(r)),_=path_1.default.posix.join(a,t),m=o.minify||o.minifyJS;if(void 0===f)return{error:{code:config_1.FILE_NOT_UTF8,path:_,message:locales_1.default.config.FILE_NOT_UTF8.format(_)}};const b=f.length>=2048e3;let d=!1;l&&(d=(0,babel_helper_1.isIgnore)(n,t));const h=await tryGetInputSourceMap(f,path_1.default.posix.join(s,a,t));if(b||d)return{error:null,isLargeFile:b,isBabelIgnore:d,map:"object"==typeof h?JSON.stringify(h):h,code:f,helpers:[]};let g=f,j=h,y=[];if(l){const e=await require("../../js/enhance")({code:f,babelRoot:i,filePath:t,disableUseStrict:u,inputSourceMap:h});if(e.error)return{error:Object.assign(Object.assign({},e.error),{path:_})};g=e.code||"",j=e.map,y=e.helpers||[]}else if(c){const e=require("../../js/es6_transform")({code:f,filePath:t,inputSourceMap:h});if(e.error)return{error:Object.assign(Object.assign({},e.error),{path:_})};g=e.code||"",j=e.map}else if(p){if(f.includes('"worklet"')||f.includes("'worklet'")){const e=await require("../../js/workletCompile")({code:f,babelRoot:i,filePath:t,disableUseStrict:u,inputSourceMap:h});if(e.error)return{error:Object.assign(Object.assign({},e.error),{path:_})};g=e.code||"",j=e.map,y=e.helpers||[]}}if(m){if(!c&&!l){const e=require("../../js/minifyjs_after_wrap")({filePath:t,code:g,inputSourceMap:j});if(e.error)return{error:Object.assign(Object.assign({},e.error),{path:_})};g=e.code,j=e.map}else{const e=require("../../js/minifyjs")({filePath:t,code:g,useTerser:!!l,inputSourceMap:j});if(e.error)return{error:Object.assign(Object.assign({},e.error),{path:_})};g=e.code,j=e.map}}if("string"!=typeof j)try{(null==j?void 0:j.sourcesContent)&&(j.sourcesContent=j.sourcesContent.map(e=>e.replace(/\r\n/g,"\n"))),j=JSON.stringify(j)}catch(e){j=""}else j=j.replace(/\\r\\n/g,"\\n");return{error:null,isLargeFile:b,isBabelIgnore:d,map:j,code:g.replace(/\r\n/g,"\n"),helpers:y||[]}}module.exports=compileJS;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),postcss_1=tslib_1.__importDefault(require("postcss")),autoprefixer_1=tslib_1.__importDefault(require("autoprefixer")),cssnano_1=tslib_1.__importDefault(require("cssnano")),locales_1=tslib_1.__importDefault(require("../../../utils/locales/locales")),tools_1=require("../../../utils/tools"),config_1=require("../../../config"),log_1=tslib_1.__importDefault(require("../../../utils/log")),wxssBrowser=["iOS >= 8","Chrome >= 37"];async function compileWXSS(e){const{code:r,filePath:o,setting:s={},root:t=""}=e,i=Buffer.from(r),l=(0,tools_1.bufferToUtf8String)(i),{minify:a,minifyWXSS:u,autoPrefixWXSS:_}=s,c=path_1.default.posix.join(t,o),f=a&&!1!==u||u;if(void 0===l)return{error:{code:config_1.FILE_NOT_UTF8,path:c,message:locales_1.default.config.FILE_NOT_UTF8.format(c)}};if(f||_)try{const e=[];_&&e.push((0,autoprefixer_1.default)({overrideBrowserslist:wxssBrowser,remove:!1})),f&&e.push((0,cssnano_1.default)({preset:["default",{reduceTransforms:!1,calc:!1,minifySelectors:!1,normalizeUrl:!1}]}));return{error:null,code:(await(0,postcss_1.default)(e).process(l,{from:(0,tools_1.leading)(o,"/")})).css.replace(/\r\n/g,"\n")}}catch(e){return log_1.default.error("postcss error @ "+c),log_1.default.error(e),{error:{code:config_1.POST_WXSS_ERR,path:c,message:e.message}}}return{error:null,code:l.replace(/\r\n/g,"\n")}}process.env.BROWSERSLIST=process.env.BROWSERSLIST||"iOS >= 8, Chrome >= 37",module.exports=compileWXSS;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";const tslib_1=require("tslib"),tools_1=require("../../../utils/tools"),path_1=tslib_1.__importDefault(require("path")),log_1=tslib_1.__importDefault(require("../../../utils/log")),config_1=require("../../../config"),locales_1=tslib_1.__importDefault(require("../../../utils/locales/locales"));function getCharCode(T){return T.charCodeAt(0)>=STATE.OTHERS?STATE.OTHERS:T.charCodeAt(0)}var TokenType,STATE,ACTION;!function(T){T[T.ATTR=0]="ATTR",T[T.STRING1=1]="STRING1",T[T.STRING2=2]="STRING2",T[T.OTHERS=3]="OTHERS"}(TokenType||(TokenType={})),function(T){T[T.ERROR=-1]="ERROR",T[T.NOT_SET=0]="NOT_SET",T[T.SIMPLE=1]="SIMPLE",T[T.TAG_START=2]="TAG_START",T[T.IN_TAG=3]="IN_TAG",T[T.IN_TAG_WORD=4]="IN_TAG_WORD",T[T.IN_STRING=5]="IN_STRING",T[T.IN_STRING_ESCAPE=6]="IN_STRING_ESCAPE",T[T.TAG_EQ=7]="TAG_EQ",T[T.IN_STRING2=9]="IN_STRING2",T[T.IN_STRING2_ESCAPE=10]="IN_STRING2_ESCAPE",T[T.IN_TEMPLATE_STRING=11]="IN_TEMPLATE_STRING",T[T.IN_TEMPLATE_STRING_ESCAPE=12]="IN_TEMPLATE_STRING_ESCAPE",T[T.IN_TEMPLATE_STRING2=13]="IN_TEMPLATE_STRING2",T[T.IN_TEMPLATE_STRING2_ESCAPE=14]="IN_TEMPLATE_STRING2_ESCAPE",T[T.WAIT_TEMPLATE_START=15]="WAIT_TEMPLATE_START",T[T.IN_TEMPLATE=16]="IN_TEMPLATE",T[T.WAIT_TEMPLATE_END=17]="WAIT_TEMPLATE_END",T[T.WAIT_FOR_RIGHT_BRACKET=18]="WAIT_FOR_RIGHT_BRACKET",T[T.IN_COMMENT=19]="IN_COMMENT",T[T.WAIT_FOR_COMMENT_END1=20]="WAIT_FOR_COMMENT_END1",T[T.WAIT_FOR_COMMENT_END2=21]="WAIT_FOR_COMMENT_END2",T[T.IN_COMMENT_BEGIN1=33]="IN_COMMENT_BEGIN1",T[T.IN_COMMENT_BEGIN2=34]="IN_COMMENT_BEGIN2",T[T.WXS_BEGIN_STEP1=22]="WXS_BEGIN_STEP1",T[T.WXS_BEGIN_STEP2=23]="WXS_BEGIN_STEP2",T[T.WXS_BEGIN_STEP3=24]="WXS_BEGIN_STEP3",T[T.WXS_BEGIN_STEP4=25]="WXS_BEGIN_STEP4",T[T.WXS_END_STEP1=26]="WXS_END_STEP1",T[T.WXS_END_STEP2=27]="WXS_END_STEP2",T[T.WXS_END_STEP3=28]="WXS_END_STEP3",T[T.WXS_END_STEP4=29]="WXS_END_STEP4",T[T.WXS_END_STEP5=30]="WXS_END_STEP5",T[T.IN_WXS=31]="IN_WXS",T[T.WXS_BEGIN_WAIT_FOR_RIGHT_BRACKET=32]="WXS_BEGIN_WAIT_FOR_RIGHT_BRACKET",T[T.SIMPLE_LINE_BREAK_BEGIN1=35]="SIMPLE_LINE_BREAK_BEGIN1",T[T.SIMPLE_LINE_BREAK_BEGIN2=36]="SIMPLE_LINE_BREAK_BEGIN2",T[T.SIMPLE_SPACE_OR_TAB=37]="SIMPLE_SPACE_OR_TAB",T[T.TEXT_BEGIN_STEP1=38]="TEXT_BEGIN_STEP1",T[T.TEXT_BEGIN_STEP2=39]="TEXT_BEGIN_STEP2",T[T.TEXT_BEGIN_STEP3=40]="TEXT_BEGIN_STEP3",T[T.TEXT_BEGIN_STEP4=41]="TEXT_BEGIN_STEP4",T[T.TEXT_BEGIN_STEP5=42]="TEXT_BEGIN_STEP5",T[T.TEXT_END_STEP1=43]="TEXT_END_STEP1",T[T.TEXT_END_STEP2=44]="TEXT_END_STEP2",T[T.TEXT_END_STEP3=45]="TEXT_END_STEP3",T[T.TEXT_END_STEP4=46]="TEXT_END_STEP4",T[T.TEXT_END_STEP5=47]="TEXT_END_STEP5",T[T.TEXT_END_STEP6=48]="TEXT_END_STEP6",T[T.IN_TEXT=49]="IN_TEXT",T[T.TEXT_BEGIN_WAIT_FOR_RIGHT_BRACKET=50]="TEXT_BEGIN_WAIT_FOR_RIGHT_BRACKET",T[T.END=99]="END",T[T.OTHERS=256]="OTHERS"}(STATE||(STATE={})),function(T){T[T.NOTHING=0]="NOTHING",T[T.DO_ACTION=65536]="DO_ACTION",T[T.STORE_TOKEN_EXCLUDE=131072]="STORE_TOKEN_EXCLUDE",T[T.STORE_TOKEN_INCLUDE=262144]="STORE_TOKEN_INCLUDE",T[T.IGNORE=524288]="IGNORE",T[T.REFEED=1048576]="REFEED",T[T.STORE_TOKEN_FIRST=2097152]="STORE_TOKEN_FIRST",T[T.STORE_ONE_SPACE=4194304]="STORE_ONE_SPACE",T[T.STORE_ONE_LINE_BREAK=8388608]="STORE_ONE_LINE_BREAK",T[T.GET_WHITECHARS_BEFORE=16777216]="GET_WHITECHARS_BEFORE",T[T.STORE_STATE_BEFORE_COMMENT=33554432]="STORE_STATE_BEFORE_COMMENT",T[T.SET_WXS_STATE=67108864]="SET_WXS_STATE",T[T.WXS_BACK=134217728]="WXS_BACK",T[T.SET_TEXT_STATE=268435456]="SET_TEXT_STATE",T[T.TEXT_BACK=536870912]="TEXT_BACK"}(ACTION||(ACTION={}));class Token{constructor(T,E){this.type=T,this.value=E}}class MachineState{constructor(){this.cur_pos=0,this.last_pos=0,this.line=1,this.col=1,this.last_line=this.line,this.last_col=1,this.state=STATE.SIMPLE}}class Machine{constructor(T,E){this.mState=new MachineState,this.TT=new Array(1024);for(let T=0;T<1024;T++){const E=new Array(257);this.TT[T]=E}this.InitTransitTable(),this.mPath=T,this.mSrc=E,this.stateBeforeComment=STATE.SIMPLE,this.wxsState=!1,this.textState=!1}Reset(){return this.mState.cur_pos=this.mState.last_pos=0,this.mState.line=1,this.mState.col=1,this.mState.last_line=this.mState.line,this.mState.last_col=1,this.mState.state=STATE.SIMPLE,0}Feed(T,E){let _,S,t,A,N;"\n"===T&&(this.mState.line++,this.mState.col=0);do{if(N=!1,void 0!==_&&_&ACTION.REFEED&&(N=!0),_=this.TT[this.mState.state][getCharCode(T)],_===STATE.NOT_SET&&(_=this.TT[this.mState.state][STATE.OTHERS]),_===STATE.NOT_SET)throw{msg:`BAD STATE MACHINE! AT INPUT ${this.mState.state} ${T}`};if(_<0)throw"\0"!==T?{msg:`${this.mState.line}:${this.mState.col}:unexpected character \`${T.replace("\n","\\n")}\``}:{msg:`${this.mState.line}:${this.mState.col}:unexpected end`};if(S=_,t=65535&_,A=this.mState.state,S&ACTION.STORE_STATE_BEFORE_COMMENT&&!N&&(this.stateBeforeComment=A),A===STATE.WAIT_FOR_RIGHT_BRACKET&&">"===T&&this.wxsState&&(this.wxsState=!1),A===STATE.WAIT_FOR_RIGHT_BRACKET&&">"===T&&this.textState&&(this.textState=!1),S&ACTION.SET_WXS_STATE&&(this.wxsState=!this.wxsState),S&ACTION.SET_TEXT_STATE&&(this.textState=!this.textState),">"===T&&t===STATE.SIMPLE&&this.wxsState&&(t=STATE.IN_WXS),">"===T&&t===STATE.SIMPLE&&this.textState&&(t=STATE.IN_TEXT),this.mState.state=t,S&ACTION.STORE_TOKEN_FIRST&&this.mState.cur_pos>this.mState.last_pos){const T=new Token(TokenType.OTHERS,this.mSrc.substring(this.mState.last_pos,this.mState.last_pos+1));E.push(T),this.mState.last_pos++,this.mState.last_col++}if(S&ACTION.STORE_ONE_LINE_BREAK){const T=new Token(TokenType.OTHERS,"\n");E.push(T),this.mState.last_pos=this.mState.cur_pos,this.mState.last_col=this.mState.col,this.mState.last_line=this.mState.line}if(S&ACTION.STORE_ONE_SPACE){const T=new Token(TokenType.OTHERS," ");E.push(T),this.mState.last_pos=this.mState.cur_pos,this.mState.last_col=this.mState.col,this.mState.last_line=this.mState.line}}while(_&ACTION.REFEED);if(S&ACTION.STORE_TOKEN_EXCLUDE){const T=this.mState.cur_pos,_=this.mState.last_pos;if(T>_){let S;S=A===STATE.IN_TAG_WORD&&_>0&&" \n\t\r".includes(this.mSrc[_-1])?new Token(TokenType.ATTR,this.mSrc.substring(_,T)):(this.wxsState&&STATE.IN_WXS,new Token(TokenType.OTHERS,this.mSrc.substring(_,T))),E.push(S),this.mState.last_pos=this.mState.cur_pos,this.mState.last_col=this.mState.col,this.mState.last_line=this.mState.line}}if(S&ACTION.WXS_BACK){const T=new Token(TokenType.OTHERS,this.mSrc.substring(this.mState.last_pos,this.mState.cur_pos-4));E.push(T),this.mState.last_pos=this.mState.cur_pos-4,this.mState.last_col=this.mState.col-4,this.mState.last_line=this.mState.line}if(S&ACTION.TEXT_BACK){const T=new Token(TokenType.OTHERS,this.mSrc.substring(this.mState.last_pos,this.mState.cur_pos-5));E.push(T),this.mState.last_pos=this.mState.cur_pos-5,this.mState.last_col=this.mState.col-5,this.mState.last_line=this.mState.line}if(this.mState.cur_pos++,this.mState.col++,S&ACTION.STORE_TOKEN_INCLUDE){let T;T=A===STATE.IN_STRING?TokenType.STRING1:A===STATE.IN_STRING2?TokenType.STRING2:TokenType.OTHERS;const _=new Token(T,this.mSrc.substring(this.mState.last_pos,this.mState.cur_pos));E.push(_),this.mState.last_pos=this.mState.cur_pos,this.mState.last_col=this.mState.col,this.mState.last_line=this.mState.line}return S&ACTION.IGNORE&&(this.mState.last_pos=this.mState.cur_pos,this.mState.last_col=this.mState.col),S&ACTION.GET_WHITECHARS_BEFORE&&(this.mState.state=this.stateBeforeComment,this.stateBeforeComment!==STATE.SIMPLE_LINE_BREAK_BEGIN2&&this.stateBeforeComment!==STATE.SIMPLE_SPACE_OR_TAB||E.pop(),this.stateBeforeComment=STATE.SIMPLE),0}FillTT(T,E,_,S){for(const t of S)this.TT[T][getCharCode(t)]=E|_}FillTT_template_string(T,E){const _=T+1;this.TT[T][getCharCode("\\")]=_,this.TT[_][STATE.OTHERS]=T,this.TT[T][getCharCode(E)]=STATE.IN_TEMPLATE,this.TT[T][0]=STATE.ERROR,this.TT[T][STATE.OTHERS]=T}FillTT_string(T,E){const _=T+1;this.TT[T][getCharCode("\\")]=_,this.TT[T][getCharCode("\n")]=STATE.ERROR,this.TT[_][STATE.OTHERS]=T,this.TT[_][getCharCode("\n")]=STATE.IN_TAG|ACTION.STORE_TOKEN_EXCLUDE|ACTION.IGNORE,this.TT[T][getCharCode(E)]=STATE.IN_TAG|ACTION.STORE_TOKEN_INCLUDE,this.TT[T][0]=STATE.ERROR,this.TT[T][STATE.OTHERS]=T}InitTransitTable(){for(let T=0;T<1024;T++)this.TT[T].fill(0);const T="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-:";this.TT[STATE.END][STATE.OTHERS]=STATE.END,this.TT[STATE.SIMPLE][getCharCode("<")]=STATE.TAG_START|ACTION.STORE_TOKEN_EXCLUDE|ACTION.STORE_STATE_BEFORE_COMMENT,this.TT[STATE.SIMPLE][getCharCode("{")]=STATE.WAIT_TEMPLATE_START,this.TT[STATE.SIMPLE][STATE.OTHERS]=STATE.SIMPLE,this.TT[STATE.SIMPLE][0]=STATE.END|ACTION.STORE_TOKEN_EXCLUDE,this.TT[STATE.WAIT_TEMPLATE_START][getCharCode("{")]=STATE.IN_TEMPLATE,this.TT[STATE.WAIT_TEMPLATE_START][STATE.OTHERS]=STATE.SIMPLE,this.TT[STATE.IN_TEMPLATE][getCharCode("}")]=STATE.WAIT_TEMPLATE_END,this.TT[STATE.IN_TEMPLATE][0]=STATE.ERROR,this.TT[STATE.IN_TEMPLATE][STATE.OTHERS]=STATE.IN_TEMPLATE,this.TT[STATE.WAIT_TEMPLATE_END][getCharCode("}")]=STATE.SIMPLE,this.TT[STATE.WAIT_TEMPLATE_END][STATE.OTHERS]=STATE.IN_TEMPLATE|ACTION.REFEED,this.TT[STATE.IN_TEMPLATE][getCharCode('"')]=STATE.IN_TEMPLATE_STRING,this.TT[STATE.IN_TEMPLATE][getCharCode("'")]=STATE.IN_TEMPLATE_STRING2,this.FillTT_template_string(STATE.IN_TEMPLATE_STRING,'"'),this.FillTT_template_string(STATE.IN_TEMPLATE_STRING2,"'"),this.FillTT(STATE.TAG_START,STATE.IN_TAG,ACTION.STORE_TOKEN_EXCLUDE|ACTION.IGNORE," \n\t\r"),this.FillTT(STATE.TAG_START,STATE.IN_TAG_WORD,ACTION.STORE_TOKEN_EXCLUDE,T),this.TT[STATE.TAG_START][getCharCode("/")]=STATE.IN_TAG|ACTION.STORE_TOKEN_INCLUDE,this.TT[STATE.TAG_START][getCharCode("!")]=STATE.IN_COMMENT_BEGIN1,this.TT[STATE.TAG_START][STATE.OTHERS]=STATE.ERROR,this.TT[STATE.IN_COMMENT_BEGIN1][getCharCode("-")]=STATE.IN_COMMENT_BEGIN2,this.TT[STATE.IN_COMMENT_BEGIN1][STATE.OTHERS]=STATE.ERROR,this.TT[STATE.IN_COMMENT_BEGIN2][getCharCode("-")]=STATE.IN_COMMENT,this.TT[STATE.IN_COMMENT_BEGIN2][STATE.OTHERS]=STATE.ERROR,this.TT[STATE.IN_COMMENT][getCharCode("-")]=STATE.WAIT_FOR_COMMENT_END1,this.TT[STATE.IN_COMMENT][STATE.OTHERS]=STATE.IN_COMMENT,this.TT[STATE.WAIT_FOR_COMMENT_END1][getCharCode("-")]=STATE.WAIT_FOR_COMMENT_END2,this.TT[STATE.WAIT_FOR_COMMENT_END1][STATE.OTHERS]=STATE.IN_COMMENT,this.TT[STATE.WAIT_FOR_COMMENT_END2][getCharCode(">")]=STATE.SIMPLE|ACTION.IGNORE|ACTION.GET_WHITECHARS_BEFORE,this.TT[STATE.WAIT_FOR_COMMENT_END2][getCharCode("-")]=STATE.WAIT_FOR_COMMENT_END2,this.TT[STATE.WAIT_FOR_COMMENT_END2][STATE.OTHERS]=STATE.IN_COMMENT,this.FillTT(STATE.IN_TAG_WORD,STATE.IN_TAG_WORD,ACTION.NOTHING,T),this.FillTT(STATE.IN_TAG_WORD,STATE.IN_TAG_WORD,ACTION.NOTHING,"0123456789"),this.FillTT(STATE.IN_TAG_WORD,STATE.IN_TAG,ACTION.STORE_TOKEN_EXCLUDE|ACTION.IGNORE," \n\t\r"),this.TT[STATE.IN_TAG_WORD][getCharCode("=")]=STATE.TAG_EQ|ACTION.STORE_TOKEN_EXCLUDE,this.TT[STATE.IN_TAG_WORD][getCharCode('"')]=STATE.ERROR,this.TT[STATE.IN_TAG_WORD][getCharCode(">")]=STATE.SIMPLE|ACTION.STORE_TOKEN_EXCLUDE|ACTION.STORE_TOKEN_INCLUDE,this.TT[STATE.IN_TAG_WORD][getCharCode("/")]=STATE.WAIT_FOR_RIGHT_BRACKET|ACTION.STORE_TOKEN_EXCLUDE,this.TT[STATE.IN_TAG_WORD][STATE.OTHERS]=STATE.IN_TAG|ACTION.STORE_TOKEN_EXCLUDE,this.TT[STATE.IN_TAG_WORD][0]=STATE.ERROR,this.FillTT(STATE.TAG_EQ,STATE.IN_TAG,ACTION.STORE_TOKEN_EXCLUDE|ACTION.IGNORE," \n\t\r"),this.FillTT(STATE.TAG_EQ,STATE.IN_STRING,ACTION.STORE_TOKEN_EXCLUDE,T),this.TT[STATE.TAG_EQ][getCharCode('"')]=STATE.IN_STRING|ACTION.STORE_TOKEN_EXCLUDE,this.TT[STATE.TAG_EQ][getCharCode("'")]=STATE.IN_STRING2|ACTION.STORE_TOKEN_EXCLUDE,this.TT[STATE.TAG_EQ][0]=STATE.ERROR,this.TT[STATE.TAG_EQ][STATE.OTHERS]=STATE.ERROR,this.FillTT(STATE.IN_TAG,STATE.IN_TAG,ACTION.IGNORE," \n\t\r"),this.FillTT(STATE.IN_TAG,STATE.IN_TAG_WORD,ACTION.NOTHING,T),this.FillTT(STATE.IN_TAG,STATE.ERROR,ACTION.NOTHING,"0123456789"),this.TT[STATE.IN_TAG][getCharCode("<")]=STATE.ERROR,this.TT[STATE.IN_TAG][getCharCode('"')]=STATE.IN_STRING,this.TT[STATE.IN_TAG][getCharCode("'")]=STATE.IN_STRING2,this.TT[STATE.IN_TAG][getCharCode("/")]=STATE.WAIT_FOR_RIGHT_BRACKET,this.TT[STATE.IN_TAG][getCharCode(">")]=STATE.SIMPLE|ACTION.STORE_TOKEN_INCLUDE,this.TT[STATE.IN_TAG][getCharCode("=")]=STATE.TAG_EQ,this.TT[STATE.IN_TAG][0]=STATE.ERROR,this.TT[STATE.IN_TAG][STATE.OTHERS]=STATE.ERROR,this.FillTT(STATE.WAIT_FOR_RIGHT_BRACKET,STATE.IN_TAG_WORD,ACTION.STORE_TOKEN_EXCLUDE,T),this.TT[STATE.WAIT_FOR_RIGHT_BRACKET][getCharCode(">")]=STATE.SIMPLE|ACTION.STORE_TOKEN_INCLUDE,this.TT[STATE.WAIT_FOR_RIGHT_BRACKET][STATE.OTHERS]=STATE.ERROR,this.FillTT_string(STATE.IN_STRING,'"'),this.FillTT_string(STATE.IN_STRING2,"'"),this.TT[STATE.TAG_START][getCharCode("w")]=STATE.WXS_BEGIN_STEP1;let E="wxs",_=STATE.WXS_BEGIN_STEP1;for(let T=1,S=_;T<E.length;T++)this.TT[S][getCharCode(E[T])]=_+T,this.TT[S][STATE.OTHERS]=STATE.IN_TAG_WORD|ACTION.REFEED|ACTION.STORE_TOKEN_FIRST,2===T&&(this.TT[S][getCharCode(E[T])]|=ACTION.SET_WXS_STATE),S=_+T;this.FillTT(STATE.WXS_BEGIN_STEP3,STATE.IN_TAG,ACTION.STORE_TOKEN_EXCLUDE|ACTION.IGNORE," \n\t\r"),this.TT[STATE.WXS_BEGIN_STEP3][getCharCode(">")]=STATE.IN_WXS|ACTION.STORE_TOKEN_EXCLUDE|ACTION.STORE_TOKEN_INCLUDE,this.TT[STATE.WXS_BEGIN_STEP3][STATE.OTHERS]=STATE.IN_TAG_WORD|ACTION.REFEED|ACTION.STORE_TOKEN_FIRST|ACTION.SET_WXS_STATE,this.TT[STATE.IN_WXS][getCharCode("<")]=STATE.WXS_END_STEP1,this.TT[STATE.IN_WXS][STATE.OTHERS]=STATE.IN_WXS,E="</wxs",_=STATE.WXS_END_STEP1;for(let T=1,S=_;T<E.length;T++)this.TT[S][getCharCode(E[T])]=_+T,4===T&&(this.TT[S][getCharCode(E[T])]|=ACTION.WXS_BACK|ACTION.SET_WXS_STATE),this.TT[S][STATE.OTHERS]=STATE.IN_WXS|ACTION.REFEED,S=_+T;this.FillTT(STATE.WXS_END_STEP5,STATE.WXS_END_STEP5,ACTION.NOTHING," \n\t\r"),this.TT[STATE.WXS_END_STEP5][getCharCode(">")]=STATE.SIMPLE|ACTION.STORE_TOKEN_INCLUDE,this.TT[STATE.WXS_END_STEP5][STATE.OTHERS]=STATE.ERROR,this.TT[STATE.SIMPLE][getCharCode(" ")]=STATE.SIMPLE_SPACE_OR_TAB|ACTION.STORE_TOKEN_EXCLUDE,this.TT[STATE.SIMPLE][getCharCode("\t")]=STATE.SIMPLE_SPACE_OR_TAB|ACTION.STORE_TOKEN_EXCLUDE,this.TT[STATE.SIMPLE][getCharCode("\n")]=STATE.SIMPLE_LINE_BREAK_BEGIN1|ACTION.STORE_TOKEN_EXCLUDE,this.TT[STATE.SIMPLE_SPACE_OR_TAB][getCharCode(" ")]=STATE.SIMPLE_SPACE_OR_TAB,this.TT[STATE.SIMPLE_SPACE_OR_TAB][getCharCode("\t")]=STATE.SIMPLE_SPACE_OR_TAB,this.TT[STATE.SIMPLE_SPACE_OR_TAB][getCharCode("\n")]=STATE.SIMPLE_SPACE_OR_TAB,this.TT[STATE.SIMPLE_SPACE_OR_TAB][getCharCode("<")]=STATE.SIMPLE|ACTION.STORE_ONE_SPACE|ACTION.REFEED|ACTION.STORE_STATE_BEFORE_COMMENT,this.TT[STATE.SIMPLE_SPACE_OR_TAB][STATE.OTHERS]=STATE.SIMPLE|ACTION.STORE_ONE_SPACE|ACTION.REFEED,this.TT[STATE.SIMPLE_LINE_BREAK_BEGIN1][getCharCode("\n")]=STATE.SIMPLE_LINE_BREAK_BEGIN2,this.TT[STATE.SIMPLE_LINE_BREAK_BEGIN1][getCharCode("\t")]=STATE.SIMPLE_SPACE_OR_TAB,this.TT[STATE.SIMPLE_LINE_BREAK_BEGIN1][getCharCode(" ")]=STATE.SIMPLE_SPACE_OR_TAB,this.TT[STATE.SIMPLE_LINE_BREAK_BEGIN1][getCharCode("<")]=STATE.SIMPLE|ACTION.REFEED|ACTION.STORE_STATE_BEFORE_COMMENT,this.TT[STATE.SIMPLE_LINE_BREAK_BEGIN1][STATE.OTHERS]=STATE.SIMPLE|ACTION.REFEED|ACTION.STORE_TOKEN_EXCLUDE,this.TT[STATE.SIMPLE_LINE_BREAK_BEGIN2][getCharCode("\n")]=STATE.SIMPLE_LINE_BREAK_BEGIN2,this.TT[STATE.SIMPLE_LINE_BREAK_BEGIN2][getCharCode("\t")]=STATE.SIMPLE_SPACE_OR_TAB,this.TT[STATE.SIMPLE_LINE_BREAK_BEGIN2][getCharCode(" ")]=STATE.SIMPLE_SPACE_OR_TAB,this.TT[STATE.SIMPLE_LINE_BREAK_BEGIN2][getCharCode("<")]=STATE.SIMPLE|ACTION.STORE_ONE_LINE_BREAK|ACTION.REFEED|ACTION.STORE_STATE_BEFORE_COMMENT,this.TT[STATE.SIMPLE_LINE_BREAK_BEGIN2][STATE.OTHERS]=STATE.SIMPLE|ACTION.REFEED|ACTION.STORE_ONE_LINE_BREAK,this.TT[STATE.TAG_START][getCharCode("t")]=STATE.TEXT_BEGIN_STEP1,E="text",_=STATE.TEXT_BEGIN_STEP1;for(let T=1,S=_;T<E.length;T++)this.TT[S][getCharCode(E[T])]=_+T,3===T&&(this.TT[S][getCharCode(E[T])]|=ACTION.SET_TEXT_STATE),this.TT[S][STATE.OTHERS]=STATE.IN_TAG_WORD|ACTION.REFEED|ACTION.STORE_TOKEN_FIRST,S=_+T;this.FillTT(STATE.TEXT_BEGIN_STEP4,STATE.IN_TAG,ACTION.STORE_TOKEN_EXCLUDE|ACTION.IGNORE," \n\t\r"),this.TT[STATE.TEXT_BEGIN_STEP4][getCharCode(">")]=STATE.IN_TEXT|ACTION.STORE_TOKEN_EXCLUDE|ACTION.STORE_TOKEN_INCLUDE,this.TT[STATE.TEXT_BEGIN_STEP4][STATE.OTHERS]=STATE.IN_TAG_WORD|ACTION.REFEED|ACTION.STORE_TOKEN_FIRST|ACTION.SET_TEXT_STATE,this.TT[STATE.IN_TEXT][getCharCode("<")]=STATE.TEXT_END_STEP1,this.TT[STATE.IN_TEXT][STATE.OTHERS]=STATE.IN_TEXT,E="</text",_=STATE.TEXT_END_STEP1;for(let T=1,S=_;T<E.length;T++)this.TT[S][getCharCode(E[T])]=_+T,5===T&&(this.TT[S][getCharCode(E[T])]|=ACTION.TEXT_BACK|ACTION.SET_TEXT_STATE),this.TT[S][STATE.OTHERS]=STATE.IN_TEXT|ACTION.REFEED,S=_+T;this.FillTT(STATE.TEXT_END_STEP6,STATE.TEXT_END_STEP6,ACTION.NOTHING," \n\t\r"),this.TT[STATE.TEXT_END_STEP6][getCharCode(">")]=STATE.SIMPLE|ACTION.STORE_TOKEN_INCLUDE,this.TT[STATE.TEXT_END_STEP6][STATE.OTHERS]=STATE.ERROR}}class Tokenizer{constructor(T,E){this.machine=new Machine(E,T),this.m_pSrc=T,this.path=E}generateTokens(T){this.machine.Reset();let E=0;if(0===this.m_pSrc.length)return E;for(let _=0;_<this.m_pSrc.length&&0==E;_++){const S=this.m_pSrc[_];E=this.machine.Feed(S,T)}return 0!==E||(E=this.machine.Feed("\0",T)),E}}function generateWXMLFromTokens(T){let E="";for(const _ of T){let T=_.value;_.type===TokenType.ATTR&&(T=" "+T),E+=T}return E}async function minifyWXML(T){const{code:E,filePath:_,setting:S={},root:t=""}=T,{minify:A,minifyWXML:N}=S,e=!!N,I=path_1.default.posix.join(t,_),s=Buffer.from(E);let O=(0,tools_1.bufferToUtf8String)(s);if(void 0===O)return{error:{code:config_1.FILE_NOT_UTF8,path:I,message:locales_1.default.config.FILE_NOT_UTF8.format(I)}};if(e&&O.length>0)try{const T=new Tokenizer(O.replace(/\r\n/g,"\n"),I),E=[],_=T.generateTokens(E);if(0!==_)throw new Error("minifywxml tokenizer error ret: "+_);return O=generateWXMLFromTokens(E),{error:null,code:O.replace(/\r\n/g,"\n")}}catch(T){return log_1.default.error("minifywxml error @ "+I),log_1.default.error(T.msg),{error:{code:config_1.MINIFY_WXML_ERR,path:I,message:T.msg}}}return{error:null,code:O.replace(/\r\n/g,"\n")}}module.exports={minifyWXML:minifyWXML,Tokenizer:Tokenizer,generateWXMLFromTokens:generateWXMLFromTokens,Token:Token};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _a;process.env&&process.env.isDevtools&&require("../../utils/hackrequire/index"),Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");(null===(_a=process.env)||void 0===_a?void 0:_a.isDevtools)&&require("../../utils/hackrequire/index");const worker_threads_1=require("worker_threads"),index_1=tslib_1.__importDefault(require("./task/index")),config_1=require("./config"),logger_1=require("../utils/logger");worker_threads_1.isMainThread?module.exports=index_1.default:worker_threads_1.parentPort.on("message",e=>{const{command:r,data:o}=e;r===config_1.COMMAND.RUN_TASK&&(logger_1.logger.info("worker process task start",r,o.data.filePath),(0,index_1.default)(o.taskName,o.data).then(e=>{logger_1.logger.info("worker process task end",r,o.data.filePath),worker_threads_1.parentPort.postMessage({command:config_1.COMMAND.TASK_DONE,data:e})}).catch(e=>{worker_threads_1.parentPort.postMessage({command:config_1.COMMAND.TASK_DONE,data:{error:e.toString()}})}))});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getWorkerManager=exports.AbortEvent=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),os_1=tslib_1.__importDefault(require("os")),events_1=tslib_1.__importDefault(require("events")),log_1=tslib_1.__importDefault(require("../../utils/log")),config_1=require("./config"),call_func_1=require("./task/call_func"),child_process_1=require("child_process"),logger_1=require("../utils/logger"),env_1=require("../utils/env"),cpus=os_1.default.cpus().length,WORKER_PATH=path_1.default.posix.join(__dirname,"./worker.js"),FORK_PATH=path_1.default.posix.join(__dirname,"./fork.js"),MAX_TASK_TRY_TIME=2;let envIsDevtools=!1;function getCurrentScriptPath(){const e=path_1.default.posix.relative(process.cwd(),__filename);return process.cwd()===__dirname?`.${path_1.default.posix.resolve}${e}`:e}let Worker,workerManagerInstance,supportWorkerThread=!1;try{Worker=require("worker_threads").Worker,supportWorkerThread=!0}catch(e){supportWorkerThread=!1}exports.AbortEvent="WorkerTaskAborted";class WorkerInstance extends events_1.default{constructor(){super(),this.status=config_1.EWorkerStatus.free,this.threadId=-1,this._suicideTime=config_1.SUICIDE_TIME["miniprogram-ci"],this._postMessage=()=>{},envIsDevtools&&(this._suicideTime=config_1.SUICIDE_TIME.devtools);const e={NODE_PATH:path_1.default.posix.join(getCurrentScriptPath(),"../../../node_modules"),isDevtools:String(envIsDevtools)};supportWorkerThread?(logger_1.logger.info("create worker start"),this._instance=new Worker(WORKER_PATH,{env:Object.assign(Object.assign({},e),{cpprocessEnv:"workerthread"}),stdout:!0}),this.threadId=this._instance.threadId,this._postMessage=this._instance.postMessage.bind(this._instance)):(this._instance=(0,child_process_1.fork)(FORK_PATH,[""],{env:Object.assign(Object.assign({},e),{cpprocessEnv:"workerprocess"})}),this.threadId=this._instance.pid,this._postMessage=this._instance.send.bind(this._instance));this._instance.on("message",e=>{const{command:t,data:s}=e;t===config_1.COMMAND.TASK_DONE&&this.onTaskDone(s),t===config_1.COMMAND.SEND_LOG&&logger_1.logger.send(s.level,s.args),t===config_1.COMMAND.CALL_FUNC&&call_func_1.call.apply(null,[s.funcName,...s.args]).then(e=>{this._postMessage({command:config_1.COMMAND.CALL_FUNC_RESULT,data:{id:s.id,result:e}})}).catch(e=>{this._postMessage({command:config_1.COMMAND.CALL_FUNC_RESULT,data:{id:s.id,error:e.toString()}})})}),this._instance.on("exit",e=>{0!==e&&1!==e&&log_1.default.error(`worker thread: ${this.threadId}, status: ${this.status}, exit with code: ${e}`),this.emit("exit",{code:e,status:this.status,task:this._task,threadId:this.threadId})})}on(e,t){return super.on(e,t)}onTaskDone(e){var t;this.status=config_1.EWorkerStatus.free,(null===(t=this._task)||void 0===t?void 0:t.resolve)&&(this._task.onStatusUpdate(config_1.ETaskStatus.done),this._task.resolve(e)),this._task=void 0,this.emit("taskDone",this.threadId),env_1.summerProcess||this.setUpSuicideTimer()}setUpSuicideTimer(){this._suicideTimer=setTimeout(()=>{clearTimeout(this._suicideTimer),this.status===config_1.EWorkerStatus.free?(this.status=config_1.EWorkerStatus.dying,supportWorkerThread?this._instance.terminate():this._instance.kill("SIGTERM")):this._suicideTimer||this.setUpSuicideTimer()},this._suicideTime)}runTask(e){clearTimeout(this._suicideTimer),this.status=config_1.EWorkerStatus.busy,this._task=e,this._task.onStatusUpdate(config_1.ETaskStatus.progress),this._postMessage({command:config_1.COMMAND.RUN_TASK,data:{taskName:e.name,data:e.data}})}}class WorkerManager{constructor(e,t=!1){this._taskQueue=[],this._workerPool={},this._max_pool_size=4,this.onWorkerExit=e=>{const{code:t,status:s,task:r,threadId:i}=e;delete this._workerPool[i],s===config_1.EWorkerStatus.busy&&(r.retryTimes+=1,r.retryTimes<=2?(log_1.default.error(`worker thread: ${i} exit with code: ${t} when it is busy, retry ${r.retryTimes} times`),this._taskQueue.push(r)):r.reject(`worker thread exit with code: ${t} when it is busy`)),this._run()},this._actualWorkerPoolSize=1,this._doneThreadSet=new Set,this.onTaskDone=e=>{this._doneThreadSet.add(e),this._actualWorkerPoolSize=Math.min(howManyWorker(this._doneThreadSet.size),this._max_pool_size),this._run()},this._max_pool_size=e>8?8:e,envIsDevtools=t}runTask(e,t,s=(()=>{})){return new Promise((r,i)=>{const o={name:e,data:t,resolve:r,reject:i,retryTimes:0,onStatusUpdate:s};s(config_1.ETaskStatus.waiting),this._taskQueue.push(o),this._run()})}abort(e){const t=[],s=[];this._taskQueue.forEach(r=>{r.name!==e?s.push(r):t.push(r)}),t.forEach(e=>{e.reject(exports.AbortEvent)}),this._taskQueue=s}_run(){let e=this._taskQueue[0];for(;e;){const t=this.allocWorker();if(!t)return;this._taskQueue.shift(),t.runTask(e),e=this._taskQueue[0]}}allocWorker(){for(const e in this._workerPool){const t=this._workerPool[e];if(t.status===config_1.EWorkerStatus.free)return t}if(this.workerCount()<this._max_pool_size){const e=new WorkerInstance;return e.on("taskDone",this.onTaskDone),e.on("exit",this.onWorkerExit),this._workerPool[e.threadId]=e,e}return null}workerCount(){return Object.keys(this._workerPool).length}}function howManyWorker(e){switch(e){case 1:return 4;case 2:return 6;default:return 8}}const getWorkerManager=function(e=!1){if(!workerManagerInstance){let t=parseInt(process.env.COMPILE_THREADS||"0",10);(t<=0||t>cpus)&&(t=cpus),workerManagerInstance=new WorkerManager(t,e)}return workerManagerInstance};exports.getWorkerManager=getWorkerManager;
|
package/dist/core.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.cleanCache=exports.mergeThemeJSONToPageJSON=exports.mergeThemeJSONToAppJSON=exports.schemaValidate=exports.checkThemeJSON=exports.getPluginPageJSON=exports.getPluginJSON=exports.getGameJSON=exports.compile=exports.compileJS=exports.getPageJSON=exports.getAppJSON=exports.setLocale=exports.setFSAgent=exports.partialAnalyse=void 0;const tslib_1=require("tslib"),index_1=require("./core/compile/index");Object.defineProperty(exports,"compile",{enumerable:!0,get:function(){return index_1.compile}});const app_1=require("./core/json/app"),getPageJSON_1=require("./core/json/page/getPageJSON");Object.defineProperty(exports,"getPageJSON",{enumerable:!0,get:function(){return getPageJSON_1.getPageJSON}});const js_1=require("./core/compile/handler/js");Object.defineProperty(exports,"compileJS",{enumerable:!0,get:function(){return js_1.compileJS}});const plugin_1=require("./core/json/plugin/plugin");Object.defineProperty(exports,"getPluginJSON",{enumerable:!0,get:function(){return plugin_1.getDevPluginJSON}});const plugin_page_1=require("./core/json/plugin/plugin_page");Object.defineProperty(exports,"getPluginPageJSON",{enumerable:!0,get:function(){return plugin_page_1.getPluginPageJSON}});const cache_1=require("./utils/cache"),theme_1=require("./core/json/theme");Object.defineProperty(exports,"checkThemeJSON",{enumerable:!0,get:function(){return theme_1.checkThemeJSON}}),Object.defineProperty(exports,"mergeThemeJSONToAppJSON",{enumerable:!0,get:function(){return theme_1.mergeThemeJSONToAppJSON}}),Object.defineProperty(exports,"mergeThemeJSONToPageJSON",{enumerable:!0,get:function(){return theme_1.mergeThemeJSONToPageJSON}});const schemaValidate_1=require("./core/validate/schemaValidate");Object.defineProperty(exports,"schemaValidate",{enumerable:!0,get:function(){return schemaValidate_1.schemaValidate}});const reactiveCache_1=require("./core/json/reactiveCache"),fs_1=tslib_1.__importDefault(require("./utils/fs")),locales_1=tslib_1.__importDefault(require("./utils/locales/locales")),game_1=tslib_1.__importDefault(require("./core/json/game"));function setFSAgent(e){fs_1.default.setAgent(e)}async function getAppJSON(e){try{const t=(0,reactiveCache_1.tryToGetReactiveProject)(e);return await t.updateProject(),(0,app_1.getAppJSON)(e)}catch(e){throw console.error("getAppJSON error",e),e}}async function getGameJSON(e){try{const t=(0,reactiveCache_1.tryToGetReactiveProject)(e);return await t.updateProject(),(0,game_1.default)(e)}catch(e){throw console.error("getGameJSON error",e),e}}function cleanCache(){cache_1.cacheManager.clean()}exports.partialAnalyse=tslib_1.__importStar(require("./core/analyse/partial")),exports.setFSAgent=setFSAgent,exports.setLocale=locales_1.default.setLocale,exports.getAppJSON=getAppJSON,exports.getGameJSON=getGameJSON,exports.cleanCache=cleanCache;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/ci.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compile=void 0;const tools_1=require("../utils/tools"),common_1=require("../core/compile/common"),project_1=require("./project"),recorder_1=require("./recorder"),summer_1=require("./summer");function getSummerOptions(e,r){const i=new Set;return i.add("javascript"),e&&(i.add(["es6module",{disableUseStrict:e.disableUseStrict}]),e.es7||e.es6?i.add(["enhance",{disableUseStrict:e.disableUseStrict}]):e.compileWorklet&&i.add("worklet"),(e.minifyWXSS||e.autoPrefixWXSS)&&i.add("wxss"),e.minifyWXML&&i.add("minifywxml"),e.minify&&(i.add("terser"),i.add("wxss"))),r&&r.forEach(e=>{if("string"==typeof e)i.add(e);else{if(!Array.isArray(e))throw new Error("invalid useSummerCompiler options: "+JSON.stringify(e));if("string"!=typeof e[0]||void 0===e[1])throw new Error("invalid useSummerCompiler options: "+JSON.stringify(e));i.add(e)}}),Array.from(i)}async function compile(e,r,i,o){var t;const s={appid:e.appid,attr:await e.attr(),compileType:e.type,miniprogramRoot:e.miniprogramRoot,pluginRoot:e.pluginRoot,summerPlugins:getSummerOptions(i.setting,o),babelSetting:null===(t=null==r?void 0:r.setting)||void 0===t?void 0:t.babelSetting},n=e.getFilesAndDirs();n.files=n.files.filter(common_1.isNotIgnoredByProjectConfig.bind(null,r,e.miniprogramRoot));const m=new project_1.Project((0,tools_1.normalizePath)(e.projectPath),n.files,n.dirs,s),l=new summer_1.SummerCompiler(m,"",s),a=new recorder_1.Recorder((e,r,o)=>{var t;null===(t=i.onProgressUpdate)||void 0===t||t.call(i,{id:e.toString(),message:o,status:r})});return await l.compile({},a)}exports.compile=compile;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/devtool.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SummerCompiler=exports.FullPkg=exports.MainPkg=void 0;const tslib_1=require("tslib"),child_process_1=require("child_process"),request_1=require("../utils/request"),path_1=tslib_1.__importDefault(require("path")),lodash_1=tslib_1.__importDefault(require("lodash")),recorder_1=require("./recorder"),tools_1=require("../utils/tools"),uglifyfilenames_1=require("../core/protect/uglifyfilenames"),error_1=require("./error"),miniprogram="miniprogram",plugin="plugin";function performanceMark(e,s){console.warn(`[summer-compiler] [${(0,recorder_1.getPrintTime)()}] [${Math.floor(performance.now())}ms elapsed] ${e}${s?" end":""}`)}exports.MainPkg="__APP__",exports.FullPkg="__FULL__";class SummerCompilerProcess{constructor(e,s){this.projectPath=e,this.cachePath=s,this.taskMap=new Map,this.taskId=0,this.initedPromise=new Promise((e,s)=>{this.initedResolve=e,this.initedReject=s})}async init(e,s,t){this.process=this.forkProcess();const r={type:"init",data:Object.assign({projectPath:this.projectPath,cachePath:this.cachePath,files:s,dirs:t},e)};performanceMark("process init"),this.sendProcessMessage(r),performanceMark("process init",!0),await this.initedPromise}destroy(){this.process.kill("SIGTERM")}sendProcessMessage(e){this.process.send(e)}forkProcess(){const e=path_1.default.posix.join(__dirname,"./entry_process.js"),s={stdio:["pipe","pipe","pipe","ipc"],cwd:this.projectPath,env:Object.assign(Object.assign({},process.env),{cpprocessEnv:"childprocess",summerProcess:"1"})};if(s.env.isDevtools=process.__nwjs&&"wechatwebdevtools"===nw.App.manifest.appname,s.env.isDevtools){let e=path_1.default.join(path_1.default.dirname(process.execPath),"node");"darwin"!==process.platform&&(e+=".exe"),s.execPath=e}performanceMark("fork process");const t=(0,child_process_1.fork)(e,["--expose-gc"],s);return t.stdout.setEncoding("utf8"),t.stdout.on("data",e=>{}),t.stderr.on("data",e=>{console.error("child process stderr: "+e)}),t.on("exit",e=>{console.error(`child process exit: code(${e})`),0!==e&&this.initedReject(new Error(`summer child process exit: code(${e})`))}),t.on("message",this.onChildProcessMessage.bind(this)),t.unref(),t}onChildProcessMessage(e){if("ready"===e.type)return performanceMark("process ready"),void this.initedResolve(!0);if("progress"===e.type){const s=this.taskMap.get(e.taskId);(null==s?void 0:s.progressUpdate)&&s.progressUpdate(e.id,e.status,e.message)}else if("response"===e.type){const{id:s,data:t,error:r}=e;if(r){const e=new error_1.SummerError(r);this.onResponse(s,void 0,e)}else this.onResponse(s,t,void 0)}}onResponse(e,s,t){const r=this.taskMap.get(e);this.taskMap.delete(e),r?t?r.reject(t):r.resolve(s):console.error(`child process task: ${e} not found`)}async sendEvent(e,s){await this.initedPromise,this.sendProcessMessage({type:"event",name:e,data:s})}async runTask(e,s,t){await this.initedPromise;return new Promise((r,i)=>{const o={name:e,data:s,resolve:r,reject:i,progressUpdate:t};this.taskId=this.taskId+1,this.taskMap.set(this.taskId,o),this.sendProcessMessage({type:"request",id:this.taskId,name:e,data:s})})}}class MessageHub{constructor(e){this.devtoolMessagehub=e,this.showing=new Set}showStatus(e,s){this.showing.add(e),this.devtoolMessagehub.showStatus(e,s)}hideStatus(e){this.showing.delete(e),this.devtoolMessagehub.hideStatus(e)}clear(){for(const e of this.showing.values())this.hideStatus(e);this.showing.clear()}}class SummerCompiler{constructor(e,s,t,r){this.projectPath=e,this.cachePath=s,this.options=t,this.devtoolMessagehub=r,this.isSummer=!0,this.codeCache=new Map,this.promiseCache=new Map,this.status=void 0,this.onProgressUpdate=(e,s,t)=>{"doing"===s?this.messageHub.showStatus(e,t):this.messageHub.hideStatus(e)},this.projectPath=(0,tools_1.normalizePath)(this.projectPath),performanceMark("create summer compiler"),this.messageHub=new MessageHub(r),this.process=new SummerCompilerProcess(this.projectPath,this.cachePath)}async init(e,s,t){performanceMark("init summer compiler"),await this.process.init(this.options,e,s),await this.loadStatus(),performanceMark("init summer compiler",!0)}async loadStatus(){var e;this.status=await(null===(e=this.process)||void 0===e?void 0:e.runTask("loadStatus"))}destroy(){this.process.destroy(),this.messageHub.clear()}async clearCache(){var e;await(null===(e=this.process)||void 0===e?void 0:e.runTask("clearCache")),this.codeCache.clear(),this.promiseCache.clear()}updateOptions(e){var s;lodash_1.default.isEqual(e,this.options)||(this.options=e,this.promiseCache.clear(),this.codeCache.clear(),null===(s=this.process)||void 0===s||s.sendEvent("updateOptions",e),this.loadStatus())}fileChange(e,s){if("change"!==e||s.endsWith(".json"))for(const e of this.promiseCache.keys())e.startsWith("getConf-")&&this.promiseCache.delete(e);this.invalidCodeCache(),this.process.sendEvent("fileChange",{type:e,targetPath:s})}invalidCodeCache(){for(const e of this.codeCache.values())e.isValid=!1}async getConf(e){const s="getConf-"+e;if(this.promiseCache.has(s))return console.log(s,"hit cache"),this.promiseCache.get(s);{console.log(s,"do request"),performanceMark("request get conf");const t={graphId:e},r=this.process.runTask("getConf",t,this.onProgressUpdate);return this.promiseCache.set(s,r),performanceMark("request get conf",!0),r}}async getCode(e,s){const t=`getCode-${e}${s?"-"+s.package:""}`;if(this.promiseCache.has(t))return console.log(t,"hit promise cache"),this.promiseCache.get(t);{const r=this.codeCache.get(t);if(null==r?void 0:r.isValid)return r.codeFiles;console.log(t,"do request");const i={};if(r){const e=r.codeFiles;for(const s of Object.keys(e)){const t=e[s];"error"in t||(i[s]=t.md5)}}const o={graphId:e,cacheMd5:i,package:null==s?void 0:s.package};performanceMark("request get code");const a=Date.now();console.time("[summer-compiler] runTask "+t),console.log(`[summer-compiler] [${(0,recorder_1.getPrintTime)()}] runTask ${t}`);const n=this.process.runTask("getCode",o,this.onProgressUpdate).then(e=>{var s;console.timeEnd("[summer-compiler] runTask "+t);const r=(null===(s=this.codeCache.get(t))||void 0===s?void 0:s.codeFiles)||{};for(const s of Object.keys(e)){const t=e[s];"error"in t||""!==t.md5?r[s]=t:delete r[s]}return this.codeCache.set(t,{isValid:!0,codeFiles:r}),r},e=>{throw e.code?console.error(e):console.error("Unexpected error when getCode",e),this.messageHub.clear(),e});return n.finally(()=>{performanceMark("request get code",!0),console.log(`[summer-compiler] [${(0,recorder_1.getPrintTime)()}] [cost ${Date.now()-a}ms] runTask ${t}`),this.promiseCache.delete(t)}),this.promiseCache.set(t,n),n}}async ready(){return this.process.initedPromise}async getAppJSON(e,s){return(await this.getConf(miniprogram)).app}async getPageJSON(e,s){const t=await this.getConf(miniprogram),r=t.pages[s]||t.comps[s];if(!r)throw new Error("summer-compiler 收集json配置有遗漏, "+s);return r}async getAllPageAndComponentJSON(){const e=await this.getConf(miniprogram);return Object.keys(e.pages).concat(Object.keys(e.comps))}async getAllSortedJSFiles(){const e=await this.getConf(miniprogram),s=Object.keys(e.pages),t=Object.keys(e.comps),r=s.filter(e=>!t.includes(e)).map(e=>e+".js"),i=t.map(e=>e+".js"),o=await this.getCode(miniprogram,{package:exports.FullPkg}),a=Object.keys(o).filter(e=>e.endsWith(".js")&&"app.js"!==e&&!r.includes(e)&&!i.includes(e));return{jsPagesFiles:r,components:i,otherJsFiles:a}}async getWxmlAndWxsFiles(e){let s=await this.getCode(miniprogram,{package:e});if(e!==exports.MainPkg){const e=await this.getCode(miniprogram,{package:exports.MainPkg});s=Object.assign(Object.assign({},s),e)}const t=Object.keys(s).filter(e=>e.endsWith(".wxml")),r=Object.keys(s).filter(e=>e.endsWith(".wxs"));return{wxmlFiles:t,wxsFiles:r,content:t.concat(r).reduce((e,t)=>{const r=s[t];if("error"in r)throw r.error;return e[t]=r.code,e["./"+t]=r.code,e},{})}}async getWxssFiles(e){let s=await this.getCode(miniprogram,{package:e});if(e!==exports.MainPkg){const e=await this.getCode(miniprogram,{package:exports.MainPkg});s=Object.assign(Object.assign({},s),e)}const t=Object.keys(s).filter(e=>e.endsWith(".wxss"));return{wxssFiles:t,content:t.reduce((e,t)=>{const r=s[t];if("error"in r)throw r.error;return e[t]=r.code,e["./"+t]=r.code,e},{})}}getWxssMap(e,s){s=(0,tools_1.normalizePath)(s);for(const[t,r]of this.codeCache.entries())if(t.startsWith("getCode-"+e)){const e=r.codeFiles[s];if(e&&!("error"in e))return e.map}}async getMainPkgSortedJSFiles(){const e=await this.getConf(miniprogram),s=await this.getCode(miniprogram,{package:"__APP__"}),t=Object.keys(s).filter(e=>e.endsWith(".js")),r=[],i=[],o=[],a=[],n=[];let c=!1;const p={},h=s=>Object.keys(e.packages).find(e=>s.startsWith(e))||exports.MainPkg;e.app.functionalPages&&t.forEach(e=>{if(e.startsWith("functional-pages/")){const s=e.replace(/\.js$/,"");if(p[s])return;p[s]=!0,n.push(encodeURI(s))}}),e.app.workers&&t.forEach(s=>{if(s.startsWith((0,tools_1.getWorkersPath)(e.app.workers))){const e=s.replace(/\.js$/,"");if(p[e])return;p[e]=!0,a.push(e)}});Object.keys(e.comps).filter(e=>h(e)===exports.MainPkg).forEach(s=>{if((s.startsWith("miniprogram_npm/weui-miniprogram")||s.startsWith("weui-miniprogram"))&&e.app.useExtendedLib&&e.app.useExtendedLib.weui)return;if(p[s])return;p[s]=!0;const t=encodeURI(s);o.push(""+t)});Object.keys(e.pages).filter(e=>h(e)===exports.MainPkg).forEach(e=>{if(p[e])return;p[e]=!0;const s=encodeURI(e);r.push(""+s)}),t.forEach(e=>{const s=e.replace(/\.js$/,"");p[s]||(p[s]=!0,"app.js"!==e?i.push(""+encodeURI(s)):c=!0)});const l=[...i,...o,...r];return c&&l.push("app"),{hasAppJS:c,allFiles:l,pageFiles:r,componentFiles:o,workerFiles:a,functionalPageFiles:n,otherFiles:i}}async getSubPkgSortedJSFiles(e){const s=await this.getConf(miniprogram),t=await this.getCode(miniprogram,{package:e}),r=Object.keys(t).filter(e=>e.endsWith(".js")),i=[],o=[],a={},n=e=>Object.keys(s.packages).find(s=>e.startsWith(s))||exports.MainPkg;Object.keys(s.comps).filter(s=>n(s)===e).forEach(e=>{if((e.startsWith("miniprogram_npm/weui-miniprogram")||e.startsWith("weui-miniprogram"))&&s.app.useExtendedLib&&s.app.useExtendedLib.weui)return;if(a[e])return;a[e]=!0;const t=encodeURI(e);o.push(""+t)});Object.keys(s.pages).filter(s=>n(s)===e).forEach(e=>{if(a[e])return;a[e]=!0;const s=encodeURI(e);i.push(""+s)});const c=r.map(e=>""+encodeURI(e.replace(/\.js$/,"")));return{allFiles:c,pageFiles:i,componentFiles:o,otherFiles:c.filter(e=>!i.includes(e)&&!o.includes(e))}}async compileJS(e,s){let t;if(s.root===e.miniprogramRoot){const e=await this.getConf(miniprogram),r=Object.keys(e.packages).find(e=>s.filePath.startsWith(e))||exports.MainPkg;t=(await this.getCode(miniprogram,{package:r,partialCompilePath:[]}))[s.filePath]}else{t=(await this.getCode(plugin))[s.filePath]}if(!t){const e=new Error(`summer-compiler miss ${s.root} js file, ${s.filePath}`);throw e.code="ENOENT",e}if("error"in t)throw t.error;return Object.assign({filePath:s.filePath,code:t.code,map:t.map},t.jsTag)}async compile(e,s){const t=await this.process.runTask("compile",{},(e,t,r)=>{s.onProgressUpdate({id:e,status:t,message:r})});for(const e of Object.keys(t))"object"==typeof t[e]&&"Buffer"===t[e].type&&(t[e]=Buffer.from(t[e].data));return t}async getPluginJSON(e,s=""){return(await this.getConf(plugin)).plugin}async getPluginPageJSON(e,s){const t=await this.getConf(plugin),r=t.pages[s]||t.comps[s];if(!r)throw new Error("summer-compiler 收集plugin json配置有遗漏, "+s);return r}async getPluginJSFiles(){const e=await this.getCode(plugin);return Object.keys(e).filter(e=>e.endsWith(".js"))}async getPluginComponents(){const e=await this.getConf(plugin),s=new Set(Object.keys(e.pages).concat(Object.keys(e.comps)));return Array.from(s)}async getPluginWxssFiles(){const e=await this.getCode(plugin),s=Object.keys(e).filter(e=>e.endsWith(".wxss"));return{wxssFiles:s,content:s.reduce((s,t)=>{const r=e[t];if("error"in r)throw r.error;return s[t]=r.code,s["./"+t]=r.code,s},{})}}async getPluginWxmlAndWxsFiles(){const e=await this.getCode(plugin),s=Object.keys(e).filter(e=>e.endsWith(".wxml")),t=Object.keys(e).filter(e=>e.endsWith(".wxs"));return{wxmlFiles:s,wxsFiles:t,content:s.concat(t).reduce((s,t)=>{const r=e[t];if("error"in r)throw r.error;return s[t]=r.code,s["./"+t]=r.code,s},{})}}async checkThemeJSON(e,s){return(await this.getConf(miniprogram)).theme}setProxy(e){(0,request_1.setCiProxy)(e)}setLocale(e){this.process.runTask("setLocale",e)}async uglifyFileNames(e,s,t){return await(0,uglifyfilenames_1.uglifyFileNames)(e,s,t)}async getLocalFileList(){return this.process.runTask("getLocalFileList",miniprogram)}async getPluginLocalFileList(){return this.process.runTask("getLocalFileList",plugin)}async packNpm(e){throw new Error("packNpm not implemented")}async packNpmManually(e){throw new Error("packNpmManually not implemented")}async getGameJSON(e){throw new Error("getGameJSON not implemented")}}exports.SummerCompiler=SummerCompiler;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var _a;process.env&&process.env.isDevtools&&require("../utils/hackrequire/index"),Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib");(null===(_a=process.env)||void 0===_a?void 0:_a.isDevtools)&&require("../utils/hackrequire/index");const project_1=require("./project"),summer_1=require("./summer"),core_1=require("../core"),recorder_1=require("./recorder");let summerCompiler,project;process.on("message",async e=>{if("object"==typeof e)if("init"===e.type){if(summerCompiler)return void console.error("summer compiler has been inited");{const r=e.data,{projectPath:s,cachePath:o,files:t,dirs:i}=r,c=tslib_1.__rest(r,["projectPath","cachePath","files","dirs"]);project=new project_1.Project(s,t,i,c),summerCompiler=new summer_1.SummerCompiler(project,o,c),process.send({type:"ready"})}}else{if(summerCompiler||console.error("summer compiler not inited yet"),"event"===e.type)if("fileChange"===e.name){const{type:r,targetPath:s}=e.data;project.onFileChange(r,s)}else if("updateOptions"===e.name){const r=e.data;project.updateOptions(r),summerCompiler.updateOptions(r)}if("request"===e.type){const{id:r,name:s,data:o}=e,t=r,i=new recorder_1.Recorder((e,r,s)=>{process.send({type:"progress",id:e,taskId:t,status:r,message:s})});try{let e;if("getCode"===s){const{graphId:r,cacheMd5:s,package:t}=o,c=`getCode-${r}${t?"-"+t:""}`,a=await i.run("!"+c,()=>summerCompiler.getCode(o,i));for(const e of Object.keys(s)){const r=a[e];r?"error"in r||r.md5!==s[e]||delete a[e]:a[e]={path:e,md5:"",code:""}}e=a}else if("getConf"===s)e=await summerCompiler.getConf(o,i);else if("getLocalFileList"===s)e=await summerCompiler.getLocalFileList(o);else if("compile"===s)e=await summerCompiler.compile(o,i);else if("compileSingleCode"===s)e=await summerCompiler.compileSingleCode(o,i);else if("setLocale"===s)(0,core_1.setLocale)(o);else if("clearCache"===s)summerCompiler.clearCache();else{if("loadStatus"!==s)throw new Error("unknown command "+s);e=summerCompiler.getStatus()}process.send({type:"response",id:r,data:e})}catch(e){process.send({type:"response",id:r,data:null,error:{code:e.code||-1,message:e.message,stack:e.stack,path:e.path||""}})}}}else console.error("child process unrecognized message "+e)}),process.on("disconnect",()=>{try{process.exit(0)}catch(e){process.kill(process.pid,"SIGTERM")}}),process.on("uncaughtException",e=>{console.log(e)});
|
package/dist/summer/error.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.makeSummerError=exports.SummerErrors=exports.SummerError=void 0;const config_1=require("../config");class SummerError extends Error{constructor(r){super(r.message),this.stack=r.stack,r.code&&(this.code=r.code),r.path&&(this.path=r.path),r.plugin&&(this.plugin=r.plugin),r.hook&&(this.hook=r.hook)}toString(){return`${super.toString()}${this.path?"\nFile: "+this.path:""}`}toJSON(){return{type:"SummerError",message:this.message,stack:this.stack,code:this.code,path:this.path,plugin:this.plugin,hook:this.hook}}}function makeSummerError(r,e,o){if(r instanceof SummerError)return e&&!r.code&&(r.code=e),o&&!r.path&&(r.path=o),r;return new SummerError({code:e||exports.SummerErrors.SUMMER_PLUGIN_ERR,message:r instanceof Error?r.toString():"string"==typeof r?r:"Unknown Error Message "+r,path:o,stack:r instanceof Error?null==r?void 0:r.stack:void 0})}exports.SummerError=SummerError,exports.SummerErrors={SUMMER_PLUGIN_ERR:config_1.SUMMER_PLUGIN_ERR,SUMMER_PLUGIN_CODE_ERR:config_1.SUMMER_PLUGIN_CODE_ERR},exports.makeSummerError=makeSummerError;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1,3 +0,0 @@
|
|
|
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=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 a=null;return a=o.startsWith("/")?o.replace(/^\//,""):path_1.default.posix.join(e,o),a}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 a=o.subPackages||[];for(const t of a){const o=t.root;this.packages.set(o,t);for(const a of t.pages)e.add(path_1.default.posix.join(o,a))}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")}if(o.appBar){const t=resolvePath("app.json","app-bar/index");this.proxyProject.stat(this.graph.root,t+".json")&&await this.loadComp(t,"app-bar/index","app.json")}}),o.themeLocation&&await t.run(locales_1.default.config.SUMMER_COMPILE.format(o.themeLocation),()=>this.loadTheme(o.themeLocation)),o.accountCardPackage&&await t.run(locales_1.default.config.SUMMER_COMPILE.format(o.themeLocation),async()=>{for(const t of o.accountCardPackage.cardList){const e=path_1.default.posix.join(o.accountCardPackage.root,t.componentPath);await this.loadComp(e,e,"app.json")}})}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 a=await(0,core_1.getPageJSON)(this.proxyProject,{miniprogramRoot:this.graph.root,pagePath:t});this.comps.set(t,a);const s=async o=>{if(isPluginPath(o))return;const e=resolvePath(t,o);await this.loadComp(e,o,t)};if(a.usingComponents)for(const t of Object.values(a.usingComponents))await s(t);if(a.componentGenerics)for(const t of Object.values(a.componentGenerics)){const o=t.default;o&&await s(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
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.AppGraph=void 0;const tools_1=require("../../utils/tools"),mpjson_1=require("../../core/compile/handler/mpjson"),devtool_1=require("../devtool"),recorder_1=require("../recorder"),appconf_1=require("./appconf"),basegraph_1=require("./basegraph");class AppGraph extends basegraph_1.BaseGraph{constructor(e){super(e),this.appConf=new appconf_1.AppConf(this.compiler,this)}destroy(){this.appConf.destroy(),super.destroy()}async getConf(e){return await this.appConf.build(e),this.conf={app:this.appConf.app,packages:Object.fromEntries(this.appConf.packages.entries()),pages:Object.fromEntries(this.appConf.pages.entries()),comps:Object.fromEntries(this.appConf.comps.entries()),sitemap:this.appConf.sitemap,theme:this.appConf.theme},this.conf}async ensureConf(e){this.conf||await this.getConf(e)}async compileSingleCode(e,t){await this.ensureConf(recorder_1.silentRecorder);const s=this.resolver.resolveInfoMap.get(e);if(s)return super.doCompileSingleCode(Object.assign(Object.assign({},s),{independentRoot:this.getIndependentRoot(s.path),isBabelIgnore:this.isBabelSettingIgnore(s)}),t);throw new Error("file not found")}async getDevCode(e,t){await this.ensureConf(e);let s=this.getPackageFile(t.package);return s=s.filter(e=>!e.path.endsWith("json")),this.getCodeFiles(s,e)}async getProdCode(e,t){await this.ensureConf(e);let s=this.getPackageFile(t.package);return s=s.filter(e=>!e.path.endsWith("json")),this.getCodeFiles(s,e,!1)}getLocalCodeFileList(){return Array.from(this.resolver.resolveInfoMap.entries()).map(([e,t])=>t.source)}onFileChangeForGraph(e,t){this.appConf.onFileChange(e,t)}getPackageFile(e){const t=[];for(const[s,o]of this.resolver.resolveInfoMap.entries())e!==devtool_1.FullPkg&&this.checkFilePackage(s)!==e||t.push(o);return t.map(e=>Object.assign(Object.assign({},e),{independentRoot:this.getIndependentRoot(e.path),isBabelIgnore:this.isBabelSettingIgnore(e)}))}getIndependentRoot(e){for(const t of Object.values(this.conf.packages))if(!0===t.independent){const s=t.root.replace(/^\//,"");if(e.startsWith(s))return s}if("object"==typeof this.conf.app.functionalPages&&!0===this.conf.app.functionalPages.independent&&e.startsWith("functional-pages/"))return"functional-pages";if("string"==typeof this.conf.app.openDataContext&&e.startsWith(this.conf.app.openDataContext))return this.conf.app.openDataContext;const t=this.conf.app.workers&&(0,tools_1.getWorkersPath)(this.conf.app.workers);return t&&e.startsWith(t)?t:""}checkFilePackage(e){for(const t of Object.keys(this.conf.packages))if(e.startsWith(t))return t;return devtool_1.MainPkg}async compileJSON(){const e=await this.getConf(recorder_1.silentRecorder),t={};t["app.json"]=JSON.stringify(e.app);const s={};for(const t in e.pages)s[t+".json"]=JSON.stringify(e.pages[t]);const o={};for(const t in e.comps)o[t+".json"]=JSON.stringify(e.comps[t]);return(0,mpjson_1.addSkylineRendererToComponents)(s,o),{conf:e,jsons:Object.assign(Object.assign(Object.assign({},t),s),o)}}}exports.AppGraph=AppGraph;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1,3 +0,0 @@
|
|
|
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=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
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1,3 +0,0 @@
|
|
|
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=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
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PluginGraph=void 0;const recorder_1=require("../recorder"),basegraph_1=require("./basegraph"),pluginconf_1=require("./pluginconf");class PluginGraph extends basegraph_1.BaseGraph{constructor(e){super(e),this.pluginConf=new pluginconf_1.PluginConf(this.compiler,this)}destroy(){this.pluginConf.destroy(),super.destroy()}async getConf(e){if("plugin"!==this.type)throw new Error("Couldn't call getAppConf without plugin type");return await this.pluginConf.build(e),this.conf={plugin:this.pluginConf.plugin,pages:Object.fromEntries(this.pluginConf.pages.entries()),comps:Object.fromEntries(this.pluginConf.comps.entries())},this.conf}async ensureConf(e){this.conf||await this.getConf(e)}async compileSingleCode(e,t){await this.ensureConf(recorder_1.silentRecorder);const n=this.resolver.resolveInfoMap.get(e);if(n)return super.doCompileSingleCode(Object.assign(Object.assign({},n),{independentRoot:this.getIndependentRoot(n.path),isBabelIgnore:this.isBabelSettingIgnore(n)}),t);throw new Error("file not found")}async getDevCode(e){await this.ensureConf(e);let t=this.getPackageFile();return t=t.filter(e=>!e.path.endsWith("json")),this.getCodeFiles(t,e)}async getProdCode(e){await this.ensureConf(e);let t=this.getPackageFile();return t=t.filter(e=>!e.path.endsWith("json")),this.getCodeFiles(t,e,!1)}getLocalCodeFileList(){return Array.from(this.resolver.resolveInfoMap.entries()).map(([e,t])=>t.source)}onFileChangeForGraph(e,t){}getPackageFile(){const e=[];for(const[t,n]of this.resolver.resolveInfoMap.entries())e.push(n);return e.map(e=>Object.assign(Object.assign({},e),{independentRoot:this.getIndependentRoot(e.path),isBabelIgnore:this.isBabelSettingIgnore(e)}))}getIndependentRoot(e){const t=this.conf.plugin;return"string"==typeof t.workers&&e.startsWith(t.workers)?t.workers:""}async compileJSON(){const e=await this.getConf(recorder_1.silentRecorder),t={};t["plugin.json"]=JSON.stringify(e.plugin);for(const n in e.pages)t[n+".json"]=JSON.stringify(e.pages[n]);for(const n in e.comps)t[n+".json"]=JSON.stringify(e.comps[n]);return{conf:e,jsons:t}}}exports.PluginGraph=PluginGraph;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/index.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SummerCompiler=void 0;var devtool_1=require("./devtool");Object.defineProperty(exports,"SummerCompiler",{enumerable:!0,get:function(){return devtool_1.SummerCompiler}});
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
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
|
-
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/module.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const types_1=require("./types"),tools_1=require("../utils/tools"),error_1=require("./error");class JsTag{constructor(){this.isLargeFile=!1,this.isBabelIgnore=!1,this.helpers=[]}setBabelIgnore(){this.isBabelIgnore=!0}setLargeFile(){this.isLargeFile=!0}addHelpers(e){for(const s of e)this.helpers.includes(s)||this.helpers.push(s)}toJSON(){return{isLargeFile:this.isLargeFile,isBabelIgnore:this.isBabelIgnore,helpers:this.helpers}}}class Module{constructor(e,s,t,r){this.graph=e,this.path=s,this.sourcePath=t,this.fileType=r,this.md5="",this.depFiles=[],this.independentRoot="",this.loadStart=Date.now(),r===types_1.FileType.JS&&(this.jsTag=new JsTag)}setError(e){this.error=e,this.loadEnd=Date.now()}setSource(e){var s,t;this.source=e,e.target&&(this.target=e.target,null===(s=this.jsTag)||void 0===s||s.addHelpers(e.target.helpers||[]),e.target=void 0),e.largeFile&&(null===(t=this.jsTag)||void 0===t||t.setLargeFile()),this.fileType===types_1.FileType.JSON&&(this.json=JSON.parse(this.source.sourceCode)),this.md5=(0,tools_1.generateMD5)(this.source.sourceCode),this.loadEnd=Date.now()}toCodeFile(){var e;return this.error?this.error instanceof error_1.SummerError?{path:this.path,error:this.error.toJSON()}:{path:this.path,error:this.error}:Object.assign({path:this.path,md5:this.md5,jsTag:null===(e=this.jsTag)||void 0===e?void 0:e.toJSON()},this.target)}toJSON(){return{code:"",map:void 0,path:this.path,sourcePath:this.sourcePath,depFileIds:this.depFiles}}addWatchFile(e){-1===this.depFiles.indexOf(e)&&this.depFiles.push(e)}}exports.default=Module;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
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
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PluginDriver=exports.getPluginContext=exports.genResovleExtConf=void 0;const error_1=require("./error"),worker_thread_1=require("../core/worker_thread");function genResovleExtConf(r){const e={json:["json"],wxml:["wxml"],wxss:["wxss"],js:["js"],wxs:["wxs"]};for(const o of r)if(o.resolveExt)for(const r of["json","wxml","wxss","js","wxs"]){const t=o.resolveExt[r];if("string"==typeof t)e[r].includes(t)||e[r].push(t);else if(Array.isArray(t))for(const o of t)e[r].includes(o)||e[r].push(o)}return e}function throwPluginError(r,e,{hook:o,id:t}={}){const n=(0,error_1.makeSummerError)(r);throw n.code||(n.code=error_1.SummerErrors.SUMMER_PLUGIN_ERR),n.plugin=e,o&&(n.hook=o),t&&!n.path&&(n.path=t),r.stack&&(n.stack=r.stack),n}function getPluginContext(r,e){return{addWatchFile(){throw new Error("addWatchFile should be implemented by replaceContext")},async runWorkerMethod(o,...t){const n={command:"runMethod",plugin:r.name,projectPath:e.project.projectPath,pluginOption:{},method:o,args:t},s=await(0,worker_thread_1.runTask)(worker_thread_1.TASK_NAME.SUMMER_HOOK,n);if(s.error){if("SummerError"===s.error.type)throw new error_1.SummerError(s.error);throw s.error}return s.result},error:e=>throwPluginError(e,r.name)}}exports.genResovleExtConf=genResovleExtConf,exports.getPluginContext=getPluginContext;class PluginDriver{constructor(r,e){this.graph=r,this.options=e,this.pluginContexts=new Map,this.plugins=e.plugins,this.resolveExtConf=genResovleExtConf(e.plugins);for(const e of this.plugins)this.pluginContexts.set(e,getPluginContext(e,r))}runHook(r,e,o,t){const n=o[r];if(!n)return;let s=this.pluginContexts.get(o);return t&&(s=t(s,o)),Promise.resolve().then(()=>n.apply(s,e)).catch(e=>throwPluginError(e,o.name,{hook:r}))}hookFirst(r,e,o){let t=Promise.resolve(void 0);for(const n of this.plugins)t=t.then(t=>null!=t?t:this.runHook(r,e,n,o));return t}hookParallel(r,e,o){const t=[];for(const n of this.plugins){const s=this.runHook(r,e,n,o);s&&t.push(s)}return Promise.all(t).then(()=>{})}hookReduceArg0(r,[e,...o],t,n){let s=Promise.resolve(e);for(const e of this.plugins)s=s.then(s=>{const i=[s,...o],l=this.runHook(r,i,e,n);return l?l.then(r=>t.call(this.pluginContexts.get(e),s,r,e)):s});return s}}exports.PluginDriver=PluginDriver;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.transformES6ModuleAndGenCode=exports.getBabelRoot=void 0;const types_1=require("../../types"),config_1=require("../../../config"),babel_helper_1=require("../../../utils/babel_helper"),tools_1=require("../../../utils/tools"),pluginTransformModulesCommonjs=()=>require("@babel/plugin-transform-modules-commonjs"),babel7=()=>require("@babel/core");function getES6ModulePluginsList(e){return[[require("@babel/plugin-transform-modules-commonjs"),{allowTopLevelThis:e,importInterop:e=>e.startsWith("@babel/runtime/helpers/")?"node":"babel"}]]}function getBabelRoot(e){return""===e?"@babel/runtime":(0,tools_1.normalizePath)(e+"/@babel/runtime")}function transformES6ModuleAndGenCode(e,o,r,t){let s;t=t||/^\s*\/\/\s?use strict disable;/i.test(e.sourceCode||"");try{const r={babelrc:!1,plugins:getES6ModulePluginsList(t),filename:o,sourceFileName:o,sourceMaps:!0,inputSourceMap:e.inputMap,configFile:!1,code:!0,cloneInputAst:!0},n=require("@babel/core");if(e.astInfo){if(e.astInfo.type!==types_1.AstType.Babel)throw new Error("ast type is not babel");s=n.transformFromAstSync(e.astInfo.ast,e.sourceCode,r)}else{if(null===e.sourceCode)throw new Error("source.sourceCode is null");s=n.transform(e.sourceCode,r)}}catch(e){throw e.code=config_1.BABEL_TRANS_JS_ERR,e.message=`file: ${o}\n ${e.message}`,e.path=o,e}if(!s)throw new Error("no trans result for callPostEnhance");let n=s.code;const l=s.map;t&&(n=n.replace(/^"use strict";/,""));const a=(0,babel_helper_1.collectBabelHelpers)(e.sourceCode),u=(0,babel_helper_1.replaceBabelHelpers)(n,a,o,r);return{code:u.transformCode,map:l,helpers:u.helpers}}function default_1(e,o){return{name:"summer-es6module",workerMethods:{transformES6ModuleAndGenCode:transformES6ModuleAndGenCode},async generate(e,r,t,{independentRoot:s,isBabelIgnore:n}){if(r.endsWith(".js")&&!e.largeFile&&!n){const r=getBabelRoot(s);return this.runWorkerMethod("transformES6ModuleAndGenCode",e,t,r,o.disableUseStrict)}}}}exports.getBabelRoot=getBabelRoot,exports.transformES6ModuleAndGenCode=transformES6ModuleAndGenCode,exports.default=default_1;
|
|
@@ -1 +0,0 @@
|
|
|
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=2048e3;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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const typescript=()=>require("./typescript"),sass=()=>require("./sass"),less=()=>require("./less"),enhance=()=>require("./enhance"),terser=()=>require("./terser"),javascript=()=>require("./base/javascript"),wxss=()=>require("./base/wxss"),es6module=()=>require("./base/es6module"),minifywxml=()=>require("./minifywxml"),worklet=()=>require("./worklet"),plugins={typescript:typescript,less:less,sass:sass,enhance:enhance,javascript:javascript,terser:terser,wxss:wxss,es6module:es6module,minifywxml:minifywxml,worklet:worklet};exports.default={load:e=>e in plugins?plugins[e]().default:null};
|
|
@@ -1 +0,0 @@
|
|
|
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"),common_1=require("../../utils/common"),tools_1=require("../../utils/tools"),less=()=>require("less");function default_1(e,s){return{name:"summer-less",resolveExt:{wxss:"less"},async load(t,r){var o;if(r.endsWith(".less")){let t=await fs_extra_1.default.readFile(r,"utf-8");if(this.rootPath){const e=(0,tools_1.normalizePath)(await(0,common_1.getMiniprogramRoot)(this.rootPath)),s=path_1.default.posix.join(e,"app.less");if(r!==s&&fs_extra_1.default.existsSync(s)){const s=(0,tools_1.pathRelative)(e,path_1.default.dirname(r))||".";t=`@import (optional, reference) '${"."===s?".":(0,tools_1.pathRelative)(s,"./")}/app.less';\n${t}`}}const a=[];t=t.replace(exports.importWxssReg,(e,s,t)=>(a.push(t),e.replace(t,t+"?css")));try{const i=await require("less").render(t,{sourceMap:{outputSourceFiles:!0},paths:this.rootPath?[this.rootPath]:[],filename:r,globalVars:null!==(o=null==s?void 0:s.globalVars)&&void 0!==o?o:{}}),l=i.css.replace(exports.importWxssCssReg,(e,s,t)=>{const r=t.slice(0,-4);return a.includes(r)?e.replace(t,r):e});if(i.imports.length)for(const e of i.imports)this.addWatchFile(e);let p=void 0;return i.map&&(p=JSON.parse(i.map),p.sources=p.sources.map(s=>path_1.default.posix.relative(e,s))),{sourceCode:l,inputMap:p}}catch(e){throw(0,error_1.makeSummerError)(e,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 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
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")),common_1=require("../../utils/common"),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(t,e){if(e.endsWith(".scss")||e.endsWith(".sass")){let t=await fs_extra_1.default.readFile(e,"utf-8");if(this.rootPath){const s=(0,tools_1.normalizePath)(await(0,common_1.getMiniprogramRoot)(this.rootPath)),o=path_1.default.posix.join(s,"global");if(e!==o+".scss"&&e!==o+".sass"){let o=path_1.default.extname(e);const r=(0,tools_1.pathRelative)(s,path_1.default.dirname(e))||".";fs_extra_1.default.existsSync(path_1.default.posix.join(s,"global"+o))||(o=".sass"===o?".scss":".sass"),fs_extra_1.default.existsSync(path_1.default.posix.join(s,"global"+o))&&(t=".sass"===o?`@use '${"."===r?".":(0,tools_1.pathRelative)(r,"./")}/global${o}'\n${t}`:`@use '${"."===r?".":(0,tools_1.pathRelative)(r,"./")}/global${o}';\n${t}`)}}const o=[];t=t.replace(importWxssReg,(s,t,e)=>(o.push(e),s.replace(e,e.slice(0,-4)+"css")));const r=path_1.default.posix.dirname((0,tools_1.pathRelative)(s,e));return new Promise((s,a)=>{require("sass").render({file:e,data:t,sourceMap:!0,sourceMapContents:!0,omitSourceMapUrl:!0,outFile:e.slice(0,-5)+".wxss",includePaths:this.rootPath?[this.rootPath]:[]},(t,i)=>{if(t){const s=(0,error_1.makeSummerError)(t,error_1.SummerErrors.SUMMER_PLUGIN_CODE_ERR);return void a(s)}if(!i)return void a(new Error("no result"));const l=i.css.toString("utf-8").replace(importCssReg,(s,t,e)=>{const r=e.slice(0,-3)+"wxss";return o.includes(r)?s.replace(e,r):s});if(i.stats.includedFiles.length>0)for(const s of i.stats.includedFiles)s!==e&&this.addWatchFile(s);const n=i.map?JSON.parse(i.map.toString("utf-8")):void 0;n&&(n.sourceRoot=r),s({sourceCode:l,inputMap:n})})})}}}}exports.default=default_1;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const config_1=require("../../config"),javascript_1=require("./base/javascript"),error_1=require("../error"),terser=()=>require("terser"),babelCodeFrame=()=>require("babel-code-frame");function default_1(){return{name:"summer-terser",workerMethods:{doCompress:async(e,r)=>require("terser").minify(e,{toplevel:!0,compress:{drop_console:!1,drop_debugger:!1},sourceMap:r})},async compress(e){const r=Object.keys(e).filter(e=>e.endsWith(".js")),o={};return await Promise.all(r.map(async r=>{if(e[r].length>=javascript_1.MAX_CODE_LENGTH)return o[r]=e[r],void(e[r+".map"]&&(o[r+".map"]=e[r+".map"]));const s=e[r+".map"]?{includeSources:!0,content:JSON.parse(e[r+".map"]),filename:r}:{includeSources:!0,content:void 0,filename:r},a=await this.runWorkerMethod("doCompress",e[r],s);if(a.error){const o=a.error,s=`file: ${r}\n ${a.error.message}\n ${require("babel-code-frame")(e[r],o.line,o.col>0?o.col:1)}`;throw(0,error_1.makeSummerError)(s,config_1.UGLIFY_JS_ERR,r)}o[r]=a.code,a.map&&(o[r+".map"]=a.map)})),Object.assign(Object.assign({},e),o)}}}exports.default=default_1;
|
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const config_1=require("../../config"),types_1=require("../types"),_pluginTransformWorklet=()=>require("../../utils/babel_plugin_worklet"),babel7=()=>require("@babel/core"),worklet=(e,r)=>{const t=babel7();let o;try{const s={babelrc:!1,plugins:[require("../../utils/babel_plugin_worklet")],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,s)}else{if(null===e.sourceCode)throw new Error("source.targetCode is null");o=babel7().transform(e.sourceCode,s)}}catch(e){const t=`file: ${r}\n ${e.message}`,o=new Error(t);throw o.code=config_1.BABEL_TRANS_JS_ERR,o}return{sourceCode:e.sourceCode,inputMap:e.inputMap,astInfo:{ast:o.ast,type:types_1.AstType.Babel}}};function default_1(e,r){return{name:"summer-worklet",workerMethods:{worklet:worklet},async transform(e,r,t,{isBabelIgnore:o}){if(r.endsWith(".js")&&!o){return e.sourceCode.includes('"worklet"')||e.sourceCode.includes("'worklet'")?await this.runWorkerMethod("worklet",e,t):e}return e}}}exports.default=default_1;
|
package/dist/summer/project.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
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
|
-
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/recorder.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";function pad(e,t=2){return e>10**t?String(e):`${new Array(t).join("0")}${e}`.slice(-t)}function getPrintTime(){const e=new Date;return`${String(e.getFullYear())}-${pad(e.getMonth()+1)}-${pad(e.getDate())} ${pad(e.getHours())}:${pad(e.getMinutes())}:${pad(e.getSeconds())}.${pad(e.getMilliseconds(),3)}`}Object.defineProperty(exports,"__esModule",{value:!0}),exports.silentRecorder=exports.Recorder=exports.getPrintTime=void 0,exports.getPrintTime=getPrintTime;let taskId=5e7;function genTaskId(){return taskId++}class Recorder{constructor(e){this.sendProgress=e}start(e){const t=genTaskId(),r=e.startsWith("!");r||this.sendProgress(t,"doing",e);const s=()=>{r||this.sendProgress(t,"done","")};return s.id=t,s}async run(e,t){const r=this.start(e);try{return await t()}finally{r()}}}exports.Recorder=Recorder,exports.silentRecorder=new Recorder(()=>{});
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/resolver.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
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
|
-
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/summer.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
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=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
|
-
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/types.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";var FileType,JSONType,AstType;Object.defineProperty(exports,"__esModule",{value:!0}),exports.AstType=exports.JSONType=exports.FileType=exports.BasicCodeExts=void 0,exports.BasicCodeExts=["js","wxml","wxss","json","wxs"],function(e){e.JSON="json",e.WXML="wxml",e.WXSS="wxss",e.WXS="wxs",e.JS="js"}(FileType=exports.FileType||(exports.FileType={})),function(e){e.APP="app",e.Page="page",e.EXT="ext",e.SITEMAP="sitemap",e.THEME="theme"}(JSONType=exports.JSONType||(exports.JSONType={})),function(e){e.Babel="babel",e.Acorn="acorn"}(AstType=exports.AstType||(exports.AstType={}));
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Barrier=void 0;class Barrier{constructor(){this._isOpen=!1,this._promise=new Promise((e,r)=>{this._completePromise=e})}isOpen(){return this._isOpen}open(){this._isOpen=!0,this._completePromise(!0)}wait(){return this._promise}}exports.Barrier=Barrier;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";function ensureArray(r){return Array.isArray(r)?r.filter(Boolean):r?[r]:[]}Object.defineProperty(exports,"__esModule",{value:!0}),exports.ensureArray=void 0,exports.ensureArray=ensureArray;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
package/dist/summer/worker.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.runSummerPluginHook=void 0;const error_1=require("./error"),initPlugin_1=require("./initPlugin");class PluginContainer{constructor(){this.initedPlugins=new Map}getPluginInstance(n,r,e){let i=this.initedPlugins.get(n);return i||(i=(0,initPlugin_1.initPlugin)(n,r,e),this.initedPlugins.set(n,i)),i}clear(){this.initedPlugins.clear()}}const pluginContainer=new PluginContainer;async function runSummerPluginHook(n){var r;if("clear"===n.command)return pluginContainer.clear(),{};const{plugin:e,projectPath:i,pluginOption:t,method:o,args:u}=n,l=pluginContainer.getPluginInstance(e,i,t);if("runMethod"===n.command){const n=null===(r=l.workerMethods)||void 0===r?void 0:r[o];if(!n||"function"!=typeof n)throw new Error(`the ${n} is not a workerMethod of plugin(${e})`);try{return{result:await n(...u)}}catch(n){return{error:n instanceof error_1.SummerError?n.toJSON():n}}}return{}}exports.runSummerPluginHook=runSummerPluginHook;
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|
package/dist/utils/url_config.js
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
!function(require, directRequire){
|
|
2
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.tcbTencentCloudUrl=exports.dbTencentCloudUrl=exports.scfTencentCloudUrl=exports.cloudCosUploadURL=exports.get3rdCloudCodeSecret=exports.cloudAPIAgentURL=exports.GET_LATEST_VERSION=exports.UPLOAD_JS_SERVER=exports.GET_ASYNC_RESULT=exports.GET_UPLOAD_TOKEN=exports.GET_CLOUD_API_SIGNATURE=exports.TRANSLATE_FILENAME=exports.GET_DEV_SOURCE_MAP=exports.GET_RAND_STRING=exports.GET_ONLINE_SCHEMA=exports.GET_WHITE_EXT_LIST=exports.TEST_SOURCE_URL=exports.UPLOAD_URL=exports.GET_ATTR_URL=void 0;const Domain="https://servicewechat.com";exports.GET_ATTR_URL=Domain+"/wxa/ci/getattr",exports.UPLOAD_URL=Domain+"/wxa/ci/upload",exports.TEST_SOURCE_URL=Domain+"/wxa/ci/testSourceURL",exports.GET_WHITE_EXT_LIST=Domain+"/wxa/ci/getwhiteextlist",exports.GET_ONLINE_SCHEMA=Domain+"/wxa/ci/getonlineschema",exports.GET_RAND_STRING=Domain+"/wxa/ci/getrandstr",exports.GET_DEV_SOURCE_MAP=Domain+"/wxa/ci/get_dev_sourcemap",exports.TRANSLATE_FILENAME=Domain+"/wxa/ci/translate_filename",exports.GET_CLOUD_API_SIGNATURE=Domain+"/wxa/ci/getqcloudapisignature",exports.GET_UPLOAD_TOKEN=Domain+"/wxa/ci/getuploadtoken",exports.GET_ASYNC_RESULT=Domain+"/wxa/ci/getasyncresult",exports.UPLOAD_JS_SERVER=Domain+"/wxa/ci/uploadjsserver",exports.GET_LATEST_VERSION=Domain+"/wxa/ci/getlatestversion",exports.cloudAPIAgentURL=Domain+"/wxa/ci/cloudapihttpagent",exports.get3rdCloudCodeSecret=Domain+"/wxa/ci/getcloudcodesecret",exports.cloudCosUploadURL=Domain+"/wxa/ci/cloudcosupload",exports.scfTencentCloudUrl="https://scf.tencentcloudapi.com",exports.dbTencentCloudUrl="https://flexdb.tencentcloudapi.com",exports.tcbTencentCloudUrl="https://tcb.tencentcloudapi.com";
|
|
3
|
-
}(require("licia/lazyImport")(require), require)
|