@lovrabet/rabetbase-cli 2.0.5 → 2.0.7

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 (145) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/logout.js +1 -1
  11. package/lib/cli-flags.js +1 -1
  12. package/lib/cli.js +1 -1
  13. package/lib/commands/api/doc.js +1 -1
  14. package/lib/commands/api/index.js +1 -1
  15. package/lib/commands/api/list.js +1 -1
  16. package/lib/commands/api/pull.js +1 -1
  17. package/lib/commands/api/shared.js +1 -1
  18. package/lib/commands/app/add.js +1 -1
  19. package/lib/commands/app/index.js +1 -1
  20. package/lib/commands/app/list.js +1 -1
  21. package/lib/commands/app/remote.js +1 -1
  22. package/lib/commands/app/remove.js +1 -1
  23. package/lib/commands/app/shared.js +1 -1
  24. package/lib/commands/app/use.js +1 -1
  25. package/lib/commands/auth/index.js +1 -1
  26. package/lib/commands/bff/delete.js +1 -1
  27. package/lib/commands/bff/detail.js +1 -1
  28. package/lib/commands/bff/index.js +1 -1
  29. package/lib/commands/bff/list.js +1 -1
  30. package/lib/commands/bff/new.js +1 -1
  31. package/lib/commands/bff/pull.js +1 -1
  32. package/lib/commands/bff/push.js +1 -1
  33. package/lib/commands/bff/status.js +1 -1
  34. package/lib/commands/cli-update.js +1 -1
  35. package/lib/commands/codegen/index.js +1 -1
  36. package/lib/commands/codegen/sdk.js +1 -1
  37. package/lib/commands/codegen/sql.js +1 -1
  38. package/lib/commands/common/app-selector.js +1 -1
  39. package/lib/commands/common/flags.js +1 -1
  40. package/lib/commands/common/validate.js +1 -1
  41. package/lib/commands/config/get.js +1 -1
  42. package/lib/commands/config/index.js +1 -1
  43. package/lib/commands/config/list.js +1 -1
  44. package/lib/commands/config/set.js +1 -1
  45. package/lib/commands/config/shared.js +1 -1
  46. package/lib/commands/dataset/detail.js +1 -1
  47. package/lib/commands/dataset/index.js +1 -1
  48. package/lib/commands/dataset/links.js +1 -1
  49. package/lib/commands/dataset/list.js +1 -1
  50. package/lib/commands/dataset/operations.js +1 -1
  51. package/lib/commands/doctor.js +1 -1
  52. package/lib/commands/init/index.js +1 -1
  53. package/lib/commands/logs/index.js +1 -1
  54. package/lib/commands/menu/index.js +1 -1
  55. package/lib/commands/menu/shared/compare-table.js +1 -1
  56. package/lib/commands/menu/shared/index.js +1 -1
  57. package/lib/commands/menu/shared/inquirer.js +1 -1
  58. package/lib/commands/menu/shared/local-pages.js +1 -1
  59. package/lib/commands/menu/shared/logic.js +1 -1
  60. package/lib/commands/menu/shared/service.js +1 -1
  61. package/lib/commands/menu/shared/sync-core.js +1 -1
  62. package/lib/commands/menu/shared/update-core.js +1 -1
  63. package/lib/commands/menu/shared/valid-url.js +1 -1
  64. package/lib/commands/menu/sync.js +1 -1
  65. package/lib/commands/menu/update.js +1 -1
  66. package/lib/commands/project/create/enhanced-guided-create.js +1 -0
  67. package/lib/commands/project/create/format-elapsed.js +1 -0
  68. package/lib/commands/project/create/main.js +1 -0
  69. package/lib/commands/project/create/non-interactive.js +1 -0
  70. package/lib/commands/project/create/project-template-path.js +1 -0
  71. package/lib/commands/project/create/use-copy-project-template.js +1 -0
  72. package/lib/commands/project/create/use-format-code.js +1 -0
  73. package/lib/commands/project/create/use-install-dependencies.js +1 -0
  74. package/lib/commands/project/index.js +1 -1
  75. package/lib/commands/project/init.js +1 -0
  76. package/lib/commands/project/upgrade.js +1 -0
  77. package/lib/commands/registry.js +1 -1
  78. package/lib/commands/run/index.js +1 -1
  79. package/lib/commands/skill/index.js +1 -1
  80. package/lib/commands/sql/detail.js +1 -1
  81. package/lib/commands/sql/exec.js +1 -1
  82. package/lib/commands/sql/index.js +1 -1
  83. package/lib/commands/sql/list.js +1 -1
  84. package/lib/commands/sql/save.js +1 -1
  85. package/lib/commands/sql/validate.js +1 -1
  86. package/lib/constant/cli.js +1 -1
  87. package/lib/constant/domain.js +1 -1
  88. package/lib/constant/env.js +1 -1
  89. package/lib/context.js +1 -1
  90. package/lib/core/alias-resolver.js +1 -1
  91. package/lib/core/api-client.js +1 -1
  92. package/lib/core/bff/config.js +1 -1
  93. package/lib/core/bff/file-system.js +1 -1
  94. package/lib/core/bff/hash.js +1 -1
  95. package/lib/core/bff/lock.js +1 -1
  96. package/lib/core/bff/utils.js +1 -1
  97. package/lib/core/db-resolver.js +1 -1
  98. package/lib/core/sql-validator.js +1 -1
  99. package/lib/errors.js +1 -1
  100. package/lib/framework/flags.js +1 -1
  101. package/lib/framework/help.js +1 -1
  102. package/lib/framework/index.js +1 -1
  103. package/lib/framework/output.js +1 -1
  104. package/lib/framework/response.js +1 -1
  105. package/lib/framework/runner.js +1 -1
  106. package/lib/framework/types.js +1 -1
  107. package/lib/generated/build-info.js +1 -1
  108. package/lib/help.js +1 -1
  109. package/lib/skills/main.js +1 -1
  110. package/lib/skills/npx-skills-add.js +1 -1
  111. package/lib/telemetry/cli-command-trace.js +1 -1
  112. package/lib/telemetry/cli-help-trace.js +1 -1
  113. package/lib/telemetry/ensure-cli-otel-config.js +1 -1
  114. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  115. package/lib/telemetry/send-cli-trace-log.js +1 -1
  116. package/lib/utils/ai_config.js +1 -1
  117. package/lib/utils/cdn-config.js +1 -1
  118. package/lib/utils/check-sdk-version.js +1 -1
  119. package/lib/utils/cli-version-check.js +1 -1
  120. package/lib/utils/config.js +1 -1
  121. package/lib/utils/copy-directory.js +1 -1
  122. package/lib/utils/file-utils.js +1 -1
  123. package/lib/utils/guides-cdn.js +1 -1
  124. package/lib/utils/http-client.js +1 -1
  125. package/lib/utils/is-non-interactive.js +1 -1
  126. package/lib/utils/logger.js +1 -1
  127. package/lib/utils/platform.js +1 -1
  128. package/lib/utils/rules-cdn.js +1 -1
  129. package/lib/utils/sleep.js +1 -1
  130. package/lib/utils/template-replacer.js +1 -1
  131. package/lib/utils/version.js +1 -1
  132. package/lib/utils/with-active-cookie.js +1 -1
  133. package/package.json +1 -1
  134. package/lib/commands/build.js +0 -1
  135. package/lib/commands/preview.js +0 -1
  136. package/lib/commands/project-upgrade.js +0 -1
  137. package/lib/commands/start.js +0 -1
  138. package/lib/create-app/enhanced-guided-create.js +0 -1
  139. package/lib/create-app/format-elapsed.js +0 -1
  140. package/lib/create-app/main.js +0 -1
  141. package/lib/create-app/non-interactive.js +0 -1
  142. package/lib/create-app/use-copy-project-template.js +0 -1
  143. package/lib/create-app/use-format-code.js +0 -1
  144. package/lib/create-app/use-install-dependencies.js +0 -1
  145. package/lib/init/main.js +0 -1
@@ -1 +1 @@
1
- (function(_0x317371,_0x33e92e){const _0x5e7ae6=a55_0x5e2b,_0x4c0b20=_0x317371();while(!![]){try{const _0x1f208e=-parseInt(_0x5e7ae6(0x1ad))/0x1+-parseInt(_0x5e7ae6(0x1a8))/0x2*(-parseInt(_0x5e7ae6(0x1a4))/0x3)+parseInt(_0x5e7ae6(0x1ae))/0x4*(-parseInt(_0x5e7ae6(0x1a7))/0x5)+parseInt(_0x5e7ae6(0x1b6))/0x6*(-parseInt(_0x5e7ae6(0x1a9))/0x7)+-parseInt(_0x5e7ae6(0x1b3))/0x8*(parseInt(_0x5e7ae6(0x1b0))/0x9)+parseInt(_0x5e7ae6(0x1af))/0xa*(parseInt(_0x5e7ae6(0x19f))/0xb)+parseInt(_0x5e7ae6(0x1ac))/0xc;if(_0x1f208e===_0x33e92e)break;else _0x4c0b20['push'](_0x4c0b20['shift']());}catch(_0x2dd7f7){_0x4c0b20['push'](_0x4c0b20['shift']());}}}(a55_0x1463,0x2b741));function a55_0x1463(){const _0x2b4842=['local','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','66ZhUEGh','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','\x20\x20\x20\x20CSS:\x20','test','183azsgGk','path','\x20\x20Affected\x20menus:\x20','21590AWqsyR','1388HoGzzj','48013VuXeav','label','\x20\x20\x20\x20JS:\x20\x20','5350152vtkDZe','61046cuvwdi','284qjXDcD','539770sOoIaQ','2150973PPTrmx','join','max','8RgJCPB','length','(unchanged)','24UkVdzk','push','\x20\x20No\x20pages\x20to\x20sync.','Menu\x20Name','repeat'];a55_0x1463=function(){return _0x2b4842;};return a55_0x1463();}function strWidth(_0x1579f1){const _0x19ea0c=a55_0x5e2b;let _0x376ec3=0x0;for(const _0x4c4aae of _0x1579f1){_0x376ec3+=/[\u4e00-\u9fa5]/[_0x19ea0c(0x1a3)](_0x4c4aae)?0x2:0x1;}return _0x376ec3;}function a55_0x5e2b(_0x594d50,_0x36c41a){_0x594d50=_0x594d50-0x19b;const _0x1463e3=a55_0x1463();let _0x5e2ba2=_0x1463e3[_0x594d50];return _0x5e2ba2;}function padRight(_0x2b7ddd,_0x44c511){const _0x305289=a55_0x5e2b,_0x403193=strWidth(_0x2b7ddd);return _0x2b7ddd+'\x20'[_0x305289(0x19c)](Math[_0x305289(0x1b2)](0x0,_0x44c511-_0x403193));}export function renderCompareTable(_0x488620,_0x25df11={}){const _0x55405e=a55_0x5e2b;if(_0x488620['length']===0x0)return'';const _0x3c9971=_0x25df11['showOnline']??!![],_0x2d5fa0=Math[_0x55405e(0x1b2)](0x1e,..._0x488620['map'](_0x51128a=>strWidth(_0x51128a[_0x55405e(0x1aa)]))),_0xd72f4a=0x4,_0x1a8c08=[],_0x25e16e='\x20\x20'+padRight(_0x55405e(0x19b),_0x2d5fa0),_0x3f7b01=padRight('Local',_0xd72f4a),_0x40f44c=_0x3c9971?'\x20\x20'+padRight('Platform',_0xd72f4a):'';_0x1a8c08[_0x55405e(0x1b7)](_0x25e16e+'\x20\x20'+_0x3f7b01+(_0x3c9971?_0x40f44c:'')),_0x1a8c08[_0x55405e(0x1b7)]('\x20\x20'+'─'[_0x55405e(0x19c)](_0x2d5fa0)+'\x20\x20'+'─'[_0x55405e(0x19c)](_0xd72f4a)+(_0x3c9971?'\x20\x20'+'─'['repeat'](_0xd72f4a):''));for(const _0x3dbc54 of _0x488620){const _0x3e0f38=padRight(_0x3dbc54[_0x55405e(0x1aa)],_0x2d5fa0),_0x1da174=_0x3dbc54[_0x55405e(0x19d)]?'✓':'✗',_0x3b6a96=padRight(_0x1da174,_0xd72f4a);let _0x48441e='\x20\x20'+_0x3e0f38+'\x20\x20'+_0x3b6a96;if(_0x3c9971){const _0x47cc2d=_0x3dbc54['online']?'✓':'✗';_0x48441e+='\x20\x20'+padRight(_0x47cc2d,_0xd72f4a);}_0x1a8c08['push'](_0x48441e);}return _0x1a8c08[_0x55405e(0x1b1)]('\x0a');}export function renderSyncSummary(_0x27110c,_0x4b3260){const _0x519a2d=a55_0x5e2b;if(_0x27110c[_0x519a2d(0x1b4)]===0x0)return _0x4b3260?_0x519a2d(0x19e):_0x519a2d(0x1b8);const _0x38b806=['\x20\x20'+_0x27110c[_0x519a2d(0x1b4)]+_0x519a2d(0x1a0)];for(const _0x53c9a8 of _0x27110c){_0x38b806[_0x519a2d(0x1b7)]('\x20\x20\x20\x20•\x20'+_0x53c9a8[_0x519a2d(0x1aa)]+'\x20('+_0x53c9a8[_0x519a2d(0x1a5)]+')');}return _0x38b806[_0x519a2d(0x1b1)]('\x0a');}export function renderUpdateSummary(_0x2515aa,_0x4fb9ca){const _0x4d7113=a55_0x5e2b;if(_0x2515aa[_0x4d7113(0x1b4)]===0x0)return'\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.';const _0x47f6b9=['\x20\x20'+_0x2515aa['length']+_0x4d7113(0x1a1),_0x4d7113(0x1ab)+(_0x4fb9ca[0x0]??_0x4d7113(0x1b5)),_0x4d7113(0x1a2)+(_0x4fb9ca[0x1]??'(unchanged)'),'',_0x4d7113(0x1a6)+_0x2515aa[_0x4d7113(0x1b1)](',\x20')];return _0x47f6b9[_0x4d7113(0x1b1)]('\x0a');}
1
+ function a54_0x2162(_0x48e478,_0x89ce56){_0x48e478=_0x48e478-0x185;const _0x446f73=a54_0x446f();let _0x216209=_0x446f73[_0x48e478];return _0x216209;}(function(_0x29e32d,_0x1170bb){const _0xd2ac32=a54_0x2162,_0x539e80=_0x29e32d();while(!![]){try{const _0x1078e6=parseInt(_0xd2ac32(0x192))/0x1*(-parseInt(_0xd2ac32(0x19d))/0x2)+-parseInt(_0xd2ac32(0x18c))/0x3*(parseInt(_0xd2ac32(0x197))/0x4)+parseInt(_0xd2ac32(0x185))/0x5*(-parseInt(_0xd2ac32(0x19b))/0x6)+-parseInt(_0xd2ac32(0x189))/0x7*(parseInt(_0xd2ac32(0x188))/0x8)+-parseInt(_0xd2ac32(0x199))/0x9+parseInt(_0xd2ac32(0x18e))/0xa*(parseInt(_0xd2ac32(0x18b))/0xb)+parseInt(_0xd2ac32(0x19e))/0xc*(parseInt(_0xd2ac32(0x198))/0xd);if(_0x1078e6===_0x1170bb)break;else _0x539e80['push'](_0x539e80['shift']());}catch(_0x1f68b4){_0x539e80['push'](_0x539e80['shift']());}}}(a54_0x446f,0x2f066));function a54_0x446f(){const _0x1e92b3=['3228utcLJu','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','join','path','length','push','185YCnVHO','Menu\x20Name','map','2618008ANtFUV','7bBLTWh','repeat','11HFhyHD','252uxcIvm','max','2907010IflPNX','(unchanged)','\x20\x20\x20\x20JS:\x20\x20','showOnline','96637HFqInR','label','local','\x20\x20No\x20pages\x20to\x20sync.','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','5644YqEfgd','34502LIsSJI','2383785VKJuro','test','768UgqPtp','\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.','2xKIFlQ'];a54_0x446f=function(){return _0x1e92b3;};return a54_0x446f();}function strWidth(_0x22b1df){const _0x33be13=a54_0x2162;let _0xd0ee7b=0x0;for(const _0x5f30db of _0x22b1df){_0xd0ee7b+=/[\u4e00-\u9fa5]/[_0x33be13(0x19a)](_0x5f30db)?0x2:0x1;}return _0xd0ee7b;}function padRight(_0x2831f8,_0xd6baf1){const _0xb07342=a54_0x2162,_0x8778b1=strWidth(_0x2831f8);return _0x2831f8+'\x20'['repeat'](Math[_0xb07342(0x18d)](0x0,_0xd6baf1-_0x8778b1));}export function renderCompareTable(_0x3c50b1,_0x5290f5={}){const _0x420fb9=a54_0x2162;if(_0x3c50b1['length']===0x0)return'';const _0x2c6127=_0x5290f5[_0x420fb9(0x191)]??!![],_0x453ab5=Math[_0x420fb9(0x18d)](0x1e,..._0x3c50b1[_0x420fb9(0x187)](_0x4aa954=>strWidth(_0x4aa954[_0x420fb9(0x193)]))),_0x510433=0x4,_0x5c2fc1=[],_0x3a868d='\x20\x20'+padRight(_0x420fb9(0x186),_0x453ab5),_0x815c80=padRight('Local',_0x510433),_0x3afdc0=_0x2c6127?'\x20\x20'+padRight('Platform',_0x510433):'';_0x5c2fc1['push'](_0x3a868d+'\x20\x20'+_0x815c80+(_0x2c6127?_0x3afdc0:'')),_0x5c2fc1['push']('\x20\x20'+'─'[_0x420fb9(0x18a)](_0x453ab5)+'\x20\x20'+'─'['repeat'](_0x510433)+(_0x2c6127?'\x20\x20'+'─'[_0x420fb9(0x18a)](_0x510433):''));for(const _0x5acc96 of _0x3c50b1){const _0x23c11e=padRight(_0x5acc96[_0x420fb9(0x193)],_0x453ab5),_0x210ac7=_0x5acc96[_0x420fb9(0x194)]?'✓':'✗',_0x476264=padRight(_0x210ac7,_0x510433);let _0x503972='\x20\x20'+_0x23c11e+'\x20\x20'+_0x476264;if(_0x2c6127){const _0x262593=_0x5acc96['online']?'✓':'✗';_0x503972+='\x20\x20'+padRight(_0x262593,_0x510433);}_0x5c2fc1[_0x420fb9(0x1a3)](_0x503972);}return _0x5c2fc1['join']('\x0a');}export function renderSyncSummary(_0x2a715a,_0x33391a){const _0x2662f5=a54_0x2162;if(_0x2a715a[_0x2662f5(0x1a2)]===0x0)return _0x33391a?'\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.':_0x2662f5(0x195);const _0x8e819f=['\x20\x20'+_0x2a715a[_0x2662f5(0x1a2)]+_0x2662f5(0x196)];for(const _0x20f7c9 of _0x2a715a){_0x8e819f[_0x2662f5(0x1a3)]('\x20\x20\x20\x20•\x20'+_0x20f7c9[_0x2662f5(0x193)]+'\x20('+_0x20f7c9[_0x2662f5(0x1a1)]+')');}return _0x8e819f['join']('\x0a');}export function renderUpdateSummary(_0x5ec0be,_0x1fd79f){const _0x41dce3=a54_0x2162;if(_0x5ec0be[_0x41dce3(0x1a2)]===0x0)return _0x41dce3(0x19c);const _0x3f9b8c=['\x20\x20'+_0x5ec0be[_0x41dce3(0x1a2)]+_0x41dce3(0x19f),_0x41dce3(0x190)+(_0x1fd79f[0x0]??_0x41dce3(0x18f)),'\x20\x20\x20\x20CSS:\x20'+(_0x1fd79f[0x1]??_0x41dce3(0x18f)),'','\x20\x20Affected\x20menus:\x20'+_0x5ec0be[_0x41dce3(0x1a0)](',\x20')];return _0x3f9b8c[_0x41dce3(0x1a0)]('\x0a');}
@@ -1 +1 @@
1
- (function(_0x1621f5,_0x332a13){var _0x545eb5=a56_0x954c,_0x1300ca=_0x1621f5();while(!![]){try{var _0x37382b=parseInt(_0x545eb5(0xad))/0x1*(parseInt(_0x545eb5(0xa8))/0x2)+parseInt(_0x545eb5(0xa6))/0x3*(parseInt(_0x545eb5(0xae))/0x4)+parseInt(_0x545eb5(0xa9))/0x5*(-parseInt(_0x545eb5(0xac))/0x6)+parseInt(_0x545eb5(0xa7))/0x7+-parseInt(_0x545eb5(0xa5))/0x8*(parseInt(_0x545eb5(0xa3))/0x9)+-parseInt(_0x545eb5(0xa4))/0xa*(-parseInt(_0x545eb5(0xab))/0xb)+parseInt(_0x545eb5(0xaa))/0xc;if(_0x37382b===_0x332a13)break;else _0x1300ca['push'](_0x1300ca['shift']());}catch(_0x5996eb){_0x1300ca['push'](_0x1300ca['shift']());}}}(a56_0x31a3,0x9d9ee));export*from'./types.js';function a56_0x31a3(){var _0x215aec=['129530WSSgJb','1405956dfTGGr','72578YzqhNC','138uBavST','359klLAkI','911308eKanTg','6881022sFbkiJ','1180DhqJpD','8oDifCe','9xHEnAs','303730CHiDOp','2136pXLmZF'];a56_0x31a3=function(){return _0x215aec;};return a56_0x31a3();}export*from'./logic.js';function a56_0x954c(_0x566b86,_0x1c1e9b){_0x566b86=_0x566b86-0xa3;var _0x31a3fc=a56_0x31a3();var _0x954cee=_0x31a3fc[_0x566b86];return _0x954cee;}export*from'./compare-table.js';export*from'./inquirer.js';export*from'./valid-url.js';export*from'./local-pages.js';export*from'./service.js';export*from'./sync-core.js';export*from'./update-core.js';
1
+ (function(_0x52e128,_0x48e7e2){var _0x4532cf=a55_0x3165,_0x5d3c3a=_0x52e128();while(!![]){try{var _0x3a00b6=-parseInt(_0x4532cf(0x168))/0x1*(parseInt(_0x4532cf(0x16a))/0x2)+-parseInt(_0x4532cf(0x16e))/0x3*(parseInt(_0x4532cf(0x171))/0x4)+parseInt(_0x4532cf(0x16b))/0x5*(-parseInt(_0x4532cf(0x16c))/0x6)+parseInt(_0x4532cf(0x169))/0x7+-parseInt(_0x4532cf(0x16f))/0x8*(parseInt(_0x4532cf(0x16d))/0x9)+-parseInt(_0x4532cf(0x172))/0xa+parseInt(_0x4532cf(0x170))/0xb;if(_0x3a00b6===_0x48e7e2)break;else _0x5d3c3a['push'](_0x5d3c3a['shift']());}catch(_0x4d6dc8){_0x5d3c3a['push'](_0x5d3c3a['shift']());}}}(a55_0x28b0,0x4ae4f));function a55_0x28b0(){var _0x6ae73d=['6npTfoH','1152rZLsJg','21DPqEbg','11992ZMlDbW','24201221ZfRInn','167344TzFZos','6121910DVvMlP','61837DmGiNJ','755615QuQPsj','10NxgxTH','2975945mmcorI'];a55_0x28b0=function(){return _0x6ae73d;};return a55_0x28b0();}export*from'./types.js';export*from'./logic.js';export*from'./compare-table.js';export*from'./inquirer.js';export*from'./valid-url.js';export*from'./local-pages.js';export*from'./service.js';export*from'./sync-core.js';function a55_0x3165(_0x3d21f1,_0x40b4a6){_0x3d21f1=_0x3d21f1-0x168;var _0x28b0d0=a55_0x28b0();var _0x316532=_0x28b0d0[_0x3d21f1];return _0x316532;}export*from'./update-core.js';
@@ -1 +1 @@
1
- (function(_0x308665,_0x169ed0){const _0x472547=a57_0x32d9,_0x2f5a4a=_0x308665();while(!![]){try{const _0x3d86e0=-parseInt(_0x472547(0x1f8))/0x1*(-parseInt(_0x472547(0x218))/0x2)+parseInt(_0x472547(0x20f))/0x3*(-parseInt(_0x472547(0x215))/0x4)+-parseInt(_0x472547(0x1f4))/0x5+-parseInt(_0x472547(0x20d))/0x6+-parseInt(_0x472547(0x1fa))/0x7+parseInt(_0x472547(0x1f6))/0x8*(-parseInt(_0x472547(0x211))/0x9)+parseInt(_0x472547(0x207))/0xa;if(_0x3d86e0===_0x169ed0)break;else _0x2f5a4a['push'](_0x2f5a4a['shift']());}catch(_0x54e8a8){_0x2f5a4a['push'](_0x2f5a4a['shift']());}}}(a57_0x3023,0x8d111));function a57_0x32d9(_0x14643d,_0x4d5bc2){_0x14643d=_0x14643d-0x1f4;const _0x3023e3=a57_0x3023();let _0x32d90e=_0x3023e3[_0x14643d];return _0x32d90e;}function a57_0x3023(){const _0x8f8e0e=['catch','16KYyRgs','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','440830IMDoyH','trim','6598011RSPgCt','filter','No\x20local\x20pages\x20found.','test','[already\x20on\x20platform]','\x20\x20CSS\x20URL:','start','label','succeed','fail','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','\x20\x20✗\x20JS\x20URL\x20is\x20unreachable','cancelled','21837420lUupqK','\x20\x20Checking\x20JS\x20URL\x20reachability...','stdin','No\x20menus\x20selected.','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','JS\x20URL\x20check\x20failed','542094VvraPs','length','192243eDKDSn','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','1780227zRrSmL','ExitPromptError','red','path','44jdKNhB','has','map','4liLOHK','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','name','includes','error','CSS\x20URL\x20checked','Cancelled.','1770870odXweb'];a57_0x3023=function(){return _0x8f8e0e;};return a57_0x3023();}import a57_0x59a99a from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';import a57_0x42ea2f from'ora';import{isUrlReachable}from'./valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x37d75f){const _0x48cee0=a57_0x32d9;return _0x37d75f[_0x48cee0(0x1f5)](_0x32b2b2=>{const _0x2e0199=_0x48cee0;if(_0x32b2b2?.[_0x2e0199(0x21a)]===_0x2e0199(0x212))throw CliErrors['cancelled'](_0x2e0199(0x21e));throw _0x32b2b2;});}export function startSpinner(_0x170060){const _0x4e7dde=a57_0x32d9;return a57_0x42ea2f({'text':_0x170060,'color':'cyan'})[_0x4e7dde(0x200)]();}export function stopSpinner(_0x38a345,_0x386ace,_0x46d1e7){const _0x389ba2=a57_0x32d9;_0x46d1e7?_0x38a345[_0x389ba2(0x202)](_0x386ace):_0x38a345[_0x389ba2(0x203)](_0x386ace);}export async function askConfirm(_0x4b1472){return onCancel(confirm({'message':_0x4b1472,'theme':{'prefix':''}}));}export async function askJsUrl(_0x1a2de4){const _0x45ea2d=a57_0x32d9;while(!![]){const _0x1f1c4a=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x1a2de4,'theme':{'prefix':''}}));if(_0x1f1c4a[_0x45ea2d(0x1f9)]()==='')throw CliErrors[_0x45ea2d(0x206)](_0x45ea2d(0x21e));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x45ea2d(0x1fd)](_0x1f1c4a['trim']())){console['error'](a57_0x59a99a['red'](_0x45ea2d(0x204)));continue;}const _0x4c990c=startSpinner(_0x45ea2d(0x208));try{const _0x56f314=await isUrlReachable(_0x1f1c4a[_0x45ea2d(0x1f9)]());stopSpinner(_0x4c990c,'JS\x20URL\x20checked',_0x56f314);if(!_0x56f314){console[_0x45ea2d(0x21c)](a57_0x59a99a[_0x45ea2d(0x213)](_0x45ea2d(0x205)));continue;}return _0x1f1c4a[_0x45ea2d(0x1f9)]();}catch(_0x5cc3f7){stopSpinner(_0x4c990c,_0x45ea2d(0x20c),![]);throw _0x5cc3f7;}}}export async function askCssUrl(_0x1d49ce){const _0x474a1a=a57_0x32d9;while(!![]){const _0x4c1da1=await onCancel(input({'message':_0x474a1a(0x1ff),'default':_0x1d49ce,'theme':{'prefix':''}}));if(_0x4c1da1[_0x474a1a(0x1f9)]()==='')throw CliErrors[_0x474a1a(0x206)]('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/[_0x474a1a(0x1fd)](_0x4c1da1['trim']())){console['error'](a57_0x59a99a[_0x474a1a(0x213)](_0x474a1a(0x219)));continue;}const _0x56e468=startSpinner('\x20\x20Checking\x20CSS\x20URL\x20reachability...');try{const _0x5ce126=await isUrlReachable(_0x4c1da1[_0x474a1a(0x1f9)]());stopSpinner(_0x56e468,_0x474a1a(0x21d),_0x5ce126);if(!_0x5ce126){console['error'](a57_0x59a99a[_0x474a1a(0x213)](_0x474a1a(0x1f7)));continue;}return _0x4c1da1[_0x474a1a(0x1f9)]();}catch(_0x4e7727){stopSpinner(_0x56e468,'CSS\x20URL\x20check\x20failed',![]);throw _0x4e7727;}}}export async function selectPages(_0x1fb66c,_0x43508e,_0x47392b){const _0x4bbf83=a57_0x32d9,_0x62911c=_0x1fb66c[_0x4bbf83(0x217)](_0xddc5f5=>({'name':_0xddc5f5['label']+'\x20\x20'+(_0x43508e['has'](_0xddc5f5[_0x4bbf83(0x214)])?a57_0x59a99a['gray'](_0x4bbf83(0x1fe)):a57_0x59a99a['green']('[new]')),'value':_0xddc5f5[_0x4bbf83(0x201)],'checked':_0x47392b?_0x47392b[_0x4bbf83(0x21b)](_0xddc5f5[_0x4bbf83(0x201)]):!_0x43508e[_0x4bbf83(0x216)](_0xddc5f5[_0x4bbf83(0x214)])}));if(_0x62911c['length']===0x0)throw new Error(_0x4bbf83(0x1fc));const _0x32e1e2=await onCancel(checkbox({'message':_0x4bbf83(0x210),'choices':_0x62911c,'loop':![],'theme':{'prefix':''}}));if(_0x32e1e2[_0x4bbf83(0x20e)]===0x0)throw new Error(_0x4bbf83(0x20a));return _0x1fb66c[_0x4bbf83(0x1fb)](_0xd79e29=>_0x32e1e2['includes'](_0xd79e29[_0x4bbf83(0x201)]));}export function isInteractive(){const _0x198d40=a57_0x32d9;return process[_0x198d40(0x209)]['isTTY']===!![];}export function requireInteractive(){const _0x4fa5c9=a57_0x32d9;if(!isInteractive())throw new Error('This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20'+_0x4fa5c9(0x20b));}
1
+ (function(_0x30e41e,_0xd77027){const _0x473b7b=a56_0x3851,_0x2234bd=_0x30e41e();while(!![]){try{const _0x40330a=-parseInt(_0x473b7b(0x1d9))/0x1+-parseInt(_0x473b7b(0x1fa))/0x2+parseInt(_0x473b7b(0x1e9))/0x3*(-parseInt(_0x473b7b(0x1ea))/0x4)+parseInt(_0x473b7b(0x1f3))/0x5+-parseInt(_0x473b7b(0x1d4))/0x6*(-parseInt(_0x473b7b(0x1e5))/0x7)+-parseInt(_0x473b7b(0x1ee))/0x8+parseInt(_0x473b7b(0x1e6))/0x9*(parseInt(_0x473b7b(0x1dd))/0xa);if(_0x40330a===_0xd77027)break;else _0x2234bd['push'](_0x2234bd['shift']());}catch(_0x1b4017){_0x2234bd['push'](_0x2234bd['shift']());}}}(a56_0x4dfe,0x3220f));import a56_0x1c6a96 from'chalk';import{checkbox,input,confirm}from'@inquirer/prompts';function a56_0x4dfe(){const _0x5dcfc4=['CSS\x20URL\x20check\x20failed','18222KRczHt','68wNVfhe','has','red','No\x20menus\x20selected.','2431624wVMEIZ','gray','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','includes','\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','932380HPuDHA','Cancelled.','cyan','catch','green','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','filter','214230IGQFLv','length','name','error','start','\x20\x20Checking\x20CSS\x20URL\x20reachability...','fail','JS\x20URL\x20checked','4734VEutka','path','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','label','No\x20local\x20pages\x20found.','280153msoaDo','\x20\x20Checking\x20JS\x20URL\x20reachability...','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','cancelled','20AVbAcY','JS\x20URL\x20check\x20failed','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','trim','\x20\x20JS\x20URL:','ExitPromptError','CSS\x20URL\x20checked','[already\x20on\x20platform]','2828TflAUs','2225583jwWeAx','test'];a56_0x4dfe=function(){return _0x5dcfc4;};return a56_0x4dfe();}function a56_0x3851(_0x324368,_0x5b35fe){_0x324368=_0x324368-0x1d1;const _0x4dfede=a56_0x4dfe();let _0x385149=_0x4dfede[_0x324368];return _0x385149;}import a56_0x42fd9d from'ora';import{isUrlReachable}from'./valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0xd65c90){const _0x58ebf2=a56_0x3851;return _0xd65c90[_0x58ebf2(0x1f6)](_0x5519e2=>{const _0x500f89=_0x58ebf2;if(_0x5519e2?.[_0x500f89(0x1fc)]===_0x500f89(0x1e2))throw CliErrors[_0x500f89(0x1dc)](_0x500f89(0x1f4));throw _0x5519e2;});}export function startSpinner(_0x13aa02){const _0x6b3d22=a56_0x3851;return a56_0x42fd9d({'text':_0x13aa02,'color':_0x6b3d22(0x1f5)})[_0x6b3d22(0x1fe)]();}export function stopSpinner(_0x380602,_0x304754,_0x3c04a9){const _0x4a91c7=a56_0x3851;_0x3c04a9?_0x380602['succeed'](_0x304754):_0x380602[_0x4a91c7(0x1d2)](_0x304754);}export async function askConfirm(_0x2d097b){return onCancel(confirm({'message':_0x2d097b,'theme':{'prefix':''}}));}export async function askJsUrl(_0x33f66f){const _0x53d415=a56_0x3851;while(!![]){const _0x4ebbf3=await onCancel(input({'message':_0x53d415(0x1e1),'default':_0x33f66f,'theme':{'prefix':''}}));if(_0x4ebbf3[_0x53d415(0x1e0)]()==='')throw CliErrors[_0x53d415(0x1dc)](_0x53d415(0x1f4));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x53d415(0x1e7)](_0x4ebbf3[_0x53d415(0x1e0)]())){console['error'](a56_0x1c6a96[_0x53d415(0x1ec)](_0x53d415(0x1f8)));continue;}const _0x4e45da=startSpinner(_0x53d415(0x1da));try{const _0x4525f7=await isUrlReachable(_0x4ebbf3['trim']());stopSpinner(_0x4e45da,_0x53d415(0x1d3),_0x4525f7);if(!_0x4525f7){console[_0x53d415(0x1fd)](a56_0x1c6a96['red']('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x4ebbf3[_0x53d415(0x1e0)]();}catch(_0x185f47){stopSpinner(_0x4e45da,_0x53d415(0x1de),![]);throw _0x185f47;}}}export async function askCssUrl(_0x63bf37){const _0x32467c=a56_0x3851;while(!![]){const _0x3d45c5=await onCancel(input({'message':'\x20\x20CSS\x20URL:','default':_0x63bf37,'theme':{'prefix':''}}));if(_0x3d45c5['trim']()==='')throw CliErrors[_0x32467c(0x1dc)](_0x32467c(0x1f4));if(!/^https:\/\/.+\.css(\?.*)?$/[_0x32467c(0x1e7)](_0x3d45c5[_0x32467c(0x1e0)]())){console[_0x32467c(0x1fd)](a56_0x1c6a96[_0x32467c(0x1ec)](_0x32467c(0x1f2)));continue;}const _0x16ab2c=startSpinner(_0x32467c(0x1d1));try{const _0x5292f9=await isUrlReachable(_0x3d45c5['trim']());stopSpinner(_0x16ab2c,_0x32467c(0x1e3),_0x5292f9);if(!_0x5292f9){console[_0x32467c(0x1fd)](a56_0x1c6a96[_0x32467c(0x1ec)](_0x32467c(0x1d6)));continue;}return _0x3d45c5[_0x32467c(0x1e0)]();}catch(_0x1d5802){stopSpinner(_0x16ab2c,_0x32467c(0x1e8),![]);throw _0x1d5802;}}}export async function selectPages(_0x45279d,_0x5ade0e,_0x11b163){const _0x3300b6=a56_0x3851,_0x286e1f=_0x45279d['map'](_0x4a9cd2=>({'name':_0x4a9cd2['label']+'\x20\x20'+(_0x5ade0e[_0x3300b6(0x1eb)](_0x4a9cd2[_0x3300b6(0x1d5)])?a56_0x1c6a96[_0x3300b6(0x1ef)](_0x3300b6(0x1e4)):a56_0x1c6a96[_0x3300b6(0x1f7)]('[new]')),'value':_0x4a9cd2[_0x3300b6(0x1d7)],'checked':_0x11b163?_0x11b163[_0x3300b6(0x1f1)](_0x4a9cd2[_0x3300b6(0x1d7)]):!_0x5ade0e['has'](_0x4a9cd2[_0x3300b6(0x1d5)])}));if(_0x286e1f[_0x3300b6(0x1fb)]===0x0)throw new Error(_0x3300b6(0x1d8));const _0x5e39f0=await onCancel(checkbox({'message':_0x3300b6(0x1db),'choices':_0x286e1f,'loop':![],'theme':{'prefix':''}}));if(_0x5e39f0['length']===0x0)throw new Error(_0x3300b6(0x1ed));return _0x45279d[_0x3300b6(0x1f9)](_0x20e79=>_0x5e39f0[_0x3300b6(0x1f1)](_0x20e79[_0x3300b6(0x1d7)]));}export function isInteractive(){return process['stdin']['isTTY']===!![];}export function requireInteractive(){const _0x3097d8=a56_0x3851;if(!isInteractive())throw new Error(_0x3097d8(0x1df)+_0x3097d8(0x1f0));}
@@ -1 +1 @@
1
- const a58_0x12b2e6=a58_0x10c1;(function(_0x5e72d3,_0x3251bb){const _0x59099c=a58_0x10c1,_0x53e4d5=_0x5e72d3();while(!![]){try{const _0x160037=-parseInt(_0x59099c(0x184))/0x1*(-parseInt(_0x59099c(0x189))/0x2)+parseInt(_0x59099c(0x188))/0x3*(parseInt(_0x59099c(0x190))/0x4)+parseInt(_0x59099c(0x180))/0x5+-parseInt(_0x59099c(0x18d))/0x6+parseInt(_0x59099c(0x18e))/0x7+parseInt(_0x59099c(0x17c))/0x8*(-parseInt(_0x59099c(0x17b))/0x9)+-parseInt(_0x59099c(0x191))/0xa;if(_0x160037===_0x3251bb)break;else _0x53e4d5['push'](_0x53e4d5['shift']());}catch(_0xc64c5d){_0x53e4d5['push'](_0x53e4d5['shift']());}}}(a58_0x5349,0xa1f0d));function a58_0x10c1(_0x2ea1cf,_0x589b47){_0x2ea1cf=_0x2ea1cf-0x17b;const _0x5349a8=a58_0x5349();let _0x10c130=_0x5349a8[_0x2ea1cf];return _0x10c130;}import{readdirSync,statSync,readFileSync}from'fs';function a58_0x5349(){const _0x467e3c=['forEach','join','match','2xQtNlw','split','push','slice','3521319rYWmFO','382218ESRBgu','utf-8','index.tsx','.tsx','3386034cJZHaE','2268560fHhian','path','4BXFFtF','6582110tfLMQo','trim','replace','replaceAll','216cZwCJk','167512CeCYWi','src/pages','endsWith','filter','2541620WJYZKP'];a58_0x5349=function(){return _0x467e3c;};return a58_0x5349();}import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process['cwd'](),a58_0x12b2e6(0x17d));export function extractTitleFromComment(_0x427e47){const _0x1ad1c1=a58_0x12b2e6;try{const _0x2c66fc=readFileSync(_0x427e47,_0x1ad1c1(0x18a)),_0x362b84=_0x2c66fc[_0x1ad1c1(0x183)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x362b84&&_0x362b84[0x1]){const _0x2e0261=_0x362b84[0x1],_0x26a657=_0x2e0261[_0x1ad1c1(0x183)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x26a657&&_0x26a657[0x1])return _0x26a657[0x1][_0x1ad1c1(0x192)]();}let _0x264828=null;const _0x2140ec=_0x2c66fc['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x2140ec&&_0x2140ec[0x1]&&(_0x264828=_0x2140ec[0x1]);if(!_0x264828){const _0x3c78a4=_0x2c66fc['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x3c78a4&&_0x3c78a4[0x1]&&(_0x264828=_0x3c78a4[0x1]);}if(_0x264828){const _0x1417cc=new RegExp('\x5cb'+_0x264828+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x155e0d=_0x2c66fc['match'](_0x1417cc);if(_0x155e0d&&_0x155e0d[0x1])return _0x155e0d[0x1];return _0x264828;}return null;}catch(_0x1e4023){return null;}}export function getLocalPages(_0x4a3d8d=pagesDir,_0x381b54=pagesDir){const _0x5731ff=a58_0x12b2e6;let _0x4be791=[];const _0x929fee=readdirSync(_0x4a3d8d);return _0x929fee[_0x5731ff(0x181)](_0x4a6b01=>{const _0x6885cc=_0x5731ff,_0x57d501=join(_0x4a3d8d,_0x4a6b01),_0x1687ea=statSync(_0x57d501);if(_0x1687ea&&_0x1687ea['isDirectory']())_0x4be791=_0x4be791['concat'](getLocalPages(_0x57d501,_0x381b54));else{if(_0x4a6b01[_0x6885cc(0x17e)](_0x6885cc(0x18c))){let _0x9c141b=relative(_0x381b54,_0x57d501);_0x9c141b[_0x6885cc(0x17e)](_0x6885cc(0x18b))?_0x9c141b=_0x9c141b[_0x6885cc(0x193)](/index\.tsx$/,''):_0x9c141b=_0x9c141b['replace'](/\.tsx$/,'');_0x9c141b[_0x6885cc(0x17e)](sep)&&(_0x9c141b=_0x9c141b[_0x6885cc(0x187)](0x0,-0x1));const _0x25e6a4=_0x9c141b[_0x6885cc(0x185)](sep)[_0x6885cc(0x182)]('/'),_0x482ffe=extractTitleFromComment(_0x57d501),_0x88cc4a=_0x482ffe||_0x25e6a4;_0x4be791[_0x6885cc(0x186)]({'path':_0x25e6a4[_0x6885cc(0x194)]('$',':'),'label':_0x88cc4a});}}}),_0x4be791[_0x5731ff(0x17f)](_0x10a1c1=>_0x10a1c1[_0x5731ff(0x18f)]!=='');}
1
+ const a57_0x2def15=a57_0x19f5;(function(_0x2a8846,_0x573470){const _0x4d155f=a57_0x19f5,_0x513ec8=_0x2a8846();while(!![]){try{const _0x264f13=parseInt(_0x4d155f(0xd2))/0x1+-parseInt(_0x4d155f(0xe7))/0x2+parseInt(_0x4d155f(0xe8))/0x3*(-parseInt(_0x4d155f(0xe5))/0x4)+parseInt(_0x4d155f(0xe3))/0x5+-parseInt(_0x4d155f(0xda))/0x6*(-parseInt(_0x4d155f(0xe2))/0x7)+-parseInt(_0x4d155f(0xdb))/0x8*(-parseInt(_0x4d155f(0xe9))/0x9)+parseInt(_0x4d155f(0xe0))/0xa;if(_0x264f13===_0x573470)break;else _0x513ec8['push'](_0x513ec8['shift']());}catch(_0x41d157){_0x513ec8['push'](_0x513ec8['shift']());}}}(a57_0x3da4,0x97e84));import{readdirSync,statSync,readFileSync}from'fs';function a57_0x19f5(_0x20b128,_0x45f9d8){_0x20b128=_0x20b128-0xd0;const _0x3da48e=a57_0x3da4();let _0x19f55e=_0x3da48e[_0x20b128];return _0x19f55e;}import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a57_0x2def15(0xd1)](),a57_0x2def15(0xe6));export function extractTitleFromComment(_0x4734cc){const _0x13d697=a57_0x2def15;try{const _0x307556=readFileSync(_0x4734cc,'utf-8'),_0x22773b=_0x307556[_0x13d697(0xdf)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x22773b&&_0x22773b[0x1]){const _0x42f662=_0x22773b[0x1],_0x4dcadb=_0x42f662[_0x13d697(0xdf)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x4dcadb&&_0x4dcadb[0x1])return _0x4dcadb[0x1][_0x13d697(0xe1)]();}let _0x2b1642=null;const _0x5c36a2=_0x307556['match'](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x5c36a2&&_0x5c36a2[0x1]&&(_0x2b1642=_0x5c36a2[0x1]);if(!_0x2b1642){const _0x4fa850=_0x307556[_0x13d697(0xdf)](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x4fa850&&_0x4fa850[0x1]&&(_0x2b1642=_0x4fa850[0x1]);}if(_0x2b1642){const _0x3e2e1d=new RegExp('\x5cb'+_0x2b1642+_0x13d697(0xde)),_0xcbf7fd=_0x307556[_0x13d697(0xdf)](_0x3e2e1d);if(_0xcbf7fd&&_0xcbf7fd[0x1])return _0xcbf7fd[0x1];return _0x2b1642;}return null;}catch(_0x1b5111){return null;}}export function getLocalPages(_0x5cb78c=pagesDir,_0x10e2e5=pagesDir){const _0x5df9e6=a57_0x2def15;let _0x59ff66=[];const _0x34e901=readdirSync(_0x5cb78c);return _0x34e901[_0x5df9e6(0xd7)](_0x523e1c=>{const _0x2ef590=_0x5df9e6,_0x26b320=join(_0x5cb78c,_0x523e1c),_0x469be8=statSync(_0x26b320);if(_0x469be8&&_0x469be8['isDirectory']())_0x59ff66=_0x59ff66[_0x2ef590(0xd5)](getLocalPages(_0x26b320,_0x10e2e5));else{if(_0x523e1c[_0x2ef590(0xdc)](_0x2ef590(0xd3))){let _0x4b76b9=relative(_0x10e2e5,_0x26b320);_0x4b76b9[_0x2ef590(0xdc)](_0x2ef590(0xd0))?_0x4b76b9=_0x4b76b9[_0x2ef590(0xd4)](/index\.tsx$/,''):_0x4b76b9=_0x4b76b9['replace'](/\.tsx$/,'');_0x4b76b9[_0x2ef590(0xdc)](sep)&&(_0x4b76b9=_0x4b76b9[_0x2ef590(0xdd)](0x0,-0x1));const _0x4ddbd3=_0x4b76b9['split'](sep)[_0x2ef590(0xd9)]('/'),_0x2c3a6e=extractTitleFromComment(_0x26b320),_0x5de067=_0x2c3a6e||_0x4ddbd3;_0x59ff66[_0x2ef590(0xe4)]({'path':_0x4ddbd3[_0x2ef590(0xd8)]('$',':'),'label':_0x5de067});}}}),_0x59ff66['filter'](_0x5f174c=>_0x5f174c[_0x5df9e6(0xd6)]!=='');}function a57_0x3da4(){const _0x38bfab=['index.tsx','cwd','161664jzIWsC','.tsx','replace','concat','path','forEach','replaceAll','join','12ykZHqp','6551704EJwbMO','endsWith','slice','\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]','match','6852330oVHnxl','trim','1918889eCMnED','147630MpGkaK','push','1545968vJHttN','src/pages','923904UglBYg','9XaQXbr','9nSZYtX'];a57_0x3da4=function(){return _0x38bfab;};return a57_0x3da4();}
@@ -1 +1 @@
1
- (function(_0x511265,_0x10739d){const _0x5b6bf4=a59_0x3cb6,_0x4b89ec=_0x511265();while(!![]){try{const _0x139c38=-parseInt(_0x5b6bf4(0x112))/0x1+-parseInt(_0x5b6bf4(0x116))/0x2*(-parseInt(_0x5b6bf4(0x115))/0x3)+-parseInt(_0x5b6bf4(0x11d))/0x4*(parseInt(_0x5b6bf4(0x11e))/0x5)+-parseInt(_0x5b6bf4(0x11c))/0x6*(-parseInt(_0x5b6bf4(0x124))/0x7)+-parseInt(_0x5b6bf4(0x120))/0x8*(-parseInt(_0x5b6bf4(0x11a))/0x9)+-parseInt(_0x5b6bf4(0x113))/0xa*(-parseInt(_0x5b6bf4(0x117))/0xb)+parseInt(_0x5b6bf4(0x10d))/0xc;if(_0x139c38===_0x10739d)break;else _0x4b89ec['push'](_0x4b89ec['shift']());}catch(_0x2cb130){_0x4b89ec['push'](_0x4b89ec['shift']());}}}(a59_0x5463,0x4a6ca));import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';export function validateJsUrl(_0x336168){const _0x2a11e5=a59_0x3cb6,_0x28cef3=[];return!isValidJsHttpsUrl(_0x336168)&&_0x28cef3['push']('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x28cef3[_0x2a11e5(0x119)]===0x0,'errors':_0x28cef3};}export function validateCssUrl(_0x538e46){const _0x55cd12=a59_0x3cb6,_0x124e67=[];return!isValidCssHttpsUrl(_0x538e46)&&_0x124e67[_0x55cd12(0x129)](_0x55cd12(0x111)),{'ok':_0x124e67['length']===0x0,'errors':_0x124e67};}function a59_0x3cb6(_0x323cb9,_0x43096b){_0x323cb9=_0x323cb9-0x10c;const _0x5463da=a59_0x5463();let _0x3cb63e=_0x5463da[_0x323cb9];return _0x3cb63e;}export async function validateJsUrlReachable(_0x25e8d9){const _0x560bbc=a59_0x3cb6,_0x2f121b=validateJsUrl(_0x25e8d9);if(!_0x2f121b['ok'])return _0x2f121b;const _0x5fb37b=await isUrlReachable(_0x25e8d9);if(!_0x5fb37b)_0x2f121b['errors'][_0x560bbc(0x129)](_0x560bbc(0x123));return{'ok':_0x2f121b[_0x560bbc(0x11f)][_0x560bbc(0x119)]===0x0,'errors':_0x2f121b[_0x560bbc(0x11f)]};}export async function validateCssUrlReachable(_0x42a01e){const _0x499f37=a59_0x3cb6,_0x290881=validateCssUrl(_0x42a01e);if(!_0x290881['ok'])return _0x290881;const _0x29131f=await isUrlReachable(_0x42a01e);if(!_0x29131f)_0x290881[_0x499f37(0x11f)][_0x499f37(0x129)](_0x499f37(0x118));return{'ok':_0x290881['errors'][_0x499f37(0x119)]===0x0,'errors':_0x290881[_0x499f37(0x11f)]};}export function buildCompareRows(_0x4a3a71,_0x15b50e){const _0x1cdfe1=a59_0x3cb6;return _0x4a3a71['map'](_0x31bcb7=>({'label':_0x31bcb7[_0x1cdfe1(0x10e)],'path':_0x31bcb7['path'],'local':!![],'online':_0x15b50e[_0x1cdfe1(0x114)](_0x31bcb7[_0x1cdfe1(0x126)])}));}function a59_0x5463(){const _0x132c65=['CSS\x20URL\x20is\x20unreachable','length','871092nqijec','find','157986HsTRjr','775412PibeZu','15FLRRuX','errors','8qFDiGG','No\x20local\x20pages\x20matched\x20labels:\x20','resources','JS\x20URL\x20is\x20unreachable','21ixgcDp','filter','path','map','allSettled','push','trim','5974776XGclDY','label','join','status','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','306967bOqewO','40LFvNiP','has','49563HzzgHQ','58eXJpaL','111595nHRosi'];a59_0x5463=function(){return _0x132c65;};return a59_0x5463();}export function filterNewPages(_0x1b906d,_0x51d9ef,_0x2a94f5){const _0x48141f=a59_0x3cb6;if(_0x2a94f5&&_0x2a94f5[_0x48141f(0x119)]>0x0){const _0x3fddca=new Set(_0x2a94f5['map'](_0x725436=>_0x725436['trim']())),_0xed9875=_0x1b906d[_0x48141f(0x125)](_0x1b3e2b=>_0x3fddca[_0x48141f(0x114)](_0x1b3e2b[_0x48141f(0x10e)]));if(_0xed9875['length']===0x0)throw new Error(_0x48141f(0x121)+[..._0x3fddca][_0x48141f(0x10f)](',\x20'));return _0xed9875;}return _0x1b906d['filter'](_0x4fe1d5=>!_0x51d9ef['has'](_0x4fe1d5['path']));}export function filterPagesByLabels(_0x542047,_0xa58ed6){const _0x333124=a59_0x3cb6,_0x446e10=[],_0x3d7a5e=[];for(const _0x4dc501 of _0xa58ed6){const _0x4c1e57=_0x4dc501[_0x333124(0x10c)](),_0x345302=_0x542047[_0x333124(0x11b)](_0x279d46=>_0x279d46['label']===_0x4c1e57);if(_0x345302)_0x446e10['push'](_0x345302);else _0x3d7a5e[_0x333124(0x129)](_0x4dc501);}return{'matched':_0x446e10,'unmatched':_0x3d7a5e};}export async function doCreateMenus(_0x446c53,_0xb91989,_0x3763da,_0x59f9bc){const _0x3ffc2b=a59_0x3cb6;return await createMenus(_0x446c53,_0xb91989,_0x3763da,_0x59f9bc),{'created':_0x3763da['length'],'failed':0x0,'labels':_0x3763da[_0x3ffc2b(0x127)](_0x490607=>_0x490607[_0x3ffc2b(0x10e)])};}export function filterMenusWithResources(_0x213f40){const _0x2129b2=a59_0x3cb6;return _0x213f40[_0x2129b2(0x125)](_0x1e5ed7=>_0x1e5ed7[_0x2129b2(0x122)][_0x2129b2(0x119)]>0x0);}export async function doUpdateCdnUrls(_0x572672,_0x1f946b,_0x4a9b37,_0x47e7b4){const _0x53bdab=a59_0x3cb6,_0x5be183=_0x4a9b37[_0x53bdab(0x125)](_0xf011ff=>_0xf011ff[_0x53bdab(0x122)][_0x53bdab(0x119)]>0x0),_0x190007=await Promise[_0x53bdab(0x128)](_0x5be183[_0x53bdab(0x127)](_0x55fb91=>updateMenuCdnUrl(_0x572672,_0x1f946b,{'id':_0x55fb91['id'],'label':_0x55fb91['label'],'path':_0x55fb91[_0x53bdab(0x126)],'resources':_0x47e7b4}))),_0x3a8888=_0x190007[_0x53bdab(0x125)](_0x452d33=>_0x452d33[_0x53bdab(0x110)]==='rejected')['length'];return{'updated':_0x5be183[_0x53bdab(0x119)]-_0x3a8888,'failed':_0x3a8888};}export async function fetchMenuData(_0x197573,_0x5d7456){const _0x2ebf42=a59_0x3cb6,_0x22aed7=getLocalPages(),_0xd147d0=await getOnlineMenuList(_0x197573,_0x5d7456),_0x14d327=new Set(_0xd147d0[_0x2ebf42(0x127)](_0x3e0eba=>_0x3e0eba[_0x2ebf42(0x126)]));return{'localPages':_0x22aed7,'onlineMenuList':_0xd147d0,'onlinePaths':_0x14d327};}export async function fetchOnlineMenuList(_0x1c79f7,_0xb21f83){return getOnlineMenuList(_0x1c79f7,_0xb21f83);}
1
+ (function(_0x453d4f,_0x3971e6){const _0x65020a=a58_0x2c9f,_0x1ba5ef=_0x453d4f();while(!![]){try{const _0xdebefd=-parseInt(_0x65020a(0x117))/0x1+-parseInt(_0x65020a(0x112))/0x2+-parseInt(_0x65020a(0x11c))/0x3+-parseInt(_0x65020a(0x11d))/0x4+-parseInt(_0x65020a(0x118))/0x5+-parseInt(_0x65020a(0x122))/0x6+parseInt(_0x65020a(0x10a))/0x7*(parseInt(_0x65020a(0x11e))/0x8);if(_0xdebefd===_0x3971e6)break;else _0x1ba5ef['push'](_0x1ba5ef['shift']());}catch(_0x5e21ac){_0x1ba5ef['push'](_0x1ba5ef['shift']());}}}(a58_0x3236,0x33088));import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus,updateMenuCdnUrl}from'./service.js';function a58_0x2c9f(_0x15d7ad,_0x2fb93c){_0x15d7ad=_0x15d7ad-0x10a;const _0x3236ea=a58_0x3236();let _0x2c9f99=_0x3236ea[_0x15d7ad];return _0x2c9f99;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';export function validateJsUrl(_0x4e26d0){const _0x297dc5=a58_0x2c9f,_0x5c3a08=[];return!isValidJsHttpsUrl(_0x4e26d0)&&_0x5c3a08['push']('JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'),{'ok':_0x5c3a08[_0x297dc5(0x120)]===0x0,'errors':_0x5c3a08};}export function validateCssUrl(_0x3699fb){const _0x1c5fb8=a58_0x2c9f,_0x3ccf6c=[];return!isValidCssHttpsUrl(_0x3699fb)&&_0x3ccf6c[_0x1c5fb8(0x10b)]('CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'),{'ok':_0x3ccf6c['length']===0x0,'errors':_0x3ccf6c};}export async function validateJsUrlReachable(_0x19117a){const _0x1064f4=a58_0x2c9f,_0x70ee72=validateJsUrl(_0x19117a);if(!_0x70ee72['ok'])return _0x70ee72;const _0x241b8f=await isUrlReachable(_0x19117a);if(!_0x241b8f)_0x70ee72[_0x1064f4(0x110)][_0x1064f4(0x10b)](_0x1064f4(0x119));return{'ok':_0x70ee72['errors'][_0x1064f4(0x120)]===0x0,'errors':_0x70ee72[_0x1064f4(0x110)]};}export async function validateCssUrlReachable(_0x298a9e){const _0x379297=a58_0x2c9f,_0x231ee3=validateCssUrl(_0x298a9e);if(!_0x231ee3['ok'])return _0x231ee3;const _0x2d6772=await isUrlReachable(_0x298a9e);if(!_0x2d6772)_0x231ee3[_0x379297(0x110)]['push'](_0x379297(0x10d));return{'ok':_0x231ee3['errors'][_0x379297(0x120)]===0x0,'errors':_0x231ee3[_0x379297(0x110)]};}function a58_0x3236(){const _0x1ef636=['label','rejected','329460vngSGq','722200JgcOCH','JS\x20URL\x20is\x20unreachable','path','status','881208zoeWDn','1322616FCMtNW','57416wYZrDT','resources','length','filter','524874rUodKP','1379PJPocD','push','allSettled','CSS\x20URL\x20is\x20unreachable','join','has','errors','map','38136obRxgn','find','trim'];a58_0x3236=function(){return _0x1ef636;};return a58_0x3236();}export function buildCompareRows(_0x15fb4c,_0x5ef5f7){const _0x18bb81=a58_0x2c9f;return _0x15fb4c['map'](_0x3f0732=>({'label':_0x3f0732['label'],'path':_0x3f0732['path'],'local':!![],'online':_0x5ef5f7[_0x18bb81(0x10f)](_0x3f0732['path'])}));}export function filterNewPages(_0x53264f,_0x1756fe,_0x44f662){const _0x39a80f=a58_0x2c9f;if(_0x44f662&&_0x44f662['length']>0x0){const _0x43ffbb=new Set(_0x44f662['map'](_0x1fdc86=>_0x1fdc86[_0x39a80f(0x114)]())),_0x2786e9=_0x53264f[_0x39a80f(0x121)](_0x203d5f=>_0x43ffbb['has'](_0x203d5f['label']));if(_0x2786e9[_0x39a80f(0x120)]===0x0)throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x43ffbb][_0x39a80f(0x10e)](',\x20'));return _0x2786e9;}return _0x53264f[_0x39a80f(0x121)](_0x74cb05=>!_0x1756fe[_0x39a80f(0x10f)](_0x74cb05[_0x39a80f(0x11a)]));}export function filterPagesByLabels(_0x56d9f1,_0x1b3fc4){const _0x5aefa4=a58_0x2c9f,_0x262df8=[],_0x51b480=[];for(const _0x3c649e of _0x1b3fc4){const _0x345769=_0x3c649e[_0x5aefa4(0x114)](),_0x2ede0e=_0x56d9f1[_0x5aefa4(0x113)](_0x2be75a=>_0x2be75a[_0x5aefa4(0x115)]===_0x345769);if(_0x2ede0e)_0x262df8[_0x5aefa4(0x10b)](_0x2ede0e);else _0x51b480[_0x5aefa4(0x10b)](_0x3c649e);}return{'matched':_0x262df8,'unmatched':_0x51b480};}export async function doCreateMenus(_0x34d349,_0x526832,_0x25ab9f,_0x55a596){const _0x22a1d3=a58_0x2c9f;return await createMenus(_0x34d349,_0x526832,_0x25ab9f,_0x55a596),{'created':_0x25ab9f[_0x22a1d3(0x120)],'failed':0x0,'labels':_0x25ab9f[_0x22a1d3(0x111)](_0x1a3f40=>_0x1a3f40[_0x22a1d3(0x115)])};}export function filterMenusWithResources(_0x364e62){const _0x58bfc3=a58_0x2c9f;return _0x364e62[_0x58bfc3(0x121)](_0x1d4472=>_0x1d4472[_0x58bfc3(0x11f)][_0x58bfc3(0x120)]>0x0);}export async function doUpdateCdnUrls(_0x4229c2,_0x4261bb,_0x3002fd,_0x40d1ed){const _0x4d51f3=a58_0x2c9f,_0x1319dd=_0x3002fd['filter'](_0x25d460=>_0x25d460[_0x4d51f3(0x11f)][_0x4d51f3(0x120)]>0x0),_0x33fa14=await Promise[_0x4d51f3(0x10c)](_0x1319dd[_0x4d51f3(0x111)](_0x487251=>updateMenuCdnUrl(_0x4229c2,_0x4261bb,{'id':_0x487251['id'],'label':_0x487251[_0x4d51f3(0x115)],'path':_0x487251[_0x4d51f3(0x11a)],'resources':_0x40d1ed}))),_0x1cac4a=_0x33fa14[_0x4d51f3(0x121)](_0x7fb3a1=>_0x7fb3a1[_0x4d51f3(0x11b)]===_0x4d51f3(0x116))['length'];return{'updated':_0x1319dd['length']-_0x1cac4a,'failed':_0x1cac4a};}export async function fetchMenuData(_0x19f076,_0x1eeebd){const _0x5bc759=a58_0x2c9f,_0x5a0fa9=getLocalPages(),_0x2315b7=await getOnlineMenuList(_0x19f076,_0x1eeebd),_0x3344d0=new Set(_0x2315b7[_0x5bc759(0x111)](_0x43c6d6=>_0x43c6d6['path']));return{'localPages':_0x5a0fa9,'onlineMenuList':_0x2315b7,'onlinePaths':_0x3344d0};}export async function fetchOnlineMenuList(_0xc9e4d2,_0x5c4bb8){return getOnlineMenuList(_0xc9e4d2,_0x5c4bb8);}
@@ -1 +1 @@
1
- (function(_0x19a609,_0x350d9a){const _0x38c1b6=a60_0x16bb,_0x2e069f=_0x19a609();while(!![]){try{const _0xd1b649=-parseInt(_0x38c1b6(0x1f3))/0x1+-parseInt(_0x38c1b6(0x1f9))/0x2+-parseInt(_0x38c1b6(0x207))/0x3*(parseInt(_0x38c1b6(0x201))/0x4)+-parseInt(_0x38c1b6(0x200))/0x5*(parseInt(_0x38c1b6(0x1f7))/0x6)+-parseInt(_0x38c1b6(0x213))/0x7+parseInt(_0x38c1b6(0x205))/0x8+parseInt(_0x38c1b6(0x204))/0x9;if(_0xd1b649===_0x350d9a)break;else _0x2e069f['push'](_0x2e069f['shift']());}catch(_0x561e0f){_0x2e069f['push'](_0x2e069f['shift']());}}}(a60_0x1cc7,0x2561b));import{getApiDomain}from'../../../constant/domain.js';function a60_0x1cc7(){const _0x26b261=['info','Menu\x20created\x20successfully:\x20','Menu\x20assets\x20synced:\x20','resources','/smartapi/menu/create','flat','map','children','extend','Updating\x20menu\x20asset\x20links:\x20','/smartapi/menu/update','260071nuNbql','isArray','Create\x20menu\x20\x22','Fetched\x20','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','get-online-menu-list','\x20online\x20menus\x20successfully','create-menu','update-menu-cdn-url','236058CSlIrY','push','import','create-menus','18qXaQcA','stringify','603570BiZuif','label','online','path','length','Creating\x20menu:\x20','parse','59545jXxWnv','12LBnqpY','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','POST','6905547xKuyGY','403408OrhGui','Server\x20returned\x20empty\x20menu\x20list','53871aZdYgx'];a60_0x1cc7=function(){return _0x26b261;};return a60_0x1cc7();}import{getEnv}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x59f7d8,_0x55036d){const _0x3b805a=a60_0x16bb,_0x84994e=getEnv();logger[_0x3b805a(0x208)](_0x3b805a(0x218),_0x84994e===_0x3b805a(0x1fb)?_0x3b805a(0x217)+_0x59f7d8+')':_0x3b805a(0x202)+_0x59f7d8+')');const _0x323d11=await platformFetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x59f7d8,{'cookie':_0x55036d,'label':'Fetch\x20menu\x20list'});if(!_0x323d11)return logger[_0x3b805a(0x208)]('get-online-menu-list',_0x3b805a(0x206)),[];return logger[_0x3b805a(0x208)]('get-online-menu-list',_0x3b805a(0x216)+_0x323d11['length']+_0x3b805a(0x219)),_0x323d11[_0x3b805a(0x20e)](flattenMenuItem)[_0x3b805a(0x20d)]();}function flattenMenuItem(_0x285f2f){const _0x88b34e=a60_0x16bb;let _0x1001ed=[];try{if(_0x285f2f[_0x88b34e(0x210)]?.[_0x88b34e(0x20b)]){const _0x24ec88=JSON[_0x88b34e(0x1ff)](_0x285f2f[_0x88b34e(0x210)][_0x88b34e(0x20b)]);if(Array[_0x88b34e(0x214)](_0x24ec88))_0x1001ed=_0x24ec88;}}catch{}const _0x392602=[{'id':_0x285f2f['id'],'path':_0x285f2f['path'],'label':_0x285f2f[_0x88b34e(0x1fa)],'resources':_0x1001ed}];if(_0x285f2f['children']&&_0x285f2f[_0x88b34e(0x20f)][_0x88b34e(0x1fd)]>0x0)for(const _0x231d49 of _0x285f2f[_0x88b34e(0x20f)]){_0x392602[_0x88b34e(0x1f4)](...flattenMenuItem(_0x231d49));}return _0x392602;}export async function createMenu(_0x7997ce,_0x40c9fd,_0x4ba00a){const _0x1428fc=a60_0x16bb;logger[_0x1428fc(0x208)](_0x1428fc(0x21a),_0x1428fc(0x1fe)+_0x4ba00a[_0x1428fc(0x1fa)]+'\x20('+_0x4ba00a[_0x1428fc(0x1fc)]+')');const _0xf455f8={'appCode':_0x7997ce,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x1428fc(0x1f5),'resources':_0x4ba00a['resources']?JSON[_0x1428fc(0x1f8)](_0x4ba00a[_0x1428fc(0x20b)]):undefined},..._0x4ba00a};await platformFetch(getApiDomain()+_0x1428fc(0x20c),{'method':_0x1428fc(0x203),'body':_0xf455f8,'cookie':_0x40c9fd,'label':_0x1428fc(0x215)+_0x4ba00a[_0x1428fc(0x1fa)]+'\x22'}),logger[_0x1428fc(0x208)](_0x1428fc(0x21a),_0x1428fc(0x209)+_0x4ba00a[_0x1428fc(0x1fa)]);}async function createSingleMenu(_0x27563f,_0x5ad685,_0x12446d,_0x5095bf){const _0xbf0884=a60_0x16bb,_0x111d4b={'appCode':_0x27563f,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0xbf0884(0x1f5),'resources':_0x5095bf?JSON[_0xbf0884(0x1f8)](_0x5095bf):undefined},'label':_0x12446d[_0xbf0884(0x1fa)],'path':_0x12446d[_0xbf0884(0x1fc)]};await platformFetch(getApiDomain()+_0xbf0884(0x20c),{'method':_0xbf0884(0x203),'body':_0x111d4b,'cookie':_0x5ad685,'label':_0xbf0884(0x215)+_0x12446d[_0xbf0884(0x1fa)]+'\x22'}),logger['info'](_0xbf0884(0x21a),_0xbf0884(0x209)+_0x12446d[_0xbf0884(0x1fa)]);}export async function createMenus(_0x219894,_0x8fc1b4,_0x350f51,_0x55638c){const _0x4d90dd=a60_0x16bb;logger[_0x4d90dd(0x208)](_0x4d90dd(0x1f6),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x350f51[_0x4d90dd(0x1fd)]),await Promise['all'](_0x350f51[_0x4d90dd(0x20e)](_0x311a31=>createSingleMenu(_0x219894,_0x8fc1b4,_0x311a31,_0x55638c))),logger['info'](_0x4d90dd(0x1f6),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x350f51[_0x4d90dd(0x1fd)]);}function a60_0x16bb(_0x3ca60a,_0x4eb33c){_0x3ca60a=_0x3ca60a-0x1f2;const _0x1cc7d7=a60_0x1cc7();let _0x16bb3a=_0x1cc7d7[_0x3ca60a];return _0x16bb3a;}export async function updateMenuCdnUrl(_0x5db536,_0x1dee54,_0x41ef61){const _0x4771db=a60_0x16bb;logger[_0x4771db(0x208)](_0x4771db(0x1f2),_0x4771db(0x211)+_0x41ef61[_0x4771db(0x1fa)]+'\x20('+_0x41ef61[_0x4771db(0x1fc)]+')');const _0xe1cc97={'id':_0x41ef61['id'],'appCode':_0x5db536,'extend':{'loadScriptMode':_0x4771db(0x1f5),'resources':_0x41ef61['resources']?JSON['stringify'](_0x41ef61[_0x4771db(0x20b)]):undefined}};await platformFetch(getApiDomain()+_0x4771db(0x212),{'method':_0x4771db(0x203),'body':_0xe1cc97,'cookie':_0x1dee54,'label':'Update\x20menu\x20assets\x20\x22'+_0x41ef61[_0x4771db(0x1fa)]+'\x22'}),logger['info'](_0x4771db(0x1f2),_0x4771db(0x20a)+_0x41ef61[_0x4771db(0x1fa)],undefined);}
1
+ (function(_0x41460c,_0x5dd534){const _0x5267f7=a59_0x2ac1,_0x4a1a0e=_0x41460c();while(!![]){try{const _0x202fb2=parseInt(_0x5267f7(0x156))/0x1+-parseInt(_0x5267f7(0x171))/0x2+parseInt(_0x5267f7(0x160))/0x3+parseInt(_0x5267f7(0x150))/0x4*(-parseInt(_0x5267f7(0x16f))/0x5)+-parseInt(_0x5267f7(0x16a))/0x6*(parseInt(_0x5267f7(0x159))/0x7)+-parseInt(_0x5267f7(0x163))/0x8+-parseInt(_0x5267f7(0x14f))/0x9*(-parseInt(_0x5267f7(0x170))/0xa);if(_0x202fb2===_0x5dd534)break;else _0x4a1a0e['push'](_0x4a1a0e['shift']());}catch(_0x28f878){_0x4a1a0e['push'](_0x4a1a0e['shift']());}}}(a59_0x3117,0xc69f1));import{getApiDomain}from'../../../constant/domain.js';import{getEnv}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';import{platformFetch}from'../../../core/api-client.js';export async function getOnlineMenuList(_0x25e36d,_0x88dd08){const _0x540866=a59_0x2ac1,_0x5c4714=getEnv();logger['info'](_0x540866(0x157),_0x5c4714==='online'?_0x540866(0x177)+_0x25e36d+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x25e36d+')');const _0x45060a=await platformFetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x25e36d,{'cookie':_0x88dd08,'label':_0x540866(0x151)});if(!_0x45060a)return logger[_0x540866(0x172)]('get-online-menu-list',_0x540866(0x175)),[];return logger['info']('get-online-menu-list','Fetched\x20'+_0x45060a[_0x540866(0x158)]+_0x540866(0x174)),_0x45060a[_0x540866(0x15a)](flattenMenuItem)[_0x540866(0x164)]();}function flattenMenuItem(_0x1f43cd){const _0x16eb17=a59_0x2ac1;let _0x27f3bd=[];try{if(_0x1f43cd['extend']?.[_0x16eb17(0x15e)]){const _0x1ccfcc=JSON[_0x16eb17(0x173)](_0x1f43cd['extend'][_0x16eb17(0x15e)]);if(Array[_0x16eb17(0x16b)](_0x1ccfcc))_0x27f3bd=_0x1ccfcc;}}catch{}const _0x254bbe=[{'id':_0x1f43cd['id'],'path':_0x1f43cd['path'],'label':_0x1f43cd[_0x16eb17(0x162)],'resources':_0x27f3bd}];if(_0x1f43cd[_0x16eb17(0x16e)]&&_0x1f43cd['children'][_0x16eb17(0x158)]>0x0)for(const _0x2dcc5d of _0x1f43cd[_0x16eb17(0x16e)]){_0x254bbe[_0x16eb17(0x14e)](...flattenMenuItem(_0x2dcc5d));}return _0x254bbe;}export async function createMenu(_0x162b62,_0x5f1467,_0x3b216f){const _0x4407e4=a59_0x2ac1;logger[_0x4407e4(0x172)](_0x4407e4(0x15c),_0x4407e4(0x165)+_0x3b216f[_0x4407e4(0x162)]+'\x20('+_0x3b216f[_0x4407e4(0x152)]+')');const _0x2b80b2={'appCode':_0x162b62,'type':_0x4407e4(0x16c),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x3b216f[_0x4407e4(0x15e)]?JSON['stringify'](_0x3b216f[_0x4407e4(0x15e)]):undefined},..._0x3b216f};await platformFetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x4407e4(0x16d),'body':_0x2b80b2,'cookie':_0x5f1467,'label':_0x4407e4(0x155)+_0x3b216f[_0x4407e4(0x162)]+'\x22'}),logger['info'](_0x4407e4(0x15c),_0x4407e4(0x15f)+_0x3b216f[_0x4407e4(0x162)]);}async function createSingleMenu(_0x1f3dd5,_0x2eb1b3,_0x34d8cc,_0x430bdd){const _0x1c353e=a59_0x2ac1,_0x4a7f37={'appCode':_0x1f3dd5,'type':_0x1c353e(0x16c),'sort':0x0,'extend':{'loadScriptMode':_0x1c353e(0x167),'resources':_0x430bdd?JSON[_0x1c353e(0x15d)](_0x430bdd):undefined},'label':_0x34d8cc[_0x1c353e(0x162)],'path':_0x34d8cc['path']};await platformFetch(getApiDomain()+_0x1c353e(0x169),{'method':_0x1c353e(0x16d),'body':_0x4a7f37,'cookie':_0x2eb1b3,'label':'Create\x20menu\x20\x22'+_0x34d8cc[_0x1c353e(0x162)]+'\x22'}),logger[_0x1c353e(0x172)](_0x1c353e(0x15c),_0x1c353e(0x15f)+_0x34d8cc[_0x1c353e(0x162)]);}function a59_0x2ac1(_0x5e74cf,_0x42fa6a){_0x5e74cf=_0x5e74cf-0x14e;const _0x311707=a59_0x3117();let _0x2ac1b9=_0x311707[_0x5e74cf];return _0x2ac1b9;}export async function createMenus(_0x5e8ee2,_0x2bbc54,_0x43ef81,_0x35465c){const _0x18ba29=a59_0x2ac1;logger[_0x18ba29(0x172)]('create-menus','Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x43ef81[_0x18ba29(0x158)]),await Promise[_0x18ba29(0x166)](_0x43ef81[_0x18ba29(0x15a)](_0x47e8f9=>createSingleMenu(_0x5e8ee2,_0x2bbc54,_0x47e8f9,_0x35465c))),logger[_0x18ba29(0x172)](_0x18ba29(0x176),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x43ef81[_0x18ba29(0x158)]);}function a59_0x3117(){const _0x3a0cce=['Updating\x20menu\x20asset\x20links:\x20','label','1171912HQberd','flat','Creating\x20menu:\x20','all','import','Menu\x20assets\x20synced:\x20','/smartapi/menu/create','39288RdNeOR','isArray','procode','POST','children','105egUZNd','5980970LxSkdN','323224atgNuE','info','parse','\x20online\x20menus\x20successfully','Server\x20returned\x20empty\x20menu\x20list','create-menus','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','push','9HCScYX','127676bwQivv','Fetch\x20menu\x20list','path','/smartapi/menu/update','update-menu-cdn-url','Create\x20menu\x20\x22','1425375SxEDao','get-online-menu-list','length','371uFrWZb','map','Update\x20menu\x20assets\x20\x22','create-menu','stringify','resources','Menu\x20created\x20successfully:\x20','346575uKHDUm'];a59_0x3117=function(){return _0x3a0cce;};return a59_0x3117();}export async function updateMenuCdnUrl(_0x9444ea,_0x2f331d,_0x31f51f){const _0x4fef8f=a59_0x2ac1;logger[_0x4fef8f(0x172)](_0x4fef8f(0x154),_0x4fef8f(0x161)+_0x31f51f['label']+'\x20('+_0x31f51f[_0x4fef8f(0x152)]+')');const _0x595619={'id':_0x31f51f['id'],'appCode':_0x9444ea,'extend':{'loadScriptMode':_0x4fef8f(0x167),'resources':_0x31f51f[_0x4fef8f(0x15e)]?JSON[_0x4fef8f(0x15d)](_0x31f51f[_0x4fef8f(0x15e)]):undefined}};await platformFetch(getApiDomain()+_0x4fef8f(0x153),{'method':_0x4fef8f(0x16d),'body':_0x595619,'cookie':_0x2f331d,'label':_0x4fef8f(0x15b)+_0x31f51f[_0x4fef8f(0x162)]+'\x22'}),logger[_0x4fef8f(0x172)](_0x4fef8f(0x154),_0x4fef8f(0x168)+_0x31f51f['label'],undefined);}
@@ -1 +1 @@
1
- (function(_0x2c18b6,_0x4dc5b5){const _0x189046=a61_0x376b,_0x28b4ec=_0x2c18b6();while(!![]){try{const _0x42d670=parseInt(_0x189046(0x10a))/0x1+parseInt(_0x189046(0x120))/0x2*(parseInt(_0x189046(0x10b))/0x3)+parseInt(_0x189046(0x127))/0x4+-parseInt(_0x189046(0x132))/0x5*(parseInt(_0x189046(0x130))/0x6)+parseInt(_0x189046(0x121))/0x7*(-parseInt(_0x189046(0x131))/0x8)+-parseInt(_0x189046(0x10c))/0x9+parseInt(_0x189046(0x133))/0xa;if(_0x42d670===_0x4dc5b5)break;else _0x28b4ec['push'](_0x28b4ec['shift']());}catch(_0x5ab048){_0x28b4ec['push'](_0x28b4ec['shift']());}}}(a61_0x2c30,0x5ef72));import{getLocalPages}from'./local-pages.js';function a61_0x376b(_0x3a83cb,_0x498577){_0x3a83cb=_0x3a83cb-0x109;const _0x2c3032=a61_0x2c30();let _0x376b93=_0x2c3032[_0x3a83cb];return _0x376b93;}import{getOnlineMenuList,createMenus}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x5f32a4){const _0x2d59b7=a61_0x376b,_0x547d4c=[];return _0x5f32a4[_0x2d59b7(0x12e)]&&!isValidJsHttpsUrl(_0x5f32a4[_0x2d59b7(0x12e)])&&_0x547d4c[_0x2d59b7(0x134)]({'field':_0x2d59b7(0x12e),'message':_0x2d59b7(0x11b)}),_0x5f32a4[_0x2d59b7(0x11c)]&&!isValidCssHttpsUrl(_0x5f32a4[_0x2d59b7(0x11c)])&&_0x547d4c[_0x2d59b7(0x134)]({'field':_0x2d59b7(0x11c),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x547d4c;}export async function runMenuSyncCore(_0x48d8ff,_0xa428d8,_0x51f6c3=[],_0x20dfdd){const _0x47530f=a61_0x376b,_0x5ea110=parseParamsFlag(_0x20dfdd),_0x5a8d08=_0x51f6c3[_0x47530f(0x12a)]>0x0?_0x51f6c3:_0x5ea110[_0x47530f(0x12d)],_0x37281c=_0x5ea110['jsUrl'],_0x1a495b=_0x5ea110[_0x47530f(0x11c)],_0x275a4d=[];if(_0x37281c)_0x275a4d['push'](_0x37281c);if(_0x1a495b)_0x275a4d[_0x47530f(0x134)](_0x1a495b);const _0x14b873=validateParams(_0x5ea110);if(_0x14b873['length']>0x0){const _0x1fef98=_0x14b873['map'](_0x2a86a6=>_0x47530f(0x12f)+_0x2a86a6[_0x47530f(0x10f)]+':\x20'+_0x2a86a6[_0x47530f(0x118)])[_0x47530f(0x122)](';\x20');throw new Error(_0x47530f(0x117)+_0x1fef98);}logger[_0x47530f(0x124)](process[_0x47530f(0x10e)]()),logger[_0x47530f(0x110)](_0x47530f(0x12c),_0x47530f(0x119),{'appCode':_0x48d8ff,'selectedCount':_0x5a8d08?.[_0x47530f(0x12a)],'jsUrl':_0x37281c,'cssUrl':_0x1a495b});if(_0x37281c){const _0x2c4faa=await isUrlReachable(_0x37281c);if(!_0x2c4faa)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x37281c);}if(_0x1a495b){const _0x16ac7e=await isUrlReachable(_0x1a495b);if(!_0x16ac7e)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x1a495b);}const _0x513d2b=getLocalPages();if(_0x513d2b['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x45c899=await getOnlineMenuList(_0x48d8ff,_0xa428d8),_0x230ee7=new Set(_0x45c899['map'](_0x44acc0=>_0x44acc0[_0x47530f(0x12b)]));let _0x5467cf;if(_0x5a8d08&&_0x5a8d08['length']>0x0){const _0x1807c8=new Set(_0x5a8d08[_0x47530f(0x125)](_0x46fdd6=>_0x46fdd6[_0x47530f(0x11d)]()));_0x5467cf=_0x513d2b[_0x47530f(0x11a)](_0x2ad9e4=>_0x1807c8[_0x47530f(0x113)](_0x2ad9e4[_0x47530f(0x129)]));if(_0x5467cf[_0x47530f(0x12a)]===0x0){const _0x25589d=_0x513d2b[_0x47530f(0x125)](_0x45bb55=>_0x45bb55[_0x47530f(0x129)])[_0x47530f(0x122)](',\x20');throw new Error(_0x47530f(0x11f)+[..._0x1807c8][_0x47530f(0x122)](',\x20')+_0x47530f(0x126)+_0x25589d);}}else _0x5467cf=_0x513d2b[_0x47530f(0x11a)](_0x1793d9=>!_0x230ee7['has'](_0x1793d9[_0x47530f(0x12b)]));if(_0x5467cf[_0x47530f(0x12a)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x48d8ff,_0xa428d8,_0x5467cf,_0x275a4d[_0x47530f(0x12a)]>0x0?_0x275a4d:undefined),logger['info']('menu-sync',_0x47530f(0x10d),{'count':_0x5467cf[_0x47530f(0x12a)],'resources':_0x275a4d}),{'created':_0x5467cf[_0x47530f(0x12a)],'skipped':![],'targetPages':_0x5467cf};}function a61_0x2c30(){const _0x421703=['data','Invalid\x20--params:\x20','message','Start\x20non-interactive\x20menu\x20sync','filter','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','cssUrl','trim','object','No\x20local\x20pages\x20matched\x20labels:\x20','2QpAnOM','3668189HwGqfb','join','end','setLogPath','map','\x0a\x20\x20Available\x20local\x20pages:\x20','768956HUglTc','split','label','length','path','menu-sync','selectedLabels','jsUrl','--params.','8622UxbOiE','8cpBEKV','305GkBhys','4730690xHCxCa','push','concat','string','262946IOYtNj','590007hADSMB','1118349aOoKPv','Menu\x20sync\x20completed','cwd','field','info','parse','readableEnded','has','stdin','pages'];a61_0x2c30=function(){return _0x421703;};return a61_0x2c30();}export async function readPageLabelsFromStdin(){const _0xb2b273=a61_0x376b;if(!process[_0xb2b273(0x114)]['isTTY']&&!process[_0xb2b273(0x114)][_0xb2b273(0x112)])return new Promise(_0x595947=>{const _0x17c480=_0xb2b273,_0x1aa641=[];process[_0x17c480(0x114)]['on'](_0x17c480(0x116),_0x457596=>_0x1aa641['push'](_0x457596)),process['stdin']['on'](_0x17c480(0x123),()=>{const _0x3d3f65=_0x17c480,_0x31bccc=Buffer[_0x3d3f65(0x135)](_0x1aa641)['toString']('utf8'),_0x25bd18=_0x31bccc[_0x3d3f65(0x128)]('\x0a')[_0x3d3f65(0x125)](_0x2ebaa1=>_0x2ebaa1['trim']())[_0x3d3f65(0x11a)](_0x4f222b=>_0x4f222b[_0x3d3f65(0x12a)]>0x0&&!_0x4f222b['startsWith']('#'));_0x595947(_0x25bd18);}),setTimeout(()=>_0x595947([]),0x1f4);});return[];}function parseParamsFlag(_0x53df67){const _0x300de6=a61_0x376b;if(!_0x53df67||typeof _0x53df67!==_0x300de6(0x109))return{};try{const _0x4d1b69=JSON[_0x300de6(0x111)](_0x53df67);if(typeof _0x4d1b69!==_0x300de6(0x11e)||_0x4d1b69===null||Array['isArray'](_0x4d1b69))return{};return{'selectedLabels':Array['isArray'](_0x4d1b69[_0x300de6(0x115)])?_0x4d1b69['pages'][_0x300de6(0x125)](String):undefined,'jsUrl':typeof _0x4d1b69[_0x300de6(0x12e)]===_0x300de6(0x109)?_0x4d1b69[_0x300de6(0x12e)]['trim']():undefined,'cssUrl':typeof _0x4d1b69[_0x300de6(0x11c)]==='string'?_0x4d1b69[_0x300de6(0x11c)][_0x300de6(0x11d)]():undefined};}catch{return{};}}
1
+ (function(_0x195709,_0x405004){const _0x3d34b2=a60_0x4af7,_0x24ea1a=_0x195709();while(!![]){try{const _0x3127f2=-parseInt(_0x3d34b2(0x1ae))/0x1+parseInt(_0x3d34b2(0x1b6))/0x2+parseInt(_0x3d34b2(0x197))/0x3+parseInt(_0x3d34b2(0x1c2))/0x4*(-parseInt(_0x3d34b2(0x1a0))/0x5)+-parseInt(_0x3d34b2(0x1ba))/0x6*(-parseInt(_0x3d34b2(0x196))/0x7)+parseInt(_0x3d34b2(0x1ad))/0x8*(parseInt(_0x3d34b2(0x1ac))/0x9)+-parseInt(_0x3d34b2(0x1a4))/0xa*(parseInt(_0x3d34b2(0x198))/0xb);if(_0x3127f2===_0x405004)break;else _0x24ea1a['push'](_0x24ea1a['shift']());}catch(_0x18ed19){_0x24ea1a['push'](_0x24ea1a['shift']());}}}(a60_0x2aa6,0x32734));import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus}from'./service.js';function a60_0x4af7(_0x360828,_0x16a235){_0x360828=_0x360828-0x196;const _0x2aa6c1=a60_0x2aa6();let _0x4af757=_0x2aa6c1[_0x360828];return _0x4af757;}function a60_0x2aa6(){const _0x5db4fc=['Start\x20non-interactive\x20menu\x20sync','Invalid\x20--params:\x20','startsWith','join','10uSaBpO','stdin','concat','No\x20local\x20pages\x20matched\x20labels:\x20','150WSFnDG','string','map','has','\x0a\x20\x20Available\x20local\x20pages:\x20','parse','filter','trim','45SBSxDm','238024neShsi','373068wkJJyY','label','split','info','Menu\x20sync\x20completed','CSS\x20URL\x20is\x20unreachable:\x20','toString','length','756964lcCqrP','cssUrl','push','setLogPath','7692dtHFCC','path','readableEnded','isArray','selectedLabels','isTTY','pages','jsUrl','63556BndWua','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','1771dJprqv','730266Gaqtqk','354585WtOqcL','utf8','field','message'];a60_0x2aa6=function(){return _0x5db4fc;};return a60_0x2aa6();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x27e2e4){const _0x341c70=a60_0x4af7,_0x37f63f=[];return _0x27e2e4[_0x341c70(0x1c1)]&&!isValidJsHttpsUrl(_0x27e2e4[_0x341c70(0x1c1)])&&_0x37f63f[_0x341c70(0x1b8)]({'field':_0x341c70(0x1c1),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x27e2e4[_0x341c70(0x1b7)]&&!isValidCssHttpsUrl(_0x27e2e4[_0x341c70(0x1b7)])&&_0x37f63f[_0x341c70(0x1b8)]({'field':_0x341c70(0x1b7),'message':_0x341c70(0x1c3)}),_0x37f63f;}export async function runMenuSyncCore(_0x3678e9,_0x2d40ce,_0x11a5f5=[],_0x39e5ea){const _0x4b6736=a60_0x4af7,_0x7abc42=parseParamsFlag(_0x39e5ea),_0x78536e=_0x11a5f5[_0x4b6736(0x1b5)]>0x0?_0x11a5f5:_0x7abc42[_0x4b6736(0x1be)],_0x2d06b9=_0x7abc42[_0x4b6736(0x1c1)],_0x15d5d4=_0x7abc42[_0x4b6736(0x1b7)],_0x3ebd46=[];if(_0x2d06b9)_0x3ebd46[_0x4b6736(0x1b8)](_0x2d06b9);if(_0x15d5d4)_0x3ebd46[_0x4b6736(0x1b8)](_0x15d5d4);const _0x52f246=validateParams(_0x7abc42);if(_0x52f246[_0x4b6736(0x1b5)]>0x0){const _0x5be6c5=_0x52f246[_0x4b6736(0x1a6)](_0x4ae03a=>'--params.'+_0x4ae03a[_0x4b6736(0x19a)]+':\x20'+_0x4ae03a[_0x4b6736(0x19b)])['join'](';\x20');throw new Error(_0x4b6736(0x19d)+_0x5be6c5);}logger[_0x4b6736(0x1b9)](process['cwd']()),logger[_0x4b6736(0x1b1)]('menu-sync',_0x4b6736(0x19c),{'appCode':_0x3678e9,'selectedCount':_0x78536e?.[_0x4b6736(0x1b5)],'jsUrl':_0x2d06b9,'cssUrl':_0x15d5d4});if(_0x2d06b9){const _0x17246f=await isUrlReachable(_0x2d06b9);if(!_0x17246f)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x2d06b9);}if(_0x15d5d4){const _0x5a90ea=await isUrlReachable(_0x15d5d4);if(!_0x5a90ea)throw new Error(_0x4b6736(0x1b3)+_0x15d5d4);}const _0x48ce9a=getLocalPages();if(_0x48ce9a[_0x4b6736(0x1b5)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x4594eb=await getOnlineMenuList(_0x3678e9,_0x2d40ce),_0x4ade03=new Set(_0x4594eb['map'](_0x75936e=>_0x75936e[_0x4b6736(0x1bb)]));let _0x4987c3;if(_0x78536e&&_0x78536e['length']>0x0){const _0x49470f=new Set(_0x78536e['map'](_0x32b539=>_0x32b539[_0x4b6736(0x1ab)]()));_0x4987c3=_0x48ce9a[_0x4b6736(0x1aa)](_0x290040=>_0x49470f[_0x4b6736(0x1a7)](_0x290040[_0x4b6736(0x1af)]));if(_0x4987c3[_0x4b6736(0x1b5)]===0x0){const _0x3c6c46=_0x48ce9a['map'](_0x3edb50=>_0x3edb50['label'])['join'](',\x20');throw new Error(_0x4b6736(0x1a3)+[..._0x49470f][_0x4b6736(0x19f)](',\x20')+_0x4b6736(0x1a8)+_0x3c6c46);}}else _0x4987c3=_0x48ce9a['filter'](_0x4907d1=>!_0x4ade03[_0x4b6736(0x1a7)](_0x4907d1[_0x4b6736(0x1bb)]));if(_0x4987c3[_0x4b6736(0x1b5)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x3678e9,_0x2d40ce,_0x4987c3,_0x3ebd46[_0x4b6736(0x1b5)]>0x0?_0x3ebd46:undefined),logger[_0x4b6736(0x1b1)]('menu-sync',_0x4b6736(0x1b2),{'count':_0x4987c3['length'],'resources':_0x3ebd46}),{'created':_0x4987c3[_0x4b6736(0x1b5)],'skipped':![],'targetPages':_0x4987c3};}export async function readPageLabelsFromStdin(){const _0x1b93ea=a60_0x4af7;if(!process[_0x1b93ea(0x1a1)][_0x1b93ea(0x1bf)]&&!process['stdin'][_0x1b93ea(0x1bc)])return new Promise(_0x2a3cac=>{const _0x52b873=_0x1b93ea,_0x31c40b=[];process[_0x52b873(0x1a1)]['on']('data',_0x46666b=>_0x31c40b['push'](_0x46666b)),process[_0x52b873(0x1a1)]['on']('end',()=>{const _0x57f3cd=_0x52b873,_0x440b02=Buffer[_0x57f3cd(0x1a2)](_0x31c40b)[_0x57f3cd(0x1b4)](_0x57f3cd(0x199)),_0x4f523d=_0x440b02[_0x57f3cd(0x1b0)]('\x0a')[_0x57f3cd(0x1a6)](_0x3b4da0=>_0x3b4da0[_0x57f3cd(0x1ab)]())[_0x57f3cd(0x1aa)](_0x25713d=>_0x25713d[_0x57f3cd(0x1b5)]>0x0&&!_0x25713d[_0x57f3cd(0x19e)]('#'));_0x2a3cac(_0x4f523d);}),setTimeout(()=>_0x2a3cac([]),0x1f4);});return[];}function parseParamsFlag(_0x185513){const _0xa4092d=a60_0x4af7;if(!_0x185513||typeof _0x185513!==_0xa4092d(0x1a5))return{};try{const _0x4304df=JSON[_0xa4092d(0x1a9)](_0x185513);if(typeof _0x4304df!=='object'||_0x4304df===null||Array['isArray'](_0x4304df))return{};return{'selectedLabels':Array[_0xa4092d(0x1bd)](_0x4304df[_0xa4092d(0x1c0)])?_0x4304df[_0xa4092d(0x1c0)][_0xa4092d(0x1a6)](String):undefined,'jsUrl':typeof _0x4304df[_0xa4092d(0x1c1)]===_0xa4092d(0x1a5)?_0x4304df[_0xa4092d(0x1c1)][_0xa4092d(0x1ab)]():undefined,'cssUrl':typeof _0x4304df[_0xa4092d(0x1b7)]==='string'?_0x4304df[_0xa4092d(0x1b7)][_0xa4092d(0x1ab)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a63_0x2a33(_0x1aa543,_0x7979e4){_0x1aa543=_0x1aa543-0x69;const _0x460023=a63_0x4600();let _0x2a33d5=_0x460023[_0x1aa543];return _0x2a33d5;}(function(_0x3f1308,_0x25b855){const _0x1eaa25=a63_0x2a33,_0x479419=_0x3f1308();while(!![]){try{const _0x5b5153=parseInt(_0x1eaa25(0x77))/0x1*(-parseInt(_0x1eaa25(0x7f))/0x2)+-parseInt(_0x1eaa25(0x8e))/0x3+-parseInt(_0x1eaa25(0x8a))/0x4*(-parseInt(_0x1eaa25(0x6a))/0x5)+-parseInt(_0x1eaa25(0x6b))/0x6+parseInt(_0x1eaa25(0x80))/0x7+parseInt(_0x1eaa25(0x7e))/0x8*(-parseInt(_0x1eaa25(0x76))/0x9)+parseInt(_0x1eaa25(0x88))/0xa*(parseInt(_0x1eaa25(0x70))/0xb);if(_0x5b5153===_0x25b855)break;else _0x479419['push'](_0x479419['shift']());}catch(_0x3bb48a){_0x479419['push'](_0x479419['shift']());}}}(a63_0x4600,0xf205c));import{updateMenuCdnUrl,getOnlineMenuList}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';function a63_0x4600(){const _0x8153c1=['5056689XJdpWm','isArray','--params.','jsUrl','allSettled','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','18FPOQDx','437908SPXPJr','string','menu-update','Invalid\x20--params:\x20','Start\x20non-interactive\x20menu\x20update','filter','label','225616JCIbJG','6yDpXYI','12122096NPWbFC','field','parse','resources','setLogPath','status','map','CSS\x20URL\x20is\x20unreachable:\x20','20ONXRjO','JS\x20URL\x20is\x20unreachable:\x20','5097452QkeJEF','info','rejected','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','321576bwjkcd','push','cssUrl','trim','5eHWJKp','8741070pOCiUw','join','length','cwd','object'];a63_0x4600=function(){return _0x8153c1;};return a63_0x4600();}import{logger}from'../../../utils/logger.js';function validateParams(_0x533465){const _0x174f28=a63_0x2a33,_0x25af4d=[];return _0x533465[_0x174f28(0x73)]&&!isValidJsHttpsUrl(_0x533465[_0x174f28(0x73)])&&_0x25af4d[_0x174f28(0x8f)]({'field':_0x174f28(0x73),'message':_0x174f28(0x8d)}),_0x533465['cssUrl']&&!isValidCssHttpsUrl(_0x533465[_0x174f28(0x90)])&&_0x25af4d[_0x174f28(0x8f)]({'field':_0x174f28(0x90),'message':_0x174f28(0x75)}),_0x25af4d;}export async function runMenuUpdateCore(_0xa3c23b,_0x5d113c,_0x743705){const _0x22498d=a63_0x2a33,_0x3adc3f=parseUpdateParamsFlag(_0x743705),_0x592fbf=[];if(_0x3adc3f[_0x22498d(0x73)])_0x592fbf[_0x22498d(0x8f)](_0x3adc3f[_0x22498d(0x73)]);if(_0x3adc3f[_0x22498d(0x90)])_0x592fbf[_0x22498d(0x8f)](_0x3adc3f[_0x22498d(0x90)]);const _0x134577=validateParams(_0x3adc3f);if(_0x134577[_0x22498d(0x6d)]>0x0){const _0x1348c8=_0x134577[_0x22498d(0x86)](_0x2f3bc1=>_0x22498d(0x72)+_0x2f3bc1[_0x22498d(0x81)]+':\x20'+_0x2f3bc1['message'])[_0x22498d(0x6c)](';\x20');throw new Error(_0x22498d(0x7a)+_0x1348c8);}logger[_0x22498d(0x84)](process[_0x22498d(0x6e)]()),logger[_0x22498d(0x8b)](_0x22498d(0x79),_0x22498d(0x7b),{'appCode':_0xa3c23b,'jsUrl':_0x3adc3f['jsUrl'],'cssUrl':_0x3adc3f[_0x22498d(0x90)]});if(_0x3adc3f[_0x22498d(0x73)]){const _0x332e6e=await isUrlReachable(_0x3adc3f[_0x22498d(0x73)]);if(!_0x332e6e)throw new Error(_0x22498d(0x89)+_0x3adc3f[_0x22498d(0x73)]);}if(_0x3adc3f[_0x22498d(0x90)]){const _0x23ba59=await isUrlReachable(_0x3adc3f[_0x22498d(0x90)]);if(!_0x23ba59)throw new Error(_0x22498d(0x87)+_0x3adc3f[_0x22498d(0x90)]);}const _0x260a39=await getOnlineMenuList(_0xa3c23b,_0x5d113c),_0x1dc1c3=_0x260a39[_0x22498d(0x7c)](_0x4654b3=>_0x4654b3[_0x22498d(0x83)][_0x22498d(0x6d)]>0x0);if(_0x1dc1c3[_0x22498d(0x6d)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x30ca97=await Promise[_0x22498d(0x74)](_0x1dc1c3[_0x22498d(0x86)](_0x5d4d1b=>updateMenuCdnUrl(_0xa3c23b,_0x5d113c,{'id':_0x5d4d1b['id'],'label':_0x5d4d1b[_0x22498d(0x7d)],'path':_0x5d4d1b['path'],'resources':_0x592fbf}))),_0x3fa60e=_0x30ca97[_0x22498d(0x7c)](_0x5acafe=>_0x5acafe[_0x22498d(0x85)]===_0x22498d(0x8c))[_0x22498d(0x6d)];return logger['info'](_0x22498d(0x79),'Menu\x20update\x20completed',{'count':_0x1dc1c3[_0x22498d(0x6d)],'resources':_0x592fbf}),{'updated':_0x1dc1c3['length']-_0x3fa60e,'failed':_0x3fa60e,'skipped':![]};}function parseUpdateParamsFlag(_0x31739a){const _0x226d64=a63_0x2a33;if(!_0x31739a||typeof _0x31739a!==_0x226d64(0x78))return{};try{const _0xfa8317=JSON[_0x226d64(0x82)](_0x31739a);if(typeof _0xfa8317!==_0x226d64(0x6f)||_0xfa8317===null||Array[_0x226d64(0x71)](_0xfa8317))return{};return{'jsUrl':typeof _0xfa8317[_0x226d64(0x73)]===_0x226d64(0x78)?_0xfa8317[_0x226d64(0x73)]['trim']():undefined,'cssUrl':typeof _0xfa8317[_0x226d64(0x90)]===_0x226d64(0x78)?_0xfa8317['cssUrl'][_0x226d64(0x69)]():undefined};}catch{return{};}}
1
+ function a62_0x4a2c(){const _0x2ca15c=['Invalid\x20--params:\x20','cssUrl','4009308xhhvNZ','map','info','99UxRiyj','filter','jsUrl','2482368zNFAEg','82420rEJBVT','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','195ELmZsq','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','status','1361414CVdwpF','length','Start\x20non-interactive\x20menu\x20update','setLogPath','11cdQzSY','rejected','message','path','trim','cwd','field','string','push','1sxHTEp','117488hRtIHX','parse','Menu\x20update\x20completed','7NaeXPs','isArray','34925316WJLbFE','--params.','5093360mRJWDl'];a62_0x4a2c=function(){return _0x2ca15c;};return a62_0x4a2c();}function a62_0x8c69(_0x7f6d1d,_0x76a053){_0x7f6d1d=_0x7f6d1d-0x176;const _0x4a2cc4=a62_0x4a2c();let _0x8c695e=_0x4a2cc4[_0x7f6d1d];return _0x8c695e;}(function(_0x17b0fb,_0x4baf4e){const _0x3eceb0=a62_0x8c69,_0x55f59c=_0x17b0fb();while(!![]){try{const _0x428825=-parseInt(_0x3eceb0(0x17d))/0x1*(parseInt(_0x3eceb0(0x194))/0x2)+-parseInt(_0x3eceb0(0x188))/0x3+-parseInt(_0x3eceb0(0x18f))/0x4*(-parseInt(_0x3eceb0(0x191))/0x5)+-parseInt(_0x3eceb0(0x18e))/0x6*(parseInt(_0x3eceb0(0x181))/0x7)+parseInt(_0x3eceb0(0x17e))/0x8*(parseInt(_0x3eceb0(0x18b))/0x9)+-parseInt(_0x3eceb0(0x185))/0xa+parseInt(_0x3eceb0(0x198))/0xb*(parseInt(_0x3eceb0(0x183))/0xc);if(_0x428825===_0x4baf4e)break;else _0x55f59c['push'](_0x55f59c['shift']());}catch(_0x50ba25){_0x55f59c['push'](_0x55f59c['shift']());}}}(a62_0x4a2c,0xe45d1));import{updateMenuCdnUrl,getOnlineMenuList}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x41b38b){const _0x3b5e2e=a62_0x8c69,_0x1f65ea=[];return _0x41b38b[_0x3b5e2e(0x18d)]&&!isValidJsHttpsUrl(_0x41b38b[_0x3b5e2e(0x18d)])&&_0x1f65ea[_0x3b5e2e(0x17c)]({'field':_0x3b5e2e(0x18d),'message':_0x3b5e2e(0x192)}),_0x41b38b['cssUrl']&&!isValidCssHttpsUrl(_0x41b38b['cssUrl'])&&_0x1f65ea[_0x3b5e2e(0x17c)]({'field':_0x3b5e2e(0x187),'message':_0x3b5e2e(0x190)}),_0x1f65ea;}export async function runMenuUpdateCore(_0x44aee1,_0x4fd57a,_0x425652){const _0x417c48=a62_0x8c69,_0x40f023=parseUpdateParamsFlag(_0x425652),_0x3f115c=[];if(_0x40f023[_0x417c48(0x18d)])_0x3f115c[_0x417c48(0x17c)](_0x40f023[_0x417c48(0x18d)]);if(_0x40f023[_0x417c48(0x187)])_0x3f115c[_0x417c48(0x17c)](_0x40f023[_0x417c48(0x187)]);const _0x388908=validateParams(_0x40f023);if(_0x388908[_0x417c48(0x195)]>0x0){const _0x973b29=_0x388908['map'](_0x4eb4e7=>_0x417c48(0x184)+_0x4eb4e7[_0x417c48(0x17a)]+':\x20'+_0x4eb4e7[_0x417c48(0x176)])['join'](';\x20');throw new Error(_0x417c48(0x186)+_0x973b29);}logger[_0x417c48(0x197)](process[_0x417c48(0x179)]()),logger[_0x417c48(0x18a)]('menu-update',_0x417c48(0x196),{'appCode':_0x44aee1,'jsUrl':_0x40f023[_0x417c48(0x18d)],'cssUrl':_0x40f023[_0x417c48(0x187)]});if(_0x40f023[_0x417c48(0x18d)]){const _0x3fc84d=await isUrlReachable(_0x40f023[_0x417c48(0x18d)]);if(!_0x3fc84d)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x40f023[_0x417c48(0x18d)]);}if(_0x40f023[_0x417c48(0x187)]){const _0xcfb446=await isUrlReachable(_0x40f023[_0x417c48(0x187)]);if(!_0xcfb446)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x40f023[_0x417c48(0x187)]);}const _0x3cccbb=await getOnlineMenuList(_0x44aee1,_0x4fd57a),_0x48dc28=_0x3cccbb[_0x417c48(0x18c)](_0x33471e=>_0x33471e['resources']['length']>0x0);if(_0x48dc28[_0x417c48(0x195)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x1970f1=await Promise['allSettled'](_0x48dc28[_0x417c48(0x189)](_0x87a3d9=>updateMenuCdnUrl(_0x44aee1,_0x4fd57a,{'id':_0x87a3d9['id'],'label':_0x87a3d9['label'],'path':_0x87a3d9[_0x417c48(0x177)],'resources':_0x3f115c}))),_0x32c0c2=_0x1970f1[_0x417c48(0x18c)](_0x43852e=>_0x43852e[_0x417c48(0x193)]===_0x417c48(0x199))['length'];return logger[_0x417c48(0x18a)]('menu-update',_0x417c48(0x180),{'count':_0x48dc28[_0x417c48(0x195)],'resources':_0x3f115c}),{'updated':_0x48dc28['length']-_0x32c0c2,'failed':_0x32c0c2,'skipped':![]};}function parseUpdateParamsFlag(_0x36f298){const _0x1098f4=a62_0x8c69;if(!_0x36f298||typeof _0x36f298!==_0x1098f4(0x17b))return{};try{const _0x279122=JSON[_0x1098f4(0x17f)](_0x36f298);if(typeof _0x279122!=='object'||_0x279122===null||Array[_0x1098f4(0x182)](_0x279122))return{};return{'jsUrl':typeof _0x279122['jsUrl']===_0x1098f4(0x17b)?_0x279122[_0x1098f4(0x18d)][_0x1098f4(0x178)]():undefined,'cssUrl':typeof _0x279122[_0x1098f4(0x187)]==='string'?_0x279122['cssUrl'][_0x1098f4(0x178)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a64_0x4de1(_0x2e44cb,_0x13132a){_0x2e44cb=_0x2e44cb-0xb1;const _0x2686f8=a64_0x2686();let _0x4de18a=_0x2686f8[_0x2e44cb];return _0x4de18a;}function a64_0x2686(){const _0x4f01f8=['4976QmTEiP','HEAD','3222lJodbC','423dUuMli','33070YreNpy','2hjvsRW','227973gxixEs','3sGkpVF','8112825YoFnPq','7580352fEkQwG','1078fbJjZz','3465844OmrTKs','test','trim','8150rEhZcf'];a64_0x2686=function(){return _0x4f01f8;};return a64_0x2686();}(function(_0x5dcf11,_0x32c488){const _0x59efd=a64_0x4de1,_0x16f360=_0x5dcf11();while(!![]){try{const _0x1a161d=-parseInt(_0x59efd(0xb7))/0x1*(parseInt(_0x59efd(0xb6))/0x2)+-parseInt(_0x59efd(0xb8))/0x3*(parseInt(_0x59efd(0xbc))/0x4)+-parseInt(_0x59efd(0xbf))/0x5*(-parseInt(_0x59efd(0xb3))/0x6)+parseInt(_0x59efd(0xb9))/0x7+-parseInt(_0x59efd(0xb1))/0x8*(-parseInt(_0x59efd(0xb4))/0x9)+parseInt(_0x59efd(0xb5))/0xa*(parseInt(_0x59efd(0xbb))/0xb)+-parseInt(_0x59efd(0xba))/0xc;if(_0x1a161d===_0x32c488)break;else _0x16f360['push'](_0x16f360['shift']());}catch(_0x509b6c){_0x16f360['push'](_0x16f360['shift']());}}}(a64_0x2686,0xa17e3));export function isValidJsHttpsUrl(_0x45abe3){const _0x40f7ce=a64_0x4de1;return/^https:\/\/.+\.js(\?.*)?$/[_0x40f7ce(0xbd)](_0x45abe3['trim']());}export function isValidCssHttpsUrl(_0x1389b4){const _0x23a455=a64_0x4de1;return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x1389b4[_0x23a455(0xbe)]());}export async function isUrlReachable(_0x268022){const _0x29c521=a64_0x4de1;try{const _0x5ba2e0=await fetch(_0x268022,{'method':_0x29c521(0xb2)});return _0x5ba2e0['ok'];}catch{return![];}}
1
+ function a63_0x39f4(){const _0x20b2bf=['HEAD','21091608lVlWQc','9032568cVbZuR','34424ETGkes','test','976187nvkauk','388654bkCpQp','2246455laWphL','5371458KufRvQ','7jlMAFB','228JgCZcG','trim'];a63_0x39f4=function(){return _0x20b2bf;};return a63_0x39f4();}function a63_0xb006(_0x451ca5,_0x557c86){_0x451ca5=_0x451ca5-0xb5;const _0x39f452=a63_0x39f4();let _0xb006cc=_0x39f452[_0x451ca5];return _0xb006cc;}(function(_0x49b62b,_0x598ca2){const _0x6c9f1b=a63_0xb006,_0x13ac03=_0x49b62b();while(!![]){try{const _0x3e75e9=-parseInt(_0x6c9f1b(0xbe))/0x1+parseInt(_0x6c9f1b(0xbf))/0x2+-parseInt(_0x6c9f1b(0xb7))/0x3*(-parseInt(_0x6c9f1b(0xbc))/0x4)+parseInt(_0x6c9f1b(0xc0))/0x5+-parseInt(_0x6c9f1b(0xb5))/0x6*(parseInt(_0x6c9f1b(0xb6))/0x7)+-parseInt(_0x6c9f1b(0xbb))/0x8+parseInt(_0x6c9f1b(0xba))/0x9;if(_0x3e75e9===_0x598ca2)break;else _0x13ac03['push'](_0x13ac03['shift']());}catch(_0x5a7772){_0x13ac03['push'](_0x13ac03['shift']());}}}(a63_0x39f4,0x9c6ad));export function isValidJsHttpsUrl(_0x30b917){const _0x4caca8=a63_0xb006;return/^https:\/\/.+\.js(\?.*)?$/['test'](_0x30b917[_0x4caca8(0xb8)]());}export function isValidCssHttpsUrl(_0x9cf506){const _0x402352=a63_0xb006;return/^https:\/\/.+\.css(\?.*)?$/[_0x402352(0xbd)](_0x9cf506[_0x402352(0xb8)]());}export async function isUrlReachable(_0x20b49c){const _0x54f0d7=a63_0xb006;try{const _0x213aa6=await fetch(_0x20b49c,{'method':_0x54f0d7(0xb9)});return _0x213aa6['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- function a65_0x2753(_0x55c8f3,_0x203d52){_0x55c8f3=_0x55c8f3-0xfd;const _0x50205a=a65_0x5020();let _0x27534f=_0x50205a[_0x55c8f3];return _0x27534f;}const a65_0x4f0d99=a65_0x2753;(function(_0x1d8324,_0x56b510){const _0x2a7e4e=a65_0x2753,_0x1ee605=_0x1d8324();while(!![]){try{const _0x457da6=-parseInt(_0x2a7e4e(0x11d))/0x1+parseInt(_0x2a7e4e(0x10b))/0x2+parseInt(_0x2a7e4e(0x111))/0x3+-parseInt(_0x2a7e4e(0xfd))/0x4+parseInt(_0x2a7e4e(0x10a))/0x5*(parseInt(_0x2a7e4e(0x131))/0x6)+parseInt(_0x2a7e4e(0x129))/0x7*(-parseInt(_0x2a7e4e(0x133))/0x8)+-parseInt(_0x2a7e4e(0x113))/0x9*(parseInt(_0x2a7e4e(0x100))/0xa);if(_0x457da6===_0x56b510)break;else _0x1ee605['push'](_0x1ee605['shift']());}catch(_0x51f900){_0x1ee605['push'](_0x1ee605['shift']());}}}(a65_0x5020,0xaec94));import a65_0x46762a from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'./shared/logic.js';import{renderCompareTable,renderSyncSummary}from'./shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'./shared/inquirer.js';import{CliErrors}from'../../errors.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'./shared/sync-core.js';import{getLocalPages}from'./shared/local-pages.js';export const menuSync={'service':'menu','command':'sync','description':a65_0x4f0d99(0x12d),'risk':a65_0x4f0d99(0x132),'flags':[{'name':'params','type':'string','description':'Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20'+a65_0x4f0d99(0x116)},{'name':a65_0x4f0d99(0xff),'type':a65_0x4f0d99(0x102),'description':a65_0x4f0d99(0x119)}],async 'execute'(_0x2bde8c){const _0x296a80=a65_0x4f0d99,_0x46b673=_0x2bde8c[_0x296a80(0x11e)](_0x296a80(0xff)),_0x1c2110=_0x2bde8c[_0x296a80(0x127)](_0x296a80(0x122)),_0x3242f5=parseParams(_0x1c2110),_0x5783c3=!!(_0x3242f5[_0x296a80(0x109)]||_0x3242f5[_0x296a80(0x134)]||_0x3242f5[_0x296a80(0x130)]&&_0x3242f5[_0x296a80(0x130)]['length']>0x0);if(_0x46b673||_0x5783c3){let _0x379a2f=[];!isInteractive()&&!_0x3242f5['pages']?.[_0x296a80(0x121)]&&(_0x379a2f=await readPageLabelsFromStdin());const _0x13266a=await runMenuSyncCore(_0x2bde8c[_0x296a80(0xfe)],_0x2bde8c[_0x296a80(0x10d)],_0x379a2f['length']>0x0?_0x379a2f:_0x3242f5[_0x296a80(0x130)]??[],_0x1c2110);if(_0x13266a[_0x296a80(0x11a)]){const _0x481c9a=getLocalPages();_0x481c9a['length']===0x0?console['log'](_0x296a80(0x124)):console['log'](_0x296a80(0x10f));}else console[_0x296a80(0x128)](_0x296a80(0x106)+_0x13266a[_0x296a80(0x101)]+_0x296a80(0x12b));return{'ok':!![]};}requireInteractive();const _0x33c81c=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x269fce,_0x12cb73,_0x157657;try{const _0x5d0e2c=await fetchMenuData(_0x2bde8c['appCode'],_0x2bde8c[_0x296a80(0x10d)]);_0x269fce=_0x5d0e2c[_0x296a80(0x11f)],_0x12cb73=_0x5d0e2c[_0x296a80(0x138)],_0x157657=_0x5d0e2c[_0x296a80(0x11b)],stopSpinner(_0x33c81c,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x4ee5ac){stopSpinner(_0x33c81c,_0x296a80(0x107),![]);throw CliErrors[_0x296a80(0x12a)](_0x4ee5ac instanceof Error?_0x4ee5ac[_0x296a80(0x112)]:_0x296a80(0x107));}if(_0x269fce[_0x296a80(0x121)]===0x0)return console['log'](a65_0x46762a[_0x296a80(0x110)](_0x296a80(0x12f))),{'ok':!![]};const _0x5e5398=buildCompareRows(_0x269fce,_0x12cb73);console[_0x296a80(0x128)](renderCompareTable(_0x5e5398)),console[_0x296a80(0x128)]();const _0x3a5d11=_0x3242f5[_0x296a80(0x130)],_0x3338ee=await selectPages(_0x269fce,_0x12cb73,_0x3a5d11);console[_0x296a80(0x128)](),console[_0x296a80(0x128)](a65_0x46762a[_0x296a80(0x118)](_0x296a80(0x10e)+_0x3338ee['length']+_0x296a80(0x126)));const _0x5f5b36=_0x3242f5[_0x296a80(0x109)]&&_0x3242f5[_0x296a80(0x134)];if(!_0x5f5b36){console['log'](renderSyncSummary(_0x3338ee,_0x12cb73['size']>0x0));const _0x2ff72b=await askConfirm(_0x296a80(0x120));if(!_0x2ff72b)return console[_0x296a80(0x128)](a65_0x46762a[_0x296a80(0x108)](_0x296a80(0x135))),{'ok':!![]};}let _0x112d15=_0x3242f5[_0x296a80(0x109)],_0x24beea=_0x3242f5[_0x296a80(0x134)];!_0x112d15&&(_0x112d15=await askJsUrl());!_0x24beea&&(_0x24beea=await askCssUrl());const _0x57b903=await askConfirm('\x20\x20Create\x20'+_0x3338ee[_0x296a80(0x121)]+_0x296a80(0x115)+_0x112d15+_0x296a80(0x104)+_0x24beea+'?');if(!_0x57b903)return console[_0x296a80(0x128)](a65_0x46762a[_0x296a80(0x108)](_0x296a80(0x135))),{'ok':!![]};const _0x2def55=[_0x112d15,_0x24beea],_0x267bde=startSpinner('Creating\x20'+_0x3338ee[_0x296a80(0x121)]+'\x20menu(s)...');try{const _0x270fea=await doCreateMenus(_0x2bde8c[_0x296a80(0xfe)],_0x2bde8c['cookie'],_0x3338ee,_0x2def55);return stopSpinner(_0x267bde,'Created\x20'+_0x270fea[_0x296a80(0x101)]+_0x296a80(0x136),!![]),{'ok':!![],'data':_0x270fea,'message':_0x296a80(0x105)+_0x270fea[_0x296a80(0x101)]+_0x296a80(0x117)+_0x270fea[_0x296a80(0x10c)]+_0x296a80(0x11c)};}catch(_0x1f07ba){stopSpinner(_0x267bde,_0x296a80(0x12e),![]);throw CliErrors[_0x296a80(0x12a)](_0x1f07ba instanceof Error?_0x1f07ba[_0x296a80(0x112)]:'Menu\x20creation\x20failed');}}};function a65_0x5020(){const _0x2c0d14=['283902DsdpZs','write','8XKQRmm','cssUrl','\x20\x20Cancelled.','\x20menu(s)','trim','onlinePaths','49996PqXgUl','appCode','yes','10HFPyUZ','created','boolean','isArray','\x20and\x20CSS:\x20','Menu\x20sync\x20completed:\x20','✓\x20Menu\x20sync\x20completed:\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','gray','jsUrl','125XIMrMk','878616NWTURI','failed','cookie','\x20\x20✓\x20Selected:\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','yellow','2952288ZoygVL','message','14285259WHWejc','string','\x20menu(s)\x20with\x20JS:\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','\x20created,\x20','cyan','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','skipped','onlineMenuList','\x20failed.','145464XaIKvz','flag','localPages','\x20\x20Continue\x20with\x20creation?','length','params','parse','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','object','\x20page(s)','str','log','1016337aQcTAH','validation','\x20menu(s)\x20created','map','Sync\x20local\x20pages\x20as\x20platform\x20menus','Menu\x20creation\x20failed','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','pages'];a65_0x5020=function(){return _0x2c0d14;};return a65_0x5020();}function parseParams(_0x4b99e2){const _0x3922c0=a65_0x4f0d99;if(!_0x4b99e2)return{};try{const _0x26c73f=JSON[_0x3922c0(0x123)](_0x4b99e2);if(typeof _0x26c73f!==_0x3922c0(0x125)||_0x26c73f===null||Array[_0x3922c0(0x103)](_0x26c73f))return{};return{'jsUrl':typeof _0x26c73f['jsUrl']==='string'?_0x26c73f[_0x3922c0(0x109)][_0x3922c0(0x137)]():undefined,'cssUrl':typeof _0x26c73f[_0x3922c0(0x134)]===_0x3922c0(0x114)?_0x26c73f[_0x3922c0(0x134)][_0x3922c0(0x137)]():undefined,'pages':Array[_0x3922c0(0x103)](_0x26c73f[_0x3922c0(0x130)])?_0x26c73f['pages'][_0x3922c0(0x12c)](String):undefined};}catch{return{};}}
1
+ const a64_0x56c1bb=a64_0x2d63;(function(_0x546b97,_0x3a12af){const _0x264a04=a64_0x2d63,_0x5e710f=_0x546b97();while(!![]){try{const _0x455bb4=-parseInt(_0x264a04(0x72))/0x1*(-parseInt(_0x264a04(0x6d))/0x2)+-parseInt(_0x264a04(0x96))/0x3*(parseInt(_0x264a04(0xa1))/0x4)+-parseInt(_0x264a04(0x73))/0x5*(parseInt(_0x264a04(0x9b))/0x6)+parseInt(_0x264a04(0x8d))/0x7+parseInt(_0x264a04(0x85))/0x8*(-parseInt(_0x264a04(0x7f))/0x9)+parseInt(_0x264a04(0x67))/0xa+parseInt(_0x264a04(0x8c))/0xb*(parseInt(_0x264a04(0x88))/0xc);if(_0x455bb4===_0x3a12af)break;else _0x5e710f['push'](_0x5e710f['shift']());}catch(_0x3761d7){_0x5e710f['push'](_0x5e710f['shift']());}}}(a64_0x2067,0x7f0ac));import a64_0x35a06f from'chalk';function a64_0x2067(){const _0x2165d9=['message','\x20\x20✓\x20Selected:\x20','2439010ACEoRG','gray','length','Creating\x20','appCode','object','642058SdpRkj','Online\x20menu\x20list\x20fetched','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','jsUrl','log','1hlUlCY','505ENbmfG','parse','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20created,\x20','\x20menu(s)\x20with\x20JS:\x20','map','cssUrl','Menu\x20sync\x20completed:\x20','\x20and\x20CSS:\x20','onlinePaths','\x20\x20Cancelled.','765qsbmFT','created','Sync\x20local\x20pages\x20as\x20platform\x20menus','yes','str','Failed\x20to\x20fetch\x20online\x20menu\x20list','18784fquXOO','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','skipped','27240IZjopj','validation','write','string','11aZhUlf','5206775gMKwcJ','pages','✓\x20Menu\x20sync\x20completed:\x20','\x20failed.','cyan','Fetching\x20online\x20menu\x20list...','\x20page(s)','params','trim','1559628bmNWIt','onlineMenuList','yellow','\x20\x20Continue\x20with\x20creation?','menu','4230twRjRT','\x20menu(s)','Menu\x20creation\x20failed','flag','cookie','\x20menu(s)\x20created','4KpRfnH','isArray'];a64_0x2067=function(){return _0x2165d9;};return a64_0x2067();}function a64_0x2d63(_0x2be0db,_0x14ac68){_0x2be0db=_0x2be0db-0x65;const _0x2067e1=a64_0x2067();let _0x2d633d=_0x2067e1[_0x2be0db];return _0x2d633d;}import{buildCompareRows,doCreateMenus,fetchMenuData}from'./shared/logic.js';import{renderCompareTable,renderSyncSummary}from'./shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'./shared/inquirer.js';import{CliErrors}from'../../errors.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'./shared/sync-core.js';import{getLocalPages}from'./shared/local-pages.js';export const menuSync={'service':a64_0x56c1bb(0x9a),'command':'sync','description':a64_0x56c1bb(0x81),'risk':a64_0x56c1bb(0x8a),'flags':[{'name':a64_0x56c1bb(0x94),'type':a64_0x56c1bb(0x8b),'description':a64_0x56c1bb(0x86)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}'},{'name':a64_0x56c1bb(0x82),'type':'boolean','description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0x2f0f2d){const _0x16f875=a64_0x56c1bb,_0x61b12=_0x2f0f2d[_0x16f875(0x9e)](_0x16f875(0x82)),_0x847f18=_0x2f0f2d[_0x16f875(0x83)](_0x16f875(0x94)),_0x47d080=parseParams(_0x847f18),_0x2838a7=!!(_0x47d080[_0x16f875(0x70)]||_0x47d080[_0x16f875(0x7a)]||_0x47d080[_0x16f875(0x8e)]&&_0x47d080[_0x16f875(0x8e)]['length']>0x0);if(_0x61b12||_0x2838a7){let _0x5c9c1c=[];!isInteractive()&&!_0x47d080[_0x16f875(0x8e)]?.[_0x16f875(0x69)]&&(_0x5c9c1c=await readPageLabelsFromStdin());const _0x2b4f11=await runMenuSyncCore(_0x2f0f2d[_0x16f875(0x6b)],_0x2f0f2d[_0x16f875(0x9f)],_0x5c9c1c['length']>0x0?_0x5c9c1c:_0x47d080['pages']??[],_0x847f18);if(_0x2b4f11[_0x16f875(0x87)]){const _0x31fa02=getLocalPages();_0x31fa02[_0x16f875(0x69)]===0x0?console[_0x16f875(0x71)](_0x16f875(0x75)):console[_0x16f875(0x71)](_0x16f875(0x76));}else console[_0x16f875(0x71)](_0x16f875(0x8f)+_0x2b4f11[_0x16f875(0x80)]+_0x16f875(0xa0));return{'ok':!![]};}requireInteractive();const _0x3ef13d=startSpinner(_0x16f875(0x92));let _0x183345,_0x7c5898,_0xfd9678;try{const _0x480fbe=await fetchMenuData(_0x2f0f2d[_0x16f875(0x6b)],_0x2f0f2d[_0x16f875(0x9f)]);_0x183345=_0x480fbe['localPages'],_0x7c5898=_0x480fbe[_0x16f875(0x7d)],_0xfd9678=_0x480fbe[_0x16f875(0x97)],stopSpinner(_0x3ef13d,_0x16f875(0x6e),!![]);}catch(_0x319a1b){stopSpinner(_0x3ef13d,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x16f875(0x89)](_0x319a1b instanceof Error?_0x319a1b[_0x16f875(0x65)]:_0x16f875(0x84));}if(_0x183345[_0x16f875(0x69)]===0x0)return console[_0x16f875(0x71)](a64_0x35a06f[_0x16f875(0x98)](_0x16f875(0x6f))),{'ok':!![]};const _0xd33159=buildCompareRows(_0x183345,_0x7c5898);console[_0x16f875(0x71)](renderCompareTable(_0xd33159)),console[_0x16f875(0x71)]();const _0x57042d=_0x47d080[_0x16f875(0x8e)],_0x46bf4b=await selectPages(_0x183345,_0x7c5898,_0x57042d);console['log'](),console[_0x16f875(0x71)](a64_0x35a06f[_0x16f875(0x91)](_0x16f875(0x66)+_0x46bf4b[_0x16f875(0x69)]+_0x16f875(0x93)));const _0x521775=_0x47d080[_0x16f875(0x70)]&&_0x47d080[_0x16f875(0x7a)];if(!_0x521775){console[_0x16f875(0x71)](renderSyncSummary(_0x46bf4b,_0x7c5898['size']>0x0));const _0x15cd4a=await askConfirm(_0x16f875(0x99));if(!_0x15cd4a)return console[_0x16f875(0x71)](a64_0x35a06f[_0x16f875(0x68)](_0x16f875(0x7e))),{'ok':!![]};}let _0xc2a4ca=_0x47d080[_0x16f875(0x70)],_0x5edd7c=_0x47d080[_0x16f875(0x7a)];!_0xc2a4ca&&(_0xc2a4ca=await askJsUrl());!_0x5edd7c&&(_0x5edd7c=await askCssUrl());const _0x3730cf=await askConfirm('\x20\x20Create\x20'+_0x46bf4b[_0x16f875(0x69)]+_0x16f875(0x78)+_0xc2a4ca+_0x16f875(0x7c)+_0x5edd7c+'?');if(!_0x3730cf)return console[_0x16f875(0x71)](a64_0x35a06f[_0x16f875(0x68)](_0x16f875(0x7e))),{'ok':!![]};const _0x399176=[_0xc2a4ca,_0x5edd7c],_0x442265=startSpinner(_0x16f875(0x6a)+_0x46bf4b['length']+'\x20menu(s)...');try{const _0x54503e=await doCreateMenus(_0x2f0f2d[_0x16f875(0x6b)],_0x2f0f2d[_0x16f875(0x9f)],_0x46bf4b,_0x399176);return stopSpinner(_0x442265,'Created\x20'+_0x54503e[_0x16f875(0x80)]+_0x16f875(0x9c),!![]),{'ok':!![],'data':_0x54503e,'message':_0x16f875(0x7b)+_0x54503e[_0x16f875(0x80)]+_0x16f875(0x77)+_0x54503e['failed']+_0x16f875(0x90)};}catch(_0x3c96ef){stopSpinner(_0x442265,_0x16f875(0x9d),![]);throw CliErrors[_0x16f875(0x89)](_0x3c96ef instanceof Error?_0x3c96ef['message']:'Menu\x20creation\x20failed');}}};function parseParams(_0xd33c6d){const _0x580849=a64_0x56c1bb;if(!_0xd33c6d)return{};try{const _0x2e735d=JSON[_0x580849(0x74)](_0xd33c6d);if(typeof _0x2e735d!==_0x580849(0x6c)||_0x2e735d===null||Array[_0x580849(0xa2)](_0x2e735d))return{};return{'jsUrl':typeof _0x2e735d['jsUrl']===_0x580849(0x8b)?_0x2e735d[_0x580849(0x70)][_0x580849(0x95)]():undefined,'cssUrl':typeof _0x2e735d[_0x580849(0x7a)]===_0x580849(0x8b)?_0x2e735d[_0x580849(0x7a)][_0x580849(0x95)]():undefined,'pages':Array[_0x580849(0xa2)](_0x2e735d[_0x580849(0x8e)])?_0x2e735d[_0x580849(0x8e)][_0x580849(0x79)](String):undefined};}catch{return{};}}
@@ -1 +1 @@
1
- const a66_0x3cc2ca=a66_0x3783;(function(_0x164736,_0x597bb3){const _0x2ff2d2=a66_0x3783,_0x22a196=_0x164736();while(!![]){try{const _0x23c35e=-parseInt(_0x2ff2d2(0x15f))/0x1*(parseInt(_0x2ff2d2(0x156))/0x2)+-parseInt(_0x2ff2d2(0x157))/0x3+parseInt(_0x2ff2d2(0x148))/0x4*(-parseInt(_0x2ff2d2(0x137))/0x5)+parseInt(_0x2ff2d2(0x14c))/0x6*(parseInt(_0x2ff2d2(0x149))/0x7)+parseInt(_0x2ff2d2(0x154))/0x8+-parseInt(_0x2ff2d2(0x15d))/0x9*(-parseInt(_0x2ff2d2(0x145))/0xa)+-parseInt(_0x2ff2d2(0x15e))/0xb*(parseInt(_0x2ff2d2(0x14e))/0xc);if(_0x23c35e===_0x597bb3)break;else _0x22a196['push'](_0x22a196['shift']());}catch(_0x31d9e7){_0x22a196['push'](_0x22a196['shift']());}}}(a66_0x2a90,0x5147a));function a66_0x3783(_0x50170f,_0x4a441c){_0x50170f=_0x50170f-0x136;const _0x2a908c=a66_0x2a90();let _0x378329=_0x2a908c[_0x50170f];return _0x378329;}function a66_0x2a90(){const _0x1c6842=['20946wlVRea','545613TltPaO','yes','appCode','Online\x20menu\x20list\x20fetched','\x20menu(s)\x20with\x20existing\x20resources','str','11952JWEzXi','14267CQvjVd','7YvTnFf','Updating\x20','message','cyan','Menu\x20update\x20completed:\x20','cssUrl','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','Fetching\x20online\x20menu\x20list...','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','failed','\x20updated,\x20','log','jsUrl','65NKQZLp','label','boolean','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20menu(s)\x20failed','length','menu','\x20menu(s)','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','gray','flag','yellow','string','trim','4310hFczFX','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','Menu\x20update\x20failed','152996WjhUQm','790832CapVwL','write','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','12WHuula','params','1224TSGtiV','validation','updated','object','✓\x20Menu\x20update\x20completed:\x20','Updated\x20','3354520hABiXK','cookie'];a66_0x2a90=function(){return _0x1c6842;};return a66_0x2a90();}import a66_0x462b85 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'./shared/logic.js';import{renderUpdateSummary}from'./shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'./shared/inquirer.js';import{CliErrors}from'../../errors.js';import{runMenuUpdateCore}from'./shared/update-core.js';export const menuUpdate={'service':a66_0x3cc2ca(0x13d),'command':'update','description':a66_0x3cc2ca(0x165),'risk':a66_0x3cc2ca(0x14a),'flags':[{'name':a66_0x3cc2ca(0x14d),'type':'string','description':a66_0x3cc2ca(0x13f)+a66_0x3cc2ca(0x14b)},{'name':'yes','type':a66_0x3cc2ca(0x139),'description':'Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation'}],async 'execute'(_0x7a34a2){const _0x4b7ff9=a66_0x3cc2ca,_0xa80f31=_0x7a34a2[_0x4b7ff9(0x141)](_0x4b7ff9(0x158)),_0x306ed2=_0x7a34a2[_0x4b7ff9(0x15c)](_0x4b7ff9(0x14d)),_0x5d3dda=parseParams(_0x306ed2),_0x52cce5=!!(_0x5d3dda[_0x4b7ff9(0x136)]||_0x5d3dda[_0x4b7ff9(0x164)]);if(_0xa80f31||_0x52cce5&&!isInteractive()){const _0x525666=await runMenuUpdateCore(_0x7a34a2[_0x4b7ff9(0x159)],_0x7a34a2[_0x4b7ff9(0x155)],_0x306ed2);return _0x525666['skipped']?console[_0x4b7ff9(0x16a)](_0x4b7ff9(0x146)):(console[_0x4b7ff9(0x16a)](_0x4b7ff9(0x152)+_0x525666[_0x4b7ff9(0x150)]+'\x20menu(s)\x20updated'),_0x525666[_0x4b7ff9(0x168)]>0x0&&console['error']('!\x20'+_0x525666[_0x4b7ff9(0x168)]+_0x4b7ff9(0x13b))),{'ok':_0x525666[_0x4b7ff9(0x168)]===0x0};}requireInteractive();const _0x8dcf61=startSpinner(_0x4b7ff9(0x166));let _0x4e30ed;try{_0x4e30ed=await fetchOnlineMenuList(_0x7a34a2[_0x4b7ff9(0x159)],_0x7a34a2[_0x4b7ff9(0x155)]),stopSpinner(_0x8dcf61,_0x4b7ff9(0x15a),!![]);}catch(_0x10e7bf){stopSpinner(_0x8dcf61,_0x4b7ff9(0x13a),![]);throw CliErrors['validation'](_0x10e7bf instanceof Error?_0x10e7bf['message']:_0x4b7ff9(0x13a));}const _0x173c76=filterMenusWithResources(_0x4e30ed);if(_0x173c76[_0x4b7ff9(0x13c)]===0x0)return console[_0x4b7ff9(0x16a)](a66_0x462b85[_0x4b7ff9(0x142)](_0x4b7ff9(0x167))),{'ok':!![]};console[_0x4b7ff9(0x16a)](),console['log'](a66_0x462b85[_0x4b7ff9(0x162)]('\x20\x20Found\x20'+_0x173c76[_0x4b7ff9(0x13c)]+_0x4b7ff9(0x15b))),console['log'](renderUpdateSummary(_0x173c76['map'](_0x111c04=>_0x111c04[_0x4b7ff9(0x138)]),[_0x5d3dda[_0x4b7ff9(0x136)],_0x5d3dda[_0x4b7ff9(0x164)]])),console[_0x4b7ff9(0x16a)]();let _0x1973ee=_0x5d3dda[_0x4b7ff9(0x136)],_0xe145f7=_0x5d3dda[_0x4b7ff9(0x164)];!_0x1973ee&&(_0x1973ee=await askJsUrl());!_0xe145f7&&(_0xe145f7=await askCssUrl());const _0x2efc86=await askConfirm('\x20\x20Update\x20'+_0x173c76[_0x4b7ff9(0x13c)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x1973ee+'\x20and\x20CSS:\x20'+_0xe145f7+'?');if(!_0x2efc86)return console['log'](a66_0x462b85[_0x4b7ff9(0x140)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x38bacf=[_0x1973ee,_0xe145f7],_0x559afa=startSpinner(_0x4b7ff9(0x160)+_0x173c76['length']+'\x20menu(s)...');try{const _0x2fbb8c=await doUpdateCdnUrls(_0x7a34a2[_0x4b7ff9(0x159)],_0x7a34a2[_0x4b7ff9(0x155)],_0x173c76,_0x38bacf);return stopSpinner(_0x559afa,_0x4b7ff9(0x153)+_0x2fbb8c['updated']+_0x4b7ff9(0x13e),_0x2fbb8c[_0x4b7ff9(0x168)]===0x0),{'ok':_0x2fbb8c[_0x4b7ff9(0x168)]===0x0,'data':_0x2fbb8c,'message':_0x2fbb8c[_0x4b7ff9(0x168)]>0x0?_0x4b7ff9(0x163)+_0x2fbb8c['updated']+_0x4b7ff9(0x169)+_0x2fbb8c[_0x4b7ff9(0x168)]+'\x20failed.':_0x4b7ff9(0x163)+_0x2fbb8c['updated']+'\x20updated.'};}catch(_0x3a9a42){stopSpinner(_0x559afa,_0x4b7ff9(0x147),![]);throw CliErrors[_0x4b7ff9(0x14f)](_0x3a9a42 instanceof Error?_0x3a9a42[_0x4b7ff9(0x161)]:_0x4b7ff9(0x147));}}};function parseParams(_0x417064){const _0x254a87=a66_0x3cc2ca;if(!_0x417064)return{};try{const _0x14f6fe=JSON['parse'](_0x417064);if(typeof _0x14f6fe!==_0x254a87(0x151)||_0x14f6fe===null||Array['isArray'](_0x14f6fe))return{};return{'jsUrl':typeof _0x14f6fe[_0x254a87(0x136)]===_0x254a87(0x143)?_0x14f6fe[_0x254a87(0x136)]['trim']():undefined,'cssUrl':typeof _0x14f6fe[_0x254a87(0x164)]===_0x254a87(0x143)?_0x14f6fe['cssUrl'][_0x254a87(0x144)]():undefined};}catch{return{};}}
1
+ const a65_0x5eb057=a65_0xd5ad;(function(_0x4f965e,_0x4f9fe1){const _0x119e02=a65_0xd5ad,_0x28a3f4=_0x4f965e();while(!![]){try{const _0x22bd0b=-parseInt(_0x119e02(0x11a))/0x1+-parseInt(_0x119e02(0x117))/0x2*(-parseInt(_0x119e02(0x123))/0x3)+parseInt(_0x119e02(0x121))/0x4*(-parseInt(_0x119e02(0x13b))/0x5)+-parseInt(_0x119e02(0x13f))/0x6*(parseInt(_0x119e02(0x118))/0x7)+-parseInt(_0x119e02(0x12b))/0x8*(parseInt(_0x119e02(0x144))/0x9)+parseInt(_0x119e02(0x142))/0xa+-parseInt(_0x119e02(0x141))/0xb*(-parseInt(_0x119e02(0x139))/0xc);if(_0x22bd0b===_0x4f9fe1)break;else _0x28a3f4['push'](_0x28a3f4['shift']());}catch(_0x5b75b8){_0x28a3f4['push'](_0x28a3f4['shift']());}}}(a65_0x2971,0x3e26e));import a65_0x1de008 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'./shared/logic.js';import{renderUpdateSummary}from'./shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'./shared/inquirer.js';function a65_0xd5ad(_0x5d567a,_0x271f27){_0x5d567a=_0x5d567a-0x113;const _0x297105=a65_0x2971();let _0xd5addc=_0x297105[_0x5d567a];return _0xd5addc;}import{CliErrors}from'../../errors.js';function a65_0x2971(){const _0x34dc63=['692HVgpKl','jsUrl','225642CRDBjs','\x20menu(s)\x20with\x20existing\x20resources','Online\x20menu\x20list\x20fetched','string','Updating\x20','object','\x20\x20Found\x20','Updated\x20','8Cgjimr','yes','updated','update','params','cssUrl','\x20updated,\x20','\x20menu(s)','appCode','trim','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20failed.','str','Menu\x20update\x20completed:\x20','88596jDaPJR','message','4670ugitjE','label','\x20updated.','\x20menu(s)\x20updated','1758WvhhJa','write','517XxpiGQ','1391940XkOMYG','boolean','711171FJRprU','\x20menu(s)\x20failed','\x20menu(s)...','failed','skipped','\x20\x20Update\x20','\x20and\x20CSS:\x20','isArray','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','length','log','✓\x20Menu\x20update\x20completed:\x20','yellow','error','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','gray','flag','10gsjcrg','56QWRBgG','Failed\x20to\x20fetch\x20online\x20menu\x20list','364746YByldV','cookie','Menu\x20update\x20failed','menu','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','validation','cyan'];a65_0x2971=function(){return _0x34dc63;};return a65_0x2971();}import{runMenuUpdateCore}from'./shared/update-core.js';export const menuUpdate={'service':a65_0x5eb057(0x11d),'command':a65_0x5eb057(0x12e),'description':a65_0x5eb057(0x11e),'risk':a65_0x5eb057(0x140),'flags':[{'name':a65_0x5eb057(0x12f),'type':a65_0x5eb057(0x126),'description':'Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20'+a65_0x5eb057(0x135)},{'name':a65_0x5eb057(0x12c),'type':a65_0x5eb057(0x143),'description':'Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation'}],async 'execute'(_0x34a6e7){const _0xcfc906=a65_0x5eb057,_0x2ef14d=_0x34a6e7[_0xcfc906(0x116)](_0xcfc906(0x12c)),_0x41f13b=_0x34a6e7[_0xcfc906(0x137)]('params'),_0x2824bd=parseParams(_0x41f13b),_0x49eb93=!!(_0x2824bd['jsUrl']||_0x2824bd[_0xcfc906(0x130)]);if(_0x2ef14d||_0x49eb93&&!isInteractive()){const _0x11d6b8=await runMenuUpdateCore(_0x34a6e7[_0xcfc906(0x133)],_0x34a6e7[_0xcfc906(0x11b)],_0x41f13b);return _0x11d6b8[_0xcfc906(0x148)]?console[_0xcfc906(0x14e)](_0xcfc906(0x14c)):(console[_0xcfc906(0x14e)](_0xcfc906(0x14f)+_0x11d6b8[_0xcfc906(0x12d)]+_0xcfc906(0x13e)),_0x11d6b8['failed']>0x0&&console[_0xcfc906(0x113)]('!\x20'+_0x11d6b8[_0xcfc906(0x147)]+_0xcfc906(0x145))),{'ok':_0x11d6b8[_0xcfc906(0x147)]===0x0};}requireInteractive();const _0xab1a75=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x3f5641;try{_0x3f5641=await fetchOnlineMenuList(_0x34a6e7['appCode'],_0x34a6e7[_0xcfc906(0x11b)]),stopSpinner(_0xab1a75,_0xcfc906(0x125),!![]);}catch(_0x41c594){stopSpinner(_0xab1a75,_0xcfc906(0x119),![]);throw CliErrors['validation'](_0x41c594 instanceof Error?_0x41c594[_0xcfc906(0x13a)]:_0xcfc906(0x119));}const _0x66a18=filterMenusWithResources(_0x3f5641);if(_0x66a18[_0xcfc906(0x14d)]===0x0)return console[_0xcfc906(0x14e)](a65_0x1de008[_0xcfc906(0x150)](_0xcfc906(0x114))),{'ok':!![]};console[_0xcfc906(0x14e)](),console[_0xcfc906(0x14e)](a65_0x1de008[_0xcfc906(0x120)](_0xcfc906(0x129)+_0x66a18['length']+_0xcfc906(0x124))),console[_0xcfc906(0x14e)](renderUpdateSummary(_0x66a18['map'](_0x2d269f=>_0x2d269f[_0xcfc906(0x13c)]),[_0x2824bd[_0xcfc906(0x122)],_0x2824bd[_0xcfc906(0x130)]])),console[_0xcfc906(0x14e)]();let _0x3688a0=_0x2824bd[_0xcfc906(0x122)],_0x496531=_0x2824bd[_0xcfc906(0x130)];!_0x3688a0&&(_0x3688a0=await askJsUrl());!_0x496531&&(_0x496531=await askCssUrl());const _0x20d5d2=await askConfirm(_0xcfc906(0x149)+_0x66a18[_0xcfc906(0x14d)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x3688a0+_0xcfc906(0x14a)+_0x496531+'?');if(!_0x20d5d2)return console[_0xcfc906(0x14e)](a65_0x1de008[_0xcfc906(0x115)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x151df8=[_0x3688a0,_0x496531],_0x10f459=startSpinner(_0xcfc906(0x127)+_0x66a18[_0xcfc906(0x14d)]+_0xcfc906(0x146));try{const _0x840d70=await doUpdateCdnUrls(_0x34a6e7[_0xcfc906(0x133)],_0x34a6e7[_0xcfc906(0x11b)],_0x66a18,_0x151df8);return stopSpinner(_0x10f459,_0xcfc906(0x12a)+_0x840d70[_0xcfc906(0x12d)]+_0xcfc906(0x132),_0x840d70[_0xcfc906(0x147)]===0x0),{'ok':_0x840d70[_0xcfc906(0x147)]===0x0,'data':_0x840d70,'message':_0x840d70['failed']>0x0?_0xcfc906(0x138)+_0x840d70[_0xcfc906(0x12d)]+_0xcfc906(0x131)+_0x840d70[_0xcfc906(0x147)]+_0xcfc906(0x136):_0xcfc906(0x138)+_0x840d70[_0xcfc906(0x12d)]+_0xcfc906(0x13d)};}catch(_0x569fb5){stopSpinner(_0x10f459,_0xcfc906(0x11c),![]);throw CliErrors[_0xcfc906(0x11f)](_0x569fb5 instanceof Error?_0x569fb5[_0xcfc906(0x13a)]:_0xcfc906(0x11c));}}};function parseParams(_0x47e48b){const _0x385c19=a65_0x5eb057;if(!_0x47e48b)return{};try{const _0x5112aa=JSON['parse'](_0x47e48b);if(typeof _0x5112aa!==_0x385c19(0x128)||_0x5112aa===null||Array[_0x385c19(0x14b)](_0x5112aa))return{};return{'jsUrl':typeof _0x5112aa[_0x385c19(0x122)]==='string'?_0x5112aa['jsUrl']['trim']():undefined,'cssUrl':typeof _0x5112aa[_0x385c19(0x130)]==='string'?_0x5112aa[_0x385c19(0x130)][_0x385c19(0x134)]():undefined};}catch{return{};}}
@@ -0,0 +1 @@
1
+ (function(_0x5bbc8e,_0x1972cb){const _0x5b26fe=a66_0xb236,_0x3def73=_0x5bbc8e();while(!![]){try{const _0x425b3d=parseInt(_0x5b26fe(0x143))/0x1*(parseInt(_0x5b26fe(0x14d))/0x2)+parseInt(_0x5b26fe(0x142))/0x3*(-parseInt(_0x5b26fe(0x14f))/0x4)+-parseInt(_0x5b26fe(0x140))/0x5*(parseInt(_0x5b26fe(0x15c))/0x6)+-parseInt(_0x5b26fe(0x157))/0x7+parseInt(_0x5b26fe(0x154))/0x8*(-parseInt(_0x5b26fe(0x149))/0x9)+-parseInt(_0x5b26fe(0x145))/0xa+parseInt(_0x5b26fe(0x156))/0xb;if(_0x425b3d===_0x1972cb)break;else _0x3def73['push'](_0x3def73['shift']());}catch(_0x7cba52){_0x3def73['push'](_0x3def73['shift']());}}}(a66_0x1bad,0x92f47));import{existsSync}from'node:fs';import a66_0xa400f6 from'node:path';function a66_0x1bad(){const _0xfd3baf=['trim','2yYkAKs','env','2501476bqbJPa','√\x20Login\x20status:\x20','No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','Skipped','Logged\x20in','108544GXyKvP','cwd','35823909yKcOqH','6868491ccxUEV','log','√\x20App\x20Code:\x20','production','Login\x20failed','3999390AOjRMM','Project\x20name\x20cannot\x20exceed\x2050\x20characters','cyan','green','5HgFoEx','Not\x20set','3GTGgTn','911893yZvvHs','√\x20Project\x20Name:\x20','3030740AUPieT','Directory\x20\x22','string','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','657LScwPZ','resolve','\x22\x20already\x20exists'];a66_0x1bad=function(){return _0xfd3baf;};return a66_0x1bad();}import a66_0x5e04c2 from'chalk';import{input,confirm}from'@inquirer/prompts';function a66_0xb236(_0x3b7ffb,_0x5ef6f0){_0x3b7ffb=_0x3b7ffb-0x13e;const _0x1bad36=a66_0x1bad();let _0xb236d9=_0x1bad36[_0x3b7ffb];return _0xb236d9;}import{getIsSessionValid}from'../../../auth/is-session-valid.js';import{authServer}from'../../../auth/auth-server.js';import{readConfig}from'../../../utils/config.js';import{selectSingleAppcode}from'../../common/app-selector.js';export async function guidedCreateProject(_0x5eaec3,_0x331bb8,_0x3c5a6f){const _0x4ad5cc=a66_0xb236,_0x3a8af8='my-app',_0x1e3066=readConfig(),_0x25a60c=typeof _0x1e3066['env']===_0x4ad5cc(0x147)?_0x1e3066[_0x4ad5cc(0x14e)]:undefined,_0x4fac14=await input({'message':'Project\x20name:','default':_0x3a8af8,'validate':_0x28dba4=>{const _0x416dea=_0x4ad5cc,_0x1f24cc=_0x28dba4[_0x416dea(0x14c)]()||_0x3a8af8;if(_0x1f24cc['length']>0x32)return _0x416dea(0x15d);const _0x27e915=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x1f24cc&&!_0x27e915['test'](_0x1f24cc))return _0x416dea(0x148);const _0x1ca244=a66_0xa400f6[_0x416dea(0x14a)](process[_0x416dea(0x155)](),_0x1f24cc);if(existsSync(_0x1ca244))return _0x416dea(0x146)+_0x1f24cc+_0x416dea(0x14b);return!![];}});console[_0x4ad5cc(0x158)](a66_0x5e04c2[_0x4ad5cc(0x13f)](_0x4ad5cc(0x144)+a66_0x5e04c2[_0x4ad5cc(0x13e)](_0x4fac14)));const _0x2d0e22=await selectSingleAppcode(_0x3c5a6f);console[_0x4ad5cc(0x158)](a66_0x5e04c2['green'](_0x4ad5cc(0x159)+a66_0x5e04c2[_0x4ad5cc(0x13e)](_0x2d0e22||_0x4ad5cc(0x141))));if(_0x2d0e22){const _0x2925b4=await getIsSessionValid();if(!_0x2925b4){const _0x110dcf=await confirm({'message':_0x4ad5cc(0x151),'default':!![]});if(_0x110dcf){const _0x4fd307=await authServer({'silent':!![]});console[_0x4ad5cc(0x158)](a66_0x5e04c2[_0x4ad5cc(0x13f)]('√\x20Login\x20status:\x20'+a66_0x5e04c2['cyan'](_0x4fd307?_0x4ad5cc(0x153):_0x4ad5cc(0x15b))));}else console['log'](a66_0x5e04c2['green'](_0x4ad5cc(0x150)+a66_0x5e04c2[_0x4ad5cc(0x13e)](_0x4ad5cc(0x152))));}await _0x5eaec3({'projectName':_0x4fac14,'appCode':_0x2d0e22,'env':_0x331bb8||_0x25a60c||'production'});}else await _0x5eaec3({'projectName':_0x4fac14,'env':_0x331bb8||_0x25a60c||_0x4ad5cc(0x15a)});}
@@ -0,0 +1 @@
1
+ (function(_0x559086,_0x4c16c1){const _0x1cec96=a67_0x3d09,_0x43e991=_0x559086();while(!![]){try{const _0x16e444=-parseInt(_0x1cec96(0x155))/0x1+-parseInt(_0x1cec96(0x152))/0x2*(parseInt(_0x1cec96(0x158))/0x3)+parseInt(_0x1cec96(0x153))/0x4+-parseInt(_0x1cec96(0x156))/0x5*(-parseInt(_0x1cec96(0x15c))/0x6)+-parseInt(_0x1cec96(0x15a))/0x7+parseInt(_0x1cec96(0x151))/0x8+parseInt(_0x1cec96(0x159))/0x9;if(_0x16e444===_0x4c16c1)break;else _0x43e991['push'](_0x43e991['shift']());}catch(_0x21df3b){_0x43e991['push'](_0x43e991['shift']());}}}(a67_0x49d8,0x55d34));function a67_0x3d09(_0xaa8598,_0x29f602){_0xaa8598=_0xaa8598-0x151;const _0x49d8a6=a67_0x49d8();let _0x3d093b=_0x49d8a6[_0xaa8598];return _0x3d093b;}function a67_0x49d8(){const _0x206889=['1337124SCFIre','370164XGqlii','toFixed','575587IsOAfP','1742795jDndSp','now','3gvSZsA','7910937UaQQFj','2461431munlIW','replace','6uPflpX','5017832hyDtxR'];a67_0x49d8=function(){return _0x206889;};return a67_0x49d8();}export function formatElapsed(_0x2fe2d0){const _0x117792=a67_0x3d09,_0x1b1cf8=Date[_0x117792(0x157)]()-_0x2fe2d0;if(_0x1b1cf8<0x3e8)return _0x1b1cf8+'ms';const _0x9ca192=(_0x1b1cf8/0x3e8)[_0x117792(0x154)](0x2),_0xa161fe=_0x9ca192[_0x117792(0x15b)](/\.?0+$/u,'');return _0xa161fe+'s';}
@@ -0,0 +1 @@
1
+ (function(_0x41c0d0,_0x372c6d){const _0x21a367=a68_0x2df0,_0x9e2611=_0x41c0d0();while(!![]){try{const _0x366e02=parseInt(_0x21a367(0x14a))/0x1*(-parseInt(_0x21a367(0x13b))/0x2)+-parseInt(_0x21a367(0x12b))/0x3+parseInt(_0x21a367(0x142))/0x4*(parseInt(_0x21a367(0x146))/0x5)+parseInt(_0x21a367(0x14c))/0x6*(-parseInt(_0x21a367(0x11d))/0x7)+-parseInt(_0x21a367(0x157))/0x8+parseInt(_0x21a367(0x147))/0x9+parseInt(_0x21a367(0x11a))/0xa;if(_0x366e02===_0x372c6d)break;else _0x9e2611['push'](_0x9e2611['shift']());}catch(_0x49117e){_0x9e2611['push'](_0x9e2611['shift']());}}}(a68_0x22da,0x79e9e));import a68_0x2b10c9 from'path';function a68_0x22da(){const _0x4c14ae=['constants','2918968wNamWd','trim','cookie','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','needsUpgrade','stringify','W_OK','*\x20Pulling\x20API\x20configuration...','test','1.0.0','error','*\x20Configuring\x20AppCode\x20for\x20project\x20','readFileSync','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','stop','cwd','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','\x20|\x20AppCode:\x20','🚀\x20Next\x20Steps:','modelCount','resolve','CLI\x20版本检查','配置应用AppCode:\x20','API\x20configuration\x20pulled:\x20','\x20&&\x20','success','bold','开始创建项目:\x20','existsSync','11114060gAlkia','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','green','21PbUJZu','√\x20package.json\x20updated:\x20name=','\x20run\x20start','appCode','Project\x20name\x20cannot\x20be\x20empty','更新\x20package.json\x20失败','Project\x20name:\x20','projectName','writeFileSync','version','log','warn','package.json','更新\x20package.json\x20name','604650CBoFiK','string','...','\x20model(s)','√\x20Pulled\x20','chdir','join','\x20Generated\x20by\x20rabetbase\x20cli\x20','env','currentVersion','message','项目创建完成:\x20','gray','rmSync','production','start','2diZdTZ','项目创建失败:\x20','toLocaleString','fail','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','projectCode','API\x20配置拉取异常','11668JPtAXF','create','length','dirname','605AOeUvH','1277055ELBiKS','cyan','\x20√\x20','130667NaXaXD','\x20already\x20exists','819624OersLc','清理项目目录失败:\x20','Copy\x20project\x20files','./src/api/','repeat','utf8','\x20\x202.\x20Pull\x20API\x20configuration:\x20','info','cd\x20','parse'];a68_0x22da=function(){return _0x4c14ae;};return a68_0x22da();}import a68_0x5d69b9 from'fs';import a68_0x1b097c from'chalk';import a68_0x6e0d75 from'ora';import{guidedCreateProject}from'./enhanced-guided-create.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{readConfig}from'../../../utils/config.js';import{CLI_BIN_NAME}from'../../../constant/cli.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{copyProjectTemplate}from'./use-copy-project-template.js';import{installDependencies}from'./use-install-dependencies.js';import{formatProjectCode}from'./use-format-code.js';import{logger}from'../../../utils/logger.js';function a68_0x2df0(_0x1a29d7,_0x4ed4a7){_0x1a29d7=_0x1a29d7-0x104;const _0x22da13=a68_0x22da();let _0x2df025=_0x22da13[_0x1a29d7];return _0x2df025;}import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{selectSingleAppcode}from'../../common/app-selector.js';import{getRabetbaseCliPackageRoot}from'./project-template-path.js';export async function createApp(_0x191165){const _0x5ce7b8=a68_0x2df0,_0x3cdd59=await checkCliVersion();_0x3cdd59[_0x5ce7b8(0x15b)]&&(printCliUpgradeWarning(_0x3cdd59),logger[_0x5ce7b8(0x153)]('create',_0x5ce7b8(0x112),{'currentVersion':_0x3cdd59[_0x5ce7b8(0x134)],'stableVersion':_0x3cdd59['stableVersion'],'needsUpgrade':_0x3cdd59[_0x5ce7b8(0x15b)]}));if(_0x191165[_0x5ce7b8(0x140)]&&_0x191165[_0x5ce7b8(0x120)])await runCreate({'projectName':_0x191165[_0x5ce7b8(0x140)],'appCode':_0x191165[_0x5ce7b8(0x120)],'env':_0x191165[_0x5ce7b8(0x133)]},_0x191165);else{if(_0x191165['projectCode']){const _0x595ad1=await selectSingleAppcode(_0x191165[_0x5ce7b8(0x159)]);await runCreate({'projectName':_0x191165[_0x5ce7b8(0x140)],'appCode':_0x595ad1||undefined,'env':_0x191165[_0x5ce7b8(0x133)]},_0x191165);}else await guidedCreateProject(_0x3b6d91=>runCreate(_0x3b6d91,_0x191165),_0x191165[_0x5ce7b8(0x133)],_0x191165[_0x5ce7b8(0x159)]);}}async function runCreate(_0x50adaa,_0x45b4d0){const _0x3d8ab1=a68_0x2df0;if(!_0x50adaa[_0x3d8ab1(0x124)]||_0x50adaa['projectName'][_0x3d8ab1(0x158)]()==='')throw new Error(_0x3d8ab1(0x121));const _0x455303=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x455303[_0x3d8ab1(0x105)](_0x50adaa['projectName']))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x50adaa[_0x3d8ab1(0x124)][_0x3d8ab1(0x144)]>0x64)throw new Error(_0x3d8ab1(0x10d));const _0xcae3f=a68_0x2b10c9[_0x3d8ab1(0x111)](process[_0x3d8ab1(0x10c)](),_0x50adaa[_0x3d8ab1(0x124)]);if(a68_0x5d69b9[_0x3d8ab1(0x119)](_0xcae3f))throw new Error('Project\x20directory\x20'+_0x50adaa['projectName']+_0x3d8ab1(0x14b));try{a68_0x5d69b9['accessSync'](a68_0x2b10c9[_0x3d8ab1(0x145)](_0xcae3f),a68_0x5d69b9[_0x3d8ab1(0x156)][_0x3d8ab1(0x15d)]);}catch{throw new Error(_0x3d8ab1(0x11b));}logger['setLogPath'](_0xcae3f),logger['info'](_0x3d8ab1(0x143),_0x3d8ab1(0x118)+_0x50adaa[_0x3d8ab1(0x124)],{'projectDir':_0xcae3f,'appCode':_0x50adaa[_0x3d8ab1(0x120)]}),console[_0x3d8ab1(0x127)](),console[_0x3d8ab1(0x127)](a68_0x1b097c[_0x3d8ab1(0x11c)](_0x3d8ab1(0x149))+_0x3d8ab1(0x123)+a68_0x1b097c[_0x3d8ab1(0x11c)](_0x50adaa[_0x3d8ab1(0x124)])+(_0x50adaa[_0x3d8ab1(0x120)]?_0x3d8ab1(0x10e)+a68_0x1b097c['cyan'](_0x50adaa[_0x3d8ab1(0x120)]):''));try{await runTask(_0x3d8ab1(0x14e),()=>copyProjectTemplate(_0x50adaa[_0x3d8ab1(0x124)])),await updatePackageJsonName(_0x50adaa['projectName']),await runTask('Install\x20dependencies',()=>installDependencies(_0x50adaa[_0x3d8ab1(0x124)])),await runTask('Format\x20code',()=>formatProjectCode(_0x50adaa[_0x3d8ab1(0x124)])),await configureAppCode(_0x50adaa['projectName'],_0x50adaa['appCode']||'',_0x50adaa[_0x3d8ab1(0x133)]);let _0x347b20=![];if(_0x50adaa[_0x3d8ab1(0x120)]){console[_0x3d8ab1(0x127)](_0x3d8ab1(0x104));const _0x213e64=process[_0x3d8ab1(0x10c)]();try{process[_0x3d8ab1(0x130)](_0xcae3f);const _0x18982b=_0x50adaa[_0x3d8ab1(0x133)]||_0x3d8ab1(0x139);initEnv(_0x18982b);const {configArray:_0x2a5907}=await fetchModelList(_0x50adaa[_0x3d8ab1(0x120)],_0x45b4d0[_0x3d8ab1(0x159)]||''),_0x594f3f=_0x3d8ab1(0x14f),_0x59cdf0=await generateApiFile(_0x2a5907,'',_0x50adaa[_0x3d8ab1(0x120)],!![],_0x18982b,_0x594f3f);console['log'](_0x3d8ab1(0x12f)+_0x2a5907[_0x3d8ab1(0x144)]+'\x20dataset(s),\x20generated\x20'+_0x59cdf0[_0x3d8ab1(0x110)]+_0x3d8ab1(0x12e)),logger[_0x3d8ab1(0x153)]('create',_0x3d8ab1(0x114)+_0x50adaa[_0x3d8ab1(0x120)]);}catch(_0x3d456f){_0x347b20=!![],console[_0x3d8ab1(0x127)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x3d8ab1(0x128)](_0x3d8ab1(0x143),_0x3d8ab1(0x141),{'error':_0x3d456f instanceof Error?_0x3d456f[_0x3d8ab1(0x135)]:String(_0x3d456f)});}finally{process[_0x3d8ab1(0x130)](_0x213e64);}}logger[_0x3d8ab1(0x116)]('create',_0x3d8ab1(0x136)+_0x50adaa[_0x3d8ab1(0x124)]),console[_0x3d8ab1(0x127)](),console[_0x3d8ab1(0x127)](a68_0x1b097c[_0x3d8ab1(0x11c)]('─'['repeat'](0x3c))),console[_0x3d8ab1(0x127)](a68_0x1b097c['cyan']['bold'](_0x3d8ab1(0x10f))),console[_0x3d8ab1(0x127)](),console['log']('\x20\x201.\x20Start\x20project:\x20'+a68_0x1b097c[_0x3d8ab1(0x148)][_0x3d8ab1(0x117)](_0x3d8ab1(0x154)+_0x50adaa[_0x3d8ab1(0x124)]+_0x3d8ab1(0x115)+CLI_BIN_NAME+_0x3d8ab1(0x11f))),_0x347b20&&console[_0x3d8ab1(0x127)](_0x3d8ab1(0x152)+a68_0x1b097c[_0x3d8ab1(0x148)][_0x3d8ab1(0x117)](CLI_BIN_NAME+'\x20api\x20pull')),console[_0x3d8ab1(0x127)](a68_0x1b097c[_0x3d8ab1(0x11c)]('─'[_0x3d8ab1(0x150)](0x3c)));}catch(_0xc0486c){logger['error'](_0x3d8ab1(0x143),_0x3d8ab1(0x13c)+_0x50adaa[_0x3d8ab1(0x124)],{'error':_0xc0486c instanceof Error?_0xc0486c[_0x3d8ab1(0x135)]:String(_0xc0486c)});try{a68_0x5d69b9[_0x3d8ab1(0x119)](_0xcae3f)&&(console[_0x3d8ab1(0x127)]('*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20'+_0xcae3f),a68_0x5d69b9[_0x3d8ab1(0x138)](_0xcae3f,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x3d8ab1(0x143),_0x3d8ab1(0x14d)+_0xcae3f);}throw _0xc0486c;}}async function runTask(_0x58a58d,_0x4962ce){const _0x4defd9=a68_0x2df0,_0x3e9041=a68_0x6e0d75(_0x58a58d+_0x4defd9(0x12d))[_0x4defd9(0x13a)]();try{const _0x9e4911=await _0x4962ce();_0x3e9041[_0x4defd9(0x10b)](),console[_0x4defd9(0x127)](''+a68_0x1b097c[_0x4defd9(0x11c)](_0x4defd9(0x149))+_0x58a58d+'\x20'+a68_0x1b097c[_0x4defd9(0x137)]('['+_0x9e4911+']'));}catch(_0x1f34d3){_0x3e9041[_0x4defd9(0x13e)](_0x58a58d);throw _0x1f34d3;}}async function updatePackageJsonName(_0x245a5e){const _0x54f18d=a68_0x2df0,_0x31945a=a68_0x2b10c9[_0x54f18d(0x111)](process[_0x54f18d(0x10c)](),_0x245a5e),_0x14d66f=a68_0x2b10c9[_0x54f18d(0x131)](_0x31945a,_0x54f18d(0x129));try{console[_0x54f18d(0x127)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x400751=getRabetbaseCliPackageRoot(),_0x5d0e9c=a68_0x2b10c9[_0x54f18d(0x131)](_0x400751,'package.json');let _0x86181b=_0x54f18d(0x106);try{const _0xfd5e69=JSON[_0x54f18d(0x155)](a68_0x5d69b9[_0x54f18d(0x109)](_0x5d0e9c,_0x54f18d(0x151)));_0x86181b=_0xfd5e69[_0x54f18d(0x126)]||_0x54f18d(0x106);}catch{}const _0x1d0319=a68_0x5d69b9['readFileSync'](_0x14d66f,_0x54f18d(0x151)),_0x580f8e=JSON['parse'](_0x1d0319);_0x580f8e['name']=_0x245a5e,_0x580f8e['description']=_0x245a5e+_0x54f18d(0x132)+_0x86181b,a68_0x5d69b9[_0x54f18d(0x125)](_0x14d66f,JSON[_0x54f18d(0x15c)](_0x580f8e,null,0x2)+'\x0a',_0x54f18d(0x151)),console['log'](_0x54f18d(0x11e)+_0x245a5e),logger[_0x54f18d(0x153)](_0x54f18d(0x143),_0x54f18d(0x12a));}catch(_0x520b8a){logger[_0x54f18d(0x107)](_0x54f18d(0x143),_0x54f18d(0x122));throw _0x520b8a;}}async function configureAppCode(_0x6c873b,_0x2bf731,_0x4526b3){const _0x243276=a68_0x2df0,_0x31cc37=a68_0x2b10c9[_0x243276(0x111)](process['cwd'](),_0x6c873b),_0x632f68=a68_0x2b10c9['join'](_0x31cc37,NEW_CONFIG_NAME);try{_0x2bf731?console[_0x243276(0x127)](_0x243276(0x108)+_0x6c873b+':\x20'+_0x2bf731):console[_0x243276(0x127)](_0x243276(0x10a)+_0x6c873b);const _0x410153=getRabetbaseCliPackageRoot(),_0x3f6880=a68_0x2b10c9['join'](_0x410153,_0x243276(0x129));let _0xb1fa0e=_0x243276(0x106);try{const _0x32fb05=JSON[_0x243276(0x155)](a68_0x5d69b9[_0x243276(0x109)](_0x3f6880,_0x243276(0x151)));_0xb1fa0e=_0x32fb05[_0x243276(0x126)]||_0x243276(0x106);}catch{}const _0x55d04c=readConfig(),_0x4f7bac=typeof _0x55d04c[_0x243276(0x133)]===_0x243276(0x12c)?_0x55d04c[_0x243276(0x133)]:undefined,{app:_0x4a3091,appcode:_0x495517,..._0x3470a4}=_0x55d04c,_0x2570b4={..._0x3470a4,'appcode':_0x2bf731||'','env':_0x4526b3||_0x4f7bac||_0x243276(0x139),'createdAt':new Date()[_0x243276(0x13d)](),'version':_0xb1fa0e};writeConfigFile(_0x632f68,_0x2570b4),_0x2bf731?console[_0x243276(0x127)](_0x243276(0x13f)+_0x2bf731):console[_0x243276(0x127)](_0x243276(0x15a)+CLI_BIN_NAME+'\x20config\x20set\x20appcode\x20<app-code>\x27'),logger['info']('create',_0x243276(0x113)+_0x2bf731);}catch(_0x23c2ca){logger[_0x243276(0x107)]('create','配置应用AppCode失败');}}
@@ -0,0 +1 @@
1
+ (function(_0xac6c7c,_0x1989ff){const _0x110109=a69_0x296a,_0x450052=_0xac6c7c();while(!![]){try{const _0x357e3c=-parseInt(_0x110109(0x16a))/0x1+-parseInt(_0x110109(0x17e))/0x2+parseInt(_0x110109(0x187))/0x3+-parseInt(_0x110109(0x173))/0x4*(-parseInt(_0x110109(0x15f))/0x5)+-parseInt(_0x110109(0x159))/0x6+-parseInt(_0x110109(0x17d))/0x7+-parseInt(_0x110109(0x169))/0x8*(-parseInt(_0x110109(0x15a))/0x9);if(_0x357e3c===_0x1989ff)break;else _0x450052['push'](_0x450052['shift']());}catch(_0x5dfbc7){_0x450052['push'](_0x450052['shift']());}}}(a69_0x4c81,0xf06f6));import a69_0x2f3ade from'path';import a69_0xbdeb99 from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../../../constant/cli.js';function a69_0x296a(_0x422796,_0x656cc4){_0x422796=_0x422796-0x155;const _0x4c812c=a69_0x4c81();let _0x296a27=_0x4c812c[_0x422796];return _0x296a27;}import{exec,execSync}from'child_process';import{copyDirectory}from'../../../utils/copy-directory.js';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../../../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../../../context.js';import{readConfig}from'../../../utils/config.js';import{getCliVersion}from'../../../utils/version.js';function a69_0x4c81(){const _0x5b4d81=['parse','Project\x20name\x20cannot\x20be\x20empty.','\x22\x20already\x20exists.','bun\x20run\x20format','155dnlbyM','Cannot\x20create\x20project\x20in\x20current\x20directory.','name','constants','length','log','Project\x20directory\x20\x22','\x20\x20√\x20Configuration\x20file\x20created','trim','env','16wphvQS','1454111sZfVJR','Project\x20name\x20contains\x20invalid\x20characters.','package.json','toLocaleString','writeFile','\x20created\x20successfully!','stringify','description','Use\x20a\x20different\x20project\x20name.','38636jLlIUm','\x20model(s)','resolve','validation','\x0a\x20\x20cd\x20','\x20\x20√\x20Code\x20formatted','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','\x20\x20rabetbase\x20run\x20start\x0a','utf-8','Check\x20directory\x20permissions.','10245501LwgWVS','911240jzXBvK','./src/api/','*\x20Creating\x20project\x20','chdir','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','\x20\x20Installing\x20dependencies...','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','W_OK','\x20\x20√\x20Project\x20template\x20created','916083jqhjxo','ignore','needsUpgrade','production','bun','join','string','cwd','modelCount','...','\x20\x20Pulling\x20API\x20configuration...','dirname','5786388uVEQVS','21230118ulCbCF'];a69_0x4c81=function(){return _0x5b4d81;};return a69_0x4c81();}import{CliErrors}from'../../../errors.js';import{fetchModelList}from'../../../api/fetch-model-list.js';import{generateApiFile}from'../../../api/generate-api-file.js';import{initEnv}from'../../../constant/env.js';import{getSubAppReactDemoTemplateDir}from'./project-template-path.js';const execAsync=promisify(exec);export async function createProjectNonInteractive(_0x337fb1,_0x1ae284,_0x156e88,_0x292c69){const _0x525c68=a69_0x296a,_0x50f68f=await checkCliVersion();_0x50f68f[_0x525c68(0x189)]&&printCliUpgradeWarning(_0x50f68f);if(!_0x337fb1||_0x337fb1[_0x525c68(0x167)]()==='')throw CliErrors[_0x525c68(0x176)](_0x525c68(0x15c));const _0x3d3e2a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x3d3e2a['test'](_0x337fb1))throw CliErrors[_0x525c68(0x176)](_0x525c68(0x16b),_0x525c68(0x179));if(_0x337fb1['length']>0x64)throw CliErrors[_0x525c68(0x176)](_0x525c68(0x184));const _0x352b17=a69_0x2f3ade['resolve'](process[_0x525c68(0x18e)](),_0x337fb1);if(existsSync(_0x352b17))throw CliErrors[_0x525c68(0x176)](_0x525c68(0x165)+_0x337fb1+_0x525c68(0x15d),_0x525c68(0x172));try{const _0x52bc8d=a69_0x2f3ade[_0x525c68(0x158)](_0x352b17);await a69_0xbdeb99['access'](_0x52bc8d,a69_0xbdeb99[_0x525c68(0x162)][_0x525c68(0x185)]);}catch{throw CliErrors[_0x525c68(0x176)](_0x525c68(0x160),_0x525c68(0x17c));}try{console[_0x525c68(0x164)](_0x525c68(0x180)+_0x337fb1+_0x525c68(0x156));const _0x1f2fd9=getSubAppReactDemoTemplateDir();await copyDirectory(_0x1f2fd9,_0x352b17),console[_0x525c68(0x164)](_0x525c68(0x186)),await updatePackageJsonName(_0x337fb1),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x525c68(0x164)](_0x525c68(0x183)),console[_0x525c68(0x164)]('\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)'),await formatCode(_0x352b17),console[_0x525c68(0x164)](_0x525c68(0x178)),await configureProject(_0x337fb1,_0x156e88,_0x1ae284),console[_0x525c68(0x164)](_0x525c68(0x166)),_0x156e88&&await pullApiConfig(_0x352b17,_0x156e88,_0x1ae284,_0x292c69),console[_0x525c68(0x164)]('\x0a√\x20Project\x20'+_0x337fb1+_0x525c68(0x16f)),console[_0x525c68(0x164)](_0x525c68(0x177)+_0x337fb1),console['log'](_0x525c68(0x17a));}catch(_0x491215){try{existsSync(_0x352b17)&&await a69_0xbdeb99['rm'](_0x352b17,{'recursive':!![],'force':!![]});}catch{}throw _0x491215;}}async function updatePackageJsonName(_0x12ddb8){const _0x1b4984=a69_0x296a,_0x4f2692=a69_0x2f3ade[_0x1b4984(0x175)](process[_0x1b4984(0x18e)](),_0x12ddb8),_0x3faa6f=a69_0x2f3ade[_0x1b4984(0x18c)](_0x4f2692,_0x1b4984(0x16c)),_0x1cea16=await a69_0xbdeb99['readFile'](_0x3faa6f,_0x1b4984(0x17b)),_0x467cad=JSON[_0x1b4984(0x15b)](_0x1cea16);_0x467cad[_0x1b4984(0x161)]=_0x12ddb8,_0x467cad[_0x1b4984(0x171)]='A\x20project\x20created\x20with\x20Lovrabet\x20CLI',await a69_0xbdeb99[_0x1b4984(0x16e)](_0x3faa6f,JSON[_0x1b4984(0x170)](_0x467cad,null,0x2)+'\x0a');}function detectPackageManager(){const _0x2ec420=a69_0x296a;try{return execSync('bun\x20--version',{'stdio':_0x2ec420(0x188)}),_0x2ec420(0x18b);}catch{return'npm';}}async function formatCode(_0xa7c5f4){const _0x1d4328=a69_0x296a;try{await execAsync(_0x1d4328(0x15e),{'cwd':_0xa7c5f4});}catch{}}async function configureProject(_0x475f4d,_0x5d6446,_0x403482){const _0x1134f6=a69_0x296a,_0x2e5ef4=a69_0x2f3ade[_0x1134f6(0x175)](process[_0x1134f6(0x18e)](),_0x475f4d),_0x1513d7=a69_0x2f3ade[_0x1134f6(0x18c)](_0x2e5ef4,NEW_CONFIG_NAME),_0x15aa21=readConfig(),_0x4b5802=typeof _0x15aa21[_0x1134f6(0x168)]===_0x1134f6(0x18d)?_0x15aa21[_0x1134f6(0x168)]:undefined,{app:_0x47b4d4,appcode:_0x4d7c70,..._0x129728}=_0x15aa21,_0x55de3a={..._0x129728,'appcode':_0x5d6446||'','env':_0x403482||_0x4b5802||'production','createdAt':new Date()[_0x1134f6(0x16d)](),'version':getCliVersion()};writeConfigFile(_0x1513d7,_0x55de3a);}async function pullApiConfig(_0x19622d,_0x43b2bd,_0x18e38b,_0x21cdc4){const _0x516280=a69_0x296a,_0x201d22=process['cwd']();try{process[_0x516280(0x181)](_0x19622d);const _0x548717=_0x18e38b||_0x516280(0x18a);initEnv(_0x548717),console[_0x516280(0x164)](_0x516280(0x157));const {configArray:_0x5a20a9}=await fetchModelList(_0x43b2bd,_0x21cdc4||''),_0x146312=await generateApiFile(_0x5a20a9,'',_0x43b2bd,!![],_0x548717,_0x516280(0x17f));console[_0x516280(0x164)]('\x20\x20√\x20Pulled\x20'+_0x5a20a9[_0x516280(0x163)]+'\x20dataset(s),\x20generated\x20'+_0x146312[_0x516280(0x155)]+_0x516280(0x174));}catch(_0x510409){console[_0x516280(0x164)](_0x516280(0x182)+CLI_BIN_NAME+'\x20api\x20pull`\x20manually\x20later.');}finally{process['chdir'](_0x201d22);}}
@@ -0,0 +1 @@
1
+ const a70_0x349356=a70_0x40d4;(function(_0x2b5386,_0x57dc64){const _0x1a79ea=a70_0x40d4,_0x58d7bd=_0x2b5386();while(!![]){try{const _0x5c0603=-parseInt(_0x1a79ea(0x1ab))/0x1*(parseInt(_0x1a79ea(0x1ad))/0x2)+-parseInt(_0x1a79ea(0x1ac))/0x3+-parseInt(_0x1a79ea(0x1b1))/0x4+parseInt(_0x1a79ea(0x1a8))/0x5*(parseInt(_0x1a79ea(0x1a7))/0x6)+parseInt(_0x1a79ea(0x1a9))/0x7*(parseInt(_0x1a79ea(0x1aa))/0x8)+-parseInt(_0x1a79ea(0x1b4))/0x9*(parseInt(_0x1a79ea(0x1a5))/0xa)+-parseInt(_0x1a79ea(0x1af))/0xb*(-parseInt(_0x1a79ea(0x1b0))/0xc);if(_0x5c0603===_0x57dc64)break;else _0x58d7bd['push'](_0x58d7bd['shift']());}catch(_0x35c4ea){_0x58d7bd['push'](_0x58d7bd['shift']());}}}(a70_0x1f6a,0xc154a));import a70_0x3eda28 from'node:path';function a70_0x1f6a(){const _0xa5508d=['templates','2644848HAzwRy','resolve','projects','10HKJpIo','../../../../','2022234qKkuRK','5iOrocC','1309UOeuEB','3056XxqfFo','17IVglec','1265967pURAEY','83662hUoPPl','dirname','3156010JutyLV','132VpHJAV','5382452cYWqyU','sub-app-react-demo'];a70_0x1f6a=function(){return _0xa5508d;};return a70_0x1f6a();}import{fileURLToPath}from'node:url';const __dirname=a70_0x3eda28[a70_0x349356(0x1ae)](fileURLToPath(import.meta.url));function a70_0x40d4(_0x11579e,_0xdf2595){_0x11579e=_0x11579e-0x1a5;const _0x1f6ad3=a70_0x1f6a();let _0x40d4f5=_0x1f6ad3[_0x11579e];return _0x40d4f5;}export function getRabetbaseCliPackageRoot(){const _0x5a1412=a70_0x349356;return a70_0x3eda28[_0x5a1412(0x1b5)](__dirname,_0x5a1412(0x1a6));}export function getSubAppReactDemoTemplateDir(){const _0x3da5ea=a70_0x349356;return a70_0x3eda28['join'](getRabetbaseCliPackageRoot(),_0x3da5ea(0x1b3),_0x3da5ea(0x1b6),_0x3da5ea(0x1b2));}
@@ -0,0 +1 @@
1
+ function a71_0x752c(_0x52157c,_0x3795a5){_0x52157c=_0x52157c-0x10b;const _0x55b458=a71_0x55b4();let _0x752cb1=_0x55b458[_0x52157c];return _0x752cb1;}(function(_0x28b4ed,_0x152721){const _0x53ad71=a71_0x752c,_0x3bacee=_0x28b4ed();while(!![]){try{const _0x2a5822=parseInt(_0x53ad71(0x112))/0x1+-parseInt(_0x53ad71(0x115))/0x2*(parseInt(_0x53ad71(0x10d))/0x3)+parseInt(_0x53ad71(0x116))/0x4+-parseInt(_0x53ad71(0x118))/0x5+parseInt(_0x53ad71(0x113))/0x6+parseInt(_0x53ad71(0x10f))/0x7+-parseInt(_0x53ad71(0x10e))/0x8;if(_0x2a5822===_0x152721)break;else _0x3bacee['push'](_0x3bacee['shift']());}catch(_0x1918bc){_0x3bacee['push'](_0x3bacee['shift']());}}}(a71_0x55b4,0x867f0));import a71_0x695e9c from'node:path';function a71_0x55b4(){const _0x5253e5=['cwd','3KbGAJK','1011360AZeSQG','5058256COmKXe','message','resolve','285577CNnvFK','6553950hJeNkV','项目模板复制失败','1390012amYgJJ','697340lzVncD','now','4512615ddhbDE','success','copy','项目模板复制完成'];a71_0x55b4=function(){return _0x5253e5;};return a71_0x55b4();}import{copyDirectory}from'../../../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../../../utils/logger.js';import{getSubAppReactDemoTemplateDir}from'./project-template-path.js';const templateDir=getSubAppReactDemoTemplateDir();export async function copyProjectTemplate(_0x58bf75){const _0x384cf3=a71_0x752c,_0x31e402=Date[_0x384cf3(0x117)](),_0x1ea7a6=a71_0x695e9c[_0x384cf3(0x111)](process[_0x384cf3(0x10c)](),_0x58bf75);try{logger['info'](_0x384cf3(0x11a),'开始复制项目模板',{'projectCode':_0x58bf75,'templateDir':templateDir}),await copyDirectory(templateDir,_0x1ea7a6);const _0xaabec9=Date[_0x384cf3(0x117)]()-_0x31e402;logger[_0x384cf3(0x119)](_0x384cf3(0x11a),_0x384cf3(0x10b),_0xaabec9,{'projectCode':_0x58bf75});}catch(_0x7c5b22){const _0x26b505=Date['now']()-_0x31e402;logger['error'](_0x384cf3(0x11a),_0x384cf3(0x114),{'projectCode':_0x58bf75,'error':_0x7c5b22 instanceof Error?_0x7c5b22[_0x384cf3(0x110)]:String(_0x7c5b22),'duration':_0x26b505});throw _0x7c5b22;}return formatElapsed(_0x31e402);}
@@ -0,0 +1 @@
1
+ (function(_0x39eb43,_0x228dc2){const _0x24dc4a=a72_0x694f,_0x47fa66=_0x39eb43();while(!![]){try{const _0x2eaffd=-parseInt(_0x24dc4a(0x184))/0x1*(-parseInt(_0x24dc4a(0x18a))/0x2)+-parseInt(_0x24dc4a(0x182))/0x3+-parseInt(_0x24dc4a(0x17f))/0x4+-parseInt(_0x24dc4a(0x188))/0x5+parseInt(_0x24dc4a(0x189))/0x6*(-parseInt(_0x24dc4a(0x18b))/0x7)+-parseInt(_0x24dc4a(0x18d))/0x8*(parseInt(_0x24dc4a(0x190))/0x9)+parseInt(_0x24dc4a(0x187))/0xa*(parseInt(_0x24dc4a(0x18c))/0xb);if(_0x2eaffd===_0x228dc2)break;else _0x47fa66['push'](_0x47fa66['shift']());}catch(_0x185218){_0x47fa66['push'](_0x47fa66['shift']());}}}(a72_0xcea8,0xab5a0));import a72_0x3f95bc from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../../../utils/logger.js';function a72_0xcea8(){const _0x460f7b=['now','508806vnBIfO','cwd','npx','代码格式化完成','3746044dPxxAc','message','--write','4156989njROeT','开始格式化代码','655966MVFfte','format','success','2912570KAKImO','5213495wFREeb','228WagsIU','2kdtpBS','96341CkRCtb','187OgjVCg','144byyulQ','代码格式化失败'];a72_0xcea8=function(){return _0x460f7b;};return a72_0xcea8();}function a72_0x694f(_0x1f451f,_0x4bdc36){_0x1f451f=_0x1f451f-0x17d;const _0xcea848=a72_0xcea8();let _0x694fc7=_0xcea848[_0x1f451f];return _0x694fc7;}import{resolveNpmBin}from'../../../utils/platform.js';export async function formatProjectCode(_0x1d4411){const _0x43e27b=a72_0x694f,_0x48932c=Date[_0x43e27b(0x18f)](),_0x2470de=a72_0x3f95bc['resolve'](process[_0x43e27b(0x191)](),_0x1d4411);try{logger['info'](_0x43e27b(0x185),_0x43e27b(0x183),{'projectCode':_0x1d4411}),await execa(resolveNpmBin(_0x43e27b(0x17d)),['prettier',_0x43e27b(0x181),'.'],{'cwd':_0x2470de});const _0x23622e=Date[_0x43e27b(0x18f)]()-_0x48932c;logger[_0x43e27b(0x186)]('format',_0x43e27b(0x17e),_0x23622e,{'projectCode':_0x1d4411});}catch(_0xf17715){const _0x1209c5=Date[_0x43e27b(0x18f)]()-_0x48932c;logger['error']('format',_0x43e27b(0x18e),{'projectCode':_0x1d4411,'error':_0xf17715 instanceof Error?_0xf17715[_0x43e27b(0x180)]:String(_0xf17715),'duration':_0x1209c5});throw _0xf17715;}return formatElapsed(_0x48932c);}
@@ -0,0 +1 @@
1
+ function a73_0x4f90(_0x2427af,_0x33edd1){_0x2427af=_0x2427af-0x101;const _0x501cef=a73_0x501c();let _0x4f904c=_0x501cef[_0x2427af];return _0x4f904c;}(function(_0x37ed66,_0x441819){const _0x42dfac=a73_0x4f90,_0x2fa8b4=_0x37ed66();while(!![]){try{const _0x18b6a5=-parseInt(_0x42dfac(0x103))/0x1*(parseInt(_0x42dfac(0x10b))/0x2)+parseInt(_0x42dfac(0x10a))/0x3*(parseInt(_0x42dfac(0x10c))/0x4)+parseInt(_0x42dfac(0x101))/0x5*(-parseInt(_0x42dfac(0x107))/0x6)+parseInt(_0x42dfac(0x10d))/0x7*(parseInt(_0x42dfac(0x109))/0x8)+parseInt(_0x42dfac(0x110))/0x9*(parseInt(_0x42dfac(0x117))/0xa)+-parseInt(_0x42dfac(0x113))/0xb*(-parseInt(_0x42dfac(0x10f))/0xc)+-parseInt(_0x42dfac(0x114))/0xd*(-parseInt(_0x42dfac(0x105))/0xe);if(_0x18b6a5===_0x441819)break;else _0x2fa8b4['push'](_0x2fa8b4['shift']());}catch(_0x168266){_0x2fa8b4['push'](_0x2fa8b4['shift']());}}}(a73_0x501c,0x43912));function a73_0x501c(){const _0x4291bd=['cwd','https://registry.npmmirror.com','11UzvBjM','832noAoIp','error','success','5500DMQAJn','5010lgVofB','install','208263udkyGV','依赖安装失败','30450GoWzqg','开始安装依赖','1422xejJXS','info','69488imOJVm','31158BJLdQh','4QyIiPD','56qdtIbz','385FgbEhd','now','621840fuKSpr','1908IISnxW'];a73_0x501c=function(){return _0x4291bd;};return a73_0x501c();}import a73_0x3390c9 from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../../../utils/logger.js';import{resolveNpmBin}from'../../../utils/platform.js';export async function installDependencies(_0x574f09){const _0x3e4eaa=a73_0x4f90,_0x54b970=Date['now'](),_0x10e457=a73_0x3390c9['resolve'](process[_0x3e4eaa(0x111)](),_0x574f09);try{logger[_0x3e4eaa(0x108)]('install',_0x3e4eaa(0x106),{'projectCode':_0x574f09,'registry':_0x3e4eaa(0x112)}),await execa(resolveNpmBin('npm'),['install','--registry',_0x3e4eaa(0x112)],{'cwd':_0x10e457});const _0x5d68b4=Date[_0x3e4eaa(0x10e)]()-_0x54b970;logger[_0x3e4eaa(0x116)](_0x3e4eaa(0x102),'依赖安装完成',_0x5d68b4,{'projectCode':_0x574f09});}catch(_0x56639e){const _0x2085b5=Date[_0x3e4eaa(0x10e)]()-_0x54b970;logger[_0x3e4eaa(0x115)]('install',_0x3e4eaa(0x104),{'projectCode':_0x574f09,'error':_0x56639e instanceof Error?_0x56639e['message']:String(_0x56639e),'duration':_0x2085b5});throw _0x56639e;}return formatElapsed(_0x54b970);}