@ttmg/cli 0.3.2-beta.7 → 0.3.2-beta.9

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.
Files changed (30) hide show
  1. package/dist/index.js +6552 -8
  2. package/dist/index.js.map +1 -1
  3. package/dist/package.json +5 -2
  4. package/dist/public/assets/{index-CW9D9cbx.js → index-B7gDE9jg.js} +1 -1
  5. package/dist/public/assets/{index-C0C36jb2.js → index-BGB_3rmy.js} +5 -5
  6. package/dist/public/assets/index-BGB_3rmy.js.br +0 -0
  7. package/dist/public/assets/{index-uov949jQ.js → index-BGxy8aq-.js} +1 -1
  8. package/dist/public/assets/index-BGxy8aq-.js.br +0 -0
  9. package/dist/public/assets/{index-BkVEWAPY.js → index-Be7GH3NR.js} +1 -1
  10. package/dist/public/assets/{index-DqL2KSXM.js → index-C-hKdJe4.js} +1 -1
  11. package/dist/public/assets/{index-B6sOtD-C.js → index-CZeMe3yb.js} +1 -1
  12. package/dist/public/assets/index-CZeMe3yb.js.br +0 -0
  13. package/dist/public/assets/{index-GteNW6eR.js → index-DCvzzS3c.js} +1 -1
  14. package/dist/public/assets/index-DCvzzS3c.js.br +0 -0
  15. package/dist/public/assets/{index-Dg2qShwB.js → index-DTYGiGBE.js} +1 -1
  16. package/dist/public/assets/{index-DwEKoL_q.js → index-DZh72DCT.js} +1 -1
  17. package/dist/public/assets/{index-DQ4KFxPV.js → index-NjsKimh-.js} +1 -1
  18. package/dist/public/assets/{index-DfNs0hDP.js → index-dPxUjVAV.js} +1 -1
  19. package/dist/public/assets/index-sz2rmYug.js +1 -0
  20. package/dist/public/index.html +1 -1
  21. package/dist/scripts/build.js +6 -0
  22. package/dist/scripts/test-protocol.js +29 -0
  23. package/dist/scripts/test-regression.js +94 -0
  24. package/dist/scripts/test-regression.ts +93 -0
  25. package/package.json +5 -2
  26. package/dist/public/assets/index-B6sOtD-C.js.br +0 -0
  27. package/dist/public/assets/index-C0C36jb2.js.br +0 -0
  28. package/dist/public/assets/index-CaSOlQza.js +0 -1
  29. package/dist/public/assets/index-GteNW6eR.js.br +0 -0
  30. package/dist/public/assets/index-uov949jQ.js.br +0 -0
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ttmg/cli",
3
- "version": "0.3.2-beta.7",
3
+ "version": "0.3.2-beta.9",
4
4
  "description": "TikTok Mini Game Command Line Tool",
5
5
  "license": "ISC",
6
6
  "bin": {
@@ -13,7 +13,8 @@
13
13
  "prepublish": "npm run build",
14
14
  "build": "node scripts/build.js",
15
15
  "setup": "node scripts/setup.js",
16
- "reset:local-state": "node scripts/resetLocalState.js"
16
+ "reset:local-state": "node scripts/resetLocalState.js",
17
+ "dev:link": "npm run build && npm link"
17
18
  },
18
19
  "keywords": [
19
20
  "TTMG",
@@ -40,6 +41,7 @@
40
41
  "glob": "^11.0.3",
41
42
  "got": "^11.8.5",
42
43
  "handlebars": "4.7.8",
44
+ "https-proxy-agent": "^5.0.1",
43
45
  "inquirer": "^12.7.0",
44
46
  "jsdom": "^26.1.0",
45
47
  "mime-types": "^3.0.1",
@@ -50,6 +52,7 @@
50
52
  "prettier": "^3.6.2",
51
53
  "qs": "6.12.1",
52
54
  "semver": "^7.7.2",
55
+ "socks-proxy-agent": "^9.0.0",
53
56
  "ttmg-pack": "0.4.3",
54
57
  "ws": "^8.18.3"
55
58
  },
@@ -1 +1 @@
1
- import{j as e,e as k,i as s,r as h,y as x,T as i,z as g,A as j,d as p,u,f as y}from"./index-C0C36jb2.js";const f=({engine:n})=>e.jsxs("div",{children:[e.jsx("strong",{className:"check-code-banner-section-title",children:s("pkgSizeCheckDesc")}),e.jsx("div",{className:"check-code-banner-section-desc",style:{marginBottom:4},children:e.jsx("div",{children:n==="unity"?s("unityPkgSizeCheckDescTip",{projectSize:"60MB"}):s("commonPkgSizeCheckDescTip",{projectSize:"30MB",mainPackageSize:"4MB",independentPackageSize:"4MB"})})}),e.jsx("strong",{className:"check-code-banner-section-title",children:s("mandatoryApiCheck")}),e.jsx("div",{className:"check-code-banner-section-desc",children:s("mandatoryApiCheckDesc")}),e.jsx("strong",{className:"check-code-banner-section-title",children:s("configFileCheck")}),e.jsx("div",{className:"check-code-banner-section-desc",children:e.jsxs("div",{children:[e.jsx("code",{children:"game.json"}),":",s("gameJsonCheckDesc")]})})]}),C=({engine:n})=>e.jsx(k,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:e.jsx(f,{engine:n}),type:"info"}),S=n=>{const{result:l}=n,a=l.every(c=>c?.passed),[t,r]=h.useState(!1);return e.jsxs("div",{className:"check-result-group",children:[a?e.jsxs("div",{className:"check-result-title",children:[e.jsx(x,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(i.Text,{style:{color:"#4CAF50",fontSize:20},children:s("checkConfigPassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(g,{style:{color:"#F44336",marginRight:4}}),e.jsx(i.Text,{style:{color:"#F44336",fontSize:20},children:s("checkConfigFailed")})]}),e.jsxs("div",{style:{paddingBottom:24,position:"relative"},children:[e.jsx(j,{style:{marginBottom:12},collapseHeight:150,isOpen:t,children:l.map((c,d)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(p,{color:c?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:c?.file}),e.jsx(i.Text,{style:{fontSize:14,color:c?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:c?.msg})]},d))}),t?e.jsx(i.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:s("closeCheckDetail")}):e.jsx(i.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:s("expandCheckDetail")})]})]})},z={project:s("gameProject"),main_package:s("gameMainPackage"),independent_package:s("independentPackage")},v=n=>{const{result:l}=n,a=l.every(t=>t?.passed);return e.jsxs("div",{className:"check-result-group",children:[a?e.jsxs("div",{className:"check-result-title",children:[e.jsx(x,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(i.Text,{style:{color:"#4CAF50",fontSize:20},children:s("checkPkgSizePassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(g,{style:{color:"#F44336",marginRight:4,fontSize:20}}),e.jsx(i.Text,{style:{color:"#F44336",fontSize:20},children:s("checkPkgSizeFailed")})]}),l.map((t,r)=>e.jsxs("div",{className:"check-result-item",children:[e.jsxs(p,{color:t?.passed?"green":"red",style:{marginRight:8},children:[z[t.dimension],t.dimension==="independent_package"?`: ${t.name}`:""]}),e.jsx(i.Text,{style:{fontSize:14,color:t?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:t?.msg})]},r))]})},N=n=>{const{result:l}=n,a=l.every(c=>c?.passed),[t,r]=h.useState(!1);return e.jsxs("div",{className:"check-result-group",children:[a?e.jsxs("div",{className:"check-result-title",children:[e.jsx(x,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(i.Text,{style:{color:"#4CAF50",fontSize:20},children:s("checkApiSuccess")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(g,{style:{color:"#F44336",marginRight:4}}),e.jsx(i.Text,{style:{color:"#F44336",fontSize:20},children:s("checkApiFailed")})]}),e.jsxs("div",{style:{position:"relative"},children:[e.jsx(j,{style:{marginBottom:12},collapseHeight:150,isOpen:t,children:l.map((c,d)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(p,{color:c?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:c?.name}),e.jsxs(i.Text,{style:{fontSize:14,color:c?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:[s(c?.name),c?.passed?s("integrated"):s("notIntegrated")]})]},d))}),t?e.jsx(i.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:s("closeCheckDetail")}):e.jsx(i.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:s("expandCheckDetail")})]})]})},R=()=>{const[n,l]=h.useState([]),[a,t]=h.useState(!1),{state:{engine:r}}=u();h.useEffect(()=>{y({url:"/game/check",method:"GET"}).then(o=>{l(o?.data||[])}).catch(()=>{t(!0)})},[]);const c=n.filter(o=>o?.type==="config"),d=n.filter(o=>o?.type==="size"),m=n.filter(o=>o?.type==="api");return e.jsxs("div",{style:{height:"100%",overflow:"auto"},children:[e.jsx(C,{engine:r}),e.jsx(v,{result:d}),e.jsx(N,{result:m}),e.jsx(S,{result:c})]})};export{R as CheckCode};
1
+ import{j as e,e as k,i as s,r as h,y as x,T as i,z as g,A as j,d as p,u,f as y}from"./index-BGB_3rmy.js";const f=({engine:n})=>e.jsxs("div",{children:[e.jsx("strong",{className:"check-code-banner-section-title",children:s("pkgSizeCheckDesc")}),e.jsx("div",{className:"check-code-banner-section-desc",style:{marginBottom:4},children:e.jsx("div",{children:n==="unity"?s("unityPkgSizeCheckDescTip",{projectSize:"60MB"}):s("commonPkgSizeCheckDescTip",{projectSize:"30MB",mainPackageSize:"4MB",independentPackageSize:"4MB"})})}),e.jsx("strong",{className:"check-code-banner-section-title",children:s("mandatoryApiCheck")}),e.jsx("div",{className:"check-code-banner-section-desc",children:s("mandatoryApiCheckDesc")}),e.jsx("strong",{className:"check-code-banner-section-title",children:s("configFileCheck")}),e.jsx("div",{className:"check-code-banner-section-desc",children:e.jsxs("div",{children:[e.jsx("code",{children:"game.json"}),":",s("gameJsonCheckDesc")]})})]}),C=({engine:n})=>e.jsx(k,{style:{marginBottom:32},fullMode:!1,icon:null,closeIcon:null,description:e.jsx(f,{engine:n}),type:"info"}),S=n=>{const{result:l}=n,a=l.every(c=>c?.passed),[t,r]=h.useState(!1);return e.jsxs("div",{className:"check-result-group",children:[a?e.jsxs("div",{className:"check-result-title",children:[e.jsx(x,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(i.Text,{style:{color:"#4CAF50",fontSize:20},children:s("checkConfigPassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(g,{style:{color:"#F44336",marginRight:4}}),e.jsx(i.Text,{style:{color:"#F44336",fontSize:20},children:s("checkConfigFailed")})]}),e.jsxs("div",{style:{paddingBottom:24,position:"relative"},children:[e.jsx(j,{style:{marginBottom:12},collapseHeight:150,isOpen:t,children:l.map((c,d)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(p,{color:c?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:c?.file}),e.jsx(i.Text,{style:{fontSize:14,color:c?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:c?.msg})]},d))}),t?e.jsx(i.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:s("closeCheckDetail")}):e.jsx(i.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:s("expandCheckDetail")})]})]})},z={project:s("gameProject"),main_package:s("gameMainPackage"),independent_package:s("independentPackage")},v=n=>{const{result:l}=n,a=l.every(t=>t?.passed);return e.jsxs("div",{className:"check-result-group",children:[a?e.jsxs("div",{className:"check-result-title",children:[e.jsx(x,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(i.Text,{style:{color:"#4CAF50",fontSize:20},children:s("checkPkgSizePassed")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(g,{style:{color:"#F44336",marginRight:4,fontSize:20}}),e.jsx(i.Text,{style:{color:"#F44336",fontSize:20},children:s("checkPkgSizeFailed")})]}),l.map((t,r)=>e.jsxs("div",{className:"check-result-item",children:[e.jsxs(p,{color:t?.passed?"green":"red",style:{marginRight:8},children:[z[t.dimension],t.dimension==="independent_package"?`: ${t.name}`:""]}),e.jsx(i.Text,{style:{fontSize:14,color:t?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:t?.msg})]},r))]})},N=n=>{const{result:l}=n,a=l.every(c=>c?.passed),[t,r]=h.useState(!1);return e.jsxs("div",{className:"check-result-group",children:[a?e.jsxs("div",{className:"check-result-title",children:[e.jsx(x,{style:{color:"#4CAF50",marginRight:4,fontSize:20}}),e.jsx(i.Text,{style:{color:"#4CAF50",fontSize:20},children:s("checkApiSuccess")})]}):e.jsxs("div",{className:"check-result-title",children:[e.jsx(g,{style:{color:"#F44336",marginRight:4}}),e.jsx(i.Text,{style:{color:"#F44336",fontSize:20},children:s("checkApiFailed")})]}),e.jsxs("div",{style:{position:"relative"},children:[e.jsx(j,{style:{marginBottom:12},collapseHeight:150,isOpen:t,children:l.map((c,d)=>e.jsxs("div",{className:"check-result-item",children:[e.jsx(p,{color:c?.passed?"green":"red",style:{marginRight:8,flexShrink:0},children:c?.name}),e.jsxs(i.Text,{style:{fontSize:14,color:c?.passed?"rgba(0, 0, 0, 0.65)":"red"},children:[s(c?.name),c?.passed?s("integrated"):s("notIntegrated")]})]},d))}),t?e.jsx(i.Text,{style:{color:"grey",cursor:"pointer",fontSize:14,width:"100%",display:"block",alignItems:"center",justifyContent:"center",textAlign:"center"},onClick:()=>r(!1),children:s("closeCheckDetail")}):e.jsx(i.Text,{style:{color:"grey"},className:"show-more-text-btn",onClick:()=>r(!0),children:s("expandCheckDetail")})]})]})},R=()=>{const[n,l]=h.useState([]),[a,t]=h.useState(!1),{state:{engine:r}}=u();h.useEffect(()=>{y({url:"/game/check",method:"GET"}).then(o=>{l(o?.data||[])}).catch(()=>{t(!0)})},[]);const c=n.filter(o=>o?.type==="config"),d=n.filter(o=>o?.type==="size"),m=n.filter(o=>o?.type==="api");return e.jsxs("div",{style:{height:"100%",overflow:"auto"},children:[e.jsx(C,{engine:r}),e.jsx(v,{result:d}),e.jsx(N,{result:m}),e.jsx(S,{result:c})]})};export{R as CheckCode};