@hyext/builder-revues 1.0.38 → 1.0.40
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/dist/index.js +1 -1
- package/package.json +7 -7
package/dist/index.js
CHANGED
@@ -18,4 +18,4 @@ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
18
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
19
19
|
PERFORMANCE OF THIS SOFTWARE.
|
20
20
|
***************************************************************************** */
|
21
|
-
function w(e,t,n,o){return new(n||(n=Promise))((function(i,a){function r(e){try{s(o.next(e))}catch(e){a(e)}}function u(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,u)}s((o=o.apply(e,t||[])).next())}))}!function(e){e[e.Integration=0]="Integration",e[e.Separate=1]="Separate"}(m||(m={}));const O=v.default.tmpdir(),T=y.default.join(O,".revue_cache"),_=y.default.join(O,".revues-projects"),C="__plugin__",$=y.default.join(_,C),E="https://hd.huya.com/h5/static-source/alex/wx-plugin",M=m.Integration,U=process.env.HYEXT_BUILD_ENV||"dev",N=y.default.resolve(__dirname,"../static"),F=y.default.join(N,"template");var D;!function(e){e.miniProgram="miniProgram",e.miniProgramPlugin="miniProgramPlugin",e.miniGame="miniGame",e.miniGamePlugin="miniGamePlugin"}(D||(D={}));const q=j.default.gray("·");var B=(e=>{e=` ${e}`;return{log(...t){const n=a.format.apply(a.format,t);console.log(j.default.white(e),q,n)},fatal(...t){t[0]instanceof Error&&(t[0]=t[0].message.trim());const n=a.format.apply(a.format,t);console.error(j.default.red(e),q,n),process.exit(1)},success(...t){const n=a.format.apply(a.format,t);console.log(j.default.green(e),q,n)}}})("REVUE");const z="project.config.json";function V(e,t){h.default.copyFileSync(y.default.join(e,z),y.default.join(t,z))}function R(){h.default.existsSync(T)||h.default.mkdirSync(T)}var J;function K(e,t){e.status=t}function G(e){return w(this,void 0,void 0,(function*(){const t=yield function(e){return w(this,void 0,void 0,(function*(){const t=["app","game","plugin"];for(let n=0;n<t.length;n++){const o=y.default.join(e,`${t[n]}.json`);if(yield h.default.exists(o))return{data:yield h.default.readJson(o),fileType:t[n]}}return null}))}(e);if(null!=t){const{data:n,fileType:o}=t;if("game"===o)return yield L(e,$,n);{const t=yield L(e,$,n);if(n.subpackages&&n.subpackages.length>0){const o=yield function(e,t){return w(this,void 0,void 0,(function*(){let n=[];for(let o=0;o<e.subpackages.length;o++){const i=e.subpackages[o];null!=i.export&&(i.export=i.rootDir+"/"+i.export);const a=yield L(t,$,i);n=n.concat(a.plugins)}return n}))}(n,e);if(o.length>0)return{plugins:[...t.plugins,...o]}}return t}}return{plugins:[]}}))}function L(e,t,n){return w(this,void 0,void 0,(function*(){const o=t,i=n.gamePlugins||n.plugins;if(null!=i){const t=Object.keys(i).map((e=>{const t=i[e];return function(e,t,n){const o=y.default.join(e,n.provider,n.version),i=Object.assign(Object.assign({},n),{key:t,id:n.provider,releasePath:y.default.join(o,n.provider),dir:o,status:J.None});return i.request=function(e,t){return`${E}/${e}-${t}.zip`}(n.provider,n.version),i}(o,e,t)}));if(t.length>0)return yield h.default.ensureDir(o),yield function(e){return w(this,void 0,void 0,(function*(){const t=e.map((e=>function(e){return w(this,void 0,void 0,(function*(){if(yield h.default.exists(e.releasePath))K(e,J.OK),H("reuse",e);else try{yield P.default(e.request,e.releasePath,{extract:!0}),K(e,J.OK),H("load success",e)}catch(t){K(e,J.Fail),H("load fail: "+t.message+"\n",e)}}))}(e)));yield Promise.all(t)}))}(t),yield function(e,t){return w(this,void 0,void 0,(function*(){let n=e.filter((e=>e.status===J.OK));const o=e.filter((e=>e.status===J.Fail));if(o.length>0){const e=function(e,t){return e.filter((e=>null!=e.path)).map((e=>(e.localDir=function(e,t){return y.default.join(e,t.path)}(t,e),H("use local plugin <projectRoot>/"+e.path,e),K(e,J.OK),e)))}(o,t);e.length>0&&(n=n.concat(e))}return{plugins:W(n)}}))}(t,e)}return{plugins:[]}}))}function W(e){return e.map((e=>{const t=e.localDir||e.releasePath,n=h.default.readJSONSync(y.default.join(t,"plugin.json"));return e.json=n,e}))}function H(e,t){B.success(`${e} provider:`+t.provider+", version:"+t.version)}function X(e,t,o){return w(this,void 0,void 0,(function*(){const i="prod"===e,a=i?{minify:!0,autoPrefixWXSS:!0,minifyWXSS:!0,es6:!0}:{},{plugins:r}=yield G(t);R(),yield n.compilerManager.init({projectPath:t,outputPath:o,cachePath:T,compileSettings:a,plugins:r,mode:e});const u=i?"compile":"compileDev";yield n.compilerManager[u](),V(t,o)}))}function Y(e,t,o){return w(this,void 0,void 0,(function*(){R();const{plugins:i}=yield G(t),a={projectPath:t,outputPath:o,cachePath:T,plugins:i,mode:e,compileSettings:{minify:"prod"===e}};yield n.compilerManager.init(Object.assign({},a));const r="dev"===e?"compileDev":"compile";return yield n.compilerManager[r](),V(t,o),a}))}!function(e){e[e.Fail=-1]="Fail",e[e.None=0]="None",e[e.OK=1]="OK"}(J||(J={}));const A={plugin:function(e){return w(this,void 0,void 0,(function*(){const{projectPath:t,outputPath:o,cb:i}=e;yield X("dev",t,o),n.compilerManager.watch({graphId:"miniprogram"},((e,t)=>w(this,void 0,void 0,(function*(){yield n.compilerManager.compileSingleCode({type:e,filePath:t,graphId:"miniprogram"}),i&&i()})))),n.compilerManager.watch({graphId:"plugin"},((e,t)=>w(this,void 0,void 0,(function*(){yield n.compilerManager.compileSingleCode({type:e,filePath:t,graphId:"plugin"}),i&&i()}))))}))},game:function(e){return w(this,void 0,void 0,(function*(){const{projectPath:t,outputPath:o,cb:i}=e,a=yield Y("dev",t,o);n.compilerManager.watch({graphId:"game"},((e,t)=>w(this,void 0,void 0,(function*(){B.log("detected change:",t),B.log("recompile..."),n.compilerManager.destroy(),yield n.compilerManager.init(Object.assign({},a)),yield n.compilerManager.compileDev(!0),i&&i()}))))}))},miniprogram:function(e){return w(this,void 0,void 0,(function*(){const{projectPath:t,outputPath:o,cb:i}=e;yield X("dev",t,o),n.compilerManager.watch({graphId:"miniprogram"},((e,t)=>w(this,void 0,void 0,(function*(){yield n.compilerManager.compileSingleCode({type:e,filePath:t,graphId:"miniprogram"}),i&&i()}))))}))}};const Q=Date.now(),Z="production"!==process.env.HYEXT_BUILD_ENV?"//test-hd.huya.com/h5/hyext-sentry-setup-script/test/sentry-setup.js":`//a.msstatic.com/huya/hd/h5/hyext-sentry-setup-script/sentry-setup.js?hash=${Q}`;function ee(e,t,n){const o=h.default.readFileSync(e).toString();h.default.outputFileSync(t,function(e,t,n){return x.default.compile(e,{noEscape:!0})(t,n)}(o,n))}x.default.registerHelper("toJSON",(function(e){return new x.default.SafeString(JSON.stringify(e))}));const te={context:{deviceOrientation:"portrait"},hooks:{onMergedMainPackge:new c.SyncHook(["IOnMergedMainPackge"]),onSrartBefore:new c.SyncHook(["IOnSrartBefore"])}};class ne{apply(e){e.hooks.onMergedMainPackge.tap("InjectWebviewUrlParamsPlugin",(t=>{const{compileType:n,mainPath:o,extInfo:i}=t,a=n===D.miniGame;if(a){const t=h.default.readJsonSync(y.default.join(o,"game.json"));"string"==typeof t.deviceOrientation&&t.deviceOrientation.includes("landscape")&&(e.context.deviceOrientation="landscape")}e.context.webviewUrlParams={isLandscape:0,disablePopGesture:1,hideStatusBar:a?i.hideNavigationBarTools?0:1:0,hideBar:1,bounces:0,hideloading:1}}))}}function oe(){const e=te.context.webviewUrlParams;return e?(t=e,Object.keys(t).reduce(((e,n)=>e+`&${n}=${encodeURIComponent(t[n])}`),"")):"";var t}const ie={test:"//test-extsdk.msstatic.com",prod:"//extsdk-msstatic.cdn.huya.com"};function ae(e,t){const o=y.default.join(e,"package"),i=function(e){const t=y.default.join(e,"packageConfig.json");return h.default.readJSONSync(t)}(o),a=i.findIndex((e=>{return(t=e).name===n.pkgFileType.MainPkg&&"."===t.root;var t}));if(-1===a)throw new Error("无法找到主包构建信息");const r=i[a];i.splice(a,1);const u=i;return u.length>0&&function(e,t,n,o){const i=y.default.join(e,t.name);n.forEach((t=>{const n=y.default.join(e,t.name),a=y.default.join(n,t.root),r=y.default.join(i,t.root);o&&o(n,i,t),h.default.moveSync(a,r,{overwrite:!0}),h.default.removeSync(y.default.join(e,t.name))}))}(o,r,u,t),{mainPakConf:r,packagePath:o}}function re(e,t){const n=require.resolve(t);let o=y.default.join(n,"../");"dist"===y.default.basename(o)?h.default.copySync(o,e):(o=y.default.resolve(o,"../"),o=y.default.join(o,"dist"),h.default.existsSync(o)?h.default.copySync(o,e):B.log(`Builder can't resolve ${t} entry from ${n}`))}function ue(e){const{builderConfig:t,mainPakConf:n,extUuid:o}=e;return t.supportExtTypes.map((e=>{const i=`index_${e}.html`;return{extType:e,entryPath:"package/"+n.name+"/"+i,sdkUrl:(a={extType:e,extUuid:o,hostId:t.hostId,isTestEnv:t.isTestEnv},`${a.isTestEnv?ie.test:ie.prod}/sdk/${a.extType}/${a.hostId}/${a.extUuid||0}/sdk.js`),entryFilename:i};var a}))}function se(e){!function(e){const{releasePath:t,mainPath:n,entrys:o,debug:i,dev:a,extInfo:r,builderConfig:u}=e,s=y.default.join(N,"template"),c=M===m.Integration?y.default.relative(n,t):"",l=[{input:y.default.join(s,"game-frame.hbs"),output:y.default.join(n,"game-frame.html"),data:{sourcePathPrefix:c}}];a&&l.push({input:y.default.join(s,"remote-debugger.hbs"),output:y.default.join(n,"remote-debugger.html"),data:{extInfo:r,paramsStr:oe()}});const d=o.map((e=>({input:y.default.join(s,"minigame-page-manager.hbs"),output:y.default.join(n,e.entryFilename),data:{sourcePathPrefix:c,hyextSDKUrl:e.sdkUrl,debug:i,sentryScript:a?void 0:Z,buildEnv:U,extInfo:Object.assign(Object.assign({},r),{envVersion:a?"develop":"release",extType:e.extType}),deviceOrientation:te.context.deviceOrientation,builderConfig:u}})));d.concat(l).forEach((e=>{ee(e.input,e.output,e.data)}))}(e),function(e){const t=u.sync("**/**.wasm",{cwd:e,ignore:ce,nodir:!0,absolute:!1});t.length&&console.log("transform wasm to base64 files: \n",t),t.forEach((t=>{const n=y.default.join(e,t),o=h.default.readFileSync(n).toString("base64");h.default.outputFileSync(n+".txt",o)}))}(e.mainPath)}const ce=["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"];function le(e,t,n){const o=n.name+".js",i=n.name+".js.map",a=y.default.join(e,o),r=y.default.join(e,i);h.default.existsSync(a)&&h.default.outputFileSync(y.default.join(t,o),h.default.readFileSync(a)),h.default.existsSync(r)&&h.default.outputFileSync(y.default.join(t,i),h.default.readFileSync(r))}function de(e){!function(e){const{packagePath:t,releasePath:n,mainPath:o,entrys:i,debug:a,dev:r,extInfo:u,builderConfig:s}=e,c=function(e){const t=y.default.join(e,"packageExtConfig.json");return h.default.readJSONSync(t)}(t),l=M===m.Integration?y.default.relative(o,n):"",d=JSON.stringify(c),p=[{input:y.default.join(F,"service.hbs"),output:y.default.join(o,"service.html"),data:{sourcePathPrefix:l}}];r&&p.push({input:y.default.join(F,"remote-debugger.hbs"),output:y.default.join(o,"remote-debugger.html"),data:{extInfo:u,paramsStr:oe()}});i.map((e=>({input:y.default.join(F,"miniapp-page-manager.hbs"),output:y.default.join(o,e.entryFilename),data:{sourcePathPrefix:l,packageExtConfig:d,hyextSDKUrl:e.sdkUrl,debug:a,buildEnv:U,sentryScript:Z,extInfo:Object.assign(Object.assign({},u),{envVersion:r?"develop":"release",version:"",extType:e.extType}),builderConfig:s}}))).concat(p).forEach((e=>{ee(e.input,e.output,e.data)}))}(e)}function pe(e,t,n){const o={packagePath:"",mainPath:"",releasePath:t,entrys:[],extInfo:n.extInfo,debug:n.debug,dev:n.dev,builderConfig:n.builderConfig},i=i=>{let a;return B.log("正在合并分包..."),i||function(e){const t=y.default.join(N,"framework");if(M===m.Integration){h.default.copySync(t,y.default.join(e,"framework"));const n=y.default.join(e,"sdk");h.default.mkdirSync(n),re(n,"@revues/web-sdk-core"),re(n,"@revues/web-frame"),re(n,"@revues/hyext-adapter")}}(t),"game"==e.compileType?(a=function(e,t){const n=t.builderConfig,{mainPakConf:o,packagePath:i}=ae(e),a=y.default.join(i,o.name),r=ue({builderConfig:n,mainPakConf:o,extUuid:t.extInfo.extUuid});return te.hooks.onMergedMainPackge.call({mainConf:o,mainPath:a,compileType:D.miniGame,extInfo:t.extInfo}),{packagePath:i,mainPath:a,entrys:r,mainPublicPath:"package/"+o.name}}(t,n),!i&&se(Object.assign(Object.assign({},o),a))):(a=function(e,t){const n=t.builderConfig,{mainPakConf:o,packagePath:i}=ae(e,le),a=y.default.join(i,o.name),r=ue({builderConfig:n,mainPakConf:o,extUuid:t.extInfo.extUuid});return te.hooks.onMergedMainPackge.call({mainConf:o,mainPath:a,compileType:D.miniProgram,extInfo:t.extInfo}),{entrys:r,mainPublicPath:"package/"+o.name,mainPath:a,packagePath:i}}(t,n),!i&&de(Object.assign(Object.assign({},o),a))),B.success("合并分包完成"),a};return Object.assign(Object.assign({},i(!1)),{retry:i})}class fe{apply(e){e.hooks.onSrartBefore.tap("RemoveUnlessDIrPlugin",(e=>{const{inputPath:t}=e,n=y.default.join(t,"release"),o=y.default.join(t,"dist");ge(n),ge(o)}))}}function ge(e){h.default.existsSync(e)&&h.default.removeSync(e)}var me={cert:h.default.readFileSync(y.default.join(N,"./certs/cert.pem")),key:h.default.readFileSync(y.default.join(N,"./certs/key.pem")),passphrase:""};function he(e){return w(this,void 0,void 0,(function*(){try{const t=yield k.default.get(e,{responseType:"arraybuffer"}),n=Buffer.from(t.data),o=function(e){var t;const n=e.split("?")[0],o=n.split("/"),[i,a]=null===(t=o[o.length-1])||void 0===t?void 0:t.split(".");if(null==a||""==a)throw new Error(`url:${e}格式错误,无法获取文件信息`);return{filename:i,ext:a}}(e);return`data:image/${o.ext};base64,${n.toString("base64")}`}catch(t){throw new Error(`urlToBase64 failed, url is "${e}", error msg is ${t.message}`)}}))}function ye(e,t){return w(this,void 0,void 0,(function*(){const{baseURI:n,entrys:o,outputPath:i}=t,a=y.default.join(i,"build-result"),r={},u=oe(),s=o.map((e=>{const t={type:"HTML",content:{pages:[{path:ve(e,u)}],baseURI:n}};return r[e.extType]=t,{type:e.extType,buildResult:{[e.extType]:t}}}));if("development"===e){const e=s.map((e=>h.default.outputFile(y.default.join(a,e.type+".json"),JSON.stringify(e.buildResult,null,2))));yield Promise.all(e)}return r}))}function ve(e,t){const n=e.extType;let o=e.entryPath;return n.endsWith("_h5")&&(o+="?__module_busi__=kiwi-ExtSDK"+t),o}const je=e=>{var t;const n=(()=>{const e=v.default.networkInterfaces(),t=I.default.flatten(I.default.values(e));return I.default.filter((e=>/(ipv)?4/gi.test(e.family)&&!/^127\./.test(e.address)),t)})();return n&&n.length>1&&(B.log(`检测到本机有多个 ip 地址:\n- ${n.map((e=>e.address)).join("\n- ")}`),B.log("请在 project.config.json 的 host 中指定正确的 ip"),process.exit(1)),n&&n.length<=0&&(B.log("未能找到本机 ip 地址, 本地开发 app 侧将无法加载小程序"),process.exit(1)),null===(t=n[0])||void 0===t?void 0:t.address},Pe=new Set(["app_inner_h5","web_video_com","app_panel_h5","zs_anchor_panel_h5","pc_anchor_panel","pc_panel"]);function xe(e,t){const n=Object.assign({},t);return function(e){let t=[];e&&0!==e.length?e.forEach((e=>{Pe.has(e)||t.push(e)})):B.fatal("请在project.config.json相应地方填写supportExtTypes."),t.length>0&&B.fatal(`未支持的小程序类型:${t.join("|")}.`)}(t.supportExtTypes),function(e){null==e.hostId&&(e.hostId="huyaext")}(n),"development"===e?function(e){e.https=!0,null==e.host&&(e.host=je()||""),null==e.port&&(e.port=18080)}(n):function(e){"production"===U&&(e.isTestEnv=!1)}(n),n}function be(e){return`${e.https?"https":"http"}://${e.host}:${e.port}/`}function Se(e){const t=e.appId||e.appid;return null==t||""===t?B.fatal("请填写正确的appid"):t.length>10&&B.fatal("appid错误,请登录 https://ext.huya.com/ 在您的小程序概要中查看小程序ID"),t}function ke(e){return"game"===e.compileType?"miniGame":"miniProgram"}const Ie=new class{constructor(){var e;e=te,(new ne).apply(e),(new fe).apply(e)}build(e){return w(this,void 0,void 0,(function*(){const{inputPath:t,outputPath:n,publicPath:o,projectConfig:i,config:a,extUuid:r,extName:u,extVersion:s,extVersionId:c,extLogo:l}=e,d=xe("production",a);h.default.existsSync(n)&&h.default.removeSync(n),yield h.default.copy(t,n,{overwrite:!0});const{entrys:p}=pe(i,n,{builderConfig:d,extInfo:{projectType:ke(i),hideNavigationBarTools:i.hideNavigationBarTools,extUuid:r,extName:u,extVersion:s,extVersionId:c,extLogo:yield he(l)}});return yield ye("production",{entrys:p,baseURI:o,outputPath:n})}))}start(e){var t;return w(this,void 0,void 0,(function*(){const{inputPath:n,projectConfig:o,outputPath:i,config:a}=e;te.hooks.onSrartBefore.call({inputPath:n});const r=!!o.debugWsc,u=xe("development",a),s=Se(o),c=(l=o).projectname||l.projectName||"小程序";var l;const d={hideNavigationBarTools:o.hideNavigationBarTools,extUuid:s,extName:c,projectType:ke(o),extVersion:void 0,extVersionId:void 0,extLogo:void 0};let p=e=>{};const f=(g=`${c}-${s}`,y.default.join(_,g));var g;yield function(e){return w(this,void 0,void 0,(function*(){const{projectConfig:t}=e,n=A[t.compileType];if(null==n)throw new Error("Unsupported compileType: "+String(t.compileType));yield n(e)}))}({projectConfig:o,projectPath:n,outputPath:f,cb:()=>{p(!0)}});const{entrys:m,mainPublicPath:h,retry:v}=pe(o,f,{builderConfig:u,extInfo:d,debug:r,dev:!0});return p=v,B.log("启动 live server 服务..."),B.success("本地访问地址:",be(u)+(null===(t=m[0])||void 0===t?void 0:t.entryPath)),B.success("扫码预览地址:",be(u)+h+"/remote-debugger.html"),function(e){var t={port:e.port,host:e.host,root:e.root,open:!1,ignore:e.ignore,file:"index.html",wait:1e3,mount:e.mount,logLevel:1,https:me};b.default.start(t)}(Object.assign(Object.assign({},u),{root:f,ignore:"node_modules"})),yield ye("development",{entrys:m,baseURI:be(u),outputPath:i})}))}release(e){return w(this,void 0,void 0,(function*(){const{contextPath:t,releasePath:o,projectConfig:i,zip:a=!0}=e;h.default.existsSync(o)&&h.default.removeSync(o),B.log("开始打包");const r=i.projectName||i.projectname||"project",u=y.default.join(o,r),s=i.compileType;if("game"==s?yield Y("prod",t,u):"plugin"==s?yield function(e,t){return w(this,void 0,void 0,(function*(){R(),yield n.compilerManager.init({projectPath:e,outputPath:t,cachePath:T,compileSettings:{minify:!0,autoPrefixWXSS:!0,minifyWXSS:!0}}),yield n.compilerManager.compileDevPlugin({outputPath:t,remove:!0})}))}(t,u):yield X("prod",t,u),"plugin"===s&&(yield function(e,t){return w(this,void 0,void 0,(function*(){const n=Se(t),o=y.default.join(e,C,n);h.default.existsSync(o)&&(yield h.default.copy(o,e),h.default.removeSync(y.default.join(e,C)))}))}(u,i)),a){let e=u+".zip";yield(c=u,new Promise(((e,t)=>{const n=h.default.createWriteStream(`${c}.zip`),o=S.default("zip",{zlib:{level:9}});n.on("close",(()=>{const t=o.pointer();e({name:`${y.default.basename(c)}.zip`,size:t})})),o.on("warning",(e=>{if("ENOENT"!==e.code)throw e})),o.on("error",(e=>{throw t(e),e})),o.pipe(n),o.directory(`${c}`,!1),o.finalize()}))),"plugin"===s&&(e=function(e,t,n){const o=y.default.join(t,`${Se(n)}-${n.version||"1.0.0"}.zip`);return h.default.existsSync(e)?(h.default.renameSync(e,o),o):e}(e,o,i)),B.success("打包成功,zip包地址:"+e)}else B.success("打包成功,资源包地址:"+u);var c}))}packNpm(e){return function(e){return w(this,void 0,void 0,(function*(){R();const t=e.reporter||(e=>{console.log("pack reporter",e)}),o=e.ignore||[],i={projectPath:e.projectPath,outputPath:"/mock",cachePath:T};yield n.compilerManager.init(Object.assign({},i)),yield n.compilerManager.packNpm({reporter:t,ignore:o})}))}(e)}config(){}providedProjectConfig(){}clearCache(){try{h.default.existsSync(T)&&h.default.removeSync(T),B.success("项目缓存清除成功~"),h.default.existsSync($)&&h.default.removeSync($),B.success("插件缓存清除成功~")}catch(e){B.success("缓存清除失败 \n"+e.message)}}};module.exports=Ie,exports.default=Ie;
|
21
|
+
function w(e,t,n,o){return new(n||(n=Promise))((function(i,a){function r(e){try{s(o.next(e))}catch(e){a(e)}}function u(e){try{s(o.throw(e))}catch(e){a(e)}}function s(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(r,u)}s((o=o.apply(e,t||[])).next())}))}!function(e){e[e.Integration=0]="Integration",e[e.Separate=1]="Separate"}(m||(m={}));const O=v.default.tmpdir(),T=y.default.join(O,".revue_cache"),_=y.default.join(O,".revues-projects"),C="__plugin__",U=y.default.join(_,C),$="https://hd.huya.com/h5/static-source/alex/wx-plugin",E=m.Integration,M=process.env.HYEXT_BUILD_ENV||"dev",N=y.default.resolve(__dirname,"../static"),F=y.default.join(N,"template");var D;!function(e){e.miniProgram="miniProgram",e.miniProgramPlugin="miniProgramPlugin",e.miniGame="miniGame",e.miniGamePlugin="miniGamePlugin"}(D||(D={}));const q=j.default.gray("·");var B=(e=>{e=` ${e}`;return{log(...t){const n=a.format.apply(a.format,t);console.log(j.default.white(e),q,n)},fatal(...t){t[0]instanceof Error&&(t[0]=t[0].message.trim());const n=a.format.apply(a.format,t);console.error(j.default.red(e),q,n),process.exit(1)},success(...t){const n=a.format.apply(a.format,t);console.log(j.default.green(e),q,n)}}})("REVUE");const z="project.config.json";function V(e,t){h.default.copyFileSync(y.default.join(e,z),y.default.join(t,z))}function R(){h.default.existsSync(T)||h.default.mkdirSync(T)}var J;function K(e,t){e.status=t}function G(e){return w(this,void 0,void 0,(function*(){const t=yield function(e){return w(this,void 0,void 0,(function*(){const t=["app","game","plugin"];for(let n=0;n<t.length;n++){const o=y.default.join(e,`${t[n]}.json`);if(yield h.default.exists(o))return{data:yield h.default.readJson(o),fileType:t[n]}}return null}))}(e);if(null!=t){const{data:n,fileType:o}=t;if("game"===o)return yield L(e,U,n);{const t=yield L(e,U,n);if(n.subpackages&&n.subpackages.length>0){const o=yield function(e,t){return w(this,void 0,void 0,(function*(){let n=[];for(let o=0;o<e.subpackages.length;o++){const i=e.subpackages[o];null!=i.export&&(i.export=i.rootDir+"/"+i.export);const a=yield L(t,U,i);n=n.concat(a.plugins)}return n}))}(n,e);if(o.length>0)return{plugins:[...t.plugins,...o]}}return t}}return{plugins:[]}}))}function L(e,t,n){return w(this,void 0,void 0,(function*(){const o=t,i=n.gamePlugins||n.plugins;if(null!=i){const t=Object.keys(i).map((e=>{const t=i[e];return function(e,t,n){const o=y.default.join(e,n.provider,n.version),i=Object.assign(Object.assign({},n),{key:t,id:n.provider,releasePath:y.default.join(o,n.provider),dir:o,status:J.None});return i.request=function(e,t){return`${$}/${e}-${t}.zip`}(n.provider,n.version),i}(o,e,t)}));if(t.length>0)return yield h.default.ensureDir(o),yield function(e){return w(this,void 0,void 0,(function*(){const t=e.map((e=>function(e){return w(this,void 0,void 0,(function*(){if(yield h.default.exists(e.releasePath))K(e,J.OK),A("reuse",e);else try{yield P.default(e.request,e.releasePath,{extract:!0}),K(e,J.OK),A("load success",e)}catch(t){K(e,J.Fail),A("load fail: "+t.message+"\n",e)}}))}(e)));yield Promise.all(t)}))}(t),yield function(e,t){return w(this,void 0,void 0,(function*(){let n=e.filter((e=>e.status===J.OK));const o=e.filter((e=>e.status===J.Fail));if(o.length>0){const e=function(e,t){return e.filter((e=>null!=e.path)).map((e=>(e.localDir=function(e,t){return y.default.join(e,t.path)}(t,e),A("use local plugin <projectRoot>/"+e.path,e),K(e,J.OK),e)))}(o,t);e.length>0&&(n=n.concat(e))}return{plugins:W(n)}}))}(t,e)}return{plugins:[]}}))}function W(e){return e.map((e=>{const t=e.localDir||e.releasePath,n=h.default.readJSONSync(y.default.join(t,"plugin.json"));return e.json=n,e}))}function A(e,t){B.success(`${e} provider:`+t.provider+", version:"+t.version)}function H(e,t,o){return w(this,void 0,void 0,(function*(){const i="prod"===e,a=i?{minify:!0,autoPrefixWXSS:!0,minifyWXSS:!0,es6:!0}:{},{plugins:r}=yield G(t);R(),yield n.compilerManager.init({projectPath:t,outputPath:o,cachePath:T,compileSettings:a,plugins:r,mode:e});const u=i?"compile":"compileDev";yield n.compilerManager[u](),V(t,o)}))}function X(e,t,o){return w(this,void 0,void 0,(function*(){R();const{plugins:i}=yield G(t),a={projectPath:t,outputPath:o,cachePath:T,plugins:i,mode:e,compileSettings:{minify:"prod"===e}};yield n.compilerManager.init(Object.assign({},a));const r="dev"===e?"compileDev":"compile";return yield n.compilerManager[r](),V(t,o),a}))}!function(e){e[e.Fail=-1]="Fail",e[e.None=0]="None",e[e.OK=1]="OK"}(J||(J={}));const Y={plugin:function(e){return w(this,void 0,void 0,(function*(){const{projectPath:t,outputPath:o,cb:i}=e;yield H("dev",t,o),n.compilerManager.watch({graphId:"miniprogram"},((e,t)=>w(this,void 0,void 0,(function*(){yield n.compilerManager.compileSingleCode({type:e,filePath:t,graphId:"miniprogram"}),i&&i()})))),n.compilerManager.watch({graphId:"plugin"},((e,t)=>w(this,void 0,void 0,(function*(){yield n.compilerManager.compileSingleCode({type:e,filePath:t,graphId:"plugin"}),i&&i()}))))}))},game:function(e){return w(this,void 0,void 0,(function*(){const{projectPath:t,outputPath:o,cb:i}=e,a=yield X("dev",t,o);n.compilerManager.watch({graphId:"game"},((e,t)=>w(this,void 0,void 0,(function*(){B.log("detected change:",t),B.log("recompile..."),n.compilerManager.destroy(),yield n.compilerManager.init(Object.assign({},a)),yield n.compilerManager.compileDev(!0),i&&i()}))))}))},miniprogram:function(e){return w(this,void 0,void 0,(function*(){const{projectPath:t,outputPath:o,cb:i}=e;yield H("dev",t,o),n.compilerManager.watch({graphId:"miniprogram"},((e,t)=>w(this,void 0,void 0,(function*(){yield n.compilerManager.compileSingleCode({type:e,filePath:t,graphId:"miniprogram"}),i&&i()}))))}))}};const Q=Date.now(),Z="production"!==process.env.HYEXT_BUILD_ENV?"//test-hd.huya.com/h5/hyext-sentry-setup-script/test/sentry-setup.js":`//a.msstatic.com/huya/hd/h5/hyext-sentry-setup-script/sentry-setup.js?hash=${Q}`;function ee(e,t,n){const o=h.default.readFileSync(e).toString();h.default.outputFileSync(t,function(e,t,n){return x.default.compile(e,{noEscape:!0})(t,n)}(o,n))}x.default.registerHelper("toJSON",(function(e){return new x.default.SafeString(JSON.stringify(e))}));const te={context:{deviceOrientation:"portrait"},hooks:{onMergedMainPackge:new c.SyncHook(["IOnMergedMainPackge"]),onSrartBefore:new c.SyncHook(["IOnSrartBefore"])}};class ne{apply(e){e.hooks.onMergedMainPackge.tap("InjectWebviewUrlParamsPlugin",(t=>{const{compileType:n,mainPath:o,extInfo:i}=t,a=n===D.miniGame;if(a){const t=h.default.readJsonSync(y.default.join(o,"game.json"));"string"==typeof t.deviceOrientation&&t.deviceOrientation.includes("landscape")&&(e.context.deviceOrientation="landscape")}const r=e.context.webviewUrlParams={isLandscape:0,disablePopGesture:1,hideStatusBar:a?i.hideNavigationBarTools?0:1:0,hideBar:1,bounces:0,hideloading:1};i.forceUsePatchApi&&(r.forceUsePatchApi=1)}))}}function oe(){const e=te.context.webviewUrlParams;return e?(t=e,Object.keys(t).reduce(((e,n)=>e+`&${n}=${encodeURIComponent(t[n])}`),"")):"";var t}const ie={test:"//test-extsdk.msstatic.com",prod:"//extsdk-msstatic.cdn.huya.com"};function ae(e,t){const o=y.default.join(e,"package"),i=function(e){const t=y.default.join(e,"packageConfig.json");return h.default.readJSONSync(t)}(o),a=i.findIndex((e=>{return(t=e).name===n.pkgFileType.MainPkg&&"."===t.root;var t}));if(-1===a)throw new Error("无法找到主包构建信息");const r=i[a];i.splice(a,1);const u=i;return u.length>0&&function(e,t,n,o){const i=y.default.join(e,t.name);n.forEach((t=>{const n=y.default.join(e,t.name),a=y.default.join(n,t.root),r=y.default.join(i,t.root);o&&o(n,i,t),h.default.moveSync(a,r,{overwrite:!0}),h.default.removeSync(y.default.join(e,t.name))}))}(o,r,u,t),{mainPakConf:r,packagePath:o}}function re(e,t){const n=require.resolve(t);let o=y.default.join(n,"../");"dist"===y.default.basename(o)?h.default.copySync(o,e):(o=y.default.resolve(o,"../"),o=y.default.join(o,"dist"),h.default.existsSync(o)?h.default.copySync(o,e):B.log(`Builder can't resolve ${t} entry from ${n}`))}function ue(e){const{builderConfig:t,mainPakConf:n,extUuid:o}=e;return t.supportExtTypes.map((e=>{const i=`index_${e}.html`;return{extType:e,entryPath:"package/"+n.name+"/"+i,sdkUrl:(a={extType:e,extUuid:o,hostId:t.hostId,isTestEnv:t.isTestEnv},`${a.isTestEnv?ie.test:ie.prod}/sdk/${a.extType}/${a.hostId}/${a.extUuid||0}/sdk.js`),entryFilename:i};var a}))}function se(e){!function(e){const{releasePath:t,mainPath:n,entrys:o,debug:i,dev:a,extInfo:r,builderConfig:u}=e,s=y.default.join(N,"template"),c=E===m.Integration?y.default.relative(n,t):"",l=[{input:y.default.join(s,"game-frame.hbs"),output:y.default.join(n,"game-frame.html"),data:{sourcePathPrefix:c}}];a&&l.push({input:y.default.join(s,"remote-debugger.hbs"),output:y.default.join(n,"remote-debugger.html"),data:{extInfo:r,paramsStr:oe()}});const d=o.map((e=>({input:y.default.join(s,"minigame-page-manager.hbs"),output:y.default.join(n,e.entryFilename),data:{sourcePathPrefix:c,hyextSDKUrl:e.sdkUrl,debug:i,sentryScript:a?void 0:Z,buildEnv:M,extInfo:Object.assign(Object.assign({},r),{envVersion:a?"develop":"release",extType:e.extType}),deviceOrientation:te.context.deviceOrientation,builderConfig:u}})));d.concat(l).forEach((e=>{ee(e.input,e.output,e.data)}))}(e),function(e){const t=u.sync("**/**.wasm",{cwd:e,ignore:ce,nodir:!0,absolute:!1});t.length&&console.log("transform wasm to base64 files: \n",t),t.forEach((t=>{const n=y.default.join(e,t),o=h.default.readFileSync(n).toString("base64");h.default.outputFileSync(n+".txt",o)}))}(e.mainPath)}const ce=["node_modules/**/*","**/node_modules/**","**/.git/**",".git/**/*","**/.svn/**",".svn/**/*",".DS_Store","**/.DS_Store"];function le(e,t,n){const o=n.name+".js",i=n.name+".js.map",a=y.default.join(e,o),r=y.default.join(e,i);h.default.existsSync(a)&&h.default.outputFileSync(y.default.join(t,o),h.default.readFileSync(a)),h.default.existsSync(r)&&h.default.outputFileSync(y.default.join(t,i),h.default.readFileSync(r))}function de(e){!function(e){const{packagePath:t,releasePath:n,mainPath:o,entrys:i,debug:a,dev:r,extInfo:u,builderConfig:s}=e,c=function(e){const t=y.default.join(e,"packageExtConfig.json");return h.default.readJSONSync(t)}(t),l=E===m.Integration?y.default.relative(o,n):"",d=JSON.stringify(c),p=[{input:y.default.join(F,"service.hbs"),output:y.default.join(o,"service.html"),data:{sourcePathPrefix:l}}];r&&p.push({input:y.default.join(F,"remote-debugger.hbs"),output:y.default.join(o,"remote-debugger.html"),data:{extInfo:u,paramsStr:oe()}});i.map((e=>({input:y.default.join(F,"miniapp-page-manager.hbs"),output:y.default.join(o,e.entryFilename),data:{sourcePathPrefix:l,packageExtConfig:d,hyextSDKUrl:e.sdkUrl,debug:a,buildEnv:M,sentryScript:Z,extInfo:Object.assign(Object.assign({},u),{envVersion:r?"develop":"release",version:"",extType:e.extType}),builderConfig:s}}))).concat(p).forEach((e=>{ee(e.input,e.output,e.data)}))}(e)}function pe(e,t,n){const o={packagePath:"",mainPath:"",releasePath:t,entrys:[],extInfo:n.extInfo,debug:n.debug,dev:n.dev,builderConfig:n.builderConfig},i=i=>{let a;return B.log("正在合并分包..."),i||function(e){const t=y.default.join(N,"framework");if(E===m.Integration){h.default.copySync(t,y.default.join(e,"framework"));const n=y.default.join(e,"sdk");h.default.mkdirSync(n),re(n,"@revues/web-sdk-core"),re(n,"@revues/web-frame"),re(n,"@revues/hyext-adapter")}}(t),"game"==e.compileType?(a=function(e,t){const n=t.builderConfig,{mainPakConf:o,packagePath:i}=ae(e),a=y.default.join(i,o.name),r=ue({builderConfig:n,mainPakConf:o,extUuid:t.extInfo.extUuid});return te.hooks.onMergedMainPackge.call({mainConf:o,mainPath:a,compileType:D.miniGame,extInfo:t.extInfo}),{packagePath:i,mainPath:a,entrys:r,mainPublicPath:"package/"+o.name}}(t,n),!i&&se(Object.assign(Object.assign({},o),a))):(a=function(e,t){const n=t.builderConfig,{mainPakConf:o,packagePath:i}=ae(e,le),a=y.default.join(i,o.name),r=ue({builderConfig:n,mainPakConf:o,extUuid:t.extInfo.extUuid});return te.hooks.onMergedMainPackge.call({mainConf:o,mainPath:a,compileType:D.miniProgram,extInfo:t.extInfo}),{entrys:r,mainPublicPath:"package/"+o.name,mainPath:a,packagePath:i}}(t,n),!i&&de(Object.assign(Object.assign({},o),a))),B.success("合并分包完成"),a};return Object.assign(Object.assign({},i(!1)),{retry:i})}class fe{apply(e){e.hooks.onSrartBefore.tap("RemoveUnlessDIrPlugin",(e=>{const{inputPath:t}=e,n=y.default.join(t,"release"),o=y.default.join(t,"dist");ge(n),ge(o)}))}}function ge(e){h.default.existsSync(e)&&h.default.removeSync(e)}var me={cert:h.default.readFileSync(y.default.join(N,"./certs/cert.pem")),key:h.default.readFileSync(y.default.join(N,"./certs/key.pem")),passphrase:""};function he(e){return w(this,void 0,void 0,(function*(){try{const t=yield k.default.get(e,{responseType:"arraybuffer"}),n=Buffer.from(t.data),o=function(e){var t;const n=e.split("?")[0],o=n.split("/"),[i,a]=null===(t=o[o.length-1])||void 0===t?void 0:t.split(".");if(null==a||""==a)throw new Error(`url:${e}格式错误,无法获取文件信息`);return{filename:i,ext:a}}(e);return`data:image/${o.ext};base64,${n.toString("base64")}`}catch(t){throw new Error(`urlToBase64 failed, url is "${e}", error msg is ${t.message}`)}}))}function ye(e,t){return w(this,void 0,void 0,(function*(){const{baseURI:n,entrys:o,outputPath:i}=t,a=y.default.join(i,"build-result"),r={},u=oe(),s=o.map((e=>{const t={type:"HTML",content:{pages:[{path:ve(e,u)}],baseURI:n}};return r[e.extType]=t,{type:e.extType,buildResult:{[e.extType]:t}}}));if("development"===e){const e=s.map((e=>h.default.outputFile(y.default.join(a,e.type+".json"),JSON.stringify(e.buildResult,null,2))));yield Promise.all(e)}return r}))}function ve(e,t){const n=e.extType;let o=e.entryPath;return n.endsWith("_h5")&&(o+="?__module_busi__=kiwi-ExtSDK"+t),o}const je=e=>{var t;const n=(()=>{const e=v.default.networkInterfaces(),t=I.default.flatten(I.default.values(e));return I.default.filter((e=>/(ipv)?4/gi.test(e.family)&&!/^127\./.test(e.address)),t)})();return n&&n.length>1&&(B.log(`检测到本机有多个 ip 地址:\n- ${n.map((e=>e.address)).join("\n- ")}`),B.log("请在 project.config.json 的 host 中指定正确的 ip"),process.exit(1)),n&&n.length<=0&&(B.log("未能找到本机 ip 地址, 本地开发 app 侧将无法加载小程序"),process.exit(1)),null===(t=n[0])||void 0===t?void 0:t.address},Pe=new Set(["app_inner_h5","web_video_com","app_panel_h5","zs_anchor_panel_h5","pc_anchor_panel","pc_panel"]);function xe(e,t){const n=Object.assign({},t);return function(e){let t=[];e&&0!==e.length?e.forEach((e=>{Pe.has(e)||t.push(e)})):B.fatal("请在project.config.json相应地方填写supportExtTypes."),t.length>0&&B.fatal(`未支持的小程序类型:${t.join("|")}.`)}(t.supportExtTypes),function(e){null==e.hostId&&(e.hostId="huyaext")}(n),"development"===e?function(e){e.https=!0,null==e.host&&(e.host=je()||""),null==e.port&&(e.port=18080)}(n):function(e){"production"===M&&(e.isTestEnv=!1)}(n),n}function be(e){return`${e.https?"https":"http"}://${e.host}:${e.port}/`}function Se(e){const t=e.appId||e.appid;return null==t||""===t?B.fatal("请填写正确的appid"):t.length>10&&B.fatal("appid错误,请登录 https://ext.huya.com/ 在您的小程序概要中查看小程序ID"),t}function ke(e){return"game"===e.compileType?"miniGame":"miniProgram"}const Ie=new class{constructor(){var e;e=te,(new ne).apply(e),(new fe).apply(e)}build(e){return w(this,void 0,void 0,(function*(){const{inputPath:t,outputPath:n,publicPath:o,projectConfig:i,config:a,extUuid:r,extName:u,extVersion:s,extVersionId:c,extLogo:l}=e,d=xe("production",a);h.default.existsSync(n)&&h.default.removeSync(n),yield h.default.copy(t,n,{overwrite:!0});const{entrys:p}=pe(i,n,{builderConfig:d,extInfo:{forceUsePatchApi:i.forceUsePatchApi,projectType:ke(i),hideNavigationBarTools:i.hideNavigationBarTools,extUuid:r,extName:u,extVersion:s,extVersionId:c,extLogo:yield he(l)}});return yield ye("production",{entrys:p,baseURI:o,outputPath:n})}))}start(e){var t;return w(this,void 0,void 0,(function*(){const{inputPath:n,projectConfig:o,outputPath:i,config:a}=e;te.hooks.onSrartBefore.call({inputPath:n});const r=!!o.debugWsc,u=xe("development",a),s=Se(o),c=(l=o).projectname||l.projectName||"小程序";var l;const d={hideNavigationBarTools:o.hideNavigationBarTools,forceUsePatchApi:o.forceUsePatchApi,extUuid:s,extName:c,projectType:ke(o),extVersion:void 0,extVersionId:void 0,extLogo:void 0};let p=e=>{};const f=(g=`${c}-${s}`,y.default.join(_,g));var g;yield function(e){return w(this,void 0,void 0,(function*(){const{projectConfig:t}=e,n=Y[t.compileType];if(null==n)throw new Error("Unsupported compileType: "+String(t.compileType));yield n(e)}))}({projectConfig:o,projectPath:n,outputPath:f,cb:()=>{p(!0)}});const{entrys:m,mainPublicPath:h,retry:v}=pe(o,f,{builderConfig:u,extInfo:d,debug:r,dev:!0});return p=v,B.log("启动 live server 服务..."),B.success("本地访问地址:",be(u)+(null===(t=m[0])||void 0===t?void 0:t.entryPath)),B.success("扫码预览地址:",be(u)+h+"/remote-debugger.html"),function(e){var t={port:e.port,host:e.host,root:e.root,open:!1,ignore:e.ignore,file:"index.html",wait:1e3,mount:e.mount,logLevel:1,https:me};b.default.start(t)}(Object.assign(Object.assign({},u),{root:f,ignore:"node_modules"})),yield ye("development",{entrys:m,baseURI:be(u),outputPath:i})}))}release(e){return w(this,void 0,void 0,(function*(){const{contextPath:t,releasePath:o,projectConfig:i,zip:a=!0}=e;h.default.existsSync(o)&&h.default.removeSync(o),B.log("开始打包");const r=i.projectName||i.projectname||"project",u=y.default.join(o,r),s=i.compileType;if("game"==s?yield X("prod",t,u):"plugin"==s?yield function(e,t){return w(this,void 0,void 0,(function*(){R(),yield n.compilerManager.init({projectPath:e,outputPath:t,cachePath:T,compileSettings:{minify:!0,autoPrefixWXSS:!0,minifyWXSS:!0}}),yield n.compilerManager.compileDevPlugin({outputPath:t,remove:!0})}))}(t,u):yield H("prod",t,u),"plugin"===s&&(yield function(e,t){return w(this,void 0,void 0,(function*(){const n=Se(t),o=y.default.join(e,C,n);h.default.existsSync(o)&&(yield h.default.copy(o,e),h.default.removeSync(y.default.join(e,C)))}))}(u,i)),a){let e=u+".zip";yield(c=u,new Promise(((e,t)=>{const n=h.default.createWriteStream(`${c}.zip`),o=S.default("zip",{zlib:{level:9}});n.on("close",(()=>{const t=o.pointer();e({name:`${y.default.basename(c)}.zip`,size:t})})),o.on("warning",(e=>{if("ENOENT"!==e.code)throw e})),o.on("error",(e=>{throw t(e),e})),o.pipe(n),o.directory(`${c}`,!1),o.finalize()}))),"plugin"===s&&(e=function(e,t,n){const o=y.default.join(t,`${Se(n)}-${n.version||"1.0.0"}.zip`);return h.default.existsSync(e)?(h.default.renameSync(e,o),o):e}(e,o,i)),B.success("打包成功,zip包地址:"+e)}else B.success("打包成功,资源包地址:"+u);var c}))}packNpm(e){return function(e){return w(this,void 0,void 0,(function*(){R();const t=e.reporter||(e=>{console.log("pack reporter",e)}),o=e.ignore||[],i={projectPath:e.projectPath,outputPath:"/mock",cachePath:T};yield n.compilerManager.init(Object.assign({},i)),yield n.compilerManager.packNpm({reporter:t,ignore:o})}))}(e)}config(){}providedProjectConfig(){}clearCache(){try{h.default.existsSync(T)&&h.default.removeSync(T),B.success("项目缓存清除成功~"),h.default.existsSync(U)&&h.default.removeSync(U),B.success("插件缓存清除成功~")}catch(e){B.success("缓存清除失败 \n"+e.message)}}};module.exports=Ie,exports.default=Ie;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@hyext/builder-revues",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.40",
|
4
4
|
"description": "> TODO: description",
|
5
5
|
"author": "loler",
|
6
6
|
"homepage": "",
|
@@ -24,11 +24,11 @@
|
|
24
24
|
"minify": "node scripts/minify"
|
25
25
|
},
|
26
26
|
"dependencies": {
|
27
|
-
"@revues/cocos-web-adapter": "1.0.
|
28
|
-
"@revues/code-compiler": "1.0.
|
29
|
-
"@revues/hyext-adapter": "1.0.
|
30
|
-
"@revues/web-frame": "1.0.
|
31
|
-
"@revues/web-sdk-core": "1.0.
|
27
|
+
"@revues/cocos-web-adapter": "1.0.40",
|
28
|
+
"@revues/code-compiler": "1.0.40",
|
29
|
+
"@revues/hyext-adapter": "1.0.40",
|
30
|
+
"@revues/web-frame": "1.0.40",
|
31
|
+
"@revues/web-sdk-core": "1.0.40",
|
32
32
|
"archiver": "^7.0.1",
|
33
33
|
"axios": "^1.7.1",
|
34
34
|
"chalk": "^2.4.2",
|
@@ -47,5 +47,5 @@
|
|
47
47
|
"@types/ramda": "^0.29.11",
|
48
48
|
"terser": "^5.31.0"
|
49
49
|
},
|
50
|
-
"gitHead": "
|
50
|
+
"gitHead": "e9dab6a836e26ffc93f123b5f87f0351eaae05fa"
|
51
51
|
}
|