miniprogram-ci 2.1.32 → 2.1.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +2 -0
- package/README.md +2 -0
- package/dist/@types/build-server/constant.d.ts +42 -0
- package/dist/@types/build-server/ctxManager.d.ts +2 -0
- package/dist/@types/build-server/fileCacheManager.d.ts +43 -0
- package/dist/@types/build-server/fileTaskDriver.d.ts +36 -0
- package/dist/@types/build-server/subProcess.d.ts +1 -0
- package/dist/@types/build-server/subTaskManager.d.ts +8 -0
- package/dist/@types/build-server/taskDriver.d.ts +68 -0
- package/dist/@types/build-server/taskFactory.d.ts +22 -0
- package/dist/@types/build-server/tasks/appserviceCompile/index.d.ts +1 -0
- package/dist/@types/build-server/tasks/appserviceCompile/utils/appdevserver/getAppService.d.ts +5 -0
- package/dist/@types/build-server/tasks/appserviceCompile/utils/appservice/getjsfile.d.ts +19 -0
- package/dist/@types/build-server/tasks/appserviceCompile/utils/appservice/getmainpkgsortedjsfiles.d.ts +10 -0
- package/dist/@types/build-server/tasks/appserviceCompile/utils/appservice/getwxappcode.d.ts +23 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/OTService.d.ts +7 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/enhance.d.ts +29 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/es6module.d.ts +44 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/index.d.ts +3 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/javascript.d.ts +36 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/less.d.ts +43 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/minifywxml.d.ts +10 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/readFile.d.ts +2 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/sass.d.ts +50 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/terser.d.ts +20 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/typescript.d.ts +25 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/worklet.d.ts +13 -0
- package/dist/@types/build-server/tasks/baseFileCompiler/wxss.d.ts +33 -0
- package/dist/@types/build-server/tasks/common/apperrcode.config.d.ts +92 -0
- package/dist/@types/build-server/tasks/common/compiletype.config.d.ts +17 -0
- package/dist/@types/build-server/tasks/common/constants.config.d.ts +549 -0
- package/dist/@types/build-server/tasks/common/simulatortype.config.d.ts +15 -0
- package/dist/@types/build-server/tasks/common/utils/appdevserver/getwxappcode.d.ts +3 -0
- package/dist/@types/build-server/tasks/common/utils/babel/babelhelpers.d.ts +11 -0
- package/dist/@types/build-server/tasks/common/utils/builder/builder.d.ts +35 -0
- package/dist/@types/build-server/tasks/common/utils/builder/filter.d.ts +1 -0
- package/dist/@types/build-server/tasks/common/utils/builder/index.d.ts +10 -0
- package/dist/@types/build-server/tasks/common/utils/cache/compile.d.ts +72 -0
- package/dist/@types/build-server/tasks/common/utils/cache/config.d.ts +16 -0
- package/dist/@types/build-server/tasks/common/utils/cache/filecompile.d.ts +16 -0
- package/dist/@types/build-server/tasks/common/utils/cache/jspersistcache.d.ts +11 -0
- package/dist/@types/build-server/tasks/common/utils/cache/manager.d.ts +18 -0
- package/dist/@types/build-server/tasks/common/utils/cache/persistcache.d.ts +17 -0
- package/dist/@types/build-server/tasks/common/utils/cache/reporter.d.ts +9 -0
- package/dist/@types/build-server/tasks/common/utils/colorutils.d.ts +4 -0
- package/dist/@types/build-server/tasks/common/utils/common/bindActionTools.d.ts +8 -0
- package/dist/@types/build-server/tasks/common/utils/common/tools.d.ts +17 -0
- package/dist/@types/build-server/tasks/common/utils/common/waitable.d.ts +14 -0
- package/dist/@types/build-server/tasks/common/utils/filerules.d.ts +13 -0
- package/dist/@types/build-server/tasks/common/utils/fsutils.d.ts +7 -0
- package/dist/@types/build-server/tasks/common/utils/handleError.d.ts +0 -0
- package/dist/@types/build-server/tasks/common/utils/helper/vendorValidate.d.ts +0 -0
- package/dist/@types/build-server/tasks/common/utils/interfacebuilder/registry/index.d.ts +22 -0
- package/dist/@types/build-server/tasks/common/utils/partialcompile.d.ts +0 -0
- package/dist/@types/build-server/tasks/common/utils/project/appconfig.d.ts +5 -0
- package/dist/@types/build-server/tasks/common/utils/project/appjson.d.ts +2 -0
- package/dist/@types/build-server/tasks/common/utils/project/customcomponent.d.ts +20 -0
- package/dist/@types/build-server/tasks/common/utils/project/generatecode.utils.d.ts +5 -0
- package/dist/@types/build-server/tasks/common/utils/project/getcompiledjs.d.ts +30 -0
- package/dist/@types/build-server/tasks/common/utils/project/helper/index.d.ts +21 -0
- package/dist/@types/build-server/tasks/common/utils/project/helper/projectconfigjsonutils.d.ts +142 -0
- package/dist/@types/build-server/tasks/common/utils/project/helper/reserveddirectories.d.ts +3 -0
- package/dist/@types/build-server/tasks/common/utils/project/helper/theme.d.ts +39 -0
- package/dist/@types/build-server/tasks/common/utils/project/online/appconfig.d.ts +0 -0
- package/dist/@types/build-server/tasks/common/utils/project/pagejson.d.ts +2 -0
- package/dist/@types/build-server/tasks/common/utils/project/projectconfigjson.d.ts +8 -0
- package/dist/@types/build-server/tasks/common/utils/project/wxappcodejson.d.ts +2 -0
- package/dist/@types/build-server/tasks/common/utils/subpackageUtils.d.ts +0 -0
- package/dist/@types/build-server/tasks/common/utils/tracing/Trace.d.ts +50 -0
- package/dist/@types/build-server/tasks/common/utils/tracing/aegis.d.ts +3 -0
- package/dist/@types/build-server/tasks/common/utils/tracing/index.d.ts +34 -0
- package/dist/@types/build-server/tasks/common/utils/tracing/readiness.d.ts +11 -0
- package/dist/@types/build-server/tasks/common/utils/tracing/report.d.ts +14 -0
- package/dist/@types/build-server/tasks/common/utils/trans/transwxmltojs.d.ts +28 -0
- package/dist/@types/build-server/tasks/common/utils/transformsourcemap.d.ts +1 -0
- package/dist/@types/build-server/tasks/common/utils/web/glasseaselUtils.d.ts +1 -0
- package/dist/@types/build-server/tasks/common/utils/web/md5.d.ts +2 -0
- package/dist/@types/build-server/tasks/common/utils/web/processPath.d.ts +9 -0
- package/dist/@types/build-server/tasks/common/weapp.config.d.ts +108 -0
- package/dist/@types/build-server/tasks/pageInitSourceCompile/index.d.ts +2 -0
- package/dist/@types/build-server/tasks/pageframeCompile/index.d.ts +1 -0
- package/dist/@types/build-server/tasks/pageframeCompile/utils/appdevserver/getwxappcode.d.ts +8 -0
- package/dist/@types/build-server/tasks/pageframeCompile/utils/trans/transwxsstojs.d.ts +26 -0
- package/dist/@types/build-server/testAppConfig.d.ts +1 -0
- package/dist/@types/build-server/testAppservice.d.ts +1 -0
- package/dist/@types/build-server/testInitSourceCompile.d.ts +1 -0
- package/dist/@types/build-server/testPageframe.d.ts +1 -0
- package/dist/@types/build-server/testSubProcess.d.ts +1 -0
- package/dist/@types/build-server/utils/fileTask.d.ts +5 -0
- package/dist/@types/build-server/utils/getFileOrCache.d.ts +24 -0
- package/dist/@types/build-server/utils/process.d.ts +0 -0
- package/dist/@types/build-server/utils/request.d.ts +47 -0
- package/dist/@types/bussinessMonitor/monitor.d.ts +1 -0
- package/dist/@types/ci/cloud/utils.d.ts +1 -1
- package/dist/@types/common/code-analyse/index.d.ts +16 -1
- package/dist/@types/config/config.d.ts +1 -1
- package/dist/@types/modules/corecompiler/original/compile/game.d.ts +1 -1
- package/dist/@types/modules/corecompiler/original/compile/index.d.ts +1 -1
- package/dist/@types/modules/corecompiler/original/index.d.ts +1 -1
- package/dist/@types/modules/corecompiler/original/workerThread/childprocessManager.d.ts +1 -1
- package/dist/@types/modules/corecompiler/original/workerThread/config.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/workerThread/task/compilejs.d.ts +3 -0
- package/dist/@types/modules/corecompiler/original/workerThread/workerManager.d.ts +8 -0
- package/dist/@types/modules/corecompiler/originalCompiler.d.ts +1 -1
- package/dist/@types/modules/corecompiler/summer/pipeManager/index.d.ts +6 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipeCPProject.d.ts +17 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipeContext.d.ts +10 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipeManager.d.ts +12 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipeWorker.d.ts +2 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/appservicePipe/index.d.ts +3 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/compileWxmlToGlassEaselPipe.d.ts +3 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/compileWxssPipe.d.ts +3 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/index.d.ts +2 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/pageInitSourcePipe/index.d.ts +4 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/pageframePipe/index.d.ts +3 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getAppService.d.ts +6 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getwxappcode.d.ts +9 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getjsfile.d.ts +12 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getmainpkgsortedjsfiles.d.ts +11 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getwxappcode.d.ts +8 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/common/apperrcode.config.d.ts +92 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/common/tools.d.ts +1 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/appconfig.d.ts +6 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/appjson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/customcomponent.d.ts +21 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/helper/theme.d.ts +40 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/pagejson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/project/wxappcodejson.d.ts +3 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxmltojs.d.ts +19 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxsstojs.d.ts +15 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/utils/web/processPath.d.ts +9 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/pipes/wccPipe.d.ts +3 -0
- package/dist/@types/modules/corecompiler/summer/pipeManager/types.d.ts +100 -0
- package/dist/@types/modules/corecompiler/summer/plugins/script_task/minify_script_task.d.ts +1 -1
- package/dist/@types/modules/corecompiler/summerCompiler.d.ts +6 -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 +31 -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/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 +42 -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 +1 -1
- package/dist/@types/modules/precompiler/conditioncompile/compiler/plant.d.ts +1 -1
- package/dist/@types/modules/precompiler/conditioncompile/index.d.ts +1 -1
- package/dist/@types/project/advance/precompileProject.d.ts +1 -1
- package/dist/@types/project/baseProject.d.ts +1 -0
- package/dist/@types/project/serverProject.d.ts +38 -0
- package/dist/@types/services/app/ci/appDirService.d.ts +6 -0
- package/dist/@types/services/app/server/appDirService.d.ts +6 -0
- package/dist/@types/services/builder/server/builder.d.ts +4 -0
- package/dist/@types/services/common/getservice.d.ts +6 -3
- package/dist/@types/services/compileCacheManager/common/compileCacheManager.d.ts +23 -0
- package/dist/@types/services/compileCacheManager/nw/compileCacheManager.d.ts +16 -0
- package/dist/@types/services/compileCacheManager/server/compileCacheManager.d.ts +26 -0
- package/dist/@types/services/compilewxml/common/compilewxmlService.d.ts +2 -2
- package/dist/@types/services/compilewxml/node/compileglasseasel.d.ts +14 -0
- package/dist/@types/services/compilewxml/server/compilewxmlService.d.ts +5 -0
- package/dist/@types/services/compilewxml/server/wccWorker.d.ts +1 -0
- package/dist/@types/services/compilewxss/server/compilewxssService.d.ts +4 -0
- package/dist/@types/services/compilewxss/server/wcscWorker.d.ts +1 -0
- package/dist/@types/services/consoledisplay/server/consoledisplay.d.ts +4 -0
- package/dist/@types/services/fileUtilsManager/server/fileUtilsManager.d.ts +4 -0
- package/dist/@types/services/fs/server/fileService.d.ts +27 -0
- package/dist/@types/services/genTempFile/server/genTempFileService.d.ts +3 -0
- package/dist/@types/services/global/server/global.d.ts +6 -0
- package/dist/@types/services/initializeCheck/server/initializeCheck.d.ts +4 -0
- package/dist/@types/services/locales/server/const.d.ts +5 -0
- package/dist/@types/services/locales/server/locales.d.ts +5 -0
- package/dist/@types/services/log/server/logService.d.ts +9 -0
- package/dist/@types/services/miniappjson/server/miniappjson.d.ts +4 -0
- package/dist/@types/services/multiTaskManager/ci/multiTaskManager.d.ts +5 -0
- package/dist/@types/services/multiTaskManager/common/multiTaskManager.d.ts +5 -0
- package/dist/@types/services/multiTaskManager/electron/multiTaskManager.d.ts +5 -0
- package/dist/@types/services/multiTaskManager/server/multiTaskManager.d.ts +5 -0
- package/dist/@types/services/multiTaskManager/server/pm2TaskWorker.d.ts +1 -0
- package/dist/@types/services/multiTaskManager/server/pm2WorkerManager.d.ts +18 -0
- package/dist/@types/services/multiTaskManager/webide/multiTaskManager.d.ts +5 -0
- package/dist/@types/services/nativeModule/ci/nativeModule.d.ts +3 -0
- package/dist/@types/services/nativeModule/common/nativeModule.d.ts +2 -2
- package/dist/@types/services/nativeModule/common/nativeModule.impl.d.ts +3 -2
- package/dist/@types/services/nativeModule/server/nativeModule.d.ts +3 -0
- package/dist/@types/services/performance/server/performance.d.ts +7 -0
- package/dist/@types/services/pluginFileReader/ci/pluginFileReader.d.ts +3 -0
- package/dist/@types/services/pluginFileReader/common/pluginFileReader.base.d.ts +9 -0
- package/dist/@types/services/pluginFileReader/common/pluginFileReader.d.ts +11 -0
- package/dist/@types/services/pluginFileReader/electron/pluginFileReader.d.ts +3 -0
- package/dist/@types/services/pluginFileReader/server/pluginFileReader.d.ts +18 -0
- package/dist/@types/services/pluginFileReader/webide/pluginFileReader.d.ts +9 -0
- package/dist/@types/services/projectManager/server/buildServerProjectManager.d.ts +11 -0
- package/dist/@types/services/projectManager/server/projectManager.d.ts +7 -0
- package/dist/@types/services/root/ci/rootService.d.ts +2 -0
- package/dist/@types/services/root/server/root.d.ts +11 -0
- package/dist/@types/services/root/server/rootService.d.ts +2 -0
- package/dist/@types/services/root/webide/root.d.ts +11 -0
- package/dist/@types/services/root/webide/rootService.d.ts +2 -0
- package/dist/@types/services/staticConfig/server/staticConfigService.d.ts +4 -0
- package/dist/@types/services/store/server/storeService.d.ts +11 -0
- package/dist/@types/services/uniapp/server/uniapp.d.ts +4 -0
- package/dist/@types/utils/colorutils.d.ts +4 -0
- package/dist/@types/utils/debug.d.ts +1 -0
- package/dist/@types/utils/error.d.ts +1 -1
- package/dist/@types/utils/fsagent.d.ts +4 -3
- package/dist/@types/utils/processBootstrap.d.ts +7 -0
- package/dist/@types/utils/subprocess/processManager.d.ts +1 -0
- package/dist/@types/utils/wxapkg/pack.d.ts +2 -2
- package/dist/build-server/constant.js +1 -0
- package/dist/build-server/ctxManager.js +1 -0
- package/dist/build-server/fileCacheManager.js +1 -0
- package/dist/build-server/fileTaskDriver.js +1 -0
- package/dist/build-server/subProcess.js +1 -0
- package/dist/build-server/subTaskManager.js +1 -0
- package/dist/build-server/taskDriver.js +1 -0
- package/dist/build-server/taskFactory.js +1 -0
- package/dist/build-server/tasks/appserviceCompile/index.js +1 -0
- package/dist/build-server/tasks/appserviceCompile/utils/appdevserver/getAppService.js +1 -0
- package/dist/build-server/tasks/appserviceCompile/utils/appservice/getjsfile.js +1 -0
- package/dist/build-server/tasks/appserviceCompile/utils/appservice/getmainpkgsortedjsfiles.js +1 -0
- package/dist/build-server/tasks/appserviceCompile/utils/appservice/getwxappcode.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/OTService.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/enhance.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/es6module.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/index.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/javascript.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/less.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/minifywxml.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/readFile.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/sass.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/terser.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/typescript.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/worklet.js +1 -0
- package/dist/build-server/tasks/baseFileCompiler/wxss.js +1 -0
- package/dist/build-server/tasks/common/apperrcode.config.js +1 -0
- package/dist/build-server/tasks/common/compiletype.config.js +1 -0
- package/dist/build-server/tasks/common/constants.config.js +1 -0
- package/dist/build-server/tasks/common/simulatortype.config.js +1 -0
- package/dist/build-server/tasks/common/utils/appdevserver/getwxappcode.js +1 -0
- package/dist/build-server/tasks/common/utils/babel/babelhelpers.js +1 -0
- package/dist/build-server/tasks/common/utils/builder/builder.js +1 -0
- package/dist/build-server/tasks/common/utils/builder/filter.js +1 -0
- package/dist/build-server/tasks/common/utils/builder/index.js +1 -0
- package/dist/build-server/tasks/common/utils/cache/compile.js +1 -0
- package/dist/build-server/tasks/common/utils/cache/config.js +1 -0
- package/dist/build-server/tasks/common/utils/cache/filecompile.js +1 -0
- package/dist/build-server/tasks/common/utils/cache/jspersistcache.js +1 -0
- package/dist/build-server/tasks/common/utils/cache/manager.js +1 -0
- package/dist/build-server/tasks/common/utils/cache/persistcache.js +1 -0
- package/dist/build-server/tasks/common/utils/cache/reporter.js +1 -0
- package/dist/build-server/tasks/common/utils/colorutils.js +1 -0
- package/dist/build-server/tasks/common/utils/common/bindActionTools.js +1 -0
- package/dist/build-server/tasks/common/utils/common/schema.helper.js +1 -0
- package/dist/build-server/tasks/common/utils/common/tools.js +1 -0
- package/dist/build-server/tasks/common/utils/common/waitable.js +1 -0
- package/dist/build-server/tasks/common/utils/filerules.js +1 -0
- package/dist/build-server/tasks/common/utils/fsutils.js +1 -0
- package/dist/build-server/tasks/common/utils/handleError.js +1 -0
- package/dist/build-server/tasks/common/utils/helper/vendorValidate.js +1 -0
- package/dist/build-server/tasks/common/utils/interfacebuilder/registry/index.js +1 -0
- package/dist/build-server/tasks/common/utils/partialcompile.js +1 -0
- package/dist/build-server/tasks/common/utils/project/appconfig.js +1 -0
- package/dist/build-server/tasks/common/utils/project/appjson.js +1 -0
- package/dist/build-server/tasks/common/utils/project/customcomponent.js +1 -0
- package/dist/build-server/tasks/common/utils/project/generatecode.utils.js +1 -0
- package/dist/build-server/tasks/common/utils/project/getcompiledjs.js +1 -0
- package/dist/build-server/tasks/common/utils/project/helper/index.js +1 -0
- package/dist/build-server/tasks/common/utils/project/helper/projectconfigjsonutils.js +1 -0
- package/dist/build-server/tasks/common/utils/project/helper/reserveddirectories.js +1 -0
- package/dist/build-server/tasks/common/utils/project/helper/theme.js +1 -0
- package/dist/build-server/tasks/common/utils/project/online/appconfig.js +1 -0
- package/dist/build-server/tasks/common/utils/project/pagejson.js +1 -0
- package/dist/build-server/tasks/common/utils/project/projectconfigjson.js +1 -0
- package/dist/build-server/tasks/common/utils/project/wxappcodejson.js +1 -0
- package/dist/build-server/tasks/common/utils/subpackageUtils.js +1 -0
- package/dist/build-server/tasks/common/utils/tracing/Trace.js +1 -0
- package/dist/build-server/tasks/common/utils/tracing/aegis.js +1 -0
- package/dist/build-server/tasks/common/utils/tracing/index.js +1 -0
- package/dist/build-server/tasks/common/utils/tracing/readiness.js +1 -0
- package/dist/build-server/tasks/common/utils/tracing/report.js +1 -0
- package/dist/build-server/tasks/common/utils/trans/transwxmltojs.js +1 -0
- package/dist/build-server/tasks/common/utils/transformsourcemap.js +1 -0
- package/dist/build-server/tasks/common/utils/web/glasseaselUtils.js +1 -0
- package/dist/build-server/tasks/common/utils/web/md5.js +1 -0
- package/dist/build-server/tasks/common/utils/web/processPath.js +1 -0
- package/dist/build-server/tasks/common/weapp.config.js +1 -0
- package/dist/build-server/tasks/pageInitSourceCompile/index.js +1 -0
- package/dist/build-server/tasks/pageframeCompile/index.js +1 -0
- package/dist/build-server/tasks/pageframeCompile/utils/appdevserver/getwxappcode.js +1 -0
- package/dist/build-server/tasks/pageframeCompile/utils/trans/transwxsstojs.js +1 -0
- package/dist/build-server/testAppConfig.js +1 -0
- package/dist/build-server/testAppservice.js +1 -0
- package/dist/build-server/testInitSourceCompile.js +1 -0
- package/dist/build-server/testPageframe.js +1 -0
- package/dist/build-server/testSubProcess.js +1 -0
- package/dist/build-server/utils/fileTask.js +1 -0
- package/dist/build-server/utils/getFileOrCache.js +1 -0
- package/dist/build-server/utils/process.js +1 -0
- package/dist/build-server/utils/request.js +1 -0
- package/dist/bussinessMonitor/monitor.js +1 -0
- package/dist/ci/android-miniapp-toolkit/dist/index.js +1 -1
- package/dist/ci/build-apk.js +1 -1
- package/dist/ci/build-ipa.js +1 -1
- package/dist/ci/checkCodeQuality.js +1 -1
- package/dist/ci/cloud/cloudapi.js +1 -1
- package/dist/ci/cloud/createTimeTrigger.js +1 -1
- package/dist/ci/cloud/uploadContainer.js +1 -1
- package/dist/ci/cloud/uploadFile.js +1 -1
- package/dist/ci/cloud/uploadFunction.js +1 -1
- package/dist/ci/cloud/utils.js +1 -1
- package/dist/ci/code-analyse.js +1 -1
- package/dist/ci/cos-upload.js +1 -1
- package/dist/ci/gamepkg/apkplug.js +1 -1
- package/dist/ci/gamepkg/index.js +1 -1
- package/dist/ci/getCompiledResult.js +1 -1
- package/dist/ci/getDevSourceMap.js +1 -1
- package/dist/ci/getcompiler.js +1 -1
- package/dist/ci/miniapp/androidCloudBuild.js +1 -1
- package/dist/ci/miniapp/archive.js +1 -1
- package/dist/ci/miniapp/iosCloudBuild.js +1 -1
- package/dist/ci/miniapp/miniappPlugin.js +1 -1
- package/dist/ci/miniapp/sdkManager.js +1 -1
- package/dist/ci/miniapp/upload.js +1 -1
- package/dist/ci/miniapp-cloud-upload.js +1 -1
- package/dist/ci/preview.js +1 -1
- package/dist/ci/upload.js +1 -1
- package/dist/ci/utils/codeDenpendencyQualityChecker.js +1 -1
- package/dist/ci/utils/filterUnusedFile.js +1 -1
- package/dist/ci/utils/pack.js +1 -1
- package/dist/ci/utils/packfile.js +1 -1
- package/dist/ci/utils/terminalQrcode.js +1 -1
- package/dist/ci/utils/tools.js +1 -1
- package/dist/ci/utils/unpack.js +1 -1
- package/dist/ci/utils/wxvpkg/unpack/version0.js +1 -1
- package/dist/ci/utils/wxvpkg/unpack/version10.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/common/code-analyse/index.js +1 -1
- package/dist/config/config.js +1 -1
- package/dist/config/url.config.js +1 -1
- package/dist/index.js +1 -1
- package/dist/manifest.json +4 -0
- package/dist/modules/corecompiler/baseCompiler.js +1 -1
- package/dist/modules/corecompiler/original/analyse/partial.js +1 -1
- package/dist/modules/corecompiler/original/compile/common.js +1 -1
- package/dist/modules/corecompiler/original/compile/game.js +1 -1
- package/dist/modules/corecompiler/original/compile/gamePlugin.js +1 -1
- package/dist/modules/corecompiler/original/compile/handler/js.js +1 -1
- package/dist/modules/corecompiler/original/compile/handler/mpjson.js +1 -1
- package/dist/modules/corecompiler/original/compile/handler/wxml.js +1 -1
- package/dist/modules/corecompiler/original/compile/handler/wxss.js +1 -1
- package/dist/modules/corecompiler/original/compile/miniprogram.js +1 -1
- package/dist/modules/corecompiler/original/compile/miniprogramPlugin.js +1 -1
- package/dist/modules/corecompiler/original/js/enhance.js +1 -1
- package/dist/modules/corecompiler/original/js/es6Transform.js +1 -1
- package/dist/modules/corecompiler/original/js/generateMap.js +1 -1
- package/dist/modules/corecompiler/original/js/minifyjs.js +1 -1
- package/dist/modules/corecompiler/original/js/minifyjsAfterWrap.js +1 -1
- package/dist/modules/corecompiler/original/js/workletCompile.js +1 -1
- package/dist/modules/corecompiler/original/json/app/appJSON.js +1 -1
- package/dist/modules/corecompiler/original/json/app/checkAppFields.js +1 -1
- package/dist/modules/corecompiler/original/json/app/extJSON.js +1 -1
- package/dist/modules/corecompiler/original/json/app/index.js +1 -1
- package/dist/modules/corecompiler/original/json/common.js +1 -1
- package/dist/modules/corecompiler/original/json/game.js +1 -1
- package/dist/modules/corecompiler/original/json/page/checkPageJSON.js +1 -1
- package/dist/modules/corecompiler/original/json/page/getPageJSON.js +1 -1
- package/dist/modules/corecompiler/original/json/plugin/plugin.js +1 -1
- package/dist/modules/corecompiler/original/json/plugin/pluginPage.js +1 -1
- package/dist/modules/corecompiler/original/json/projectconfig.js +1 -1
- package/dist/modules/corecompiler/original/json/reactiveCache.js +1 -1
- package/dist/modules/corecompiler/original/json/signaturejson.js +1 -1
- package/dist/modules/corecompiler/original/json/sitemap.js +1 -1
- package/dist/modules/corecompiler/original/json/theme.js +1 -1
- package/dist/modules/corecompiler/original/npm/filterdeps.js +1 -1
- package/dist/modules/corecompiler/original/npm/packnpm.js +1 -1
- package/dist/modules/corecompiler/original/protect/fileFlatter.js +1 -1
- package/dist/modules/corecompiler/original/protect/uglifyfilenames.js +1 -1
- package/dist/modules/corecompiler/original/utils/logger.js +1 -1
- package/dist/modules/corecompiler/original/validate/schemaValidate.js +1 -1
- package/dist/modules/corecompiler/original/validate/validate.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/childprocess.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/childprocessManager.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/config.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/fork.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/index.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/task/call_func.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/task/compilejs.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/task/compilewxss.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/task/func.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/task/index.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/task/minifywxml.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/worker.js +1 -1
- package/dist/modules/corecompiler/original/workerThread/workerManager.js +1 -1
- package/dist/modules/corecompiler/originalCompiler.js +1 -1
- package/dist/modules/corecompiler/processHandler.js +1 -1
- package/dist/modules/corecompiler/summer/graph/appconf.js +1 -1
- package/dist/modules/corecompiler/summer/graph/appgraph.js +1 -1
- package/dist/modules/corecompiler/summer/graph/basegraph.js +1 -1
- package/dist/modules/corecompiler/summer/graph/gameconf.js +1 -1
- package/dist/modules/corecompiler/summer/graph/gamegraph.js +1 -1
- package/dist/modules/corecompiler/summer/graph/gamepluginconf.js +1 -1
- package/dist/modules/corecompiler/summer/graph/gameplugingraph.js +1 -1
- package/dist/modules/corecompiler/summer/graph/pluginconf.js +1 -1
- package/dist/modules/corecompiler/summer/graph/plugingraph.js +1 -1
- package/dist/modules/corecompiler/summer/index.js +1 -1
- package/dist/modules/corecompiler/summer/initPlugin.js +1 -1
- package/dist/modules/corecompiler/summer/module.js +1 -1
- package/dist/modules/corecompiler/summer/persistCache.js +1 -1
- package/dist/modules/corecompiler/summer/pipeManager/index.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipeCPProject.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipeContext.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipeManager.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipeWorker.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/appservicePipe/index.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/compileWxmlToGlassEaselPipe.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/compileWxssPipe.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/index.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/pageInitSourcePipe/index.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/pageframePipe/index.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getAppService.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appdevserver/getwxappcode.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getjsfile.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getmainpkgsortedjsfiles.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/appservice/getwxappcode.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/common/apperrcode.config.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/common/tools.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/appconfig.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/appjson.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/customcomponent.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/helper/theme.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/pagejson.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/project/wxappcodejson.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxmltojs.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/trans/transwxsstojs.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/utils/web/processPath.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/pipes/wccPipe.js +1 -0
- package/dist/modules/corecompiler/summer/pipeManager/types.js +1 -0
- package/dist/modules/corecompiler/summer/pluginDriver.js +1 -1
- package/dist/modules/corecompiler/summer/pluginconfig.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/base/es6module.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/base/javascript.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/base/swc.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/base/wxss.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/enhance.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/filetask/script.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/less.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/minifywxml.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/sass.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/script_task/babel_script_task.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/script_task/load_script_task.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/script_task/minify_script_task.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/script_task/swc_task.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/terser.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/typescript.js +1 -1
- package/dist/modules/corecompiler/summer/plugins/worklet.js +1 -1
- package/dist/modules/corecompiler/summer/resolver.js +1 -1
- package/dist/modules/corecompiler/summer/summer.js +1 -1
- package/dist/modules/corecompiler/summer/utils/async.js +1 -1
- package/dist/modules/corecompiler/summer/utils/inputsourcemap.js +1 -1
- package/dist/modules/corecompiler/summerCompiler.js +1 -1
- package/dist/modules/corecompiler/summerEntryProcess.js +1 -1
- package/dist/modules/createSummer.js +1 -1
- package/dist/modules/fullcompiler/app/app.js +1 -1
- package/dist/modules/fullcompiler/app/contactandlaunch/updateContactForSubpkg.js +1 -1
- package/dist/modules/fullcompiler/app/contactandlaunch/updatecontactandlaunch.js +1 -1
- 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/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 -1
- package/dist/modules/nativecompiler/android/adb.js +1 -1
- package/dist/modules/nativecompiler/android/device.js +1 -1
- package/dist/modules/nativecompiler/android/index.js +1 -1
- package/dist/modules/nativecompiler/android/projectconfig.js +1 -1
- package/dist/modules/nativecompiler/index.js +1 -1
- package/dist/modules/nativecompiler/ios/buildCloud.js +1 -1
- package/dist/modules/nativecompiler/ios/device.js +1 -1
- package/dist/modules/nativecompiler/ios/index.js +1 -1
- package/dist/modules/nativecompiler/nativeEntryProcess.js +1 -1
- package/dist/modules/nativecompiler/processHandler.js +1 -1
- package/dist/modules/precompiler/conditioncompile/compiler/json.js +1 -1
- package/dist/modules/precompiler/conditioncompile/compiler/macro.js +1 -1
- package/dist/modules/precompiler/conditioncompile/index.js +1 -1
- package/dist/project/advance/precompileProject.js +1 -1
- package/dist/project/advance/reactiveProject.js +1 -1
- package/dist/project/baseProject.js +1 -1
- package/dist/project/ciProjectWithMockBuffer.js +1 -1
- package/dist/project/serverProject.js +1 -0
- package/dist/project/summerCPProject.js +1 -1
- package/dist/services/app/ci/appDirService.js +1 -0
- package/dist/services/app/server/appDirService.js +1 -0
- package/dist/services/builder/server/builder.js +1 -0
- package/dist/services/common/getservice.js +1 -1
- package/dist/services/common/vsbase.js +1 -1
- package/dist/services/compileCacheManager/common/compileCacheManager.js +1 -0
- package/dist/services/compileCacheManager/nw/compileCacheManager.js +1 -0
- package/dist/services/compileCacheManager/server/compileCacheManager.js +1 -0
- package/dist/services/compilewxml/node/compileUtils.js +1 -1
- package/dist/services/compilewxml/node/compileglasseasel.js +1 -1
- package/dist/services/compilewxml/server/compilewxmlService.js +1 -0
- package/dist/services/compilewxml/server/wccWorker.js +1 -0
- package/dist/services/compilewxml/webide/pageFrameWasm/wcc/runWcc.js +1 -1
- package/dist/services/compilewxss/node/compileUtils.js +1 -1
- package/dist/services/compilewxss/server/compilewxssService.js +1 -0
- package/dist/services/compilewxss/server/wcscWorker.js +1 -0
- package/dist/services/compilewxss/webide/pageFrameWasm/wcsc/runWcsc.js +1 -1
- package/dist/services/consoledisplay/server/consoledisplay.js +1 -0
- package/dist/services/fileUtilsManager/server/fileUtilsManager.js +1 -0
- package/dist/services/fs/server/fileService.js +1 -0
- package/dist/services/genTempFile/server/genTempFileService.js +1 -0
- package/dist/services/global/server/global.js +1 -0
- package/dist/services/initializeCheck/server/initializeCheck.js +1 -0
- package/dist/services/locales/server/const.js +1 -0
- package/dist/services/locales/server/locales.js +1 -0
- package/dist/services/log/server/logService.js +1 -0
- package/dist/services/miniappjson/server/miniappjson.js +1 -0
- package/dist/services/multiTaskManager/ci/multiTaskManager.js +1 -0
- package/dist/services/multiTaskManager/common/multiTaskManager.js +1 -0
- package/dist/services/multiTaskManager/electron/multiTaskManager.js +1 -0
- package/dist/services/multiTaskManager/server/multiTaskManager.js +1 -0
- package/dist/services/multiTaskManager/server/pm2TaskWorker.js +1 -0
- package/dist/services/multiTaskManager/server/pm2WorkerManager.js +1 -0
- package/dist/services/multiTaskManager/webide/multiTaskManager.js +1 -0
- package/dist/services/nativeModule/ci/nativeModule.js +1 -0
- package/dist/services/nativeModule/common/nativeModule.impl.js +1 -1
- package/dist/services/nativeModule/server/nativeModule.js +1 -0
- package/dist/services/performance/server/performance.js +1 -0
- package/dist/services/pluginFileReader/ci/pluginFileReader.js +1 -0
- package/dist/services/pluginFileReader/common/pluginFileReader.base.js +1 -0
- package/dist/services/pluginFileReader/common/pluginFileReader.js +1 -0
- package/dist/services/pluginFileReader/electron/pluginFileReader.js +1 -0
- package/dist/services/pluginFileReader/server/pluginFileReader.js +1 -0
- package/dist/services/pluginFileReader/webide/pluginFileReader.js +1 -0
- package/dist/services/projectManager/server/buildServerProjectManager.js +1 -0
- package/dist/services/projectManager/server/projectManager.js +1 -0
- package/dist/services/root/{node → ci}/root.js +1 -1
- package/dist/services/root/ci/rootService.js +1 -0
- package/dist/services/root/electron/root.js +1 -1
- package/dist/services/root/electron/rootService.js +1 -1
- package/dist/services/root/nw/root.js +1 -1
- package/dist/services/root/server/root.js +1 -0
- package/dist/services/root/server/rootService.js +1 -0
- package/dist/services/root/webide/root.js +1 -0
- package/dist/services/root/webide/rootService.js +1 -0
- package/dist/services/staticConfig/server/staticConfigService.js +1 -0
- package/dist/services/store/server/storeService.js +1 -0
- package/dist/services/uniapp/server/uniapp.js +1 -0
- package/dist/utils/asyncTask/index.js +1 -1
- package/dist/utils/babel_helper.js +1 -1
- package/dist/utils/babel_plugin_worklet.js +1 -1
- package/dist/utils/colorutils.js +1 -0
- package/dist/utils/common.js +1 -1
- package/dist/utils/cosUpload.js +1 -1
- package/dist/utils/cp.js +1 -1
- package/dist/utils/customError.js +1 -1
- package/dist/utils/debug.js +1 -1
- package/dist/utils/download.js +1 -1
- package/dist/utils/expression.js +1 -1
- package/dist/utils/fsagent.js +1 -1
- package/dist/utils/genTempFile.js +1 -1
- package/dist/utils/generateIpa.js +1 -1
- package/dist/utils/glob.js +1 -1
- package/dist/utils/hackrequire/wxvpkgreader.js +1 -1
- package/dist/utils/helper_util.js +1 -1
- package/dist/utils/jsonlint.js +1 -1
- package/dist/utils/locales/fomatable_string.js +1 -1
- package/dist/utils/locales/locales.js +1 -1
- package/dist/utils/log.js +1 -1
- package/dist/utils/messageHub.js +1 -1
- package/dist/utils/miniAppI18N.js +1 -1
- package/dist/utils/miniapp-builder.js +1 -1
- package/dist/utils/miniappJson.js +1 -1
- package/dist/utils/officialDonutPlugin.js +1 -1
- package/dist/utils/packOptionsHelper.js +1 -1
- package/dist/utils/processBootstrap.js +1 -0
- package/dist/utils/progressRecorder.js +1 -1
- package/dist/utils/request.js +1 -1
- package/dist/utils/singletontask.js +1 -1
- package/dist/utils/subprocess/entryProcess.js +1 -1
- package/dist/utils/subprocess/processManager.js +1 -1
- package/dist/utils/subprocess/processService.js +1 -1
- package/dist/utils/swc_helper.js +1 -1
- package/dist/utils/taskmanager.js +1 -1
- package/dist/utils/tools.js +1 -1
- package/dist/utils/usbProcess.js +1 -1
- package/dist/utils/waitable.js +1 -1
- package/dist/utils/web/common.js +1 -1
- package/dist/utils/white_ext_list.js +1 -1
- package/dist/utils/wxapkg/pack.js +1 -1
- package/dist/utils/wxvpkgreader/wxvpkg/reader/version0.js +1 -1
- package/dist/utils/wxvpkgreader/wxvpkg/reader/version10.js +1 -1
- 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 -1
- package/package.json +5 -3
- 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/lib/addonVersion.js +0 -19
- package/dist/modules/fullcompiler/trans/wcc/lib/index.js +0 -4
- package/dist/modules/fullcompiler/trans/wcc/lib/util.js +0 -1134
- package/dist/modules/fullcompiler/trans/wcc/lib/wcc.js +0 -94
- package/dist/modules/fullcompiler/trans/wcc/lib/wcsc.js +0 -93
- package/dist/services/root/node/rootService.js +0 -1
- /package/dist/@types/{services/root/node/rootService.d.ts → build-server/tasks/common/utils/common/schema.helper.d.ts} +0 -0
- /package/dist/@types/services/root/{node → ci}/root.d.ts +0 -0
package/dist/config/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var COMPILE_TYPE,AstType,EFilterCode;function getDefaultIgnores(e){const _=["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"];return"multiPlatform"===e.projectArchitecture&&_.push(exports.multiPlatformRoot
|
|
1
|
+
"use strict";var COMPILE_TYPE,AstType,EFilterCode;function getDefaultIgnores(e){const _=["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"];return"multiPlatform"===e.projectArchitecture&&_.push(`${exports.multiPlatformRoot}/**/*`),_}Object.defineProperty(exports,"__esModule",{value:!0}),exports.MAX_CODE_LENGTH=exports.EFilterCode=exports.AstType=exports.compileTypeConfig=exports.FullPkg=exports.MainPkg=exports.multiPlatformRoot=exports.extendedLibMap=exports.jsonVariablePropertyWhiteList=exports.DefaultProjectAttr=exports.TABBAR_ICON_WHITE_LIST=exports.COMPILE_TYPE=exports.APP_TYPE=exports.MINI_GAME_WORKERS_PACKAGE_ROOT=exports.MINI_GAME_MAIN_PACKAGE_ROOT=exports.MINI_PROGRAM_MAIN_PACKAGE_ROOT=exports.PROJECT_TYPE_ERROR=exports.GET_LATEST_VERSION_CGI_ERR=exports.UPLOAD_JS_SERVER_CGI_ERR=exports.CODE_PROTECT_TRANSLATE_FILENAME=exports.UPLOAD_CGI_ERR=exports.GENERATE_LOCAL_SIGNATURE_ERR=exports.GET_SIGNATURE_RAND_STRING_ERR=exports.APP_JSON_NOT_FOUND=exports.JSON_CONTENT_ERR=exports.FILE_NOT_UTF8=exports.JSON_PARSE_ERR=exports.FILE_NOT_FOUND=exports.PLUGIN_JSON_PARSE_ERR=exports.PLUGIN_JSON_CONTENT_ERR=exports.PLUGIN_JSON_FILE_NOT_FOUND=exports.GAME_PLUGIN_LIB_MD5_NOT_MATCH=exports.SUMMER_PLUGIN_CODE_ERR=exports.SUMMER_PLUGIN_ERR=exports.MINIFY_WXML_ERR=exports.POST_WXSS_ERR=exports.FILE_FLAT_ERR=exports.JS_ES6_ERR=exports.BABILI_JS_ERR=exports.UGLIFY_JS_ERR=exports.BABEL_TRANS_JS_ERR=exports.JS_NOT_FOUND=exports.WXML_NOT_FOUND=exports.PARAM_ERROR=exports.CI_VERSION=void 0,exports.getDefaultIgnores=getDefaultIgnores,exports.CI_VERSION="2.1.34",exports.PARAM_ERROR=1e4,exports.WXML_NOT_FOUND=10007,exports.JS_NOT_FOUND=10008,exports.BABEL_TRANS_JS_ERR=10032,exports.UGLIFY_JS_ERR=10033,exports.BABILI_JS_ERR=10034,exports.JS_ES6_ERR=10035,exports.FILE_FLAT_ERR=10036,exports.POST_WXSS_ERR=10037,exports.MINIFY_WXML_ERR=10038,exports.SUMMER_PLUGIN_ERR=10045,exports.SUMMER_PLUGIN_CODE_ERR=10046,exports.GAME_PLUGIN_LIB_MD5_NOT_MATCH=10081,exports.PLUGIN_JSON_FILE_NOT_FOUND=10091,exports.PLUGIN_JSON_CONTENT_ERR=10092,exports.PLUGIN_JSON_PARSE_ERR=10093,exports.FILE_NOT_FOUND=10005,exports.JSON_PARSE_ERR=10006,exports.FILE_NOT_UTF8=10031,exports.JSON_CONTENT_ERR=10009,exports.APP_JSON_NOT_FOUND=2e4,exports.GET_SIGNATURE_RAND_STRING_ERR=20001,exports.GENERATE_LOCAL_SIGNATURE_ERR=20002,exports.UPLOAD_CGI_ERR=20003,exports.CODE_PROTECT_TRANSLATE_FILENAME=20004,exports.UPLOAD_JS_SERVER_CGI_ERR=20005,exports.GET_LATEST_VERSION_CGI_ERR=20006,exports.PROJECT_TYPE_ERROR=3e4,exports.MINI_PROGRAM_MAIN_PACKAGE_ROOT="__APP__",exports.MINI_GAME_MAIN_PACKAGE_ROOT="__GAME__",exports.MINI_GAME_WORKERS_PACKAGE_ROOT="workers.js",exports.APP_TYPE={NORMAL:0,PLUGIN:1,SHOP:2,MINISHOP:3,GAME:4,CARD:5,NATIVE:7},function(e){e.miniProgram="miniProgram",e.miniProgramPlugin="miniProgramPlugin",e.miniGame="miniGame",e.miniGamePlugin="miniGamePlugin"}(COMPILE_TYPE||(exports.COMPILE_TYPE=COMPILE_TYPE={})),exports.TABBAR_ICON_WHITE_LIST=[".png",".jpg",".jpeg"],exports.DefaultProjectAttr={platform:!1,appType:0,isSandbox:!1,released:!1,setting:{MaxCodeSize:2,MaxSubpackageSubCodeSize:2,MaxSubpackageFullCodeSize:12,NavigateMiniprogramLimit:10,MaxSubPackageLimit:100,MinTabbarCount:2,MaxTabbarCount:5,MaxCustomTabbarCount:10,MaxTabbarIconSize:40}},exports.jsonVariablePropertyWhiteList={windowPropertWhiteList:["navigationBarBackgroundColor","navigationBarTextStyle","backgroundColor","backgroundTextStyle","backgroundColorTop","backgroundColorBottom","backgroundColorContent"],tabBarPropertyWhiteList:["color","selectedColor","backgroundColor","borderStyle"],tabbarListItemPropertyWhiteList:["iconPath","selectedIconPath"]},exports.extendedLibMap={kbone:{packages:["miniprogram-element","miniprogram-render"]},weui:{packages:["weui-miniprogram"]}},exports.multiPlatformRoot="miniapp",exports.MainPkg="__APP__",exports.FullPkg="__FULL__",exports.compileTypeConfig={weapp:"weapp",game:"game",plugin:"plugin",gamePlugin:"gamePlugin"},function(e){e.Babel="babel",e.Acorn="acorn"}(AstType||(exports.AstType=AstType={})),function(e){e[e.Include=0]="Include",e[e.PackOptionsIgnore=1]="PackOptionsIgnore",e[e.AnalyseNoUse=2]="AnalyseNoUse",e[e.PartialCompileNoUse=3]="PartialCompileNoUse"}(EFilterCode||(exports.EFilterCode=EFilterCode={})),exports.MAX_CODE_LENGTH=2048e3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getUsedPluginVersionInfo=exports.downloadMiniAppPlugin=exports.getPkgWxapkg=exports.miniappUpload=exports.getCloudBuildPkgUrl=exports.getCloudBuildTaskList=exports.uploadCloudBuildResourcePack=exports.getSdkIntInfo=exports.getAsyncResult=exports.testSourceNewFeatureURL=exports.testSourceURL=exports.getUploadToken=exports.commitSourceURL=exports.commitSourceNewFeatureURL=exports.tcbTencentCloudUrl=exports.dbTencentCloudUrl=exports.scfTencentCloudUrl=exports.cloudCosUploadURL=exports.get3rdCloudCodeSecret=exports.cloudAPIAgentURL=exports.GET_LATEST_VERSION=exports.UPLOAD_JS_SERVER=exports.GET_UPLOAD_SIGN=exports.GET_UPLOAD_INFO=exports.GET_PLUG_PKG_CHECK_USERVERSION=exports.GET_PLUG_PKG_GET_URL=exports.GET_PLUG_PKG_GET_LIST=exports.GET_MULTI_COS_UPLOAD_SIGN=exports.GET_MULTI_COS_UPLOAD_INFO=exports.GET_MULTI_COS_ASYNC_RESULT=exports.GET_GAME_PKG_UPLOAD_SIGN=exports.GET_GAME_PKG_UPLOAD_INFO=exports.GET_GAME_PKG_ASYNC_RESULT=exports.GAME_PKG_UPLOAD_URL=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
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getUsedPluginVersionInfo=exports.downloadMiniAppPlugin=exports.getPkgWxapkg=exports.miniappUpload=exports.getCloudBuildPkgUrl=exports.getCloudBuildTaskList=exports.uploadCloudBuildResourcePack=exports.getSdkIntInfo=exports.getAsyncResult=exports.testSourceNewFeatureURL=exports.testSourceURL=exports.getUploadToken=exports.commitSourceURL=exports.commitSourceNewFeatureURL=exports.tcbTencentCloudUrl=exports.dbTencentCloudUrl=exports.scfTencentCloudUrl=exports.cloudCosUploadURL=exports.get3rdCloudCodeSecret=exports.cloudAPIAgentURL=exports.GET_LATEST_VERSION=exports.UPLOAD_JS_SERVER=exports.GET_UPLOAD_SIGN=exports.GET_UPLOAD_INFO=exports.GET_PLUG_PKG_CHECK_USERVERSION=exports.GET_PLUG_PKG_GET_URL=exports.GET_PLUG_PKG_GET_LIST=exports.GET_MULTI_COS_UPLOAD_SIGN=exports.GET_MULTI_COS_UPLOAD_INFO=exports.GET_MULTI_COS_ASYNC_RESULT=exports.GET_GAME_PKG_UPLOAD_SIGN=exports.GET_GAME_PKG_UPLOAD_INFO=exports.GET_GAME_PKG_ASYNC_RESULT=exports.GAME_PKG_UPLOAD_URL=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.GAME_PKG_UPLOAD_URL=`${Domain}/wxa/ci/gamepkgupload`,exports.GET_GAME_PKG_ASYNC_RESULT=`${Domain}/wxa/ci/getgamepkgasyncresult`,exports.GET_GAME_PKG_UPLOAD_INFO=`${Domain}/wxa/ci/getgamepkguploadinfo`,exports.GET_GAME_PKG_UPLOAD_SIGN=`${Domain}/wxa/ci/getgamepkguploadsign`,exports.GET_MULTI_COS_ASYNC_RESULT=`${Domain}/wxa/ci/getmulticosasyncresult`,exports.GET_MULTI_COS_UPLOAD_INFO=`${Domain}/wxa/ci/getmulticosuploadinfo`,exports.GET_MULTI_COS_UPLOAD_SIGN=`${Domain}/wxa/ci/getmulticosuploadsign`,exports.GET_PLUG_PKG_GET_LIST=`${Domain}/wxa/ci/apkpluggetlist`,exports.GET_PLUG_PKG_GET_URL=`${Domain}/wxa/ci/apkpluggeturl`,exports.GET_PLUG_PKG_CHECK_USERVERSION=`${Domain}/wxa/ci/apkplugcheckuserversion`,exports.GET_UPLOAD_INFO=`${Domain}/wxa/ci/getuploadinfo`,exports.GET_UPLOAD_SIGN=`${Domain}/wxa/ci/getuploadsign`,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",exports.commitSourceNewFeatureURL=`${Domain}wxa-dev-new/commitsource`,exports.commitSourceURL=`${Domain}wxa-dev/commitsource`,exports.getUploadToken=`${Domain}wxa-dev/getuploadtoken`,exports.testSourceURL=`${Domain}wxa-dev/testsource`,exports.testSourceNewFeatureURL=`${Domain}wxa-dev-new/testsource`,exports.getAsyncResult=`${Domain}wxa-dev/getasyncresult`,exports.getSdkIntInfo=`${Domain}/wxa/ci/getsdkinitinfo`,exports.uploadCloudBuildResourcePack=`${Domain}/wxa/ci/uploadcloudbuildresourcepack`,exports.getCloudBuildTaskList=`${Domain}/wxa/ci/getcloudbuildtasklist`,exports.getCloudBuildPkgUrl=`${Domain}/wxa/ci/getcloudbuildpkgurl`,exports.miniappUpload=`${Domain}/wxa/ci/miniappupload`,exports.getPkgWxapkg=`${Domain}/wxa/ci/downloadpackage`,exports.downloadMiniAppPlugin=`${Domain}/wxa/ci/downloadcpfplugin`,exports.getUsedPluginVersionInfo=`${Domain}/wxa/ci/getcpfusedpluginversioninfo`;
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MiniAppJson=exports.MiniAppI18N=exports.encryptLocalFile=exports.generateFileMD5=exports.miniappBuilder=exports.iosDeviceUtils=exports.adroidDeviceUtils=exports.cosUpload=exports.escapeScript=exports.escapeQuot=exports.checkIsInSubPackage=exports.compareVersion=exports.normalizePath=exports.mkdirSync=exports.generateMD5=exports.compileTypeConfig=exports.JSON_CONTENT_ERR=exports.DefaultProjectAttr=exports.isHexColor=exports.locales=exports.proxy=exports.getWhiteExtList=exports.OriginalCompiler=exports.BaseCoreCompiler=exports.CIProject=exports.Project=exports.PreCompileProject=exports.WebProject=exports.BaseProject=exports.EFilterCode=exports.EServiceEnviroment=exports.workletVersion=exports.initServices=exports.PackOptionsHelper=exports.packOptionsHelper=exports.getHelperDeps=exports.getHelperOutputPath=exports.getHelperContent=exports.getHelperName=exports.isValidHelperFunc=exports.getBabelHelperDepMap=exports.getBabelHelperVersion=exports.getSummerPluginConfig=exports.DevtoolsProject=exports.SummerCompiler=exports.Builder=void 0;const tslib_1=require("tslib");tslib_1.__exportStar(require("./ci/index"),exports);const modules_1=require("./modules");Object.defineProperty(exports,"Builder",{enumerable:!0,get:function(){return modules_1.Builder}});const summerCompiler_1=require("./modules/corecompiler/summerCompiler");Object.defineProperty(exports,"SummerCompiler",{enumerable:!0,get:function(){return summerCompiler_1.SummerCompiler}});const devtoolsProject_1=require("./project/devtoolsProject");Object.defineProperty(exports,"DevtoolsProject",{enumerable:!0,get:function(){return devtoolsProject_1.DevtoolsProject}});const pluginconfig_1=require("./modules/corecompiler/summer/pluginconfig");Object.defineProperty(exports,"getSummerPluginConfig",{enumerable:!0,get:function(){return pluginconfig_1.getSummerPluginConfig}});const babel_helper_1=require("./utils/babel_helper");Object.defineProperty(exports,"getBabelHelperVersion",{enumerable:!0,get:function(){return babel_helper_1.getBabelHelperVersion}}),Object.defineProperty(exports,"getBabelHelperDepMap",{enumerable:!0,get:function(){return babel_helper_1.getBabelHelperDepMap}});const helper_util_1=require("./utils/helper_util");Object.defineProperty(exports,"getHelperOutputPath",{enumerable:!0,get:function(){return helper_util_1.getHelperOutputPath}}),Object.defineProperty(exports,"getHelperDeps",{enumerable:!0,get:function(){return helper_util_1.getHelperDeps}}),Object.defineProperty(exports,"isValidHelperFunc",{enumerable:!0,get:function(){return helper_util_1.isValidHelperFunc}}),Object.defineProperty(exports,"getHelperContent",{enumerable:!0,get:function(){return helper_util_1.getHelperContent}}),Object.defineProperty(exports,"getHelperName",{enumerable:!0,get:function(){return helper_util_1.getHelperName}});const packOptionsHelper_1=tslib_1.__importStar(require("./utils/packOptionsHelper"));exports.packOptionsHelper=packOptionsHelper_1.default,Object.defineProperty(exports,"PackOptionsHelper",{enumerable:!0,get:function(){return packOptionsHelper_1.PackOptionsHelper}});const baseProject_1=require("./project/baseProject");Object.defineProperty(exports,"BaseProject",{enumerable:!0,get:function(){return baseProject_1.BaseProject}});const webProject_1=require("./project/webProject");Object.defineProperty(exports,"WebProject",{enumerable:!0,get:function(){return webProject_1.WebProject}});const precompileProject_1=require("./project/advance/precompileProject");Object.defineProperty(exports,"PreCompileProject",{enumerable:!0,get:function(){return precompileProject_1.PreCompileProject}});const ciProject_1=require("./project/ciProject");Object.defineProperty(exports,"Project",{enumerable:!0,get:function(){return ciProject_1.CIProject}}),Object.defineProperty(exports,"CIProject",{enumerable:!0,get:function(){return ciProject_1.CIProject}});const baseCompiler_1=require("./modules/corecompiler/baseCompiler");Object.defineProperty(exports,"BaseCoreCompiler",{enumerable:!0,get:function(){return baseCompiler_1.BaseCoreCompiler}});const originalCompiler_1=require("./modules/corecompiler/originalCompiler");Object.defineProperty(exports,"OriginalCompiler",{enumerable:!0,get:function(){return originalCompiler_1.OriginalCompiler}});const white_ext_list_1=require("./utils/white_ext_list");Object.defineProperty(exports,"getWhiteExtList",{enumerable:!0,get:function(){return white_ext_list_1.getWhiteExtList}});const request_1=require("./utils/request");Object.defineProperty(exports,"proxy",{enumerable:!0,get:function(){return request_1.setCiProxy}});const locales_1=tslib_1.__importDefault(require("./utils/locales/locales"));exports.locales=locales_1.default;const tools_1=require("./utils/tools");Object.defineProperty(exports,"checkIsInSubPackage",{enumerable:!0,get:function(){return tools_1.checkIsInSubPackage}}),Object.defineProperty(exports,"escapeQuot",{enumerable:!0,get:function(){return tools_1.escapeQuot}}),Object.defineProperty(exports,"escapeScript",{enumerable:!0,get:function(){return tools_1.escapeScript}}),Object.defineProperty(exports,"generateMD5",{enumerable:!0,get:function(){return tools_1.generateMD5}}),Object.defineProperty(exports,"isHexColor",{enumerable:!0,get:function(){return tools_1.isHexColor}}),Object.defineProperty(exports,"mkdirSync",{enumerable:!0,get:function(){return tools_1.mkdirSync}}),Object.defineProperty(exports,"normalizePath",{enumerable:!0,get:function(){return tools_1.normalizePath}}),Object.defineProperty(exports,"compareVersion",{enumerable:!0,get:function(){return tools_1.compareVersion}});const config_1=require("./config/config");Object.defineProperty(exports,"DefaultProjectAttr",{enumerable:!0,get:function(){return config_1.DefaultProjectAttr}}),Object.defineProperty(exports,"JSON_CONTENT_ERR",{enumerable:!0,get:function(){return config_1.JSON_CONTENT_ERR}}),Object.defineProperty(exports,"compileTypeConfig",{enumerable:!0,get:function(){return config_1.compileTypeConfig}}),Object.defineProperty(exports,"EFilterCode",{enumerable:!0,get:function(){return config_1.EFilterCode}});const adroidDeviceUtils=tslib_1.__importStar(require("./modules/nativecompiler/android/device"));exports.adroidDeviceUtils=adroidDeviceUtils;const iosDeviceUtils=tslib_1.__importStar(require("./modules/nativecompiler/ios/device"));exports.iosDeviceUtils=iosDeviceUtils;const miniappBuilder=tslib_1.__importStar(require("./utils/miniapp-builder"));exports.miniappBuilder=miniappBuilder;const miniAppI18N_1=tslib_1.__importDefault(require("./utils/miniAppI18N"));exports.MiniAppI18N=miniAppI18N_1.default;const MiniAppJson=tslib_1.__importStar(require("./utils/miniappJson"));exports.MiniAppJson=MiniAppJson;const cosUpload=tslib_1.__importStar(require("./utils/cosUpload"));exports.cosUpload=cosUpload;const getservice_1=require("./services/common/getservice");Object.defineProperty(exports,"EServiceEnviroment",{enumerable:!0,get:function(){return getservice_1.EServiceEnviroment}}),Object.defineProperty(exports,"initServices",{enumerable:!0,get:function(){return getservice_1.initServices}}),exports.workletVersion=require("./utils/common").workletVersion,tslib_1.__exportStar(require("./modules/corecompiler/original"),exports);var tools_2=require("./utils/tools");Object.defineProperty(exports,"generateFileMD5",{enumerable:!0,get:function(){return tools_2.generateFileMD5}});var asyncTask_1=require("./utils/asyncTask");Object.defineProperty(exports,"encryptLocalFile",{enumerable:!0,get:function(){return asyncTask_1.encryptLocalFile}});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MiniAppJson=exports.MiniAppI18N=exports.encryptLocalFile=exports.generateFileMD5=exports.miniappBuilder=exports.iosDeviceUtils=exports.adroidDeviceUtils=exports.cosUpload=exports.escapeScript=exports.escapeQuot=exports.checkIsInSubPackage=exports.compareVersion=exports.normalizePath=exports.mkdirSync=exports.generateMD5=exports.compileTypeConfig=exports.JSON_CONTENT_ERR=exports.DefaultProjectAttr=exports.isHexColor=exports.locales=exports.proxy=exports.getWhiteExtList=exports.OriginalCompiler=exports.BaseCoreCompiler=exports.CIProject=exports.Project=exports.PreCompileProject=exports.WebProject=exports.BaseProject=exports.EFilterCode=exports.EServiceEnviroment=exports.workletVersion=exports.initServices=exports.PackOptionsHelper=exports.packOptionsHelper=exports.getHelperDeps=exports.getHelperOutputPath=exports.getHelperContent=exports.getHelperName=exports.isValidHelperFunc=exports.getBabelHelperDepMap=exports.getBabelHelperVersion=exports.getSummerPluginConfig=exports.DevtoolsProject=exports.SummerCompiler=exports.Builder=void 0;const tslib_1=require("tslib");tslib_1.__exportStar(require("./ci/index"),exports);const modules_1=require("./modules");Object.defineProperty(exports,"Builder",{enumerable:!0,get:function(){return modules_1.Builder}});const summerCompiler_1=require("./modules/corecompiler/summerCompiler");Object.defineProperty(exports,"SummerCompiler",{enumerable:!0,get:function(){return summerCompiler_1.SummerCompiler}});const devtoolsProject_1=require("./project/devtoolsProject");Object.defineProperty(exports,"DevtoolsProject",{enumerable:!0,get:function(){return devtoolsProject_1.DevtoolsProject}});const pluginconfig_1=require("./modules/corecompiler/summer/pluginconfig");Object.defineProperty(exports,"getSummerPluginConfig",{enumerable:!0,get:function(){return pluginconfig_1.getSummerPluginConfig}});const babel_helper_1=require("./utils/babel_helper");Object.defineProperty(exports,"getBabelHelperVersion",{enumerable:!0,get:function(){return babel_helper_1.getBabelHelperVersion}}),Object.defineProperty(exports,"getBabelHelperDepMap",{enumerable:!0,get:function(){return babel_helper_1.getBabelHelperDepMap}});const helper_util_1=require("./utils/helper_util");Object.defineProperty(exports,"getHelperOutputPath",{enumerable:!0,get:function(){return helper_util_1.getHelperOutputPath}}),Object.defineProperty(exports,"getHelperDeps",{enumerable:!0,get:function(){return helper_util_1.getHelperDeps}}),Object.defineProperty(exports,"isValidHelperFunc",{enumerable:!0,get:function(){return helper_util_1.isValidHelperFunc}}),Object.defineProperty(exports,"getHelperContent",{enumerable:!0,get:function(){return helper_util_1.getHelperContent}}),Object.defineProperty(exports,"getHelperName",{enumerable:!0,get:function(){return helper_util_1.getHelperName}});const packOptionsHelper_1=tslib_1.__importStar(require("./utils/packOptionsHelper"));exports.packOptionsHelper=packOptionsHelper_1.default,Object.defineProperty(exports,"PackOptionsHelper",{enumerable:!0,get:function(){return packOptionsHelper_1.PackOptionsHelper}});const baseProject_1=require("./project/baseProject");Object.defineProperty(exports,"BaseProject",{enumerable:!0,get:function(){return baseProject_1.BaseProject}});const webProject_1=require("./project/webProject");Object.defineProperty(exports,"WebProject",{enumerable:!0,get:function(){return webProject_1.WebProject}});const precompileProject_1=require("./project/advance/precompileProject");Object.defineProperty(exports,"PreCompileProject",{enumerable:!0,get:function(){return precompileProject_1.PreCompileProject}});const ciProject_1=require("./project/ciProject");Object.defineProperty(exports,"Project",{enumerable:!0,get:function(){return ciProject_1.CIProject}}),Object.defineProperty(exports,"CIProject",{enumerable:!0,get:function(){return ciProject_1.CIProject}});const baseCompiler_1=require("./modules/corecompiler/baseCompiler");Object.defineProperty(exports,"BaseCoreCompiler",{enumerable:!0,get:function(){return baseCompiler_1.BaseCoreCompiler}});const originalCompiler_1=require("./modules/corecompiler/originalCompiler");Object.defineProperty(exports,"OriginalCompiler",{enumerable:!0,get:function(){return originalCompiler_1.OriginalCompiler}});const white_ext_list_1=require("./utils/white_ext_list");Object.defineProperty(exports,"getWhiteExtList",{enumerable:!0,get:function(){return white_ext_list_1.getWhiteExtList}});const request_1=require("./utils/request");Object.defineProperty(exports,"proxy",{enumerable:!0,get:function(){return request_1.setCiProxy}});const locales_1=tslib_1.__importDefault(require("./utils/locales/locales"));exports.locales=locales_1.default;const tools_1=require("./utils/tools");Object.defineProperty(exports,"checkIsInSubPackage",{enumerable:!0,get:function(){return tools_1.checkIsInSubPackage}}),Object.defineProperty(exports,"escapeQuot",{enumerable:!0,get:function(){return tools_1.escapeQuot}}),Object.defineProperty(exports,"escapeScript",{enumerable:!0,get:function(){return tools_1.escapeScript}}),Object.defineProperty(exports,"generateMD5",{enumerable:!0,get:function(){return tools_1.generateMD5}}),Object.defineProperty(exports,"isHexColor",{enumerable:!0,get:function(){return tools_1.isHexColor}}),Object.defineProperty(exports,"mkdirSync",{enumerable:!0,get:function(){return tools_1.mkdirSync}}),Object.defineProperty(exports,"normalizePath",{enumerable:!0,get:function(){return tools_1.normalizePath}}),Object.defineProperty(exports,"compareVersion",{enumerable:!0,get:function(){return tools_1.compareVersion}});const config_1=require("./config/config");Object.defineProperty(exports,"DefaultProjectAttr",{enumerable:!0,get:function(){return config_1.DefaultProjectAttr}}),Object.defineProperty(exports,"JSON_CONTENT_ERR",{enumerable:!0,get:function(){return config_1.JSON_CONTENT_ERR}}),Object.defineProperty(exports,"compileTypeConfig",{enumerable:!0,get:function(){return config_1.compileTypeConfig}}),Object.defineProperty(exports,"EFilterCode",{enumerable:!0,get:function(){return config_1.EFilterCode}});const adroidDeviceUtils=tslib_1.__importStar(require("./modules/nativecompiler/android/device"));exports.adroidDeviceUtils=adroidDeviceUtils;const iosDeviceUtils=tslib_1.__importStar(require("./modules/nativecompiler/ios/device"));exports.iosDeviceUtils=iosDeviceUtils;const miniappBuilder=tslib_1.__importStar(require("./utils/miniapp-builder"));exports.miniappBuilder=miniappBuilder;const miniAppI18N_1=tslib_1.__importDefault(require("./utils/miniAppI18N"));exports.MiniAppI18N=miniAppI18N_1.default;const MiniAppJson=tslib_1.__importStar(require("./utils/miniappJson"));exports.MiniAppJson=MiniAppJson;const cosUpload=tslib_1.__importStar(require("./utils/cosUpload"));exports.cosUpload=cosUpload;const getservice_1=require("./services/common/getservice");Object.defineProperty(exports,"EServiceEnviroment",{enumerable:!0,get:function(){return getservice_1.EServiceEnviroment}}),Object.defineProperty(exports,"initServices",{enumerable:!0,get:function(){return getservice_1.initServices}}),(0,getservice_1.initServicesByEnv)(),exports.workletVersion=require("./utils/common").workletVersion,tslib_1.__exportStar(require("./modules/corecompiler/original"),exports);var tools_2=require("./utils/tools");Object.defineProperty(exports,"generateFileMD5",{enumerable:!0,get:function(){return tools_2.generateFileMD5}});var asyncTask_1=require("./utils/asyncTask");Object.defineProperty(exports,"encryptLocalFile",{enumerable:!0,get:function(){return asyncTask_1.encryptLocalFile}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseCoreCompiler=void 0;const tslib_1=require("tslib"),fs_1=tslib_1.__importDefault(require("fs")),path_1=tslib_1.__importDefault(require("path")),lodash_1=tslib_1.__importDefault(require("lodash")),locales_1=tslib_1.__importDefault(require("../../utils/locales/locales")),index_1=require("./original/index"),singletontask_1=require("../../utils/singletontask"),config_1=require("../../config/config");class BaseCoreCompiler{isGameType(t){return t===config_1.COMPILE_TYPE.miniGame||t===config_1.COMPILE_TYPE.miniGamePlugin}isPluginType(t){return t===config_1.COMPILE_TYPE.miniProgramPlugin||t===config_1.COMPILE_TYPE.miniGamePlugin}get projectPath(){return this.project.projectPath}get srcPath(){return this.project.srcPath||this.project.projectPath}get pluginSrcPath(){return this.project.pluginSrcPath}constructor(t){this.isSummer=!1,this.project=t}async ready(){return this._checkReadyTask||(this._checkReadyTask=new singletontask_1.SingletonTask(this.init.bind(this))),await this._checkReadyTask.getResult(!0)}watch(t){this.project.event.on("fileChange",t)}unwatch(t){this.project.event.off("fileChange",t)}compileJS(t){throw new Error("no implement compileJS")}async compileJSList(t){throw new Error("no implement compileJS")}compile(t){throw new Error("no implement compile")}clearCache(){throw new Error("no implement clearCache")}async uglifyFileNames(t,e,i){throw new Error("no implement uglifyFileNames")}async packNpm(t){var e;const i=(null===(e=this.project)||void 0===e?void 0:e.setting)||{};if(!i.packNpmManually)return await(0,index_1.packNpm)(this.project,t);if(!i.packNpmRelationList)throw new Error("project.config.json setting.packNpmRelationList 必须存在");const{projectPath:r}=this.project;for(const t of i.packNpmRelationList){if(!t.packageJsonPath||"string"!=typeof t.packageJsonPath||!t.packageJsonPath.endsWith("package.json"))throw new Error(locales_1.default.config.PACKAGE_JSON_PATH_IN_VALID.format(t.packageJsonPath));const e=path_1.default.join(r,t.packageJsonPath);if(!fs_1.default.existsSync(e))throw new Error(locales_1.default.config.NOT_FOUND.format(e));const i=path_1.default.join(r,t.packageJsonPath,"../node_modules");if(!fs_1.default.existsSync(i))throw new Error(locales_1.default.config.RELATED_NODE_MODULES_NOT_FOUND.format(e,path_1.default.join(e,"..")));const o=path_1.default.join(r,t.miniprogramNpmDistDir);if(!fs_1.default.existsSync(o))throw new Error(locales_1.default.config.NOT_FOUND.format(o))}const o=lodash_1.default.cloneDeep(i.packNpmRelationList);return o.forEach(t=>{t.packageJsonPath=path_1.default.join(r,t.packageJsonPath),t.miniprogramNpmDistDir=path_1.default.join(r,t.miniprogramNpmDistDir)}),await this.packNpmManually(o)}async packNpmManually(t){const e={miniProgramPackNum:0,otherNpmPackNum:0,warnList:[]};for(const i of t){const t=await(0,index_1.packNpmManually)(i);e.miniProgramPackNum+=t.miniProgramPackNum,e.otherNpmPackNum+=t.otherNpmPackNum,e.warnList=e.warnList.concat(t.warnList)}return e.warnList}stat(t="",e=""){return this.project.stat(t,e)}exists(t="",e=""){return this.project.exists(t,e)}excludeRoot(t=[],e=""){return e?t.map(t=>path_1.default.posix.relative(e,t)):t}excludeKeyRoot(t,e=""){if(!e)return t;const i={};let r="";for(const o in t)r=path_1.default.posix.relative(e,o),i[r]=t[o];return i}getFile(t="",e=""){return this.project.getFile(t,e)}getFileString(t="",e=""){return this.project.getFile(t,e).toString()}getMPFileWithDir(t=""){var e;const{files:i=[],dirs:r=[]}=(null===(e=this.project)||void 0===e?void 0:e.getFilesAndDirs())||{};return t=this.project.miniprogramRoot?path_1.default.posix.join(this.project.miniprogramRoot,t):t,this.excludeRoot(i.concat(r),this.project.miniprogramRoot||"")}getMPFileList(t="",e=""){return t=this.project.miniprogramRoot?path_1.default.posix.join(this.project.miniprogramRoot||"",t):t,this.excludeRoot(this.project.getFileList(t,e),this.project.miniprogramRoot||"")}getMPWXMLFileList(t=""){return this.getMPFileList(t,".wxml")}getMPWXSFileList(t=""){return this.getMPFileList(t,".wxs")}getMPJSFileList(t=""){return this.getMPFileList(t,".js")}getMPWXSSFileList(t=""){return this.getMPFileList(t,".wxss")}getMPJSONFileList(t=""){return this.getMPFileList(t,".json")}async getFiltedFileListReason(t){return[]}getPluginFileList(t="",e=""){return t=path_1.default.posix.join(this.project.pluginRoot||"",t),this.excludeRoot(this.project.getFileList(t,e),this.project.pluginRoot)}getPluginWXMLFileList(t=""){return this.getPluginFileList(t,".wxml")}getPluginWXSFileList(t=""){return this.getPluginFileList(t,".wxs")}getPluginJSFileList(t=""){return this.getPluginFileList(t,".js")}getPluginWXSSFileList(t=""){return this.getPluginFileList(t,".wxss")}getPluginJSONFileList(t=""){return this.getPluginFileList(t,".json")}isValidComponent(t="",e){const i=this.excludeRoot(this.project.getFileList(t),t),r=i.some(t=>t
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseCoreCompiler=void 0;const tslib_1=require("tslib"),fs_1=tslib_1.__importDefault(require("fs")),path_1=tslib_1.__importDefault(require("path")),lodash_1=tslib_1.__importDefault(require("lodash")),locales_1=tslib_1.__importDefault(require("../../utils/locales/locales")),index_1=require("./original/index"),singletontask_1=require("../../utils/singletontask"),config_1=require("../../config/config");class BaseCoreCompiler{isGameType(t){return t===config_1.COMPILE_TYPE.miniGame||t===config_1.COMPILE_TYPE.miniGamePlugin}isPluginType(t){return t===config_1.COMPILE_TYPE.miniProgramPlugin||t===config_1.COMPILE_TYPE.miniGamePlugin}get projectPath(){return this.project.projectPath}get srcPath(){return this.project.srcPath||this.project.projectPath}get pluginSrcPath(){return this.project.pluginSrcPath}constructor(t){this.isSummer=!1,this.project=t}async ready(){return this._checkReadyTask||(this._checkReadyTask=new singletontask_1.SingletonTask(this.init.bind(this))),await this._checkReadyTask.getResult(!0)}watch(t){this.project.event.on("fileChange",t)}unwatch(t){this.project.event.off("fileChange",t)}compileJS(t){throw new Error("no implement compileJS")}async compileJSList(t){throw new Error("no implement compileJS")}compile(t){throw new Error("no implement compile")}clearCache(){throw new Error("no implement clearCache")}async uglifyFileNames(t,e,i){throw new Error("no implement uglifyFileNames")}async packNpm(t){var e;const i=(null===(e=this.project)||void 0===e?void 0:e.setting)||{};if(!i.packNpmManually)return await(0,index_1.packNpm)(this.project,t);if(!i.packNpmRelationList)throw new Error("project.config.json setting.packNpmRelationList 必须存在");const{projectPath:r}=this.project;for(const t of i.packNpmRelationList){if(!t.packageJsonPath||"string"!=typeof t.packageJsonPath||!t.packageJsonPath.endsWith("package.json"))throw new Error(locales_1.default.config.PACKAGE_JSON_PATH_IN_VALID.format(t.packageJsonPath));const e=path_1.default.join(r,t.packageJsonPath);if(!fs_1.default.existsSync(e))throw new Error(locales_1.default.config.NOT_FOUND.format(e));const i=path_1.default.join(r,t.packageJsonPath,"../node_modules");if(!fs_1.default.existsSync(i))throw new Error(locales_1.default.config.RELATED_NODE_MODULES_NOT_FOUND.format(e,path_1.default.join(e,"..")));const o=path_1.default.join(r,t.miniprogramNpmDistDir);if(!fs_1.default.existsSync(o))throw new Error(locales_1.default.config.NOT_FOUND.format(o))}const o=lodash_1.default.cloneDeep(i.packNpmRelationList);return o.forEach((t=>{t.packageJsonPath=path_1.default.join(r,t.packageJsonPath),t.miniprogramNpmDistDir=path_1.default.join(r,t.miniprogramNpmDistDir)})),await this.packNpmManually(o)}async packNpmManually(t){const e={miniProgramPackNum:0,otherNpmPackNum:0,warnList:[]};for(const i of t){const t=await(0,index_1.packNpmManually)(i);e.miniProgramPackNum+=t.miniProgramPackNum,e.otherNpmPackNum+=t.otherNpmPackNum,e.warnList=e.warnList.concat(t.warnList)}return e.warnList}stat(t="",e=""){return this.project.stat(t,e)}exists(t="",e=""){return this.project.exists(t,e)}excludeRoot(t=[],e=""){return e?t.map((t=>path_1.default.posix.relative(e,t))):t}excludeKeyRoot(t,e=""){if(!e)return t;const i={};let r="";for(const o in t)r=path_1.default.posix.relative(e,o),i[r]=t[o];return i}getFile(t="",e=""){return this.project.getFile(t,e)}getFileString(t="",e=""){return this.project.getFile(t,e).toString()}getMPFileWithDir(t=""){var e;const{files:i=[],dirs:r=[]}=(null===(e=this.project)||void 0===e?void 0:e.getFilesAndDirs())||{};return t=this.project.miniprogramRoot?path_1.default.posix.join(this.project.miniprogramRoot,t):t,this.excludeRoot(i.concat(r),this.project.miniprogramRoot||"")}getMPFileList(t="",e=""){return t=this.project.miniprogramRoot?path_1.default.posix.join(this.project.miniprogramRoot||"",t):t,this.excludeRoot(this.project.getFileList(t,e),this.project.miniprogramRoot||"")}getMPWXMLFileList(t=""){return this.getMPFileList(t,".wxml")}getMPWXSFileList(t=""){return this.getMPFileList(t,".wxs")}getMPJSFileList(t=""){return this.getMPFileList(t,".js")}getMPWXSSFileList(t=""){return this.getMPFileList(t,".wxss")}getMPJSONFileList(t=""){return this.getMPFileList(t,".json")}async getFiltedFileListReason(t){return[]}getPluginFileList(t="",e=""){return t=path_1.default.posix.join(this.project.pluginRoot||"",t),this.excludeRoot(this.project.getFileList(t,e),this.project.pluginRoot)}getPluginWXMLFileList(t=""){return this.getPluginFileList(t,".wxml")}getPluginWXSFileList(t=""){return this.getPluginFileList(t,".wxs")}getPluginJSFileList(t=""){return this.getPluginFileList(t,".js")}getPluginWXSSFileList(t=""){return this.getPluginFileList(t,".wxss")}getPluginJSONFileList(t=""){return this.getPluginFileList(t,".json")}isValidComponent(t="",e){const i=this.excludeRoot(this.project.getFileList(t),t),r=i.some((t=>t===`${e}.json`)),o=i.some((t=>t===`${e}.wxml`)),s=i.some((t=>t===`${e}.js`||t===`${e}.ts`));return r&&o&&s}async getAllFileInfo(t=""){const e=this.project.getFileList(t),i={};for(const t of e)i[t]=await this.stat("",t)||{};return i}}exports.BaseCoreCompiler=BaseCoreCompiler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function findAllDescendant(e,n){let t;t=Array.isArray(e)?e:[e];const s=t.slice(0),o=[],a=[];for(;s.length>0;){const e=s.pop();o.push(e),e.childModules.forEach(e=>{s.indexOf(e)<0&&o.indexOf(e)<0&&(s.push(e),e.type===n&&a.push(e))})}return a}function findModsByType(e,n){var t;return(null===(t=null==e?void 0:e.graph)||void 0===t?void 0:t.modules.filter(e=>e.type===n))||[]}function findModByTypeAndPath(e,n,t){var s;return null===(s=e.graph)||void 0===s?void 0:s.modules.find(e=>e.type===n&&e.path===t)}function findPageMods(e,n){return(findModsByType(e,"Page")||[]).filter(e=>n.includes(e.path.replace(/\.json$/,"")))}function findGlobalCompMods(e){const n=findModByTypeAndPath(e,"MainPackage","app.json");return(null==n?void 0:n.childModules.filter(e=>"Component"===e.type))||[]}function getAllSubpackagePath(e){return findModsByType(e,"SubPackage").map(e=>e.path)}function innerGetSortedJSFiles(e,n){const t=new Set,s=new Set,o=new Set,a=[];for(const n of e){const e=n.findChild("Js");e&&(n.config?o.add(e.path):s.add(e.path),t.add(e.path),a.push(e))}const i=findAllDescendant(e.concat(n),"Component");for(const e of i.concat(n)){const n=e.findChild("Js");n&&(o.add(n.path),t.add(n.path),a.push(n))}const l=findAllDescendant(a,"Js");for(const e of l){const n=e.path;t.add(n)}return{allFiles:Array.from(t),pageFiles:Array.from(s),componentFiles:Array.from(o)}}function groupBySubpackage(e,n){const t=[],s={};for(const o of e){const e=n.find(e=>o.startsWith(e));e?(s[e]||(s[e]=[]),s[e].push(o)):t.push(o)}return{main:t,subs:s}}function partialGetSubPkgSortedJSFiles(e,n,t){const s=findPageMods(e,n),{allFiles:o,pageFiles:a,componentFiles:i}=innerGetSortedJSFiles(s,[]),l=getAllSubpackagePath(e);return{allFiles:groupBySubpackage(o,l).subs[t]||[],pageFiles:groupBySubpackage(a,l).subs[t]||[],componentFiles:groupBySubpackage(i,l).subs[t]||[]}}function partialGetMainPkgSortedJSFiles(e,n){const t=findPageMods(e,n),s=findGlobalCompMods(e),{allFiles:o,pageFiles:a,componentFiles:i}=innerGetSortedJSFiles(t,s);let l=!1;const p=findModByTypeAndPath(e,"Js","app.js");if(p){l=!0,o.push(p.path);const e=findAllDescendant([p],"Js");for(const n of e){const e=n.path;o.indexOf(e)<0&&o.push(e)}}const c=getAllSubpackagePath(e);return{hasAppJS:l,allFiles:groupBySubpackage(o,c).main,pageFiles:groupBySubpackage(a,c).main,componentFiles:groupBySubpackage(i,c).main}}function partialWholePkgGetSortedJSFiles(e,n){const t=findPageMods(e,n),s=findGlobalCompMods(e),{allFiles:o,pageFiles:a,componentFiles:i}=innerGetSortedJSFiles(t,s);let l=!1;const p=findModByTypeAndPath(e,"Js","app.js");if(p){l=!0,o.push(p.path);const e=findAllDescendant([p],"Js");for(const n of e){const e=n.path;o.indexOf(e)<0&&o.push(e)}}return{hasAppJS:l,allFiles:o,pageFiles:a,componentFiles:i}}function innerGetResourceFiles(e,n){let t=[];for(const s of e){const e=findAllDescendant(s,n);t=t.concat(e.map(e=>e.path))}return t}function partialGetWxmlAndWxsFiles(e,n,t){const s=findPageMods(e,n),o=findGlobalCompMods(e),a=innerGetResourceFiles(s.concat(o),"Wxml"),i=innerGetResourceFiles(s.concat(o),"Wxs"),l=getAllSubpackagePath(e),p=groupBySubpackage(a,l),c=groupBySubpackage(i,l);return{wxmlFiles:t?p.main.concat(p.subs[t]||[]):p.main,wxsFiles:t?c.main.concat(c.subs[t]||[]):c.main}}function partialGetWxssFiles(e,n,t){const s=findPageMods(e,n),o=findGlobalCompMods(e),a=innerGetResourceFiles(s.concat(o),"Wxss"),i=findModByTypeAndPath(e,"Wxss","app.wxss");if(i&&!a.includes(i.path)){a.push(i.path);const e=findAllDescendant(i,"Wxss");for(const n of e)a.includes(n.path)||a.push(n.path)}const l=groupBySubpackage(a,getAllSubpackagePath(e));return t?l.main.concat(l.subs[t]||[]):l.main}function partialGetCodeFiles(e,n){var t;const s=new Set,o=findModByTypeAndPath(e,"MainPackage","app.json");s.add("app.json");const a=new Set;function i(e){switch(a.add(e),e.type){case"Page":case"Component":case"Wxml":case"Wxss":case"Wxs":case"Js":case"Config":s.add(e.path)}for(const n of e.childModules)a.has(n)||i(n)}for(const e of null==o?void 0:o.childModules)if("Page"===e.type)n.includes(e.path.replace(/\.json$/,""))&&i(e);else if("SubPackage"===e.type)for(const t of e.childModules)n.includes(t.path.replace(/\.json$/,""))&&i(t);else i(e);return(null===(t=process.env)||void 0===t?void 0:t.isDevtools)&&console.log("[partial-compile] compile",s),Array.from(s)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.findAllDescendant=findAllDescendant,exports.partialGetSubPkgSortedJSFiles=partialGetSubPkgSortedJSFiles,exports.partialGetMainPkgSortedJSFiles=partialGetMainPkgSortedJSFiles,exports.partialWholePkgGetSortedJSFiles=partialWholePkgGetSortedJSFiles,exports.partialGetWxmlAndWxsFiles=partialGetWxmlAndWxsFiles,exports.partialGetWxssFiles=partialGetWxssFiles,exports.partialGetCodeFiles=partialGetCodeFiles;
|
|
1
|
+
"use strict";function findAllDescendant(e,n){let t;t=Array.isArray(e)?e:[e];const s=t.slice(0),o=[],a=[];for(;s.length>0;){const e=s.pop();o.push(e),e.childModules.forEach((e=>{s.indexOf(e)<0&&o.indexOf(e)<0&&(s.push(e),e.type===n&&a.push(e))}))}return a}function findModsByType(e,n){var t;return(null===(t=null==e?void 0:e.graph)||void 0===t?void 0:t.modules.filter((e=>e.type===n)))||[]}function findModByTypeAndPath(e,n,t){var s;return null===(s=e.graph)||void 0===s?void 0:s.modules.find((e=>e.type===n&&e.path===t))}function findPageMods(e,n){return(findModsByType(e,"Page")||[]).filter((e=>n.includes(e.path.replace(/\.json$/,""))))}function findGlobalCompMods(e){const n=findModByTypeAndPath(e,"MainPackage","app.json");return(null==n?void 0:n.childModules.filter((e=>"Component"===e.type)))||[]}function getAllSubpackagePath(e){return findModsByType(e,"SubPackage").map((e=>e.path))}function innerGetSortedJSFiles(e,n){const t=new Set,s=new Set,o=new Set,a=[];for(const n of e){const e=n.findChild("Js");e&&(n.config?o.add(e.path):s.add(e.path),t.add(e.path),a.push(e))}const i=findAllDescendant(e.concat(n),"Component");for(const e of i.concat(n)){const n=e.findChild("Js");n&&(o.add(n.path),t.add(n.path),a.push(n))}const l=findAllDescendant(a,"Js");for(const e of l){const n=e.path;t.add(n)}return{allFiles:Array.from(t),pageFiles:Array.from(s),componentFiles:Array.from(o)}}function groupBySubpackage(e,n){const t=[],s={};for(const o of e){const e=n.find((e=>o.startsWith(e)));e?(s[e]||(s[e]=[]),s[e].push(o)):t.push(o)}return{main:t,subs:s}}function partialGetSubPkgSortedJSFiles(e,n,t){const s=findPageMods(e,n),{allFiles:o,pageFiles:a,componentFiles:i}=innerGetSortedJSFiles(s,[]),l=getAllSubpackagePath(e);return{allFiles:groupBySubpackage(o,l).subs[t]||[],pageFiles:groupBySubpackage(a,l).subs[t]||[],componentFiles:groupBySubpackage(i,l).subs[t]||[]}}function partialGetMainPkgSortedJSFiles(e,n){const t=findPageMods(e,n),s=findGlobalCompMods(e),{allFiles:o,pageFiles:a,componentFiles:i}=innerGetSortedJSFiles(t,s);let l=!1;const p=findModByTypeAndPath(e,"Js","app.js");if(p){l=!0,o.push(p.path);const e=findAllDescendant([p],"Js");for(const n of e){const e=n.path;o.indexOf(e)<0&&o.push(e)}}const c=getAllSubpackagePath(e);return{hasAppJS:l,allFiles:groupBySubpackage(o,c).main,pageFiles:groupBySubpackage(a,c).main,componentFiles:groupBySubpackage(i,c).main}}function partialWholePkgGetSortedJSFiles(e,n){const t=findPageMods(e,n),s=findGlobalCompMods(e),{allFiles:o,pageFiles:a,componentFiles:i}=innerGetSortedJSFiles(t,s);let l=!1;const p=findModByTypeAndPath(e,"Js","app.js");if(p){l=!0,o.push(p.path);const e=findAllDescendant([p],"Js");for(const n of e){const e=n.path;o.indexOf(e)<0&&o.push(e)}}return{hasAppJS:l,allFiles:o,pageFiles:a,componentFiles:i}}function innerGetResourceFiles(e,n){let t=[];for(const s of e){const e=findAllDescendant(s,n);t=t.concat(e.map((e=>e.path)))}return t}function partialGetWxmlAndWxsFiles(e,n,t){const s=findPageMods(e,n),o=findGlobalCompMods(e),a=innerGetResourceFiles(s.concat(o),"Wxml"),i=innerGetResourceFiles(s.concat(o),"Wxs"),l=getAllSubpackagePath(e),p=groupBySubpackage(a,l),c=groupBySubpackage(i,l);return{wxmlFiles:t?p.main.concat(p.subs[t]||[]):p.main,wxsFiles:t?c.main.concat(c.subs[t]||[]):c.main}}function partialGetWxssFiles(e,n,t){const s=findPageMods(e,n),o=findGlobalCompMods(e),a=innerGetResourceFiles(s.concat(o),"Wxss"),i=findModByTypeAndPath(e,"Wxss","app.wxss");if(i&&!a.includes(i.path)){a.push(i.path);const e=findAllDescendant(i,"Wxss");for(const n of e)a.includes(n.path)||a.push(n.path)}const l=groupBySubpackage(a,getAllSubpackagePath(e));return t?l.main.concat(l.subs[t]||[]):l.main}function partialGetCodeFiles(e,n){var t;const s=new Set,o=findModByTypeAndPath(e,"MainPackage","app.json");s.add("app.json");const a=new Set;function i(e){switch(a.add(e),e.type){case"Page":case"Component":case"Wxml":case"Wxss":case"Wxs":case"Js":case"Config":s.add(e.path)}for(const n of e.childModules)a.has(n)||i(n)}for(const e of null==o?void 0:o.childModules)if("Page"===e.type)n.includes(e.path.replace(/\.json$/,""))&&i(e);else if("SubPackage"===e.type)for(const t of e.childModules)n.includes(t.path.replace(/\.json$/,""))&&i(t);else i(e);return(null===(t=process.env)||void 0===t?void 0:t.isDevtools)&&console.log("[partial-compile] compile",s),Array.from(s)}Object.defineProperty(exports,"__esModule",{value:!0}),exports.findAllDescendant=findAllDescendant,exports.partialGetSubPkgSortedJSFiles=partialGetSubPkgSortedJSFiles,exports.partialGetMainPkgSortedJSFiles=partialGetMainPkgSortedJSFiles,exports.partialWholePkgGetSortedJSFiles=partialWholePkgGetSortedJSFiles,exports.partialGetWxmlAndWxsFiles=partialGetWxmlAndWxsFiles,exports.partialGetWxssFiles=partialGetWxssFiles,exports.partialGetCodeFiles=partialGetCodeFiles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getBabelRoot=getBabelRoot,exports.isNotIgnoredByProjectConfig=isNotIgnoredByProjectConfig,exports.compileOther=compileOther,exports.compileJSFiles=compileJSFiles,exports.compileWXSSFiles=compileWXSSFiles,exports.compileWXMLFiles=compileWXMLFiles,exports.getUploadProjectConfig=getUploadProjectConfig;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),tools_1=require("../../../../utils/tools"),taskstatus_1=require("../../../../utils/taskstatus"),index_1=require("../workerThread/index"),helper_util_1=require("../../../../utils/helper_util"),projectconfig_1=require("../json/projectconfig"),game_1=tslib_1.__importDefault(require("../json/game")),signaturejson_1=require("../json/signaturejson"),config_1=require("../../../../config/config"),taskmanager_1=tslib_1.__importDefault(require("../../../../utils/taskmanager")),wxml_1=require("./handler/wxml"),wxss_1=require("./handler/wxss"),js_1=require("./handler/js");async function getBabelRoot(o){var t,e;const i=(0,projectconfig_1.getProjectConfigJSON)(o);let n=null===(e=null===(t=null==i?void 0:i.setting)||void 0===t?void 0:t.babelSetting)||void 0===e?void 0:e.outputPath;return n?(n=(0,tools_1.normalizePath)(n),n.replace(/(^[./\\])|(\/$)/g,""),n):"@babel/runtime"}function isNotIgnoredByProjectConfig(o,t,e){var i,n;const s=path_1.default.posix.relative(t,e),a=(null===(i=o.packOptions)||void 0===i?void 0:i.include)||[];if((0,tools_1.isFileIncluded)(s,a))return!0;const l=(null===(n=o.packOptions)||void 0===n?void 0:n.ignore)||[];return!(0,tools_1.isFileIgnored)(path_1.default.posix.relative(t,e),l)}async function copyFile(o,t){return{filePath:t,code:o.getFile("",t)}}async function compileOther(o,t,e){const{onProgressUpdate:i=(()=>{})}=e,n=new taskstatus_1.TaskStatus("compiling other files");i(n);const s=new taskmanager_1.default;for(const e of t)s.addTask(copyFile,o,e);const a=await s.runAllAsync(),l={};for(const o of a){const{code:t,filePath:e}=o;t&&(l[e]=t)}return n.done(),i(n),l}async function canWeCompileJS(o,t,e){let i;for(const o of t)if((0,tools_1.normalizePath)(e).startsWith((0,tools_1.normalizePath)((0,signaturejson_1.trailing)(o.fullPath,"/")))){i=o;break}if(i){return i.signature.findIndex(o=>(0,tools_1.normalizePath)(o.fullPath)===(0,tools_1.normalizePath)(e))>=0}return!0}async function compileJSFiles(o,t,e,i){const{setting:n={}}=i;let s="@babel/runtime";n.enhance&&(s=await getBabelRoot(o));const a=[];if(o.type===config_1.COMPILE_TYPE.miniGame||o.type===config_1.COMPILE_TYPE.miniGamePlugin){const n=await(0,signaturejson_1.getAllPluginSignatures)(o);for(const l of t){const t=path_1.default.join(o.projectPath,e,l);await canWeCompileJS(o,n,t)&&a.push((0,js_1.compileJS)(o,l,Object.assign(Object.assign({},i),{babelRoot:s,root:e})))}}else for(const n of t)a.push((0,js_1.compileJS)(o,n,Object.assign(Object.assign({},i),{babelRoot:s,root:e})));let l=[];try{l=await Promise.all(a)}catch(o){throw(0,index_1.abortTask)(index_1.TASK_NAME.COMPILE_JS),o}const r={},c=new Set;for(const o of l){const{filePath:t,map:i,code:n,helpers:s}=o,a=(0,tools_1.formatSourceMap)(i);void 0!==n&&(r[path_1.default.posix.normalize(path_1.default.posix.join(e,t))]=n),a&&(r[path_1.default.posix.normalize(path_1.default.posix.join(e
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getBabelRoot=getBabelRoot,exports.isNotIgnoredByProjectConfig=isNotIgnoredByProjectConfig,exports.compileOther=compileOther,exports.compileJSFiles=compileJSFiles,exports.compileWXSSFiles=compileWXSSFiles,exports.compileWXMLFiles=compileWXMLFiles,exports.getUploadProjectConfig=getUploadProjectConfig;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),tools_1=require("../../../../utils/tools"),taskstatus_1=require("../../../../utils/taskstatus"),index_1=require("../workerThread/index"),helper_util_1=require("../../../../utils/helper_util"),projectconfig_1=require("../json/projectconfig"),game_1=tslib_1.__importDefault(require("../json/game")),signaturejson_1=require("../json/signaturejson"),config_1=require("../../../../config/config"),taskmanager_1=tslib_1.__importDefault(require("../../../../utils/taskmanager")),wxml_1=require("./handler/wxml"),wxss_1=require("./handler/wxss"),js_1=require("./handler/js");async function getBabelRoot(o){var t,e;const i=(0,projectconfig_1.getProjectConfigJSON)(o);let n=null===(e=null===(t=null==i?void 0:i.setting)||void 0===t?void 0:t.babelSetting)||void 0===e?void 0:e.outputPath;return n?(n=(0,tools_1.normalizePath)(n),n.replace(/(^[./\\])|(\/$)/g,""),n):"@babel/runtime"}function isNotIgnoredByProjectConfig(o,t,e){var i,n;const s=path_1.default.posix.relative(t,e),a=(null===(i=o.packOptions)||void 0===i?void 0:i.include)||[];if((0,tools_1.isFileIncluded)(s,a))return!0;const l=(null===(n=o.packOptions)||void 0===n?void 0:n.ignore)||[];return!(0,tools_1.isFileIgnored)(path_1.default.posix.relative(t,e),l)}async function copyFile(o,t){return{filePath:t,code:o.getFile("",t)}}async function compileOther(o,t,e){const{onProgressUpdate:i=(()=>{})}=e,n=new taskstatus_1.TaskStatus("compiling other files");i(n);const s=new taskmanager_1.default;for(const e of t)s.addTask(copyFile,o,e);const a=await s.runAllAsync(),l={};for(const o of a){const{code:t,filePath:e}=o;t&&(l[e]=t)}return n.done(),i(n),l}async function canWeCompileJS(o,t,e){let i;for(const o of t)if((0,tools_1.normalizePath)(e).startsWith((0,tools_1.normalizePath)((0,signaturejson_1.trailing)(o.fullPath,"/")))){i=o;break}if(i){return i.signature.findIndex((o=>(0,tools_1.normalizePath)(o.fullPath)===(0,tools_1.normalizePath)(e)))>=0}return!0}async function compileJSFiles(o,t,e,i){const{setting:n={}}=i;let s="@babel/runtime";n.enhance&&(s=await getBabelRoot(o));const a=[];if(o.type===config_1.COMPILE_TYPE.miniGame||o.type===config_1.COMPILE_TYPE.miniGamePlugin){const n=await(0,signaturejson_1.getAllPluginSignatures)(o);for(const l of t){const t=path_1.default.join(o.projectPath,e,l);await canWeCompileJS(o,n,t)&&a.push((0,js_1.compileJS)(o,l,Object.assign(Object.assign({},i),{babelRoot:s,root:e})))}}else for(const n of t)a.push((0,js_1.compileJS)(o,n,Object.assign(Object.assign({},i),{babelRoot:s,root:e})));let l=[];try{l=await Promise.all(a)}catch(o){throw(0,index_1.abortTask)(index_1.TASK_NAME.COMPILE_JS),o}const r={},c=new Set;for(const o of l){const{filePath:t,map:i,code:n,helpers:s}=o,a=(0,tools_1.formatSourceMap)(i);void 0!==n&&(r[path_1.default.posix.normalize(path_1.default.posix.join(e,t))]=n),a&&(r[path_1.default.posix.normalize(path_1.default.posix.join(e,`${t}.map`))]=a),s.length>0&&s.forEach((o=>{c.add(o)}))}return await(0,helper_util_1.appendHelpers)(o,c,path_1.default.join(e),r),r}async function compileWXSSFiles(o,t,e,i){const n=[];for(const s of t)n.push((0,wxss_1.compileWXSS)(o,s,Object.assign(Object.assign({},i),{root:e})));let s=[];try{s=await Promise.all(n)}catch(o){throw(0,index_1.abortTask)(index_1.TASK_NAME.COMPILE_WXSS),o}const a={};for(const o of s){const{filePath:t,code:i}=o;void 0!==i&&(a[path_1.default.posix.normalize(path_1.default.posix.join(e,t))]=i)}return a}async function compileWXMLFiles(o,t,e,i){const n=[];for(const s of t)n.push((0,wxml_1.compileWXML)(o,s,Object.assign(Object.assign({},i),{root:e})));let s=[];try{s=await Promise.all(n)}catch(o){throw(0,index_1.abortTask)(index_1.TASK_NAME.MINIFY_WXML),o}const a={};for(const o of s){const{filePath:t,code:i}=o;void 0!==i&&(a[path_1.default.posix.normalize(path_1.default.posix.join(e,t))]=i)}return a}async function getUploadProjectConfig(o,t){const e={miniprogramRoot:t.miniprogramRoot,localPlugins:[]};t.pluginRoot&&(e.pluginRoot=t.pluginRoot);const i=(0,game_1.default)(o),n=(o,t="")=>{const i=e.localPlugins||[];for(const e in o)if(o.hasOwnProperty(e)&&o[e]&&"string"==typeof o[e].path){const n=o[e],s=path_1.default.posix.normalize(path_1.default.posix.join(t,n.path.replace(/\\/g,"/")).replace(/^\/+/,""));i.push({alias:e,provider:n.provider,path:s})}e.localPlugins=i};if(i.plugins){const{plugins:o}=i;n(o)}const s=i.subpackages||i.subPackages;if(Array.isArray(s))for(const o of s)(null==o?void 0:o.plugins)&&n(o.plugins,o.root||"");return e}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compile=compile;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),game_1=tslib_1.__importDefault(require("../json/game")),projectconfig_1=require("../json/projectconfig"),taskstatus_1=require("../../../../utils/taskstatus"),config_1=require("../../../../config/config"),common_1=require("../../../../utils/common"),locales_1=tslib_1.__importDefault(require("../../../../utils/locales/locales")),white_ext_list_1=require("../../../../utils/white_ext_list"),common_2=require("./common"),uglifyfilenames_1=require("../protect/uglifyfilenames");async function compileGameJSON(e,t){const{onProgressUpdate:i=(()=>{})}=t,o=new taskstatus_1.TaskStatus("game.json");i(o);const a=(0,game_1.default)(e);return o.done(),i(o),a}async function compile(e,t){var i;const o=(0,projectconfig_1.getProjectConfigJSON)(e),a=o.miniprogramRoot||"",{GameWhiteList:s}=await(0,white_ext_list_1.getWhiteExtList)(),n=e.getFileList(a,"").filter(common_2.isNotIgnoredByProjectConfig.bind(null,o,a)).filter(e=>s.has(path_1.default.posix.extname(e))),r=await compileGameJSON(e,t);e.stat(a,"game.js")||(0,common_1.throwError)({msg:locales_1.default.config.FILE_NOT_FOUND.format(path_1.default.posix.join(a,"game.js")),filePath:path_1.default.posix.join(a,"game.js"),code:config_1.FILE_NOT_FOUND});const l=n.filter(e=>".js"===path_1.default.posix.extname(e)).map(e=>path_1.default.posix.relative(a,e)),m=await(0,common_2.compileJSFiles)(e,l,a,t),_=n.filter(e=>e!==path_1.default.posix.join(a,"game.json")&&".js"!==path_1.default.posix.extname(e)),c=await(0,common_2.compileOther)(e,_,t),f=await(0,common_2.getUploadProjectConfig)(e,o);let p=Object.assign(Object.assign({},m),c);if(e.type===config_1.COMPILE_TYPE.miniGame){if(f.miniprogramRoot&&"."!==f.miniprogramRoot&&"./"!==f.miniprogramRoot){const t={};for(const i in p)t[path_1.default.posix.relative(e.miniprogramRoot,i)]=p[i];p=t}f.miniprogramRoot="",p["game.json"]=JSON.stringify(r)}else p[path_1.default.posix.join(f.miniprogramRoot||"","game.json")]=JSON.stringify(r);return f.__compileDebugInfo__=t.__compileDebugInfo__||{},p["project.config.json"]=JSON.stringify(f),delete p["project.private.config.json"],e.type===config_1.COMPILE_TYPE.miniGame&&(null===(i=t.setting)||void 0===i?void 0:i.uglifyFileName)&&(p=await(0,uglifyfilenames_1.uglifyFileNames)(e,p)),p}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compile=compile;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),game_1=tslib_1.__importDefault(require("../json/game")),projectconfig_1=require("../json/projectconfig"),taskstatus_1=require("../../../../utils/taskstatus"),config_1=require("../../../../config/config"),common_1=require("../../../../utils/common"),locales_1=tslib_1.__importDefault(require("../../../../utils/locales/locales")),white_ext_list_1=require("../../../../utils/white_ext_list"),common_2=require("./common"),uglifyfilenames_1=require("../protect/uglifyfilenames");async function compileGameJSON(e,t){const{onProgressUpdate:i=(()=>{})}=t,o=new taskstatus_1.TaskStatus("game.json");i(o);const a=(0,game_1.default)(e);return o.done(),i(o),a}async function compile(e,t){var i;const o=(0,projectconfig_1.getProjectConfigJSON)(e),a=o.miniprogramRoot||"",{GameWhiteList:s}=await(0,white_ext_list_1.getWhiteExtList)(),n=e.getFileList(a,"").filter(common_2.isNotIgnoredByProjectConfig.bind(null,o,a)).filter((e=>s.has(path_1.default.posix.extname(e)))),r=await compileGameJSON(e,t);e.stat(a,"game.js")||(0,common_1.throwError)({msg:locales_1.default.config.FILE_NOT_FOUND.format(path_1.default.posix.join(a,"game.js")),filePath:path_1.default.posix.join(a,"game.js"),code:config_1.FILE_NOT_FOUND});const l=n.filter((e=>".js"===path_1.default.posix.extname(e))).map((e=>path_1.default.posix.relative(a,e))),m=await(0,common_2.compileJSFiles)(e,l,a,t),_=n.filter((e=>e!==path_1.default.posix.join(a,"game.json")&&".js"!==path_1.default.posix.extname(e))),c=await(0,common_2.compileOther)(e,_,t),f=await(0,common_2.getUploadProjectConfig)(e,o);let p=Object.assign(Object.assign({},m),c);if(e.type===config_1.COMPILE_TYPE.miniGame){if(f.miniprogramRoot&&"."!==f.miniprogramRoot&&"./"!==f.miniprogramRoot){const t={};for(const i in p)t[path_1.default.posix.relative(e.miniprogramRoot,i)]=p[i];p=t}f.miniprogramRoot="",p["game.json"]=JSON.stringify(r)}else p[path_1.default.posix.join(f.miniprogramRoot||"","game.json")]=JSON.stringify(r);return f.__compileDebugInfo__=t.__compileDebugInfo__||{},p["project.config.json"]=JSON.stringify(f),delete p["project.private.config.json"],e.type===config_1.COMPILE_TYPE.miniGame&&(null===(i=t.setting)||void 0===i?void 0:i.uglifyFileName)&&(p=await(0,uglifyfilenames_1.uglifyFileNames)(e,p)),p}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compilePlugin=compilePlugin,exports.compile=compile;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),projectconfig_1=require("../json/projectconfig"),plugin_1=require("../json/plugin/plugin"),white_ext_list_1=require("../../../../utils/white_ext_list"),game_1=require("./game"),common_1=require("./common");async function compilePlugin(e,i){const t=(0,projectconfig_1.getProjectConfigJSON)(e),o=t.pluginRoot,{GameWhiteList:n}=await(0,white_ext_list_1.getWhiteExtList)(),l=e.getFileList(o,"").filter(common_1.isNotIgnoredByProjectConfig.bind(null,t,o)).filter(e=>n.has(path_1.default.posix.extname(e))),s=(0,plugin_1.getDevPluginJSON)(e,!1),a=l.filter(e=>".js"===path_1.default.posix.extname(e)).map(e=>path_1.default.posix.relative(o,e)),c=await(0,common_1.compileJSFiles)(e,a,o,i),p=l.filter(e=>".js"!==path_1.default.posix.extname(e)&&e!==path_1.default.posix.join(o,"plugin.json")),r=await(0,common_1.compileOther)(e,p,i);return Object.assign(Object.assign({[path_1.default.posix.join(o,"plugin.json")]:JSON.stringify(s)},c),r)}async function compile(e,i){const t=(0,projectconfig_1.getProjectConfigJSON)(e),o=await compilePlugin(e,i),n=await(0,game_1.compile)(e,i),l=await(0,common_1.getUploadProjectConfig)(e,t);return l.__compileDebugInfo__=i.__compileDebugInfo__||{},Object.assign(Object.assign(Object.assign({},o),n),{"project.config.json":JSON.stringify(l)})}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compilePlugin=compilePlugin,exports.compile=compile;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),projectconfig_1=require("../json/projectconfig"),plugin_1=require("../json/plugin/plugin"),white_ext_list_1=require("../../../../utils/white_ext_list"),game_1=require("./game"),common_1=require("./common");async function compilePlugin(e,i){const t=(0,projectconfig_1.getProjectConfigJSON)(e),o=t.pluginRoot,{GameWhiteList:n}=await(0,white_ext_list_1.getWhiteExtList)(),l=e.getFileList(o,"").filter(common_1.isNotIgnoredByProjectConfig.bind(null,t,o)).filter((e=>n.has(path_1.default.posix.extname(e)))),s=(0,plugin_1.getDevPluginJSON)(e,!1),a=l.filter((e=>".js"===path_1.default.posix.extname(e))).map((e=>path_1.default.posix.relative(o,e))),c=await(0,common_1.compileJSFiles)(e,a,o,i),p=l.filter((e=>".js"!==path_1.default.posix.extname(e)&&e!==path_1.default.posix.join(o,"plugin.json"))),r=await(0,common_1.compileOther)(e,p,i);return Object.assign(Object.assign({[path_1.default.posix.join(o,"plugin.json")]:JSON.stringify(s)},c),r)}async function compile(e,i){const t=(0,projectconfig_1.getProjectConfigJSON)(e),o=await compilePlugin(e,i),n=await(0,game_1.compile)(e,i),l=await(0,common_1.getUploadProjectConfig)(e,t);return l.__compileDebugInfo__=i.__compileDebugInfo__||{},Object.assign(Object.assign(Object.assign({},o),n),{"project.config.json":JSON.stringify(l)})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileJS=compileJS;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),taskstatus_1=require("../../../../../utils/taskstatus"),workerThread_1=require("../../workerThread"),common_1=require("../../../../../utils/common"),config_1=require("../../../../../config/config"),tools_1=require("../../../../../utils/tools"),app_1=require("../../json/app"),common_2=require("../../json/common"),projectconfig_1=require("../../json/projectconfig"),game_1=tslib_1.__importDefault(require("../../json/game")),plugin_1=require("../../json/plugin/plugin");async function formatBabelRoot(e,t,o,r){const{type:a}=e;if(a===config_1.COMPILE_TYPE.miniProgram){const t=(0,app_1.getAppJSON)(e),a=(0,common_2.checkPagePathIsInIndependentSubpackage)(t,o);a&&(r=`${a.root}/${r}`),"object"==typeof t.functionalPages&&!0===t.functionalPages.independent&&o.startsWith("functional-pages/")&&(r
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileJS=compileJS;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),taskstatus_1=require("../../../../../utils/taskstatus"),workerThread_1=require("../../workerThread"),common_1=require("../../../../../utils/common"),config_1=require("../../../../../config/config"),tools_1=require("../../../../../utils/tools"),app_1=require("../../json/app"),common_2=require("../../json/common"),projectconfig_1=require("../../json/projectconfig"),game_1=tslib_1.__importDefault(require("../../json/game")),plugin_1=require("../../json/plugin/plugin");async function formatBabelRoot(e,t,o,r){const{type:a}=e;if(a===config_1.COMPILE_TYPE.miniProgram){const t=(0,app_1.getAppJSON)(e),a=(0,common_2.checkPagePathIsInIndependentSubpackage)(t,o);a&&(r=`${a.root}/${r}`),"object"==typeof t.functionalPages&&!0===t.functionalPages.independent&&o.startsWith("functional-pages/")&&(r=`functional-pages/${r}`),"string"==typeof t.openDataContext&&o.startsWith(t.openDataContext)&&(r=`${t.openDataContext}/${r}`),t.workers&&o.startsWith((0,tools_1.getWorkersPath)(t.workers))&&(r=`${(0,tools_1.getWorkersPath)(t.workers)}/${r}`)}else if(a===config_1.COMPILE_TYPE.miniGame){const t=await(0,game_1.default)(e),a=(0,common_2.checkFilePathIsInIndependentSubpackage)(t,o);a&&(r=`${a}/${r}`),"string"==typeof t.openDataContext&&o.startsWith(t.openDataContext)&&(r=`${t.openDataContext}/${r}`),t.workers&&o.startsWith((0,tools_1.getWorkersPath)(t.workers))&&(r=`${(0,tools_1.getWorkersPath)(t.workers)}/${r}`)}else if(a===config_1.COMPILE_TYPE.miniProgramPlugin||a===config_1.COMPILE_TYPE.miniGamePlugin){const t=await(0,plugin_1.getDevPluginJSON)(e);"string"==typeof t.workers&&o.startsWith(t.workers)&&(r=`${t.workers}/${r}`)}return(0,tools_1.normalizePath)(`${r}`)}async function compileJS(e,t,o){var r,a;const{setting:n={},onProgressUpdate:i=(()=>{}),root:s="",devToolsCompileCache:l}=o,c=path_1.default.posix.join(s,t);let g=[],u=o.babelRoot||"@babel/runtime";if(n.enhance){const o=await(0,projectconfig_1.getProjectConfigJSON)(e);g=(null===(a=null===(r=o.setting)||void 0===r?void 0:r.babelSetting)||void 0===a?void 0:a.ignore)||[],u=await formatBabelRoot(e,s,t,u)}const p=new taskstatus_1.TaskStatus(t),_=o.sourceCode?o.sourceCode:await e.getFile(s,t);async function f(){const o=await(0,workerThread_1.runTask)(workerThread_1.TASK_NAME.COMPILE_JS,{projectPath:e.projectPath,root:s,filePath:t,setting:n,code:_,babelRoot:u,babelIgnore:g},(e=>{e===workerThread_1.ETaskStatus.progress?i(p):e===workerThread_1.ETaskStatus.done&&(p.done(),i(p))}));return o.error&&(0,common_1.throwError)({msg:o.error.message,code:o.error.code,filePath:c}),o}let m={};if(l){const o=(0,tools_1.normalizePath)(path_1.default.posix.join(e.projectPath,s,t)),r=`${o}_${JSON.stringify(n)}`;m=await l.getFile(o,r),m&&!n.uglifyFileName||(m=await f(),l.setFile(o,m,r))}else m=await f();return Object.assign({filePath:t},m)}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addSkylineRendererToComponents=addSkylineRendererToComponents,exports.compileJSON=compileJSON;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),app_1=require("../../json/app"),extJSON_1=require("../../json/app/extJSON"),common_1=require("../../../../../utils/common"),getPageJSON_1=require("../../json/page/getPageJSON"),taskstatus_1=require("../../../../../utils/taskstatus"),projectconfig_1=require("../../json/projectconfig"),common_2=require("../common");function addSkylineRendererToComponents(e,t){const n=new Set,o=new Set;function s(e,t){Object.values(t.usingComponents||{}).forEach(t=>{const s=t.startsWith("/")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addSkylineRendererToComponents=addSkylineRendererToComponents,exports.compileJSON=compileJSON;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),app_1=require("../../json/app"),extJSON_1=require("../../json/app/extJSON"),common_1=require("../../../../../utils/common"),getPageJSON_1=require("../../json/page/getPageJSON"),taskstatus_1=require("../../../../../utils/taskstatus"),projectconfig_1=require("../../json/projectconfig"),common_2=require("../common");function addSkylineRendererToComponents(e,t){const n=new Set,o=new Set;function s(e,t){Object.values(t.usingComponents||{}).forEach((t=>{const s=t.startsWith("/")?`${t.substring(1)}.json`:path_1.default.posix.join(path_1.default.posix.dirname(e),`${t}.json`);n.has(s)||o.add(s)})),Object.values(t.componentGenerics||{}).forEach((t=>{if("object"==typeof t&&"string"==typeof t.default){const s=t.default.startsWith("/")?`${t.default.substring(1)}.json`:path_1.default.posix.join(path_1.default.posix.dirname(e),`${t.default}.json`);n.has(s)||o.add(s)}}))}for(const t of Object.keys(e)){const n=JSON.parse(e[t]);"skyline"===n.renderer&&s(t,n)}for(;o.size>0;){const e=o.values().next().value;if(e&&(o.delete(e),n.add(e),t[e]&&"string"==typeof t[e])){const n=JSON.parse(t[e]);if("xr-frame"===n.renderer)continue;if("webview"===n.renderer)throw new Error(`The component (${e}) is configured with renderer: 'webview', but is used in skyline pages`);n.renderer="skyline",t[e]=JSON.stringify(n),s(e,n)}}}async function compilePageJSON(e,t,n,o){const{onProgressUpdate:s=(()=>{})}=o,a={};for(const i of t){const t=new taskstatus_1.TaskStatus(i);s(t);const r=await(o.disableSpreadingUsingComponents?getPageJSON_1.getPageJSONWithDisableSpreading:getPageJSON_1.getPageJSON)(e,{miniprogramRoot:n,pagePath:i});a[path_1.default.posix.join(n,`${i}.json`)]=JSON.stringify(Object.assign(Object.assign({},r),{__warning__:void 0})),t.done(),s(t)}return a}async function compileJSON(e,t){const{onProgressUpdate:n=(()=>{})}=t,o=(0,projectconfig_1.getProjectConfigJSON)(e),{miniprogramRoot:s=""}=o;let a=new taskstatus_1.TaskStatus("app.json");n(a);const i=(0,app_1.getAppJSON)(e);let r;a.done(),n(a);const p=await e.attr();(null==p?void 0:p.platform)&&(a=new taskstatus_1.TaskStatus("ext.json"),n(a),r=await(0,extJSON_1.getExtJSON)(e),a.done(),n(a));const c=(0,common_1.getAllPages)(i),l=await compilePageJSON(e,c,s,t),d=new Set(["app.json","ext.json"].concat(c.map((e=>`${e}.json`)))),g=(0,common_1.getAllTargetTypeFilesWithOtherTypeFilesOfSameName)(e,".json",[".wxml",".js"],s).filter(common_2.isNotIgnoredByProjectConfig.bind(null,o,s)).filter((e=>{const t=path_1.default.posix.relative(s,e);return!d.has(t)})).map((e=>path_1.default.posix.relative(s,e).replace(/\.json$/,""))),u=await compilePageJSON(e,g,s,t);g.forEach((e=>d.add(`${e}.json`))),addSkylineRendererToComponents(l,u);const f=e.getFileList(s,".json").filter(common_2.isNotIgnoredByProjectConfig.bind(null,o,s)).filter((e=>{const t=path_1.default.posix.relative(s,e);return!d.has(t)})),m=await(0,common_2.compileOther)(e,f,t),_=Object.assign(Object.assign(Object.assign({[path_1.default.posix.join(s,"app.json")]:JSON.stringify(Object.assign(Object.assign({},i),{__warning__:void 0}))},l),u),m);return r&&(_[path_1.default.posix.join(s,"ext.json")]=JSON.stringify(r)),_}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileWXML=compileWXML;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),tools_1=require("../../../../../utils/tools"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),config_1=require("../../../../../config/config"),taskstatus_1=require("../../../../../utils/taskstatus"),workerThread_1=require("../../workerThread"),common_1=require("../../../../../utils/common");async function compileWXML(e,r,o){const{root:t="",setting:s={},onProgressUpdate:a=(()=>{})}=o,{minifyWXML:i}=s,l=new taskstatus_1.TaskStatus(r),c=path_1.default.posix.join(t,r),n=await e.getFile(t,r);if(!i){a(l);const e=(0,tools_1.bufferToUtf8String)(n);return void 0===e&&(0,common_1.throwError)({msg:locales_1.default.config.FILE_NOT_UTF8.format(c),code:config_1.FILE_NOT_UTF8,filePath:c}),l.done(),a(l),{filePath:r,code:e.replace(/\r\n/g,"\n")}}const _=await(0,workerThread_1.runTask)(workerThread_1.TASK_NAME.MINIFY_WXML,{projectPath:e.projectPath,root:t,filePath:r,setting:s,code:n},e=>{e===workerThread_1.ETaskStatus.progress?a(l):e===workerThread_1.ETaskStatus.done&&(l.done(),a(l))});return _.error&&(0,common_1.throwError)({msg:_.error.message,code:_.error.code,filePath:c}),{filePath:r,code:_.code.replace(/\r\n/g,"\n")}}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileWXML=compileWXML;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),tools_1=require("../../../../../utils/tools"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),config_1=require("../../../../../config/config"),taskstatus_1=require("../../../../../utils/taskstatus"),workerThread_1=require("../../workerThread"),common_1=require("../../../../../utils/common");async function compileWXML(e,r,o){const{root:t="",setting:s={},onProgressUpdate:a=(()=>{})}=o,{minifyWXML:i}=s,l=new taskstatus_1.TaskStatus(r),c=path_1.default.posix.join(t,r),n=await e.getFile(t,r);if(!i){a(l);const e=(0,tools_1.bufferToUtf8String)(n);return void 0===e&&(0,common_1.throwError)({msg:locales_1.default.config.FILE_NOT_UTF8.format(c),code:config_1.FILE_NOT_UTF8,filePath:c}),l.done(),a(l),{filePath:r,code:e.replace(/\r\n/g,"\n")}}const _=await(0,workerThread_1.runTask)(workerThread_1.TASK_NAME.MINIFY_WXML,{projectPath:e.projectPath,root:t,filePath:r,setting:s,code:n},(e=>{e===workerThread_1.ETaskStatus.progress?a(l):e===workerThread_1.ETaskStatus.done&&(l.done(),a(l))}));return _.error&&(0,common_1.throwError)({msg:_.error.message,code:_.error.code,filePath:c}),{filePath:r,code:_.code.replace(/\r\n/g,"\n")}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileWXSS=compileWXSS;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),tools_1=require("../../../../../utils/tools"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),config_1=require("../../../../../config/config"),taskstatus_1=require("../../../../../utils/taskstatus"),workerThread_1=require("../../workerThread"),common_1=require("../../../../../utils/common");async function compileWXSS(e,t,o){const{root:r="",setting:s={},onProgressUpdate:i=(()=>{}),devToolsCompileCache:a}=o,{minifyWXSS:l,postcss:c}=s,n=new taskstatus_1.TaskStatus(t),_=path_1.default.posix.join(r,t),u=await e.getFile(r,t);if(!l&&!c){i(n);const e=(0,tools_1.bufferToUtf8String)(u);return void 0===e&&(0,common_1.throwError)({msg:locales_1.default.config.FILE_NOT_UTF8.format(_),code:config_1.FILE_NOT_UTF8,filePath:_}),n.done(),i(n),{filePath:t,code:e}}async function f(){const o=await(0,workerThread_1.runTask)(workerThread_1.TASK_NAME.COMPILE_WXSS,{projectPath:e.projectPath,root:r,filePath:t,setting:s,code:u},e=>{e===workerThread_1.ETaskStatus.progress?i(n):e===workerThread_1.ETaskStatus.done&&(n.done(),i(n))});return o.error&&(0,common_1.throwError)({msg:o.error.message,code:o.error.code,filePath:_}),o.code}let d="";if(a){const o=(0,tools_1.normalizePath)(path_1.default.posix.join(e.projectPath,r,t)),i=`${o}_${JSON.stringify(s)}`;d=await a.getFile(o,i),d&&!s.uglifyFileName||(d=await f(),a.setFile(o,d,i))}else d=await f();return{filePath:t,code:d}}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compileWXSS=compileWXSS;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),tools_1=require("../../../../../utils/tools"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),config_1=require("../../../../../config/config"),taskstatus_1=require("../../../../../utils/taskstatus"),workerThread_1=require("../../workerThread"),common_1=require("../../../../../utils/common");async function compileWXSS(e,t,o){const{root:r="",setting:s={},onProgressUpdate:i=(()=>{}),devToolsCompileCache:a}=o,{minifyWXSS:l,postcss:c}=s,n=new taskstatus_1.TaskStatus(t),_=path_1.default.posix.join(r,t),u=await e.getFile(r,t);if(!l&&!c){i(n);const e=(0,tools_1.bufferToUtf8String)(u);return void 0===e&&(0,common_1.throwError)({msg:locales_1.default.config.FILE_NOT_UTF8.format(_),code:config_1.FILE_NOT_UTF8,filePath:_}),n.done(),i(n),{filePath:t,code:e}}async function f(){const o=await(0,workerThread_1.runTask)(workerThread_1.TASK_NAME.COMPILE_WXSS,{projectPath:e.projectPath,root:r,filePath:t,setting:s,code:u},(e=>{e===workerThread_1.ETaskStatus.progress?i(n):e===workerThread_1.ETaskStatus.done&&(n.done(),i(n))}));return o.error&&(0,common_1.throwError)({msg:o.error.message,code:o.error.code,filePath:_}),o.code}let d="";if(a){const o=(0,tools_1.normalizePath)(path_1.default.posix.join(e.projectPath,r,t)),i=`${o}_${JSON.stringify(s)}`;d=await a.getFile(o,i),d&&!s.uglifyFileName||(d=await f(),a.setFile(o,d,i))}else d=await f();return{filePath:t,code:d}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compile=compile;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=tslib_1.__importDefault(require("lodash")),white_ext_list_1=require("../../../../utils/white_ext_list"),config_1=require("../../../../config/config"),projectconfig_1=require("../json/projectconfig"),partial_1=require("../analyse/partial"),summer=tslib_1.__importStar(require("../../summer")),mpjson_1=require("./handler/mpjson"),common_1=require("./common"),uglifyfilenames_1=require("../protect/uglifyfilenames");async function compile(e,i){var t,o,a,l;const s=(0,projectconfig_1.getProjectConfigJSON)(e);if(null===(t=s.setting)||void 0===t?void 0:t.useCompilerPlugins)return summer.compile(e,s,i,s.setting.useCompilerPlugins);const r=s.miniprogramRoot||"",{MiniProgramWhiteList:n}=await(0,white_ext_list_1.getWhiteExtList)();let p=e.getFileList(r,"").filter(common_1.isNotIgnoredByProjectConfig.bind(null,s,r)).filter(e=>n.has(path_1.default.posix.extname(e)));if((null===(o=i.compilePages)||void 0===o?void 0:o.length)&&i.analyzer){const e=(0,partial_1.partialGetCodeFiles)(i.analyzer,i.compilePages).map(e=>path_1.default.posix.join(r,e)),t=p.filter(e=>{const i=path_1.default.posix.extname(e);return".js"!==i&&".json"!==i&&".wxss"!==i&&".wxml"!==i});p=t.concat(e)}let m=!1,c=await(0,mpjson_1.compileJSON)(e,i);if((null===(a=i.compilePages)||void 0===a?void 0:a.length)&&i.analyzer){const e=JSON.parse(c[path_1.default.posix.join(r,"app.json")]);e.pages=e.pages.filter(e=>{var t;return null===(t=i.compilePages)||void 0===t?void 0:t.includes(e)}),0===e.pages.length&&(e.pages=["partialcompileplaceholder"],m=!0),e.subPackages&&(e.subPackages.forEach(e=>{e.pages=e.pages.filter(t=>{var o;return null===(o=i.compilePages)||void 0===o?void 0:o.includes(e.root+t)})}),e.subPackages=e.subPackages.filter(e=>e.pages.length>0)),c[path_1.default.posix.join(r,"app.json")]=JSON.stringify(e),c=lodash_1.default.pick(c,Object.keys(c).filter(e=>c[e]instanceof Buffer||p.includes(e)))}const _=p.filter(e=>".js"===path_1.default.posix.extname(e)).map(e=>path_1.default.posix.relative(r,e)),u=await(0,common_1.compileJSFiles)(e,_,r,i),f=p.filter(e=>".wxss"===path_1.default.posix.extname(e)).map(e=>path_1.default.posix.relative(r,e)),g=await(0,common_1.compileWXSSFiles)(e,f,r,i),d=p.filter(e=>".wxml"===path_1.default.posix.extname(e)).map(e=>path_1.default.posix.relative(r,e)),h=await(0,common_1.compileWXMLFiles)(e,d,r,i),j=p.filter(e=>{const i=path_1.default.posix.extname(e);return".js"!==i&&".json"!==i&&".wxss"!==i&&".wxml"!==i}),x=await(0,common_1.compileOther)(e,j,i);let v=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),u),x),g),h);if(m&&(v[path_1.default.posix.join(r,"partialcompileplaceholder.js")]||(v[path_1.default.posix.join(r,"partialcompileplaceholder.js")]=""),v[path_1.default.posix.join(r,"partialcompileplaceholder.wxml")]||(v[path_1.default.posix.join(r,"partialcompileplaceholder.wxml")]="")),e.type===config_1.COMPILE_TYPE.miniProgram){if(s.miniprogramRoot&&"."!==s.miniprogramRoot&&"./"!==s.miniprogramRoot){const i={};for(const t in v)i[path_1.default.posix.relative(e.miniprogramRoot,t)]=v[t];v=i}v["project.config.json"]=JSON.stringify({miniprogramRoot:"",__compileDebugInfo__:i.__compileDebugInfo__||{}}),delete v["project.private.config.json"]}else v["project.config.json"]=JSON.stringify({miniprogramRoot:e.miniprogramRoot||"",__compileDebugInfo__:i.__compileDebugInfo__||{}}),delete v["project.private.config.json"];return e.type===config_1.COMPILE_TYPE.miniProgram&&(null===(l=i.setting)||void 0===l?void 0:l.uglifyFileName)&&(v=await(0,uglifyfilenames_1.uglifyFileNames)(e,v)),v}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compile=compile;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=tslib_1.__importDefault(require("lodash")),white_ext_list_1=require("../../../../utils/white_ext_list"),config_1=require("../../../../config/config"),projectconfig_1=require("../json/projectconfig"),partial_1=require("../analyse/partial"),summer=tslib_1.__importStar(require("../../summer")),mpjson_1=require("./handler/mpjson"),common_1=require("./common"),uglifyfilenames_1=require("../protect/uglifyfilenames");async function compile(e,i){var t,o,a,l;const s=(0,projectconfig_1.getProjectConfigJSON)(e);if(null===(t=s.setting)||void 0===t?void 0:t.useCompilerPlugins)return summer.compile(e,s,i,s.setting.useCompilerPlugins);const r=s.miniprogramRoot||"",{MiniProgramWhiteList:n}=await(0,white_ext_list_1.getWhiteExtList)();let p=e.getFileList(r,"").filter(common_1.isNotIgnoredByProjectConfig.bind(null,s,r)).filter((e=>n.has(path_1.default.posix.extname(e))));if((null===(o=i.compilePages)||void 0===o?void 0:o.length)&&i.analyzer){const e=(0,partial_1.partialGetCodeFiles)(i.analyzer,i.compilePages).map((e=>path_1.default.posix.join(r,e))),t=p.filter((e=>{const i=path_1.default.posix.extname(e);return".js"!==i&&".json"!==i&&".wxss"!==i&&".wxml"!==i}));p=t.concat(e)}let m=!1,c=await(0,mpjson_1.compileJSON)(e,i);if((null===(a=i.compilePages)||void 0===a?void 0:a.length)&&i.analyzer){const e=JSON.parse(c[path_1.default.posix.join(r,"app.json")]);e.pages=e.pages.filter((e=>{var t;return null===(t=i.compilePages)||void 0===t?void 0:t.includes(e)})),0===e.pages.length&&(e.pages=["partialcompileplaceholder"],m=!0),e.subPackages&&(e.subPackages.forEach((e=>{e.pages=e.pages.filter((t=>{var o;return null===(o=i.compilePages)||void 0===o?void 0:o.includes(e.root+t)}))})),e.subPackages=e.subPackages.filter((e=>e.pages.length>0))),c[path_1.default.posix.join(r,"app.json")]=JSON.stringify(e),c=lodash_1.default.pick(c,Object.keys(c).filter((e=>c[e]instanceof Buffer||p.includes(e))))}const _=p.filter((e=>".js"===path_1.default.posix.extname(e))).map((e=>path_1.default.posix.relative(r,e))),u=await(0,common_1.compileJSFiles)(e,_,r,i),f=p.filter((e=>".wxss"===path_1.default.posix.extname(e))).map((e=>path_1.default.posix.relative(r,e))),g=await(0,common_1.compileWXSSFiles)(e,f,r,i),d=p.filter((e=>".wxml"===path_1.default.posix.extname(e))).map((e=>path_1.default.posix.relative(r,e))),h=await(0,common_1.compileWXMLFiles)(e,d,r,i),j=p.filter((e=>{const i=path_1.default.posix.extname(e);return".js"!==i&&".json"!==i&&".wxss"!==i&&".wxml"!==i})),x=await(0,common_1.compileOther)(e,j,i);let v=Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},c),u),x),g),h);if(m&&(v[path_1.default.posix.join(r,"partialcompileplaceholder.js")]||(v[path_1.default.posix.join(r,"partialcompileplaceholder.js")]=""),v[path_1.default.posix.join(r,"partialcompileplaceholder.wxml")]||(v[path_1.default.posix.join(r,"partialcompileplaceholder.wxml")]="")),e.type===config_1.COMPILE_TYPE.miniProgram){if(s.miniprogramRoot&&"."!==s.miniprogramRoot&&"./"!==s.miniprogramRoot){const i={};for(const t in v)i[path_1.default.posix.relative(e.miniprogramRoot,t)]=v[t];v=i}v["project.config.json"]=JSON.stringify({miniprogramRoot:"",__compileDebugInfo__:i.__compileDebugInfo__||{}}),delete v["project.private.config.json"]}else v["project.config.json"]=JSON.stringify({miniprogramRoot:e.miniprogramRoot||"",__compileDebugInfo__:i.__compileDebugInfo__||{}}),delete v["project.private.config.json"];return e.type===config_1.COMPILE_TYPE.miniProgram&&(null===(l=i.setting)||void 0===l?void 0:l.uglifyFileName)&&(v=await(0,uglifyfilenames_1.uglifyFileNames)(e,v)),v}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compilePlugin=compilePlugin,exports.compile=compile;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),plugin_1=require("../json/plugin/plugin"),pluginPage_1=require("../json/plugin/pluginPage"),white_ext_list_1=require("../../../../utils/white_ext_list"),projectconfig_1=require("../json/projectconfig"),summer=tslib_1.__importStar(require("../../summer")),common_1=require("./common"),miniprogram_1=require("./miniprogram");async function compilePlugin(i,e){const t=await(0,projectconfig_1.getProjectConfigJSON)(i),{MiniProgramWhiteList:o}=await(0,white_ext_list_1.getWhiteExtList)(),n=t.pluginRoot,s=i.getFileList(n,"").filter(common_1.isNotIgnoredByProjectConfig.bind(null,t,n)).filter(i=>o.has(path_1.default.posix.extname(i))),a=await(0,plugin_1.getDevPluginJSON)(i,!1),l=s.filter(i=>".json"===path_1.default.posix.extname(i)&&i!==path_1.default.posix.join(n,"plugin.json")),r={};for(const e of l){const t=await(0,pluginPage_1.getPluginPageJSON)({project:i,root:n,filePath:e});r[e]=JSON.stringify(t)}const p=s.filter(i=>".js"===path_1.default.posix.extname(i)).map(i=>path_1.default.posix.relative(n,i)),g=await(0,common_1.compileJSFiles)(i,p,n,e),m=s.filter(i=>".wxss"===path_1.default.posix.extname(i)).map(i=>path_1.default.posix.relative(n,i)),u=await(0,common_1.compileWXSSFiles)(i,m,n,e),c=s.filter(i=>".wxml"===path_1.default.posix.extname(i)).map(i=>path_1.default.posix.relative(n,i)),_=await(0,common_1.compileWXMLFiles)(i,c,n,e),f=s.filter(i=>{const e=path_1.default.posix.extname(i);return".js"!==e&&".json"!==e&&".wxss"!==e&&".wxml"!==e}),j=await(0,common_1.compileOther)(i,f,e);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[path_1.default.posix.join(n,"plugin.json")]:JSON.stringify(a)},r),g),j),u),_)}async function compile(i,e){var t;const o=await(0,projectconfig_1.getProjectConfigJSON)(i);if(null===(t=o.setting)||void 0===t?void 0:t.useCompilerPlugins)return summer.compile(i,o,e,o.setting.useCompilerPlugins);const n=await compilePlugin(i,e),s=await(0,miniprogram_1.compile)(i,e);return Object.assign(Object.assign(Object.assign({},n),s),{"project.config.json":JSON.stringify({miniprogramRoot:o.miniprogramRoot,pluginRoot:o.pluginRoot,__compileDebugInfo__:e.__compileDebugInfo__||{}})})}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compilePlugin=compilePlugin,exports.compile=compile;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),plugin_1=require("../json/plugin/plugin"),pluginPage_1=require("../json/plugin/pluginPage"),white_ext_list_1=require("../../../../utils/white_ext_list"),projectconfig_1=require("../json/projectconfig"),summer=tslib_1.__importStar(require("../../summer")),common_1=require("./common"),miniprogram_1=require("./miniprogram");async function compilePlugin(i,e){const t=await(0,projectconfig_1.getProjectConfigJSON)(i),{MiniProgramWhiteList:o}=await(0,white_ext_list_1.getWhiteExtList)(),n=t.pluginRoot,s=i.getFileList(n,"").filter(common_1.isNotIgnoredByProjectConfig.bind(null,t,n)).filter((i=>o.has(path_1.default.posix.extname(i)))),a=await(0,plugin_1.getDevPluginJSON)(i,!1),l=s.filter((i=>".json"===path_1.default.posix.extname(i)&&i!==path_1.default.posix.join(n,"plugin.json"))),r={};for(const e of l){const t=await(0,pluginPage_1.getPluginPageJSON)({project:i,root:n,filePath:e});r[e]=JSON.stringify(t)}const p=s.filter((i=>".js"===path_1.default.posix.extname(i))).map((i=>path_1.default.posix.relative(n,i))),g=await(0,common_1.compileJSFiles)(i,p,n,e),m=s.filter((i=>".wxss"===path_1.default.posix.extname(i))).map((i=>path_1.default.posix.relative(n,i))),u=await(0,common_1.compileWXSSFiles)(i,m,n,e),c=s.filter((i=>".wxml"===path_1.default.posix.extname(i))).map((i=>path_1.default.posix.relative(n,i))),_=await(0,common_1.compileWXMLFiles)(i,c,n,e),f=s.filter((i=>{const e=path_1.default.posix.extname(i);return".js"!==e&&".json"!==e&&".wxss"!==e&&".wxml"!==e})),j=await(0,common_1.compileOther)(i,f,e);return Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({[path_1.default.posix.join(n,"plugin.json")]:JSON.stringify(a)},r),g),j),u),_)}async function compile(i,e){var t;const o=await(0,projectconfig_1.getProjectConfigJSON)(i);if(null===(t=o.setting)||void 0===t?void 0:t.useCompilerPlugins)return summer.compile(i,o,e,o.setting.useCompilerPlugins);const n=await compilePlugin(i,e),s=await(0,miniprogram_1.compile)(i,e);return Object.assign(Object.assign(Object.assign({},n),s),{"project.config.json":JSON.stringify({miniprogramRoot:o.miniprogramRoot,pluginRoot:o.pluginRoot,__compileDebugInfo__:e.__compileDebugInfo__||{}})})}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const config_1=require("../../../../config/config"),babel_helper_1=require("../../../../utils/babel_helper"),_transformRuntimeCustom=()=>require("../../../../utils/babel_transform_plugin"),_pluginTransformWorklet=()=>require("../../../../utils/babel_plugin_worklet"),babel7=()=>require("@babel/core"),_pluginTransformRuntime=()=>require("@babel/plugin-transform-runtime"),_pluginTransformModulesCommonjs=()=>require("@babel/plugin-transform-modules-commonjs"),_presetEnv=()=>require("@babel/preset-env");function getPluginsList(e){const r=[[
|
|
1
|
+
"use strict";const config_1=require("../../../../config/config"),babel_helper_1=require("../../../../utils/babel_helper"),_transformRuntimeCustom=()=>require("../../../../utils/babel_transform_plugin"),_pluginTransformWorklet=()=>require("../../../../utils/babel_plugin_worklet"),babel7=()=>require("@babel/core"),_pluginTransformRuntime=()=>require("@babel/plugin-transform-runtime"),_pluginTransformModulesCommonjs=()=>require("@babel/plugin-transform-modules-commonjs"),_presetEnv=()=>require("@babel/preset-env");function getPluginsList(e){const r=[[_transformRuntimeCustom()],[_pluginTransformRuntime(),{corejs:!1,helpers:!0,regenerator:!e.hasRegenerator,version:"7.21.0"}]].concat((0,babel_helper_1.getCustomPlugins)([]));return r.push([_pluginTransformModulesCommonjs(),{allowTopLevelThis:e.disableUseStrict,importInterop:e=>e.startsWith("@babel/runtime/helpers/")?"node":"babel"}]),e.supportWorklet&&r.push([_pluginTransformWorklet()]),r}const enhance=e=>{const{code:r,babelRoot:s,filePath:t,inputSourceMap:l}=e,o=r,n=/regeneratorRuntime\.mark/.test(r),i=e.disableUseStrict||/^\s*\/\/\s?use strict disable;/i.test(r),u=o.includes('"worklet"')||o.includes("'worklet'");let a=null;try{a=babel7().transform(r,{presets:[[_presetEnv(),{targets:{chrome:53,ios:8},include:["@babel/plugin-transform-computed-properties"]}]],babelrc:!1,plugins:getPluginsList({hasRegenerator:n,disableUseStrict:i,supportWorklet:u}),sourceFileName:t,inputSourceMap:l,sourceMaps:!0,configFile:!1})}catch(e){return{error:{message:`file: ${t}\n ${e.message}`,code:config_1.BABEL_TRANS_JS_ERR}}}let p=(null==a?void 0:a.code)||r;const c=(null==a?void 0:a.map)||l;i&&(p=p.replace(/^"use strict";/,""));const b=(0,babel_helper_1.collectBabelHelpers)(o),{transformCode:m,helpers:g}=(0,babel_helper_1.replaceBabelHelpers)(p,b,t,s);return p=m,{code:p,map:c,helpers:g||[]}};module.exports=enhance;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const config_1=require("../../../../config/config"),_babelCodeFrame=()=>require("babel-code-frame"),_babel=()=>require("babel-core"),es6Compile=e=>{const{code:r,filePath:o,inputSourceMap:c}=e;try{const e=
|
|
1
|
+
"use strict";const config_1=require("../../../../config/config"),_babelCodeFrame=()=>require("babel-code-frame"),_babel=()=>require("babel-core"),es6Compile=e=>{const{code:r,filePath:o,inputSourceMap:c}=e;try{const e=_babel().transform(r,{presets:["babel-preset-es2015","babel-preset-stage-0"].map((e=>require.resolve(e))),babelrc:!1,sourceFileName:o,filename:o,inputSourceMap:c,sourceMaps:!0});return{code:e.code,map:e.map}}catch(e){if(e.loc){return{error:{message:`file: ${o}\n ${e.message}\n ${_babelCodeFrame()(r,e.loc.line,e.loc.column>0?e.loc.column:1)}`,code:config_1.BABEL_TRANS_JS_ERR}}}return{error:{message:`${e}`,code:config_1.BABEL_TRANS_JS_ERR}}}};module.exports=es6Compile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const babel7=()=>require("@babel/core"),generateMap=(e,r)=>{let a
|
|
1
|
+
"use strict";const babel7=()=>require("@babel/core"),generateMap=(e,r)=>{let a;try{if(a=babel7().transform(r,{presets:[],babelrc:!1,sourceFileName:e,sourceMaps:!0,configFile:!1}),null==a?void 0:a.map)return Object.assign(Object.assign({},a.map),{version:`${null==a?void 0:a.map.version}`})}catch(e){}};module.exports=generateMap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const config_1=require("../../../../config/config"),_Terser=()=>require("terser"),_UglifyJS=()=>require("uglify-js"),_babelCodeFrame=()=>require("babel-code-frame"),minify=e=>{const{code:r,inputSourceMap:o,useTerser:i,filePath:n}=e;let c;const s=o?{includeSources:!0,content:o,filename:n}:{includeSources:!0,content:void 0,filename:n};if(c=
|
|
1
|
+
"use strict";const config_1=require("../../../../config/config"),_Terser=()=>require("terser"),_UglifyJS=()=>require("uglify-js"),_babelCodeFrame=()=>require("babel-code-frame"),minify=e=>{const{code:r,inputSourceMap:o,useTerser:i,filePath:n}=e;let c;const s=o?{includeSources:!0,content:o,filename:n}:{includeSources:!0,content:void 0,filename:n};if(i)try{c=_Terser().minify_sync(r,{output:{comments:!1},toplevel:!0,compress:{drop_console:!1,drop_debugger:!1},sourceMap:s})}catch(e){c={error:e}}else c=_UglifyJS().minify(r,{toplevel:!0,sourceMap:s});if("error"in c){const e=c.error;return{error:{message:`file: ${n}\n ${c.error.message}\n ${_babelCodeFrame()(r,e.line,e.col>0?e.col:1)}`,code:config_1.UGLIFY_JS_ERR}}}return c};module.exports=minify;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const tslib_1=require("tslib"),minifyjs_1=tslib_1.__importDefault(require("./minifyjs")),_sourcemap=()=>require("source-map"),transformInputSourceMapWhenWraped=e=>{const{code:n,filePath:r,inputSourceMap:o}=e;if(o){const e=new(_sourcemap().SourceMapConsumer)(o),n=new(_sourcemap().SourceMapGenerator)({file:r});return e.eachMapping(e=>{if("number"!=typeof e.originalLine||"number"!=typeof e.originalColumn)return;const r={generated:{line:e.generatedLine+1,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)}),e.sources.forEach(r=>{const o=r;n._sources.has(o)||n._sources.add(o);const s=e.sourceContentFor(r);null!==s&&n.setSourceContent(r,s)}),n.toJSON()}const s=new(_sourcemap().SourceMapGenerator)({file:r}),t=n.split("\n").length;for(let e=0;e<t;e++)s.addMapping({generated:{line:e+2,column:0},original:{line:e+1,column:0},source:r});return s._sources.add(r),s.setSourceContent(r,n),s.toJSON()},minifyAfterWrap=e=>{const n=transformInputSourceMapWhenWraped(Object.assign({},e)),r=(0,minifyjs_1.default)(Object.assign(Object.assign({},e),{inputSourceMap:n,code:`(function(){\n${e.code}\n})()`,useTerser:!0}));return r
|
|
1
|
+
"use strict";const tslib_1=require("tslib"),minifyjs_1=tslib_1.__importDefault(require("./minifyjs")),_sourcemap=()=>require("source-map"),transformInputSourceMapWhenWraped=e=>{const{code:n,filePath:r,inputSourceMap:o}=e;if(o){const e=new(_sourcemap().SourceMapConsumer)(o),n=new(_sourcemap().SourceMapGenerator)({file:r});return e.eachMapping((e=>{if("number"!=typeof e.originalLine||"number"!=typeof e.originalColumn)return;const r={generated:{line:e.generatedLine+1,column:e.generatedColumn}};null!=e.source&&(r.source=e.source,r.original={line:e.originalLine,column:e.originalColumn},null!=e.name&&(r.name=e.name)),n.addMapping(r)})),e.sources.forEach((r=>{const o=r;n._sources.has(o)||n._sources.add(o);const s=e.sourceContentFor(r);null!==s&&n.setSourceContent(r,s)})),n.toJSON()}const s=new(_sourcemap().SourceMapGenerator)({file:r}),t=n.split("\n").length;for(let e=0;e<t;e++)s.addMapping({generated:{line:e+2,column:0},original:{line:e+1,column:0},source:r});return s._sources.add(r),s.setSourceContent(r,n),s.toJSON()},minifyAfterWrap=e=>{const n=transformInputSourceMapWhenWraped(Object.assign({},e)),r=(0,minifyjs_1.default)(Object.assign(Object.assign({},e),{inputSourceMap:n,code:`(function(){\n${e.code}\n})()`,useTerser:!0}));return"error"in r?(console.error(r.error),(0,minifyjs_1.default)(Object.assign(Object.assign({},e),{useTerser:!0}))):r};module.exports=minifyAfterWrap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const config_1=require("../../../../config/config"),_pluginTransformWorklet=()=>require("../../../../utils/babel_plugin_worklet"),babel7=()=>require("@babel/core"),workletCompile=e=>{const{code:r,filePath:l,inputSourceMap:
|
|
1
|
+
"use strict";const config_1=require("../../../../config/config"),_pluginTransformWorklet=()=>require("../../../../utils/babel_plugin_worklet"),babel7=()=>require("@babel/core"),workletCompile=e=>{const{code:r,filePath:l,inputSourceMap:o}=e,i=e.disableUseStrict||/^\s*\/\/\s?use strict disable;/i.test(r);let t=null;try{t=babel7().transform(r,{babelrc:!1,plugins:[_pluginTransformWorklet()],sourceFileName:l,inputSourceMap:o,sourceMaps:!0,configFile:!1})}catch(e){return{error:{message:`file: ${l}\n ${e.message}`,code:config_1.BABEL_TRANS_JS_ERR}}}let s=(null==t?void 0:t.code)||r;const c=(null==t?void 0:t.map)||o;return i&&(s=s.replace(/^"use strict";/,"")),{code:s,map:c,helpers:[]}};module.exports=workletCompile;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAppJSON=exports.getRawAppJSON=void 0,exports.checkAppJSON=checkAppJSON;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=require("lodash"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),projectconfig_1=require("../projectconfig"),common_1=require("../../../../../utils/common"),config_1=require("../../../../../config/config"),common_2=require("../common"),cache_1=require("../../../../../utils/cache"),schemaValidate_1=require("../../validate/schemaValidate"),tools_1=require("../../../../../utils/tools"),theme_1=require("../theme"),reactiveCache_1=require("../reactiveCache"),checkAppFields_1=require("./checkAppFields");function checkAppJSON(e){const{inputJSON:c}=e,{filePath:a}=e,t=(0,theme_1.getThemeLocation)(e.project);if(!t){const e=(0,checkAppFields_1.getAppJSONVariableDecalearProperty)(c);e.length&&(0,common_1.throwError)({msg
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAppJSON=exports.getRawAppJSON=void 0,exports.checkAppJSON=checkAppJSON;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=require("lodash"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),projectconfig_1=require("../projectconfig"),common_1=require("../../../../../utils/common"),config_1=require("../../../../../config/config"),common_2=require("../common"),cache_1=require("../../../../../utils/cache"),schemaValidate_1=require("../../validate/schemaValidate"),tools_1=require("../../../../../utils/tools"),theme_1=require("../theme"),reactiveCache_1=require("../reactiveCache"),checkAppFields_1=require("./checkAppFields");function checkAppJSON(e){const{inputJSON:c}=e,{filePath:a}=e,t=(0,theme_1.getThemeLocation)(e.project);if(!t){const e=(0,checkAppFields_1.getAppJSONVariableDecalearProperty)(c);e.length&&(0,common_1.throwError)({msg:`appJSON["themeLocation"] is required because:\n${e.map((e=>`"${e.value}" as variable was declared at ${a}:${e.property}`)).join("\n")}`,filePath:a})}let o={light:{},dark:{}};t&&(o=(0,theme_1.checkThemeJSON)(e.project,{themeLocation:t}));const i=(0,theme_1.mergeThemeJSONToAppJSON)(o,c),p=(0,checkAppFields_1.getAppJSONVariableDecalearProperty)(i.appJSONLight);p.length&&(0,common_1.throwError)({msg:p.map((e=>`"${e.value}" as variable was declared at ${a}:${e.property}, but not found at ${t}["light"]`)).join("\n"),filePath:a});const r=(0,checkAppFields_1.getAppJSONVariableDecalearProperty)(i.appJSONDark);r.length&&(0,common_1.throwError)({msg:r.map((e=>`"${e.value}" as variable was declared at ${a}:${e.property}, but not found at ${t}["dark"]`)).join("\n"),filePath:a});const l=(0,schemaValidate_1.schemaValidate)("app",i.appJSONLight),n=(0,schemaValidate_1.schemaValidate)("app",i.appJSONDark);l.warning&&(c.__warning__=locales_1.default.config.INVALID.format(l.warning)),t&&n.warning&&(c.__warning__=locales_1.default.config.INVALID.format(n.warning)),(0,schemaValidate_1.transValidateResult)(t?`${a} or ${t}["light"]`:a,l),t&&(0,schemaValidate_1.transValidateResult)(`${a} or ${t}["dark"]`,n);const s=Object.assign(Object.assign({},e),{mode:"light",inputJSON:i.appJSONLight}),h=Object.assign(Object.assign({},e),{mode:"dark",inputJSON:i.appJSONDark});(0,checkAppFields_1.checkMainPkgPages)(e),(0,checkAppFields_1.checkSubpackages)(e),(0,checkAppFields_1.checkTabbar)(s),t&&(0,checkAppFields_1.checkTabbar)(h),(0,checkAppFields_1.checkWorkers)(e),(0,checkAppFields_1.checkFunctionalPages)(e),(0,checkAppFields_1.checkOpenLocationPagePath)(e),(0,checkAppFields_1.checkOpenDataContext)(e,c),(0,checkAppFields_1.checkPlugins)(e),(0,checkAppFields_1.checkWindow)(s),t&&(0,checkAppFields_1.checkWindow)(h),(0,checkAppFields_1.checkComponentPath)(e);const _=(0,common_1.getAllPagesInfo)(c);return(0,checkAppFields_1.checkEntryPagePath)(e,_),(0,checkAppFields_1.checkPreloadRule)(e,_),(0,checkAppFields_1.checkTabbarPage)(e),(0,checkAppFields_1.checkMainPkgPageIsInSubpkg)(e),(0,checkAppFields_1.checkMainPkgPluginIsInSubPkg)(e),(0,checkAppFields_1.checkEntranceDeclare)(e),(0,checkAppFields_1.checkRenderer)(e),(0,checkAppFields_1.checkResolveAlias)(e),(0,checkAppFields_1.checkRequiredPrivateInfos)(e),(0,checkAppFields_1.checkAccountCardPackage)(e),c}exports.getRawAppJSON=(0,reactiveCache_1.wrapCompileJSONFunc)(cache_1.CACHE_KEY.RAW_APP_JSON,(e=>{const c=(0,projectconfig_1.getProjectConfigJSON)(e),{miniprogramRoot:a=""}=c,t="app.json",o=(0,tools_1.normalizePath)(path_1.default.posix.join(a,t));e.stat(a,t)||(""===a?(0,common_1.throwError)({msg:locales_1.default.config.NOT_FOUND_IN_ROOT_DIR.format(o),code:config_1.FILE_NOT_FOUND,filePath:o}):(0,common_1.throwError)({msg:locales_1.default.config.MINIPROGRAM_APP_JSON_NOT_FOUND.format(a,t),code:config_1.FILE_NOT_FOUND,filePath:o}));const i=e.getFile(a,t);return(0,common_2.checkJSONFormat)((0,common_1.checkUTF8)(i,o),o)})),exports.getAppJSON=(0,reactiveCache_1.wrapCompileJSONFunc)(cache_1.CACHE_KEY.APP_JSON,(e=>{const c=(0,lodash_1.cloneDeep)((0,exports.getRawAppJSON)(e)),a=(0,projectconfig_1.getProjectConfigJSON)(e),{miniprogramRoot:t=""}=a;return checkAppJSON({project:e,miniprogramRoot:t,filePath:(0,tools_1.normalizePath)(path_1.default.posix.join(t,"app.json")),inputJSON:c}),c}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkMainPkgPages=void 0,exports.checkPageExist=checkPageExist,exports.checkWindow=checkWindow,exports.checkTabbar=checkTabbar,exports.checkWorkers=checkWorkers,exports.checkOpenLocationPagePath=checkOpenLocationPagePath,exports.checkSitemapLocation=checkSitemapLocation,exports.checkSubpackages=checkSubpackages,exports.checkPlugins=checkPlugins,exports.checkNavigateToMiniProgramAppIdList=checkNavigateToMiniProgramAppIdList,exports.checkFunctionalPages=checkFunctionalPages,exports.checkPreloadRule=checkPreloadRule,exports.checkEntryPagePath=checkEntryPagePath,exports.checkTabbarPage=checkTabbarPage,exports.checkMainPkgPageIsInSubpkg=checkMainPkgPageIsInSubpkg,exports.checkMainPkgPluginIsInSubPkg=checkMainPkgPluginIsInSubPkg,exports.checkComponentPath=checkComponentPath,exports.checkEntranceDeclare=checkEntranceDeclare,exports.getAppJSONVariableDecalearProperty=getAppJSONVariableDecalearProperty,exports.checkOpenDataContext=checkOpenDataContext,exports.checkRenderer=checkRenderer,exports.checkResolveAlias=checkResolveAlias,exports.checkRequiredPrivateInfos=checkRequiredPrivateInfos,exports.checkAccountCardPackage=checkAccountCardPackage;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=tslib_1.__importDefault(require("lodash")),config_1=require("../../../../../config/config"),common_1=require("../common"),common_2=require("../../../../../utils/common"),tools_1=require("../../../../../utils/tools"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),schemaValidate_1=require("../../validate/schemaValidate"),projectconfig_1=require("../projectconfig");function checkPageExist(o,t,e){const{miniprogramRoot:a,project:n,filePath:c}=o;n.stat(a,t+".wxml")||(0,common_2.throwError)({msg:locales_1.default.config.CORRESPONDING_FILE_NOT_FOUND.format(e,t+".wxml"),code:config_1.FILE_NOT_FOUND,filePath:c}),n.stat(a,t+".js")||(0,common_2.throwError)({msg:locales_1.default.config.CORRESPONDING_FILE_NOT_FOUND.format(e,t+".js"),code:config_1.FILE_NOT_FOUND,filePath:c})}function checkWindow(o){const{inputJSON:t,mode:e}=o;let a=""+o.filePath;t.themeLocation&&(a+=` or ${t.themeLocation}["${e}"]`);const n=[],{window:c}=t;c&&(void 0!==c.navigationBarBackgroundColor&&((0,tools_1.isHexColor)(c.navigationBarBackgroundColor)||n.push(`["window"]["navigationBarBackgroundColor"]: "${c.navigationBarBackgroundColor}" is not hexColor`)),void 0!==c.backgroundColor&&((0,tools_1.isHexColor)(c.backgroundColor)||n.push(`["window"]["backgroundColor"]: "${c.backgroundColor}" is not hexColor`)),n.length>0&&(0,common_2.throwError)({msg:n.join("\n"),filePath:a}))}function checkTabbar(o){const{project:t,miniprogramRoot:e,inputJSON:a,mode:n}=o;let c=""+o.filePath;a.themeLocation&&(c+=` or ${a.themeLocation}["${n}"]`);const{tabBar:i}=a,r=t.attrSync(),{setting:s}=r;if(!i)return;const l=[];i.list.length<s.MinTabbarCount&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_TABBAR_AT_LEAST.format(s.MinTabbarCount),filePath:c});const _=i.custom?s.MaxCustomTabbarCount:s.MaxTabbarCount;i.list.length>_&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_TABBAR_AT_MOST.format(_),filePath:c});for(let o=0;o<i.list.length;o++){const a=i.list[o],{pagePath:n}=a;if((0,common_2.checkPath)({value:n,tips:`["tabBar"]["list"][${o}]["pagePath"]`,filePath:c}),!n){l.push(locales_1.default.config.JSON_TABBAR_PATH_EMPTY.format(o));continue}n.indexOf("?")>=0&&l.push(locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format(`["tabBar"]["list"][${o}]["pagePath"]`,"?")),n.indexOf(".")>=0&&l.push(locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format(`["tabBar"]["list"][${o}]["pagePath"]`,"."));const r=i.list.slice(0,o).findIndex(o=>o.pagePath===n);r>=0&&l.push(locales_1.default.config.JSON_TABBAR_PATH_SAME_WITH_OTHER.format(o,r));const _=[];a.iconPath&&((0,common_2.checkPath)({value:a.iconPath,tips:`["tabBar"]["list"][${o}]["iconPath"]`,filePath:c,checkPathType:common_2.ECheckPathType.TAB_BAR_ICON}),_.push({name:"iconPath",path:a.iconPath})),a.selectedIconPath&&((0,common_2.checkPath)({value:a.selectedIconPath,tips:`["tabBar"]["list"][${o}]["selectedIconPath"]`,filePath:c,checkPathType:common_2.ECheckPathType.TAB_BAR_ICON}),_.push({name:"selectedIconPath",path:a.selectedIconPath})),_.forEach(a=>{const n=t.stat(e,a.path);if(!n)return void l.push(locales_1.default.config.NOT_FOUND.format(`["tabBar"]["list"][${o}]["${a.name}"]: "${a.path}"`));if(n.isDirectory)return void l.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(`["tabBar"]["list"][${o}]["${a.name}"]`,locales_1.default.config.FILE));n.size>1024*s.MaxTabbarIconSize&&l.push(locales_1.default.config.JSON_TABBAR_ICON_MAX_SIZE.format([o,a.name,s.MaxTabbarIconSize]));const c=path_1.default.posix.extname(a.path);config_1.TABBAR_ICON_WHITE_LIST.indexOf(c)<0&&l.push(locales_1.default.config.JSON_TABBAR_ICON_EXT.format([o,a.name,config_1.TABBAR_ICON_WHITE_LIST.join("、")]))})}l.length>0&&(0,common_2.throwError)({msg:l.join("\n"),filePath:c})}function checkWorkers(o){const{project:t,miniprogramRoot:e,filePath:a,inputJSON:n}=o,{workers:c}=n;if(void 0===c)return;const i='["workers"]';""===c&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(i,locales_1.default.config.DIRECTORY),filePath:a});const r=(0,tools_1.getWorkersPath)(c);(0,common_2.checkPath)({value:r,tips:i,filePath:a});const s=t.stat(e,r);s&&s.isDirectory||(0,common_2.throwError)({msg:locales_1.default.config.JSON_CONTENT_SHOULD_BE.format([i,locales_1.default.config.DIRECTORY]),filePath:a}),"string"==typeof n.workers?n.workers=(0,tools_1.normalizePath)(n.workers+"/"):n.workers.path=(0,tools_1.normalizePath)(n.workers.path+"/")}function checkOpenLocationPagePath(o){const{filePath:t,inputJSON:e}=o,{openLocationPagePath:a}=e;if(void 0===a)return;const n='["openLocationPagePath"]';(0,common_2.checkPath)({value:a,tips:n,filePath:t}),checkPageExist(o,a,n)}const checkMainPkgPages=o=>{const{filePath:t,inputJSON:e}=o,{pages:a}=e;if(!a)return;const n={};for(let e=0;e<a.length;e++){const c=a[e],i=`["pages"][${e}]`;(0,common_2.checkPath)({value:c,tips:i,filePath:t}),n[c]&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_PAGES_REPEAT.format(`"${c}"`,'["pages"]'),filePath:t}),n[c]=!0,checkPageExist(o,c,i)}};function checkSitemapLocation(o){const{filePath:t,inputJSON:e}=o,{sitemapLocation:a}=e;if(void 0===a)return;const{project:n,miniprogramRoot:c}=o,i='["sitemapLocation"]';(0,common_2.checkPath)({value:a,tips:i,filePath:t});const r=n.stat(c,a);r&&!r.isDirectory||(0,common_2.throwError)({msg:locales_1.default.config.CORRESPONDING_FILE_NOT_FOUND.format(i,a),filePath:t});".json"!==path_1.default.posix.extname(a)&&(0,common_2.throwError)({msg:locales_1.default.config.EXT_SHOULD_BE_ERROR.format(i,".json"),filePath:t});const s=n.getFile(c,a),l=(0,common_2.checkUTF8)(s,a),_=(0,common_1.checkJSONFormat)(l,a),f=(0,schemaValidate_1.schemaValidate)("sitemap",_);(0,schemaValidate_1.transValidateResult)(a,f)}function checkSubpackages(o){const{project:t,miniprogramRoot:e,filePath:a,inputJSON:n}=o;let c='["subPackages"]';n.subpackages&&(c='["subpackages"]',n.subPackages=n.subpackages,delete n.subpackages);const i=[];if(n.subPackages){const r=t.attrSync(),{setting:s}=r;n.subPackages.length>s.MaxSubPackageLimit&&(0,common_2.throwError)({msg:locales_1.default.config.EXCEED_LIMIT.format([c,s.MaxSubPackageLimit]),filePath:a});const l={},_={};for(let r=0;r<n.subPackages.length;r++){const s=n.subPackages[r],f=`${c}[${r}]`;if((0,common_2.checkPath)({value:s.root,tips:`${c}[${r}]["root"]`,filePath:a}),s.root===config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT){i.push(locales_1.default.config.JSON_CONTENT_SHOULD_NOT_BE.format(`${c}[${r}]["root"]`,config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT));continue}if(s.name){if(s.name===config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT){i.push(locales_1.default.config.JSON_CONTENT_SHOULD_NOT_BE.format(`${c}[${r}]["name"]`,config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT));continue}if(_[s.name]){i.push(locales_1.default.config.SAME_ITEM.format(f,_[s.name],"name"));continue}_[s.name]=f}if(s.root=(0,tools_1.normalizePath)(s.root+"/"),l[s.root]){i.push(locales_1.default.config.SAME_ITEM.format(f,l[s.root],"root"));continue}l[s.root]=f;const h=t.stat(e,s.root);if(!h){i.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format([`${c}[${r}]["root"]`,locales_1.default.config.DIRECTORY]));continue}if(!h.isDirectory){i.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format([`${c}[${r}]["root"]`,locales_1.default.config.DIRECTORY]));continue}const g={};for(let t=0,e=s.pages.length;t<e;t++){const e=s.pages[t];(0,common_2.checkPath)({value:e,tips:`${c}[${r}]["pages"][${t}]`,filePath:a});const n=(0,tools_1.normalizePath)(path_1.default.posix.join(s.root,e));g[n]?i.push(locales_1.default.config.JSON_PAGES_REPEAT.format([`"${e}"`,`${c}[${r}]`])):(g[n]=!0,checkPageExist(o,n,`${c}[${r}]["pages"][${t}]`))}}i.length>0&&(0,common_2.throwError)({msg:i.join("\n"),filePath:a});for(let o=0;o<n.subPackages.length;o++){const t=n.subPackages[o];let e=-1;const a="/"+t.root;n.subPackages.forEach((t,n)=>{if(n!==o&&t.root){const o="/"+t.root;a.startsWith(o)&&(e=n)}}),-1===e||i.push(locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format(`${c}[${e}]["root"]`,`${c}[${o}]["root"]`))}i.length>0&&(0,common_2.throwError)({msg:i.join("\n"),filePath:a})}}function checkPlugins(o){const{filePath:t,inputJSON:e,project:a}=o,n=[],c=e.plugins||{},i=(0,projectconfig_1.getProjectConfigJSON)(a),r=(null==i?void 0:i.pluginAppid)||a.appid;function s(o,t){const e=a.type===config_1.COMPILE_TYPE.miniProgramPlugin;if(e||"dev"!==o.version)if(e)"dev"===o.version&&o.provider!==r?n.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(t+'["provider"]',`"${r}"`)):o.provider===r&&"dev"!==o.version&&n.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(t+'["version"]','"dev"'));else{if("dev"===o.version||"latest"===o.version||/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/.test(o.version)||/^dev-[A-Za-z0-9]+$/.test(o.version))return!0;n.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format([t+'["version"]',locales_1.default.config.TRIPLE_NUMBER_DOT]))}else n.push(`${locales_1.default.config.JSON_CONTENT_SHOULD_NOT_BE.format(t+'["version"]',"dev")}\n${locales_1.default.config.PLEASE_CHOOSE_PLUGIN_MODE}`)}for(const o in c){s(c[o],`["plugins"]["${o}"]`)}e.subPackages&&e.subPackages.forEach((o,t)=>{if(!o.plugins)return;const e=`["subPackages"][${t}]`;for(const t in o.plugins){s(o.plugins[t],`${e}["plugins"]["${t}"]`)}}),n.length>0&&(0,common_2.throwError)({msg:n.join("\n"),filePath:t})}function checkNavigateToMiniProgramAppIdList(o){const{filePath:t,inputJSON:e,project:a}=o,n=[];if(e.navigateToMiniProgramAppIdList){const o=a.attrSync(),{appType:t=config_1.APP_TYPE.NORMAL,setting:c}=o;if(t!==config_1.APP_TYPE.NATIVE){const o=null==c?void 0:c.NavigateMiniprogramLimit;e.navigateToMiniProgramAppIdList.length>o&&n.push(locales_1.default.config.EXCEED_LIMIT.format('["navigateToMiniProgramAppIdList"]',o))}}n.length>0&&(0,common_2.throwError)({msg:n.join("\n"),filePath:t})}function checkFunctionalPages(o){const{inputJSON:t}=o;if(t.functionalPages&&"object"!==(0,tools_1.getType)(t.functionalPages)){const o='["functionalPages"] 配置需要更新,详见文档: https://developers.weixin.qq.com/miniprogram/dev/framework/plugin/functional-pages.html';t.__warning__?t.__warning__=`${t.__warning__}\n${o}`:t.__warning__=o}}function checkPreloadRule(o,t){const{inputJSON:e,filePath:a}=o,{preloadRule:n,subPackages:c}=e;if(!n||!c)return;const i=[],r={},s={},l={};t.forEach(o=>{r[o.root]=!0,l[o.path]=!0,o.name&&(s[o.name]=!0)});for(const o in n){if(!l[o]&&!o.includes("__plugin__/")){i.push(locales_1.default.config.NOT_FOUND.format(`["preloadRule"]["${o}"]: ${locales_1.default.config.PAGE_PATH}`));continue}const t=n[o];for(let e=0,a=t.packages.length;e<a;e++){let a=t.packages[e];a!==config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT&&(s[a]||(a=(0,tools_1.normalizePath)(a+"/"),r[a]||i.push(locales_1.default.config.NOT_FOUND.format(`["preloadRule"]["${o}"]["packages"][${e}]: ${a}`))))}}i.length>0&&(0,common_2.throwError)({msg:i.join("\n"),filePath:a})}function checkEntryPagePath(o,t){const{inputJSON:e,filePath:a}=o,{entryPagePath:n}=e;if(!n)return;(0,common_2.checkPath)({value:n,tips:'["entryPagePath"]',filePath:a});let c=!1;for(const o of t)if(o.path===n){c=!0;break}c||(0,common_2.throwError)({msg:locales_1.default.config.JSON_ENTRY_PAGE_PATH_NOT_FOUND.format(["pages、subPackages","entryPagePath"]),filePath:a})}function checkTabbarPage(o){const{filePath:t,inputJSON:e}=o,{tabBar:a,pages:n=[]}=e;if(!a)return;const c=[];for(let o=0;o<a.list.length;o++){const t=a.list[o],{pagePath:e}=t;n.indexOf(e)<0&&c.push(`["tabBar"][${o}]["pagePath"]: "${e}" need in ["pages"]`)}c.length>0&&(0,common_2.throwError)({msg:c.join("\n"),filePath:t})}function checkMainPkgPageIsInSubpkg(o){const{filePath:t,inputJSON:e}=o,{subPackages:a,pages:n=[]}=e;if(!a)return;const c=[];for(let o=0;o<a.length;o++){const t=a[o];for(let e=0;e<n.length;e++){const a=n[e];a.startsWith(t.root)&&c.push(locales_1.default.config.SHOULD_NOT_IN.format([`["pages"][${e}]: "${a}"`,`["subPackages"][${o}]`]))}}c.length>0&&(0,common_2.throwError)({msg:c.join("\n"),filePath:t})}function checkMainPkgPluginIsInSubPkg(o){const{filePath:t,inputJSON:e}=o,{plugins:a={},subPackages:n}=e,c={},i={},r=[];for(const o in a){const t=a[o],e=`["plugins"]["${o}"]`;c[t.provider]?r.push(locales_1.default.config.SAME_ITEM.format(`["plugins"]["${o}"]`,c[t.provider].tips,"provider")):c[t.provider]=i[o]={provider:t.provider,version:t.version,alias:o,tips:e}}if(n)for(let o=0;o<n.length;o++){const t=n[o];if(t.plugins)for(const e in t.plugins){const a=`["subPackages"][${o}]["plugins"]`,n=t.plugins[e];c[n.provider]?r.push(locales_1.default.config.SAME_ITEM.format(`${a}["${e}"]`,c[n.provider].tips,"provider")):i[e]?r.push(locales_1.default.config.PLUGINS_SAME_ALIAS.format(`${a}["${e}"]`,i[e].tips)):c[n.provider]=i[e]={provider:n.provider,version:n.version,alias:n,tips:a}}}r.length>0&&(0,common_2.throwError)({msg:r.join("\n"),filePath:t})}function checkComponentPath(o){const{project:t,miniprogramRoot:e,filePath:a,inputJSON:n}=o;(0,common_1.checkComponentPath)({project:t,root:e,relativePath:path_1.default.posix.relative(e,a),inputJSON:n})}function checkEntranceDeclare(o){const t=o.inputJSON;if(!t.entranceDeclare||!t.entranceDeclare.locationMessage)return;let e=t.pages||[];t.subpackages&&(e=e.concat(t.subpackages.map(o=>o.pages.map(t=>o.root+t))),e=lodash_1.default.flattenDeep(e)),t.subPackages&&(e=e.concat(t.subPackages.map(o=>o.pages.map(t=>o.root+t))),e=lodash_1.default.flattenDeep(e));const a=[],n=t.entranceDeclare.locationMessage.path;void 0===n?a.push(locales_1.default.config.JSON_ENTRANCE_DECLARE_PATH_EMPTY.format([])):e.includes(n)||a.push(locales_1.default.config.JSON_ENTRANCE_DECLARE_PATH_ERR.format([n||"undefined"])),a.length>0&&(0,common_2.throwError)({msg:a.join("\n"),filePath:o.filePath})}function getAppJSONVariableDecalearProperty(o){const{windowPropertWhiteList:t,tabBarPropertyWhiteList:e,tabbarListItemPropertyWhiteList:a}=config_1.jsonVariablePropertyWhiteList;let n=[];return"[object Object]"===Object.prototype.toString.call(o.window)&&(n=n.concat(Object.keys(o.window).filter(o=>t.includes(o)).map(t=>({property:`["window"]["${t}"]`,value:o.window[t]})).filter(o=>"string"==typeof o.value&&o.value.startsWith("@")))),"[object Object]"===Object.prototype.toString.call(o.tabBar)&&(n=n.concat(Object.keys(o.tabBar).filter(o=>e.includes(o)).map(t=>({property:`["tabBar"]["${t}"]`,value:o.tabBar[t]})).filter(o=>"string"==typeof o.value&&o.value.startsWith("@"))),Array.isArray(o.tabBar.list)&&o.tabBar.list.forEach((t,e)=>{n=n.concat(Object.keys(t).filter(o=>a.includes(o)).map(t=>({property:`["tabBar"]["list"][${e}]["${t}"]`,value:o.tabBar.list[e][t]})).filter(o=>"string"==typeof o.value&&o.value.startsWith("@")))})),n}function checkOpenDataContext(o,t){const{project:e,miniprogramRoot:a,filePath:n}=o,{openDataContext:c}=t;if(void 0===c)return;(0,common_2.checkPath)({value:c,tips:'["openDataContext"]',filePath:n});const i=e.stat(a,c);i&&i.isDirectory||(0,common_2.throwError)({msg:locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(['["openDataContext"]',locales_1.default.config.DIRECTORY]),filePath:n});const r=path_1.default.posix.join(c,"./index.js"),s=e.stat(a,r);s&&s.isFile||(0,common_2.throwError)({msg:locales_1.default.config.CORRESPONDING_FILE_NOT_FOUND.format('["openDataContext"]',r),filePath:n}),t.openDataContext=(0,tools_1.normalizePath)(c+"/")}function checkRenderer(o){var t,e,a,n;const{filePath:c,inputJSON:i}=o,{renderer:r,lazyCodeLoading:s,rendererOptions:l}=i;if("skyline"===r&&"requiredComponents"!==s&&(0,common_2.throwError)({msg:locales_1.default.config.APP_JSON_SHOULD_SET_LAZYCODELOADING.format("app.json"),filePath:c}),"skyline"===r&&(void 0===l?(0,common_2.throwError)({msg:locales_1.default.config.JSON_SHOULD_SET_RENDEREROPTIONS.format("app.json"),filePath:c}):void 0===l.skyline&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_SHOULD_SET_RENDEREROPTIONS_SKYLINE.format("app.json"),filePath:c})),"skyline"===r||(null==l?void 0:l.skyline)){const o=(null===(t=i.window)||void 0===t?void 0:t.navigationBarTextStyle)||(null===(e=i.window)||void 0===e?void 0:e.navigationBarTitleText)||(null===(a=i.window)||void 0===a?void 0:a.navigationBarBackgroundColor),c="custom"===(null===(n=i.window)||void 0===n?void 0:n.navigationStyle);if(o&&!c){const o=locales_1.default.config.APP_JSON_SKYLINE_WINDOW_TIPS.format("");i.__warning__?i.__warning__=`${i.__warning__}\n${o}`:i.__warning__=o}}}function checkResolveAlias(o){const{filePath:t,inputJSON:e}=o,{resolveAlias:a}=e;if(a){const o=o=>o.includes("//");for(const e in a)(o(e)||o(a[e]))&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_RESOLVE_ALIAS_ILLEGAL.format(e,a[e]),filePath:t}),a[e].startsWith("./")&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_RESOLVE_ALIAS_SHOULD_NOT_START_WITH.format(a[e]),filePath:t}),e.endsWith("/*")&&a[e].endsWith("/*")||(0,common_2.throwError)({msg:locales_1.default.config.JSON_RESOLVE_ALIAS_INCLUDE_STAR.format(e,a[e]),filePath:t})}}exports.checkMainPkgPages=checkMainPkgPages;const detailLocationApis={getLocation:!0,onLocationChange:!0,startLocationUpdate:!0,startLocationUpdateBackground:!0};function checkRequiredPrivateInfos(o){const{filePath:t,inputJSON:e}=o,{requiredPrivateInfos:a}=e;if(a){if(a.indexOf("getFuzzyLocation")>=0){const o=[];for(let t=0;t<a.length;t++){const e=a[t];detailLocationApis[e]&&o.push(`'${e}'`)}o.length>0&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_REQUIRED_PRIVATE_INFOS_MUTUALLY_EXCLUSIVE.format("'getFuzzyLocation'",o.join("、")),filePath:t})}}}function checkAccountCardPackage(o){const{project:t,filePath:e,inputJSON:a,miniprogramRoot:n}=o,{accountCardPackage:c}=a;if(c){c.root=(0,tools_1.normalizePath)(c.root+"/");const o=a.subPackages||a.subpackages||[];console.log("subPackages",o),o.find(o=>o.root===c.root&&o.independent)||(0,common_2.throwError)({msg:locales_1.default.config.ACCOUNT_CARD_PACKAPGE_IN_VALID.format(),filePath:e});for(const o of c.cardList){const{componentPath:a}=o,i=path_1.default.posix.join(c.root,a+".js");t.stat(n,path_1.default.posix.join(c.root,a+".js"))||(0,common_2.throwError)({msg:locales_1.default.config.CORRESPONDING_FILE_NOT_FOUND.format('["accountCardPackage"]',i),code:config_1.FILE_NOT_FOUND,filePath:e})}}}
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkMainPkgPages=void 0,exports.checkPageExist=checkPageExist,exports.checkWindow=checkWindow,exports.checkTabbar=checkTabbar,exports.checkWorkers=checkWorkers,exports.checkOpenLocationPagePath=checkOpenLocationPagePath,exports.checkSitemapLocation=checkSitemapLocation,exports.checkSubpackages=checkSubpackages,exports.checkPlugins=checkPlugins,exports.checkNavigateToMiniProgramAppIdList=checkNavigateToMiniProgramAppIdList,exports.checkFunctionalPages=checkFunctionalPages,exports.checkPreloadRule=checkPreloadRule,exports.checkEntryPagePath=checkEntryPagePath,exports.checkTabbarPage=checkTabbarPage,exports.checkMainPkgPageIsInSubpkg=checkMainPkgPageIsInSubpkg,exports.checkMainPkgPluginIsInSubPkg=checkMainPkgPluginIsInSubPkg,exports.checkComponentPath=checkComponentPath,exports.checkEntranceDeclare=checkEntranceDeclare,exports.getAppJSONVariableDecalearProperty=getAppJSONVariableDecalearProperty,exports.checkOpenDataContext=checkOpenDataContext,exports.checkRenderer=checkRenderer,exports.checkResolveAlias=checkResolveAlias,exports.checkRequiredPrivateInfos=checkRequiredPrivateInfos,exports.checkAccountCardPackage=checkAccountCardPackage;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=tslib_1.__importDefault(require("lodash")),config_1=require("../../../../../config/config"),common_1=require("../common"),common_2=require("../../../../../utils/common"),tools_1=require("../../../../../utils/tools"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),schemaValidate_1=require("../../validate/schemaValidate"),projectconfig_1=require("../projectconfig");function checkPageExist(o,t,e){const{miniprogramRoot:a,project:n,filePath:c}=o;n.stat(a,`${t}.wxml`)||(0,common_2.throwError)({msg:locales_1.default.config.CORRESPONDING_FILE_NOT_FOUND.format(e,`${t}.wxml`),code:config_1.FILE_NOT_FOUND,filePath:c}),n.stat(a,`${t}.js`)||(0,common_2.throwError)({msg:locales_1.default.config.CORRESPONDING_FILE_NOT_FOUND.format(e,`${t}.js`),code:config_1.FILE_NOT_FOUND,filePath:c})}function checkWindow(o){const{inputJSON:t,mode:e}=o;let a=`${o.filePath}`;t.themeLocation&&(a+=` or ${t.themeLocation}["${e}"]`);const n=[],c='["window"]',{window:i}=t;i&&(void 0!==i.navigationBarBackgroundColor&&((0,tools_1.isHexColor)(i.navigationBarBackgroundColor)||n.push(`${c}["navigationBarBackgroundColor"]: "${i.navigationBarBackgroundColor}" is not hexColor`)),void 0!==i.backgroundColor&&((0,tools_1.isHexColor)(i.backgroundColor)||n.push(`${c}["backgroundColor"]: "${i.backgroundColor}" is not hexColor`)),n.length>0&&(0,common_2.throwError)({msg:n.join("\n"),filePath:a}))}function checkTabbar(o){const{project:t,miniprogramRoot:e,inputJSON:a,mode:n}=o;let c=`${o.filePath}`;a.themeLocation&&(c+=` or ${a.themeLocation}["${n}"]`);const{tabBar:i}=a,r=t.attrSync(),{setting:s}=r;if(!i)return;const l=[];i.list.length<s.MinTabbarCount&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_TABBAR_AT_LEAST.format(s.MinTabbarCount),filePath:c});const _=i.custom?s.MaxCustomTabbarCount:s.MaxTabbarCount;i.list.length>_&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_TABBAR_AT_MOST.format(_),filePath:c});for(let o=0;o<i.list.length;o++){const a=i.list[o],{pagePath:n}=a;if((0,common_2.checkPath)({value:n,tips:`["tabBar"]["list"][${o}]["pagePath"]`,filePath:c}),!n){l.push(locales_1.default.config.JSON_TABBAR_PATH_EMPTY.format(o));continue}n.indexOf("?")>=0&&l.push(locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format(`["tabBar"]["list"][${o}]["pagePath"]`,"?")),n.indexOf(".")>=0&&l.push(locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format(`["tabBar"]["list"][${o}]["pagePath"]`,"."));const r=i.list.slice(0,o).findIndex((o=>o.pagePath===n));r>=0&&l.push(locales_1.default.config.JSON_TABBAR_PATH_SAME_WITH_OTHER.format(o,r));const _=[];a.iconPath&&((0,common_2.checkPath)({value:a.iconPath,tips:`["tabBar"]["list"][${o}]["iconPath"]`,filePath:c,checkPathType:common_2.ECheckPathType.TAB_BAR_ICON}),_.push({name:"iconPath",path:a.iconPath})),a.selectedIconPath&&((0,common_2.checkPath)({value:a.selectedIconPath,tips:`["tabBar"]["list"][${o}]["selectedIconPath"]`,filePath:c,checkPathType:common_2.ECheckPathType.TAB_BAR_ICON}),_.push({name:"selectedIconPath",path:a.selectedIconPath})),_.forEach((a=>{const n=t.stat(e,a.path);if(!n)return void l.push(locales_1.default.config.NOT_FOUND.format(`["tabBar"]["list"][${o}]["${a.name}"]: "${a.path}"`));if(n.isDirectory)return void l.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(`["tabBar"]["list"][${o}]["${a.name}"]`,locales_1.default.config.FILE));n.size>1024*s.MaxTabbarIconSize&&l.push(locales_1.default.config.JSON_TABBAR_ICON_MAX_SIZE.format([o,a.name,s.MaxTabbarIconSize]));const c=path_1.default.posix.extname(a.path);config_1.TABBAR_ICON_WHITE_LIST.indexOf(c)<0&&l.push(locales_1.default.config.JSON_TABBAR_ICON_EXT.format([o,a.name,config_1.TABBAR_ICON_WHITE_LIST.join("、")]))}))}l.length>0&&(0,common_2.throwError)({msg:l.join("\n"),filePath:c})}function checkWorkers(o){const{project:t,miniprogramRoot:e,filePath:a,inputJSON:n}=o,{workers:c}=n;if(void 0===c)return;const i='["workers"]';""===c&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(i,locales_1.default.config.DIRECTORY),filePath:a});const r=(0,tools_1.getWorkersPath)(c);(0,common_2.checkPath)({value:r,tips:i,filePath:a});const s=t.stat(e,r);s&&s.isDirectory||(0,common_2.throwError)({msg:locales_1.default.config.JSON_CONTENT_SHOULD_BE.format([i,locales_1.default.config.DIRECTORY]),filePath:a}),"string"==typeof n.workers?n.workers=(0,tools_1.normalizePath)(`${n.workers}/`):n.workers.path=(0,tools_1.normalizePath)(`${n.workers.path}/`)}function checkOpenLocationPagePath(o){const{filePath:t,inputJSON:e}=o,{openLocationPagePath:a}=e;if(void 0===a)return;const n='["openLocationPagePath"]';(0,common_2.checkPath)({value:a,tips:n,filePath:t}),checkPageExist(o,a,n)}const checkMainPkgPages=o=>{const{filePath:t,inputJSON:e}=o,{pages:a}=e;if(!a)return;const n={};for(let e=0;e<a.length;e++){const c=a[e],i=`["pages"][${e}]`;(0,common_2.checkPath)({value:c,tips:i,filePath:t}),n[c]&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_PAGES_REPEAT.format(`"${c}"`,'["pages"]'),filePath:t}),n[c]=!0,checkPageExist(o,c,i)}};function checkSitemapLocation(o){const{filePath:t,inputJSON:e}=o,{sitemapLocation:a}=e;if(void 0===a)return;const{project:n,miniprogramRoot:c}=o,i='["sitemapLocation"]';(0,common_2.checkPath)({value:a,tips:i,filePath:t});const r=n.stat(c,a);r&&!r.isDirectory||(0,common_2.throwError)({msg:locales_1.default.config.CORRESPONDING_FILE_NOT_FOUND.format(i,a),filePath:t});".json"!==path_1.default.posix.extname(a)&&(0,common_2.throwError)({msg:locales_1.default.config.EXT_SHOULD_BE_ERROR.format(i,".json"),filePath:t});const s=n.getFile(c,a),l=(0,common_2.checkUTF8)(s,a),_=(0,common_1.checkJSONFormat)(l,a),f=(0,schemaValidate_1.schemaValidate)("sitemap",_);(0,schemaValidate_1.transValidateResult)(a,f)}function checkSubpackages(o){const{project:t,miniprogramRoot:e,filePath:a,inputJSON:n}=o;let c='["subPackages"]';n.subpackages&&(c='["subpackages"]',n.subPackages=n.subpackages,delete n.subpackages);const i=[];if(n.subPackages){const r=t.attrSync(),{setting:s}=r;n.subPackages.length>s.MaxSubPackageLimit&&(0,common_2.throwError)({msg:locales_1.default.config.EXCEED_LIMIT.format([c,s.MaxSubPackageLimit]),filePath:a});const l={},_={};for(let r=0;r<n.subPackages.length;r++){const s=n.subPackages[r],f=`${c}[${r}]`;if((0,common_2.checkPath)({value:s.root,tips:`${c}[${r}]["root"]`,filePath:a}),s.root===config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT){i.push(locales_1.default.config.JSON_CONTENT_SHOULD_NOT_BE.format(`${c}[${r}]["root"]`,config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT));continue}if(s.name){if(s.name===config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT){i.push(locales_1.default.config.JSON_CONTENT_SHOULD_NOT_BE.format(`${c}[${r}]["name"]`,config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT));continue}if(_[s.name]){i.push(locales_1.default.config.SAME_ITEM.format(f,_[s.name],"name"));continue}_[s.name]=f}if(s.root=(0,tools_1.normalizePath)(`${s.root}/`),l[s.root]){i.push(locales_1.default.config.SAME_ITEM.format(f,l[s.root],"root"));continue}l[s.root]=f;const h=t.stat(e,s.root);if(!h){i.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format([`${c}[${r}]["root"]`,locales_1.default.config.DIRECTORY]));continue}if(!h.isDirectory){i.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format([`${c}[${r}]["root"]`,locales_1.default.config.DIRECTORY]));continue}const g={};for(let t=0,e=s.pages.length;t<e;t++){const e=s.pages[t];(0,common_2.checkPath)({value:e,tips:`${c}[${r}]["pages"][${t}]`,filePath:a});const n=(0,tools_1.normalizePath)(path_1.default.posix.join(s.root,e));g[n]?i.push(locales_1.default.config.JSON_PAGES_REPEAT.format([`"${e}"`,`${c}[${r}]`])):(g[n]=!0,checkPageExist(o,n,`${c}[${r}]["pages"][${t}]`))}}i.length>0&&(0,common_2.throwError)({msg:i.join("\n"),filePath:a});for(let o=0;o<n.subPackages.length;o++){const t=n.subPackages[o];let e=-1;const a=`/${t.root}`;n.subPackages.forEach(((t,n)=>{if(n!==o&&t.root){const o=`/${t.root}`;a.startsWith(o)&&(e=n)}})),-1===e||i.push(locales_1.default.config.JSON_SHOULD_NOT_CONTAIN.format(`${c}[${e}]["root"]`,`${c}[${o}]["root"]`))}i.length>0&&(0,common_2.throwError)({msg:i.join("\n"),filePath:a})}}function checkPlugins(o){const{filePath:t,inputJSON:e,project:a}=o,n=[],c=e.plugins||{},i=(0,projectconfig_1.getProjectConfigJSON)(a),r=(null==i?void 0:i.pluginAppid)||a.appid;function s(o,t){const e=a.type===config_1.COMPILE_TYPE.miniProgramPlugin;if(e||"dev"!==o.version)if(e)"dev"===o.version&&o.provider!==r?n.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(`${t}["provider"]`,`"${r}"`)):o.provider===r&&"dev"!==o.version&&n.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(`${t}["version"]`,'"dev"'));else{if("dev"===o.version||"latest"===o.version||/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/.test(o.version)||/^dev-[A-Za-z0-9]+$/.test(o.version))return!0;n.push(locales_1.default.config.JSON_CONTENT_SHOULD_BE.format([`${t}["version"]`,locales_1.default.config.TRIPLE_NUMBER_DOT]))}else n.push(`${locales_1.default.config.JSON_CONTENT_SHOULD_NOT_BE.format(`${t}["version"]`,"dev")}\n${locales_1.default.config.PLEASE_CHOOSE_PLUGIN_MODE}`)}for(const o in c){s(c[o],`["plugins"]["${o}"]`)}e.subPackages&&e.subPackages.forEach(((o,t)=>{if(!o.plugins)return;const e=`["subPackages"][${t}]`;for(const t in o.plugins){s(o.plugins[t],`${e}["plugins"]["${t}"]`)}})),n.length>0&&(0,common_2.throwError)({msg:n.join("\n"),filePath:t})}function checkNavigateToMiniProgramAppIdList(o){const{filePath:t,inputJSON:e,project:a}=o,n=[];if(e.navigateToMiniProgramAppIdList){const o=a.attrSync(),{appType:t=config_1.APP_TYPE.NORMAL,setting:c}=o;if(t!==config_1.APP_TYPE.NATIVE){const o=null==c?void 0:c.NavigateMiniprogramLimit;e.navigateToMiniProgramAppIdList.length>o&&n.push(locales_1.default.config.EXCEED_LIMIT.format('["navigateToMiniProgramAppIdList"]',o))}}n.length>0&&(0,common_2.throwError)({msg:n.join("\n"),filePath:t})}function checkFunctionalPages(o){const{inputJSON:t}=o;if(t.functionalPages&&"object"!==(0,tools_1.getType)(t.functionalPages)){const o='["functionalPages"] 配置需要更新,详见文档: https://developers.weixin.qq.com/miniprogram/dev/framework/plugin/functional-pages.html';t.__warning__?t.__warning__=`${t.__warning__}\n${o}`:t.__warning__=o}}function checkPreloadRule(o,t){const{inputJSON:e,filePath:a}=o,{preloadRule:n,subPackages:c}=e;if(!n||!c)return;const i=[],r={},s={},l={};t.forEach((o=>{r[o.root]=!0,l[o.path]=!0,o.name&&(s[o.name]=!0)}));for(const o in n){if(!l[o]&&!o.includes("__plugin__/")){i.push(locales_1.default.config.NOT_FOUND.format(`["preloadRule"]["${o}"]: ${locales_1.default.config.PAGE_PATH}`));continue}const t=n[o];for(let e=0,a=t.packages.length;e<a;e++){let a=t.packages[e];a!==config_1.MINI_PROGRAM_MAIN_PACKAGE_ROOT&&(s[a]||(a=(0,tools_1.normalizePath)(`${a}/`),r[a]||i.push(locales_1.default.config.NOT_FOUND.format(`["preloadRule"]["${o}"]["packages"][${e}]: ${a}`))))}}i.length>0&&(0,common_2.throwError)({msg:i.join("\n"),filePath:a})}function checkEntryPagePath(o,t){const{inputJSON:e,filePath:a}=o,{entryPagePath:n}=e;if(!n)return;(0,common_2.checkPath)({value:n,tips:'["entryPagePath"]',filePath:a});let c=!1;for(const o of t)if(o.path===n){c=!0;break}c||(0,common_2.throwError)({msg:locales_1.default.config.JSON_ENTRY_PAGE_PATH_NOT_FOUND.format(["pages、subPackages","entryPagePath"]),filePath:a})}function checkTabbarPage(o){const{filePath:t,inputJSON:e}=o,{tabBar:a,pages:n=[]}=e;if(!a)return;const c=[];for(let o=0;o<a.list.length;o++){const t=a.list[o],{pagePath:e}=t;n.indexOf(e)<0&&c.push(`["tabBar"][${o}]["pagePath"]: "${e}" need in ["pages"]`)}c.length>0&&(0,common_2.throwError)({msg:c.join("\n"),filePath:t})}function checkMainPkgPageIsInSubpkg(o){const{filePath:t,inputJSON:e}=o,{subPackages:a,pages:n=[]}=e;if(!a)return;const c=[];for(let o=0;o<a.length;o++){const t=a[o];for(let e=0;e<n.length;e++){const a=n[e];a.startsWith(t.root)&&c.push(locales_1.default.config.SHOULD_NOT_IN.format([`["pages"][${e}]: "${a}"`,`["subPackages"][${o}]`]))}}c.length>0&&(0,common_2.throwError)({msg:c.join("\n"),filePath:t})}function checkMainPkgPluginIsInSubPkg(o){const{filePath:t,inputJSON:e}=o,{plugins:a={},subPackages:n}=e,c={},i={},r=[];for(const o in a){const t=a[o],e=`["plugins"]["${o}"]`;c[t.provider]?r.push(locales_1.default.config.SAME_ITEM.format(`["plugins"]["${o}"]`,c[t.provider].tips,"provider")):c[t.provider]=i[o]={provider:t.provider,version:t.version,alias:o,tips:e}}if(n)for(let o=0;o<n.length;o++){const t=n[o];if(t.plugins)for(const e in t.plugins){const a=`["subPackages"][${o}]["plugins"]`,n=t.plugins[e];c[n.provider]?r.push(locales_1.default.config.SAME_ITEM.format(`${a}["${e}"]`,c[n.provider].tips,"provider")):i[e]?r.push(locales_1.default.config.PLUGINS_SAME_ALIAS.format(`${a}["${e}"]`,i[e].tips)):c[n.provider]=i[e]={provider:n.provider,version:n.version,alias:n,tips:a}}}r.length>0&&(0,common_2.throwError)({msg:r.join("\n"),filePath:t})}function checkComponentPath(o){const{project:t,miniprogramRoot:e,filePath:a,inputJSON:n}=o;(0,common_1.checkComponentPath)({project:t,root:e,relativePath:path_1.default.posix.relative(e,a),inputJSON:n})}function checkEntranceDeclare(o){const t=o.inputJSON;if(!t.entranceDeclare||!t.entranceDeclare.locationMessage)return;let e=t.pages||[];t.subpackages&&(e=e.concat(t.subpackages.map((o=>o.pages.map((t=>o.root+t))))),e=lodash_1.default.flattenDeep(e)),t.subPackages&&(e=e.concat(t.subPackages.map((o=>o.pages.map((t=>o.root+t))))),e=lodash_1.default.flattenDeep(e));const a=[],n=t.entranceDeclare.locationMessage.path;void 0===n?a.push(locales_1.default.config.JSON_ENTRANCE_DECLARE_PATH_EMPTY.format([])):e.includes(n)||a.push(locales_1.default.config.JSON_ENTRANCE_DECLARE_PATH_ERR.format([n||"undefined"])),a.length>0&&(0,common_2.throwError)({msg:a.join("\n"),filePath:o.filePath})}function getAppJSONVariableDecalearProperty(o){const{windowPropertWhiteList:t,tabBarPropertyWhiteList:e,tabbarListItemPropertyWhiteList:a}=config_1.jsonVariablePropertyWhiteList;let n=[];return"[object Object]"===Object.prototype.toString.call(o.window)&&(n=n.concat(Object.keys(o.window).filter((o=>t.includes(o))).map((t=>({property:`["window"]["${t}"]`,value:o.window[t]}))).filter((o=>"string"==typeof o.value&&o.value.startsWith("@"))))),"[object Object]"===Object.prototype.toString.call(o.tabBar)&&(n=n.concat(Object.keys(o.tabBar).filter((o=>e.includes(o))).map((t=>({property:`["tabBar"]["${t}"]`,value:o.tabBar[t]}))).filter((o=>"string"==typeof o.value&&o.value.startsWith("@")))),Array.isArray(o.tabBar.list)&&o.tabBar.list.forEach(((t,e)=>{n=n.concat(Object.keys(t).filter((o=>a.includes(o))).map((t=>({property:`["tabBar"]["list"][${e}]["${t}"]`,value:o.tabBar.list[e][t]}))).filter((o=>"string"==typeof o.value&&o.value.startsWith("@"))))}))),n}function checkOpenDataContext(o,t){const{project:e,miniprogramRoot:a,filePath:n}=o,{openDataContext:c}=t;if(void 0===c)return;(0,common_2.checkPath)({value:c,tips:'["openDataContext"]',filePath:n});const i=e.stat(a,c);i&&i.isDirectory||(0,common_2.throwError)({msg:locales_1.default.config.JSON_CONTENT_SHOULD_BE.format(['["openDataContext"]',locales_1.default.config.DIRECTORY]),filePath:n});const r=path_1.default.posix.join(c,"./index.js"),s=e.stat(a,r);s&&s.isFile||(0,common_2.throwError)({msg:locales_1.default.config.CORRESPONDING_FILE_NOT_FOUND.format('["openDataContext"]',r),filePath:n}),t.openDataContext=(0,tools_1.normalizePath)(`${c}/`)}function checkRenderer(o){var t,e,a,n;const{filePath:c,inputJSON:i}=o,{renderer:r,lazyCodeLoading:s,rendererOptions:l}=i;if("skyline"===r&&"requiredComponents"!==s&&(0,common_2.throwError)({msg:locales_1.default.config.APP_JSON_SHOULD_SET_LAZYCODELOADING.format("app.json"),filePath:c}),"skyline"===r&&(void 0===l?(0,common_2.throwError)({msg:locales_1.default.config.JSON_SHOULD_SET_RENDEREROPTIONS.format("app.json"),filePath:c}):void 0===l.skyline&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_SHOULD_SET_RENDEREROPTIONS_SKYLINE.format("app.json"),filePath:c})),"skyline"===r||(null==l?void 0:l.skyline)){const o=(null===(t=i.window)||void 0===t?void 0:t.navigationBarTextStyle)||(null===(e=i.window)||void 0===e?void 0:e.navigationBarTitleText)||(null===(a=i.window)||void 0===a?void 0:a.navigationBarBackgroundColor),c="custom"===(null===(n=i.window)||void 0===n?void 0:n.navigationStyle);if(o&&!c){const o=locales_1.default.config.APP_JSON_SKYLINE_WINDOW_TIPS.format("");i.__warning__?i.__warning__=`${i.__warning__}\n${o}`:i.__warning__=o}}}function checkResolveAlias(o){const{filePath:t,inputJSON:e}=o,{resolveAlias:a}=e;if(a){const o=o=>o.includes("//");for(const e in a)(o(e)||o(a[e]))&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_RESOLVE_ALIAS_ILLEGAL.format(e,a[e]),filePath:t}),a[e].startsWith("./")&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_RESOLVE_ALIAS_SHOULD_NOT_START_WITH.format(a[e]),filePath:t}),e.endsWith("/*")&&a[e].endsWith("/*")||(0,common_2.throwError)({msg:locales_1.default.config.JSON_RESOLVE_ALIAS_INCLUDE_STAR.format(e,a[e]),filePath:t})}}exports.checkMainPkgPages=checkMainPkgPages;const detailLocationApis={getLocation:!0,onLocationChange:!0,startLocationUpdate:!0,startLocationUpdateBackground:!0};function checkRequiredPrivateInfos(o){const{filePath:t,inputJSON:e}=o,{requiredPrivateInfos:a}=e;if(a){if(a.indexOf("getFuzzyLocation")>=0){const o=[];for(let t=0;t<a.length;t++){const e=a[t];detailLocationApis[e]&&o.push(`'${e}'`)}o.length>0&&(0,common_2.throwError)({msg:locales_1.default.config.JSON_REQUIRED_PRIVATE_INFOS_MUTUALLY_EXCLUSIVE.format("'getFuzzyLocation'",o.join("、")),filePath:t})}}}function checkAccountCardPackage(o){const{project:t,filePath:e,inputJSON:a,miniprogramRoot:n}=o,{accountCardPackage:c}=a;if(c){c.root=(0,tools_1.normalizePath)(`${c.root}/`);const o=a.subPackages||a.subpackages||[];console.log("subPackages",o),o.find((o=>o.root===c.root&&o.independent))||(0,common_2.throwError)({msg:locales_1.default.config.ACCOUNT_CARD_PACKAPGE_IN_VALID.format(),filePath:e});for(const o of c.cardList){const{componentPath:a}=o,i=path_1.default.posix.join(c.root,`${a}.js`);t.stat(n,path_1.default.posix.join(c.root,`${a}.js`))||(0,common_2.throwError)({msg:locales_1.default.config.CORRESPONDING_FILE_NOT_FOUND.format('["accountCardPackage"]',i),code:config_1.FILE_NOT_FOUND,filePath:e})}}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getExtJSON=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=require("lodash"),cache_1=require("../../../../../utils/cache"),common_1=require("../common"),common_2=require("../../../../../utils/common"),tools_1=require("../../../../../utils/tools"),projectconfig_1=require("../projectconfig"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),schemaValidate_1=require("../../validate/schemaValidate"),theme_1=require("../theme"),reactiveCache_1=require("../reactiveCache"),checkAppFields_1=require("./checkAppFields");function checkExtPages(e){const{project:o,inputJSON:t,filePath:c,miniprogramRoot:a}=e,{extPages:i}=t;if(i)for(const e in i){const t=i[e];if(t){t.navigationBarBackgroundColor&&!(0,tools_1.isHexColor)(t.navigationBarBackgroundColor)&&(0,common_2.throwError)({msg:`["extPages"]["${e}"]["navigationBarBackgroundColor"]: "${t.navigationBarBackgroundColor}" is not hexColor`,filePath:c}),t.backgroundColor&&!(0,tools_1.isHexColor)(t.backgroundColor)&&(0,common_2.throwError)({msg:`["extPages"]["${e}"]["backgroundColor"]: "${t.backgroundColor}" is not hexColor`,filePath:c});try{(0,checkAppFields_1.checkComponentPath)({project:o,miniprogramRoot:a,inputJSON:t,filePath
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getExtJSON=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=require("lodash"),cache_1=require("../../../../../utils/cache"),common_1=require("../common"),common_2=require("../../../../../utils/common"),tools_1=require("../../../../../utils/tools"),projectconfig_1=require("../projectconfig"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),schemaValidate_1=require("../../validate/schemaValidate"),theme_1=require("../theme"),reactiveCache_1=require("../reactiveCache"),checkAppFields_1=require("./checkAppFields");function checkExtPages(e){const{project:o,inputJSON:t,filePath:c,miniprogramRoot:a}=e,{extPages:i}=t;if(i)for(const e in i){const t=i[e];if(t){t.navigationBarBackgroundColor&&!(0,tools_1.isHexColor)(t.navigationBarBackgroundColor)&&(0,common_2.throwError)({msg:`["extPages"]["${e}"]["navigationBarBackgroundColor"]: "${t.navigationBarBackgroundColor}" is not hexColor`,filePath:c}),t.backgroundColor&&!(0,tools_1.isHexColor)(t.backgroundColor)&&(0,common_2.throwError)({msg:`["extPages"]["${e}"]["backgroundColor"]: "${t.backgroundColor}" is not hexColor`,filePath:c});try{(0,checkAppFields_1.checkComponentPath)({project:o,miniprogramRoot:a,inputJSON:t,filePath:`${e}.json`})}catch(o){(0,common_2.throwError)({msg:`["extPages"]["${e}"]${o.message}`,filePath:c})}}}}exports.getExtJSON=(0,reactiveCache_1.wrapCompileJSONFunc)(cache_1.CACHE_KEY.EXT_JSON,(e=>{const o=(0,projectconfig_1.getProjectConfigJSON)(e),{miniprogramRoot:t=""}=o,c=e.attrSync(),a="ext.json",i=(0,tools_1.normalizePath)(path_1.default.posix.join(t,a));if(!e.exists(i))return;if(!c||!c.platform)return e.stat(t,a)?{__warning__:locales_1.default.config.EXT_JSON_INVALID.format(e.appid,"https://developers.weixin.qq.com/miniprogram/dev/devtools/ext.html")}:void 0;if(!e.stat(t,a))return;const r=e.getFile(t,a),n=(0,common_1.checkJSONFormat)((0,common_2.checkUTF8)(r,i),i);if(!n.extEnable)return{};const l=(0,theme_1.getThemeLocation)(e);let s={};l&&(s=(0,theme_1.checkThemeJSON)(e,{themeLocation:l}));const h=(0,theme_1.mergeThemeJSONToAppJSON)(s,n),p=(0,schemaValidate_1.schemaValidate)("ext",h.appJSONLight),_=(0,schemaValidate_1.schemaValidate)("ext",h.appJSONDark);p.warning&&(n.__warning__=locales_1.default.config.INVALID.format(p.warning)),_.warning&&(n.__warning__=locales_1.default.config.INVALID.format(_.warning)),(0,schemaValidate_1.transValidateResult)(i,p),(0,schemaValidate_1.transValidateResult)(i,_),n.extAppid||(0,common_2.throwError)({msg:`${locales_1.default.config.EXT_APPID_SHOULD_NOT_BE_EMPTY}`,filePath:i});const m={filePath:i,project:e,miniprogramRoot:t,inputJSON:n},g=(0,lodash_1.cloneDeep)(m);g.inputJSON=h.appJSONLight,g.mode="light";const d=(0,lodash_1.cloneDeep)(m);return d.inputJSON=h.appJSONDark,d.mode="dark",(0,checkAppFields_1.checkMainPkgPages)(m),(0,checkAppFields_1.checkMainPkgPages)(m),(0,checkAppFields_1.checkSubpackages)(m),(0,checkAppFields_1.checkTabbar)(g),(0,checkAppFields_1.checkTabbar)(d),(0,checkAppFields_1.checkWorkers)(m),(0,checkAppFields_1.checkFunctionalPages)(m),(0,checkAppFields_1.checkOpenLocationPagePath)(m),(0,checkAppFields_1.checkPlugins)(m),(0,checkAppFields_1.checkWindow)(g),(0,checkAppFields_1.checkWindow)(d),(0,checkAppFields_1.checkComponentPath)(m),checkExtPages(m),n}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getExtJSON=exports.getAppJSON=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=require("lodash"),cache_1=require("../../../../../utils/cache"),projectconfig_1=require("../projectconfig"),common_1=require("../../../../../utils/common"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),theme_1=require("../theme"),reactiveCache_1=require("../reactiveCache"),tools_1=require("../../../../../utils/tools"),appJSON_1=require("./appJSON"),extJSON_1=require("./extJSON");function mergeExtJSON(e,t){if(t)for(const o in t)if("__warning__"!==o){if("extPages"!==o){if("plugins"===o||"supportedMaterials"===o){e[o]=t[o];continue}"object"===(0,tools_1.getType)(t[o])?"object"!==(0,tools_1.getType)(e[o])?e[o]=Object.assign({},t[o]):e[o]=Object.assign({},e[o]||{},t[o]):e[o]=t[o]}}else e.__warning__=e.__warning__?`${e.__warning__}、${t.__warning__}`:t.__warning__}exports.getAppJSON=(0,reactiveCache_1.wrapCompileJSONFunc)(cache_1.CACHE_KEY.COMPILED_APP_JSON,e=>{const t=(0,projectconfig_1.getProjectConfigJSON)(e),{miniprogramRoot:o=""}=t;let r=(0,appJSON_1.getAppJSON)(e);const i=(0,extJSON_1.getExtJSON)(e);if(i&&(r=(0,lodash_1.cloneDeep)(r),mergeExtJSON(r,i),i.extEnable))try{const t=(0,theme_1.getThemeLocation)(e);let i={};t&&(i=(0,theme_1.checkThemeJSON)(e,{themeLocation:t}));const _=(0,theme_1.mergeThemeJSONToAppJSON)(i,r);(0,appJSON_1.checkAppJSON)({project:e,miniprogramRoot:o,inputJSON:_.appJSONLight,filePath:path_1.default.posix.join(o,"app.json")}),(0,appJSON_1.checkAppJSON)({project:e,miniprogramRoot:o,inputJSON:_.appJSONDark,filePath:path_1.default.posix.join(o,"app.json")})}catch(e){(0,common_1.throwError)({msg:e.message,code:e.code,filePath:`app.json ${locales_1.default.config.OR} ext.json`})}return r});var extJSON_2=require("./extJSON");Object.defineProperty(exports,"getExtJSON",{enumerable:!0,get:function(){return extJSON_2.getExtJSON}});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getExtJSON=exports.getAppJSON=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=require("lodash"),cache_1=require("../../../../../utils/cache"),projectconfig_1=require("../projectconfig"),common_1=require("../../../../../utils/common"),locales_1=tslib_1.__importDefault(require("../../../../../utils/locales/locales")),theme_1=require("../theme"),reactiveCache_1=require("../reactiveCache"),tools_1=require("../../../../../utils/tools"),appJSON_1=require("./appJSON"),extJSON_1=require("./extJSON");function mergeExtJSON(e,t){if(t)for(const o in t)if("__warning__"!==o){if("extPages"!==o){if("plugins"===o||"supportedMaterials"===o){e[o]=t[o];continue}"object"===(0,tools_1.getType)(t[o])?"object"!==(0,tools_1.getType)(e[o])?e[o]=Object.assign({},t[o]):e[o]=Object.assign({},e[o]||{},t[o]):e[o]=t[o]}}else e.__warning__=e.__warning__?`${e.__warning__}、${t.__warning__}`:t.__warning__}exports.getAppJSON=(0,reactiveCache_1.wrapCompileJSONFunc)(cache_1.CACHE_KEY.COMPILED_APP_JSON,(e=>{const t=(0,projectconfig_1.getProjectConfigJSON)(e),{miniprogramRoot:o=""}=t;let r=(0,appJSON_1.getAppJSON)(e);const i=(0,extJSON_1.getExtJSON)(e);if(i&&(r=(0,lodash_1.cloneDeep)(r),mergeExtJSON(r,i),i.extEnable))try{const t=(0,theme_1.getThemeLocation)(e);let i={};t&&(i=(0,theme_1.checkThemeJSON)(e,{themeLocation:t}));const _=(0,theme_1.mergeThemeJSONToAppJSON)(i,r);(0,appJSON_1.checkAppJSON)({project:e,miniprogramRoot:o,inputJSON:_.appJSONLight,filePath:path_1.default.posix.join(o,"app.json")}),(0,appJSON_1.checkAppJSON)({project:e,miniprogramRoot:o,inputJSON:_.appJSONDark,filePath:path_1.default.posix.join(o,"app.json")})}catch(e){(0,common_1.throwError)({msg:e.message,code:e.code,filePath:`app.json ${locales_1.default.config.OR} ext.json`})}return r}));var extJSON_2=require("./extJSON");Object.defineProperty(exports,"getExtJSON",{enumerable:!0,get:function(){return extJSON_2.getExtJSON}});
|