miniprogram-ci 2.0.11 → 2.1.1
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 +4 -0
- package/README.md +4 -0
- package/dist/@types/ci/build-apk.d.ts +54 -0
- package/dist/@types/ci/build-ipa.d.ts +46 -0
- package/dist/@types/ci/getcompiler.d.ts +3 -0
- package/dist/@types/ci/index.d.ts +4 -0
- package/dist/@types/ci/miniapp/androidCloudBuild.d.ts +36 -0
- package/dist/@types/ci/miniapp/archive.d.ts +27 -0
- package/dist/@types/ci/miniapp/checkBuildArgument.d.ts +21 -0
- package/dist/@types/ci/miniapp/iosCloudBuild.d.ts +36 -0
- package/dist/@types/ci/miniapp/iosLocalBuild.d.ts +13 -0
- package/dist/@types/ci/miniapp/iosTheme.d.ts +4 -0
- package/dist/@types/ci/miniapp/miniappPlugin.d.ts +33 -0
- package/dist/@types/ci/miniapp/sdkManager.d.ts +5 -0
- package/dist/@types/ci/miniapp/upload.d.ts +25 -0
- package/dist/@types/ci/miniappattr.d.ts +1 -0
- package/dist/@types/ci/upload.d.ts +1 -1
- package/dist/@types/ci/utils/ciRequest.d.ts +7 -0
- package/dist/@types/ci/utils/tools.d.ts +4 -0
- package/dist/@types/ci/utils/unpack.d.ts +3 -0
- package/dist/@types/ci/utils/wxvpkg/unpack/config.d.ts +40 -0
- package/dist/@types/ci/utils/wxvpkg/unpack/version0.d.ts +15 -0
- package/dist/@types/ci/utils/wxvpkg/unpack/version10.d.ts +18 -0
- package/dist/@types/ci/utils/wxvpkg/utils.d.ts +3 -0
- package/dist/@types/config/config.d.ts +1 -1
- package/dist/@types/config/url.config.d.ts +8 -0
- package/dist/@types/index.d.ts +3 -0
- package/dist/@types/modules/fullcompiler/app/app.d.ts +82 -0
- package/dist/@types/modules/fullcompiler/app/contactandlaunch/originalcontactbase64.d.ts +2 -0
- package/dist/@types/modules/fullcompiler/app/contactandlaunch/originallaunchbase64.d.ts +2 -0
- package/dist/@types/modules/fullcompiler/app/contactandlaunch/updateContactForSubpkg.d.ts +2 -0
- package/dist/@types/modules/fullcompiler/app/contactandlaunch/updatecontactandlaunch.d.ts +3 -0
- package/dist/@types/modules/index.d.ts +1 -2
- package/dist/@types/project/ciProject.d.ts +3 -0
- package/dist/@types/types/ci.d.ts +5 -0
- package/dist/@types/types/miniapp/index.d.ts +88 -0
- package/dist/@types/utils/locales/locales.d.ts +1 -0
- package/dist/@types/utils/locales/zh.d.ts +1 -0
- package/dist/@types/utils/miniAppI18N.d.ts +15 -0
- package/dist/@types/utils/miniappJson.d.ts +2 -0
- package/dist/@types/utils/report.d.ts +3 -1
- package/dist/@types/utils/request.d.ts +2 -0
- package/dist/@types/utils/tools.d.ts +1 -0
- package/dist/ci/android-miniapp-toolkit/dist/index.js +1 -0
- package/dist/ci/android-miniapp-toolkit/lib/apkcert.jar +0 -0
- package/dist/ci/android-miniapp-toolkit/lib/apksigner.jar +0 -0
- package/dist/ci/android-miniapp-toolkit/lib/libwinpthread-1.dll +0 -0
- package/dist/ci/android-miniapp-toolkit/lib/zipalign +0 -0
- package/dist/ci/android-miniapp-toolkit/lib/zipalign.exe +0 -0
- package/dist/ci/build-apk.js +1 -0
- package/dist/ci/build-ipa.js +1 -0
- package/dist/ci/getcompiler.js +1 -1
- package/dist/ci/index.js +1 -1
- package/dist/ci/miniapp/androidCloudBuild.js +1 -0
- package/dist/ci/miniapp/archive.js +1 -0
- package/dist/ci/miniapp/checkBuildArgument.js +1 -0
- package/dist/ci/miniapp/iosCloudBuild.js +1 -0
- package/dist/ci/miniapp/iosLocalBuild.js +1 -0
- package/dist/ci/miniapp/iosTheme.js +1 -0
- package/dist/ci/miniapp/miniappPlugin.js +1 -0
- package/dist/ci/miniapp/sdkManager.js +1 -0
- package/dist/ci/miniapp/upload.js +1 -0
- package/dist/ci/miniappattr.js +1 -0
- package/dist/ci/utils/ciRequest.js +1 -0
- package/dist/ci/utils/tools.js +1 -1
- package/dist/ci/utils/unpack.js +1 -0
- package/dist/ci/utils/wxvpkg/unpack/config.js +1 -0
- package/dist/ci/utils/wxvpkg/unpack/version0.js +1 -0
- package/dist/ci/utils/wxvpkg/unpack/version10.js +1 -0
- package/dist/ci/utils/wxvpkg/utils.js +1 -0
- package/dist/config/config.js +1 -1
- package/dist/config/url.config.js +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/corecompiler/summer/graph/basegraph.js +1 -1
- package/dist/modules/corecompiler/summerCompiler.js +1 -1
- package/dist/modules/fullcompiler/app/app.js +1 -0
- package/dist/modules/fullcompiler/app/contactandlaunch/originalcontactbase64.js +1 -0
- package/dist/modules/fullcompiler/app/contactandlaunch/originallaunchbase64.js +1 -0
- package/dist/modules/fullcompiler/app/contactandlaunch/updateContactForSubpkg.js +1 -0
- package/dist/modules/fullcompiler/app/contactandlaunch/updatecontactandlaunch.js +1 -0
- package/dist/modules/nativecompiler/ios/buildCloud.js +1 -1
- package/dist/modules/nativecompiler/ios/index.js +1 -1
- package/dist/project/ciProject.js +1 -1
- package/dist/utils/locales/en.js +1 -1
- package/dist/utils/locales/zh.js +1 -1
- package/dist/utils/miniAppI18N.js +1 -0
- package/dist/utils/miniappJson.js +1 -1
- package/dist/utils/report.js +1 -1
- package/dist/utils/request.js +1 -1
- package/dist/utils/tools.js +1 -1
- package/dist/utils/zip.js +1 -1
- package/package.json +7 -5
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.generateCloudAndroidApk=exports.buildApk=void 0;const tslib_1=require("tslib"),request_1=require("../utils/request"),miniAppI18N_1=tslib_1.__importDefault(require("../utils/miniAppI18N")),checkBuildArgument_1=require("./miniapp/checkBuildArgument"),miniappJson_1=require("../utils/miniappJson"),tools_1=require("../utils/tools"),androidCloudBuild_1=require("./miniapp/androidCloudBuild"),log=tslib_1.__importStar(require("../utils/log")),tools_2=require("./utils/tools"),report_1=require("../utils/report");async function buildApk(e){const r=Date.now();let i;try{if(!e.project)throw new Error("缺少参数 project");const{project:r}=e;await r.miniappAttr();const{buildArchiveOpts:o,cloudBuildInfo:t}=(0,checkBuildArgument_1.transformAndroidBuildArgument)(e);e.disableCache&&((0,tools_2.clearAndroidCacheDir)(),log.info("清除 Apk 构建缓存成功")),i=await generateCloudAndroidApk(e,o,t)}catch(e){log.error("构建 Apk 失败:",e.message),i={success:!1,errmsg:"构建 Apk 失败:"+e.message}}const o=Date.now()-r;return e.project&&(0,report_1.reportAction)("buildApk",i.success?0:-1,i.errmsg,o,e.project),i}async function generateCloudAndroidApk(e,r,i){var o;const{project:t,output:s}=e;let n=!1,d="failed";try{miniAppI18N_1.default.createI18NInfo(t.projectPath);const{useCloudUpload:u,useAab:c,packageVersion:a,packageDesc:l,certificateInfo:p,uploadAppInfo:A}=i,g=Object.assign({},r);u?(g.useCloudSync=!0,g.version=a,g.desc=l):(g.version=A?A.userVersion:"",g.desc=A?A.userDesc:"");const k=(0,miniappJson_1.tryGetAndroidMiniappJson)(t.projectPath);await checkAndroidSdkVersion(k);const m=Object.assign(Object.assign({},e),{resourceDir:(0,tools_2.getMiniappCacheDir)(),robot:e.robot||1});let _="";_=c?await(0,androidCloudBuild_1.getAndroidAabBuild)(m).build(g,s,p.androidCertificate):await(0,androidCloudBuild_1.getAndroidApkBuild)(m).build(g,s,p.androidCertificate),(null===(o=k.channel)||void 0===o?void 0:o.value)&&(_=`${_.slice(0,-4)}-${k.channel.value}${c?".aab":".Apk"}`),log.success("构建 Apk 成功"),n=!0,d="success! output file at "+_}catch(e){n=!1,d=e.message,log.error("构建 Apk 失败:",e.message)}return{success:n,errmsg:d}}async function checkAndroidSdkVersion(e){if(e.sdkVersion&&(null==e?void 0:e.usePluginSdk)){const r="http://dldir1.qq.com/WechatWebDev/donut/android-extended-sdk-version.json";let{body:i}=await(0,request_1.request)({url:r,method:"get"});try{i=JSON.parse(i)}catch(e){}const o=i;if(o){Object.keys(e.usePluginSdk).forEach(r=>{const i=e.usePluginSdk[r];if(!i)return;const t=o[r][i].minMainSdk;if((0,tools_1.compareSemVer)(e.sdkVersion,t)<0)throw new Error("存在主模块 SDK 版本不满足拓展 SDK 使用最小版本情况,请检查")})}}}exports.buildApk=buildApk,exports.generateCloudAndroidApk=generateCloudAndroidApk;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildIpa=void 0;const tslib_1=require("tslib"),log=tslib_1.__importStar(require("../utils/log")),checkBuildArgument_1=require("./miniapp/checkBuildArgument"),miniAppI18N_1=tslib_1.__importDefault(require("../utils/miniAppI18N")),miniappJson_1=require("../utils/miniappJson"),sdkManager_1=require("./miniapp/sdkManager"),tools_1=require("./utils/tools"),iosLocalBuild_1=require("./miniapp/iosLocalBuild"),miniappPlugin_1=require("./miniapp/miniappPlugin"),iosTheme_1=require("./miniapp/iosTheme"),report_1=require("../utils/report"),iosCloudBuild_1=require("./miniapp/iosCloudBuild");async function buildIpa(i){const e=Date.now();let t;try{if(!i.project)throw new Error("缺少参数 project");const{project:e}=i;await e.miniappAttr();const{buildArchiveOpts:o,cloudBuildInfo:a}=(0,checkBuildArgument_1.transformIOSBuildArgument)(i);i.disableCache&&((0,tools_1.clearIOSCacheDir)(),log.info("清除 Ipa 构建缓存成功")),t=await generateCloudIOSIPA(i,o,a)}catch(i){log.error("构建 Ipa 失败:",i.message),t={success:!1,errmsg:"构建 Ipa 失败:"+i.message}}const o=Date.now()-e;return i.project&&(0,report_1.reportAction)("buildIpa",t.success?0:-1,t.errmsg,o,i.project),t}async function generateCloudIOSIPA(i,e,t){var o;const{project:a,output:r}=i;let s=!1,n="failed";try{miniAppI18N_1.default.createI18NInfo(a.projectPath);const{useCloudUpload:p,packageVersion:u,packageDesc:l,useRemoteCloudBuild:c,uploadAppInfo:d}=t;(0,miniappJson_1.autoCompleteIOSPrivacyDesc)(a.projectPath)||log.info("默认隐私信息访问许可描述添加成功");const m=(0,miniappJson_1.tryGetIOSMiniappJson)(a.projectPath),g=m.sdkVersion,{demoIpaPath:I,sdkPath:_}=await(0,sdkManager_1.generateMiniappIOSResources)(a,g,"arm64",!!m.enableIpad);p?(e.useCloudSync=!0,e.version=u,e.desc=l):(e.version=d?d.userVersion:"",e.desc=d?d.userDesc:"");const h=Object.assign(Object.assign({},i),{resourceDir:(0,tools_1.getMiniappCacheDir)(),robot:i.robot||1}),P=(0,miniappPlugin_1.getMiniappPluginManager)(h);await P.downloadPlugin(miniappPlugin_1.OS_TYPE_ENUM.IOS);const f=await P.getPluginDirList(miniappPlugin_1.OS_TYPE_ENUM.IOS),b=await(0,iosTheme_1.getIOSTheme)(a,null===(o=null==m?void 0:m.splashscreen)||void 0===o?void 0:o.customImage),O=await a.miniappAttr()||{},C=(0,tools_1.getMiniappCacheDir)(),S={buildType:"CLOUD",certificateInfo:t.certificateInfo,demoIpaPath:I,sdkPath:_,miniappCacheDirPath:C,bindingInfo:O,output:r,pluginDirList:f,theme:b,i18nInfo:miniAppI18N_1.default.i18nInfo,projectPath:a.projectPath};if(c){const i=(0,iosCloudBuild_1.getIOSCloudBuild)(h);await i.build(e,S,r)}else{S.CILocalBuild=!0;const i=(0,iosLocalBuild_1.getIOSLocalBuild)(h);await i.build(e,S,I)}log.success("构建 Ipa 成功"),s=!0,n="success! output file at "+r}catch(i){s=!1,n=i.message||i,log.error("构建 Ipa 失败:",n)}return{success:s,errmsg:n}}exports.buildIpa=buildIpa;
|
package/dist/ci/getcompiler.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCompiler=exports.getOriginalCompiler=void 0;const tslib_1=require("tslib"),originalCompiler_1=require("../modules/corecompiler/originalCompiler"),locales_1=tslib_1.__importDefault(require("../utils/locales/locales")),index_1=require("../modules/index"),precompileProject_1=require("../project/advance/precompileProject"),precompiler_1=require("../modules/precompiler"),tools_1=require("./utils/tools");let compilerInstance;const getOriginalCompiler=async e=>{if(!compilerInstance||!compilerInstance.project||compilerInstance.project.projectPath!==e.projectPath){const r=new precompiler_1.ConditionCompiler(e,void 0,void 0),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getCompiler=exports.getBuilder=exports.getOriginalCompiler=void 0;const tslib_1=require("tslib"),originalCompiler_1=require("../modules/corecompiler/originalCompiler"),locales_1=tslib_1.__importDefault(require("../utils/locales/locales")),index_1=require("../modules/index"),precompileProject_1=require("../project/advance/precompileProject"),precompiler_1=require("../modules/precompiler"),tools_1=require("./utils/tools");let compilerInstance;const getOriginalCompiler=async e=>{if(!compilerInstance||!compilerInstance.project||compilerInstance.project.projectPath!==e.projectPath){const r=new precompiler_1.ConditionCompiler(e,void 0,void 0),i=new precompileProject_1.PreCompileProject(e,r,{targetPlatform:"mini-weixin"});compilerInstance=new originalCompiler_1.OriginalCompiler(i)}return await compilerInstance.ready(),compilerInstance.setLocale(locales_1.default.getLocale()),compilerInstance};async function getBuilder(e,r){const i=new index_1.Builder(e,Object.assign({devtoolMessagehub:{showBuildLog:(e,r,i)=>{console.error("msg-"+e,"compile",r,i)}}},r));return await i.ready(),i}exports.getOriginalCompiler=getOriginalCompiler,exports.getBuilder=getBuilder;const getCompiler=async(e,r)=>{e.setting=(0,tools_1.formatCISetting)(e,r);return(await getBuilder(e)).getCompiler()};exports.getCompiler=getCompiler;
|
package/dist/ci/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.cleanCache=exports.workletVersion=exports.getWhiteExtList=exports.checkCodeQuality=exports.analyseCode=exports.getLatestVersion=exports.uploadJsServer=exports.cloud=exports.getDevSourceMap=exports.proxy=exports.packNpmManually=exports.packNpm=exports.getCompiledResult=exports.preview=exports.upload=exports.Project=void 0;const project_1=require("./project");Object.defineProperty(exports,"Project",{enumerable:!0,get:function(){return project_1.Project}});const upload_1=require("./upload"),preview_1=require("./preview"),getDevSourceMap_1=require("./getDevSourceMap"),packnpm_1=require("../modules/corecompiler/original/npm/packnpm");Object.defineProperty(exports,"packNpm",{enumerable:!0,get:function(){return packnpm_1.packNpm}}),Object.defineProperty(exports,"packNpmManually",{enumerable:!0,get:function(){return packnpm_1.packNpmManually}});const request_1=require("../utils/request");Object.defineProperty(exports,"proxy",{enumerable:!0,get:function(){return request_1.setCiProxy}});const uploadFunction_1=require("./cloud/uploadFunction"),createTimeTrigger_1=require("./cloud/createTimeTrigger"),uploadContainer_1=require("./cloud/uploadContainer"),uploadFile_1=require("./cloud/uploadFile"),report_1=require("../utils/report"),jsserver_1=require("./jsserver");Object.defineProperty(exports,"uploadJsServer",{enumerable:!0,get:function(){return jsserver_1.uploadJsServer}});const code_analyse_1=require("./code-analyse");Object.defineProperty(exports,"analyseCode",{enumerable:!0,get:function(){return code_analyse_1.analyseCode}});const getCompiledResult_1=require("./getCompiledResult");Object.defineProperty(exports,"getCompiledResult",{enumerable:!0,get:function(){return getCompiledResult_1.getCompiledResult}});const getLatestVersion_1=require("./getLatestVersion");Object.defineProperty(exports,"getLatestVersion",{enumerable:!0,get:function(){return getLatestVersion_1.getLatestVersion}});const white_ext_list_1=require("../utils/white_ext_list");Object.defineProperty(exports,"getWhiteExtList",{enumerable:!0,get:function(){return white_ext_list_1.getWhiteExtList}});const checkCodeQuality_1=require("./checkCodeQuality");Object.defineProperty(exports,"checkCodeQuality",{enumerable:!0,get:function(){return checkCodeQuality_1.checkCodeQuality}});const cache_1=require("../utils/cache");function cleanCache(){cache_1.cacheManager.clean()}exports.upload=(0,report_1.wrapReport)("upload",upload_1.upload),exports.preview=(0,report_1.wrapReport)("preview",preview_1.preview),exports.getDevSourceMap=(0,report_1.wrapReport)("getDevSourceMap",getDevSourceMap_1.getDevSourceMap),exports.cloud={uploadFunction:uploadFunction_1.uploadFunction,createTimeTrigger:createTimeTrigger_1.createTimeTrigger,uploadStaticStorage:e=>(0,uploadFile_1.uploadFiles)(e,"staticstorage"),uploadStorage:e=>(0,uploadFile_1.uploadFiles)(e,"storage"),uploadContainer:uploadContainer_1.uploadContainer},exports.workletVersion=require("../utils/babel_plugin_worklet").version,exports.cleanCache=cleanCache;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.cleanCache=exports.workletVersion=exports.buildIpa=exports.buildApk=exports.getWhiteExtList=exports.checkCodeQuality=exports.analyseCode=exports.getLatestVersion=exports.uploadJsServer=exports.cloud=exports.getDevSourceMap=exports.proxy=exports.packNpmManually=exports.packNpm=exports.getCompiledResult=exports.preview=exports.upload=exports.Project=void 0;const project_1=require("./project");Object.defineProperty(exports,"Project",{enumerable:!0,get:function(){return project_1.Project}});const upload_1=require("./upload"),preview_1=require("./preview"),getDevSourceMap_1=require("./getDevSourceMap"),packnpm_1=require("../modules/corecompiler/original/npm/packnpm");Object.defineProperty(exports,"packNpm",{enumerable:!0,get:function(){return packnpm_1.packNpm}}),Object.defineProperty(exports,"packNpmManually",{enumerable:!0,get:function(){return packnpm_1.packNpmManually}});const request_1=require("../utils/request");Object.defineProperty(exports,"proxy",{enumerable:!0,get:function(){return request_1.setCiProxy}});const uploadFunction_1=require("./cloud/uploadFunction"),createTimeTrigger_1=require("./cloud/createTimeTrigger"),uploadContainer_1=require("./cloud/uploadContainer"),uploadFile_1=require("./cloud/uploadFile"),report_1=require("../utils/report"),jsserver_1=require("./jsserver");Object.defineProperty(exports,"uploadJsServer",{enumerable:!0,get:function(){return jsserver_1.uploadJsServer}});const code_analyse_1=require("./code-analyse");Object.defineProperty(exports,"analyseCode",{enumerable:!0,get:function(){return code_analyse_1.analyseCode}});const getCompiledResult_1=require("./getCompiledResult");Object.defineProperty(exports,"getCompiledResult",{enumerable:!0,get:function(){return getCompiledResult_1.getCompiledResult}});const getLatestVersion_1=require("./getLatestVersion");Object.defineProperty(exports,"getLatestVersion",{enumerable:!0,get:function(){return getLatestVersion_1.getLatestVersion}});const white_ext_list_1=require("../utils/white_ext_list");Object.defineProperty(exports,"getWhiteExtList",{enumerable:!0,get:function(){return white_ext_list_1.getWhiteExtList}});const checkCodeQuality_1=require("./checkCodeQuality");Object.defineProperty(exports,"checkCodeQuality",{enumerable:!0,get:function(){return checkCodeQuality_1.checkCodeQuality}});const cache_1=require("../utils/cache"),build_apk_1=require("./build-apk");Object.defineProperty(exports,"buildApk",{enumerable:!0,get:function(){return build_apk_1.buildApk}});const build_ipa_1=require("./build-ipa");function cleanCache(){cache_1.cacheManager.clean()}Object.defineProperty(exports,"buildIpa",{enumerable:!0,get:function(){return build_ipa_1.buildIpa}}),exports.upload=(0,report_1.wrapReport)("upload",upload_1.upload),exports.preview=(0,report_1.wrapReport)("preview",preview_1.preview),exports.getDevSourceMap=(0,report_1.wrapReport)("getDevSourceMap",getDevSourceMap_1.getDevSourceMap),exports.cloud={uploadFunction:uploadFunction_1.uploadFunction,createTimeTrigger:createTimeTrigger_1.createTimeTrigger,uploadStaticStorage:e=>(0,uploadFile_1.uploadFiles)(e,"staticstorage"),uploadStorage:e=>(0,uploadFile_1.uploadFiles)(e,"storage"),uploadContainer:uploadContainer_1.uploadContainer},exports.workletVersion=require("../utils/babel_plugin_worklet").version,exports.cleanCache=cleanCache;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAndroidAabBuild=exports.getAndroidApkBuild=void 0;const tslib_1=require("tslib"),tools_1=require("../../utils/tools"),zip_1=require("../../utils/zip"),archive=tslib_1.__importStar(require("./archive")),miniappJson_1=require("../../utils/miniappJson"),android=tslib_1.__importStar(require("../android-miniapp-toolkit/dist/index")),log=tslib_1.__importStar(require("../../utils/log")),urlConfig=tslib_1.__importStar(require("../../config/url.config")),ciRequest_1=require("../utils/ciRequest"),sign_1=require("../../utils/sign"),request_1=require("../../utils/request"),path=require("path"),fs=require("fs-extra"),safeGet=require("licia/safeGet"),find=require("licia/find"),trim=require("licia/trim"),endWith=require("licia/endWith"),clone=require("licia/clone"),isUndef=require("licia/isUndef"),sleep=require("licia/sleep"),now=require("licia/now"),each=require("licia/each"),fileSize=require("licia/fileSize"),promisify=require("licia/promisify"),AdmZip=require("adm-zip"),rmdir=promisify(require("licia/rmdir"));var TaskStatus;!function(i){i[i.Pending=1]="Pending",i[i.Running=2]="Running",i[i.Success=3]="Success",i[i.Fail=4]="Fail"}(TaskStatus||(TaskStatus={}));const waitTimeout=3e5,waitInterval=1e4;class AndroidCloudBuild{constructor(i,t){this.baseDir="",this.infoPath="",this.androidDir="",this.res=Buffer.from([]),this.md5="",this.output="",this.skipCheckRemote=!1,this.packageName="",this.downloadRes=async i=>new Promise((t,e)=>{(0,request_1.simpleRequest)({url:i,method:"get",encoding:null},(i,s,a)=>{if(i)return e(i);t(a)})}),this.aab=i,this.project=t.project,this.ciOpts=t}async build(i,t,e){return await this.init(t),await this.checkBase()||await this.buildBase(),e&&(isUndef(e.keyStore)||""===trim(e.keyStore))&&(e={}),await this.buildCode(i),await this.buildResult(e),this.output}async init(i){const{aab:t,project:e}=this,s=(0,tools_1.generateMD5)(e.projectPath),a=await this.getPackageName();this.androidDir=path.posix.join(this.ciOpts.resourceDir,"android/"+s),this.baseDir=path.posix.join(this.androidDir,t?"aab":"apk"),this.infoPath=path.posix.join(this.androidDir,t?"info-aab.json":"info.json");const r=(0,miniappJson_1.tryGetAndroidMiniappJson)(e.projectPath).version||"",o=`${a}${r?"-"+r:""}.${t?"aab":"apk"}`;this.output=path.posix.join(i,o),this.skipCheckRemote=!1,this.packageName=a,await fs.ensureDir(this.androidDir),this.res=t?await android.pack({configPath:e.projectPath,aab:!0}):await android.pack({configPath:e.projectPath}),this.md5=(0,tools_1.generateMD5)(this.res),log.info(`本地 Android 配置资源打包,大小:${fileSize(this.res.length)} B`)}async buildCode(i){try{const{version:t,desc:e,miniappPkgType:s,remoteDebugEnable:a,useCloudSync:r=!1}=i,o="mini-android",n=this.project,c=path.posix.join(this.baseDir,this.aab?"base/assets/SaaA_embed":"assets/SaaA_embed");fs.existsSync(c)&&await fs.remove(c),await archive.buildProjectArchive(this.ciOpts,{version:t,desc:e,targetPlatform:o,outputDir:c,miniappOptions:{miniappPkgType:s,remoteDebugEnable:a,useCloudSync:r,archVersion:1,needClientJsExtInfo:(0,miniappJson_1.isAndroidNeedClientJsExtInfo)(n.projectPath)}}),log.info("构建项目资源包成功")}catch(i){throw i}}async checkBase(){return await this.checkLocal()||await this.checkRemote()}async checkLocal(){const{infoPath:i}=this;if(!fs.existsSync(i))return log.info("本地未找到基座 APK,需要远程构建"),!1;const t=JSON.parse(await fs.readFile(i,"utf8"));return t.packageName&&t.packageName!==this.packageName?(this.skipCheckRemote=!0,log.info("本地存在基座 APK,但已过期无法使用,需要远程构建"),!1):t.md5===this.md5?(log.info("本地存在符合基座 APK,直接使用"),!0):(log.info("本地存在基座 APK,但已过期无法使用,需要远程构建"),!1)}async checkRemote(){if(this.skipCheckRemote)return!1;const i=await this.waitForRemoteReady();if(i&&i.status===TaskStatus.Success)try{return await this.downloadBase(i.task_id),log.info("远程存在符合基座 APK,直接使用"),!0}catch(i){log.info(i.message)}else log.info("远程不存在基座 APK,需要构建");return!1}async buildBase(){const{infoPath:i}=this,t=await this.createTask();if(!t){if(fs.existsSync(i))return void log.error("该多端应用当周构建次数已用完,本次构建基于本地基座 APK,仅更新小程序代码");throw Error("该多端应用今日构建次数已用完")}log.info("任务创建成功,任务 ID: "+t);const e=await this.waitForRemoteReady();if(e){if(e.status!==TaskStatus.Success)throw e.status===TaskStatus.Fail?Error("基座 APK 构建失败,错误信息:"+e.errmsg):Error("基座 APK 构建超时,请稍候重试");await this.downloadBase(e.task_id)}}async buildResult(i){var t;const e=this.project,s=(0,miniappJson_1.tryGetAndroidMiniappJson)(e.projectPath);(null===(t=s.channel)||void 0===t?void 0:t.value)&&(this.output=`${this.output.slice(0,-4)}-${s.channel.value}${this.aab?".aab":".apk"}`),await this.genZip(),log.info("对 APK 进行签名");try{this.aab?await android.signV1(this.output,i):await android.sign(this.output,i)}catch(i){throw Error("APK 签名失败,请确保证书配置正确,错误信息:"+i.message)}log.info("APK 构建成功,保存位置:"+this.output)}async genZip(){const{baseDir:i,output:t}=this,e=new AdmZip;await e.addLocalFolderPromise(i);const s=clone(e.getEntries());this.aab?each(s,i=>{i.isDirectory&&(Object.defineProperty(i,"isDirectory",{get:()=>!1}),e.deleteFile(i))}):each(s,i=>{"resources.arsc"===i.entryName&&(i.header.method=0)});const a=await e.toBufferPromise();await fs.writeFile(t,a)}async createTask(){const i=this.project.appid,t=await(0,sign_1.getSignature)(this.project.privateKey,i),e=await(0,ciRequest_1.ciCustomRequest)(`${urlConfig.uploadCloudBuildResourcePack}?os_type=2&appid=${i}&signature=${encodeURIComponent(t)}&robot=${this.ciOpts.robot}`,this.res,{"content-type":"application/octet-stream"}),s=e.baseresponse||{errcode:-1e4},a=parseInt(s.errcode,10);if(0===a)return e.task_id;if(10002053===a)return"";throw Error("任务创建失败,错误码:"+a)}async waitForRemoteReady(){const i=now();for(;;){const t=await this.getTask();if(!t||t.status===TaskStatus.Success||t.status===TaskStatus.Fail||now()-i>3e5)return t;t.status===TaskStatus.Pending?log.info("检查任务状态,等待中..."):t.status===TaskStatus.Running&&log.info("检查任务状态,构建中..."),await sleep(1e4)}}async getTask(){const i=await this.getTaskList();return find(i,i=>!0===i.is_self)}async getTaskList(){return(await(0,ciRequest_1.ciSimpleRequest)({privateKey:this.project.privateKey,appid:this.project.appid,cgi:urlConfig.getCloudBuildTaskList+"?os_type=2",robot:this.ciOpts.robot})).list}async downloadBase(i){log.info("下载远程基座 APK,任务 ID:"+i);const{pkgUrl:t,resUrl:e}=await this.getTaskResultUrl(i),s=await this.downloadRes(e),a=(0,tools_1.generateMD5)(s);if(a!==this.md5)throw Error("远程存在基座 APK,但已过期无法使用,需要重新远程构建");await this.downloadPkg(t);const r={taskId:i,packageName:this.packageName,md5:a};await fs.writeFile(this.infoPath,JSON.stringify(r,null,2),"utf8")}downloadPkg(i){const{baseDir:t,infoPath:e}=this,s=path.resolve(this.androidDir,"base.zip"),a=fs.createWriteStream(s,{mode:511});return new Promise((r,o)=>{(0,request_1.simpleRequest)({url:i,method:"get"},i=>{i&&o(i)}).pipe(a),a.on("error",i=>{o(i)}),a.on("close",async()=>{try{fs.existsSync(e)&&await fs.unlink(e),fs.existsSync(t)&&await rmdir(t),await(0,zip_1.unzip)(s,t);const i=path.resolve(t,"META-INF"),a=await fs.readdir(i);for(let t=0,e=a.length;t<e;t++){const e=a[t];if(endWith(e,".RSA")||endWith(e,".SF")){const t=path.resolve(i,e);await fs.unlink(t)}}await fs.unlink(s)}catch(i){return o(i)}r({})})})}async getTaskResultUrl(i){const t=await(0,ciRequest_1.ciSimpleRequest)({cgi:`${urlConfig.getCloudBuildPkgUrl}?task_id=${i}`,privateKey:this.project.privateKey,appid:this.project.appid,robot:this.ciOpts.robot});return{pkgUrl:t.pkg_url,resUrl:t.resource_url}}async getPackageName(){const i=this.project,t=await i.miniappAttr();return safeGet(t,"mobileapp_info.android_package_name")||"com.tencent.weauth"}}const getAndroidApkBuild=i=>new AndroidCloudBuild(!1,i);exports.getAndroidApkBuild=getAndroidApkBuild;const getAndroidAabBuild=i=>new AndroidCloudBuild(!0,i);exports.getAndroidAabBuild=getAndroidAabBuild;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.buildProjectArchive=void 0;const tslib_1=require("tslib"),getcompiler_1=require("../getcompiler"),tools_1=require("../../utils/tools"),log=tslib_1.__importStar(require("../../utils/log")),upload_1=require("./upload"),url_config_1=require("../../config/url.config"),sign_1=require("../../utils/sign"),jsonParse_1=require("../../utils/jsonParse"),unpack_1=tslib_1.__importDefault(require("../utils/unpack")),app_1=require("../../modules/fullcompiler/app/app"),miniappJson_1=require("../../utils/miniappJson"),path=require("path"),fse=require("fs-extra"),request=require("request"),QueryString=require("querystring");function getUploadOptions(){return{appLaunchInfo:{},uploadType:"build",autoTestMock:!1,onProgressUpdate:(...e)=>{log.info(...e)},onFilesIgnored:()=>{},onFilesMissing:()=>{},remoteDebug:!1,remoteProxyPort:void 0,disableUrlCheck:!1,autoPreview:!1,cdpEnabled:!1,remoteAppservice:!1,remoteAppserviceType:"ios",noMaps:!1,showProgress:!1}}async function downloadWxapkg(e,o,r,i,n,t,s){const{project:a,robot:p}=e,c=await(0,sign_1.getSignature)(a.privateKey,a.appid),l={appid:a.appid,pkg_source:"Release"===n?4:3,pkg_type:r?4:0,use_cloud_sync:t?1:0,os_type:"mini-android"===i?2:1,need_client_js_ext_info:"mini-android"===i?s:1,signature:c,robot:p},u=fse.createWriteStream(o,{mode:511});return new Promise((e,o)=>{const r=request({url:`${url_config_1.getPkgWxapkg}?${QueryString.stringify(l)}`,method:"get"},e=>{e&&o(e)});r.on("response",i=>{const n=i.headers["content-type"];if(null==n?void 0:n.toLocaleLowerCase().includes("text/plain")){let e="";i.on("data",o=>{e+=o}),i.on("end",()=>{var r,i,n;try{e=(0,jsonParse_1.jsonRespParse)(e,url_config_1.getPkgWxapkg);const t=null!==(r=e.baseresponse)&&void 0!==r?r:{},s=null!==(i=t.errcode)&&void 0!==i?i:-1,a=null!==(n=t.errmsg)&&void 0!==n?n:"request fail";o(`errcode ${s}, errmsg ${a}`)}catch(e){o(e)}})}else r.pipe(u),u.on("error",e=>{log.error("download miniapp wxapkg error:"+e.message),o(e)}),u.on("close",()=>{e({})});i.on("error",e=>{o(e)})})}).catch(e=>{throw new Error(`${url_config_1.getPkgWxapkg} fail ${e}`)})}async function extractWxapkgToAppDir(e){const o=e.replace(".wxapkg","");fse.ensureDirSync(o),fse.emptyDirSync(o);const r=fse.readFileSync(e);try{await(0,unpack_1.default)(r,o)}catch(e){let o=r.toString("utf8");o.length>100&&(o=o.slice(0,100));const i=`Download pkg error: ${o} (${e.msg})`;throw new Error(i)}return o}async function genSubPkgAppInfo(e,o,r,i,n,t,s){var a;const{setting:p={useProjectConfig:!1},project:c,targetPlatform:l}=this,u=(0,miniappJson_1.getMiniappJson)(c.projectPath,l),g=u.icon,d=u.name,f=(await(0,getcompiler_1.getCompiler)(c,p)).getAppJSON(),m=(null===(a=null==f?void 0:f.window)||void 0===a?void 0:a.pageOrientation)||"portrait",_=await(0,app_1.generateSubPkgAppInfoJson)({miniModuleId:e,nickName:d,brandIconURL:g,pageOrientation:m,buildVersion:i,subpkgs:o,contact:n,cpfWxaAttrSyncResponse:t,miniappPkgType:s});fse.ensureDirSync(path.dirname(r)),fse.writeJSONSync(r,_)}async function buildProjectArchive(e,o){var r;let i,n="";try{const t=e.project,{module_info:s={}}=await t.miniappAttr()||{};if(!s.module_id)throw new Error("project.miniapp.json 尚未配置 miniModuleId");log.info("构建项目资源包中...");const a=null!==(r=(await(0,upload_1.upload)(Object.assign(Object.assign(Object.assign({},e),o),getUploadOptions()))).useSubPkg)&&void 0!==r&&r,{miniappOptions:p,outputDir:c}=o,{miniappPkgType:l,useCloudSync:u,needClientJsExtInfo:g}=p;log.info("下载项目资源包中..."),i=path.join(e.resourceDir,"app.wxapkg"),await downloadWxapkg(e,i,a,o.targetPlatform,l,u,g),log.info("下载项目资源包成功"),log.info("生成项目资源包中..."),n=await extractWxapkgToAppDir(i);const d=fse.readJsonSync(path.join(n,"info.json"));if(0===d.wxapkgs.length)throw new Error("构建项目资源包失败: 获取不到 wxapkg");fse.ensureDirSync(c),fse.emptyDirSync(c),d.wxapkgs.forEach(e=>{const o=path.join(c,e.file),r=o+".sign";fse.moveSync(path.join(n,e.file),o),fse.moveSync(path.join(n,e.signFile),r);const i=fse.readFileSync(o);e.md5=(0,tools_1.generateMD5)(i),e.versionType=null==p?void 0:p.miniappPkgType});const f=path.join(c,"buildinfo.json");await genSubPkgAppInfo.call(Object.assign(Object.assign({},e),o),s.module_id,d.wxapkgs,f,d.buildVersion,d.contact,d.cpfWxaAttrSyncResponse,p.miniappPkgType),log.info("生成项目资源包成功")}catch(e){throw new Error("build project archive error: "+e.message)}finally{n&&fse.existsSync(n)&&fse.removeSync(n);(await(0,getcompiler_1.getCompiler)(e.project,e.setting||{useProjectConfig:!1})).destroy()}}exports.buildProjectArchive=buildProjectArchive;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.transformIOSBuildArgument=exports.transformAndroidBuildArgument=exports.publicKeyForP12password=exports.defaulPasswordPlaceHolderForCache=void 0;const tslib_1=require("tslib"),miniappJson_1=require("../../utils/miniappJson"),tools_1=require("../../utils/tools"),fs_extra_1=tslib_1.__importDefault(require("fs-extra")),path_1=tslib_1.__importDefault(require("path")),isWindows_1=tslib_1.__importDefault(require("licia/isWindows")),moment=require("moment"),crypto=require("crypto");var IMiniappPkgType;exports.defaulPasswordPlaceHolderForCache="*******",exports.publicKeyForP12password="-----BEGIN PUBLIC KEY-----\nMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDRsmgcQqaCjlFVITfAzIWsjpxj\nynoXetXQhmIspi86V6rtq2BENl9HrrX18XsQ8Qn6jsNJ6mtvSUUflvpLnEQMM1M7\nwagNazL0A2KFw97Br9sE+CVJdctC/dmportNjrbekNYHacT1bL+GDpatAaD4Pnwy\nx3yJsmqx3tJun1G++wIDAQAB\n-----END PUBLIC KEY-----\n",function(e){e.Release="Release",e.Debug="Debug",e.HotReload="HotReload"}(IMiniappPkgType||(IMiniappPkgType={}));const validateFileExistenceAndExtname=(e,r,o,i="",t="")=>{if(t&&(o=path_1.default.join(t,o)),!fs_extra_1.default.existsSync(o))throw new Error(`${e}: ${r} 无法找到文件 ${o} 文件`);if(i&&path_1.default.extname(o)!==i)throw new Error(`${e}: ${r} 文件后缀必须为 ${i}`)},unifyiOSBuildFilePathForWindows=(e,r)=>{e[r]&&(e[r]=(0,tools_1.unifyPath)(e[r]))},transformAndroidBuildArgument=e=>{const{project:r,keyStore:o,keyPass:i,storePass:t,keyAlias:s,output:n,useAab:a=!1,desc:p="",isUploadResourceBundle:l=!1,resourceBundleVersion:u="",resourceBundleDesc:d="",robot:c=1}=e;if(!r)throw new Error("缺少参数 project");const f=r.projectPath,m=(0,miniappJson_1.tryGetAndroidMiniappJson)(f),w=`CI robot ${c||1} 在 ${moment().format("LLL")} 提交上传`;if(!m.version)throw new Error("project.miniapp.json 中缺少 miniapp-android.version 字段");if(!n)throw new Error("缺少参数 output");if(validateFileExistenceAndExtname("build-apk options","keyStore",o,".jks"),!t)throw new Error("缺少参数 storePass");if(!i)throw new Error("缺少参数 keyPass");if(!s)throw new Error("缺少参数 keyAlias");return{buildArchiveOpts:{version:m.version,desc:e.desc||w,miniappPkgType:IMiniappPkgType.Release,useCloudSync:l,remoteDebugEnable:!1},cloudBuildInfo:{certificateInfo:{androidCertificate:{keyStore:o,keyAlias:s,keyPass:i,storePass:t}},miniappPkgType:IMiniappPkgType.Release,remoteDebugEnable:!1,useCloudUpload:l,useAab:a,packageVersion:u||m.version,packageDesc:d||w,uploadAppInfo:{uploadBetaVersion:!1,userVersion:m.version,userDesc:p||w},recordInfo:""}}};exports.transformAndroidBuildArgument=transformAndroidBuildArgument;const transformIOSBuildArgument=e=>{var r;const{project:o,output:i,isDistribute:t=!1,isRemoteBuild:s=!1,profilePath:n="",certificateName:a="",p12Path:p="",p12Password:l="",tpnsProfilePath:u="",desc:d="",isUploadBeta:c=!1,isUploadResourceBundle:f=!1,resourceBundleVersion:m="",resourceBundleDesc:w="",robot:P}=e;if(!o)throw new Error("缺少参数 project");const h=o.projectPath,y=(0,miniappJson_1.getRawMiniappJson)(o.projectPath),b=(0,miniappJson_1.tryGetIOSMiniappJson)(h),A=`CI robot ${P||1} 在 ${moment().format("LLL")} 提交上传`;if(!b.version)throw new Error("project.miniapp.json 中缺少 miniapp-ios.version 字段");if(!i)throw new Error("缺少参数 output");if(isWindows_1.default&&!s)throw new Error("windows 仅支持远程构建");const E={useRemote:s,p12:p,p12password:l,certificate:a,profile:n,tpnsProfile:u},g={isPublish:t};if(validateFileExistenceAndExtname("build-ipa options","profile",n,".mobileprovision",o.projectPath),g.profilePath=s?n:path_1.default.join(o.projectPath,n),!a)throw new Error("缺少参数 certificateName");if(g.certificateName=a,E.useRemote){if(validateFileExistenceAndExtname("build-ipa options","p12",p,".p12",o.projectPath),!l)throw new Error("缺少参数 p12Password");g.certificatePassword=l,g.certificatePath=p,isWindows_1.default&&(unifyiOSBuildFilePathForWindows(E,"profile"),unifyiOSBuildFilePathForWindows(E,"tpnsProfile"),unifyiOSBuildFilePathForWindows(E,"p12"));const e=Buffer.from(E.p12password,"utf8"),r=crypto.publicEncrypt(exports.publicKeyForP12password,e);E.p12passwordEncrypted=r.toString("base64"),y["mini-ios"].buildCloud=E,delete E.p12password,(0,miniappJson_1.writeMiniAppJson)(o.projectPath,y)}!0===(null===(r=b.tpush)||void 0===r?void 0:r.useExtendedLib_WeAppTPNS)&&validateFileExistenceAndExtname("build-ipa options","tpnsProfile",u,".mobileprovision",o.projectPath);return{buildArchiveOpts:{version:b.version,desc:e.desc||A,miniappPkgType:IMiniappPkgType.Release,useCloudSync:f,remoteDebugEnable:!1},cloudBuildInfo:{certificateInfo:{signType:"certificate",selfCertificate:g},miniappPkgType:IMiniappPkgType.Release,remoteDebugEnable:!1,useCloudUpload:f,packageVersion:m||b.version,packageDesc:w||A,uploadAppInfo:{uploadBetaVersion:c,userVersion:b.version,userDesc:d||A},useRemoteCloudBuild:s||!1,recordInfo:""}}};exports.transformIOSBuildArgument=transformIOSBuildArgument;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getIOSCloudBuild=void 0;const tslib_1=require("tslib"),tools_1=require("../../utils/tools"),miniappJson_1=require("../../utils/miniappJson"),getcompiler_1=require("../getcompiler"),log=tslib_1.__importStar(require("../../utils/log")),packfile_1=require("../utils/packfile"),archive=tslib_1.__importStar(require("./archive")),urlConfig=tslib_1.__importStar(require("../../config/url.config")),ciRequest_1=require("../utils/ciRequest"),sign_1=require("../../utils/sign"),request_1=require("../../utils/request"),zip_1=require("../../utils/zip"),zlib_1=tslib_1.__importDefault(require("zlib")),path=require("path"),fs=require("fs-extra"),safeGet=require("licia/safeGet"),promisify=require("licia/promisify"),fileSize=require("licia/fileSize"),now=require("licia/now"),find=require("licia/find"),sleep=require("licia/sleep"),gzip=promisify(zlib_1.default.gzip);var OSType,TaskStatus;!function(i){i[i.iOS=1]="iOS",i[i.Android=2]="Android"}(OSType||(OSType={})),function(i){i[i.Pending=1]="Pending",i[i.Running=2]="Running",i[i.Success=3]="Success",i[i.Fail=4]="Fail"}(TaskStatus||(TaskStatus={}));const waitTimeout=3e5,waitInterval=1e4,TransformTipsURL="https://web-v2-1g8g0y2x3197301a-1304825656.tcloudbaseapp.com/important_miniapp/MiniAppBuildTips.json?sign=0f07b014a760d699cf2c8a9bb84845bf&t=1724920547";class IOSCloudBuild{constructor(i){this.baseDir="",this.materialDir="",this.iOSDir="",this.iPADir="",this.res=Buffer.from([]),this.md5="",this.output="",this.buildSuccess=!1,this.logAbPath="",this.project=i.project,this.ciOpts=i}async build(i,t,e){return this.cloudBuildOptions=t,await this.init(e),await this.buildMaterial(i),await this.buildBase(),await this.buildResult(),this.output}async init(i){const t=this.project,e=(0,tools_1.generateMD5)(t.projectPath),s=await this.getBundleId();if(this.iOSDir=path.join(this.ciOpts.resourceDir,"iOSCloudBuild/"+e),this.baseDir=path.join(this.iOSDir),this.materialDir=path.join(this.iOSDir,"project"),this.iPADir=path.join(this.iOSDir,"ipa"),i){const e=(0,miniappJson_1.tryGetAndroidMiniappJson)(t.projectPath).version||"",a=this.getFinalIpaName(s,e);this.output=path.posix.join(i,a)}else this.output=path.posix.join(this.iOSDir,"app.ipa");await fs.ensureDir(this.iOSDir),await fs.ensureDir(this.materialDir),await fs.emptyDir(this.materialDir)}async packAllFilesInDir(i){const t=await(0,packfile_1.packFiledir)(i);return await gzip(t.data)}async buildMaterial(i){let t;try{t=await(0,getcompiler_1.getBuilder)(this.project,{devtoolMessagehub:{showBuildLog:(i,t,e)=>{log.info("miniprogram-ci native compile",t,e)}}});const e=await t.getNativeCompiler();await e.packIOSCloudBuildMaterial(Object.assign(Object.assign({},this.cloudBuildOptions),{matrialDistPath:this.materialDir})),await this.buildCode(i),this.res=await this.packAllFilesInDir(this.materialDir),this.md5=(0,tools_1.generateMD5)(this.res),log.info(`本地 iOS 配置资源打包,大小:${fileSize(this.res.length)} B`)}catch(i){throw i}finally{null==t||t.destroy()}}async buildCode(i){try{const{version:t,desc:e,miniappPkgType:s,remoteDebugEnable:a,useCloudSync:r=!1}=i,o="mini-ios",n=path.posix.join(this.materialDir,"__miniappWxapkg");if(fs.existsSync(n)&&await fs.remove(n),await archive.buildProjectArchive(this.ciOpts,{version:t,desc:e,targetPlatform:o,outputDir:n,miniappOptions:{miniappPkgType:s,remoteDebugEnable:a,useCloudSync:r,archVersion:1}}),!fs.existsSync(n))throw new Error("ios cloudbuild failed: cant find buildCode result: "+n);log.info("构建项目资源包成功")}catch(i){throw i}}async buildBase(){const i=await this.createTask();if(!i)throw Error("该多端应用当周构建次数已用完,本次构建基于本地基座 IOS,仅更新小程序代码");log.info("任务创建成功,任务 ID: "+i);const t=await this.waitForRemoteReady();if(t)if(t.status===TaskStatus.Success)this.buildSuccess=!0,await this.downloadBase(t.task_id,!0);else{if(t.status!==TaskStatus.Fail)throw Error("iOS App 远程云构建超时,请稍候重试");this.buildSuccess=!1,log.info("IPA 构建失败,错误信息:"+t.errmsg),await this.downloadBase(t.task_id,!1)}}async buildResult(){if(!this.buildSuccess){log.info("下载日志成功,保存位置:"+this.output);let{body:i}=await(0,request_1.request)({url:TransformTipsURL,method:"get"});try{i=JSON.parse(i)}catch(i){}const t=null==i?void 0:i.ios,e=(fs.readdirSync(this.logAbPath)||[]).find(i=>i.endsWith(".log"));let s=!1;throw e&&t&&fs.readFileSync(path.join(this.logAbPath,e),{encoding:"utf8"}).split("\n").forEach(i=>{const e=Object.keys(t).find(t=>i.includes(t));e&&(s=!0,log.error(`[${t[e].code}] ${t[e].msg} 原信息:${i}`))}),s?new Error("错误详细日志如上"):new Error("IPA 构建失败,请前往社区反馈 https://developers.weixin.qq.com/community/minihome/mixflow/2889188691586351105")}log.info("IPA 构建成功,保存位置:"+this.output)}async createTask(){const i=this.project.appid,t=await(0,sign_1.getSignature)(this.project.privateKey,i),e=await(0,ciRequest_1.ciCustomRequest)(`${urlConfig.uploadCloudBuildResourcePack}?os_type=${OSType.iOS}&appid=${i}&signature=${encodeURIComponent(t)}&robot=${this.ciOpts.robot}`,this.res,{"content-type":"application/octet-stream"}),s=e.baseresponse||{errcode:-1e4},a=parseInt(s.errcode,10);if(0===a)return e.task_id;if(10002053===a)return"";throw Error("任务创建失败,错误码:"+a)}async waitForRemoteReady(){const i=now();for(;;){const t=await this.getTask();if(!t||t.status===TaskStatus.Success||t.status===TaskStatus.Fail||now()-i>3e5)return t;t.status===TaskStatus.Pending?log.info("检查任务状态,等待中..."):t.status===TaskStatus.Running&&log.info("检查任务状态,构建中..."),await sleep(1e4)}}async getTask(){const i=await this.getTaskList();return find(i,i=>!0===i.is_self)}async getTaskList(){return(await(0,ciRequest_1.ciSimpleRequest)({privateKey:this.project.privateKey,appid:this.project.appid,cgi:`${urlConfig.getCloudBuildTaskList}?os_type=${OSType.iOS}`,robot:this.ciOpts.robot})).list}async downloadBase(i,t){t?log.info("下载远程 IPA,任务 ID:"+i):log.info("下载远程日志文件,任务 ID:"+i);const{pkgUrl:e}=await this.getTaskResultUrl(i);await this.downloadIPA(e,i,t)}downloadIPA(i,t,e){const s=path.resolve(this.iOSDir,t+"/resultZip.zip"),a=path.resolve(this.iOSDir,t+"/result");fs.ensureFileSync(s),fs.ensureDirSync(a);const r=fs.createWriteStream(s,{mode:511});return new Promise((t,o)=>{(0,request_1.simpleRequest)({url:i,method:"get"},i=>{i&&o(i+" at iosCloudBuild download ipa request")}).pipe(r),r.on("error",i=>{o(i+" at iosCloudBuild download ipa deststream")}),r.on("close",async()=>{try{await(0,zip_1.unzip)(s,a)}catch(i){return o(e?"failed process zip file":"build failed! (Cant extract log dir)")}try{const i=fs.readdirSync(a);if(!e){const i=path.join(a,"log");if(fs.existsSync(i)){const e=path.parse(this.output),s=path.posix.join(e.dir,e.name+"_log");return fs.copySync(i,s),this.logAbPath=i,this.output=s,t({})}return o("cant find log dir in result")}{const t=i.find(i=>".ipa"===path.extname(i));if(!t)return o("ipa is not in result");fs.copyFileSync(path.join(a,t),this.output)}}catch(i){return o()}t({})})})}async getTaskResultUrl(i){const t=await(0,ciRequest_1.ciSimpleRequest)({cgi:`${urlConfig.getCloudBuildPkgUrl}?task_id=${i}`,privateKey:this.project.privateKey,appid:this.project.appid,robot:this.ciOpts.robot});return{pkgUrl:t.pkg_url,resUrl:t.resource_url}}async getBundleId(){const i=this.project,t=await i.miniappAttr()||{};return safeGet(t,"mobileapp_info.bundle_id")||"com.tencent.weauth"}getFinalIpaName(i,t){return`${i.replace(/[.*]/g,"")}-${t}.ipa`}}const getIOSCloudBuild=i=>new IOSCloudBuild(i);exports.getIOSCloudBuild=getIOSCloudBuild;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getIOSLocalBuild=void 0;const tslib_1=require("tslib"),getcompiler_1=require("../getcompiler"),archive=tslib_1.__importStar(require("./archive")),log=tslib_1.__importStar(require("../../utils/log")),path=require("path"),fse=require("fs-extra");class IOSLocalBuild{constructor(e){this.iosDir="",this.project=e.project,this.ciOpts=e}async buildArchive(e,i){const t=path.join(e,"MiniApp.bundle/module");fse.existsSync(t)&&fse.removeSync(t);const{version:o,desc:r,miniappPkgType:s,remoteDebugEnable:l,useCloudSync:c}=i;await archive.buildProjectArchive(this.ciOpts,{version:o,desc:r,targetPlatform:"mini-ios",outputDir:t,miniappOptions:{miniappPkgType:s,remoteDebugEnable:l,useCloudSync:c,archVersion:1}})}async build(e,i,t){let o;try{await this.buildArchive(t,e),o=await(0,getcompiler_1.getBuilder)(this.project,{devtoolMessagehub:{showBuildLog:(e,i,t)=>{log.info("miniprogram-ci native compile",i,t)}}});const r=await o.getNativeCompiler();await r.buildIOSIPA(i)}catch(e){throw e}finally{null==o||o.destroy()}}}const getIOSLocalBuild=e=>new IOSLocalBuild(e);exports.getIOSLocalBuild=getIOSLocalBuild;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getIOSTheme=void 0;const Jimp=require("jimp"),fse=require("fs-extra"),path=require("path"),getIOSWaterMarkRGBVal=async(e,t=375,a=812,r=64)=>{if(!fse.existsSync(e))throw new Error(`iOS 启动页 ${e} 不存在`);const i=await Jimp.read(e);i.resize(t,a);const o=Math.floor(t/2),l=a-r,s=i.getPixelColor(o,l);let{r:n,g:p,b:c}=Jimp.intToRGBA(s);const h=e=>e<=.03928?e/12.92:((e+.055)/1.055)**2.4;n=h(n/255),p=h(p/255),c=h(c/255);const u=.2126*n+.7152*p+.0722*c;return u<=.1?"Light":u>.1&&u<=.16?"LightSpecial":u>.16&&u<.25?"DarkSpecial":"Dark"},getIOSTheme=async(e,t)=>{var a;const r=await e.miniappAttr()||{};let i="Dark";return(null===(a=null==r?void 0:r.cpa_package_info)||void 0===a?void 0:a.enable_remove_watermark)?i="Default":t&&(path.isAbsolute(t)||(t=path.join(null==e?void 0:e.projectPath,t)),i=await getIOSWaterMarkRGBVal(t)),t&&(path.isAbsolute(t)||(t=path.join(null==e?void 0:e.projectPath,t)),i=await getIOSWaterMarkRGBVal(t)),i};exports.getIOSTheme=getIOSTheme;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMiniappPluginManager=exports.OS_TYPE_ENUM=void 0;const tslib_1=require("tslib"),miniappJson_1=require("../../utils/miniappJson"),urlConfig=tslib_1.__importStar(require("../../config/url.config")),ciRequest_1=require("../utils/ciRequest"),log=tslib_1.__importStar(require("../../utils/log")),fs_extra_1=tslib_1.__importDefault(require("fs-extra")),path_1=tslib_1.__importDefault(require("path")),unpack_1=tslib_1.__importDefault(require("../utils/unpack")),sign_1=require("../../utils/sign"),jsonParse_1=require("../../utils/jsonParse"),request=require("request");var OS_TYPE_ENUM;!function(i){i.IOS="1",i.ANDROID="2"}(OS_TYPE_ENUM=exports.OS_TYPE_ENUM||(exports.OS_TYPE_ENUM={}));class MiniappPluginManager{constructor(i){this.WeappMiniApp="",this.project=i.project,this.ciOpts=i,this.WeappMiniApp=i.resourceDir}async getUsedPluginVersionInfo(i){const{osType:e,pluginList:n}=i;return await(0,ciRequest_1.ciSimpleRequest)({privateKey:this.project.privateKey,appid:this.project.appid,robot:this.ciOpts.robot,cgi:`${urlConfig.getUsedPluginVersionInfo}?os_type=${e}`},{plugin_list:n})}async downloadMiniAppPlugin(i){const{pluginList:e,osType:n}=i,t=this.project.appid,r=this.project.privateKey,s=await(0,sign_1.getSignature)(r,t),o=`${urlConfig.downloadMiniAppPlugin}?os_type=${n}`;return new Promise((i,n)=>{request({url:o,method:"post",body:JSON.stringify({appid:t,signature:s,robot:this.ciOpts.robot,plugin_list:e}),headers:{"content-type":"application/json"}},i=>{i&&n(i)}).on("response",e=>{var t;const r=null===(t=e.headers["content-type"])||void 0===t?void 0:t.toLocaleLowerCase();if((null==r?void 0:r.includes("text/plain"))||(null==r?void 0:r.includes("application/json"))){let t="";e.on("data",i=>{t+=i}),e.on("end",()=>{try{t=(0,jsonParse_1.jsonRespParse)(t,o),i(t.data)}catch(i){n((i.message||i)+" at downloadMiniAppPlugin")}})}else{const n=[];e.setEncoding("binary"),e.on("data",i=>{n.push(Buffer.from(i,"binary"))}),e.on("end",()=>{const e=Buffer.concat(n);i(e)})}e.on("error",i=>{n((i.message||i)+" at downloadMiniAppPlugin")})})})}async removePluginDir(i,e){var n;const t=path_1.default.join(this.WeappMiniApp,"miniapp-plugin/"+(i===OS_TYPE_ENUM.ANDROID?"android":"ios")),r=null===(n=fs_extra_1.default.readdirSync(t,{withFileTypes:!0}).find(i=>i.name.startsWith(e)))||void 0===n?void 0:n.name;r&&fs_extra_1.default.removeSync(path_1.default.join(t,r))}async downloadPlugin(i){var e;const n=this.project,t=(0,miniappJson_1.tryGetPluginMiniappJson)(n.projectPath),r=(null===(e=null==t?void 0:t[i===OS_TYPE_ENUM.ANDROID?"android":"ios"])||void 0===e?void 0:e.filter(i=>i.open&&i.pluginId&&i.pluginVersion&&!i.isFromLocal))||[];if(!r.length)return;const{baseresponse:s,info_list:o}=await this.getUsedPluginVersionInfo({pluginList:r.map(i=>({plugin_id:i.pluginId,version:i.pluginVersion})),osType:i});if(0!==s.errcode)throw new Error("获取插件信息失败 "+s.errmsg);const a=[],p=path_1.default.join(this.ciOpts.resourceDir,"miniapp-plugin/"+(i===OS_TYPE_ENUM.ANDROID?"android":"ios"));fs_extra_1.default.ensureDirSync(p);const l=fs_extra_1.default.readdirSync(p,{withFileTypes:!0});if(o.forEach(e=>{e.is_released||log.info(`使用的多端插件 ${e.plugin_id} 为开发版本,上线前请替换为发布版本`);const n=`${e.plugin_id}-${e.user_version}-`,t=l.find(i=>i.name.startsWith(n));t?e.is_released?t.name!==n+e.release_time&&(this.removePluginDir(i,e.plugin_id),a.push({plugin_id:e.plugin_id,version:e.user_version})):t.name!==n+e.commit_time&&(this.removePluginDir(i,e.plugin_id),a.push({plugin_id:e.plugin_id,version:e.user_version})):a.push({plugin_id:e.plugin_id,version:e.user_version})}),!a.length)return;log.info("多端插件下载中...");const u=await this.downloadMiniAppPlugin({pluginList:a,osType:i});if(u.baseresponse)throw new Error(`多端插件下载失败,错误代码:${u.baseresponse.errcode}, 错误描述: ${u.baseresponse.errmsg}`);log.info("多端插件下载完成");const d=await(0,unpack_1.default)(u),g=Object.keys(d)[0];await(0,unpack_1.default)(d[Object.keys(d)[0]],path_1.default.join(p,g.replace(".wxapkg","")))}async getPluginDirList(i){var e;const n=this.project,t=(0,miniappJson_1.tryGetPluginMiniappJson)(n.projectPath),r=(null===(e=null==t?void 0:t[i===OS_TYPE_ENUM.ANDROID?"android":"ios"])||void 0===e?void 0:e.filter(i=>i.open))||[];if(!r.length)return[];const s=r.filter(i=>!i.isFromLocal&&i.pluginId&&i.pluginVersion),o=r.filter(i=>i.isFromLocal);if(o.length>0){const i=o.map(i=>i.pluginId).join(",");throw new Error(`CI 构建下,多端插件 ${i} 不支持使用本地插件`)}const a=path_1.default.join(this.WeappMiniApp,"miniapp-plugin/"+(i===OS_TYPE_ENUM.ANDROID?"android":"ios"));fs_extra_1.default.ensureDirSync(a);const p=fs_extra_1.default.readdirSync(a,{withFileTypes:!0}).filter(i=>{const e=i.name.split("-");return i.isDirectory()&&3===e.length&&s.find(i=>i.pluginId===e[0]&&i.pluginVersion===e[1])}).map(i=>({dir:path_1.default.join(a,i.name),pluginId:i.name.split("-")[0]}));if(s.length!=p.length)throw new Error("多端插件下载列表失败,请重新构建");return p}}const getMiniappPluginManager=i=>new MiniappPluginManager(i);exports.getMiniappPluginManager=getMiniappPluginManager;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.generateMiniappIOSResources=void 0;const tslib_1=require("tslib"),zip_1=require("../../utils/zip"),request_1=require("../../utils/request"),tools_1=require("../../utils/tools"),log=tslib_1.__importStar(require("../../utils/log")),tools_2=require("../utils/tools"),fse=require("fs-extra"),path=require("path"),CDN_PREFIX="https://dldir1.qq.com/WechatWebDev/";class SDKVersionManager{constructor(e){this.project=e,this.iosBaseDir=(0,tools_2.getMiniappIOSCacheDir)(),this.downloadBigFile=async(e,s)=>{const i=fse.createWriteStream(s,{mode:511});return new Promise((s,o)=>{(0,request_1.simpleRequest)({url:""+e,method:"get"},e=>{e&&o(e)}).pipe(i),i.on("error",e=>{o(e)}),i.on("close",()=>{s({})})})},this.downloadMiniappIOSResources=async(e,s=!1)=>{log.info("Download ios resources...");const i=path.join(this.iosBaseDir,"v2-ipa",e);fse.existsSync(i)||(fse.emptyDirSync(path.dirname(i)),fse.ensureDirSync(i));const o=["x86.zip","arm64.zip",`WeAppSDK-${e}.zip`];s&&(o.push("x86_ipad.zip"),o.push("arm64_ipad.zip"));try{const s=[];o.forEach(o=>{const r=`${CDN_PREFIX}donut/ios/${e}/${o}`,t=path.join(i,o);fse.existsSync(t)||s.push(this.downloadBigFile(r,t))}),await Promise.all(s),log.info("Download ios resources successfully")}catch(e){throw fse.removeSync(i),new Error(`download ios resources resources failed: ${e.message}. Network issue or SDK Version may not suitable for IPad beta`)}return i},this.generateMiniappIOSResources=async(e,s,i=!1,o=!1)=>{try{log.info((i?"is":"not")+" using iPad Beta");const o=await this.downloadMiniappIOSResources(e,i);log.info("Archive ios resources...");let r="";r=i?path.join(o,"arm64"===s?"arm64_ipad.zip":"x86_ipad.zip"):path.join(o,"arm64"===s?"arm64.zip":"x86.zip");const t=path.join(o,`WeAppSDK-${e}.zip`),a=path.join(this.iosBaseDir,"v2-ipa",e,`ipa-${s}${i?"-iPad":""}-${(0,tools_1.generateMD5)(this.project.projectPath)}/Payload`);fse.existsSync(a)||await(0,zip_1.unzip)(r,a);const n=path.join(this.iosBaseDir,"v2-ipa",e,"sdk-"+(0,tools_1.generateMD5)(this.project.projectPath));return fse.existsSync(n)||await(0,zip_1.unzip)(t,n),log.info("Archive ios resources successfully"),{demoIpaPath:path.join(a,"demo.app"),sdkPath:n}}catch(r){const t=path.join(this.iosBaseDir,"v2-ipa",e);if(fse.existsSync(t)&&fse.removeSync(t),o){log.info(`Start retry, Process resources failed: ${r.message}.`);return await this.generateMiniappIOSResources(e,s,i,!1)}throw log.error("Archive ios resources failed, please retry and check whether your network is running smoothly..."),new Error("Download and unzip the ios resources failed: "+r.message)}},this.project=e}}async function generateMiniappIOSResources(e,s,i,o=!1){return await new SDKVersionManager(e).generateMiniappIOSResources(s,i,o,!0)}exports.generateMiniappIOSResources=generateMiniappIOSResources;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.upload=exports.SIGNATURE_FILE_NAME=void 0;const tslib_1=require("tslib"),cache_1=require("../../utils/cache"),locales_1=tslib_1.__importDefault(require("../../utils/locales/locales")),config_1=require("../../config/config"),getcompiler_1=require("../getcompiler"),tools_1=require("../utils/tools"),moment_1=tslib_1.__importDefault(require("moment")),url_config_1=require("../../config/url.config"),sign_1=require("../../utils/sign"),taskstatus_1=require("../../utils/taskstatus"),pack_1=require("../utils/pack"),log=tslib_1.__importStar(require("../../utils/log")),querystring_1=tslib_1.__importDefault(require("querystring")),zlib_1=tslib_1.__importDefault(require("zlib")),request_1=require("../../utils/request"),jsonParse_1=require("../../utils/jsonParse"),progressupdate_1=require("../utils/progressupdate");function getMiniappBuildQuery(e){var i,r,o,t;const s=(0,moment_1.default)(new Date).format("YYYY-MM-DD-HH-mm-ss"),n={gzip:1,cross_platform_app:1,"user-version":encodeURIComponent(e.version||"miniapp-release-d-"+s),"user-desc":encodeURIComponent(e.desc||"miniapp-release-d-"+s),os_type:"mini-android"===e.targetPlatform?2:1,debug_extra_info:"miniappPkgType-"+(null===(i=e.miniappOptions)||void 0===i?void 0:i.miniappPkgType)};return(null===(r=e.miniappOptions)||void 0===r?void 0:r.useCloudSync)&&(n.use_cloud_sync=1),(null===(o=e.miniappOptions)||void 0===o?void 0:o.archVersion)&&(n.arch_version=null===(t=e.miniappOptions)||void 0===t?void 0:t.archVersion),n}async function upload(e){const{project:i,setting:r={useProjectConfig:!1},robot:o="1",threads:t=0}=e,s=(0,progressupdate_1.transProgressUpdate)(e.onProgressUpdate||(e=>{if("object"==typeof e)try{const i=JSON.stringify(e);console.log(i)}catch(e){}console.log(""+e)}));process.env.COMPILE_THREADS=t.toString(),cache_1.cacheManager.clean();const n=await(0,getcompiler_1.getCompiler)(i,r),a=(0,tools_1.formatCISetting)(i,r),p=await n.compile({setting:a,onProgressUpdate:s,resultType:"prod"}),u=config_1.CI_VERSION,l=encodeURIComponent(JSON.stringify(getMiniappBuildQuery(e))),c={appid:i.appid,robot:o,miniapparchivequery:l};try{const e=new taskstatus_1.TaskStatus(locales_1.default.config.UPLOAD.toString());s(e);const r=`${url_config_1.miniappUpload}?${querystring_1.default.stringify(c)}`,o=await(0,sign_1.getSignature)(i.privateKey,i.appid);p[exports.SIGNATURE_FILE_NAME]=JSON.stringify({signature:o,version:u});const t=(0,pack_1.pack)(p),n=zlib_1.default.gzipSync(t.buffer);log.info("request url:",r);const a=(await(0,request_1.request)({url:r,method:"post",body:n})).body.toString(),l=(0,jsonParse_1.jsonRespParse)(a,r);if(0!==l.errCode)throw new Error(a);e.done(),s(e);const _={respBody:l.body};if(Array.isArray(l.body.subpackage_info)){const e=l.body.subpackage_info;_.subPackageInfo=e,_.useSubPkg=e.length>1}if(Array.isArray(l.body.ext_plugin_info)){const e=l.body.ext_plugin_info;_.pluginInfo=e.map(e=>({pluginProviderAppid:e.provider,version:e.version,size:e.size}))}return _}catch(e){throw e}}exports.SIGNATURE_FILE_NAME="ci.signature",exports.upload=upload;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getMiniappAttr=void 0;const tslib_1=require("tslib"),request_1=require("../utils/request"),sign_1=require("../utils/sign"),log=tslib_1.__importStar(require("../utils/log")),url_config_1=require("../config/url.config"),jsonParse_1=require("../utils/jsonParse"),testCache={};async function getMiniappAttr(e,t){try{if(global.useAttrCache&&testCache[t])return testCache[t];const r=await(0,sign_1.getSignature)(e,t),{body:i}=await(0,request_1.request)({url:url_config_1.getSdkIntInfo,method:"post",body:JSON.stringify({appid:t,signature:r}),headers:{"content-type":"application/json"}}),s=(0,jsonParse_1.jsonRespParse)(i,url_config_1.getSdkIntInfo);if(0===s.errCode)return global.useAttrCache&&(testCache[t]=s.data),s.data;log.error(`get ${t} project miniapp attr fail errCode: ${s.errCode}, errMsg: ${s.errMsg}`)}catch(e){throw log.error(`get ${t} project miniapp attr fail ${e}`),e}}exports.getMiniappAttr=getMiniappAttr;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ciCustomRequest=exports.ciSimpleRequest=void 0;const request_1=require("../../utils/request"),sign_1=require("../../utils/sign"),jsonParse_1=require("../../utils/jsonParse");async function ciSimpleRequest({privateKey:e,appid:r,cgi:t,robot:s},o={}){let i;try{const a=await(0,sign_1.getSignature)(e,r),{body:n}=await(0,request_1.request)({url:t,method:"post",body:JSON.stringify(Object.assign({appid:r,signature:a,robot:s},o)),headers:{"content-type":"application/json"}});i=(0,jsonParse_1.jsonRespParse)(n,t)}catch(e){throw new Error(`${t} fail ${e}`)}if(0===i.errCode)return i.data;throw new Error(`${t} fail errCode: ${i.errCode}, errMsg: ${i.errMsg}`)}async function ciCustomRequest(e,r,t){const s=await(0,request_1.request)({url:e,method:"post",body:r,headers:t||{"content-type":"application/json"}});let o;try{o=JSON.parse(s.body)}catch(r){throw new Error(`request ${e} failed: resp body is not a valid json`)}if(0!==o.errCode)throw new Error(`request failed, errCode: ${o.errCode}, errMsg: ${o.errMsg}`);return o.data}exports.ciSimpleRequest=ciSimpleRequest,exports.ciCustomRequest=ciCustomRequest;
|
package/dist/ci/utils/tools.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.formatCISetting=exports.isUndefined=exports.checkIsUseCompilerPlugins=exports.isGameApp=exports.CompileSettingsKeysInProjectConfig=void 0;const types_1=require("../../types"),projectconfig_1=require("../../modules/corecompiler/original/json/projectconfig");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"],exports.isGameApp=isGameApp;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,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.clearAndroidCacheDir=exports.clearIOSCacheDir=exports.getMiniappIOSCacheDir=exports.getMiniappCacheDir=exports.formatCISetting=exports.isUndefined=exports.checkIsUseCompilerPlugins=exports.isGameApp=exports.CompileSettingsKeysInProjectConfig=void 0;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"],exports.isGameApp=isGameApp;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,p,d,a;const f=(0,projectconfig_1.getProjectConfigJSON)(i);if(e.useProjectConfig)return Object.assign(Object.assign({},f.setting),{minifyWXSS:!1!==e.minifyWXSS&&(!!e.minify||(isUndefined(e.minifyWXSS)?null===(n=f.setting)||void 0===n?void 0:n.minifyWXSS:!!e.minifyWXSS)),minifyWXML:!1!==e.minifyWXML&&(!!e.minify||(isUndefined(e.minifyWXML)?null===(t=f.setting)||void 0===t?void 0:t.minifyWXML:!!e.minifyWXML)),minified:!1!==e.minifyJS&&(!!e.minify||(isUndefined(e.minifyJS)?null===(s=f.setting)||void 0===s?void 0:s.minified:!!e.minifyJS)),postcss:isUndefined(e.autoPrefixWXSS)?null===(o=f.setting)||void 0===o?void 0:o.postcss:!!e.autoPrefixWXSS,disableUseStrict:isUndefined(e.disableUseStrict)?null===(r=f.setting)||void 0===r?void 0:r.disableUseStrict:!!e.disableUseStrict,compileWorklet:isUndefined(e.compileWorklet)?null===(c=f.setting)||void 0===c?void 0:c.compileWorklet:!!e.compileWorklet,uglifyFileName:isUndefined(e.codeProtect)?null===(p=f.setting)||void 0===p?void 0:p.uglifyFileName:!!e.codeProtect,es6:isUndefined(e.es6)&&isUndefined(e.es7)?null===(d=f.setting)||void 0===d?void 0:d.es6:!!e.es6||!!e.es7,enhance:isUndefined(e.es6)&&isUndefined(e.es7)?null===(a=f.setting)||void 0===a?void 0:a.enhance:!!e.es6||!!e.es7});const l=Object.assign({},f.setting);for(const i in l)exports.CompileSettingsKeysInProjectConfig.indexOf(i)>-1&&delete l[i];return Object.assign(Object.assign({},l),{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,exports.isUndefined=isUndefined,exports.formatCISetting=formatCISetting,exports.getMiniappCacheDir=getMiniappCacheDir,exports.getMiniappIOSCacheDir=getMiniappIOSCacheDir,exports.clearIOSCacheDir=clearIOSCacheDir,exports.clearAndroidCacheDir=clearAndroidCacheDir;
|
|
@@ -0,0 +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("wxvpkg unrecognized version: "+i);return t(e,r)};module.exports=unpack;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ConfigV10=exports.ConfigV0=exports.ConfigCommon=void 0,exports.ConfigCommon={SPECIAL_START_BEGIN:0,SPECIAL_START_END:1,VERSION_BEGIN:1,VERSION_END:5,INFO_LENGTH_BEGIN:5,INFO_LENGTH_END:9},exports.ConfigV0=Object.assign(Object.assign({},exports.ConfigCommon),{FILE_LENGTH_BEGIN:9,FILE_LENGTH_END:13,SPECIAL_END_BEGIN:13,SPECIAL_END_END:14,FILE_COUNT_BEGIN:14,FILE_COUNT_END:18,FILF_INFO_BEGIN:18}),exports.ConfigV10=Object.assign(Object.assign({},exports.ConfigCommon),{INDEX_LENGTH_BEGIN:9,INDEX_LENGTH_END:13,FILE_LENGTH_BEGIN:13,FILE_LENGTH_END:17,SPECIAL_END_BEGIN:17,SPECIAL_END_END:18,FILE_COUNT_BEGIN:18,FILE_COUNT_END:22,FILF_INFO_BEGIN:22});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFileInfo=exports.getFileCount=exports.getFileContentLength=exports.getFileInfoLength=void 0;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 o=FILF_INFO_BEGIN;for(let r=0;r<t;r++){const t=e.slice(o,o+4).readInt32BE(0);o+=4;const r=e.slice(o,o+t).toString();o+=t;const E=e.slice(o,o+4).readInt32BE(0);o+=4;const i=e.slice(o,o+4).readInt32BE(0);o+=4,n.push({name:r,offset:E,length:i})}return n}function unpack(e,t){try{const n=getFileInfo(e),o={};for(const r of n){const{name:n,offset:E,length:i}=r;if(o[n]=e.slice(E,E+i),t){const e=path.join(t,n);mkdir.sync(path.dirname(e)),fs.writeFileSync(e,o[n])}}return o}catch(e){throw new Error("unpack wxvpkg catch error "+e)}}exports.getFileInfoLength=getFileInfoLength,exports.getFileContentLength=getFileContentLength,exports.getFileCount=getFileCount,exports.getFileInfo=getFileInfo,exports.default=unpack;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getFileInfo=exports.getFileCount=exports.getFileContentLength=exports.getFileIndexLength=exports.getFileInfoLength=void 0;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 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 I=e.slice(E,E+1).readIntBE(0,1,!1);E+=1;const N=e.slice(E,E+2).readIntBE(0,2,!1);E+=2;const i=e.slice(E,E+4).readInt32BE(0);E+=4;const r=e.slice(E,E+4).readInt32BE(0);E+=4,n.push({name:o,encType:I,mode:N,offset:i,length:r})}return n}function unpack(e,t){try{const n=getFileInfo(e),E={},o=18+getFileInfoLength(e)+getFileIndexLength(e);for(const I of n){const{name:n,offset:N,length:i,mode:r}=I;if(E[n]=e.slice(N+o,N+o+i),t){const e=path.join(t,n);mkdir.sync(path.dirname(e)),fs.writeFileSync(e,E[n],{mode:r.toString(8)})}}return E}catch(e){throw new Error("unpack wxvpkg catch error "+e)}}exports.getFileInfoLength=getFileInfoLength,exports.getFileIndexLength=getFileIndexLength,exports.getFileContentLength=getFileContentLength,exports.getFileCount=getFileCount,exports.getFileInfo=getFileInfo,exports.default=unpack;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getVersionByFD=exports.getVersion=void 0;const fs=require("fs"),VERSION_BEGIN=1,VERSION_END=5,getVersion=e=>{let r=e.slice(1,5).readInt32BE(0);if(1===r){const t=e.slice(13,14);14!==t[0]&&237!==t[0]||(r=0)}return r};exports.getVersion=getVersion;const getVersionByFD=e=>{const r=Buffer.alloc(4);fs.readSync(e,r,0,4,1);let t=r.readInt32BE(0);if(1===t){const r=Buffer.alloc(1);fs.readSync(e,r,0,1,13),14!==r[0]&&237!==r[0]||(t=0)}return t};exports.getVersionByFD=getVersionByFD;
|
package/dist/config/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var COMPILE_TYPE,AstType,EFilterCode;function getDefaultIgnores(e){const _=["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"];return"multiPlatform"===e.projectArchitecture&&_.push(exports.multiPlatformRoot+"/**/*"),_}Object.defineProperty(exports,"__esModule",{value:!0}),exports.MAX_CODE_LENGTH=exports.EFilterCode=exports.AstType=exports.compileTypeConfig=exports.getDefaultIgnores=exports.FullPkg=exports.MainPkg=exports.multiPlatformRoot=exports.extendedLibMap=exports.jsonVariablePropertyWhiteList=exports.DefaultProjectAttr=exports.TABBAR_ICON_WHITE_LIST=exports.COMPILE_TYPE=exports.APP_TYPE=exports.MINI_GAME_WORKERS_PACKAGE_ROOT=exports.MINI_GAME_MAIN_PACKAGE_ROOT=exports.MINI_PROGRAM_MAIN_PACKAGE_ROOT=exports.PROJECT_TYPE_ERROR=exports.GET_LATEST_VERSION_CGI_ERR=exports.UPLOAD_JS_SERVER_CGI_ERR=exports.CODE_PROTECT_TRANSLATE_FILENAME=exports.UPLOAD_CGI_ERR=exports.GENERATE_LOCAL_SIGNATURE_ERR=exports.GET_SIGNATURE_RAND_STRING_ERR=exports.APP_JSON_NOT_FOUND=exports.JSON_CONTENT_ERR=exports.FILE_NOT_UTF8=exports.JSON_PARSE_ERR=exports.FILE_NOT_FOUND=exports.PLUGIN_JSON_PARSE_ERR=exports.PLUGIN_JSON_CONTENT_ERR=exports.PLUGIN_JSON_FILE_NOT_FOUND=exports.GAME_PLUGIN_LIB_MD5_NOT_MATCH=exports.SUMMER_PLUGIN_CODE_ERR=exports.SUMMER_PLUGIN_ERR=exports.MINIFY_WXML_ERR=exports.POST_WXSS_ERR=exports.FILE_FLAT_ERR=exports.JS_ES6_ERR=exports.BABILI_JS_ERR=exports.UGLIFY_JS_ERR=exports.BABEL_TRANS_JS_ERR=exports.JS_NOT_FOUND=exports.WXML_NOT_FOUND=exports.PARAM_ERROR=exports.CI_VERSION=void 0,exports.CI_VERSION="2.
|
|
1
|
+
"use strict";var COMPILE_TYPE,AstType,EFilterCode;function getDefaultIgnores(e){const _=["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"];return"multiPlatform"===e.projectArchitecture&&_.push(exports.multiPlatformRoot+"/**/*"),_}Object.defineProperty(exports,"__esModule",{value:!0}),exports.MAX_CODE_LENGTH=exports.EFilterCode=exports.AstType=exports.compileTypeConfig=exports.getDefaultIgnores=exports.FullPkg=exports.MainPkg=exports.multiPlatformRoot=exports.extendedLibMap=exports.jsonVariablePropertyWhiteList=exports.DefaultProjectAttr=exports.TABBAR_ICON_WHITE_LIST=exports.COMPILE_TYPE=exports.APP_TYPE=exports.MINI_GAME_WORKERS_PACKAGE_ROOT=exports.MINI_GAME_MAIN_PACKAGE_ROOT=exports.MINI_PROGRAM_MAIN_PACKAGE_ROOT=exports.PROJECT_TYPE_ERROR=exports.GET_LATEST_VERSION_CGI_ERR=exports.UPLOAD_JS_SERVER_CGI_ERR=exports.CODE_PROTECT_TRANSLATE_FILENAME=exports.UPLOAD_CGI_ERR=exports.GENERATE_LOCAL_SIGNATURE_ERR=exports.GET_SIGNATURE_RAND_STRING_ERR=exports.APP_JSON_NOT_FOUND=exports.JSON_CONTENT_ERR=exports.FILE_NOT_UTF8=exports.JSON_PARSE_ERR=exports.FILE_NOT_FOUND=exports.PLUGIN_JSON_PARSE_ERR=exports.PLUGIN_JSON_CONTENT_ERR=exports.PLUGIN_JSON_FILE_NOT_FOUND=exports.GAME_PLUGIN_LIB_MD5_NOT_MATCH=exports.SUMMER_PLUGIN_CODE_ERR=exports.SUMMER_PLUGIN_ERR=exports.MINIFY_WXML_ERR=exports.POST_WXSS_ERR=exports.FILE_FLAT_ERR=exports.JS_ES6_ERR=exports.BABILI_JS_ERR=exports.UGLIFY_JS_ERR=exports.BABEL_TRANS_JS_ERR=exports.JS_NOT_FOUND=exports.WXML_NOT_FOUND=exports.PARAM_ERROR=exports.CI_VERSION=void 0,exports.CI_VERSION="2.1.1",exports.PARAM_ERROR=1e4,exports.WXML_NOT_FOUND=10007,exports.JS_NOT_FOUND=10008,exports.BABEL_TRANS_JS_ERR=10032,exports.UGLIFY_JS_ERR=10033,exports.BABILI_JS_ERR=10034,exports.JS_ES6_ERR=10035,exports.FILE_FLAT_ERR=10036,exports.POST_WXSS_ERR=10037,exports.MINIFY_WXML_ERR=10038,exports.SUMMER_PLUGIN_ERR=10045,exports.SUMMER_PLUGIN_CODE_ERR=10046,exports.GAME_PLUGIN_LIB_MD5_NOT_MATCH=10081,exports.PLUGIN_JSON_FILE_NOT_FOUND=10091,exports.PLUGIN_JSON_CONTENT_ERR=10092,exports.PLUGIN_JSON_PARSE_ERR=10093,exports.FILE_NOT_FOUND=10005,exports.JSON_PARSE_ERR=10006,exports.FILE_NOT_UTF8=10031,exports.JSON_CONTENT_ERR=10009,exports.APP_JSON_NOT_FOUND=2e4,exports.GET_SIGNATURE_RAND_STRING_ERR=20001,exports.GENERATE_LOCAL_SIGNATURE_ERR=20002,exports.UPLOAD_CGI_ERR=20003,exports.CODE_PROTECT_TRANSLATE_FILENAME=20004,exports.UPLOAD_JS_SERVER_CGI_ERR=20005,exports.GET_LATEST_VERSION_CGI_ERR=20006,exports.PROJECT_TYPE_ERROR=3e4,exports.MINI_PROGRAM_MAIN_PACKAGE_ROOT="__APP__",exports.MINI_GAME_MAIN_PACKAGE_ROOT="__GAME__",exports.MINI_GAME_WORKERS_PACKAGE_ROOT="workers.js",exports.APP_TYPE={NORMAL:0,PLUGIN:1,SHOP:2,MINISHOP:3,GAME:4,CARD:5,NATIVE:7},function(e){e.miniProgram="miniProgram",e.miniProgramPlugin="miniProgramPlugin",e.miniGame="miniGame",e.miniGamePlugin="miniGamePlugin"}(COMPILE_TYPE=exports.COMPILE_TYPE||(exports.COMPILE_TYPE={})),exports.TABBAR_ICON_WHITE_LIST=[".png",".jpg",".jpeg"],exports.DefaultProjectAttr={platform:!1,appType:0,isSandbox:!1,released:!1,setting:{MaxCodeSize:2,MaxSubpackageSubCodeSize:2,MaxSubpackageFullCodeSize:12,NavigateMiniprogramLimit:10,MaxSubPackageLimit:100,MinTabbarCount:2,MaxTabbarCount:5,MaxCustomTabbarCount:10,MaxTabbarIconSize:40}},exports.jsonVariablePropertyWhiteList={windowPropertWhiteList:["navigationBarBackgroundColor","navigationBarTextStyle","backgroundColor","backgroundTextStyle","backgroundColorTop","backgroundColorBottom","backgroundColorContent"],tabBarPropertyWhiteList:["color","selectedColor","backgroundColor","borderStyle"],tabbarListItemPropertyWhiteList:["iconPath","selectedIconPath"]},exports.extendedLibMap={kbone:{packages:["miniprogram-element","miniprogram-render"]},weui:{packages:["weui-miniprogram"]}},exports.multiPlatformRoot="miniapp",exports.MainPkg="__APP__",exports.FullPkg="__FULL__",exports.getDefaultIgnores=getDefaultIgnores,exports.compileTypeConfig={weapp:"weapp",game:"game",plugin:"plugin",gamePlugin:"gamePlugin"},function(e){e.Babel="babel",e.Acorn="acorn"}(AstType=exports.AstType||(exports.AstType={})),function(e){e[e.Include=0]="Include",e[e.PackOptionsIgnore=1]="PackOptionsIgnore",e[e.AnalyseNoUse=2]="AnalyseNoUse",e[e.PartialCompileNoUse=3]="PartialCompileNoUse"}(EFilterCode=exports.EFilterCode||(exports.EFilterCode={})),exports.MAX_CODE_LENGTH=2048e3;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getAsyncResult=exports.testSourceNewFeatureURL=exports.testSourceURL=exports.getUploadToken=exports.commitSourceURL=exports.commitSourceNewFeatureURL=exports.tcbTencentCloudUrl=exports.dbTencentCloudUrl=exports.scfTencentCloudUrl=exports.cloudCosUploadURL=exports.get3rdCloudCodeSecret=exports.cloudAPIAgentURL=exports.GET_LATEST_VERSION=exports.UPLOAD_JS_SERVER=exports.GET_ASYNC_RESULT=exports.GET_UPLOAD_TOKEN=exports.GET_CLOUD_API_SIGNATURE=exports.TRANSLATE_FILENAME=exports.GET_DEV_SOURCE_MAP=exports.GET_RAND_STRING=exports.GET_ONLINE_SCHEMA=exports.GET_WHITE_EXT_LIST=exports.TEST_SOURCE_URL=exports.UPLOAD_URL=exports.GET_ATTR_URL=void 0;const Domain="https://servicewechat.com";exports.GET_ATTR_URL=Domain+"/wxa/ci/getattr",exports.UPLOAD_URL=Domain+"/wxa/ci/upload",exports.TEST_SOURCE_URL=Domain+"/wxa/ci/testSourceURL",exports.GET_WHITE_EXT_LIST=Domain+"/wxa/ci/getwhiteextlist",exports.GET_ONLINE_SCHEMA=Domain+"/wxa/ci/getonlineschema",exports.GET_RAND_STRING=Domain+"/wxa/ci/getrandstr",exports.GET_DEV_SOURCE_MAP=Domain+"/wxa/ci/get_dev_sourcemap",exports.TRANSLATE_FILENAME=Domain+"/wxa/ci/translate_filename",exports.GET_CLOUD_API_SIGNATURE=Domain+"/wxa/ci/getqcloudapisignature",exports.GET_UPLOAD_TOKEN=Domain+"/wxa/ci/getuploadtoken",exports.GET_ASYNC_RESULT=Domain+"/wxa/ci/getasyncresult",exports.UPLOAD_JS_SERVER=Domain+"/wxa/ci/uploadjsserver",exports.GET_LATEST_VERSION=Domain+"/wxa/ci/getlatestversion",exports.cloudAPIAgentURL=Domain+"/wxa/ci/cloudapihttpagent",exports.get3rdCloudCodeSecret=Domain+"/wxa/ci/getcloudcodesecret",exports.cloudCosUploadURL=Domain+"/wxa/ci/cloudcosupload",exports.scfTencentCloudUrl="https://scf.tencentcloudapi.com",exports.dbTencentCloudUrl="https://flexdb.tencentcloudapi.com",exports.tcbTencentCloudUrl="https://tcb.tencentcloudapi.com",exports.commitSourceNewFeatureURL=Domain+"wxa-dev-new/commitsource",exports.commitSourceURL=Domain+"wxa-dev/commitsource",exports.getUploadToken=Domain+"wxa-dev/getuploadtoken",exports.testSourceURL=Domain+"wxa-dev/testsource",exports.testSourceNewFeatureURL=Domain+"wxa-dev-new/testsource",exports.getAsyncResult=Domain+"wxa-dev/getasyncresult";
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getUsedPluginVersionInfo=exports.downloadMiniAppPlugin=exports.getPkgWxapkg=exports.miniappUpload=exports.getCloudBuildPkgUrl=exports.getCloudBuildTaskList=exports.uploadCloudBuildResourcePack=exports.getSdkIntInfo=exports.getAsyncResult=exports.testSourceNewFeatureURL=exports.testSourceURL=exports.getUploadToken=exports.commitSourceURL=exports.commitSourceNewFeatureURL=exports.tcbTencentCloudUrl=exports.dbTencentCloudUrl=exports.scfTencentCloudUrl=exports.cloudCosUploadURL=exports.get3rdCloudCodeSecret=exports.cloudAPIAgentURL=exports.GET_LATEST_VERSION=exports.UPLOAD_JS_SERVER=exports.GET_ASYNC_RESULT=exports.GET_UPLOAD_TOKEN=exports.GET_CLOUD_API_SIGNATURE=exports.TRANSLATE_FILENAME=exports.GET_DEV_SOURCE_MAP=exports.GET_RAND_STRING=exports.GET_ONLINE_SCHEMA=exports.GET_WHITE_EXT_LIST=exports.TEST_SOURCE_URL=exports.UPLOAD_URL=exports.GET_ATTR_URL=void 0;const Domain="https://servicewechat.com";exports.GET_ATTR_URL=Domain+"/wxa/ci/getattr",exports.UPLOAD_URL=Domain+"/wxa/ci/upload",exports.TEST_SOURCE_URL=Domain+"/wxa/ci/testSourceURL",exports.GET_WHITE_EXT_LIST=Domain+"/wxa/ci/getwhiteextlist",exports.GET_ONLINE_SCHEMA=Domain+"/wxa/ci/getonlineschema",exports.GET_RAND_STRING=Domain+"/wxa/ci/getrandstr",exports.GET_DEV_SOURCE_MAP=Domain+"/wxa/ci/get_dev_sourcemap",exports.TRANSLATE_FILENAME=Domain+"/wxa/ci/translate_filename",exports.GET_CLOUD_API_SIGNATURE=Domain+"/wxa/ci/getqcloudapisignature",exports.GET_UPLOAD_TOKEN=Domain+"/wxa/ci/getuploadtoken",exports.GET_ASYNC_RESULT=Domain+"/wxa/ci/getasyncresult",exports.UPLOAD_JS_SERVER=Domain+"/wxa/ci/uploadjsserver",exports.GET_LATEST_VERSION=Domain+"/wxa/ci/getlatestversion",exports.cloudAPIAgentURL=Domain+"/wxa/ci/cloudapihttpagent",exports.get3rdCloudCodeSecret=Domain+"/wxa/ci/getcloudcodesecret",exports.cloudCosUploadURL=Domain+"/wxa/ci/cloudcosupload",exports.scfTencentCloudUrl="https://scf.tencentcloudapi.com",exports.dbTencentCloudUrl="https://flexdb.tencentcloudapi.com",exports.tcbTencentCloudUrl="https://tcb.tencentcloudapi.com",exports.commitSourceNewFeatureURL=Domain+"wxa-dev-new/commitsource",exports.commitSourceURL=Domain+"wxa-dev/commitsource",exports.getUploadToken=Domain+"wxa-dev/getuploadtoken",exports.testSourceURL=Domain+"wxa-dev/testsource",exports.testSourceNewFeatureURL=Domain+"wxa-dev-new/testsource",exports.getAsyncResult=Domain+"wxa-dev/getasyncresult",exports.getSdkIntInfo=Domain+"/wxa/ci/getsdkinitinfo",exports.uploadCloudBuildResourcePack=Domain+"/wxa/ci/uploadcloudbuildresourcepack",exports.getCloudBuildTaskList=Domain+"/wxa/ci/getcloudbuildtasklist",exports.getCloudBuildPkgUrl=Domain+"/wxa/ci/getcloudbuildpkgurl",exports.miniappUpload=Domain+"/wxa/ci/miniappupload",exports.getPkgWxapkg=Domain+"/wxa/ci/downloadpackage",exports.downloadMiniAppPlugin=Domain+"/wxa/ci/downloadcpfplugin",exports.getUsedPluginVersionInfo=Domain+"/wxa/ci/getcpfusedpluginversioninfo";
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.miniappBuilder=exports.iosDeviceUtils=exports.adroidDeviceUtils=exports.packOptionsHelper=exports.getSummerPluginConfig=exports.escapeScript=exports.escapeQuot=exports.getBabelHelperDepMap=exports.getBabelHelperVersion=exports.getHelperDeps=exports.getHelperContent=exports.getHelperName=exports.isValidHelperFunc=exports.getHelperOutputPath=exports.checkIsInSubPackage=exports.normalizePath=exports.mkdirSync=exports.generateMD5=exports.compileTypeConfig=exports.JSON_CONTENT_ERR=exports.DefaultProjectAttr=exports.isHexColor=exports.locales=exports.proxy=exports.getWhiteExtList=exports.workletVersion=exports.Builder=exports.SummerCompiler=exports.OriginalCompiler=exports.BaseCoreCompiler=exports.PreCompileProject=exports.WebProject=exports.DevtoolsProject=exports.CIProject=exports.Project=exports.BaseProject=void 0;const tslib_1=require("tslib"),baseProject_1=require("./project/baseProject");Object.defineProperty(exports,"BaseProject",{enumerable:!0,get:function(){return baseProject_1.BaseProject}});const ciProject_1=require("./project/ciProject");Object.defineProperty(exports,"Project",{enumerable:!0,get:function(){return ciProject_1.CIProject}}),Object.defineProperty(exports,"CIProject",{enumerable:!0,get:function(){return ciProject_1.CIProject}});const devtoolsProject_1=require("./project/devtoolsProject");Object.defineProperty(exports,"DevtoolsProject",{enumerable:!0,get:function(){return devtoolsProject_1.DevtoolsProject}});const webProject_1=require("./project/webProject");Object.defineProperty(exports,"WebProject",{enumerable:!0,get:function(){return webProject_1.WebProject}});const precompileProject_1=require("./project/advance/precompileProject");Object.defineProperty(exports,"PreCompileProject",{enumerable:!0,get:function(){return precompileProject_1.PreCompileProject}});const baseCompiler_1=require("./modules/corecompiler/baseCompiler");Object.defineProperty(exports,"BaseCoreCompiler",{enumerable:!0,get:function(){return baseCompiler_1.BaseCoreCompiler}});const originalCompiler_1=require("./modules/corecompiler/originalCompiler");Object.defineProperty(exports,"OriginalCompiler",{enumerable:!0,get:function(){return originalCompiler_1.OriginalCompiler}});const summerCompiler_1=require("./modules/corecompiler/summerCompiler");Object.defineProperty(exports,"SummerCompiler",{enumerable:!0,get:function(){return summerCompiler_1.SummerCompiler}});const modules_1=require("./modules");Object.defineProperty(exports,"Builder",{enumerable:!0,get:function(){return modules_1.Builder}});const white_ext_list_1=require("./utils/white_ext_list");Object.defineProperty(exports,"getWhiteExtList",{enumerable:!0,get:function(){return white_ext_list_1.getWhiteExtList}});const request_1=require("./utils/request");Object.defineProperty(exports,"proxy",{enumerable:!0,get:function(){return request_1.setCiProxy}});const locales_1=tslib_1.__importDefault(require("./utils/locales/locales"));exports.locales=locales_1.default;const tools_1=require("./utils/tools");Object.defineProperty(exports,"checkIsInSubPackage",{enumerable:!0,get:function(){return tools_1.checkIsInSubPackage}}),Object.defineProperty(exports,"escapeQuot",{enumerable:!0,get:function(){return tools_1.escapeQuot}}),Object.defineProperty(exports,"escapeScript",{enumerable:!0,get:function(){return tools_1.escapeScript}}),Object.defineProperty(exports,"generateMD5",{enumerable:!0,get:function(){return tools_1.generateMD5}}),Object.defineProperty(exports,"isHexColor",{enumerable:!0,get:function(){return tools_1.isHexColor}}),Object.defineProperty(exports,"mkdirSync",{enumerable:!0,get:function(){return tools_1.mkdirSync}}),Object.defineProperty(exports,"normalizePath",{enumerable:!0,get:function(){return tools_1.normalizePath}});const config_1=require("./config/config");Object.defineProperty(exports,"DefaultProjectAttr",{enumerable:!0,get:function(){return config_1.DefaultProjectAttr}}),Object.defineProperty(exports,"JSON_CONTENT_ERR",{enumerable:!0,get:function(){return config_1.JSON_CONTENT_ERR}}),Object.defineProperty(exports,"compileTypeConfig",{enumerable:!0,get:function(){return config_1.compileTypeConfig}});const babel_helper_1=require("./utils/babel_helper");Object.defineProperty(exports,"getBabelHelperVersion",{enumerable:!0,get:function(){return babel_helper_1.getBabelHelperVersion}}),Object.defineProperty(exports,"getBabelHelperDepMap",{enumerable:!0,get:function(){return babel_helper_1.getBabelHelperDepMap}});const pluginconfig_1=require("./modules/corecompiler/summer/pluginconfig");Object.defineProperty(exports,"getSummerPluginConfig",{enumerable:!0,get:function(){return pluginconfig_1.getSummerPluginConfig}});const helper_util_1=require("./utils/helper_util");Object.defineProperty(exports,"getHelperOutputPath",{enumerable:!0,get:function(){return helper_util_1.getHelperOutputPath}}),Object.defineProperty(exports,"getHelperDeps",{enumerable:!0,get:function(){return helper_util_1.getHelperDeps}}),Object.defineProperty(exports,"isValidHelperFunc",{enumerable:!0,get:function(){return helper_util_1.isValidHelperFunc}}),Object.defineProperty(exports,"getHelperContent",{enumerable:!0,get:function(){return helper_util_1.getHelperContent}}),Object.defineProperty(exports,"getHelperName",{enumerable:!0,get:function(){return helper_util_1.getHelperName}});const adroidDeviceUtils=tslib_1.__importStar(require("./modules/nativecompiler/android/device"));exports.adroidDeviceUtils=adroidDeviceUtils;const iosDeviceUtils=tslib_1.__importStar(require("./modules/nativecompiler/ios/device"));exports.iosDeviceUtils=iosDeviceUtils;const miniappBuilder=tslib_1.__importStar(require("./utils/miniapp-builder"));exports.miniappBuilder=miniappBuilder;const packOptionsHelper_1=tslib_1.__importDefault(require("./utils/packOptionsHelper"));exports.packOptionsHelper=packOptionsHelper_1.default,tslib_1.__exportStar(require("./modules/corecompiler/original"),exports),exports.workletVersion=require("./utils/babel_plugin_worklet").version,tslib_1.__exportStar(require("./ci/index"),exports);
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MiniAppJson=exports.MiniAppI18N=exports.miniappBuilder=exports.iosDeviceUtils=exports.adroidDeviceUtils=exports.packOptionsHelper=exports.getSummerPluginConfig=exports.escapeScript=exports.escapeQuot=exports.getBabelHelperDepMap=exports.getBabelHelperVersion=exports.getHelperDeps=exports.getHelperContent=exports.getHelperName=exports.isValidHelperFunc=exports.getHelperOutputPath=exports.checkIsInSubPackage=exports.normalizePath=exports.mkdirSync=exports.generateMD5=exports.compileTypeConfig=exports.JSON_CONTENT_ERR=exports.DefaultProjectAttr=exports.isHexColor=exports.locales=exports.proxy=exports.getWhiteExtList=exports.workletVersion=exports.Builder=exports.SummerCompiler=exports.OriginalCompiler=exports.BaseCoreCompiler=exports.PreCompileProject=exports.WebProject=exports.DevtoolsProject=exports.CIProject=exports.Project=exports.BaseProject=void 0;const tslib_1=require("tslib"),baseProject_1=require("./project/baseProject");Object.defineProperty(exports,"BaseProject",{enumerable:!0,get:function(){return baseProject_1.BaseProject}});const ciProject_1=require("./project/ciProject");Object.defineProperty(exports,"Project",{enumerable:!0,get:function(){return ciProject_1.CIProject}}),Object.defineProperty(exports,"CIProject",{enumerable:!0,get:function(){return ciProject_1.CIProject}});const devtoolsProject_1=require("./project/devtoolsProject");Object.defineProperty(exports,"DevtoolsProject",{enumerable:!0,get:function(){return devtoolsProject_1.DevtoolsProject}});const webProject_1=require("./project/webProject");Object.defineProperty(exports,"WebProject",{enumerable:!0,get:function(){return webProject_1.WebProject}});const precompileProject_1=require("./project/advance/precompileProject");Object.defineProperty(exports,"PreCompileProject",{enumerable:!0,get:function(){return precompileProject_1.PreCompileProject}});const baseCompiler_1=require("./modules/corecompiler/baseCompiler");Object.defineProperty(exports,"BaseCoreCompiler",{enumerable:!0,get:function(){return baseCompiler_1.BaseCoreCompiler}});const originalCompiler_1=require("./modules/corecompiler/originalCompiler");Object.defineProperty(exports,"OriginalCompiler",{enumerable:!0,get:function(){return originalCompiler_1.OriginalCompiler}});const summerCompiler_1=require("./modules/corecompiler/summerCompiler");Object.defineProperty(exports,"SummerCompiler",{enumerable:!0,get:function(){return summerCompiler_1.SummerCompiler}});const modules_1=require("./modules");Object.defineProperty(exports,"Builder",{enumerable:!0,get:function(){return modules_1.Builder}});const white_ext_list_1=require("./utils/white_ext_list");Object.defineProperty(exports,"getWhiteExtList",{enumerable:!0,get:function(){return white_ext_list_1.getWhiteExtList}});const request_1=require("./utils/request");Object.defineProperty(exports,"proxy",{enumerable:!0,get:function(){return request_1.setCiProxy}});const locales_1=tslib_1.__importDefault(require("./utils/locales/locales"));exports.locales=locales_1.default;const tools_1=require("./utils/tools");Object.defineProperty(exports,"checkIsInSubPackage",{enumerable:!0,get:function(){return tools_1.checkIsInSubPackage}}),Object.defineProperty(exports,"escapeQuot",{enumerable:!0,get:function(){return tools_1.escapeQuot}}),Object.defineProperty(exports,"escapeScript",{enumerable:!0,get:function(){return tools_1.escapeScript}}),Object.defineProperty(exports,"generateMD5",{enumerable:!0,get:function(){return tools_1.generateMD5}}),Object.defineProperty(exports,"isHexColor",{enumerable:!0,get:function(){return tools_1.isHexColor}}),Object.defineProperty(exports,"mkdirSync",{enumerable:!0,get:function(){return tools_1.mkdirSync}}),Object.defineProperty(exports,"normalizePath",{enumerable:!0,get:function(){return tools_1.normalizePath}});const config_1=require("./config/config");Object.defineProperty(exports,"DefaultProjectAttr",{enumerable:!0,get:function(){return config_1.DefaultProjectAttr}}),Object.defineProperty(exports,"JSON_CONTENT_ERR",{enumerable:!0,get:function(){return config_1.JSON_CONTENT_ERR}}),Object.defineProperty(exports,"compileTypeConfig",{enumerable:!0,get:function(){return config_1.compileTypeConfig}});const babel_helper_1=require("./utils/babel_helper");Object.defineProperty(exports,"getBabelHelperVersion",{enumerable:!0,get:function(){return babel_helper_1.getBabelHelperVersion}}),Object.defineProperty(exports,"getBabelHelperDepMap",{enumerable:!0,get:function(){return babel_helper_1.getBabelHelperDepMap}});const pluginconfig_1=require("./modules/corecompiler/summer/pluginconfig");Object.defineProperty(exports,"getSummerPluginConfig",{enumerable:!0,get:function(){return pluginconfig_1.getSummerPluginConfig}});const helper_util_1=require("./utils/helper_util");Object.defineProperty(exports,"getHelperOutputPath",{enumerable:!0,get:function(){return helper_util_1.getHelperOutputPath}}),Object.defineProperty(exports,"getHelperDeps",{enumerable:!0,get:function(){return helper_util_1.getHelperDeps}}),Object.defineProperty(exports,"isValidHelperFunc",{enumerable:!0,get:function(){return helper_util_1.isValidHelperFunc}}),Object.defineProperty(exports,"getHelperContent",{enumerable:!0,get:function(){return helper_util_1.getHelperContent}}),Object.defineProperty(exports,"getHelperName",{enumerable:!0,get:function(){return helper_util_1.getHelperName}});const adroidDeviceUtils=tslib_1.__importStar(require("./modules/nativecompiler/android/device"));exports.adroidDeviceUtils=adroidDeviceUtils;const iosDeviceUtils=tslib_1.__importStar(require("./modules/nativecompiler/ios/device"));exports.iosDeviceUtils=iosDeviceUtils;const miniappBuilder=tslib_1.__importStar(require("./utils/miniapp-builder"));exports.miniappBuilder=miniappBuilder;const packOptionsHelper_1=tslib_1.__importDefault(require("./utils/packOptionsHelper"));exports.packOptionsHelper=packOptionsHelper_1.default;const miniAppI18N_1=tslib_1.__importDefault(require("./utils/miniAppI18N"));exports.MiniAppI18N=miniAppI18N_1.default;const MiniAppJson=tslib_1.__importStar(require("./utils/miniappJson"));exports.MiniAppJson=MiniAppJson,tslib_1.__exportStar(require("./modules/corecompiler/original"),exports),exports.workletVersion=require("./utils/babel_plugin_worklet").version,tslib_1.__exportStar(require("./ci/index"),exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseGraph=exports.JSONType=exports.FileType=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=require("lodash"),pluginDriver_1=require("../pluginDriver"),module_1=tslib_1.__importDefault(require("../module")),config_1=require("../../../../config/config"),resolver_1=require("../resolver"),common_1=require("../../original/compile/common"),packOptionsHelper_1=tslib_1.__importDefault(require("../../../../utils/packOptionsHelper")),tools_1=require("../../../../utils/tools"),babel_helper_1=require("../../../../utils/babel_helper"),helper_util_1=require("../../../../utils/helper_util"),progressRecorder_1=require("../../../../utils/progressRecorder"),locales_1=tslib_1.__importDefault(require("../../../../utils/locales/locales")),customError_1=require("../../../../utils/customError"),taskmanager_1=tslib_1.__importDefault(require("../../../../utils/taskmanager")),pluginconfig_1=require("../pluginconfig");var FileType,JSONType;function getFileType(e){let t=path_1.default.extname(e);if(t.startsWith(".")){if(t=t.slice(1),t===FileType.JS)return FileType.JS;if(t===FileType.WXML)return FileType.WXML;if(t===FileType.WXSS)return FileType.WXSS;if(t===FileType.WXS)return FileType.WXS;if(t===FileType.JSON)return FileType.JSON}throw Error("unknown the filetype of "+e)}!function(e){e.JSON="json",e.WXML="wxml",e.WXSS="wxss",e.WXS="wxs",e.JS="js"}(FileType=exports.FileType||(exports.FileType={})),function(e){e.APP="app",e.Page="page",e.EXT="ext",e.SITEMAP="sitemap",e.THEME="theme"}(JSONType=exports.JSONType||(exports.JSONType={}));class BaseGraph{constructor(e){var t;this.invalidated=!0,this.running=!1,this.onFileChange=(e,t)=>{t.startsWith(this.root)&&(t=t.replace(new RegExp("^"+this.root),""),this.resolver.onFileChange(e,t),"change"!==e&&"unlink"!==e||this.invalidateModules(t),this.onFileChangeForGraph(e,t))},this.getCodeFileTask=async(e,t,i={useCache:!0,resultType:"dev"})=>{const o=this.loadModuleFromFile(e,t,i),s=await o.toCodeFile(i.resultType||"dev");if(!("error"in s)&&"dev"!==i.resultType){const e=await o.toGenerateResult(i.resultType||"dev");if(!("error"in e)){const t=await this.optimize(e,i),o=await this.compress(t,i);s.code=o.target.code,s.map=o.target.map}}return{file:e,codeFile:s,process:await o.getProcessInfo(i.resultType||"dev")||[]}},this.type=e.type,this.root=e.root,this.rootPath=(0,tools_1.joinPath)(e.compiler.project.projectPath,this.root),this.persistCache=e.persistCache,this.compiler=e.compiler,this.project=this.compiler.project,this.cachedModules=new Map,this.pluginDriver=new pluginDriver_1.PluginDriver(this,e),this.modulesByPath=new Map,this.resolver=new resolver_1.Resolver(this,this.root,this.pluginDriver.resolveExtConf),this.compiler.proxyProject.addResolver(this.resolver),null===(t=this.project.event)||void 0===t||t.on("fileChange",this.onFileChange)}destroy(){var e;this.compiler.proxyProject.removeResolver(this.resolver),null===(e=this.project.event)||void 0===e||e.off("fileChange",this.onFileChange)}clearCache(){this.modulesByPath.clear()}async ensureConf(e){this.conf||await this.getConf(e)}async getPackageFile(e){await this.ensureConf(progressRecorder_1.silentRecorder);const t=[];for(const[i,o]of this.resolver.resolveInfoMap.entries())e!==config_1.FullPkg&&this.checkFilePackage(i)!==e||t.push(o);return t.map(e=>Object.assign(Object.assign({},e),{independentRoot:this.getIndependentRoot(e.path),isBabelIgnore:this.isBabelSettingIgnore(e)}))}invalidateModules(e){for(const t of this.modulesByPath.values())(t.sourcePath===e||t.depFiles.includes(e))&&this.modulesByPath.delete(t.path)}loadModuleFromFile(e,t,i){let o=this.modulesByPath.get(e.path),s=!o||o.sourcePath!==e.source||o.independentRoot!==e.independentRoot;if(!s&&(null==o?void 0:o.getError(i.resultType))){if(o.getGeneratedTS(i.resultType)+1e3>Date.now())return o;s=!0}if(s){const t=getFileType(e.path);o=new module_1.default(this,e.path,e.source,t),o.independentRoot=e.independentRoot,e.isBabelIgnore&&(o.isBabelIgnore=!0),this.modulesByPath.set(e.path,o)}let r=o.getLoadingPromise();void 0===r&&(r=t.run(locales_1.default.config.SUMMER_COMPILING_MODULE.format(e.source),()=>this.loadSourceForModule(o,i)),o.setLoadingPromise(r));let a=o.getGeneratingPromise(i.resultType);return void 0===a&&(a=t.run(locales_1.default.config.SUMMER_COMPILING_MODULE.format(e.source),async()=>{const e=await o.getLoadingPromise();return this.generate(e,o,i)}),o.setGeneratingPromise(i.resultType,a)),o}async loadSourceForModule(e,t){try{const i=(0,tools_1.joinPath)(this.rootPath,e.sourcePath),o=t=>Object.assign(Object.assign({},t),{rootPath:this.rootPath,addWatchFile:t=>{const i=(0,tools_1.normalizePath)(t);if(!i.startsWith(this.rootPath))throw(0,customError_1.makeCustomError)(`The file (${t}) required by ${e.sourcePath} is outside the project`,customError_1.CustomErrors.SUMMER_PLUGIN_CODE_ERR,e.path);e.addWatchFile(path_1.default.posix.relative(this.rootPath,i))}});let s=await this.pluginDriver.hookFirst("load",[e.path,i,Object.assign(Object.assign({},t),{independentRoot:e.independentRoot,isBabelIgnore:e.isBabelIgnore||!1})],o);if(!s){const t=Date.now(),o=await this.readFile(i);s={targetPath:e.path,source:{sourceCode:o},process:[{cost:Date.now()-t,pluginName:"readFile",action:"load"}]}}return await this.tranform(s,e,o,t)}catch(i){throw i.path=(0,tools_1.joinPath)(this.root,e.sourcePath),e.setError(t.resultType,i),i}}async doCompileSingleCode(e,t){const i=this.loadModuleFromFile(e,progressRecorder_1.silentRecorder,{resultType:"dev"}),o=i.getError("dev");if(o)throw o;return await i.toCodeFile("dev")}async getCodeFiles(e,t,i={useCache:!0,resultType:"dev"}){var o;const s=Date.now(),r={},a=new taskmanager_1.default({poolLimit:10,breakWhenError:!0});for(const o of e)a.addTask(this.getCodeFileTask,o,t,i);const n=await a.runAllAsync();for(const e of n)r[e.file.path]=e.codeFile,(null===(o=e.codeFile.jsTag)||void 0===o?void 0:o.isLargeFile)&&t.message("warn",locales_1.default.config.LARGEFILE_WARNING.format(e.file.path,config_1.MAX_CODE_LENGTH/1024));return console.info("!!!",`getCodeFiles: count: ${e.length}, cost: ${Date.now()-s}ms.`),r}async readFile(e){const t=path_1.default.relative(this.project.projectPath,e);return this.project.getFile("",t).toString()}async tranform(e,t,i,o){return await this.pluginDriver.hookReduceArg0("transform",[e,t.path,t.sourcePath,Object.assign(Object.assign({},o),{independentRoot:t.independentRoot,isBabelIgnore:t.isBabelIgnore||!1})],(function(e,t){return void 0===t?e:t}),i)}async generate(e,t,i){const o=await this.pluginDriver.hookFirst("generate",[e,t.path,t.sourcePath,Object.assign(Object.assign({},i),{independentRoot:t.independentRoot,isBabelIgnore:t.isBabelIgnore||!1})]);return void 0===o||(0,lodash_1.isNull)(o)?Object.assign(Object.assign({},e),{target:{code:e.source.sourceCode,map:e.source.inputMap}}):o}async optimize(e,t){return await this.pluginDriver.hookReduceArg0("optimize",[e,t],(e,t)=>t,e=>e)}async compress(e,t){return await this.pluginDriver.hookReduceArg0("compress",[e,t],(e,t)=>t,e=>e)}async compile(e,t){const{jsons:i}=await t.run(locales_1.default.config.SUMMER_COMPILE_JSON.format(),()=>this.compileJSON(e,t)),o=await this.compileCodeWithoutJSON(e,t),s=await t.run(locales_1.default.config.SUMMER_PACK_FILES.format(),()=>this.compileOther(Object.keys(i),t)),r=Object.assign(Object.assign(Object.assign({},s),o),i);return await t.run(locales_1.default.config.SUMMER_SEAL_PACK.format(),()=>this.pluginDriver.hookParallel("sealed",[r])),r}async compileWithFileList(e,t){const i=e.fileList,{jsons:o}=await t.run(locales_1.default.config.SUMMER_COMPILE_JSON.format(),()=>this.compileJSONWithFileList(Object.assign(Object.assign({},e),{fileList:i.filter(e=>e.endsWith(".json"))}),t)),s=i.filter(e=>!e.endsWith(".json")),r=await this.compileCodeWithoutJSONWithFileList(Object.assign(Object.assign({},e),{fileList:s}),t),a=Object.assign(Object.assign({},r),o);return await t.run(locales_1.default.config.SUMMER_SEAL_PACK.format(),()=>this.pluginDriver.hookParallel("sealed",[a])),a}async getLocalFileList(){const e=this.getLocalCodeFileList(),t=new Set(this.resolver.allExts.map(e=>"."+e)),i=await this.getWhiteListConfig(),o=this.project.getFileList(this.root,"").filter(e=>{const o=path_1.default.posix.extname(e);return i.has(o)&&!t.has(o)}).map(e=>e.replace(new RegExp("^"+this.root),"")),s={};for(const t of e.concat(o)){const e=this.project.stat(this.root,t);s[t]=e}return s}async compileOther(e,t=progressRecorder_1.silentRecorder){const i=new Set(this.resolver.allExts.map(e=>"."+e));i.delete(".json");const o=await this.getWhiteListConfig(),s=this.project.getFileList(this.root,"").filter(s=>{const r=path_1.default.posix.extname(s),a=path_1.default.posix.relative(this.root,s);if(!o.has(r)||i.has(r)||e.includes(a))return!1;return!packOptionsHelper_1.default.isIgnoredByRules(s)||(t.message("warn",s+" is ignored by project.config.json packOptions.ignore setting"),!1)}),r=await(0,common_1.compileOther)(this.project,s,{onProgressUpdate:()=>{}}),a={};for(const e in r){a[path_1.default.posix.relative(this.root,e)]=r[e]}return a}async compileCodeWithoutJSON(e,t){var i;const o={},s=await this.getProdCode(t,Object.assign(Object.assign({},e),{package:config_1.FullPkg})),r=new Set;for(const e in s){const t=s[e];if("error"in t)throw t.error;if(t.path.endsWith(".js")){((null===(i=t.jsTag)||void 0===i?void 0:i.helpers)||[]).forEach(e=>{r.add(e)}),o[e]=t.code;const s=t.map&&(0,tools_1.formatSourceMap)(t.map);s&&(o[e+".map"]=s)}else o[e]=t.code}return await t.run(locales_1.default.config.SUMMER_APPEND_BABEL_HELPERS.format((0,pluginconfig_1.couldUseSWCMode)(this.project.setting)?"swc":"babel"),()=>(0,helper_util_1.appendHelpers)(this.project,r,"",o)),o}async compileCodeWithoutJSONWithFileList(e,t){var i;const o={},s=await this.getProdCodeByFileList(t,e),r=new Set;for(const e in s){const t=s[e];if("error"in t)throw t.error;if(t.path.endsWith(".js")){((null===(i=t.jsTag)||void 0===i?void 0:i.helpers)||[]).forEach(e=>{r.add(e)}),o[e]=t.code;const s=t.map&&(0,tools_1.formatSourceMap)(t.map);s&&(o[e+".map"]=s)}else o[e]=t.code}return await t.run(locales_1.default.config.SUMMER_APPEND_BABEL_HELPERS.format((0,pluginconfig_1.couldUseSWCMode)(this.project.setting)?"swc":"babel"),()=>(0,helper_util_1.appendHelpers)(this.project,r,"",o)),o}isBabelSettingIgnore(e){var t,i;let o=!1;if(e.path.endsWith(".js")){const s=(0,pluginconfig_1.couldUseSWCMode)(this.project.setting)?null===(t=this.compiler.getSWCSetting())||void 0===t?void 0:t.ignore:null===(i=this.compiler.getBabelSetting())||void 0===i?void 0:i.ignore;s&&(o=(0,babel_helper_1.isIgnore)(s,e.source))}return o}async getDevCodeByFileList(e,t){let i=await this.getPackageFile(config_1.FullPkg);return i=i.filter(e=>t.fileList.includes(e.path)),this.getCodeFiles(i,e)}async getProdCodeByFileList(e,t){let i=await this.getPackageFile(config_1.FullPkg);return i=i.filter(e=>t.fileList.includes(e.path)),this.getCodeFiles(i,e,{useCache:!1,resultType:t.resultType||"prod"})}}exports.BaseGraph=BaseGraph;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.BaseGraph=exports.JSONType=exports.FileType=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=require("lodash"),pluginDriver_1=require("../pluginDriver"),module_1=tslib_1.__importDefault(require("../module")),config_1=require("../../../../config/config"),resolver_1=require("../resolver"),common_1=require("../../original/compile/common"),packOptionsHelper_1=tslib_1.__importDefault(require("../../../../utils/packOptionsHelper")),tools_1=require("../../../../utils/tools"),babel_helper_1=require("../../../../utils/babel_helper"),helper_util_1=require("../../../../utils/helper_util"),progressRecorder_1=require("../../../../utils/progressRecorder"),locales_1=tslib_1.__importDefault(require("../../../../utils/locales/locales")),customError_1=require("../../../../utils/customError"),taskmanager_1=tslib_1.__importDefault(require("../../../../utils/taskmanager")),pluginconfig_1=require("../pluginconfig");var FileType,JSONType;function getFileType(e){let t=path_1.default.extname(e);if(t.startsWith(".")){if(t=t.slice(1),t===FileType.JS)return FileType.JS;if(t===FileType.WXML)return FileType.WXML;if(t===FileType.WXSS)return FileType.WXSS;if(t===FileType.WXS)return FileType.WXS;if(t===FileType.JSON)return FileType.JSON}throw Error("unknown the filetype of "+e)}!function(e){e.JSON="json",e.WXML="wxml",e.WXSS="wxss",e.WXS="wxs",e.JS="js"}(FileType=exports.FileType||(exports.FileType={})),function(e){e.APP="app",e.Page="page",e.EXT="ext",e.SITEMAP="sitemap",e.THEME="theme"}(JSONType=exports.JSONType||(exports.JSONType={}));class BaseGraph{constructor(e){var t;this.invalidated=!0,this.running=!1,this.onFileChange=(e,t)=>{t.startsWith(this.root)&&(t=t.replace(new RegExp("^"+this.root),""),this.resolver.onFileChange(e,t),"change"!==e&&"unlink"!==e||this.invalidateModules(t),this.onFileChangeForGraph(e,t))},this.getCodeFileTask=async(e,t,i={useCache:!0,resultType:"dev"})=>{const o=this.loadModuleFromFile(e,t,i),s=await o.toCodeFile(i.resultType||"dev");if(!("error"in s)&&"dev"!==i.resultType){const e=await o.toGenerateResult(i.resultType||"dev");if(!("error"in e)){const t=await this.optimize(e,i),o=await this.compress(t,i);s.code=o.target.code,s.map=o.target.map}}return{file:e,codeFile:s,process:await o.getProcessInfo(i.resultType||"dev")||[]}},this.type=e.type,this.root=e.root,this.rootPath=(0,tools_1.joinPath)(e.compiler.project.projectPath,this.root),this.persistCache=e.persistCache,this.compiler=e.compiler,this.project=this.compiler.project,this.cachedModules=new Map,this.pluginDriver=new pluginDriver_1.PluginDriver(this,e),this.modulesByPath=new Map,this.resolver=new resolver_1.Resolver(this,this.root,this.pluginDriver.resolveExtConf),this.compiler.proxyProject.addResolver(this.resolver),null===(t=this.project.event)||void 0===t||t.on("fileChange",this.onFileChange)}destroy(){var e;this.compiler.proxyProject.removeResolver(this.resolver),null===(e=this.project.event)||void 0===e||e.off("fileChange",this.onFileChange)}clearCache(){this.modulesByPath.clear()}async ensureConf(e){this.conf||await this.getConf(e)}async getPackageFile(e){await this.ensureConf(progressRecorder_1.silentRecorder);const t=[];for(const[i,o]of this.resolver.resolveInfoMap.entries())e!==config_1.FullPkg&&this.checkFilePackage(i)!==e||t.push(o);return t.map(e=>Object.assign(Object.assign({},e),{independentRoot:this.getIndependentRoot(e.path),isBabelIgnore:this.isBabelSettingIgnore(e)}))}invalidateModules(e){for(const t of this.modulesByPath.values())(t.sourcePath===e||t.depFiles.includes(e))&&this.modulesByPath.delete(t.path)}loadModuleFromFile(e,t,i){let o=this.modulesByPath.get(e.path),s=!o||o.sourcePath!==e.source||o.independentRoot!==e.independentRoot;if(!s&&(null==o?void 0:o.getError(i.resultType))){if(o.getGeneratedTS(i.resultType)+1e3>Date.now())return o;s=!0}if(s){const t=getFileType(e.path);o=new module_1.default(this,e.path,e.source,t),o.independentRoot=e.independentRoot,e.isBabelIgnore&&(o.isBabelIgnore=!0),this.modulesByPath.set(e.path,o)}let r=o.getLoadingPromise();void 0===r&&(r=t.run(locales_1.default.config.SUMMER_COMPILING_MODULE.format(e.source),()=>this.loadSourceForModule(o,i)),o.setLoadingPromise(r));let a=o.getGeneratingPromise(i.resultType);return void 0===a&&(a=t.run(locales_1.default.config.SUMMER_COMPILING_MODULE.format(e.source),async()=>{const e=await o.getLoadingPromise();return this.generate(e,o,i)}),o.setGeneratingPromise(i.resultType,a)),o}async loadSourceForModule(e,t){try{const i=(0,tools_1.joinPath)(this.rootPath,e.sourcePath),o=t=>Object.assign(Object.assign({},t),{rootPath:this.rootPath,addWatchFile:t=>{const i=(0,tools_1.normalizePath)(t);if(!i.startsWith(this.rootPath))throw(0,customError_1.makeCustomError)(`The file (${t}) required by ${e.sourcePath} is outside the project`,customError_1.CustomErrors.SUMMER_PLUGIN_CODE_ERR,e.path);e.addWatchFile(path_1.default.posix.relative(this.rootPath,i))}});let s=await this.pluginDriver.hookFirst("load",[e.path,i,Object.assign(Object.assign({},t),{independentRoot:e.independentRoot,isBabelIgnore:e.isBabelIgnore||!1})],o);if(!s){const t=Date.now(),o=await this.readFile(i);s={targetPath:e.path,source:{sourceCode:o},process:[{cost:Date.now()-t,pluginName:"readFile",action:"load"}]}}return await this.tranform(s,e,o,t)}catch(i){throw i.path=(0,tools_1.joinPath)(this.root,e.sourcePath),e.setError(t.resultType,i),i}}async doCompileSingleCode(e,t){const i=this.loadModuleFromFile(e,progressRecorder_1.silentRecorder,{resultType:"dev"}),o=i.getError("dev");if(o)throw o;return await i.toCodeFile("dev")}async getCodeFiles(e,t,i={useCache:!0,resultType:"dev"}){var o;const s=Date.now(),r={},a=new taskmanager_1.default({poolLimit:10,breakWhenError:!0});for(const o of e)a.addTask(this.getCodeFileTask,o,t,i);const n=await a.runAllAsync();for(const e of n)r[e.file.path]=e.codeFile,(null===(o=e.codeFile.jsTag)||void 0===o?void 0:o.isLargeFile)&&t.message("warn",locales_1.default.config.LARGEFILE_WARNING.format(e.file.path,config_1.MAX_CODE_LENGTH/1024));return console.info(`getCodeFiles: count: ${e.length}, cost: ${Date.now()-s}ms.`),r}async readFile(e){const t=path_1.default.relative(this.project.projectPath,e);return this.project.getFile("",t).toString()}async tranform(e,t,i,o){return await this.pluginDriver.hookReduceArg0("transform",[e,t.path,t.sourcePath,Object.assign(Object.assign({},o),{independentRoot:t.independentRoot,isBabelIgnore:t.isBabelIgnore||!1})],(function(e,t){return void 0===t?e:t}),i)}async generate(e,t,i){const o=await this.pluginDriver.hookFirst("generate",[e,t.path,t.sourcePath,Object.assign(Object.assign({},i),{independentRoot:t.independentRoot,isBabelIgnore:t.isBabelIgnore||!1})]);return void 0===o||(0,lodash_1.isNull)(o)?Object.assign(Object.assign({},e),{target:{code:e.source.sourceCode,map:e.source.inputMap}}):o}async optimize(e,t){return await this.pluginDriver.hookReduceArg0("optimize",[e,t],(e,t)=>t,e=>e)}async compress(e,t){return await this.pluginDriver.hookReduceArg0("compress",[e,t],(e,t)=>t,e=>e)}async compile(e,t){const{jsons:i}=await t.run(locales_1.default.config.SUMMER_COMPILE_JSON.format(),()=>this.compileJSON(e,t)),o=await this.compileCodeWithoutJSON(e,t),s=await t.run(locales_1.default.config.SUMMER_PACK_FILES.format(),()=>this.compileOther(Object.keys(i),t)),r=Object.assign(Object.assign(Object.assign({},s),o),i);return await t.run(locales_1.default.config.SUMMER_SEAL_PACK.format(),()=>this.pluginDriver.hookParallel("sealed",[r])),r}async compileWithFileList(e,t){const i=e.fileList,{jsons:o}=await t.run(locales_1.default.config.SUMMER_COMPILE_JSON.format(),()=>this.compileJSONWithFileList(Object.assign(Object.assign({},e),{fileList:i.filter(e=>e.endsWith(".json"))}),t)),s=i.filter(e=>!e.endsWith(".json")),r=await this.compileCodeWithoutJSONWithFileList(Object.assign(Object.assign({},e),{fileList:s}),t),a=Object.assign(Object.assign({},r),o);return await t.run(locales_1.default.config.SUMMER_SEAL_PACK.format(),()=>this.pluginDriver.hookParallel("sealed",[a])),a}async getLocalFileList(){const e=this.getLocalCodeFileList(),t=new Set(this.resolver.allExts.map(e=>"."+e)),i=await this.getWhiteListConfig(),o=this.project.getFileList(this.root,"").filter(e=>{const o=path_1.default.posix.extname(e);return i.has(o)&&!t.has(o)}).map(e=>e.replace(new RegExp("^"+this.root),"")),s={};for(const t of e.concat(o)){const e=this.project.stat(this.root,t);s[t]=e}return s}async compileOther(e,t=progressRecorder_1.silentRecorder){const i=new Set(this.resolver.allExts.map(e=>"."+e));i.delete(".json");const o=await this.getWhiteListConfig(),s=this.project.getFileList(this.root,"").filter(s=>{const r=path_1.default.posix.extname(s),a=path_1.default.posix.relative(this.root,s);if(!o.has(r)||i.has(r)||e.includes(a))return!1;return!packOptionsHelper_1.default.isIgnoredByRules(s)||(t.message("warn",s+" is ignored by project.config.json packOptions.ignore setting"),!1)}),r=await(0,common_1.compileOther)(this.project,s,{onProgressUpdate:()=>{}}),a={};for(const e in r){a[path_1.default.posix.relative(this.root,e)]=r[e]}return a}async compileCodeWithoutJSON(e,t){var i;const o={},s=await this.getProdCode(t,Object.assign(Object.assign({},e),{package:config_1.FullPkg})),r=new Set;for(const e in s){const t=s[e];if("error"in t)throw t.error;if(t.path.endsWith(".js")){((null===(i=t.jsTag)||void 0===i?void 0:i.helpers)||[]).forEach(e=>{r.add(e)}),o[e]=t.code;const s=t.map&&(0,tools_1.formatSourceMap)(t.map);s&&(o[e+".map"]=s)}else o[e]=t.code}return await t.run(locales_1.default.config.SUMMER_APPEND_BABEL_HELPERS.format((0,pluginconfig_1.couldUseSWCMode)(this.project.setting)?"swc":"babel"),()=>(0,helper_util_1.appendHelpers)(this.project,r,"",o)),o}async compileCodeWithoutJSONWithFileList(e,t){var i;const o={},s=await this.getProdCodeByFileList(t,e),r=new Set;for(const e in s){const t=s[e];if("error"in t)throw t.error;if(t.path.endsWith(".js")){((null===(i=t.jsTag)||void 0===i?void 0:i.helpers)||[]).forEach(e=>{r.add(e)}),o[e]=t.code;const s=t.map&&(0,tools_1.formatSourceMap)(t.map);s&&(o[e+".map"]=s)}else o[e]=t.code}return await t.run(locales_1.default.config.SUMMER_APPEND_BABEL_HELPERS.format((0,pluginconfig_1.couldUseSWCMode)(this.project.setting)?"swc":"babel"),()=>(0,helper_util_1.appendHelpers)(this.project,r,"",o)),o}isBabelSettingIgnore(e){var t,i;let o=!1;if(e.path.endsWith(".js")){const s=(0,pluginconfig_1.couldUseSWCMode)(this.project.setting)?null===(t=this.compiler.getSWCSetting())||void 0===t?void 0:t.ignore:null===(i=this.compiler.getBabelSetting())||void 0===i?void 0:i.ignore;s&&(o=(0,babel_helper_1.isIgnore)(s,e.source))}return o}async getDevCodeByFileList(e,t){let i=await this.getPackageFile(config_1.FullPkg);return i=i.filter(e=>t.fileList.includes(e.path)),this.getCodeFiles(i,e)}async getProdCodeByFileList(e,t){let i=await this.getPackageFile(config_1.FullPkg);return i=i.filter(e=>t.fileList.includes(e.path)),this.getCodeFiles(i,e,{useCache:!1,resultType:t.resultType||"prod"})}}exports.BaseGraph=BaseGraph;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SummerCompiler=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=tslib_1.__importDefault(require("lodash")),locales_1=tslib_1.__importDefault(require("../../utils/locales/locales")),request_1=require("../../utils/request"),common_1=require("./original/compile/common"),tools_1=require("../../utils/tools"),white_ext_list_1=require("../../utils/white_ext_list"),config_1=require("../../config/config"),processManager_1=require("../../utils/subprocess/processManager"),messageHub_1=require("../../utils/messageHub"),singletontask_1=require("../../utils/singletontask"),uglifyfilenames_1=require("./original/protect/uglifyfilenames"),index_1=require("./original/index"),baseCompiler_1=require("./baseCompiler"),packOptionsHelper_1=tslib_1.__importDefault(require("../../utils/packOptionsHelper")),miniProgram=config_1.COMPILE_TYPE.miniProgram,miniGame=config_1.COMPILE_TYPE.miniGame,miniProgramPlugin=config_1.COMPILE_TYPE.miniProgramPlugin,miniGamePlugin=config_1.COMPILE_TYPE.miniGamePlugin;function performanceMark(e,t){}class SummerCompiler extends baseCompiler_1.BaseCoreCompiler{constructor(e,t,i,s,o,r){super(e),this.project=e,this.cachePath=t,this.projectInfo=i,this.devtoolMessagehub=s,this.analyzer=o,this._filterFactory=r,this.isSummer=!0,this.promiseCache=new Map,this._taskCache=new Map,this._status=void 0,this._eventAdded=!1,this._locale="",this.devCodeCacheByPath=new Map,this.onFileChange=(e,t)=>{if("change"!==e||t.endsWith(".json"))for(const e of this.promiseCache.keys())e.startsWith("getConf-")&&this.promiseCache.delete(e);if("change"!==e){for(const e of this.promiseCache.keys())e.startsWith("getPackageFiles-")&&this.promiseCache.delete(e);for(const e of this._taskCache.keys())e.startsWith("getPackageFiles-")&&this._taskCache.delete(e)}this.invalidCodeCache(t),this.subProcessManager.sendEvent("fileChange",{type:e,targetPath:t})},this.onPreCompileOptionsChange=async e=>{await this.clearCache(),this.subProcessManager.sendEvent("precompileOptionsChange",e)},this.onProgressUpdate=(e,t,i)=>{var s;this.messageHub.showBuildLog(""+e,t,i),null===(s=this.progressUpdateFromCompileOptions)||void 0===s||s.call(this,{id:e.toString(),message:i,status:t})},this._getPackageFiles=async(e,t,i="dev")=>{performanceMark("request get getPackageFiles");const s=await this.subProcessManager.runTask("getPackageFiles",{graphId:e,root:t},this.onProgressUpdate);performanceMark("request get getPackageFiles",!0);const o=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,r=await this.filterFactory(i),a={},n=s.filter(t=>{const i=path_1.default.posix.join(o,t.path),s=r(e,i);return s!==config_1.EFilterCode.Include&&(a[s]||(a[s]=[]),a[s].push(i)),s===config_1.EFilterCode.Include}),c={[config_1.EFilterCode.AnalyseNoUse]:locales_1.default.config.UNUSE_FILE_LIST,[config_1.EFilterCode.PackOptionsIgnore]:locales_1.default.config.PACK_OPTIONS_IGNORE_LIST,[config_1.EFilterCode.PartialCompileNoUse]:locales_1.default.config.PARTIAL_COMPILE_IGNORE_LIST};for(const e in a)c[e]?this.onProgressUpdate(e,"warn",c[e].format(a[e].join(","))):this.onProgressUpdate(e,"warn",locales_1.default.config.UNKNOWN_REASON_INGORE_LIST.format(e,a[e].join(",")));return n},performanceMark("create summer compiler"),this.messageHub=new messageHub_1.MessageHub(s),this.ready()}get status(){return this._status}async init(){performanceMark("init summer compiler");const e=path_1.default.posix.join(__dirname,"./summerEntryProcess.js");this.subProcessManager=new processManager_1.SubProcessProxy(this.project,e,{cachePath:this.cachePath},this.projectInfo,8891,this.onProgressUpdate),this.addProjectListener(),this.loadStatus(),performanceMark("init summer compiler",!0)}async loadStatus(){this._status=await this.subProcessManager.runTask("loadStatus")}destroy(){var e;null===(e=this.subProcessManager)||void 0===e||e.destroy(),this.removeProjectListener(),this._checkReadyTask=void 0}async clearCache(){var e;await(null===(e=this.subProcessManager)||void 0===e?void 0:e.runTask("clearCache")),this.promiseCache.clear(),this.devCodeCacheByPath.clear(),this._taskCache.clear()}updateOptions(e){var t;lodash_1.default.isEqual(e,this.projectInfo)||(this.projectInfo=e,this.promiseCache.clear(),this.devCodeCacheByPath.clear(),null===(t=this.subProcessManager)||void 0===t||t.sendEvent("updateOptions",e),this.loadStatus(),this.project.updateOptions(e))}addProjectListener(){var e,t;this._eventAdded&&this.removeProjectListener(),null===(e=this.project.event)||void 0===e||e.on("fileChange",this.onFileChange),null===(t=this.project.event)||void 0===t||t.on("precompileOptionsChange",this.onPreCompileOptionsChange),this._eventAdded=!0}removeProjectListener(){var e,t;null===(e=this.project.event)||void 0===e||e.off("fileChange",this.onFileChange),null===(t=this.project.event)||void 0===t||t.off("precompileOptionsChange",this.onPreCompileOptionsChange),this._eventAdded=!1}invalidCodeCache(e){const t=this.devCodeCacheByPath.get((0,tools_1.sourcePathToTargetPath)(e));t&&(t.isValid=!1)}async getConf(e){var t,i;const s="getConf-"+e;if(this.promiseCache.has(s))return(null===(t=process.env)||void 0===t?void 0:t.isDevtools)&&console.log(s,"hit cache"),this.promiseCache.get(s);(null===(i=process.env)||void 0===i?void 0:i.isDevtools)&&console.log(s,"do request"),performanceMark("request get conf");const o={graphId:e},r=this.subProcessManager.runTask("getConf",o,this.onProgressUpdate);return this.promiseCache.set(s,r),performanceMark("request get conf",!0),r}async getPackageFiles(e,t,i="dev",s=!0){const o=`getPackageFiles-${e}-${t}-${i}`;if(this._taskCache.has(o)&&s){const e=this._taskCache.get(o);return null==e?void 0:e.getResult(!0)}const r=new singletontask_1.SingletonTask(this._getPackageFiles.bind(this,e,t,i),o);return this._taskCache.set(o,r),null==r?void 0:r.getResult(!0)}async filterFactory(e){packOptionsHelper_1.default.updateState(this.project),this.onProgressUpdate("initUnusedFiles","doing","analyzing codes..."),await packOptionsHelper_1.default.initUnusedFiles(this.project,this.analyzer,"prod"===e),0!==packOptionsHelper_1.default.getUnusedFiles().size&&this.onProgressUpdate("initUnusedFiles","doing","ignoring files: "+Array.from(packOptionsHelper_1.default.getUnusedFiles()).join(",")),this.onProgressUpdate("initUnusedFiles","success","analyzing codes success");const t=this._filterFactory?await this._filterFactory(e):()=>0;return(i,s)=>"mini-android"!==this.project.targetPlatform&&"mini-ios"!==this.project.targetPlatform||path_1.default.posix.join(this.project.miniprogramRoot,"app.miniapp.json")!==s?i===miniProgram&&packOptionsHelper_1.default.isIgnoreByUnusedFiles(s,"prod"===e)?config_1.EFilterCode.AnalyseNoUse:packOptionsHelper_1.default.isIgnoredByRules(s)?config_1.EFilterCode.PackOptionsIgnore:t(i,s):config_1.EFilterCode.Include}async getCodeByFileList(e,t){const i={},s={},o=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,r=[];for(const e of t){const t=this.devCodeCacheByPath.get(path_1.default.posix.join(o,e)),a=null==t?void 0:t.codeFile;let n=!1;t&&t.isValid&&a&&!("error"in a)||(n=!0,r.push(e)),a&&!("error"in a)&&(n&&(i[e]=a.md5),s[e]=a)}if(r.length>0){const t=await this.subProcessManager.runTask("getDevCodeByFileList",{graphId:e,fileList:r,cacheMd5:i},this.onProgressUpdate);for(const e in t){const i=t[e],r=path_1.default.posix.join(o,e);"error"in i||""!==i.md5?this.devCodeCacheByPath.set(r,{isValid:!0,codeFile:i}):this.devCodeCacheByPath.delete(r),s[e]=i}}return s}async getExtJSON(){return await(0,index_1.getExtJSON)(this.project)}async getAppJSON(){return(await this.getConf(miniProgram)).app}async getGameJSON(){return(await this.getConf(miniGame)).app}async getSiteMapJSON(){return(await this.getConf(miniProgram)).sitemap}async getPageJSON(e){const t=await this.getConf(miniProgram),i=t.pages[e]||t.comps[e];if(!i)throw new Error("summer-compiler 收集json配置有遗漏, "+e);return i}async getAllPageAndComponent(){const e=await this.getConf(miniProgram),t=(await this.getPackageFiles(miniProgram,config_1.FullPkg)).map(e=>e.path).filter(e=>e.endsWith(".json"));return Object.keys(e.pages).concat(Object.keys(e.comps)).filter(e=>t.includes(e+".json"))}async getAllSortedJSFiles(){const e=await this.getConf(miniProgram),t=Object.keys(e.pages),i=Object.keys(e.comps),s=(await this.getPackageFiles(miniProgram,config_1.FullPkg)).map(e=>e.path).filter(e=>e.endsWith(".js")),o=t.filter(e=>!i.includes(e)).map(e=>e+".js").filter(e=>s.includes(e)),r=i.map(e=>e+".js").filter(e=>s.includes(e)),a=s.filter(e=>e.endsWith(".js")&&"app.js"!==e&&!o.includes(e)&&!r.includes(e));return{jsPagesFiles:o,components:r,otherJsFiles:a}}async getAllWxmlAndWxsFiles(){const e=(await this.getPackageFiles(miniProgram,config_1.FullPkg)).map(e=>e.path),t=e.filter(e=>e.endsWith(".wxml")),i=e.filter(e=>e.endsWith(".wxs")),s=await this.getCodeByFileList(miniProgram,t.concat(i));return{wxmlFiles:t,wxsFiles:i,content:t.concat(i).reduce((e,t)=>{const i=s[t];if("error"in i)throw i.error;return e[t]=i.code,e["./"+t]=i.code,e},{})}}async getPackageWxmlAndWxsFiles(e){let t=(await this.getPackageFiles(miniProgram,e)).map(e=>e.path);if(e!==config_1.MainPkg&&e!==config_1.FullPkg){const e=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map(e=>e.path);t=t.concat(e)}const i=t.filter(e=>e.endsWith(".wxml")),s=t.filter(e=>e.endsWith(".wxs")),o=await this.getCodeByFileList(miniProgram,i.concat(s));return{wxmlFiles:i,wxsFiles:s,content:i.concat(s).reduce((e,t)=>{const i=o[t];if(!i)throw`lack of ${t} code`;if("error"in i)throw i.error;return e[t]=i.code,e["./"+t]=i.code,e},{})}}async getPackageWxssFileList(e){let t=(await this.getPackageFiles(miniProgram,e)).map(e=>e.path);if(e!==config_1.MainPkg&&e!==config_1.FullPkg){const e=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map(e=>e.path);t=t.concat(e)}return t.filter(e=>e.endsWith(".wxss"))}async getPackageWxssFiles(e){const t=await this.getPackageWxssFileList(e),i=await this.getCodeByFileList(miniProgram,t);return{wxssFiles:t,content:t.reduce((e,t)=>{const s=i[t];if(!s)throw`lack of ${t} code`;if("error"in s)throw s.error;return e[t]=s.code,e["./"+t]=s.code,e},{})}}getWxssMap(e,t){t=(0,tools_1.normalizePath)(t),e===miniProgram?t=path_1.default.posix.join(this.project.miniprogramRoot,t):e===miniProgramPlugin&&(t=path_1.default.posix.join(this.project.pluginRoot,t));const i=this.devCodeCacheByPath.get(t),s=null==i?void 0:i.codeFile;if(s&&!("error"in s))return s.map}async getMainPkgSortedJSFiles(){const e=await this.getConf(miniProgram),t=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map(e=>e.path).filter(e=>e.endsWith(".js")),i=[],s=[],o=[],r=[],a=[];let n=!1;const c={},l=t=>Object.keys(e.packages).find(e=>t.startsWith(e))||config_1.MainPkg;e.app.functionalPages&&t.forEach(e=>{if(e.startsWith("functional-pages/")){const t=e.replace(/\.js$/,"");if(c[t])return;c[t]=!0,a.push(encodeURI(t))}}),e.app.workers&&t.forEach(t=>{if(t.startsWith((0,tools_1.getWorkersPath)(e.app.workers))){const e=t.replace(/\.js$/,"");if(c[e])return;c[e]=!0,r.push(e)}});Object.keys(e.comps).filter(e=>l(e)===config_1.MainPkg).forEach(t=>{if((t.startsWith("miniprogram_npm/weui-miniprogram")||t.startsWith("weui-miniprogram"))&&e.app.useExtendedLib&&e.app.useExtendedLib.weui)return;if(c[t])return;c[t]=!0;const i=encodeURI(t);o.push(""+i)});Object.keys(e.pages).filter(e=>l(e)===config_1.MainPkg).forEach(e=>{if(c[e])return;c[e]=!0;const t=encodeURI(e);i.push(""+t)}),t.forEach(e=>{const t=e.replace(/\.js$/,"");c[t]||(c[t]=!0,"app.js"!==e?s.push(""+encodeURI(t)):n=!0)});const g=[...s,...o,...i];return n&&g.push("app"),{hasAppJS:n,allFiles:g,pageFiles:i,componentFiles:o,workerFiles:r,functionalPageFiles:a,otherFiles:s}}async getSubPkgSortedJSFiles(e){const t=await this.getConf(miniProgram),i=(await this.getPackageFiles(miniProgram,e)).map(e=>e.path).filter(e=>e.endsWith(".js")),s=[],o=[],r=[],a={},n=e=>Object.keys(t.packages).find(t=>e.startsWith(t))||config_1.MainPkg;Object.keys(t.comps).filter(t=>n(t)===e).forEach(e=>{if((e.startsWith("miniprogram_npm/weui-miniprogram")||e.startsWith("weui-miniprogram"))&&t.app.useExtendedLib&&t.app.useExtendedLib.weui)return;if(a[e])return;a[e]=!0;const i=encodeURI(e);r.push(""+i)});Object.keys(t.pages).filter(t=>n(t)===e).forEach(e=>{if(a[e])return;a[e]=!0;const t=encodeURI(e);s.push(""+t)});let c=t.packages[e].entry||"";c&&(c=path_1.default.join(e,c),c=c.replace(/\.js$/,"")),i.forEach(e=>{const t=e.replace(/\.js$/,"");a[t]||(a[t]=!0,t!==c&&o.push(""+encodeURI(t)))});const l=i.map(e=>""+encodeURI(e.replace(/\.js$/,"")));return{entryJS:c,allFiles:l,pageFiles:s,componentFiles:r,otherFiles:o}}async compileJSList(e){const t=this.project.type;let i=config_1.COMPILE_TYPE.miniProgram;i=e.root===this.project.miniprogramRoot?this.isGameType(t)?config_1.COMPILE_TYPE.miniGame:config_1.COMPILE_TYPE.miniProgram:this.isGameType(t)?config_1.COMPILE_TYPE.miniGamePlugin:miniProgramPlugin;const s=await this.getCodeByFileList(i,e.fileList),o=[];for(const e in s){const t=s[e];if("error"in t)throw t.error;o.push(Object.assign({filePath:e,code:t.code,map:t.map,mtime:t.mtime},t.jsTag))}return o}async compileJS(e){const t=this.project.type;let i;if(e.root===this.project.miniprogramRoot){i=(await this.getCodeByFileList(this.isGameType(t)?config_1.COMPILE_TYPE.miniGame:config_1.COMPILE_TYPE.miniProgram,[e.filePath]))[e.filePath]}else{i=(await this.getCodeByFileList(this.isGameType(t)?config_1.COMPILE_TYPE.miniGamePlugin:miniProgramPlugin,[e.filePath]))[e.filePath]}if(!i){const t=new Error(`summer-compiler miss ${e.root} js file, ${e.filePath}`);throw t.code="ENOENT",t}if("error"in i)throw i.error;return Object.assign({filePath:e.filePath,code:i.code,map:i.map,mtime:i.mtime},i.jsTag)}async compile(e){Date.now();this.progressUpdateFromCompileOptions=e.onProgressUpdate;const t=(await this.getPackageFiles(this.isGameType(this.project.type)?miniGame:miniProgram,config_1.FullPkg,e.resultType,e.useCache)).map(e=>e.path),i=await this.subProcessManager.runTask("compileNewLogic",Object.assign(Object.assign({},e),{fileList:t,analyzer:void 0}),this.onProgressUpdate),s=i.app,o=Object.keys(s).filter(e=>e.endsWith(".json"));this.onProgressUpdate(111,"doing","打包资源文件");const r=await this.compileOther(this.isGameType(this.project.type)?miniGame:miniProgram,e.resultType||"prod",o);let a={};if(this.isPluginType(this.project.type)){const t=i.plugin,o=Object.keys(t).filter(e=>e.endsWith(".json")),n=await this.compileOther(this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin,e.resultType||"prod",o);Object.keys(r).forEach(e=>{a[path_1.default.posix.join("miniprogram",e)]=r[e]}),Object.keys(n).forEach(e=>{a[path_1.default.posix.join("plugin",e)]=n[e]}),Object.keys(s).forEach(e=>{a[path_1.default.posix.join("miniprogram",e)]=s[e]}),Object.keys(t).forEach(e=>{a[path_1.default.posix.join("plugin",e)]=t[e]}),a["project.config.json"]=JSON.stringify({miniprogramRoot:"miniprogram",pluginRoot:"plugin",__compileDebugInfo__:{useSummer:!0}})}else a=Object.assign(Object.assign({},r),s),a["project.config.json"]=JSON.stringify({miniprogramRoot:"",__compileDebugInfo__:{useSummer:!0}});this.onProgressUpdate(111,"success","打包资源文件完成");for(const e of Object.keys(a))"object"==typeof a[e]&&"Buffer"===a[e].type&&(a[e]=Buffer.from(a[e].data));return a}async compileOther(e,t,i){const s=(0,tools_1.getSupportCodeFileExtSet)(this.project);s.delete(".json");const o=await(0,white_ext_list_1.getWhiteExtList)();let r=o.MiniProgramWhiteList;this.isGameType(this.project.type)&&(r=o.GameWhiteList);const a=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,n=await this.filterFactory(t),c=this.project.getFileList(a,"").filter(t=>{const o=path_1.default.posix.extname(t),c=path_1.default.posix.relative(a,t);return!(!r.has(o)||s.has(o)||i.includes(c))&&n(e,t)===config_1.EFilterCode.Include}),l=await(0,common_1.compileOther)(this.project,c,{onProgressUpdate:()=>{}}),g={};for(const e in l){g[path_1.default.posix.relative(a,e)]=l[e]}return g}async compile2(e){const t=await this.subProcessManager.runTask("compile",e,(t,i,s)=>{var o;null===(o=e.onProgressUpdate)||void 0===o||o.call(e,{id:t.toString(),status:i,message:s})});for(const e of Object.keys(t))"object"==typeof t[e]&&"Buffer"===t[e].type&&(t[e]=Buffer.from(t[e].data));return t}async getPluginJSON(e=""){return(await this.getConf(this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin)).plugin}async getPluginPageJSON(e){const t=await this.getConf(miniProgramPlugin),i=t.pages[e]||t.comps[e];if(!i)throw new Error("summer-compiler 收集plugin json配置有遗漏, "+e);return i}async getPluginComponents(){const e=await this.getConf(miniProgramPlugin),t=new Set(Object.keys(e.pages).concat(Object.keys(e.comps)));return Array.from(t)}async getPluginJSFiles(){const e=this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin,t=(await this.getPackageFiles(e,config_1.FullPkg)).map(e=>e.path).filter(e=>e.endsWith(".js")),i=await this.getCodeByFileList(e,t);return{jsFiles:t,content:t.reduce((e,t)=>{const s=i[t];if(!s)throw`lack of ${t} code`;if("error"in s)throw s.error;return e[t]=s.code,e["./"+t]=s.code,e},{})}}async getPluginWxssFiles(){const e=(await this.getPackageFiles(miniProgramPlugin,config_1.FullPkg)).map(e=>e.path).filter(e=>e.endsWith(".wxss")),t=await this.getCodeByFileList(miniProgramPlugin,e);return{wxssFiles:e,content:e.reduce((e,i)=>{const s=t[i];if(!s)throw`lack of ${i} code`;if("error"in s)throw s.error;return e[i]=s.code,e["./"+i]=s.code,e},{})}}async getPluginWxmlAndWxsFiles(){const e=(await this.getPackageFiles(miniProgramPlugin,config_1.FullPkg)).map(e=>e.path),t=e.filter(e=>e.endsWith(".wxml")),i=e.filter(e=>e.endsWith(".wxs")),s=await this.getCodeByFileList(miniProgramPlugin,t.concat(i));return{wxmlFiles:t,wxsFiles:i,content:t.concat(i).reduce((e,t)=>{const i=s[t];if(!i)throw`lack of ${t} code`;if("error"in i)throw i.error;return e[t]=i.code,e["./"+t]=i.code,e},{})}}async checkThemeJSON(e){return(await this.getConf(miniProgram)).theme}setProxy(e){(0,request_1.setCiProxy)(e)}setLocale(e){this._locale!==e&&(this._locale=e,this.subProcessManager.runTask("setLocale",e))}async uglifyFileNames(e,t,i){return await(0,uglifyfilenames_1.uglifyFileNames)(e,t,i)}async getMPFileInfo(){return this.subProcessManager.runTask("getLocalFileList",miniProgram)}async getPluginFileInfo(){return this.subProcessManager.runTask("getLocalFileList",miniProgramPlugin)}async getCompAndPagesOfConf(){const e=await this.getConf(miniProgram);return{pages:e.pages,comps:e.comps}}async getFiltedFileListReason(e){const t=this.project.getFileList(this.project.miniprogramRoot),i=[],s=await this.filterFactory(e),o=this.isGameType(this.project.type)?miniGame:miniProgram;for(const e of t){const t=s(o,e);t!==config_1.EFilterCode.Include&&i.push({file:e,code:t})}if(this.isPluginType(this.project.type)){const e=this.project.getFileList(this.project.pluginRoot),t=this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin;for(const o of e){const e=s(t,o);e!==config_1.EFilterCode.Include&&i.push({file:o,code:e})}}return i}}exports.SummerCompiler=SummerCompiler;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SummerCompiler=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),lodash_1=tslib_1.__importDefault(require("lodash")),locales_1=tslib_1.__importDefault(require("../../utils/locales/locales")),request_1=require("../../utils/request"),common_1=require("./original/compile/common"),tools_1=require("../../utils/tools"),white_ext_list_1=require("../../utils/white_ext_list"),config_1=require("../../config/config"),processManager_1=require("../../utils/subprocess/processManager"),messageHub_1=require("../../utils/messageHub"),singletontask_1=require("../../utils/singletontask"),uglifyfilenames_1=require("./original/protect/uglifyfilenames"),index_1=require("./original/index"),baseCompiler_1=require("./baseCompiler"),packOptionsHelper_1=tslib_1.__importDefault(require("../../utils/packOptionsHelper")),miniProgram=config_1.COMPILE_TYPE.miniProgram,miniGame=config_1.COMPILE_TYPE.miniGame,miniProgramPlugin=config_1.COMPILE_TYPE.miniProgramPlugin,miniGamePlugin=config_1.COMPILE_TYPE.miniGamePlugin;function performanceMark(e,t){}class SummerCompiler extends baseCompiler_1.BaseCoreCompiler{constructor(e,t,i,s,o,a){super(e),this.project=e,this.cachePath=t,this.projectInfo=i,this.devtoolMessagehub=s,this.analyzer=o,this._filterFactory=a,this.isSummer=!0,this.promiseCache=new Map,this._taskCache=new Map,this._status=void 0,this._eventAdded=!1,this._locale="",this.devCodeCacheByPath=new Map,this.onFileChange=(e,t)=>{if("change"!==e||t.endsWith(".json"))for(const e of this.promiseCache.keys())e.startsWith("getConf-")&&this.promiseCache.delete(e);if("change"!==e){for(const e of this.promiseCache.keys())e.startsWith("getPackageFiles-")&&this.promiseCache.delete(e);for(const e of this._taskCache.keys())e.startsWith("getPackageFiles-")&&this._taskCache.delete(e)}this.invalidCodeCache(t),this.subProcessManager.sendEvent("fileChange",{type:e,targetPath:t})},this.onPreCompileOptionsChange=async e=>{await this.clearCache(),this.subProcessManager.sendEvent("precompileOptionsChange",e)},this.onProgressUpdate=(e,t,i)=>{var s;this.messageHub.showBuildLog(""+e,t,i),null===(s=this.progressUpdateFromCompileOptions)||void 0===s||s.call(this,{id:e.toString(),message:i,status:t})},this._getPackageFiles=async(e,t,i="dev")=>{performanceMark("request get getPackageFiles");const s=await this.subProcessManager.runTask("getPackageFiles",{graphId:e,root:t},this.onProgressUpdate);performanceMark("request get getPackageFiles",!0);const o=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,a=await this.filterFactory(i),r={},n=s.filter(t=>{const i=path_1.default.posix.join(o,t.path),s=a(e,i);return s!==config_1.EFilterCode.Include&&(r[s]||(r[s]=[]),r[s].push(i)),s===config_1.EFilterCode.Include}),c={[config_1.EFilterCode.AnalyseNoUse]:locales_1.default.config.UNUSE_FILE_LIST,[config_1.EFilterCode.PackOptionsIgnore]:locales_1.default.config.PACK_OPTIONS_IGNORE_LIST,[config_1.EFilterCode.PartialCompileNoUse]:locales_1.default.config.PARTIAL_COMPILE_IGNORE_LIST};for(const e in r)c[e]?this.onProgressUpdate(e,"warn",c[e].format(r[e].join(","))):this.onProgressUpdate(e,"warn",locales_1.default.config.UNKNOWN_REASON_INGORE_LIST.format(e,r[e].join(",")));return n},performanceMark("create summer compiler"),this.messageHub=new messageHub_1.MessageHub(s),this.ready()}get status(){return this._status}async init(){performanceMark("init summer compiler");const e=path_1.default.posix.join(__dirname,"./summerEntryProcess.js");this.subProcessManager=new processManager_1.SubProcessProxy(this.project,e,{cachePath:this.cachePath},this.projectInfo,8891,this.onProgressUpdate),this.addProjectListener(),this.loadStatus(),performanceMark("init summer compiler",!0)}async loadStatus(){this._status=await this.subProcessManager.runTask("loadStatus")}destroy(){var e;null===(e=this.subProcessManager)||void 0===e||e.destroy(),this.removeProjectListener(),this._checkReadyTask=void 0}async clearCache(){var e;await(null===(e=this.subProcessManager)||void 0===e?void 0:e.runTask("clearCache")),this.promiseCache.clear(),this.devCodeCacheByPath.clear(),this._taskCache.clear()}updateOptions(e){var t;lodash_1.default.isEqual(e,this.projectInfo)||(this.projectInfo=e,this.promiseCache.clear(),this.devCodeCacheByPath.clear(),null===(t=this.subProcessManager)||void 0===t||t.sendEvent("updateOptions",e),this.loadStatus(),this.project.updateOptions(e))}addProjectListener(){var e,t;this._eventAdded&&this.removeProjectListener(),null===(e=this.project.event)||void 0===e||e.on("fileChange",this.onFileChange),null===(t=this.project.event)||void 0===t||t.on("precompileOptionsChange",this.onPreCompileOptionsChange),this._eventAdded=!0}removeProjectListener(){var e,t;null===(e=this.project.event)||void 0===e||e.off("fileChange",this.onFileChange),null===(t=this.project.event)||void 0===t||t.off("precompileOptionsChange",this.onPreCompileOptionsChange),this._eventAdded=!1}invalidCodeCache(e){const t=this.devCodeCacheByPath.get((0,tools_1.sourcePathToTargetPath)(e));t&&(t.isValid=!1)}async getConf(e){var t,i;const s="getConf-"+e;if(this.promiseCache.has(s))return(null===(t=process.env)||void 0===t?void 0:t.isDevtools)&&console.log(s,"hit cache"),this.promiseCache.get(s);(null===(i=process.env)||void 0===i?void 0:i.isDevtools)&&console.log(s,"do request"),performanceMark("request get conf");const o={graphId:e},a=this.subProcessManager.runTask("getConf",o,this.onProgressUpdate);return this.promiseCache.set(s,a),performanceMark("request get conf",!0),a}async getPackageFiles(e,t,i="dev",s=!0){const o=`getPackageFiles-${e}-${t}-${i}`;if(this._taskCache.has(o)&&s){const e=this._taskCache.get(o);return null==e?void 0:e.getResult(!0)}const a=new singletontask_1.SingletonTask(this._getPackageFiles.bind(this,e,t,i),o);return this._taskCache.set(o,a),null==a?void 0:a.getResult(!0)}async filterFactory(e){packOptionsHelper_1.default.updateState(this.project),this.onProgressUpdate("initUnusedFiles","doing","analyzing codes..."),await packOptionsHelper_1.default.initUnusedFiles(this.project,this.analyzer,"prod"===e),0!==packOptionsHelper_1.default.getUnusedFiles().size&&this.onProgressUpdate("initUnusedFiles","doing","ignoring files: "+Array.from(packOptionsHelper_1.default.getUnusedFiles()).join(",")),this.onProgressUpdate("initUnusedFiles","success","analyzing codes success");const t=this._filterFactory?await this._filterFactory(e):()=>0;return(i,s)=>"mini-android"!==this.project.targetPlatform&&"mini-ios"!==this.project.targetPlatform||path_1.default.posix.join(this.project.miniprogramRoot,"app.miniapp.json")!==s?i===miniProgram&&packOptionsHelper_1.default.isIgnoreByUnusedFiles(s,"prod"===e)?config_1.EFilterCode.AnalyseNoUse:packOptionsHelper_1.default.isIgnoredByRules(s)?config_1.EFilterCode.PackOptionsIgnore:t(i,s):config_1.EFilterCode.Include}async getCodeByFileList(e,t){const i={},s={},o=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,a=[];for(const e of t){const t=this.devCodeCacheByPath.get(path_1.default.posix.join(o,e)),r=null==t?void 0:t.codeFile;let n=!1;t&&t.isValid&&r&&!("error"in r)||(n=!0,a.push(e)),r&&!("error"in r)&&(n&&(i[e]=r.md5),s[e]=r)}if(a.length>0){const t=await this.subProcessManager.runTask("getDevCodeByFileList",{graphId:e,fileList:a,cacheMd5:i},this.onProgressUpdate);for(const e in t){const i=t[e],a=path_1.default.posix.join(o,e);"error"in i||""!==i.md5?this.devCodeCacheByPath.set(a,{isValid:!0,codeFile:i}):this.devCodeCacheByPath.delete(a),s[e]=i}}return s}async getExtJSON(){return await(0,index_1.getExtJSON)(this.project)}async getAppJSON(){return(await this.getConf(miniProgram)).app}async getGameJSON(){return(await this.getConf(miniGame)).app}async getSiteMapJSON(){return(await this.getConf(miniProgram)).sitemap}async getPageJSON(e){const t=await this.getConf(miniProgram),i=t.pages[e]||t.comps[e];if(!i)throw new Error("summer-compiler 收集json配置有遗漏, "+e);return i}async getAllPageAndComponent(){const e=await this.getConf(miniProgram),t=(await this.getPackageFiles(miniProgram,config_1.FullPkg)).map(e=>e.path).filter(e=>e.endsWith(".json"));return Object.keys(e.pages).concat(Object.keys(e.comps)).filter(e=>t.includes(e+".json"))}async getAllSortedJSFiles(){const e=await this.getConf(miniProgram),t=Object.keys(e.pages),i=Object.keys(e.comps),s=(await this.getPackageFiles(miniProgram,config_1.FullPkg)).map(e=>e.path).filter(e=>e.endsWith(".js")),o=t.filter(e=>!i.includes(e)).map(e=>e+".js").filter(e=>s.includes(e)),a=i.map(e=>e+".js").filter(e=>s.includes(e)),r=s.filter(e=>e.endsWith(".js")&&"app.js"!==e&&!o.includes(e)&&!a.includes(e));return{jsPagesFiles:o,components:a,otherJsFiles:r}}async getAllWxmlAndWxsFiles(){const e=(await this.getPackageFiles(miniProgram,config_1.FullPkg)).map(e=>e.path),t=e.filter(e=>e.endsWith(".wxml")),i=e.filter(e=>e.endsWith(".wxs")),s=await this.getCodeByFileList(miniProgram,t.concat(i));return{wxmlFiles:t,wxsFiles:i,content:t.concat(i).reduce((e,t)=>{const i=s[t];if("error"in i)throw i.error;return e[t]=i.code,e["./"+t]=i.code,e},{})}}async getPackageWxmlAndWxsFiles(e){let t=(await this.getPackageFiles(miniProgram,e)).map(e=>e.path);if(e!==config_1.MainPkg&&e!==config_1.FullPkg){const e=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map(e=>e.path);t=t.concat(e)}const i=t.filter(e=>e.endsWith(".wxml")),s=t.filter(e=>e.endsWith(".wxs")),o=await this.getCodeByFileList(miniProgram,i.concat(s));return{wxmlFiles:i,wxsFiles:s,content:i.concat(s).reduce((e,t)=>{const i=o[t];if(!i)throw`lack of ${t} code`;if("error"in i)throw i.error;return e[t]=i.code,e["./"+t]=i.code,e},{})}}async getPackageWxssFileList(e){let t=(await this.getPackageFiles(miniProgram,e)).map(e=>e.path);if(e!==config_1.MainPkg&&e!==config_1.FullPkg){const e=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map(e=>e.path);t=t.concat(e)}return t.filter(e=>e.endsWith(".wxss"))}async getPackageWxssFiles(e){const t=await this.getPackageWxssFileList(e),i=await this.getCodeByFileList(miniProgram,t);return{wxssFiles:t,content:t.reduce((e,t)=>{const s=i[t];if(!s)throw`lack of ${t} code`;if("error"in s)throw s.error;return e[t]=s.code,e["./"+t]=s.code,e},{})}}getWxssMap(e,t){t=(0,tools_1.normalizePath)(t),e===miniProgram?t=path_1.default.posix.join(this.project.miniprogramRoot,t):e===miniProgramPlugin&&(t=path_1.default.posix.join(this.project.pluginRoot,t));const i=this.devCodeCacheByPath.get(t),s=null==i?void 0:i.codeFile;if(s&&!("error"in s))return s.map}async getMainPkgSortedJSFiles(){const e=await this.getConf(miniProgram),t=(await this.getPackageFiles(miniProgram,config_1.MainPkg)).map(e=>e.path).filter(e=>e.endsWith(".js")),i=[],s=[],o=[],a=[],r=[];let n=!1;const c={},l=t=>Object.keys(e.packages).find(e=>t.startsWith(e))||config_1.MainPkg;e.app.functionalPages&&t.forEach(e=>{if(e.startsWith("functional-pages/")){const t=e.replace(/\.js$/,"");if(c[t])return;c[t]=!0,r.push(encodeURI(t))}}),e.app.workers&&t.forEach(t=>{if(t.startsWith((0,tools_1.getWorkersPath)(e.app.workers))){const e=t.replace(/\.js$/,"");if(c[e])return;c[e]=!0,a.push(e)}});Object.keys(e.comps).filter(e=>l(e)===config_1.MainPkg).forEach(t=>{if((t.startsWith("miniprogram_npm/weui-miniprogram")||t.startsWith("weui-miniprogram"))&&e.app.useExtendedLib&&e.app.useExtendedLib.weui)return;if(c[t])return;c[t]=!0;const i=encodeURI(t);o.push(""+i)});Object.keys(e.pages).filter(e=>l(e)===config_1.MainPkg).forEach(e=>{if(c[e])return;c[e]=!0;const t=encodeURI(e);i.push(""+t)}),t.forEach(e=>{const t=e.replace(/\.js$/,"");c[t]||(c[t]=!0,"app.js"!==e?s.push(""+encodeURI(t)):n=!0)});const g=[...s,...o,...i];return n&&g.push("app"),{hasAppJS:n,allFiles:g,pageFiles:i,componentFiles:o,workerFiles:a,functionalPageFiles:r,otherFiles:s}}async getSubPkgSortedJSFiles(e){const t=await this.getConf(miniProgram),i=(await this.getPackageFiles(miniProgram,e)).map(e=>e.path).filter(e=>e.endsWith(".js")),s=[],o=[],a=[],r={},n=e=>Object.keys(t.packages).find(t=>e.startsWith(t))||config_1.MainPkg;Object.keys(t.comps).filter(t=>n(t)===e).forEach(e=>{if((e.startsWith("miniprogram_npm/weui-miniprogram")||e.startsWith("weui-miniprogram"))&&t.app.useExtendedLib&&t.app.useExtendedLib.weui)return;if(r[e])return;r[e]=!0;const i=encodeURI(e);a.push(""+i)});Object.keys(t.pages).filter(t=>n(t)===e).forEach(e=>{if(r[e])return;r[e]=!0;const t=encodeURI(e);s.push(""+t)});let c=t.packages[e].entry||"";c&&(c=path_1.default.posix.join(e,c),c=c.replace(/\.js$/,"")),i.forEach(e=>{const t=e.replace(/\.js$/,"");r[t]||(r[t]=!0,t!==c&&o.push(""+encodeURI(t)))});const l=i.map(e=>""+encodeURI(e.replace(/\.js$/,"")));return{entryJS:c,allFiles:l,pageFiles:s,componentFiles:a,otherFiles:o}}async compileJSList(e){const t=this.project.type;let i=config_1.COMPILE_TYPE.miniProgram;i=e.root===this.project.miniprogramRoot?this.isGameType(t)?config_1.COMPILE_TYPE.miniGame:config_1.COMPILE_TYPE.miniProgram:this.isGameType(t)?config_1.COMPILE_TYPE.miniGamePlugin:miniProgramPlugin;const s=await this.getCodeByFileList(i,e.fileList),o=[];for(const e in s){const t=s[e];if("error"in t)throw t.error;o.push(Object.assign({filePath:e,code:t.code,map:t.map,mtime:t.mtime},t.jsTag))}return o}async compileJS(e){const t=this.project.type;let i;if(e.root===this.project.miniprogramRoot){i=(await this.getCodeByFileList(this.isGameType(t)?config_1.COMPILE_TYPE.miniGame:config_1.COMPILE_TYPE.miniProgram,[e.filePath]))[e.filePath]}else{i=(await this.getCodeByFileList(this.isGameType(t)?config_1.COMPILE_TYPE.miniGamePlugin:miniProgramPlugin,[e.filePath]))[e.filePath]}if(!i){const t=new Error(`summer-compiler miss ${e.root} js file, ${e.filePath}`);throw t.code="ENOENT",t}if("error"in i)throw i.error;return Object.assign({filePath:e.filePath,code:i.code,map:i.map,mtime:i.mtime},i.jsTag)}async compile(e){Date.now();this.progressUpdateFromCompileOptions=e.onProgressUpdate;const t=(await this.getPackageFiles(this.isGameType(this.project.type)?miniGame:miniProgram,config_1.FullPkg,e.resultType,e.useCache)).map(e=>e.path),i=await this.subProcessManager.runTask("compileNewLogic",Object.assign(Object.assign({},e),{fileList:t,analyzer:void 0}),this.onProgressUpdate),s=i.app,o=Object.keys(s).filter(e=>e.endsWith(".json"));this.onProgressUpdate(111,"doing",locales_1.default.config.SUMMER_PACK_FILES.format());const a=await this.compileOther(this.isGameType(this.project.type)?miniGame:miniProgram,e.resultType||"prod",o);let r={};if(this.isPluginType(this.project.type)){const t=i.plugin,o=Object.keys(t).filter(e=>e.endsWith(".json")),n=await this.compileOther(this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin,e.resultType||"prod",o);Object.keys(a).forEach(e=>{r[path_1.default.posix.join("miniprogram",e)]=a[e]}),Object.keys(n).forEach(e=>{r[path_1.default.posix.join("plugin",e)]=n[e]}),Object.keys(s).forEach(e=>{r[path_1.default.posix.join("miniprogram",e)]=s[e]}),Object.keys(t).forEach(e=>{r[path_1.default.posix.join("plugin",e)]=t[e]}),r["project.config.json"]=JSON.stringify({miniprogramRoot:"miniprogram",pluginRoot:"plugin",__compileDebugInfo__:{useSummer:!0}})}else r=Object.assign(Object.assign({},a),s),r["project.config.json"]=JSON.stringify({miniprogramRoot:"",__compileDebugInfo__:{useSummer:!0}});this.onProgressUpdate(111,"success",locales_1.default.config.SUMMER_PACK_FILES_FINISH.format());for(const e of Object.keys(r))"object"==typeof r[e]&&"Buffer"===r[e].type&&(r[e]=Buffer.from(r[e].data));return r}async compileOther(e,t,i){const s=(0,tools_1.getSupportCodeFileExtSet)(this.project);s.delete(".json");const o=await(0,white_ext_list_1.getWhiteExtList)();let a=o.MiniProgramWhiteList;this.isGameType(this.project.type)&&(a=o.GameWhiteList);const r=this.isPluginType(e)?this.project.pluginRoot:this.project.miniprogramRoot,n=await this.filterFactory(t),c=this.project.getFileList(r,"").filter(t=>{const o=path_1.default.posix.extname(t),c=path_1.default.posix.relative(r,t);return!(!a.has(o)||s.has(o)||i.includes(c))&&n(e,t)===config_1.EFilterCode.Include}),l=await(0,common_1.compileOther)(this.project,c,{onProgressUpdate:()=>{}}),g={};for(const e in l){g[path_1.default.posix.relative(r,e)]=l[e]}return g}async compile2(e){const t=await this.subProcessManager.runTask("compile",e,(t,i,s)=>{var o;null===(o=e.onProgressUpdate)||void 0===o||o.call(e,{id:t.toString(),status:i,message:s})});for(const e of Object.keys(t))"object"==typeof t[e]&&"Buffer"===t[e].type&&(t[e]=Buffer.from(t[e].data));return t}async getPluginJSON(e=""){return(await this.getConf(this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin)).plugin}async getPluginPageJSON(e){const t=await this.getConf(miniProgramPlugin),i=t.pages[e]||t.comps[e];if(!i)throw new Error("summer-compiler 收集plugin json配置有遗漏, "+e);return i}async getPluginComponents(){const e=await this.getConf(miniProgramPlugin),t=new Set(Object.keys(e.pages).concat(Object.keys(e.comps)));return Array.from(t)}async getPluginJSFiles(){const e=this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin,t=(await this.getPackageFiles(e,config_1.FullPkg)).map(e=>e.path).filter(e=>e.endsWith(".js")),i=await this.getCodeByFileList(e,t);return{jsFiles:t,content:t.reduce((e,t)=>{const s=i[t];if(!s)throw`lack of ${t} code`;if("error"in s)throw s.error;return e[t]=s.code,e["./"+t]=s.code,e},{})}}async getPluginWxssFiles(){const e=(await this.getPackageFiles(miniProgramPlugin,config_1.FullPkg)).map(e=>e.path).filter(e=>e.endsWith(".wxss")),t=await this.getCodeByFileList(miniProgramPlugin,e);return{wxssFiles:e,content:e.reduce((e,i)=>{const s=t[i];if(!s)throw`lack of ${i} code`;if("error"in s)throw s.error;return e[i]=s.code,e["./"+i]=s.code,e},{})}}async getPluginWxmlAndWxsFiles(){const e=(await this.getPackageFiles(miniProgramPlugin,config_1.FullPkg)).map(e=>e.path),t=e.filter(e=>e.endsWith(".wxml")),i=e.filter(e=>e.endsWith(".wxs")),s=await this.getCodeByFileList(miniProgramPlugin,t.concat(i));return{wxmlFiles:t,wxsFiles:i,content:t.concat(i).reduce((e,t)=>{const i=s[t];if(!i)throw`lack of ${t} code`;if("error"in i)throw i.error;return e[t]=i.code,e["./"+t]=i.code,e},{})}}async checkThemeJSON(e){return(await this.getConf(miniProgram)).theme}setProxy(e){(0,request_1.setCiProxy)(e)}setLocale(e){this._locale!==e&&(this._locale=e,this.subProcessManager.runTask("setLocale",e))}async uglifyFileNames(e,t,i){return await(0,uglifyfilenames_1.uglifyFileNames)(e,t,i)}async getMPFileInfo(){return this.subProcessManager.runTask("getLocalFileList",miniProgram)}async getPluginFileInfo(){return this.subProcessManager.runTask("getLocalFileList",miniProgramPlugin)}async getCompAndPagesOfConf(){const e=await this.getConf(miniProgram);return{pages:e.pages,comps:e.comps}}async getFiltedFileListReason(e){const t=this.project.getFileList(this.project.miniprogramRoot),i=[],s=await this.filterFactory(e),o=this.isGameType(this.project.type)?miniGame:miniProgram;for(const e of t){const t=s(o,e);t!==config_1.EFilterCode.Include&&i.push({file:e,code:t})}if(this.isPluginType(this.project.type)){const e=this.project.getFileList(this.project.pluginRoot),t=this.isGameType(this.project.type)?miniGamePlugin:miniProgramPlugin;for(const o of e){const e=s(t,o);e!==config_1.EFilterCode.Include&&i.push({file:o,code:e})}}return i}}exports.SummerCompiler=SummerCompiler;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.generateSubPkgAppInfoJson=exports.packAllPackagesToWxapkg=exports.IMiniappConnectType=exports.IMiniappPkgType=void 0;const tslib_1=require("tslib"),path_1=tslib_1.__importDefault(require("path")),pack_1=tslib_1.__importDefault(require("../../../utils/wxapkg/pack")),tools_1=require("../../../utils/tools"),updatecontactandlaunch_1=require("./contactandlaunch/updatecontactandlaunch"),env_1=require("../../../utils/env");var IMiniappPkgType,IMiniappConnectType;async function packAllPackagesToWxapkg(e,t,a){const n=[],p=t.subpackages||t.subPackages,i=[];if(p){const o="__APP__",s=`${a}/${(0,tools_1.generateMD5)(o)}.wxapkg`,l=path_1.default.join(e,s),u=path_1.default.join(e,"app"),r=await(0,pack_1.default)(".",l,u,p.map(e=>path_1.default.join(".",e.root,"/**/*")));i.push(r),n.push({name:o,filePath:s,pkgType:4,md5:(0,tools_1.generateMD5)(r),size:r.byteLength,independent:!1,page_count:t.pages.length,alias:[],wxacode_lib_info_list:[],without_lib_md5:"",separated_plugin_list:[],md5_list:[],widget_list:[]});for(const t of p){const p=processSubpkgRootPath(t.root),o=`${a}/${(0,tools_1.generateMD5)(p)}.wxapkg`,s=path_1.default.join(e,o),l=await(0,pack_1.default)(t.root,s,u,[]);i.push(l),n.push({name:p,filePath:o,pkgType:4,md5:(0,tools_1.generateMD5)(l),size:l.byteLength,independent:!1,page_count:t.pages.length,alias:[],wxacode_lib_info_list:[],without_lib_md5:"",separated_plugin_list:[],md5_list:[],widget_list:[]})}}else{const p="__APP__",i=`${a}/${(0,tools_1.generateMD5)(p)}.wxapkg`,o=path_1.default.join(e,i),s=path_1.default.join(e,"app"),l=await(0,pack_1.default)(".",o,s);n.push({name:p,filePath:i,pkgType:0,md5:(0,tools_1.generateMD5)(l),size:l.byteLength,independent:!1,page_count:t.pages.length,alias:[],wxacode_lib_info_list:[],without_lib_md5:"",separated_plugin_list:[],md5_list:[],widget_list:[]})}const o=Buffer.concat(i);return{wholePkgMd5:(0,tools_1.generateMD5)(o),moduleListConfig:n}}async function generateSubPkgAppInfoJson(e){const{miniModuleId:t,nickName:a,pageOrientation:n,subpkgs:p,buildVersion:i,contact:o,cpfWxaAttrSyncResponse:s,miniappPkgType:l}=e,u=i||1,r=await(0,updatecontactandlaunch_1.updateLaunchBase64)();return{miniModuleId:t,nickname:a,device_orientation:n||"portrait",appVersion:u,pkgInfos:p.map(e=>{var a,n;return{miniModuleId:t,moduleName:e.name,pkgType:e.type,pkgMd5:e.md5,appVersion:u,versionType:e.versionType===IMiniappPkgType.Release?0:1,assetPath:e.file,signVersion:null!==(a=e.signVersion)&&void 0!==a?a:0,signFilePath:null!==(n=e.signFile)&&void 0!==n?n:e.file+".sign"}}),contactBase64:o,launchBase64:r,cpfWxaAttrSyncResponse:s,version:2,miniappPkgType:l,devtoolsPlatform:env_1.isWin?"Windows":"Mac"}}function processSubpkgRootPath(e){return e.startsWith("/")||(e="/"+e),e.endsWith("/")||(e+="/"),e}!function(e){e.Release="Release",e.Debug="Debug",e.HotReload="HotReload"}(IMiniappPkgType=exports.IMiniappPkgType||(exports.IMiniappPkgType={})),function(e){e.USB="USB",e.LAN="LAN"}(IMiniappConnectType=exports.IMiniappConnectType||(exports.IMiniappConnectType={})),exports.packAllPackagesToWxapkg=packAllPackagesToWxapkg,exports.generateSubPkgAppInfoJson=generateSubPkgAppInfoJson;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const originalContactBase64="CgYIABICCgASFwiEAhCFroDAARjX44GVBiDX44GVBihXGmIKCVNpZ25hdHVyZRJV5bCP56iL5bqP5a6Y5pa556S65L6LRGVtb++8jOWwseW9k+WJjeW3suaUr+aMgeeahOaOpeWPo+iDveWKm+WPiue7hOS7tui/m+ihjOWxleekuuOAghoQCgpWZXJpZnlGbGFnEgIyNBpjCgpWZXJpZnlJbmZvElXlsI/nqIvluo/lrpjmlrnnpLrkvotEZW1v77yM5bCx5b2T5YmN5bey5pSv5oyB55qE5o6l5Y+j6IO95Yqb5Y+K57uE5Lu26L+b6KGM5bGV56S644CCGhsKCE5pY2tOYW1lEg/lsI/nqIvluo/npLrkvosaHwoIVXNlck5hbWUSE2doX2Q0M2Y2OTNjYTMxZkBhcHAaCQoFQWxpYXMSABqlAQoMQnJhbmRJY29uVVJMEpQBaHR0cDovL21tYml6LnFwaWMuY24vbW1iaXpfcG5nL0NyNVZ4WmZZZ0FLTW9UZUVwdVhpYUs3QXNUMVJXQjBpYTBhbjlXRDhQVE9GcVdYM2ljSzU2bU5rM3hNVExpY0llV3dqY05Qa0U1MU1IS0ZzaWFUdjBwSXNyY1EvNjQwP3d4X2ZtdD1wbmcmd3hmcm9tPTIwMBoOCglCaW5kS0ZVaW4SATAaEgoJUFlJbml0aWFsEgV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