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/ci/upload.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MIN_COS_UPLOAD_SIZE=void 0,exports.upload=upload,exports.innerUpload=innerUpload;const tslib_1=require("tslib"),log=tslib_1.__importStar(require("../utils/log")),request_1=require("../utils/request"),pack_1=require("./utils/pack"),zlib_1=tslib_1.__importDefault(require("zlib")),sign_1=require("../utils/sign"),tools_1=require("../utils/tools"),config_1=require("../config/config"),taskstatus_1=require("../utils/taskstatus"),error_1=require("../utils/error"),locales_1=tslib_1.__importDefault(require("../utils/locales/locales")),querystring_1=tslib_1.__importDefault(require("querystring")),progressupdate_1=require("./utils/progressupdate"),url_config_1=require("../config/url.config"),jsonParse_1=require("../utils/jsonParse"),cache_1=require("../utils/cache"),cos_upload_1=require("./cos-upload"),getcompiler_1=require("./getcompiler"),tools_2=require("./utils/tools"),index_1=require("../utils/asyncTask/index"),businesstype_1=require("../config/businesstype");async function upload(e){var o,r;const t=await innerUpload(e);(null===(o=t.respBody)||void 0===o?void 0:o.dev_plugin_id)&&(log.log(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MIN_COS_UPLOAD_SIZE=void 0,exports.upload=upload,exports.innerUpload=innerUpload;const tslib_1=require("tslib"),log=tslib_1.__importStar(require("../utils/log")),request_1=require("../utils/request"),pack_1=require("./utils/pack"),zlib_1=tslib_1.__importDefault(require("zlib")),sign_1=require("../utils/sign"),tools_1=require("../utils/tools"),config_1=require("../config/config"),taskstatus_1=require("../utils/taskstatus"),error_1=require("../utils/error"),locales_1=tslib_1.__importDefault(require("../utils/locales/locales")),querystring_1=tslib_1.__importDefault(require("querystring")),progressupdate_1=require("./utils/progressupdate"),url_config_1=require("../config/url.config"),jsonParse_1=require("../utils/jsonParse"),cache_1=require("../utils/cache"),cos_upload_1=require("./cos-upload"),getcompiler_1=require("./getcompiler"),tools_2=require("./utils/tools"),index_1=require("../utils/asyncTask/index"),businesstype_1=require("../config/businesstype");async function upload(e){var o,r;const t=await innerUpload(e);(null===(o=t.respBody)||void 0===o?void 0:o.dev_plugin_id)&&(log.log(`Development Version Plugin ID: ${t.respBody.dev_plugin_id}`),t.devPluginId=t.respBody.dev_plugin_id);const i={subPackageInfo:t.subPackageInfo,pluginInfo:t.pluginInfo,devPluginId:t.devPluginId};return(null===(r=t.respBody)||void 0===r?void 0:r.str_uint64version)&&(i.strUint64Version=t.respBody.str_uint64version),i}async function innerUpload(e){const{project:o,setting:r={useProjectConfig:!1},desc:t=`robot ${e.robot||"1"} use miniprogram-ci to upload at ${(0,tools_1.formatTime)(new Date)}`,version:i="",robot:s="1",test:n,pagePath:a,searchQuery:l,threads:u=0,bigPackageSizeSupport:p,onProgressUpdate:_=(()=>{})}=e,d=(0,progressupdate_1.transProgressUpdate)(_);let{useCOS:c}=e;if(process.env.COMPILE_THREADS=u.toString(),!i)throw new error_1.CodeError(locales_1.default.config.PARAM_ERROR.format("upload","version"),config_1.PARAM_ERROR);if(!o)throw new error_1.CodeError(locales_1.default.config.PARAM_ERROR.format("upload","project"),config_1.PARAM_ERROR);cache_1.cacheManager.clean();const g=await(0,getcompiler_1.getCompiler)(o,r),f=(0,tools_2.formatCISetting)(o,r),y=await g.compile({setting:f,onProgressUpdate:d,resultType:"prod",disableSpreadingUsingComponents:!0}),b=config_1.CI_VERSION,S={codeprotect:r.codeProtect?1:0,type:o.type,appid:o.appid,version:i,desc:t,robot:s},P={scene:e.scene||1011};let q;a&&(P.path=a,S.path=a),l&&(P.query=querystring_1.default.parse(l)),S.debugLaunchInfo=JSON.stringify(P),a&&l&&(S.path+=`?${l}`),n&&p&&(S.bigPackageSizeSupport=1);let m={};try{q=await o.getFile(o.miniprogramRoot,"ext.json"),m=JSON.parse(q.toString("utf-8"))}catch(e){}if(m&&(m.extEnable&&(S.extAppId=m.extAppid),m.directCommit)){let e="";e=m.extEnable?"The code will be uploaded into the waiting list of extAppid.":"The code will be uploaded into the draft box of the third-party platform.",log.warn(e)}try{const r=new taskstatus_1.TaskStatus(locales_1.default.config.UPLOAD.toString());d(r);const t=`${n?url_config_1.TEST_SOURCE_URL:url_config_1.UPLOAD_URL}?${querystring_1.default.stringify(S)}`;let i,a=!1,l=0;const u=(0,pack_1.pack)(y),p=zlib_1.default.gzipSync(u.buffer);if(log.info("useCOS parameter: ",c),log.info("upload zip buffer size: ",p.length),void 0===c&&(c=p.length>exports.MIN_COS_UPLOAD_SIZE),c){log.info("upload by COS: ",c);const r=await(0,cos_upload_1.uploadByCosSafely)(p,t,o,s,n?businesstype_1.BUSINESS_TYPE.BusiType_TestSource:businesstype_1.BUSINESS_TYPE.BusiType_CommitSource,e.onProgressUpdate);r.fallback?(a=r.fallback,log.info("upload by COS failed, fallback to http way")):(i={body:r.body},l=r.uploadCOSCostTime)}if(!c||a){const e=await(0,sign_1.getSignature)(o.privateKey,o.appid);y[index_1.SIGNATURE_FILE_NAME]=JSON.stringify({signature:e,version:b});const r=(0,pack_1.pack)(y),s=zlib_1.default.gzipSync(r.buffer);log.info("request url:",t);const n=(await(0,request_1.request)({url:t,method:"post",body:s})).body.toString();if(i=(0,jsonParse_1.jsonRespParse)(n,t),0!==i.errCode)throw new Error(n)}r.done(),d(r);const _={respBody:i.body};if(Array.isArray(i.body.subpackage_info)){const e=i.body.subpackage_info;_.subPackageInfo=e}if(Array.isArray(i.body.ext_plugin_info)){const e=i.body.ext_plugin_info;_.pluginInfo=e.map((e=>({pluginProviderAppid:e.provider,version:e.version,size:e.size})))}return g.destroy(),_}catch(e){throw new error_1.CodeError(e.toString(),config_1.UPLOAD_CGI_ERR)}}exports.MIN_COS_UPLOAD_SIZE=5242880;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeDenpendencyQualityChecker=void 0;const tslib_1=require("tslib"),path=tslib_1.__importStar(require("path")),babel_helper_1=require("../../utils/babel_helper");function findParent(e,a,t,s){const i=new Set(Array.isArray(e)?e:[e]),r=new Set,n=new Set;for(;i.size>0;){const e=i.values().next().value;r.add(e),i.delete(e),t(e)&&n.add(e),(null==s?void 0:s(e))||e.parentDeps.forEach(e=>{e.originModule&&!r.has(e.originModule)&&i.add(e.originModule)})}return Array.from(n.values())}function isCodeFile(e){return/\.(json|wxml|wxss|js|wxs|ts|less|sass|scss)/.test(e)}function isMiniProgramCodeFile(e){return/\.(json|wxml|wxss|js|wxs)/.test(e)}function mapToMiniProgramFile(e){const a=path.posix.extname(e);return isMiniProgramCodeFile(a)?e:".ts"===a
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CodeDenpendencyQualityChecker=void 0;const tslib_1=require("tslib"),path=tslib_1.__importStar(require("path")),babel_helper_1=require("../../utils/babel_helper");function findParent(e,a,t,s){const i=new Set(Array.isArray(e)?e:[e]),r=new Set,n=new Set;for(;i.size>0;){const e=i.values().next().value;r.add(e),i.delete(e),t(e)&&n.add(e),(null==s?void 0:s(e))||e.parentDeps.forEach((e=>{e.originModule&&!r.has(e.originModule)&&i.add(e.originModule)}))}return Array.from(n.values())}function isCodeFile(e){return/\.(json|wxml|wxss|js|wxs|ts|less|sass|scss)/.test(e)}function isMiniProgramCodeFile(e){return/\.(json|wxml|wxss|js|wxs)/.test(e)}function mapToMiniProgramFile(e){const a=path.posix.extname(e);return isMiniProgramCodeFile(a)?e:".ts"===a?`${e.substring(0,e.length-3)}.js`:`${e.substring(0,e.length-5)}.wxss`}class CodeDenpendencyQualityChecker{constructor(e,a){if(this.analyzer=a,this.reservedFile=e=>e.indexOf(this.babelRoot)>=0,a.invalid)throw new Error("analyzer is invalid");if(!a.graph)throw new Error("analyzer graph is not built");this.babelRoot=(0,babel_helper_1.getBabelOutputPath)(e.setting)}checkUnusedCodeFiles(){const e=this.analyzer.fileHelper.getFileList("").filter((e=>isCodeFile(path.posix.extname(e)))),a=new Set;return this.analyzer.graph.modules.forEach((t=>{const s=e.find((e=>e===t.path));s&&a.add(s)})),e.forEach((e=>{this.reservedFile(e)&&a.add(e)})),e.filter((e=>!a.has(e)))}checkUnusedMiniProgramCodeFiles(){if(0===this.analyzer.compilerPlugins.length)return this.checkUnusedCodeFiles();const e=this.analyzer.fileHelper.getFileList("").filter((e=>isCodeFile(path.posix.extname(e)))),a=new Set;this.analyzer.graph.modules.forEach((t=>{const s=e.find((e=>e===t.path));s&&a.add(mapToMiniProgramFile(s))})),e.forEach((e=>{this.reservedFile(e)&&a.add(e)}));const t=new Set;return e.forEach((e=>{const s=mapToMiniProgramFile(e);a.has(s)||t.add(s)})),Array.from(t.values())}checkOnlyUsedByOtherPackagesJs(){const e=this.graph.modules.filter((e=>"Js"===e.type&&this.isLocateInMainPackage(e))).filter((e=>{let a=!1;return e.parentDeps.forEach((e=>{e.originModule&&this.isLocateInMainPackage(e.originModule)&&(a=!0)})),!a})).map((e=>e.path)).filter((e=>!this.reservedFile(e)));return{size:this.caculateFilesSize(e),files:e}}checkMainPackageUnusedComponents(){const e=this.graph.modules.filter((e=>"Component"===e.type&&this.isLocateInMainPackage(e))).filter((e=>0===findParent(e,this.graph,(e=>"Page"===e.type&&this.isLocateInMainPackage(e)||"MainPackage"===e.type),(e=>"Page"===e.type)).length));e.filter((e=>{for(const a of e.deps.values())if("Component"!==a.type&&a.module&&a.module.parentDeps.size>1)return!1;return!0}));const a=this.collectCompsFiles(e);return{size:this.caculateFilesSize(a),files:a,comps:e.map((e=>e.path.replace(/\.json$/,"")))}}async checkUnusedPlugins(){if("miniprogram"!==this.analyzer.type)throw new Error(`checkUnusedPlugins only support miniprogram, the analyzer.type is ${this.analyzer.type}`);const e=new Set,a=await this.analyzer.fileHelper.getJSON("app.json");a.plugins&&Object.keys(a.plugins).forEach((t=>{const s=a.plugins[t].provider;this.graph.modules.find((e=>{var a,i;return(null===(a=e.usePlugins)||void 0===a?void 0:a.has(t))||(null===(i=e.usePlugins)||void 0===i?void 0:i.has(s))}))||e.add(s)}));const t=a.subpackages||a.subPackages;return t&&t.forEach((a=>{const t=a.root;a.plugins&&Object.keys(a.plugins).forEach((s=>{const i=a.plugins[s].provider;this.graph.modules.find((e=>{var a,r;return e.path.startsWith(t)&&((null===(a=e.usePlugins)||void 0===a?void 0:a.has(s))||(null===(r=e.usePlugins)||void 0===r?void 0:r.has(i)))}))||e.add(i)}))})),Array.from(e)}async checkUnusedComponents(){const e=this.graph.modules.filter((e=>"Page"===e.type||"Component"===e.type||"MainPackage"===e.type||"SubPackage"===e.type)),a=[],t=new Set;await Promise.all(e.map((async e=>{let s={};try{s=await this.analyzer.fileHelper.getJSON(e.path)||{}}catch(e){}const i=e=>!!s.componentPlaceholder&&Object.values(s.componentPlaceholder).includes(e),r=a=>{var t;const s=e.findChild("Wxml");if(!s)return!1;if(null===(t=s.useTags)||void 0===t?void 0:t.has(a))return!0;return!!s.findChildrenRecursively("Wxml").find((e=>{var t;return null===(t=e.useTags)||void 0===t?void 0:t.has(a)}))},n=Array.from(e.deps).filter((e=>"Component"===e.type));for(const s of n){("MainPackage"===e.type||"SubPackage"===e.type||r(s.name)||(o=s.name,l=void 0,null===(l=e.useTags)||void 0===l?void 0:l.has(o))||i(s.name))&&s.module?t.add(s.module):a.push({page:e.path,tag:s.name,path:s.path||void 0})}var o,l})));return this.graph.modules.filter((e=>"Component"===e.type&&!t.has(e))).map((e=>e.path))}get graph(){return this.analyzer.graph}getSubpackageRoots(){if(this.subpackageRoots)return this.subpackageRoots;const e=this.analyzer.graph.modules.find((e=>"MainPackage"===e.type)).findChildren("SubPackage");return this.subpackageRoots=e.map((e=>e.path)),this.subpackageRoots}isLocateInMainPackage(e){return!this.getSubpackageRoots().find((a=>e.path.startsWith(a)))}caculateFilesSize(e){return e.reduce(((e,a)=>{const t=this.analyzer.fileHelper.stat(a);return(null==t?void 0:t.size)&&(e+=t.size),e}),0)}caculateResourceFileSize(e){var a,t;let s=0;return null===(t=null===(a=this.analyzer.serialize())||void 0===a?void 0:a.files)||void 0===t||t.forEach((a=>{e.includes(a.ext)&&(s+=a.size)})),s}caculatePackageSize(){var e,a;const t="__APP__",s={[t]:0};return null===(a=null===(e=this.analyzer.serialize())||void 0===e?void 0:e.files)||void 0===a||a.forEach((e=>{e.subPackage?(void 0===s[e.subPackage]&&(s[e.subPackage]=0),s[e.subPackage]+=e.size):s[t]+=e.size})),s}collectCompsFiles(e){return e.map((e=>{const a=[e.path];return e.deps.forEach((e=>{var t;"Component"!==e.type&&e.module&&a.push(null===(t=e.module)||void 0===t?void 0:t.path)})),a})).reduce(((e,a)=>e.concat(a)),[])}}exports.CodeDenpendencyQualityChecker=CodeDenpendencyQualityChecker;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.filterUnusedFile=filterUnusedFile;const tslib_1=require("tslib"),projectconfig_1=require("../../modules/corecompiler/original/json/projectconfig"),path=tslib_1.__importStar(require("path")),code_analyse_1=require("../../common/code-analyse"),code_analyse_2=require("../code-analyse"),babel_helper_1=require("../../utils/babel_helper"),tools_1=require("../../utils/tools");class CodeDataFileHelper{constructor(e,t){this.project=e,this.codes=t,this._dirSet=new Set,this._fileSet=new Set,this._cacheFileSize=new Map;for(const e of Object.keys(this.codes))this._fileSet.add(e.startsWith("/")?e.replace(/^\//,""):e),this.cacheDirName(path.posix.dirname(e))}cacheDirName(e){this._dirSet.has(e)||(this._dirSet.add(e),this.cacheDirName(path.posix.dirname(e)))}cacheFileSize(e){if(this._cacheFileSize.has(e))return this._cacheFileSize.get(e);const t=this.codes[e];let i=0;return i="string"==typeof t?Buffer.from(t,"utf-8").length:t.length,this._cacheFileSize.set(e,i),i}stat(e){const t=this._fileSet.has(e),i=this._dirSet.has(e);if(!t&&!i)return;let r=0;return r=i?Object.keys(this.codes).filter(t=>t.startsWith(e)).reduce((e,t)=>e+this.cacheFileSize(t),0):this.cacheFileSize(e),{isFile:t,isDirectory:i,size:r,mtime:0}}mtime(e){return 0}exist(e){return this.existFile(e)||this.existDir(e)}existDir(e){return e.endsWith("/")&&(e=e.replace(/\/$/,"")),this._dirSet.has(e)}existFile(e){return this._fileSet.has(e)}getFileList(e="",t=""){return Array.from(this._fileSet).filter(i=>(!t||path.extname(i)===t)&&!(e&&!i.startsWith(e)))}async getString(e){const t=this.codes[e];if("string"==typeof t)return t;if(Buffer.isBuffer(t))return t.toString("utf-8");throw new Error(e
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.filterUnusedFile=filterUnusedFile;const tslib_1=require("tslib"),projectconfig_1=require("../../modules/corecompiler/original/json/projectconfig"),path=tslib_1.__importStar(require("path")),code_analyse_1=require("../../common/code-analyse"),code_analyse_2=require("../code-analyse"),babel_helper_1=require("../../utils/babel_helper"),tools_1=require("../../utils/tools");class CodeDataFileHelper{constructor(e,t){this.project=e,this.codes=t,this._dirSet=new Set,this._fileSet=new Set,this._cacheFileSize=new Map;for(const e of Object.keys(this.codes))this._fileSet.add(e.startsWith("/")?e.replace(/^\//,""):e),this.cacheDirName(path.posix.dirname(e))}cacheDirName(e){this._dirSet.has(e)||(this._dirSet.add(e),this.cacheDirName(path.posix.dirname(e)))}cacheFileSize(e){if(this._cacheFileSize.has(e))return this._cacheFileSize.get(e);const t=this.codes[e];let i=0;return i="string"==typeof t?Buffer.from(t,"utf-8").length:t.length,this._cacheFileSize.set(e,i),i}stat(e){const t=this._fileSet.has(e),i=this._dirSet.has(e);if(!t&&!i)return;let r=0;return r=i?Object.keys(this.codes).filter((t=>t.startsWith(e))).reduce(((e,t)=>e+this.cacheFileSize(t)),0):this.cacheFileSize(e),{isFile:t,isDirectory:i,size:r,mtime:0}}mtime(e){return 0}exist(e){return this.existFile(e)||this.existDir(e)}existDir(e){return e.endsWith("/")&&(e=e.replace(/\/$/,"")),this._dirSet.has(e)}existFile(e){return this._fileSet.has(e)}getFileList(e="",t=""){return Array.from(this._fileSet).filter((i=>(!t||path.extname(i)===t)&&!(e&&!i.startsWith(e))))}async getString(e){const t=this.codes[e];if("string"==typeof t)return t;if(Buffer.isBuffer(t))return t.toString("utf-8");throw new Error(`${e} is not in codes`)}async getLocalFileString(e){return this.project.getFile(this.project.miniprogramRoot,e).toString("utf-8")}async getJSON(e){const t=await this.getString(e);try{return JSON.parse(t)}catch(e){return null}}async readdir(e){e.endsWith("/")||(e+="/");const t=Array.from(this._fileSet).filter((t=>t.startsWith(e)));return Array.from(this._dirSet).filter((t=>t.startsWith(e))).concat(t).filter((t=>t.slice(e.length).indexOf("/")<0)).map((t=>t.slice(e.length)))}watchFileChange(e){e()}destroy(){}}async function filterUnusedFile(e,t,i){var r,s;if("miniProgram"!==t.type)return i;const n=await(0,projectconfig_1.getProjectConfigJSON)(t);let o=!1;return o=e?!1!==(null===(r=n.setting)||void 0===r?void 0:r.ignoreDevUnusedFiles):!1!==(null===(s=n.setting)||void 0===s?void 0:s.ignoreUploadUnusedFiles),o?doFilterUnusedFile(t,i):i}function checkUnusedCodeFiles(e,t){var i;const r=t.fileHelper.getFileList("").filter((e=>{return t=path.posix.extname(e),/\.(json|wxml|wxss|js|wxs|ts|less|sass|scss)/.test(t);var t})),s=new Set;t.graph.modules.forEach((e=>{const t=r.find((t=>t===e.path));t&&s.add(t)}));const n=(0,babel_helper_1.getBabelOutputPath)((null===(i=(0,projectconfig_1.getProjectConfigJSON)(e))||void 0===i?void 0:i.setting)||{});return r.forEach((e=>{(function(e){return e.indexOf(n)>=0})(e)&&s.add(e)})),r.filter((e=>!s.has(e)))}async function doFilterUnusedFile(e,t){var i;const r=(0,projectconfig_1.getProjectConfigJSON)(e),s=(0,code_analyse_2.transCompileType)(e);if("gamePlugin"===s)throw new Error("gamePlugin is not support yet!");let n="plugin"===s?r.pluginRoot:r.miniprogramRoot;n=n?path.posix.join(e.projectPath,n):e.projectPath;const o=new CodeDataFileHelper(e,t),a=new code_analyse_1.Analyzer({root:n,type:s,fileHelper:o,plugins:[]});await a.analyse();const l=checkUnusedCodeFiles(e,a),c=(null===(i=r.packOptions)||void 0===i?void 0:i.include)||[];return((e,t)=>{const i=Object.keys(e);for(const r of i)t(r)&&delete e[r];return e})(t,(e=>(e=>{if((0,tools_1.isFileIncluded)(e,c))return!1;const t=e.startsWith("/")?e:`/${e}`;for(const e of l)if(t===(e.startsWith("/")?e:`/${e}`))return!0;return!1})(e)))}
|
package/dist/ci/utils/pack.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pack=pack;const B_PROTOCOL=0,B_PROTOCOL_VERSION=1,B_FILEINFO_LEN=2,B_FILEDATA_LEN=3,B_PROTOCOL_END=4;function pack(t){const e=[Buffer.alloc(1),Buffer.alloc(4),Buffer.alloc(4),Buffer.alloc(4),Buffer.alloc(1)];e[
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.pack=pack;const B_PROTOCOL=0,B_PROTOCOL_VERSION=1,B_FILEINFO_LEN=2,B_FILEDATA_LEN=3,B_PROTOCOL_END=4;function pack(t){const e=[Buffer.alloc(1),Buffer.alloc(4),Buffer.alloc(4),Buffer.alloc(4),Buffer.alloc(1)];e[B_PROTOCOL][0]=190,e[B_PROTOCOL_VERSION].writeInt32BE(0,0),e[B_PROTOCOL_END][0]=237;const f=Object.keys(t),r=f.length,n=[],c=[];let o=0;for(const e of f){const f=e.replace(/\\/g,"/"),r=f.startsWith("/")?f:`/${f}`,l=Buffer.from(r);n.push(l);const B=t[e];let a;if(B instanceof Buffer)a=B;else{if("string"!=typeof B)throw new Error(`pack invalid data: ${e}`);a=Buffer.from(B,"utf8")}c.push(a),/\.js\.map$/.test(e)||(o+=a.length,o+=l.length)}let l=18+12*r+Buffer.concat(n).length;const B=n.map(((t,e)=>{const f=Buffer.alloc(4);f.writeInt32BE(t.length,0);const r=Buffer.alloc(4),n=c[e].length,o=l;r.writeInt32BE(o,0),l+=n;const B=Buffer.alloc(4);return B.writeInt32BE(n,0),Buffer.concat([f,t,r,B])})),a=Buffer.alloc(4);a.writeInt32BE(r,0),B.unshift(a);const u=Buffer.concat(B),s=Buffer.concat(c);e[B_FILEINFO_LEN].writeInt32BE(u.length,0),e[B_FILEDATA_LEN].writeInt32BE(s.length,0);const O=Buffer.concat(e);return{validSize:o,buffer:Buffer.concat([O,u,s])}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.packFiledir=exports.packFileMap=void 0;const tslib_1=require("tslib"),fs_1=tslib_1.__importDefault(require("fs")),path_1=tslib_1.__importDefault(require("path")),crypto_1=tslib_1.__importDefault(require("crypto")),glob_1=tslib_1.__importDefault(require("glob")),packFileMap=(e,t={})=>{const r=[Buffer.alloc(1),Buffer.alloc(4),Buffer.alloc(4),Buffer.alloc(4),Buffer.alloc(1)];r[0][0]=190,r[1].writeInt32BE(0,0),r[4][0]=237;let o=0;const l=[],c=[],f={};let i=0;for(const r in e){const n=Buffer.isBuffer(e[r])?e[r]:Buffer.from(e[r]);if(t.needMd5){const e=crypto_1.default.createHash("md5");e.update(n);const o=e.digest("hex");if(f[r]=o,t.ignoreFileMd5&&t.ignoreFileMd5[r]===o)continue}const a=Buffer.from(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.packFiledir=exports.packFileMap=void 0;const tslib_1=require("tslib"),fs_1=tslib_1.__importDefault(require("fs")),path_1=tslib_1.__importDefault(require("path")),crypto_1=tslib_1.__importDefault(require("crypto")),glob_1=tslib_1.__importDefault(require("glob")),packFileMap=(e,t={})=>{const r=[Buffer.alloc(1),Buffer.alloc(4),Buffer.alloc(4),Buffer.alloc(4),Buffer.alloc(1)];r[0][0]=190,r[1].writeInt32BE(0,0),r[4][0]=237;let o=0;const l=[],c=[],f={};let i=0;for(const r in e){const n=Buffer.isBuffer(e[r])?e[r]:Buffer.from(e[r]);if(t.needMd5){const e=crypto_1.default.createHash("md5");e.update(n);const o=e.digest("hex");if(f[r]=o,t.ignoreFileMd5&&t.ignoreFileMd5[r]===o)continue}const a=Buffer.from(`/${r.replace(/\\/g,"/")}`);o++,l.push(a),c.push(n),/\.js\.map$/.test(r)||(i+=n.length,i+=a.length,i+=12)}let n=18+12*o+Buffer.concat(l).length;const a=l.map(((e,t)=>{const r=Buffer.alloc(4);r.writeInt32BE(e.length,0);const o=Buffer.alloc(4),l=c[t].length,f=n;o.writeInt32BE(f,0),n+=l;const i=Buffer.alloc(4);return i.writeInt32BE(l,0),Buffer.concat([r,e,o,i])})),s=Buffer.alloc(4);s.writeInt32BE(o,0),a.unshift(s);const u=Buffer.concat(a),p=Buffer.concat(c);r[2].writeInt32BE(u.length,0),r[3].writeInt32BE(p.length,0);const B=Buffer.concat(r);return i+=18,{data:Buffer.concat([B,u,p]),totalSize:i,fileMd5Info:f}};exports.packFileMap=packFileMap;const packFiledir=(e,t={})=>new Promise(((r,o)=>{const l=Object.assign({nodir:!0},t);(0,glob_1.default)(`${e}/**`,l,((l,c)=>{if(l)return o(l);const f={};c.forEach((t=>{const r=fs_1.default.readFileSync(t),o=path_1.default.relative(e,t);f[o]=r}));const i=(0,exports.packFileMap)(f,t);r(i)}))}));exports.packFiledir=packFiledir;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.generateTerminalQrcode=generateTerminalQrcode;const qrcodeTerminal=require("qrcode-terminal"),QrCode=require("qrcode-reader"),Jimp=require("jimp");async function generateTerminalQrcode(e){return new Promise((r,o)=>{const n=Buffer.from(e,"base64");Jimp.read(n,(function(n,t){n&&o(n);const c=new QrCode;c.callback=function(n,t){n&&o(n),t&&t.result?qrcodeTerminal.generate(t.result,e=>{r(e)}):o(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.generateTerminalQrcode=generateTerminalQrcode;const qrcodeTerminal=require("qrcode-terminal"),QrCode=require("qrcode-reader"),Jimp=require("jimp");async function generateTerminalQrcode(e){return new Promise(((r,o)=>{const n=Buffer.from(e,"base64");Jimp.read(n,(function(n,t){n&&o(n);const c=new QrCode;c.callback=function(n,t){n&&o(n),t&&t.result?qrcodeTerminal.generate(t.result,(e=>{r(e)})):o(`qrcode decode error, no result, qrcodeDataURI: ${e}`)},c.decode(t.bitmap)}))}))}
|
package/dist/ci/utils/tools.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkIsUseCompilerPlugins=exports.CompileSettingsKeysInProjectConfig=void 0,exports.isGameApp=isGameApp,exports.isUndefined=isUndefined,exports.formatCISetting=formatCISetting,exports.getMiniappCacheDir=getMiniappCacheDir,exports.getMiniappIOSCacheDir=getMiniappIOSCacheDir,exports.clearIOSCacheDir=clearIOSCacheDir,exports.clearAndroidCacheDir=clearAndroidCacheDir;const types_1=require("../../types"),projectconfig_1=require("../../modules/corecompiler/original/json/projectconfig"),path=require("path"),os=require("os"),fse=require("fs-extra");function isGameApp(i){return i.type===types_1.EProjectType.miniGame||i.type===types_1.EProjectType.miniGamePlugin}exports.CompileSettingsKeysInProjectConfig=["es6","es7","enhance","minified","minify","codeProtect","uglifyFileName","postcss","minifyJS","minifyWXML","minifyWXSS","autoPrefixWXSS","disableUseStrict","compileWorklet"];const checkIsUseCompilerPlugins=i=>{var e,n,t;return!isGameApp(i)||(null===(e=i.setting)||void 0===e?void 0:e.condition)||((null===(n=i.setting)||void 0===n?void 0:n.useCompilerPlugins)||[]).length>0||(null===(t=i.setting)||void 0===t?void 0:t.swc)};function isUndefined(i){return void 0===i}function formatCISetting(i,e){var n,t,s,o,r,c,f,d,l;const p=(0,projectconfig_1.getProjectConfigJSON)(i);if(e.useProjectConfig)return Object.assign(Object.assign({},p.setting),{minifyWXSS:!1!==e.minifyWXSS&&(!!e.minify||(isUndefined(e.minifyWXSS)?null===(n=p.setting)||void 0===n?void 0:n.minifyWXSS:!!e.minifyWXSS)),minifyWXML:!1!==e.minifyWXML&&(!!e.minify||(isUndefined(e.minifyWXML)?null===(t=p.setting)||void 0===t?void 0:t.minifyWXML:!!e.minifyWXML)),minified:!1!==e.minifyJS&&(!!e.minify||(isUndefined(e.minifyJS)?null===(s=p.setting)||void 0===s?void 0:s.minified:!!e.minifyJS)),postcss:isUndefined(e.autoPrefixWXSS)?null===(o=p.setting)||void 0===o?void 0:o.postcss:!!e.autoPrefixWXSS,disableUseStrict:isUndefined(e.disableUseStrict)?null===(r=p.setting)||void 0===r?void 0:r.disableUseStrict:!!e.disableUseStrict,compileWorklet:isUndefined(e.compileWorklet)?null===(c=p.setting)||void 0===c?void 0:c.compileWorklet:!!e.compileWorklet,uglifyFileName:isUndefined(e.codeProtect)?null===(f=p.setting)||void 0===f?void 0:f.uglifyFileName:!!e.codeProtect,es6:isUndefined(e.es6)&&isUndefined(e.es7)?null===(d=p.setting)||void 0===d?void 0:d.es6:!!e.es6||!!e.es7,enhance:isUndefined(e.es6)&&isUndefined(e.es7)?null===(l=p.setting)||void 0===l?void 0:l.enhance:!!e.es6||!!e.es7});const a=Object.assign({},p.setting);for(const i in a)exports.CompileSettingsKeysInProjectConfig.indexOf(i)>-1&&delete a[i];return Object.assign(Object.assign({},a),{minifyWXSS:!1!==e.minifyWXSS&&(e.minify||!!e.minifyWXSS),minifyWXML:!1!==e.minifyWXML&&(e.minify||!!e.minifyWXML),minified:!1!==e.minifyJS&&(e.minify||!!e.minifyJS),postcss:!!e.autoPrefixWXSS,disableUseStrict:!!e.disableUseStrict,compileWorklet:!!e.compileWorklet,uglifyFileName:!!e.codeProtect,es6:!!e.es6||!!e.es7,enhance:!!e.es6||!!e.es7})}function getMiniappCacheDir(){return path.join(os.tmpdir(),"miniapp")}function getMiniappIOSCacheDir(){return path.join(getMiniappCacheDir(),"ios")}function clearIOSCacheDir(){["ios","iOSCloudBuild","miniapp-plugin"].forEach(i=>{const e=path.join(getMiniappCacheDir(),i);fse.existsSync(e)&&fse.removeSync(e)})}function clearAndroidCacheDir(){["android"].forEach(i=>{const e=path.join(getMiniappCacheDir(),i);fse.existsSync(e)&&fse.removeSync(e)})}exports.checkIsUseCompilerPlugins=checkIsUseCompilerPlugins;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.checkIsUseCompilerPlugins=exports.CompileSettingsKeysInProjectConfig=void 0,exports.isGameApp=isGameApp,exports.isUndefined=isUndefined,exports.formatCISetting=formatCISetting,exports.getMiniappCacheDir=getMiniappCacheDir,exports.getMiniappIOSCacheDir=getMiniappIOSCacheDir,exports.clearIOSCacheDir=clearIOSCacheDir,exports.clearAndroidCacheDir=clearAndroidCacheDir;const types_1=require("../../types"),projectconfig_1=require("../../modules/corecompiler/original/json/projectconfig"),path=require("path"),os=require("os"),fse=require("fs-extra");function isGameApp(i){return i.type===types_1.EProjectType.miniGame||i.type===types_1.EProjectType.miniGamePlugin}exports.CompileSettingsKeysInProjectConfig=["es6","es7","enhance","minified","minify","codeProtect","uglifyFileName","postcss","minifyJS","minifyWXML","minifyWXSS","autoPrefixWXSS","disableUseStrict","compileWorklet"];const checkIsUseCompilerPlugins=i=>{var e,n,t;return!isGameApp(i)||(null===(e=i.setting)||void 0===e?void 0:e.condition)||((null===(n=i.setting)||void 0===n?void 0:n.useCompilerPlugins)||[]).length>0||(null===(t=i.setting)||void 0===t?void 0:t.swc)};function isUndefined(i){return void 0===i}function formatCISetting(i,e){var n,t,s,o,r,c,f,d,l;const p=(0,projectconfig_1.getProjectConfigJSON)(i);if(e.useProjectConfig)return Object.assign(Object.assign({},p.setting),{minifyWXSS:!1!==e.minifyWXSS&&(!!e.minify||(isUndefined(e.minifyWXSS)?null===(n=p.setting)||void 0===n?void 0:n.minifyWXSS:!!e.minifyWXSS)),minifyWXML:!1!==e.minifyWXML&&(!!e.minify||(isUndefined(e.minifyWXML)?null===(t=p.setting)||void 0===t?void 0:t.minifyWXML:!!e.minifyWXML)),minified:!1!==e.minifyJS&&(!!e.minify||(isUndefined(e.minifyJS)?null===(s=p.setting)||void 0===s?void 0:s.minified:!!e.minifyJS)),postcss:isUndefined(e.autoPrefixWXSS)?null===(o=p.setting)||void 0===o?void 0:o.postcss:!!e.autoPrefixWXSS,disableUseStrict:isUndefined(e.disableUseStrict)?null===(r=p.setting)||void 0===r?void 0:r.disableUseStrict:!!e.disableUseStrict,compileWorklet:isUndefined(e.compileWorklet)?null===(c=p.setting)||void 0===c?void 0:c.compileWorklet:!!e.compileWorklet,uglifyFileName:isUndefined(e.codeProtect)?null===(f=p.setting)||void 0===f?void 0:f.uglifyFileName:!!e.codeProtect,es6:isUndefined(e.es6)&&isUndefined(e.es7)?null===(d=p.setting)||void 0===d?void 0:d.es6:!!e.es6||!!e.es7,enhance:isUndefined(e.es6)&&isUndefined(e.es7)?null===(l=p.setting)||void 0===l?void 0:l.enhance:!!e.es6||!!e.es7});const a=Object.assign({},p.setting);for(const i in a)exports.CompileSettingsKeysInProjectConfig.indexOf(i)>-1&&delete a[i];return Object.assign(Object.assign({},a),{minifyWXSS:!1!==e.minifyWXSS&&(e.minify||!!e.minifyWXSS),minifyWXML:!1!==e.minifyWXML&&(e.minify||!!e.minifyWXML),minified:!1!==e.minifyJS&&(e.minify||!!e.minifyJS),postcss:!!e.autoPrefixWXSS,disableUseStrict:!!e.disableUseStrict,compileWorklet:!!e.compileWorklet,uglifyFileName:!!e.codeProtect,es6:!!e.es6||!!e.es7,enhance:!!e.es6||!!e.es7})}function getMiniappCacheDir(){return path.join(os.tmpdir(),"miniapp")}function getMiniappIOSCacheDir(){return path.join(getMiniappCacheDir(),"ios")}function clearIOSCacheDir(){["ios","iOSCloudBuild","miniapp-plugin"].forEach((i=>{const e=path.join(getMiniappCacheDir(),i);fse.existsSync(e)&&fse.removeSync(e)}))}function clearAndroidCacheDir(){["android"].forEach((i=>{const e=path.join(getMiniappCacheDir(),i);fse.existsSync(e)&&fse.removeSync(e)}))}exports.checkIsUseCompilerPlugins=checkIsUseCompilerPlugins;
|
package/dist/ci/utils/unpack.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const tslib_1=require("tslib"),version0_1=tslib_1.__importDefault(require("./wxvpkg/unpack/version0")),version10_1=tslib_1.__importDefault(require("./wxvpkg/unpack/version10")),utils_1=require("./wxvpkg/utils"),UNPACK_FUNC={0:version0_1.default,10:version10_1.default},unpack=(e,r)=>{const i=(0,utils_1.getVersion)(e),t=UNPACK_FUNC[i];if(!t)throw new Error(
|
|
1
|
+
"use strict";const tslib_1=require("tslib"),version0_1=tslib_1.__importDefault(require("./wxvpkg/unpack/version0")),version10_1=tslib_1.__importDefault(require("./wxvpkg/unpack/version10")),utils_1=require("./wxvpkg/utils"),UNPACK_FUNC={0:version0_1.default,10:version10_1.default},unpack=(e,r)=>{const i=(0,utils_1.getVersion)(e),t=UNPACK_FUNC[i];if(!t)throw new Error(`wxvpkg unrecognized version: ${i}`);return t(e,r)};module.exports=unpack;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFileInfoLength=getFileInfoLength,exports.getFileContentLength=getFileContentLength,exports.getFileCount=getFileCount,exports.getFileInfo=getFileInfo,exports.default=unpack;const config_1=require("./config"),fs=require("fs"),path=require("path"),mkdir=require("mkdir-p"),{INFO_LENGTH_BEGIN:INFO_LENGTH_BEGIN,INFO_LENGTH_END:INFO_LENGTH_END,FILE_LENGTH_BEGIN:FILE_LENGTH_BEGIN,FILE_LENGTH_END:FILE_LENGTH_END,FILE_COUNT_BEGIN:FILE_COUNT_BEGIN,FILE_COUNT_END:FILE_COUNT_END,FILF_INFO_BEGIN:FILF_INFO_BEGIN}=config_1.ConfigV0;function getFileInfoLength(e){return e.slice(INFO_LENGTH_BEGIN,INFO_LENGTH_END).readInt32BE(0)}function getFileContentLength(e){return e.slice(FILE_LENGTH_BEGIN,FILE_LENGTH_END).readInt32BE(0)}function getFileCount(e){return e.slice(FILE_COUNT_BEGIN,FILE_COUNT_END).readInt32BE(0)}function getFileInfo(e){const t=getFileCount(e),n=[];let E=FILF_INFO_BEGIN;for(let o=0;o<t;o++){const t=e.slice(E,E+4).readInt32BE(0);E+=4;const o=e.slice(E,E+t).toString();E+=t;const r=e.slice(E,E+4).readInt32BE(0);E+=4;const I=e.slice(E,E+4).readInt32BE(0);E+=4,n.push({name:o,offset:r,length:I})}return n}function unpack(e,t){try{const n=getFileInfo(e),E={};for(const o of n){const{name:n,offset:r,length:I}=o;if(E[n]=e.slice(r,r+I),t){const e=path.join(t,n);mkdir.sync(path.dirname(e)),fs.writeFileSync(e,E[n])}}return E}catch(e){throw new Error(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFileInfoLength=getFileInfoLength,exports.getFileContentLength=getFileContentLength,exports.getFileCount=getFileCount,exports.getFileInfo=getFileInfo,exports.default=unpack;const config_1=require("./config"),fs=require("fs"),path=require("path"),mkdir=require("mkdir-p"),{INFO_LENGTH_BEGIN:INFO_LENGTH_BEGIN,INFO_LENGTH_END:INFO_LENGTH_END,FILE_LENGTH_BEGIN:FILE_LENGTH_BEGIN,FILE_LENGTH_END:FILE_LENGTH_END,FILE_COUNT_BEGIN:FILE_COUNT_BEGIN,FILE_COUNT_END:FILE_COUNT_END,FILF_INFO_BEGIN:FILF_INFO_BEGIN}=config_1.ConfigV0;function getFileInfoLength(e){return e.slice(INFO_LENGTH_BEGIN,INFO_LENGTH_END).readInt32BE(0)}function getFileContentLength(e){return e.slice(FILE_LENGTH_BEGIN,FILE_LENGTH_END).readInt32BE(0)}function getFileCount(e){return e.slice(FILE_COUNT_BEGIN,FILE_COUNT_END).readInt32BE(0)}function getFileInfo(e){const t=getFileCount(e),n=[];let E=FILF_INFO_BEGIN;for(let o=0;o<t;o++){const t=e.slice(E,E+4).readInt32BE(0);E+=4;const o=e.slice(E,E+t).toString();E+=t;const r=e.slice(E,E+4).readInt32BE(0);E+=4;const I=e.slice(E,E+4).readInt32BE(0);E+=4,n.push({name:o,offset:r,length:I})}return n}function unpack(e,t){try{const n=getFileInfo(e),E={};for(const o of n){const{name:n,offset:r,length:I}=o;if(E[n]=e.slice(r,r+I),t){const e=path.join(t,n);mkdir.sync(path.dirname(e)),fs.writeFileSync(e,E[n])}}return E}catch(e){throw new Error(`unpack wxvpkg catch error ${e}`)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFileInfoLength=getFileInfoLength,exports.getFileIndexLength=getFileIndexLength,exports.getFileContentLength=getFileContentLength,exports.getFileCount=getFileCount,exports.getFileInfo=getFileInfo,exports.default=unpack;const config_1=require("./config"),fs=require("fs"),path=require("path"),mkdir=require("mkdir-p"),{INFO_LENGTH_BEGIN:INFO_LENGTH_BEGIN,INFO_LENGTH_END:INFO_LENGTH_END,INDEX_LENGTH_BEGIN:INDEX_LENGTH_BEGIN,INDEX_LENGTH_END:INDEX_LENGTH_END,FILE_LENGTH_BEGIN:FILE_LENGTH_BEGIN,FILE_LENGTH_END:FILE_LENGTH_END,FILE_COUNT_BEGIN:FILE_COUNT_BEGIN,FILE_COUNT_END:FILE_COUNT_END,FILF_INFO_BEGIN:FILF_INFO_BEGIN}=config_1.ConfigV10;function getFileInfoLength(e){return e.slice(INFO_LENGTH_BEGIN,INFO_LENGTH_END).readInt32BE(0)}function getFileIndexLength(e){return e.slice(INDEX_LENGTH_BEGIN,INDEX_LENGTH_END).readInt32BE(0)}function getFileContentLength(e){return e.slice(FILE_LENGTH_BEGIN,FILE_LENGTH_END).readInt32BE(0)}function getFileCount(e){return e.slice(FILE_COUNT_BEGIN,FILE_COUNT_END).readInt32BE(0)}function getFileInfo(e){const t=getFileCount(e),n=[];let E=FILF_INFO_BEGIN;for(let I=0;I<t;I++){const t=e.slice(E,E+4).readInt32BE(0);E+=4;const I=e.slice(E,E+t).toString();E+=t;const N=e.slice(E,E+1).readIntBE(0,1,!1);E+=1;const o=e.slice(E,E+2).readIntBE(0,2,!1);E+=2;const _=e.slice(E,E+4).readInt32BE(0);E+=4;const i=e.slice(E,E+4).readInt32BE(0);E+=4,n.push({name:I,encType:N,mode:o,offset:_,length:i})}return n}function unpack(e,t){try{const n=getFileInfo(e),E={},I=18+getFileInfoLength(e)+getFileIndexLength(e);for(const N of n){const{name:n,offset:o,length:_,mode:i}=N;if(E[n]=e.slice(o+I,o+I+_),t){const e=path.join(t,n);mkdir.sync(path.dirname(e)),fs.writeFileSync(e,E[n],{mode:i.toString(8)})}}return E}catch(e){throw new Error(
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFileInfoLength=getFileInfoLength,exports.getFileIndexLength=getFileIndexLength,exports.getFileContentLength=getFileContentLength,exports.getFileCount=getFileCount,exports.getFileInfo=getFileInfo,exports.default=unpack;const config_1=require("./config"),fs=require("fs"),path=require("path"),mkdir=require("mkdir-p"),{INFO_LENGTH_BEGIN:INFO_LENGTH_BEGIN,INFO_LENGTH_END:INFO_LENGTH_END,INDEX_LENGTH_BEGIN:INDEX_LENGTH_BEGIN,INDEX_LENGTH_END:INDEX_LENGTH_END,FILE_LENGTH_BEGIN:FILE_LENGTH_BEGIN,FILE_LENGTH_END:FILE_LENGTH_END,FILE_COUNT_BEGIN:FILE_COUNT_BEGIN,FILE_COUNT_END:FILE_COUNT_END,FILF_INFO_BEGIN:FILF_INFO_BEGIN}=config_1.ConfigV10;function getFileInfoLength(e){return e.slice(INFO_LENGTH_BEGIN,INFO_LENGTH_END).readInt32BE(0)}function getFileIndexLength(e){return e.slice(INDEX_LENGTH_BEGIN,INDEX_LENGTH_END).readInt32BE(0)}function getFileContentLength(e){return e.slice(FILE_LENGTH_BEGIN,FILE_LENGTH_END).readInt32BE(0)}function getFileCount(e){return e.slice(FILE_COUNT_BEGIN,FILE_COUNT_END).readInt32BE(0)}function getFileInfo(e){const t=getFileCount(e),n=[];let E=FILF_INFO_BEGIN;for(let I=0;I<t;I++){const t=e.slice(E,E+4).readInt32BE(0);E+=4;const I=e.slice(E,E+t).toString();E+=t;const N=e.slice(E,E+1).readIntBE(0,1,!1);E+=1;const o=e.slice(E,E+2).readIntBE(0,2,!1);E+=2;const _=e.slice(E,E+4).readInt32BE(0);E+=4;const i=e.slice(E,E+4).readInt32BE(0);E+=4,n.push({name:I,encType:N,mode:o,offset:_,length:i})}return n}function unpack(e,t){try{const n=getFileInfo(e),E={},I=18+getFileInfoLength(e)+getFileIndexLength(e);for(const N of n){const{name:n,offset:o,length:_,mode:i}=N;if(E[n]=e.slice(o+I,o+I+_),t){const e=path.join(t,n);mkdir.sync(path.dirname(e)),fs.writeFileSync(e,E[n],{mode:i.toString(8)})}}return E}catch(e){throw new Error(`unpack wxvpkg catch error ${e}`)}}
|
package/dist/cli/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),ci=tslib_1.__importStar(require("../ci/index")),yargs_1=tslib_1.__importDefault(require("yargs")),log=tslib_1.__importStar(require("../utils/log")),fs_extra_1=tslib_1.__importDefault(require("fs-extra")),path_1=tslib_1.__importDefault(require("path")),locales_1=tslib_1.__importDefault(require("../utils/locales/locales"));async function run(){let e;function o(o){return{command:o,describe:o+" commands",builder:i=>i.usage(`Usage: $0 cloud ${o} <command>`).command({command:"upload",describe:"upload files",builder:e=>e.options({env:{alias:"e",desc:"env id",string:!0,demandOption:!0},path:{alias:"p",desc:"path to the local folder",string:!0,demandOption:!0},remotePath:{alias:"rp",desc:"path to the remote folder",string:!0,demandOption:!0},concurrency:{alias:"c",desc:"concurrenct upload file count",number:!0,default:5,demandOption:!0}}).group(["env","path","remotePath"],"Options:"),handler:i=>e=e=>ci.cloud["storage"===o?"uploadStorage":"uploadStaticStorage"]({project:e,env:i.env,path:i.path,remotePath:i.remotePath})}),handler:()=>{}}}const i=yargs_1.default.usage("Usage: miniprogram-ci <command> [options]").command("$0","",i=>{i.command({command:"preview",describe:"preview project and get a preview qrcode",builder:e=>e.options("appid",{describe:"project appid",string:!0,demandOption:!0}).options("project-path",{alias:"pp",describe:"project path",string:!0,demandOption:!0}).options("private-key-path",{alias:"pkp",describe:"private key path",string:!0,demandOption:!0}),handler:()=>{}}).command({command:"upload",describe:"upload project",builder:e=>e.options("appid",{describe:"project appid",string:!0,demandOption:!0}).options("project-path",{alias:"pp",describe:"project path",string:!0,demandOption:!0}).options("private-key-path",{alias:"pkp",describe:"private key path",string:!0,demandOption:!0}),handler:()=>{}}).command({command:"get-compiled-result",describe:"get local compiled result, which will be uploaded to the server",builder:e=>e.options("appid",{describe:"project appid",string:!0,demandOption:!0}).options("project-path",{alias:"pp",describe:"project path",string:!0,demandOption:!0}).options("private-key-path",{alias:"pkp",describe:"private key path",string:!0,demandOption:!0}).options("save-path",{alias:"sp",describe:"save path",string:!0,demandOption:!0}),handler:()=>{}}).command({command:"check-code-quality",describe:"check code quality and get a json report",builder:e=>e.options("appid",{describe:"project appid",string:!0,demandOption:!0}).options("project-path",{alias:"pp",describe:"project path",string:!0,demandOption:!0}).options("private-key-path",{alias:"pkp",describe:"private key path",string:!0,demandOption:!0}).options("save-path",{alias:"sp",describe:"save path",string:!0,demandOption:!1}),handler:()=>{}}).command({command:"pack-npm",describe:"pack npm modules for miniprogram",builder:e=>e.demandOption("appid").demandOption("project-path").demandOption("private-key-path"),handler:()=>{}}).command({command:"get-dev-source-map",describe:"get source map of last upload version",builder:e=>e.demandOption("appid").demandOption("project-path").demandOption("private-key-path").options("robot",{alias:"r",describe:"the robot user who is uploading the project",string:!0,default:"1",choices:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],demandOption:!0}).options("source-map-save-path",{describe:"path to save source map zip",string:!0,demandOption:!0}),handler:()=>{}}).command({command:"pack-npm-manually",describe:"pack npm modules with specified node_modules position",builder:e=>e.options({"pack-npm-manually-package-json-path":{desc:"path of node_modules related package.json",string:!0,demandOption:!0},"pack-npm-manually-miniprogram-npm-dist-dir":{desc:"path of target miniprogram_npm position",string:!0,demandOption:!0},ignores:{alias:"i",desc:"ignore files, glob format",array:!0,demandOption:!1}}).group(["pack-npm-manually-package-json-path","pack-npm-manually-miniprogram-npm-dist-dir","ignores"],"Options:"),handler:e=>{(async()=>{const o=await ci.packNpmManually({packageJsonPath:String(e.packNpmManuallyPackageJsonPath),miniprogramNpmDistDir:String(e.packNpmManuallyMiniprogramNpmDistDir),ignores:[]});log.log("pack npm done, pack result:",o)})()}}).command({command:"cloud",describe:"cloudbase commands",builder:i=>i.usage("Usage: $0 cloud <command>").command({command:"functions",describe:"cloudfunctions commands",builder:o=>o.usage("Usage: $0 cloud functions <command>").command({command:"upload",describe:"upload a cloudfunction",builder:e=>e.options({env:{alias:"e",desc:"env id",string:!0,demandOption:!0},name:{alias:"n",desc:"cloudfunction name",string:!0,demandOption:!0},path:{alias:"p",desc:"path to the folder containing cloudfunction code",string:!0,demandOption:!0},"remote-npm-install":{alias:"rnpm",desc:"if true, node_modules will not be uploaded and NPM dependencies will be installed in the cloud. if false, node_modules will be uploaded.",boolean:!0}}).group(["env","name","path","remote-npm-install"],"Options:"),handler:o=>e=e=>ci.cloud.uploadFunction({project:e,env:o.env,name:o.name,path:o.path,remoteNpmInstall:o["remote-npm-install"]})}),handler:()=>{}}).command(o("storage")).command(o("staticstorage")).command({command:"container",describe:"container commands",builder:o=>o.usage("Usage: $0 cloud container <command>").command({command:"create",describe:"create a version by uploading package",builder:e=>e.options({env:{alias:"e",desc:"env id",string:!0,demandOption:!0},flow:{desc:"flow ratio of this version",number:!0,demandOption:!0},cpu:{desc:"cpu cores of this version",number:!0,demandOption:!0},mem:{desc:"memory gigabytes of this version",number:!0,demandOption:!0},min:{desc:"minimal copies",number:!0,demandOption:!0},max:{desc:"maximum copies",number:!0,demandOption:!0},threshold:{desc:"cpu threshold for auto scaling",number:!0,demandOption:!0},port:{desc:"container listening port for liveness",number:!0,demandOption:!0},service:{desc:"service name",string:!0,demandOption:!0},remark:{desc:"version remark",string:!0},envParams:{desc:"stringified environment parameters Record<string, string>",string:!0,default:"{}"},allowHttp:{desc:"allow direct http request to this version",boolean:!0,default:!1},containerRoot:{alias:"cr",desc:"path to the container folder",string:!0,demandOption:!0},dockerfilePath:{desc:"custom docker file path",string:!0},buildDir:{desc:"build directory",string:!0}}).group(["env","flow","cpu","mem","min","max","threshold","port","service","remark","envParams","allowHttp","containerRoot","dockerfilePath","buildDir"],"Options:"),handler:o=>e=e=>ci.cloud.uploadContainer({project:e,env:o.env,containerRoot:o.containerRoot,version:{flowRatio:o.flow,cpu:o.cpu,mem:o.mem,minNum:o.min,maxNum:o.max,policyType:"cpu",policyThreshold:o.threshold,containerPort:o.port,serverName:o.service,uploadType:"package",buildDir:o.buildDir,envParams:o.envParams,dockerfilePath:o.dockerfilePath,useHttpRoute:o.allowHttp,versionRemark:o.remark}})}),handler:()=>{}}),handler:()=>{}}).options("appid",{describe:"project appid",string:!0}).options("project-path",{alias:"pp",describe:"project path",string:!0}).options("private-key-path",{alias:"pkp",describe:"private key path",string:!0}).options("locales",{describe:"set locales",default:"en",string:!0,choices:["en","zh"]}).option("verbose",{alias:"v",description:"run with verbose logging",default:!0,boolean:!0}).options("proxy",{describe:"proxy url",default:"",string:!0}).options("project-type",{alias:"pt",describe:"project type",string:!0,default:"miniProgram",choices:["miniProgram","miniGame","miniProgramPlugin","miniGamePlugin"]}).options("project-ignores",{alias:"pi",describe:"project ignores",array:!0}).options("upload-description",{alias:"ud",describe:"the uploaded code version description",string:!0}).options("upload-version",{alias:"uv",describe:"the uploaded code version description",string:!0,demandOption:process.argv.includes("preview")||process.argv.includes("upload")&&!process.argv.includes("cloud")}).options("threads",{describe:"the number indicates how many threads will be created for compile the source files",number:!0,default:0,demandOption:process.argv.includes("preview")||process.argv.includes("upload")&&!process.argv.includes("cloud")}).options("use-cos",{describe:"enable uploading code-package through the async way, which is more stable than the direct way",boolean:!0,default:!1,demandOption:process.argv.includes("preview")||process.argv.includes("upload")&&!process.argv.includes("cloud")}).options("robot",{alias:"r",describe:"the robot user who is uploading the project",string:!0,default:"1",choices:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"]}).options("enable-es6",{describe:"enable transform from es6 to es5",boolean:!0}).options("use-project-config",{describe:"use settings in project.config.json for ci",default:!1,boolean:!0}).options("enable-es7",{describe:"enable transform from es7 to es5",boolean:!0}).options("enable-autoprefixwxss",{describe:"enable autoprefixwxss",boolean:!0}).options("enable-minify-wxss",{describe:"enable minify wxss",boolean:!0}).options("enable-minify-wxml",{describe:"enable minify wxml",boolean:!0}).options("enable-minify-js",{describe:"enable minify js",boolean:!0}).options("enable-minify",{describe:"enable minify js/wxml/wxss",boolean:!0}).options("enable-code-protect",{describe:"enable code protect",boolean:!0}).options("enable-qrcode",{describe:"enable generate weapp qrcode",default:!1,boolean:!0}).options("qrcode-format",{describe:"format of output qrcode",default:"terminal",string:!0,choices:["base64","image","terminal"]}).options("qrcode-output-dest",{describe:"destination of output qrcode",string:!0}).options("preview-page-path",{describe:"preview with page path",string:!0}).options("preview-search-query",{describe:'preview with query, Tips: "&" should be "\\&" in command line',string:!0}).options("scene",{describe:"preview with scene, about scene: https://developers.weixin.qq.com/miniprogram/dev/reference/scene-list.html",string:!0})},e=>e).help().argv;if(i.help&&(yargs_1.default.showHelp(),process.exit(0)),i.proxy&&ci.proxy(i.proxy),locales_1.default.setLocale(i.locales),i._&&!i._.includes("pack-npm-manually")){const o=new ci.Project({appid:i.appid,projectPath:i.projectPath,privateKeyPath:i.privateKeyPath,type:i.projectType,ignores:i.projectIgnores});if(formatCompileSetting(i),e)await e(o);else if(i._.includes("upload"))await ci.upload({project:o,setting:{es6:i.enableEs6,es7:i.enableEs7,minify:i.enableMinify,autoPrefixWXSS:i.enableHijack,minifyWXML:i.enableMinify||i.enableMinifyWxml,minifyWXSS:i.enableMinify||i.enableMinifyWxss,minifyJS:i.enableMinify||i.enableMinifyJs,codeProtect:i.enableCodeProtect,useProjectConfig:i.useProjectConfig},threads:i.threads,version:i.uploadVersion,desc:i.uploadDescription,robot:i.robot,onProgressUpdate:e=>{i.verbose&&log.log(e)}});else if(i._.includes("preview")){let e=i.scene;e&&(e=parseInt(e,10)),await ci.preview({project:o,setting:{es6:i.enableEs6,es7:i.enableEs7,minify:i.enableMinify,autoPrefixWXSS:i.enableHijack,minifyWXML:i.enableMinify||i.enableMinifyWxml,minifyWXSS:i.enableMinify||i.enableMinifyWxss,minifyJS:i.enableMinify||i.enableMinifyJs,codeProtect:i.enableCodeProtect,useProjectConfig:i.useProjectConfig},threads:i.threads,version:i.uploadVersion,desc:i.uploadDescription,robot:i.robot,pagePath:i.previewPagePath,searchQuery:i.previewSearchQuery,scene:e,onProgressUpdate:e=>{i.verbose&&log.log(e)},qrcodeFormat:i.qrcodeFormat,qrcodeOutputDest:i.qrcodeOutputDest})}else if(i._.includes("get-compiled-result")){let e=i.scene;e&&(e=parseInt(e,10)),await ci.getCompiledResult({project:o,setting:{es6:i.enableEs6,es7:i.enableEs7,minify:i.enableMinify,autoPrefixWXSS:i.enableHijack,minifyWXML:i.enableMinify||i.enableMinify,minifyWXSS:i.enableMinify||i.enableMinifyWxss,minifyJS:i.enableMinify||i.enableMinifyJs,codeProtect:i.enableCodeProtect},threads:i.threads,version:i.uploadVersion,desc:i.uploadDescription,robot:i.robot,pagePath:i.previewPagePath,searchQuery:i.previewSearchQuery,scene:e,onProgressUpdate:e=>{i.verbose&&log.log(e)},qrcodeFormat:i.qrcodeFormat,qrcodeOutputDest:i.qrcodeOutputDest},i.savePath)}else if(i._.includes("pack-npm")){const e=await ci.packNpm(o,{ignores:i.packNpmIgnores,reporter:e=>{i.verbose&&console.log(e)}})||[];e.length&&(log.log("Pack npm warning:"),log.log(e.map((e,o)=>`${o+1}. ${e.msg}\n \t> code: ${e.code}\n \t@ ${e.jsPath}:${e.startLine}-${e.endLine}`).join("---------------\n")))}else if(i._.includes("get-dev-source-map"))await ci.getDevSourceMap({project:o,robot:parseInt(i.robot,10),sourceMapSavePath:i.sourceMapSavePath}),log.info(`save sourcemap.zip to ${i.sourceMapSavePath} successfully`);else if(i._.includes("check-code-quality")){const e=await ci.checkCodeQuality(o);i.savePath?(fs_extra_1.default.ensureDirSync(path_1.default.dirname(i.savePath)),fs_extra_1.default.writeFileSync(i.savePath,JSON.stringify(e)),log.info(`save json format report to ${i.savePath} successfully`)):console.log(e)}}}function formatCompileSetting(e){if(!0!==e.useProjectConfig)for(const o in e)void 0===e[o]&&(e[o]=!1)}run().then(()=>{log.log("done"),process.exit(0)},e=>{console.error(e),process.exit(1)});
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const tslib_1=require("tslib"),ci=tslib_1.__importStar(require("../ci/index")),yargs_1=tslib_1.__importDefault(require("yargs")),log=tslib_1.__importStar(require("../utils/log")),fs_extra_1=tslib_1.__importDefault(require("fs-extra")),path_1=tslib_1.__importDefault(require("path")),locales_1=tslib_1.__importDefault(require("../utils/locales/locales"));async function run(){let e;function o(o){return{command:o,describe:`${o} commands`,builder:i=>{const a=i.usage(`Usage: $0 cloud ${o} <command>`).command({command:"upload",describe:"upload files",builder:e=>e.options({env:{alias:"e",desc:"env id",string:!0,demandOption:!0},path:{alias:"p",desc:"path to the local folder",string:!0,demandOption:!0},remotePath:{alias:"rp",desc:"path to the remote folder",string:!0,demandOption:!0},concurrency:{alias:"c",desc:"concurrenct upload file count",number:!0,default:5,demandOption:!0}}).group(["env","path","remotePath"],"Options:"),handler:i=>e=e=>ci.cloud["storage"===o?"uploadStorage":"uploadStaticStorage"]({project:e,env:i.env,path:i.path,remotePath:i.remotePath})});return a},handler:()=>{}}}const i=yargs_1.default.usage("Usage: miniprogram-ci <command> [options]").command("$0","",(i=>{i.command({command:"preview",describe:"preview project and get a preview qrcode",builder:e=>e.options("appid",{describe:"project appid",string:!0,demandOption:!0}).options("project-path",{alias:"pp",describe:"project path",string:!0,demandOption:!0}).options("private-key-path",{alias:"pkp",describe:"private key path",string:!0,demandOption:!0}),handler:()=>{}}).command({command:"upload",describe:"upload project",builder:e=>e.options("appid",{describe:"project appid",string:!0,demandOption:!0}).options("project-path",{alias:"pp",describe:"project path",string:!0,demandOption:!0}).options("private-key-path",{alias:"pkp",describe:"private key path",string:!0,demandOption:!0}),handler:()=>{}}).command({command:"get-compiled-result",describe:"get local compiled result, which will be uploaded to the server",builder:e=>e.options("appid",{describe:"project appid",string:!0,demandOption:!0}).options("project-path",{alias:"pp",describe:"project path",string:!0,demandOption:!0}).options("private-key-path",{alias:"pkp",describe:"private key path",string:!0,demandOption:!0}).options("save-path",{alias:"sp",describe:"save path",string:!0,demandOption:!0}),handler:()=>{}}).command({command:"check-code-quality",describe:"check code quality and get a json report",builder:e=>e.options("appid",{describe:"project appid",string:!0,demandOption:!0}).options("project-path",{alias:"pp",describe:"project path",string:!0,demandOption:!0}).options("private-key-path",{alias:"pkp",describe:"private key path",string:!0,demandOption:!0}).options("save-path",{alias:"sp",describe:"save path",string:!0,demandOption:!1}),handler:()=>{}}).command({command:"pack-npm",describe:"pack npm modules for miniprogram",builder:e=>e.demandOption("appid").demandOption("project-path").demandOption("private-key-path"),handler:()=>{}}).command({command:"get-dev-source-map",describe:"get source map of last upload version",builder:e=>e.demandOption("appid").demandOption("project-path").demandOption("private-key-path").options("robot",{alias:"r",describe:"the robot user who is uploading the project",string:!0,default:"1",choices:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"],demandOption:!0}).options("source-map-save-path",{describe:"path to save source map zip",string:!0,demandOption:!0}),handler:()=>{}}).command({command:"pack-npm-manually",describe:"pack npm modules with specified node_modules position",builder:e=>e.options({"pack-npm-manually-package-json-path":{desc:"path of node_modules related package.json",string:!0,demandOption:!0},"pack-npm-manually-miniprogram-npm-dist-dir":{desc:"path of target miniprogram_npm position",string:!0,demandOption:!0},ignores:{alias:"i",desc:"ignore files, glob format",array:!0,demandOption:!1}}).group(["pack-npm-manually-package-json-path","pack-npm-manually-miniprogram-npm-dist-dir","ignores"],"Options:"),handler:e=>{(async()=>{const o=await ci.packNpmManually({packageJsonPath:String(e.packNpmManuallyPackageJsonPath),miniprogramNpmDistDir:String(e.packNpmManuallyMiniprogramNpmDistDir),ignores:[]});log.log("pack npm done, pack result:",o)})()}}).command({command:"cloud",describe:"cloudbase commands",builder:i=>{const a=i.usage("Usage: $0 cloud <command>").command({command:"functions",describe:"cloudfunctions commands",builder:o=>{const i=o.usage("Usage: $0 cloud functions <command>").command({command:"upload",describe:"upload a cloudfunction",builder:e=>e.options({env:{alias:"e",desc:"env id",string:!0,demandOption:!0},name:{alias:"n",desc:"cloudfunction name",string:!0,demandOption:!0},path:{alias:"p",desc:"path to the folder containing cloudfunction code",string:!0,demandOption:!0},"remote-npm-install":{alias:"rnpm",desc:"if true, node_modules will not be uploaded and NPM dependencies will be installed in the cloud. if false, node_modules will be uploaded.",boolean:!0}}).group(["env","name","path","remote-npm-install"],"Options:"),handler:o=>e=e=>ci.cloud.uploadFunction({project:e,env:o.env,name:o.name,path:o.path,remoteNpmInstall:o["remote-npm-install"]})});return i},handler:()=>{}}).command(o("storage")).command(o("staticstorage")).command({command:"container",describe:"container commands",builder:o=>{const i=o.usage("Usage: $0 cloud container <command>").command({command:"create",describe:"create a version by uploading package",builder:e=>e.options({env:{alias:"e",desc:"env id",string:!0,demandOption:!0},flow:{desc:"flow ratio of this version",number:!0,demandOption:!0},cpu:{desc:"cpu cores of this version",number:!0,demandOption:!0},mem:{desc:"memory gigabytes of this version",number:!0,demandOption:!0},min:{desc:"minimal copies",number:!0,demandOption:!0},max:{desc:"maximum copies",number:!0,demandOption:!0},threshold:{desc:"cpu threshold for auto scaling",number:!0,demandOption:!0},port:{desc:"container listening port for liveness",number:!0,demandOption:!0},service:{desc:"service name",string:!0,demandOption:!0},remark:{desc:"version remark",string:!0},envParams:{desc:"stringified environment parameters Record<string, string>",string:!0,default:"{}"},allowHttp:{desc:"allow direct http request to this version",boolean:!0,default:!1},containerRoot:{alias:"cr",desc:"path to the container folder",string:!0,demandOption:!0},dockerfilePath:{desc:"custom docker file path",string:!0},buildDir:{desc:"build directory",string:!0}}).group(["env","flow","cpu","mem","min","max","threshold","port","service","remark","envParams","allowHttp","containerRoot","dockerfilePath","buildDir"],"Options:"),handler:o=>e=e=>ci.cloud.uploadContainer({project:e,env:o.env,containerRoot:o.containerRoot,version:{flowRatio:o.flow,cpu:o.cpu,mem:o.mem,minNum:o.min,maxNum:o.max,policyType:"cpu",policyThreshold:o.threshold,containerPort:o.port,serverName:o.service,uploadType:"package",buildDir:o.buildDir,envParams:o.envParams,dockerfilePath:o.dockerfilePath,useHttpRoute:o.allowHttp,versionRemark:o.remark}})});return i},handler:()=>{}});return a},handler:()=>{}}).options("appid",{describe:"project appid",string:!0}).options("project-path",{alias:"pp",describe:"project path",string:!0}).options("private-key-path",{alias:"pkp",describe:"private key path",string:!0}).options("locales",{describe:"set locales",default:"en",string:!0,choices:["en","zh"]}).option("verbose",{alias:"v",description:"run with verbose logging",default:!0,boolean:!0}).options("proxy",{describe:"proxy url",default:"",string:!0}).options("project-type",{alias:"pt",describe:"project type",string:!0,default:"miniProgram",choices:["miniProgram","miniGame","miniProgramPlugin","miniGamePlugin"]}).options("project-ignores",{alias:"pi",describe:"project ignores",array:!0}).options("upload-description",{alias:"ud",describe:"the uploaded code version description",string:!0}).options("upload-version",{alias:"uv",describe:"the uploaded code version description",string:!0,demandOption:process.argv.includes("preview")||process.argv.includes("upload")&&!process.argv.includes("cloud")}).options("threads",{describe:"the number indicates how many threads will be created for compile the source files",number:!0,default:0,demandOption:process.argv.includes("preview")||process.argv.includes("upload")&&!process.argv.includes("cloud")}).options("use-cos",{describe:"enable uploading code-package through the async way, which is more stable than the direct way",boolean:!0,default:!1,demandOption:process.argv.includes("preview")||process.argv.includes("upload")&&!process.argv.includes("cloud")}).options("robot",{alias:"r",describe:"the robot user who is uploading the project",string:!0,default:"1",choices:["1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30"]}).options("enable-es6",{describe:"enable transform from es6 to es5",boolean:!0}).options("use-project-config",{describe:"use settings in project.config.json for ci",default:!1,boolean:!0}).options("enable-es7",{describe:"enable transform from es7 to es5",boolean:!0}).options("enable-autoprefixwxss",{describe:"enable autoprefixwxss",boolean:!0}).options("enable-minify-wxss",{describe:"enable minify wxss",boolean:!0}).options("enable-minify-wxml",{describe:"enable minify wxml",boolean:!0}).options("enable-minify-js",{describe:"enable minify js",boolean:!0}).options("enable-minify",{describe:"enable minify js/wxml/wxss",boolean:!0}).options("enable-code-protect",{describe:"enable code protect",boolean:!0}).options("enable-qrcode",{describe:"enable generate weapp qrcode",default:!1,boolean:!0}).options("qrcode-format",{describe:"format of output qrcode",default:"terminal",string:!0,choices:["base64","image","terminal"]}).options("qrcode-output-dest",{describe:"destination of output qrcode",string:!0}).options("preview-page-path",{describe:"preview with page path",string:!0}).options("preview-search-query",{describe:'preview with query, Tips: "&" should be "\\&" in command line',string:!0}).options("scene",{describe:"preview with scene, about scene: https://developers.weixin.qq.com/miniprogram/dev/reference/scene-list.html",string:!0})}),(e=>e)).help().argv;if(i.help&&(yargs_1.default.showHelp(),process.exit(0)),i.proxy&&ci.proxy(i.proxy),locales_1.default.setLocale(i.locales),i._&&!i._.includes("pack-npm-manually")){const o=new ci.Project({appid:i.appid,projectPath:i.projectPath,privateKeyPath:i.privateKeyPath,type:i.projectType,ignores:i.projectIgnores});if(formatCompileSetting(i),e)await e(o);else if(i._.includes("upload"))await ci.upload({project:o,setting:{es6:i.enableEs6,es7:i.enableEs7,minify:i.enableMinify,autoPrefixWXSS:i.enableHijack,minifyWXML:i.enableMinify||i.enableMinifyWxml,minifyWXSS:i.enableMinify||i.enableMinifyWxss,minifyJS:i.enableMinify||i.enableMinifyJs,codeProtect:i.enableCodeProtect,useProjectConfig:i.useProjectConfig},threads:i.threads,version:i.uploadVersion,desc:i.uploadDescription,robot:i.robot,onProgressUpdate:e=>{i.verbose&&log.log(e)}});else if(i._.includes("preview")){let e=i.scene;e&&(e=parseInt(e,10)),await ci.preview({project:o,setting:{es6:i.enableEs6,es7:i.enableEs7,minify:i.enableMinify,autoPrefixWXSS:i.enableHijack,minifyWXML:i.enableMinify||i.enableMinifyWxml,minifyWXSS:i.enableMinify||i.enableMinifyWxss,minifyJS:i.enableMinify||i.enableMinifyJs,codeProtect:i.enableCodeProtect,useProjectConfig:i.useProjectConfig},threads:i.threads,version:i.uploadVersion,desc:i.uploadDescription,robot:i.robot,pagePath:i.previewPagePath,searchQuery:i.previewSearchQuery,scene:e,onProgressUpdate:e=>{i.verbose&&log.log(e)},qrcodeFormat:i.qrcodeFormat,qrcodeOutputDest:i.qrcodeOutputDest})}else if(i._.includes("get-compiled-result")){let e=i.scene;e&&(e=parseInt(e,10)),await ci.getCompiledResult({project:o,setting:{es6:i.enableEs6,es7:i.enableEs7,minify:i.enableMinify,autoPrefixWXSS:i.enableHijack,minifyWXML:i.enableMinify||i.enableMinify,minifyWXSS:i.enableMinify||i.enableMinifyWxss,minifyJS:i.enableMinify||i.enableMinifyJs,codeProtect:i.enableCodeProtect},threads:i.threads,version:i.uploadVersion,desc:i.uploadDescription,robot:i.robot,pagePath:i.previewPagePath,searchQuery:i.previewSearchQuery,scene:e,onProgressUpdate:e=>{i.verbose&&log.log(e)},qrcodeFormat:i.qrcodeFormat,qrcodeOutputDest:i.qrcodeOutputDest},i.savePath)}else if(i._.includes("pack-npm")){const e=await ci.packNpm(o,{ignores:i.packNpmIgnores,reporter:e=>{i.verbose&&console.log(e)}})||[];e.length&&(log.log("Pack npm warning:"),log.log(e.map(((e,o)=>`${o+1}. ${e.msg}\n \t> code: ${e.code}\n \t@ ${e.jsPath}:${e.startLine}-${e.endLine}`)).join("---------------\n")))}else if(i._.includes("get-dev-source-map"))await ci.getDevSourceMap({project:o,robot:parseInt(i.robot,10),sourceMapSavePath:i.sourceMapSavePath}),log.info(`save sourcemap.zip to ${i.sourceMapSavePath} successfully`);else if(i._.includes("check-code-quality")){const e=await ci.checkCodeQuality(o);i.savePath?(fs_extra_1.default.ensureDirSync(path_1.default.dirname(i.savePath)),fs_extra_1.default.writeFileSync(i.savePath,JSON.stringify(e)),log.info(`save json format report to ${i.savePath} successfully`)):console.log(e)}}}function formatCompileSetting(e){if(!0!==e.useProjectConfig)for(const o in e)void 0===e[o]&&(e[o]=!1)}run().then((()=>{log.log("done"),process.exit(0)}),(e=>{console.error(e),process.exit(1)}));
|