@lovrabet/rabetbase-cli 2.0.2-beta.6 → 2.0.2-beta.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 (132) hide show
  1. package/lib/ai-setup/config.js +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -0
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/doc.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/app.js +1 -1
  19. package/lib/commands/auth.js +1 -1
  20. package/lib/commands/bff/delete.js +1 -1
  21. package/lib/commands/bff/detail.js +1 -1
  22. package/lib/commands/bff/index.js +1 -1
  23. package/lib/commands/bff/list.js +1 -1
  24. package/lib/commands/bff/new.js +1 -1
  25. package/lib/commands/bff/pull.js +1 -1
  26. package/lib/commands/bff/push.js +1 -1
  27. package/lib/commands/bff/status.js +1 -1
  28. package/lib/commands/build.js +1 -1
  29. package/lib/commands/cli-update.js +1 -1
  30. package/lib/commands/codegen/index.js +1 -1
  31. package/lib/commands/codegen/sdk.js +1 -1
  32. package/lib/commands/codegen/sql.js +1 -1
  33. package/lib/commands/common/flags.js +1 -1
  34. package/lib/commands/config.js +1 -1
  35. package/lib/commands/create.js +1 -1
  36. package/lib/commands/dataset/detail.js +1 -1
  37. package/lib/commands/dataset/index.js +1 -1
  38. package/lib/commands/dataset/links.js +1 -1
  39. package/lib/commands/dataset/list.js +1 -1
  40. package/lib/commands/dataset/operations.js +1 -1
  41. package/lib/commands/doctor.js +1 -1
  42. package/lib/commands/init.js +1 -1
  43. package/lib/commands/logout.js +1 -1
  44. package/lib/commands/logs.js +1 -1
  45. package/lib/commands/mcp.js +1 -1
  46. package/lib/commands/menu/index.js +1 -1
  47. package/lib/commands/menu/shared/compare-table.js +1 -1
  48. package/lib/commands/menu/shared/index.js +1 -1
  49. package/lib/commands/menu/shared/inquirer.js +1 -1
  50. package/lib/commands/menu/shared/local-pages.js +1 -1
  51. package/lib/commands/menu/shared/logic.js +1 -1
  52. package/lib/commands/menu/shared/service.js +1 -1
  53. package/lib/commands/menu/shared/sync-core.js +1 -1
  54. package/lib/commands/menu/shared/update-core.js +1 -1
  55. package/lib/commands/menu/shared/valid-url.js +1 -1
  56. package/lib/commands/menu/sync.js +1 -1
  57. package/lib/commands/menu/update.js +1 -1
  58. package/lib/commands/preview.js +1 -1
  59. package/lib/commands/project-upgrade.js +1 -1
  60. package/lib/commands/registry.js +1 -1
  61. package/lib/commands/run.js +1 -1
  62. package/lib/commands/skill.js +1 -1
  63. package/lib/commands/sql/detail.js +1 -1
  64. package/lib/commands/sql/exec.js +1 -1
  65. package/lib/commands/sql/index.js +1 -1
  66. package/lib/commands/sql/list.js +1 -1
  67. package/lib/commands/sql/save.js +1 -1
  68. package/lib/commands/sql/validate.js +1 -1
  69. package/lib/commands/start.js +1 -1
  70. package/lib/config/config-help.js +1 -1
  71. package/lib/config/main.js +1 -1
  72. package/lib/constant/cli.js +1 -1
  73. package/lib/constant/domain.js +1 -1
  74. package/lib/constant/env.js +1 -1
  75. package/lib/context.js +1 -1
  76. package/lib/core/alias-resolver.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/bff/config.js +1 -1
  79. package/lib/core/bff/file-system.js +1 -1
  80. package/lib/core/bff/hash.js +1 -1
  81. package/lib/core/bff/lock.js +1 -1
  82. package/lib/core/bff/utils.js +1 -1
  83. package/lib/core/db-resolver.js +1 -1
  84. package/lib/core/sql-validator.js +1 -1
  85. package/lib/create-app/enhanced-guided-create.js +1 -1
  86. package/lib/create-app/format-elapsed.js +1 -1
  87. package/lib/create-app/main.js +1 -1
  88. package/lib/create-app/non-interactive.js +1 -1
  89. package/lib/create-app/task-finished.js +1 -1
  90. package/lib/create-app/task-loading.js +1 -1
  91. package/lib/create-app/task-running.js +1 -1
  92. package/lib/create-app/task-time.js +1 -1
  93. package/lib/create-app/use-copy-project-template.js +1 -1
  94. package/lib/create-app/use-format-code.js +1 -1
  95. package/lib/create-app/use-install-dependencies.js +1 -1
  96. package/lib/errors.js +1 -1
  97. package/lib/framework/flags.js +1 -1
  98. package/lib/framework/help.js +1 -1
  99. package/lib/framework/index.js +1 -1
  100. package/lib/framework/output.js +1 -1
  101. package/lib/framework/response.js +1 -1
  102. package/lib/framework/runner.js +1 -1
  103. package/lib/generated/build-info.js +1 -1
  104. package/lib/help.js +1 -1
  105. package/lib/init/main.js +1 -1
  106. package/lib/mcp/McpInstallUI.js +1 -1
  107. package/lib/mcp/claude.js +1 -1
  108. package/lib/mcp/cursor.js +1 -1
  109. package/lib/mcp/main.js +1 -1
  110. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  111. package/lib/mcp/mcp-installer.js +1 -1
  112. package/lib/skills/main.js +1 -1
  113. package/lib/skills/npx-skills-add.js +1 -1
  114. package/lib/telemetry/cli-help-trace.js +1 -0
  115. package/lib/telemetry/otel-logger-version.js +1 -0
  116. package/lib/telemetry/register-otel-exit-shutdown.js +1 -0
  117. package/lib/ui/IDESelector.js +1 -1
  118. package/lib/ui/useIDESelection.js +1 -1
  119. package/lib/utils/ai_config.js +1 -1
  120. package/lib/utils/cdn-config.js +1 -1
  121. package/lib/utils/check-sdk-version.js +1 -1
  122. package/lib/utils/cli-version-check.js +1 -1
  123. package/lib/utils/config.js +1 -1
  124. package/lib/utils/copy-directory.js +1 -1
  125. package/lib/utils/file-utils.js +1 -1
  126. package/lib/utils/guides-cdn.js +1 -1
  127. package/lib/utils/http-client.js +1 -1
  128. package/lib/utils/logger.js +1 -1
  129. package/lib/utils/rules-cdn.js +1 -1
  130. package/lib/utils/sleep.js +1 -1
  131. package/lib/utils/template-replacer.js +1 -1
  132. package/package.json +2 -1
@@ -1 +1 @@
1
- function a50_0x2431(){const _0x372e25=['216564ratwSa','online','464048PRRquN','/smartapi/menu/find?appCode=','get-online-menu-list','Failed\x20to\x20update\x20menu\x20assets:\x20','import','errorCode','json','label','resources','/smartapi/menu/create','application/json','all','update-menu-cdn-url','Server\x20returned\x20empty\x20menu\x20list','155624yBQdUP','2lJhhWn','Auth\x20validation\x20failed.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','1846617rszQht','path','5683950thiqih','312697zecJRE','Creating\x20menu:\x20','success','stringify','info','Failed\x20to\x20fetch\x20menu\x20list:\x20','map','isArray','Updating\x20menu\x20asset\x20links:\x20','errorMsg','Failed\x20to\x20create\x20menu,\x20HTTP\x20status:\x20','extend','error','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','children','create-menu','length','flat','Menu\x20created\x20successfully:\x20','Failed\x20to\x20create\x20menu:\x20','procode','/smartapi/menu/update','6oHqoII','11210080vxYYEw','Menu\x20assets\x20synced:\x20','status','Error','includes','create-menus','POST','Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','data','parse','40nnocRJ','Failed\x20to\x20fetch\x20menu\x20list,\x20HTTP\x20status:\x20','Start\x20batch\x20menu\x20creation,\x20total\x20'];a50_0x2431=function(){return _0x372e25;};return a50_0x2431();}(function(_0x2d4d98,_0x3147a7){const _0x5e5816=a50_0x1885,_0x294f68=_0x2d4d98();while(!![]){try{const _0x580b89=-parseInt(_0x5e5816(0x66))/0x1+-parseInt(_0x5e5816(0x9b))/0x2*(-parseInt(_0x5e5816(0x9d))/0x3)+-parseInt(_0x5e5816(0x8a))/0x4*(parseInt(_0x5e5816(0x87))/0x5)+parseInt(_0x5e5816(0x7c))/0x6*(parseInt(_0x5e5816(0x9a))/0x7)+-parseInt(_0x5e5816(0x8c))/0x8+-parseInt(_0x5e5816(0x9f))/0x9+parseInt(_0x5e5816(0x7d))/0xa;if(_0x580b89===_0x3147a7)break;else _0x294f68['push'](_0x294f68['shift']());}catch(_0x2b2643){_0x294f68['push'](_0x294f68['shift']());}}}(a50_0x2431,0x4ef46));import{getApiDomain}from'../../../constant/domain.js';import{getEnv}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';export async function getOnlineMenuList(_0x5dd140,_0xa6249b){const _0x5a2b23=a50_0x1885,_0x5f1656=getEnv();logger['info'](_0x5a2b23(0x8e),_0x5f1656===_0x5a2b23(0x8b)?_0x5a2b23(0x73)+_0x5dd140+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x5dd140+')');const _0x15474f=await fetch(getApiDomain()+_0x5a2b23(0x8d)+_0x5dd140,{'method':'GET','headers':{'Content-Type':_0x5a2b23(0x96),'Cookie':_0xa6249b}});if(!_0x15474f['ok']){if(_0x15474f[_0x5a2b23(0x7f)]===0x191){const _0x23995a='Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again';logger[_0x5a2b23(0x72)](_0x5a2b23(0x8e),_0x23995a,{'status':_0x15474f[_0x5a2b23(0x7f)]});throw new Error(_0x23995a);}const _0x4bec7f=_0x5a2b23(0x88)+_0x15474f['status'];logger['error'](_0x5a2b23(0x8e),_0x4bec7f);throw new Error(_0x4bec7f);}const _0x79afd8=await _0x15474f[_0x5a2b23(0x92)]();if(!_0x79afd8[_0x5a2b23(0x68)]){const _0x311d24=_0x5a2b23(0x6b)+(_0x79afd8[_0x5a2b23(0x6f)]||'Error');logger['error'](_0x5a2b23(0x8e),_0x311d24,{'errorCode':_0x79afd8[_0x5a2b23(0x91)],'errorMsg':_0x79afd8[_0x5a2b23(0x6f)]});throw new Error(_0x311d24);}if(!_0x79afd8[_0x5a2b23(0x85)])return logger[_0x5a2b23(0x6a)](_0x5a2b23(0x8e),_0x5a2b23(0x99)),[];return logger[_0x5a2b23(0x6a)](_0x5a2b23(0x8e),'Fetched\x20'+_0x79afd8[_0x5a2b23(0x85)]['length']+'\x20online\x20menus\x20successfully'),_0x79afd8['data']['map'](flattenMenuItem)[_0x5a2b23(0x77)]();}function flattenMenuItem(_0x165202){const _0x332d3e=a50_0x1885;let _0x1d07ff=[];try{if(_0x165202[_0x332d3e(0x71)]?.[_0x332d3e(0x94)]){const _0x44c13d=JSON[_0x332d3e(0x86)](_0x165202[_0x332d3e(0x71)][_0x332d3e(0x94)]);Array[_0x332d3e(0x6d)](_0x44c13d)&&(_0x1d07ff=_0x44c13d);}}catch(_0x3e3fe0){}const _0x517b6b=[{'id':_0x165202['id'],'path':_0x165202[_0x332d3e(0x9e)],'label':_0x165202[_0x332d3e(0x93)],'resources':_0x1d07ff}];if(_0x165202[_0x332d3e(0x74)]&&_0x165202[_0x332d3e(0x74)][_0x332d3e(0x76)]>0x0)for(const _0xec12a1 of _0x165202[_0x332d3e(0x74)]){_0x517b6b['push'](...flattenMenuItem(_0xec12a1));}return _0x517b6b;}function a50_0x1885(_0x3ef7f3,_0x11aedb){_0x3ef7f3=_0x3ef7f3-0x66;const _0x243142=a50_0x2431();let _0x18859d=_0x243142[_0x3ef7f3];return _0x18859d;}export async function createMenu(_0x51e54d,_0x27d4df,_0x1a6f4b){const _0x491ce2=a50_0x1885;logger[_0x491ce2(0x6a)](_0x491ce2(0x75),_0x491ce2(0x67)+_0x1a6f4b[_0x491ce2(0x93)]+'\x20('+_0x1a6f4b[_0x491ce2(0x9e)]+')');const _0x25a542={'appCode':_0x51e54d,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x491ce2(0x90),'resources':_0x1a6f4b[_0x491ce2(0x94)]?JSON[_0x491ce2(0x69)](_0x1a6f4b[_0x491ce2(0x94)]):undefined},..._0x1a6f4b},_0x1348e2=await fetch(getApiDomain()+_0x491ce2(0x95),{'method':_0x491ce2(0x83),'body':JSON[_0x491ce2(0x69)](_0x25a542),'headers':{'Content-Type':_0x491ce2(0x96),'Cookie':_0x27d4df}});if(!_0x1348e2['ok']){if(_0x1348e2[_0x491ce2(0x7f)]===0x191){const _0x16a710=_0x491ce2(0x84);logger[_0x491ce2(0x72)](_0x491ce2(0x75),_0x16a710,{'status':_0x1348e2[_0x491ce2(0x7f)],'menu':_0x1a6f4b['label']});throw new Error(_0x16a710);}const _0x4d3b85=_0x491ce2(0x70)+_0x1348e2[_0x491ce2(0x7f)];logger[_0x491ce2(0x72)](_0x491ce2(0x75),_0x4d3b85,{'menu':_0x1a6f4b[_0x491ce2(0x93)]});throw new Error(_0x4d3b85);}const _0x219701=await _0x1348e2[_0x491ce2(0x92)]();if(!_0x219701[_0x491ce2(0x68)]){const _0x534102=_0x491ce2(0x79)+(_0x219701[_0x491ce2(0x6f)]||_0x491ce2(0x80));logger[_0x491ce2(0x72)](_0x491ce2(0x75),_0x534102,{'errorCode':_0x219701[_0x491ce2(0x91)],'errorMsg':_0x219701['errorMsg'],'menu':_0x1a6f4b['label']});throw new Error(_0x534102);}logger['info'](_0x491ce2(0x75),_0x491ce2(0x78)+_0x1a6f4b[_0x491ce2(0x93)],_0x219701[_0x491ce2(0x85)]);}async function createSingleMenu(_0x2dd143,_0x1ec6fe,_0x1d6e84,_0x3a538c){const _0x7ea1cb=a50_0x1885,_0x3eca3c={'appCode':_0x2dd143,'type':_0x7ea1cb(0x7a),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x3a538c?JSON[_0x7ea1cb(0x69)](_0x3a538c):undefined},'label':_0x1d6e84['label'],'path':_0x1d6e84[_0x7ea1cb(0x9e)]},_0x21315f=await fetch(getApiDomain()+_0x7ea1cb(0x95),{'method':_0x7ea1cb(0x83),'body':JSON[_0x7ea1cb(0x69)](_0x3eca3c),'headers':{'Content-Type':_0x7ea1cb(0x96),'Cookie':_0x1ec6fe}});if(!_0x21315f['ok']){if(_0x21315f[_0x7ea1cb(0x7f)]===0x191){const _0xa806ab=_0x7ea1cb(0x84);logger['error'](_0x7ea1cb(0x75),_0xa806ab,{'status':_0x21315f['status'],'menu':_0x1d6e84[_0x7ea1cb(0x93)]});throw new Error(_0xa806ab);}const _0x50fdab=_0x7ea1cb(0x70)+_0x21315f[_0x7ea1cb(0x7f)];logger[_0x7ea1cb(0x72)](_0x7ea1cb(0x75),_0x50fdab,{'menu':_0x1d6e84['label']});throw new Error(_0x50fdab);}const _0x19d9a4=await _0x21315f[_0x7ea1cb(0x92)]();if(!_0x19d9a4['success']){if(_0x19d9a4[_0x7ea1cb(0x91)]==='0011'||_0x19d9a4[_0x7ea1cb(0x6f)]?.[_0x7ea1cb(0x81)]('登录')){const _0x56b3f1=_0x7ea1cb(0x9c);logger[_0x7ea1cb(0x72)](_0x7ea1cb(0x75),_0x56b3f1,{'errorCode':_0x19d9a4['errorCode'],'errorMsg':_0x19d9a4[_0x7ea1cb(0x6f)],'menu':_0x1d6e84[_0x7ea1cb(0x93)]});throw new Error(_0x56b3f1);}const _0x439cac='Failed\x20to\x20create\x20menu:\x20'+(_0x19d9a4[_0x7ea1cb(0x6f)]||_0x7ea1cb(0x80));logger['error'](_0x7ea1cb(0x75),_0x439cac,{'errorCode':_0x19d9a4[_0x7ea1cb(0x91)],'errorMsg':_0x19d9a4['errorMsg'],'menu':_0x1d6e84['label']});throw new Error(_0x439cac);}logger[_0x7ea1cb(0x6a)]('create-menu',_0x7ea1cb(0x78)+_0x1d6e84['label']);}export async function createMenus(_0x656bb9,_0x26d763,_0x14a9e8,_0x346b4b){const _0x3f2dd6=a50_0x1885;logger[_0x3f2dd6(0x6a)](_0x3f2dd6(0x82),_0x3f2dd6(0x89)+_0x14a9e8[_0x3f2dd6(0x76)]),await Promise[_0x3f2dd6(0x97)](_0x14a9e8[_0x3f2dd6(0x6c)](async _0x35b28f=>{await createSingleMenu(_0x656bb9,_0x26d763,_0x35b28f,_0x346b4b);})),logger[_0x3f2dd6(0x6a)](_0x3f2dd6(0x82),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x14a9e8['length']);}export async function updateMenuCdnUrl(_0x530d74,_0x1e87fd,_0x44e5bf){const _0x422a9c=a50_0x1885;logger['info'](_0x422a9c(0x98),_0x422a9c(0x6e)+_0x44e5bf[_0x422a9c(0x93)]+'\x20('+_0x44e5bf[_0x422a9c(0x9e)]+')');const _0x1efcb2={'id':_0x44e5bf['id'],'appCode':_0x530d74,'extend':{'loadScriptMode':_0x422a9c(0x90),'resources':_0x44e5bf[_0x422a9c(0x94)]?JSON['stringify'](_0x44e5bf[_0x422a9c(0x94)]):undefined}},_0x2cf522=await fetch(getApiDomain()+_0x422a9c(0x7b),{'method':_0x422a9c(0x83),'body':JSON[_0x422a9c(0x69)](_0x1efcb2),'headers':{'Content-Type':_0x422a9c(0x96),'Cookie':_0x1e87fd}});if(!_0x2cf522['ok']){if(_0x2cf522['status']===0x191){const _0x12e3ee=_0x422a9c(0x84);logger[_0x422a9c(0x72)](_0x422a9c(0x98),_0x12e3ee,{'status':_0x2cf522['status'],'menu':_0x44e5bf[_0x422a9c(0x93)]});throw new Error(_0x12e3ee);}const _0x457f2e=_0x422a9c(0x8f)+_0x2cf522[_0x422a9c(0x7f)];logger[_0x422a9c(0x72)](_0x422a9c(0x98),_0x457f2e,{'menu':_0x44e5bf['label']});throw new Error(_0x457f2e);}const _0x54c914=await _0x2cf522[_0x422a9c(0x92)]();if(!_0x54c914[_0x422a9c(0x68)]){const _0x598ffd=_0x422a9c(0x8f)+(_0x54c914[_0x422a9c(0x6f)]||_0x422a9c(0x80));logger[_0x422a9c(0x72)]('update-menu-cdn-url',_0x598ffd,{'errorCode':_0x54c914[_0x422a9c(0x91)],'errorMsg':_0x54c914[_0x422a9c(0x6f)],'menu':_0x44e5bf[_0x422a9c(0x93)]});throw new Error(_0x598ffd);}logger[_0x422a9c(0x6a)](_0x422a9c(0x98),_0x422a9c(0x7e)+_0x44e5bf[_0x422a9c(0x93)],_0x54c914[_0x422a9c(0x85)]);}
1
+ (function(_0x247687,_0x393927){const _0x2b8e31=a51_0x2b85,_0x2d11f7=_0x247687();while(!![]){try{const _0x2ea45c=parseInt(_0x2b8e31(0x1dd))/0x1*(-parseInt(_0x2b8e31(0x1e0))/0x2)+-parseInt(_0x2b8e31(0x1c7))/0x3*(-parseInt(_0x2b8e31(0x1df))/0x4)+-parseInt(_0x2b8e31(0x1f6))/0x5*(parseInt(_0x2b8e31(0x1cb))/0x6)+-parseInt(_0x2b8e31(0x1fd))/0x7+parseInt(_0x2b8e31(0x1f8))/0x8*(-parseInt(_0x2b8e31(0x1e4))/0x9)+-parseInt(_0x2b8e31(0x1c9))/0xa*(parseInt(_0x2b8e31(0x1f9))/0xb)+-parseInt(_0x2b8e31(0x1e1))/0xc*(-parseInt(_0x2b8e31(0x203))/0xd);if(_0x2ea45c===_0x393927)break;else _0x2d11f7['push'](_0x2d11f7['shift']());}catch(_0xfd9cc4){_0x2d11f7['push'](_0x2d11f7['shift']());}}}(a51_0x1f15,0xe0380));import{getApiDomain}from'../../../constant/domain.js';import{getEnv}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';export async function getOnlineMenuList(_0x458919,_0x3d26e7){const _0x5922c5=a51_0x2b85,_0x52ba39=getEnv();logger[_0x5922c5(0x1f3)](_0x5922c5(0x1ed),_0x52ba39==='online'?_0x5922c5(0x1cf)+_0x458919+')':_0x5922c5(0x1e3)+_0x458919+')');const _0x46e380=await fetch(getApiDomain()+_0x5922c5(0x1ea)+_0x458919,{'method':_0x5922c5(0x1d0),'headers':{'Content-Type':'application/json','Cookie':_0x3d26e7}});if(!_0x46e380['ok']){if(_0x46e380[_0x5922c5(0x1ee)]===0x191){const _0x2a1f66=_0x5922c5(0x1d9);logger['error']('get-online-menu-list',_0x2a1f66,{'status':_0x46e380[_0x5922c5(0x1ee)]});throw new Error(_0x2a1f66);}const _0x89e2be='Failed\x20to\x20fetch\x20menu\x20list,\x20HTTP\x20status:\x20'+_0x46e380['status'];logger[_0x5922c5(0x1cd)](_0x5922c5(0x1ed),_0x89e2be);throw new Error(_0x89e2be);}const _0x26b518=await _0x46e380['json']();if(!_0x26b518[_0x5922c5(0x1d2)]){const _0x496875=_0x5922c5(0x1e8)+(_0x26b518[_0x5922c5(0x1f0)]||_0x5922c5(0x1c6));logger[_0x5922c5(0x1cd)](_0x5922c5(0x1ed),_0x496875,{'errorCode':_0x26b518[_0x5922c5(0x1d1)],'errorMsg':_0x26b518['errorMsg']});throw new Error(_0x496875);}if(!_0x26b518[_0x5922c5(0x1d8)])return logger[_0x5922c5(0x1f3)]('get-online-menu-list',_0x5922c5(0x1ec)),[];return logger[_0x5922c5(0x1f3)](_0x5922c5(0x1ed),_0x5922c5(0x204)+_0x26b518['data'][_0x5922c5(0x200)]+_0x5922c5(0x1fc)),_0x26b518[_0x5922c5(0x1d8)]['map'](flattenMenuItem)[_0x5922c5(0x1cc)]();}function a51_0x2b85(_0x31b841,_0x43b9a1){_0x31b841=_0x31b841-0x1c5;const _0x1f1590=a51_0x1f15();let _0x2b85e5=_0x1f1590[_0x31b841];return _0x2b85e5;}function flattenMenuItem(_0x28247d){const _0x45211d=a51_0x2b85;let _0x837477=[];try{if(_0x28247d['extend']?.[_0x45211d(0x1d7)]){const _0x5bbb79=JSON[_0x45211d(0x1dc)](_0x28247d[_0x45211d(0x1e7)][_0x45211d(0x1d7)]);Array[_0x45211d(0x1e9)](_0x5bbb79)&&(_0x837477=_0x5bbb79);}}catch(_0x59cf79){}const _0x2a5e10=[{'id':_0x28247d['id'],'path':_0x28247d[_0x45211d(0x1de)],'label':_0x28247d[_0x45211d(0x1d6)],'resources':_0x837477}];if(_0x28247d[_0x45211d(0x1d5)]&&_0x28247d[_0x45211d(0x1d5)][_0x45211d(0x200)]>0x0)for(const _0x2ef591 of _0x28247d[_0x45211d(0x1d5)]){_0x2a5e10[_0x45211d(0x1d3)](...flattenMenuItem(_0x2ef591));}return _0x2a5e10;}export async function createMenu(_0x2e4828,_0x97541,_0x1f4249){const _0x441cd1=a51_0x2b85;logger[_0x441cd1(0x1f3)](_0x441cd1(0x1e2),_0x441cd1(0x1e6)+_0x1f4249[_0x441cd1(0x1d6)]+'\x20('+_0x1f4249['path']+')');const _0x18cc37={'appCode':_0x2e4828,'type':_0x441cd1(0x1ef),'sort':0x0,'extend':{'loadScriptMode':_0x441cd1(0x1e5),'resources':_0x1f4249[_0x441cd1(0x1d7)]?JSON[_0x441cd1(0x202)](_0x1f4249[_0x441cd1(0x1d7)]):undefined},..._0x1f4249},_0x55e9e1=await fetch(getApiDomain()+_0x441cd1(0x1fe),{'method':_0x441cd1(0x1f7),'body':JSON[_0x441cd1(0x202)](_0x18cc37),'headers':{'Content-Type':_0x441cd1(0x1ce),'Cookie':_0x97541}});if(!_0x55e9e1['ok']){if(_0x55e9e1[_0x441cd1(0x1ee)]===0x191){const _0x4f7633=_0x441cd1(0x1d9);logger[_0x441cd1(0x1cd)](_0x441cd1(0x1e2),_0x4f7633,{'status':_0x55e9e1['status'],'menu':_0x1f4249[_0x441cd1(0x1d6)]});throw new Error(_0x4f7633);}const _0xc2bcfe=_0x441cd1(0x1ff)+_0x55e9e1[_0x441cd1(0x1ee)];logger[_0x441cd1(0x1cd)](_0x441cd1(0x1e2),_0xc2bcfe,{'menu':_0x1f4249[_0x441cd1(0x1d6)]});throw new Error(_0xc2bcfe);}const _0x340eee=await _0x55e9e1[_0x441cd1(0x1db)]();if(!_0x340eee[_0x441cd1(0x1d2)]){const _0x45e63f=_0x441cd1(0x1eb)+(_0x340eee[_0x441cd1(0x1f0)]||_0x441cd1(0x1c6));logger['error'](_0x441cd1(0x1e2),_0x45e63f,{'errorCode':_0x340eee[_0x441cd1(0x1d1)],'errorMsg':_0x340eee[_0x441cd1(0x1f0)],'menu':_0x1f4249[_0x441cd1(0x1d6)]});throw new Error(_0x45e63f);}logger[_0x441cd1(0x1f3)](_0x441cd1(0x1e2),_0x441cd1(0x1c5)+_0x1f4249[_0x441cd1(0x1d6)],_0x340eee[_0x441cd1(0x1d8)]);}async function createSingleMenu(_0x2e611,_0x32b37a,_0x2c3e13,_0xbb392d){const _0x29eab1=a51_0x2b85,_0x472df1={'appCode':_0x2e611,'type':_0x29eab1(0x1ef),'sort':0x0,'extend':{'loadScriptMode':_0x29eab1(0x1e5),'resources':_0xbb392d?JSON[_0x29eab1(0x202)](_0xbb392d):undefined},'label':_0x2c3e13[_0x29eab1(0x1d6)],'path':_0x2c3e13[_0x29eab1(0x1de)]},_0x49e375=await fetch(getApiDomain()+_0x29eab1(0x1fe),{'method':'POST','body':JSON[_0x29eab1(0x202)](_0x472df1),'headers':{'Content-Type':_0x29eab1(0x1ce),'Cookie':_0x32b37a}});if(!_0x49e375['ok']){if(_0x49e375[_0x29eab1(0x1ee)]===0x191){const _0x49f3ff=_0x29eab1(0x1d9);logger['error'](_0x29eab1(0x1e2),_0x49f3ff,{'status':_0x49e375['status'],'menu':_0x2c3e13[_0x29eab1(0x1d6)]});throw new Error(_0x49f3ff);}const _0x331dcb=_0x29eab1(0x1ff)+_0x49e375[_0x29eab1(0x1ee)];logger[_0x29eab1(0x1cd)]('create-menu',_0x331dcb,{'menu':_0x2c3e13[_0x29eab1(0x1d6)]});throw new Error(_0x331dcb);}const _0x197f54=await _0x49e375['json']();if(!_0x197f54[_0x29eab1(0x1d2)]){if(_0x197f54[_0x29eab1(0x1d1)]===_0x29eab1(0x1fa)||_0x197f54['errorMsg']?.['includes']('登录')){const _0x4c7252=_0x29eab1(0x1ca);logger[_0x29eab1(0x1cd)](_0x29eab1(0x1e2),_0x4c7252,{'errorCode':_0x197f54[_0x29eab1(0x1d1)],'errorMsg':_0x197f54[_0x29eab1(0x1f0)],'menu':_0x2c3e13[_0x29eab1(0x1d6)]});throw new Error(_0x4c7252);}const _0x544ffa=_0x29eab1(0x1eb)+(_0x197f54[_0x29eab1(0x1f0)]||_0x29eab1(0x1c6));logger['error'](_0x29eab1(0x1e2),_0x544ffa,{'errorCode':_0x197f54[_0x29eab1(0x1d1)],'errorMsg':_0x197f54[_0x29eab1(0x1f0)],'menu':_0x2c3e13['label']});throw new Error(_0x544ffa);}logger[_0x29eab1(0x1f3)](_0x29eab1(0x1e2),'Menu\x20created\x20successfully:\x20'+_0x2c3e13[_0x29eab1(0x1d6)]);}function a51_0x1f15(){const _0x2c4e9d=['Failed\x20to\x20create\x20menu,\x20HTTP\x20status:\x20','length','/smartapi/menu/update','stringify','71594861CrxssU','Fetched\x20','Menu\x20created\x20successfully:\x20','Error','39CPQMjI','create-menus','50710QdjpMW','Auth\x20validation\x20failed.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','3138vjdKtt','flat','error','application/json','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','GET','errorCode','success','push','map','children','label','resources','data','Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','Failed\x20to\x20update\x20menu\x20assets:\x20','json','parse','1367OKSBUl','path','302228ZTclnH','2452FwgYgV','12qyHQeu','create-menu','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','5481954LplpfR','import','Creating\x20menu:\x20','extend','Failed\x20to\x20fetch\x20menu\x20list:\x20','isArray','/smartapi/menu/find?appCode=','Failed\x20to\x20create\x20menu:\x20','Server\x20returned\x20empty\x20menu\x20list','get-online-menu-list','status','procode','errorMsg','update-menu-cdn-url','Menu\x20assets\x20synced:\x20','info','all','Batch\x20menu\x20creation\x20completed,\x20total\x20','12115qTwODO','POST','24DOoLEj','649BgTstc','0011','Updating\x20menu\x20asset\x20links:\x20','\x20online\x20menus\x20successfully','3510220NNbCQK','/smartapi/menu/create'];a51_0x1f15=function(){return _0x2c4e9d;};return a51_0x1f15();}export async function createMenus(_0x1b0ed9,_0x3f46bb,_0x2e66b5,_0x460fce){const _0x34f0db=a51_0x2b85;logger[_0x34f0db(0x1f3)](_0x34f0db(0x1c8),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x2e66b5['length']),await Promise[_0x34f0db(0x1f4)](_0x2e66b5[_0x34f0db(0x1d4)](async _0x3d8c4e=>{await createSingleMenu(_0x1b0ed9,_0x3f46bb,_0x3d8c4e,_0x460fce);})),logger[_0x34f0db(0x1f3)]('create-menus',_0x34f0db(0x1f5)+_0x2e66b5['length']);}export async function updateMenuCdnUrl(_0x12a167,_0x4857cc,_0x52dbd7){const _0x2fabf8=a51_0x2b85;logger[_0x2fabf8(0x1f3)](_0x2fabf8(0x1f1),_0x2fabf8(0x1fb)+_0x52dbd7['label']+'\x20('+_0x52dbd7[_0x2fabf8(0x1de)]+')');const _0xf25f65={'id':_0x52dbd7['id'],'appCode':_0x12a167,'extend':{'loadScriptMode':_0x2fabf8(0x1e5),'resources':_0x52dbd7[_0x2fabf8(0x1d7)]?JSON[_0x2fabf8(0x202)](_0x52dbd7[_0x2fabf8(0x1d7)]):undefined}},_0x36ef5b=await fetch(getApiDomain()+_0x2fabf8(0x201),{'method':_0x2fabf8(0x1f7),'body':JSON['stringify'](_0xf25f65),'headers':{'Content-Type':_0x2fabf8(0x1ce),'Cookie':_0x4857cc}});if(!_0x36ef5b['ok']){if(_0x36ef5b[_0x2fabf8(0x1ee)]===0x191){const _0x332241=_0x2fabf8(0x1d9);logger['error'](_0x2fabf8(0x1f1),_0x332241,{'status':_0x36ef5b['status'],'menu':_0x52dbd7[_0x2fabf8(0x1d6)]});throw new Error(_0x332241);}const _0x32c14f=_0x2fabf8(0x1da)+_0x36ef5b[_0x2fabf8(0x1ee)];logger['error'](_0x2fabf8(0x1f1),_0x32c14f,{'menu':_0x52dbd7[_0x2fabf8(0x1d6)]});throw new Error(_0x32c14f);}const _0x3c085d=await _0x36ef5b['json']();if(!_0x3c085d[_0x2fabf8(0x1d2)]){const _0xdcadcd=_0x2fabf8(0x1da)+(_0x3c085d[_0x2fabf8(0x1f0)]||'Error');logger[_0x2fabf8(0x1cd)](_0x2fabf8(0x1f1),_0xdcadcd,{'errorCode':_0x3c085d['errorCode'],'errorMsg':_0x3c085d[_0x2fabf8(0x1f0)],'menu':_0x52dbd7[_0x2fabf8(0x1d6)]});throw new Error(_0xdcadcd);}logger[_0x2fabf8(0x1f3)](_0x2fabf8(0x1f1),_0x2fabf8(0x1f2)+_0x52dbd7['label'],_0x3c085d['data']);}
@@ -1 +1 @@
1
- (function(_0x4333aa,_0x573570){const _0x1e54d4=a51_0x5bde,_0xf1f609=_0x4333aa();while(!![]){try{const _0x3d212b=-parseInt(_0x1e54d4(0x169))/0x1*(-parseInt(_0x1e54d4(0x17b))/0x2)+-parseInt(_0x1e54d4(0x193))/0x3*(-parseInt(_0x1e54d4(0x177))/0x4)+parseInt(_0x1e54d4(0x179))/0x5*(parseInt(_0x1e54d4(0x180))/0x6)+-parseInt(_0x1e54d4(0x16b))/0x7+-parseInt(_0x1e54d4(0x190))/0x8+parseInt(_0x1e54d4(0x17a))/0x9*(parseInt(_0x1e54d4(0x187))/0xa)+-parseInt(_0x1e54d4(0x184))/0xb;if(_0x3d212b===_0x573570)break;else _0xf1f609['push'](_0xf1f609['shift']());}catch(_0x326b3f){_0xf1f609['push'](_0xf1f609['shift']());}}}(a51_0x1abf,0x1b2d5));import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0xf26687){const _0x315116=a51_0x5bde,_0x43ff92=[];return _0xf26687[_0x315116(0x17d)]&&!isValidJsHttpsUrl(_0xf26687[_0x315116(0x17d)])&&_0x43ff92[_0x315116(0x18f)]({'field':_0x315116(0x17d),'message':_0x315116(0x176)}),_0xf26687['cssUrl']&&!isValidCssHttpsUrl(_0xf26687[_0x315116(0x173)])&&_0x43ff92[_0x315116(0x18f)]({'field':'cssUrl','message':_0x315116(0x175)}),_0x43ff92;}function a51_0x1abf(){const _0x489648=['100MXYQsb','trim','isArray','field','map','\x0a\x20\x20Available\x20local\x20pages:\x20','length','toString','push','422080oFOYVY','readableEnded','setLogPath','151587LJSpvP','parse','startsWith','concat','message','split','stdin','pages','menu-sync','2616AsggVu','Invalid\x20--params:\x20','837186NUXPJz','string','Start\x20non-interactive\x20menu\x20sync','isTTY','join','object','data','No\x20local\x20pages\x20matched\x20labels:\x20','cssUrl','label','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','12mNjXVn','--params.','260745OKxWTH','137817ZoGvhz','170InWLRP','filter','jsUrl','Menu\x20sync\x20completed','JS\x20URL\x20is\x20unreachable:\x20','18fEVtPv','info','selectedLabels','end','4398339oBimaC','has','CSS\x20URL\x20is\x20unreachable:\x20'];a51_0x1abf=function(){return _0x489648;};return a51_0x1abf();}export async function runMenuSyncCore(_0x4ff5f4,_0x1ed24a,_0x115711=[],_0x58aef8){const _0x1d52cb=a51_0x5bde,_0x456111=parseParamsFlag(_0x58aef8),_0x40164c=_0x115711[_0x1d52cb(0x18d)]>0x0?_0x115711:_0x456111[_0x1d52cb(0x182)],_0x2a3994=_0x456111[_0x1d52cb(0x17d)],_0x1c2f66=_0x456111['cssUrl'],_0x46d7c2=[];if(_0x2a3994)_0x46d7c2[_0x1d52cb(0x18f)](_0x2a3994);if(_0x1c2f66)_0x46d7c2[_0x1d52cb(0x18f)](_0x1c2f66);const _0x140f27=validateParams(_0x456111);if(_0x140f27[_0x1d52cb(0x18d)]>0x0){const _0x4141a2=_0x140f27[_0x1d52cb(0x18b)](_0x3f4bc3=>_0x1d52cb(0x178)+_0x3f4bc3[_0x1d52cb(0x18a)]+':\x20'+_0x3f4bc3[_0x1d52cb(0x164)])['join'](';\x20');throw new Error(_0x1d52cb(0x16a)+_0x4141a2);}logger[_0x1d52cb(0x192)](process['cwd']()),logger[_0x1d52cb(0x181)](_0x1d52cb(0x168),_0x1d52cb(0x16d),{'appCode':_0x4ff5f4,'selectedCount':_0x40164c?.[_0x1d52cb(0x18d)],'jsUrl':_0x2a3994,'cssUrl':_0x1c2f66});if(_0x2a3994){const _0x36217a=await isUrlReachable(_0x2a3994);if(!_0x36217a)throw new Error(_0x1d52cb(0x17f)+_0x2a3994);}if(_0x1c2f66){const _0x48f4cd=await isUrlReachable(_0x1c2f66);if(!_0x48f4cd)throw new Error(_0x1d52cb(0x186)+_0x1c2f66);}const _0x379689=getLocalPages();if(_0x379689[_0x1d52cb(0x18d)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x4e3d7d=await getOnlineMenuList(_0x4ff5f4,_0x1ed24a),_0x716025=new Set(_0x4e3d7d['map'](_0x49a1b8=>_0x49a1b8['path']));let _0x253865;if(_0x40164c&&_0x40164c[_0x1d52cb(0x18d)]>0x0){const _0x4bd48f=new Set(_0x40164c[_0x1d52cb(0x18b)](_0x24c809=>_0x24c809[_0x1d52cb(0x188)]()));_0x253865=_0x379689[_0x1d52cb(0x17c)](_0x4c7571=>_0x4bd48f[_0x1d52cb(0x185)](_0x4c7571[_0x1d52cb(0x174)]));if(_0x253865[_0x1d52cb(0x18d)]===0x0){const _0x3ccd8a=_0x379689[_0x1d52cb(0x18b)](_0x280262=>_0x280262[_0x1d52cb(0x174)])[_0x1d52cb(0x16f)](',\x20');throw new Error(_0x1d52cb(0x172)+[..._0x4bd48f][_0x1d52cb(0x16f)](',\x20')+_0x1d52cb(0x18c)+_0x3ccd8a);}}else _0x253865=_0x379689[_0x1d52cb(0x17c)](_0x5f20ca=>!_0x716025['has'](_0x5f20ca['path']));if(_0x253865[_0x1d52cb(0x18d)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x4ff5f4,_0x1ed24a,_0x253865,_0x46d7c2[_0x1d52cb(0x18d)]>0x0?_0x46d7c2:undefined),logger[_0x1d52cb(0x181)]('menu-sync',_0x1d52cb(0x17e),{'count':_0x253865[_0x1d52cb(0x18d)],'resources':_0x46d7c2}),{'created':_0x253865[_0x1d52cb(0x18d)],'skipped':![],'targetPages':_0x253865};}function a51_0x5bde(_0x419d71,_0x103617){_0x419d71=_0x419d71-0x162;const _0x1abfd8=a51_0x1abf();let _0x5bdecd=_0x1abfd8[_0x419d71];return _0x5bdecd;}export async function readPageLabelsFromStdin(){const _0x384ce0=a51_0x5bde;if(!process[_0x384ce0(0x166)][_0x384ce0(0x16e)]&&!process[_0x384ce0(0x166)][_0x384ce0(0x191)])return new Promise(_0xed5a5c=>{const _0x18a28e=_0x384ce0,_0x45c824=[];process[_0x18a28e(0x166)]['on'](_0x18a28e(0x171),_0x4128dd=>_0x45c824[_0x18a28e(0x18f)](_0x4128dd)),process[_0x18a28e(0x166)]['on'](_0x18a28e(0x183),()=>{const _0x5afa1d=_0x18a28e,_0x675e35=Buffer[_0x5afa1d(0x163)](_0x45c824)[_0x5afa1d(0x18e)]('utf8'),_0x217154=_0x675e35[_0x5afa1d(0x165)]('\x0a')[_0x5afa1d(0x18b)](_0x37709d=>_0x37709d['trim']())[_0x5afa1d(0x17c)](_0x1931ed=>_0x1931ed[_0x5afa1d(0x18d)]>0x0&&!_0x1931ed[_0x5afa1d(0x162)]('#'));_0xed5a5c(_0x217154);}),setTimeout(()=>_0xed5a5c([]),0x1f4);});return[];}function parseParamsFlag(_0x51ab56){const _0x5c6c97=a51_0x5bde;if(!_0x51ab56||typeof _0x51ab56!=='string')return{};try{const _0x59cbbb=JSON[_0x5c6c97(0x194)](_0x51ab56);if(typeof _0x59cbbb!==_0x5c6c97(0x170)||_0x59cbbb===null||Array['isArray'](_0x59cbbb))return{};return{'selectedLabels':Array[_0x5c6c97(0x189)](_0x59cbbb[_0x5c6c97(0x167)])?_0x59cbbb['pages'][_0x5c6c97(0x18b)](String):undefined,'jsUrl':typeof _0x59cbbb['jsUrl']===_0x5c6c97(0x16c)?_0x59cbbb[_0x5c6c97(0x17d)][_0x5c6c97(0x188)]():undefined,'cssUrl':typeof _0x59cbbb[_0x5c6c97(0x173)]===_0x5c6c97(0x16c)?_0x59cbbb[_0x5c6c97(0x173)]['trim']():undefined};}catch{return{};}}
1
+ (function(_0x41fdf5,_0x20beae){const _0x527ac1=a52_0x1157,_0x1759d1=_0x41fdf5();while(!![]){try{const _0x6e36d8=-parseInt(_0x527ac1(0x1fa))/0x1*(-parseInt(_0x527ac1(0x1e9))/0x2)+-parseInt(_0x527ac1(0x205))/0x3+parseInt(_0x527ac1(0x1fc))/0x4*(parseInt(_0x527ac1(0x1eb))/0x5)+-parseInt(_0x527ac1(0x1f7))/0x6*(parseInt(_0x527ac1(0x1e8))/0x7)+parseInt(_0x527ac1(0x20b))/0x8*(-parseInt(_0x527ac1(0x1e1))/0x9)+parseInt(_0x527ac1(0x207))/0xa+-parseInt(_0x527ac1(0x1dd))/0xb*(-parseInt(_0x527ac1(0x1f2))/0xc);if(_0x6e36d8===_0x20beae)break;else _0x1759d1['push'](_0x1759d1['shift']());}catch(_0x446ce){_0x1759d1['push'](_0x1759d1['shift']());}}}(a52_0x9782,0x9488f));import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus}from'./service.js';function a52_0x9782(){const _0x52c8d4=['80778VJhhUK','cwd','4765PmfRnv','cssUrl','join','object','\x0a\x20\x20Available\x20local\x20pages:\x20','isArray','toString','4899996cPTCqa','label','parse','No\x20local\x20pages\x20matched\x20labels:\x20','pages','6BYCJau','Invalid\x20--params:\x20','length','21uLUvva','filter','4060hZEOsR','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','trim','concat','message','Menu\x20sync\x20completed','JS\x20URL\x20is\x20unreachable:\x20','string','stdin','3255198GKzoUo','jsUrl','9814660UeSmaR','startsWith','isTTY','push','4696WMZfzL','split','11awtDsy','selectedLabels','end','utf8','10269nYMlJr','map','path','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','has','Start\x20non-interactive\x20menu\x20sync','info','5894217LExzBH'];a52_0x9782=function(){return _0x52c8d4;};return a52_0x9782();}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';function a52_0x1157(_0x155e91,_0x115c01){_0x155e91=_0x155e91-0x1dc;const _0x9782e9=a52_0x9782();let _0x1157b7=_0x9782e9[_0x155e91];return _0x1157b7;}import{logger}from'../../../utils/logger.js';function validateParams(_0x51971e){const _0x442ae1=a52_0x1157,_0x22e869=[];return _0x51971e[_0x442ae1(0x206)]&&!isValidJsHttpsUrl(_0x51971e[_0x442ae1(0x206)])&&_0x22e869[_0x442ae1(0x20a)]({'field':'jsUrl','message':_0x442ae1(0x1fd)}),_0x51971e[_0x442ae1(0x1ec)]&&!isValidCssHttpsUrl(_0x51971e[_0x442ae1(0x1ec)])&&_0x22e869[_0x442ae1(0x20a)]({'field':_0x442ae1(0x1ec),'message':_0x442ae1(0x1e4)}),_0x22e869;}export async function runMenuSyncCore(_0x3672c6,_0x39dedc,_0x16ff06=[],_0xc2ad27){const _0x323ba0=a52_0x1157,_0x51081d=parseParamsFlag(_0xc2ad27),_0x2e6dd1=_0x16ff06[_0x323ba0(0x1f9)]>0x0?_0x16ff06:_0x51081d[_0x323ba0(0x1de)],_0x1014ca=_0x51081d[_0x323ba0(0x206)],_0x51734a=_0x51081d['cssUrl'],_0x39c059=[];if(_0x1014ca)_0x39c059[_0x323ba0(0x20a)](_0x1014ca);if(_0x51734a)_0x39c059['push'](_0x51734a);const _0x57b0d2=validateParams(_0x51081d);if(_0x57b0d2[_0x323ba0(0x1f9)]>0x0){const _0x3ef0e9=_0x57b0d2[_0x323ba0(0x1e2)](_0x3ceddf=>'--params.'+_0x3ceddf['field']+':\x20'+_0x3ceddf[_0x323ba0(0x200)])[_0x323ba0(0x1ed)](';\x20');throw new Error(_0x323ba0(0x1f8)+_0x3ef0e9);}logger['setLogPath'](process[_0x323ba0(0x1ea)]()),logger[_0x323ba0(0x1e7)]('menu-sync',_0x323ba0(0x1e6),{'appCode':_0x3672c6,'selectedCount':_0x2e6dd1?.[_0x323ba0(0x1f9)],'jsUrl':_0x1014ca,'cssUrl':_0x51734a});if(_0x1014ca){const _0x3d512f=await isUrlReachable(_0x1014ca);if(!_0x3d512f)throw new Error(_0x323ba0(0x202)+_0x1014ca);}if(_0x51734a){const _0x537560=await isUrlReachable(_0x51734a);if(!_0x537560)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x51734a);}const _0x14f0ee=getLocalPages();if(_0x14f0ee[_0x323ba0(0x1f9)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x538077=await getOnlineMenuList(_0x3672c6,_0x39dedc),_0x5ed427=new Set(_0x538077[_0x323ba0(0x1e2)](_0x7d1e43=>_0x7d1e43[_0x323ba0(0x1e3)]));let _0x3d7e57;if(_0x2e6dd1&&_0x2e6dd1['length']>0x0){const _0x2e297d=new Set(_0x2e6dd1[_0x323ba0(0x1e2)](_0x58b274=>_0x58b274[_0x323ba0(0x1fe)]()));_0x3d7e57=_0x14f0ee[_0x323ba0(0x1fb)](_0x439591=>_0x2e297d[_0x323ba0(0x1e5)](_0x439591[_0x323ba0(0x1f3)]));if(_0x3d7e57[_0x323ba0(0x1f9)]===0x0){const _0x52685c=_0x14f0ee[_0x323ba0(0x1e2)](_0x2786d7=>_0x2786d7[_0x323ba0(0x1f3)])[_0x323ba0(0x1ed)](',\x20');throw new Error(_0x323ba0(0x1f5)+[..._0x2e297d]['join'](',\x20')+_0x323ba0(0x1ef)+_0x52685c);}}else _0x3d7e57=_0x14f0ee[_0x323ba0(0x1fb)](_0x1f887e=>!_0x5ed427['has'](_0x1f887e[_0x323ba0(0x1e3)]));if(_0x3d7e57[_0x323ba0(0x1f9)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x3672c6,_0x39dedc,_0x3d7e57,_0x39c059[_0x323ba0(0x1f9)]>0x0?_0x39c059:undefined),logger[_0x323ba0(0x1e7)]('menu-sync',_0x323ba0(0x201),{'count':_0x3d7e57['length'],'resources':_0x39c059}),{'created':_0x3d7e57[_0x323ba0(0x1f9)],'skipped':![],'targetPages':_0x3d7e57};}export async function readPageLabelsFromStdin(){const _0x2ae47a=a52_0x1157;if(!process[_0x2ae47a(0x204)][_0x2ae47a(0x209)]&&!process[_0x2ae47a(0x204)]['readableEnded'])return new Promise(_0x5161be=>{const _0x3931e=_0x2ae47a,_0x151fcf=[];process['stdin']['on']('data',_0x2f445a=>_0x151fcf[_0x3931e(0x20a)](_0x2f445a)),process['stdin']['on'](_0x3931e(0x1df),()=>{const _0x45d9e8=_0x3931e,_0x124993=Buffer[_0x45d9e8(0x1ff)](_0x151fcf)[_0x45d9e8(0x1f1)](_0x45d9e8(0x1e0)),_0x4176d1=_0x124993[_0x45d9e8(0x1dc)]('\x0a')[_0x45d9e8(0x1e2)](_0x2f0eb9=>_0x2f0eb9[_0x45d9e8(0x1fe)]())[_0x45d9e8(0x1fb)](_0x158f03=>_0x158f03[_0x45d9e8(0x1f9)]>0x0&&!_0x158f03[_0x45d9e8(0x208)]('#'));_0x5161be(_0x4176d1);}),setTimeout(()=>_0x5161be([]),0x1f4);});return[];}function parseParamsFlag(_0x56f71b){const _0x2b2a01=a52_0x1157;if(!_0x56f71b||typeof _0x56f71b!=='string')return{};try{const _0x2edb9c=JSON[_0x2b2a01(0x1f4)](_0x56f71b);if(typeof _0x2edb9c!==_0x2b2a01(0x1ee)||_0x2edb9c===null||Array['isArray'](_0x2edb9c))return{};return{'selectedLabels':Array[_0x2b2a01(0x1f0)](_0x2edb9c[_0x2b2a01(0x1f6)])?_0x2edb9c[_0x2b2a01(0x1f6)][_0x2b2a01(0x1e2)](String):undefined,'jsUrl':typeof _0x2edb9c[_0x2b2a01(0x206)]===_0x2b2a01(0x203)?_0x2edb9c['jsUrl'][_0x2b2a01(0x1fe)]():undefined,'cssUrl':typeof _0x2edb9c['cssUrl']===_0x2b2a01(0x203)?_0x2edb9c['cssUrl'][_0x2b2a01(0x1fe)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x4cc8a3,_0x8b8c06){const _0xd78553=a53_0x4758,_0x26df60=_0x4cc8a3();while(!![]){try{const _0x380376=parseInt(_0xd78553(0xc8))/0x1*(-parseInt(_0xd78553(0xbc))/0x2)+-parseInt(_0xd78553(0xc5))/0x3*(parseInt(_0xd78553(0xad))/0x4)+parseInt(_0xd78553(0xb7))/0x5*(-parseInt(_0xd78553(0xc4))/0x6)+-parseInt(_0xd78553(0xc6))/0x7*(-parseInt(_0xd78553(0xc9))/0x8)+parseInt(_0xd78553(0xbd))/0x9*(parseInt(_0xd78553(0xb9))/0xa)+parseInt(_0xd78553(0xd0))/0xb*(parseInt(_0xd78553(0xd1))/0xc)+parseInt(_0xd78553(0xb6))/0xd;if(_0x380376===_0x8b8c06)break;else _0x26df60['push'](_0x26df60['shift']());}catch(_0x4c36ac){_0x26df60['push'](_0x26df60['shift']());}}}(a53_0x3c32,0x69065));function a53_0x4758(_0x1d0c49,_0xbe94c7){_0x1d0c49=_0x1d0c49-0xac;const _0x3c329b=a53_0x3c32();let _0x475862=_0x3c329b[_0x1d0c49];return _0x475862;}import{updateMenuCdnUrl,getOnlineMenuList}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';function a53_0x3c32(){const _0x1f5dee=['6gMwLgN','143274TWpPDA','40964YXJilJ','push','27buivzL','80Raecbd','parse','allSettled','CSS\x20URL\x20is\x20unreachable:\x20','Start\x20non-interactive\x20menu\x20update','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','trim','11462qPNCoW','1956HlsCki','info','filter','64pcOYxL','rejected','Invalid\x20--params:\x20','--params.','jsUrl','object','map','cssUrl','string','16020056ebIQAy','2813155VPfPUp','menu-update','601010FdAaGT','isArray','resources','18122CzEKyl','81rgwLaa','Menu\x20update\x20completed','join','length','cwd','message','path'];a53_0x3c32=function(){return _0x1f5dee;};return a53_0x3c32();}import{logger}from'../../../utils/logger.js';function validateParams(_0x3c7d47){const _0x3d9fb9=a53_0x4758,_0x2fd54d=[];return _0x3c7d47[_0x3d9fb9(0xb1)]&&!isValidJsHttpsUrl(_0x3c7d47['jsUrl'])&&_0x2fd54d['push']({'field':_0x3d9fb9(0xb1),'message':_0x3d9fb9(0xce)}),_0x3c7d47[_0x3d9fb9(0xb4)]&&!isValidCssHttpsUrl(_0x3c7d47[_0x3d9fb9(0xb4)])&&_0x2fd54d['push']({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x2fd54d;}export async function runMenuUpdateCore(_0x43ada7,_0x36a14d,_0x5ca92d){const _0x51e40a=a53_0x4758,_0x5a31e2=parseUpdateParamsFlag(_0x5ca92d),_0x861ab6=[];if(_0x5a31e2[_0x51e40a(0xb1)])_0x861ab6[_0x51e40a(0xc7)](_0x5a31e2[_0x51e40a(0xb1)]);if(_0x5a31e2[_0x51e40a(0xb4)])_0x861ab6['push'](_0x5a31e2['cssUrl']);const _0x4ff407=validateParams(_0x5a31e2);if(_0x4ff407[_0x51e40a(0xc0)]>0x0){const _0x5b62f3=_0x4ff407[_0x51e40a(0xb3)](_0xe35a80=>_0x51e40a(0xb0)+_0xe35a80['field']+':\x20'+_0xe35a80[_0x51e40a(0xc2)])[_0x51e40a(0xbf)](';\x20');throw new Error(_0x51e40a(0xaf)+_0x5b62f3);}logger['setLogPath'](process[_0x51e40a(0xc1)]()),logger[_0x51e40a(0xd2)](_0x51e40a(0xb8),_0x51e40a(0xcd),{'appCode':_0x43ada7,'jsUrl':_0x5a31e2[_0x51e40a(0xb1)],'cssUrl':_0x5a31e2[_0x51e40a(0xb4)]});if(_0x5a31e2[_0x51e40a(0xb1)]){const _0x2786bf=await isUrlReachable(_0x5a31e2['jsUrl']);if(!_0x2786bf)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x5a31e2[_0x51e40a(0xb1)]);}if(_0x5a31e2[_0x51e40a(0xb4)]){const _0xe34dba=await isUrlReachable(_0x5a31e2['cssUrl']);if(!_0xe34dba)throw new Error(_0x51e40a(0xcc)+_0x5a31e2[_0x51e40a(0xb4)]);}const _0x4250b9=await getOnlineMenuList(_0x43ada7,_0x36a14d),_0x5e3917=_0x4250b9[_0x51e40a(0xac)](_0x337028=>_0x337028[_0x51e40a(0xbb)][_0x51e40a(0xc0)]>0x0);if(_0x5e3917[_0x51e40a(0xc0)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x570e5e=await Promise[_0x51e40a(0xcb)](_0x5e3917['map'](_0x1c8b2c=>updateMenuCdnUrl(_0x43ada7,_0x36a14d,{'id':_0x1c8b2c['id'],'label':_0x1c8b2c['label'],'path':_0x1c8b2c[_0x51e40a(0xc3)],'resources':_0x861ab6}))),_0x216322=_0x570e5e['filter'](_0x4a1462=>_0x4a1462['status']===_0x51e40a(0xae))[_0x51e40a(0xc0)];return logger[_0x51e40a(0xd2)](_0x51e40a(0xb8),_0x51e40a(0xbe),{'count':_0x5e3917[_0x51e40a(0xc0)],'resources':_0x861ab6}),{'updated':_0x5e3917[_0x51e40a(0xc0)]-_0x216322,'failed':_0x216322,'skipped':![]};}function parseUpdateParamsFlag(_0x44ba38){const _0x13ce28=a53_0x4758;if(!_0x44ba38||typeof _0x44ba38!=='string')return{};try{const _0x4fd6ac=JSON[_0x13ce28(0xca)](_0x44ba38);if(typeof _0x4fd6ac!==_0x13ce28(0xb2)||_0x4fd6ac===null||Array[_0x13ce28(0xba)](_0x4fd6ac))return{};return{'jsUrl':typeof _0x4fd6ac[_0x13ce28(0xb1)]===_0x13ce28(0xb5)?_0x4fd6ac['jsUrl'][_0x13ce28(0xcf)]():undefined,'cssUrl':typeof _0x4fd6ac[_0x13ce28(0xb4)]===_0x13ce28(0xb5)?_0x4fd6ac['cssUrl'][_0x13ce28(0xcf)]():undefined};}catch{return{};}}
1
+ (function(_0x4145fc,_0x11b603){const _0x45975f=a54_0x37f5,_0x3ab0c1=_0x4145fc();while(!![]){try{const _0x4b07c3=parseInt(_0x45975f(0x190))/0x1*(-parseInt(_0x45975f(0x16b))/0x2)+parseInt(_0x45975f(0x174))/0x3+parseInt(_0x45975f(0x16e))/0x4*(parseInt(_0x45975f(0x18e))/0x5)+parseInt(_0x45975f(0x175))/0x6+parseInt(_0x45975f(0x16c))/0x7+-parseInt(_0x45975f(0x183))/0x8*(-parseInt(_0x45975f(0x18b))/0x9)+parseInt(_0x45975f(0x171))/0xa*(-parseInt(_0x45975f(0x170))/0xb);if(_0x4b07c3===_0x11b603)break;else _0x3ab0c1['push'](_0x3ab0c1['shift']());}catch(_0x3f2954){_0x3ab0c1['push'](_0x3ab0c1['shift']());}}}(a54_0x234d,0x1a264));function a54_0x37f5(_0x354e4b,_0x45540f){_0x354e4b=_0x354e4b-0x16b;const _0x234d7b=a54_0x234d();let _0x37f5c0=_0x234d7b[_0x354e4b];return _0x37f5c0;}import{updateMenuCdnUrl,getOnlineMenuList}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x3e0f74){const _0x556eb3=a54_0x37f5,_0x3c9ad4=[];return _0x3e0f74['jsUrl']&&!isValidJsHttpsUrl(_0x3e0f74['jsUrl'])&&_0x3c9ad4[_0x556eb3(0x17a)]({'field':'jsUrl','message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x3e0f74[_0x556eb3(0x17d)]&&!isValidCssHttpsUrl(_0x3e0f74[_0x556eb3(0x17d)])&&_0x3c9ad4[_0x556eb3(0x17a)]({'field':_0x556eb3(0x17d),'message':_0x556eb3(0x17c)}),_0x3c9ad4;}export async function runMenuUpdateCore(_0x44c30f,_0x3709df,_0x470831){const _0x5136df=a54_0x37f5,_0x53d64d=parseUpdateParamsFlag(_0x470831),_0x2cac01=[];if(_0x53d64d[_0x5136df(0x185)])_0x2cac01[_0x5136df(0x17a)](_0x53d64d[_0x5136df(0x185)]);if(_0x53d64d['cssUrl'])_0x2cac01[_0x5136df(0x17a)](_0x53d64d['cssUrl']);const _0x1c54e0=validateParams(_0x53d64d);if(_0x1c54e0['length']>0x0){const _0x3165fc=_0x1c54e0[_0x5136df(0x17e)](_0x4a59ec=>_0x5136df(0x17b)+_0x4a59ec[_0x5136df(0x192)]+':\x20'+_0x4a59ec[_0x5136df(0x172)])[_0x5136df(0x173)](';\x20');throw new Error(_0x5136df(0x187)+_0x3165fc);}logger[_0x5136df(0x188)](process[_0x5136df(0x17f)]()),logger[_0x5136df(0x186)](_0x5136df(0x191),'Start\x20non-interactive\x20menu\x20update',{'appCode':_0x44c30f,'jsUrl':_0x53d64d[_0x5136df(0x185)],'cssUrl':_0x53d64d['cssUrl']});if(_0x53d64d[_0x5136df(0x185)]){const _0x2efcf0=await isUrlReachable(_0x53d64d[_0x5136df(0x185)]);if(!_0x2efcf0)throw new Error(_0x5136df(0x189)+_0x53d64d['jsUrl']);}if(_0x53d64d[_0x5136df(0x17d)]){const _0x5e5656=await isUrlReachable(_0x53d64d[_0x5136df(0x17d)]);if(!_0x5e5656)throw new Error(_0x5136df(0x181)+_0x53d64d[_0x5136df(0x17d)]);}const _0x1fb718=await getOnlineMenuList(_0x44c30f,_0x3709df),_0x14de41=_0x1fb718[_0x5136df(0x16f)](_0x178c7c=>_0x178c7c['resources'][_0x5136df(0x18a)]>0x0);if(_0x14de41['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x568eb2=await Promise[_0x5136df(0x16d)](_0x14de41[_0x5136df(0x17e)](_0x976be5=>updateMenuCdnUrl(_0x44c30f,_0x3709df,{'id':_0x976be5['id'],'label':_0x976be5[_0x5136df(0x179)],'path':_0x976be5[_0x5136df(0x182)],'resources':_0x2cac01}))),_0x54c3cc=_0x568eb2[_0x5136df(0x16f)](_0x71941d=>_0x71941d[_0x5136df(0x18f)]===_0x5136df(0x180))[_0x5136df(0x18a)];return logger['info'](_0x5136df(0x191),_0x5136df(0x176),{'count':_0x14de41[_0x5136df(0x18a)],'resources':_0x2cac01}),{'updated':_0x14de41[_0x5136df(0x18a)]-_0x54c3cc,'failed':_0x54c3cc,'skipped':![]};}function a54_0x234d(){const _0x236e1b=['Invalid\x20--params:\x20','setLogPath','JS\x20URL\x20is\x20unreachable:\x20','length','28971jwdvid','parse','object','3030AyoefT','status','97ccMqQI','menu-update','field','2308ZAQTDQ','782159Jealeg','allSettled','724ImFCsz','filter','11ektpDd','2650080oRfJdg','message','join','395751IWpJkG','378690aYNFCd','Menu\x20update\x20completed','isArray','string','label','push','--params.','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','cssUrl','map','cwd','rejected','CSS\x20URL\x20is\x20unreachable:\x20','path','168HxSiHE','trim','jsUrl','info'];a54_0x234d=function(){return _0x236e1b;};return a54_0x234d();}function parseUpdateParamsFlag(_0x1a0b1a){const _0x2a31ef=a54_0x37f5;if(!_0x1a0b1a||typeof _0x1a0b1a!=='string')return{};try{const _0x4006b8=JSON[_0x2a31ef(0x18c)](_0x1a0b1a);if(typeof _0x4006b8!==_0x2a31ef(0x18d)||_0x4006b8===null||Array[_0x2a31ef(0x177)](_0x4006b8))return{};return{'jsUrl':typeof _0x4006b8['jsUrl']===_0x2a31ef(0x178)?_0x4006b8[_0x2a31ef(0x185)][_0x2a31ef(0x184)]():undefined,'cssUrl':typeof _0x4006b8[_0x2a31ef(0x17d)]==='string'?_0x4006b8['cssUrl'][_0x2a31ef(0x184)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x3ed3ff,_0x18667f){const _0x242727=a54_0x56c7,_0x36fee9=_0x3ed3ff();while(!![]){try{const _0x232f70=-parseInt(_0x242727(0xe5))/0x1+-parseInt(_0x242727(0xe9))/0x2+parseInt(_0x242727(0xe3))/0x3+-parseInt(_0x242727(0xea))/0x4*(-parseInt(_0x242727(0xe7))/0x5)+-parseInt(_0x242727(0xe4))/0x6+parseInt(_0x242727(0xe1))/0x7*(-parseInt(_0x242727(0xe6))/0x8)+parseInt(_0x242727(0xe2))/0x9;if(_0x232f70===_0x18667f)break;else _0x36fee9['push'](_0x36fee9['shift']());}catch(_0xcc5de9){_0x36fee9['push'](_0x36fee9['shift']());}}}(a54_0x4dd0,0xca1af));function a54_0x56c7(_0x4f3c12,_0x4fb7ff){_0x4f3c12=_0x4f3c12-0xdf;const _0x4dd003=a54_0x4dd0();let _0x56c71f=_0x4dd003[_0x4f3c12];return _0x56c71f;}export function isValidJsHttpsUrl(_0x4c63b3){const _0x2a21c0=a54_0x56c7;return/^https:\/\/.+\.js(\?.*)?$/[_0x2a21c0(0xe8)](_0x4c63b3['trim']());}export function isValidCssHttpsUrl(_0x223dce){const _0x50c235=a54_0x56c7;return/^https:\/\/.+\.css(\?.*)?$/[_0x50c235(0xe8)](_0x223dce[_0x50c235(0xdf)]());}function a54_0x4dd0(){const _0x4e614f=['HEAD','7kJvscK','43892721AgZAkZ','430701vjFtSL','9132840jBzKUw','719857dGDsdg','3986072CaRrho','565UwtjzS','test','3301092POpzSH','7012IYQnAB','trim'];a54_0x4dd0=function(){return _0x4e614f;};return a54_0x4dd0();}export async function isUrlReachable(_0x977fec){const _0x4e80f1=a54_0x56c7;try{const _0x2b241b=await fetch(_0x977fec,{'method':_0x4e80f1(0xe0)});return _0x2b241b['ok'];}catch{return![];}}
1
+ function a55_0x43c9(){const _0x5e5528=['293295zSsciq','2yOWNxp','trim','1552794GgLBiy','43976pNGQEt','25031502ZKuQbY','5858108plppmv','1564645fmyEae','2009736LoWXUX','test','1757yQyJNP'];a55_0x43c9=function(){return _0x5e5528;};return a55_0x43c9();}function a55_0x33cc(_0xea97a0,_0x5ea8d3){_0xea97a0=_0xea97a0-0xb2;const _0x43c9e5=a55_0x43c9();let _0x33cc3a=_0x43c9e5[_0xea97a0];return _0x33cc3a;}(function(_0x42775f,_0x24802d){const _0x3abf58=a55_0x33cc,_0x35b356=_0x42775f();while(!![]){try{const _0x116299=parseInt(_0x3abf58(0xb2))/0x1*(parseInt(_0x3abf58(0xb3))/0x2)+parseInt(_0x3abf58(0xba))/0x3+-parseInt(_0x3abf58(0xb8))/0x4+-parseInt(_0x3abf58(0xb9))/0x5+parseInt(_0x3abf58(0xb5))/0x6+-parseInt(_0x3abf58(0xbc))/0x7*(parseInt(_0x3abf58(0xb6))/0x8)+parseInt(_0x3abf58(0xb7))/0x9;if(_0x116299===_0x24802d)break;else _0x35b356['push'](_0x35b356['shift']());}catch(_0x36a7e4){_0x35b356['push'](_0x35b356['shift']());}}}(a55_0x43c9,0xce901));export function isValidJsHttpsUrl(_0x18e376){const _0xb36faf=a55_0x33cc;return/^https:\/\/.+\.js(\?.*)?$/[_0xb36faf(0xbb)](_0x18e376[_0xb36faf(0xb4)]());}export function isValidCssHttpsUrl(_0x2a1881){const _0x2b592d=a55_0x33cc;return/^https:\/\/.+\.css(\?.*)?$/[_0x2b592d(0xbb)](_0x2a1881[_0x2b592d(0xb4)]());}export async function isUrlReachable(_0x569637){try{const _0x33707a=await fetch(_0x569637,{'method':'HEAD'});return _0x33707a['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a55_0x3c0514=a55_0x4d4c;function a55_0x4d4c(_0x3d377f,_0xd5f2e8){_0x3d377f=_0x3d377f-0x11f;const _0x20acf8=a55_0x20ac();let _0x4d4c7e=_0x20acf8[_0x3d377f];return _0x4d4c7e;}(function(_0x4d17ea,_0x5e5136){const _0x4aef66=a55_0x4d4c,_0x574989=_0x4d17ea();while(!![]){try{const _0x460333=-parseInt(_0x4aef66(0x127))/0x1+-parseInt(_0x4aef66(0x138))/0x2+parseInt(_0x4aef66(0x121))/0x3+-parseInt(_0x4aef66(0x142))/0x4*(-parseInt(_0x4aef66(0x14d))/0x5)+-parseInt(_0x4aef66(0x13e))/0x6+parseInt(_0x4aef66(0x123))/0x7*(-parseInt(_0x4aef66(0x124))/0x8)+parseInt(_0x4aef66(0x120))/0x9*(parseInt(_0x4aef66(0x149))/0xa);if(_0x460333===_0x5e5136)break;else _0x574989['push'](_0x574989['shift']());}catch(_0x23af1b){_0x574989['push'](_0x574989['shift']());}}}(a55_0x20ac,0x1c532));import a55_0x2062b5 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':a55_0x3c0514(0x153),'command':a55_0x3c0514(0x157),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a55_0x3c0514(0x12c),'flags':[{'name':a55_0x3c0514(0x150),'type':'string','description':a55_0x3c0514(0x13b)+a55_0x3c0514(0x159)},{'name':a55_0x3c0514(0x14c),'type':a55_0x3c0514(0x11f),'description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0x7fa201){const _0x292995=a55_0x3c0514,_0x486b3c=_0x7fa201['flag'](_0x292995(0x14c)),_0x5b1541=_0x7fa201['str'](_0x292995(0x150)),_0x24a4a8=parseParams(_0x5b1541),_0x98b0d2=!!(_0x24a4a8['jsUrl']||_0x24a4a8[_0x292995(0x155)]||_0x24a4a8[_0x292995(0x12e)]&&_0x24a4a8['pages'][_0x292995(0x134)]>0x0);if(_0x486b3c||_0x98b0d2){let _0xc362c0=[];!isInteractive()&&!_0x24a4a8[_0x292995(0x12e)]?.[_0x292995(0x134)]&&(_0xc362c0=await readPageLabelsFromStdin());const _0x35affa=await runMenuSyncCore(_0x7fa201[_0x292995(0x158)],_0x7fa201[_0x292995(0x147)],_0xc362c0['length']>0x0?_0xc362c0:_0x24a4a8['pages']??[],_0x5b1541);if(_0x35affa[_0x292995(0x13a)]){const _0x24d1cb=getLocalPages();_0x24d1cb[_0x292995(0x134)]===0x0?console[_0x292995(0x151)](_0x292995(0x139)):console[_0x292995(0x151)](_0x292995(0x13d));}else console[_0x292995(0x151)]('✓\x20Menu\x20sync\x20completed:\x20'+_0x35affa['created']+_0x292995(0x13f));return{'ok':!![]};}requireInteractive();const _0x18c55b=startSpinner(_0x292995(0x13c));let _0x359808,_0x69189a,_0x2dd27c;try{const _0x212e94=await fetchMenuData(_0x7fa201['appCode'],_0x7fa201['cookie']);_0x359808=_0x212e94['localPages'],_0x69189a=_0x212e94[_0x292995(0x12d)],_0x2dd27c=_0x212e94[_0x292995(0x126)],stopSpinner(_0x18c55b,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x77859a){stopSpinner(_0x18c55b,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x292995(0x12a)](_0x77859a instanceof Error?_0x77859a[_0x292995(0x12f)]:_0x292995(0x141));}if(_0x359808[_0x292995(0x134)]===0x0)return console[_0x292995(0x151)](a55_0x2062b5[_0x292995(0x14f)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x3e6536=buildCompareRows(_0x359808,_0x69189a);console[_0x292995(0x151)](renderCompareTable(_0x3e6536)),console['log']();const _0x2861d7=_0x24a4a8[_0x292995(0x12e)],_0x4fa596=await selectPages(_0x359808,_0x69189a,_0x2861d7);console['log'](),console['log'](a55_0x2062b5[_0x292995(0x144)](_0x292995(0x125)+_0x4fa596[_0x292995(0x134)]+'\x20page(s)'));const _0x23ade3=_0x24a4a8[_0x292995(0x131)]&&_0x24a4a8['cssUrl'];if(!_0x23ade3){console['log'](renderSyncSummary(_0x4fa596,_0x69189a[_0x292995(0x137)]>0x0));const _0x3ac275=await askConfirm(_0x292995(0x129));if(!_0x3ac275)return console['log'](a55_0x2062b5[_0x292995(0x135)](_0x292995(0x143))),{'ok':!![]};}let _0x35d303=_0x24a4a8[_0x292995(0x131)],_0x5682c6=_0x24a4a8[_0x292995(0x155)];if(!_0x35d303)try{_0x35d303=await askJsUrl();}catch(_0x5a413d){if(_0x5a413d['message']===_0x292995(0x128))return console['log'](a55_0x2062b5[_0x292995(0x135)](_0x292995(0x143))),{'ok':!![]};throw _0x5a413d;}if(!_0x5682c6)try{_0x5682c6=await askCssUrl();}catch(_0xc0f0f4){if(_0xc0f0f4[_0x292995(0x12f)]===_0x292995(0x128))return console[_0x292995(0x151)](a55_0x2062b5[_0x292995(0x135)](_0x292995(0x143))),{'ok':!![]};throw _0xc0f0f4;}const _0x24e261=await askConfirm(_0x292995(0x133)+_0x4fa596[_0x292995(0x134)]+_0x292995(0x148)+_0x35d303+_0x292995(0x146)+_0x5682c6+'?');if(!_0x24e261)return console[_0x292995(0x151)](a55_0x2062b5['gray'](_0x292995(0x143))),{'ok':!![]};const _0x360cb5=[_0x35d303,_0x5682c6],_0x2dd350=startSpinner('Creating\x20'+_0x4fa596['length']+_0x292995(0x140));try{const _0x5538ce=await doCreateMenus(_0x7fa201[_0x292995(0x158)],_0x7fa201['cookie'],_0x4fa596,_0x360cb5);return stopSpinner(_0x2dd350,_0x292995(0x14a)+_0x5538ce[_0x292995(0x132)]+_0x292995(0x145),!![]),{'ok':!![],'data':_0x5538ce,'message':_0x292995(0x130)+_0x5538ce[_0x292995(0x132)]+_0x292995(0x122)+_0x5538ce['failed']+_0x292995(0x152)};}catch(_0x36f2ec){stopSpinner(_0x2dd350,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x292995(0x12a)](_0x36f2ec instanceof Error?_0x36f2ec['message']:_0x292995(0x136));}}};function a55_0x20ac(){const _0x37d2f7=['CANCEL','\x20\x20Continue\x20with\x20creation?','validation','string','write','onlinePaths','pages','message','Menu\x20sync\x20completed:\x20','jsUrl','created','\x20\x20Create\x20','length','gray','Menu\x20creation\x20failed','size','37746EioWLA','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','skipped','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','Fetching\x20online\x20menu\x20list...','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','1337028SQagiM','\x20menu(s)\x20created','\x20menu(s)...','Failed\x20to\x20fetch\x20online\x20menu\x20list','4gjDVSy','\x20\x20Cancelled.','cyan','\x20menu(s)','\x20and\x20CSS:\x20','cookie','\x20menu(s)\x20with\x20JS:\x20','29370LFjgRI','Created\x20','map','yes','666065ydgfus','trim','yellow','params','log','\x20failed.','menu','parse','cssUrl','isArray','sync','appCode','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','boolean','657mpTswW','561345GCpjks','\x20created,\x20','380233eYhyTB','8nlCwnt','\x20\x20✓\x20Selected:\x20','onlineMenuList','122681ZaXenA'];a55_0x20ac=function(){return _0x37d2f7;};return a55_0x20ac();}function parseParams(_0x5c7551){const _0x5f5565=a55_0x3c0514;if(!_0x5c7551)return{};try{const _0x2be117=JSON[_0x5f5565(0x154)](_0x5c7551);if(typeof _0x2be117!=='object'||_0x2be117===null||Array[_0x5f5565(0x156)](_0x2be117))return{};return{'jsUrl':typeof _0x2be117['jsUrl']===_0x5f5565(0x12b)?_0x2be117[_0x5f5565(0x131)][_0x5f5565(0x14e)]():undefined,'cssUrl':typeof _0x2be117[_0x5f5565(0x155)]===_0x5f5565(0x12b)?_0x2be117['cssUrl']['trim']():undefined,'pages':Array[_0x5f5565(0x156)](_0x2be117[_0x5f5565(0x12e)])?_0x2be117['pages'][_0x5f5565(0x14b)](String):undefined};}catch{return{};}}
1
+ const a56_0xdb1631=a56_0x79b3;function a56_0x33e2(){const _0x11dfe8=['size','\x20failed.','Sync\x20local\x20pages\x20as\x20platform\x20menus','onlineMenuList','pages','parse','params','\x20\x20✓\x20Selected:\x20','\x20page(s)','Menu\x20sync\x20completed:\x20','\x20menu(s)','311794vOiDjW','CANCEL','\x20menu(s)\x20created','onlinePaths','142sGfiIz','4943504vDIFLZ','isArray','144GYWIGI','trim','32514ZqCBQj','gray','\x20\x20Continue\x20with\x20creation?','yes','3609Hhsmil','message','cssUrl','created','593374mkZhzh','\x20and\x20CSS:\x20','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','\x20\x20Cancelled.','appCode','failed','6965916aaqxZE','Menu\x20creation\x20failed','object','\x20created,\x20','jsUrl','validation','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','Creating\x20','7490GkwzOA','✓\x20Menu\x20sync\x20completed:\x20','\x20menu(s)\x20with\x20JS:\x20','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','cookie','Online\x20menu\x20list\x20fetched','Failed\x20to\x20fetch\x20online\x20menu\x20list','string','Created\x20','write','log','5896595jkHyCC','\x20menu(s)...','length'];a56_0x33e2=function(){return _0x11dfe8;};return a56_0x33e2();}(function(_0x3d9ba9,_0x3511b4){const _0x8cf760=a56_0x79b3,_0x2bfcf0=_0x3d9ba9();while(!![]){try{const _0x2fd621=-parseInt(_0x8cf760(0x180))/0x1+-parseInt(_0x8cf760(0x1ab))/0x2*(-parseInt(_0x8cf760(0x178))/0x3)+parseInt(_0x8cf760(0x1ac))/0x4+-parseInt(_0x8cf760(0x199))/0x5+parseInt(_0x8cf760(0x186))/0x6+-parseInt(_0x8cf760(0x1a7))/0x7*(parseInt(_0x8cf760(0x1ae))/0x8)+parseInt(_0x8cf760(0x17c))/0x9*(parseInt(_0x8cf760(0x18e))/0xa);if(_0x2fd621===_0x3511b4)break;else _0x2bfcf0['push'](_0x2bfcf0['shift']());}catch(_0x529267){_0x2bfcf0['push'](_0x2bfcf0['shift']());}}}(a56_0x33e2,0xd9d64));import a56_0x10b93b 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':a56_0xdb1631(0x19e),'risk':a56_0xdb1631(0x197),'flags':[{'name':a56_0xdb1631(0x1a2),'type':a56_0xdb1631(0x195),'description':a56_0xdb1631(0x182)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}'},{'name':a56_0xdb1631(0x17b),'type':'boolean','description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0x2eccf9){const _0x3734cd=a56_0xdb1631,_0x12cd2e=_0x2eccf9['flag']('yes'),_0x1f7e0b=_0x2eccf9['str']('params'),_0x16e4fc=parseParams(_0x1f7e0b),_0x2904eb=!!(_0x16e4fc[_0x3734cd(0x18a)]||_0x16e4fc[_0x3734cd(0x17e)]||_0x16e4fc[_0x3734cd(0x1a0)]&&_0x16e4fc[_0x3734cd(0x1a0)][_0x3734cd(0x19b)]>0x0);if(_0x12cd2e||_0x2904eb){let _0x2a6a57=[];!isInteractive()&&!_0x16e4fc[_0x3734cd(0x1a0)]?.[_0x3734cd(0x19b)]&&(_0x2a6a57=await readPageLabelsFromStdin());const _0x27f227=await runMenuSyncCore(_0x2eccf9[_0x3734cd(0x184)],_0x2eccf9[_0x3734cd(0x192)],_0x2a6a57[_0x3734cd(0x19b)]>0x0?_0x2a6a57:_0x16e4fc['pages']??[],_0x1f7e0b);if(_0x27f227['skipped']){const _0x12b9cf=getLocalPages();_0x12b9cf[_0x3734cd(0x19b)]===0x0?console[_0x3734cd(0x198)](_0x3734cd(0x18c)):console[_0x3734cd(0x198)](_0x3734cd(0x191));}else console['log'](_0x3734cd(0x18f)+_0x27f227[_0x3734cd(0x17f)]+_0x3734cd(0x1a9));return{'ok':!![]};}requireInteractive();const _0x508923=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x3ed0b5,_0x340e60,_0x4afaf3;try{const _0x381c32=await fetchMenuData(_0x2eccf9['appCode'],_0x2eccf9['cookie']);_0x3ed0b5=_0x381c32['localPages'],_0x340e60=_0x381c32[_0x3734cd(0x1aa)],_0x4afaf3=_0x381c32[_0x3734cd(0x19f)],stopSpinner(_0x508923,_0x3734cd(0x193),!![]);}catch(_0x2db5af){stopSpinner(_0x508923,_0x3734cd(0x194),![]);throw CliErrors[_0x3734cd(0x18b)](_0x2db5af instanceof Error?_0x2db5af[_0x3734cd(0x17d)]:_0x3734cd(0x194));}if(_0x3ed0b5[_0x3734cd(0x19b)]===0x0)return console[_0x3734cd(0x198)](a56_0x10b93b['yellow']('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x7ec7dc=buildCompareRows(_0x3ed0b5,_0x340e60);console[_0x3734cd(0x198)](renderCompareTable(_0x7ec7dc)),console['log']();const _0x2272a9=_0x16e4fc[_0x3734cd(0x1a0)],_0x356fe8=await selectPages(_0x3ed0b5,_0x340e60,_0x2272a9);console['log'](),console[_0x3734cd(0x198)](a56_0x10b93b['cyan'](_0x3734cd(0x1a3)+_0x356fe8['length']+_0x3734cd(0x1a4)));const _0x4d84b0=_0x16e4fc['jsUrl']&&_0x16e4fc[_0x3734cd(0x17e)];if(!_0x4d84b0){console['log'](renderSyncSummary(_0x356fe8,_0x340e60[_0x3734cd(0x19c)]>0x0));const _0x4d9feb=await askConfirm(_0x3734cd(0x17a));if(!_0x4d9feb)return console[_0x3734cd(0x198)](a56_0x10b93b[_0x3734cd(0x179)](_0x3734cd(0x183))),{'ok':!![]};}let _0x16d839=_0x16e4fc[_0x3734cd(0x18a)],_0x30f8e5=_0x16e4fc[_0x3734cd(0x17e)];if(!_0x16d839)try{_0x16d839=await askJsUrl();}catch(_0x4adf65){if(_0x4adf65[_0x3734cd(0x17d)]==='CANCEL')return console[_0x3734cd(0x198)](a56_0x10b93b[_0x3734cd(0x179)](_0x3734cd(0x183))),{'ok':!![]};throw _0x4adf65;}if(!_0x30f8e5)try{_0x30f8e5=await askCssUrl();}catch(_0x37c424){if(_0x37c424[_0x3734cd(0x17d)]===_0x3734cd(0x1a8))return console['log'](a56_0x10b93b[_0x3734cd(0x179)](_0x3734cd(0x183))),{'ok':!![]};throw _0x37c424;}const _0x3f644f=await askConfirm('\x20\x20Create\x20'+_0x356fe8['length']+_0x3734cd(0x190)+_0x16d839+_0x3734cd(0x181)+_0x30f8e5+'?');if(!_0x3f644f)return console[_0x3734cd(0x198)](a56_0x10b93b[_0x3734cd(0x179)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x131b90=[_0x16d839,_0x30f8e5],_0x3e4480=startSpinner(_0x3734cd(0x18d)+_0x356fe8['length']+_0x3734cd(0x19a));try{const _0x4010a4=await doCreateMenus(_0x2eccf9[_0x3734cd(0x184)],_0x2eccf9[_0x3734cd(0x192)],_0x356fe8,_0x131b90);return stopSpinner(_0x3e4480,_0x3734cd(0x196)+_0x4010a4[_0x3734cd(0x17f)]+_0x3734cd(0x1a6),!![]),{'ok':!![],'data':_0x4010a4,'message':_0x3734cd(0x1a5)+_0x4010a4[_0x3734cd(0x17f)]+_0x3734cd(0x189)+_0x4010a4[_0x3734cd(0x185)]+_0x3734cd(0x19d)};}catch(_0x52bf79){stopSpinner(_0x3e4480,_0x3734cd(0x187),![]);throw CliErrors['validation'](_0x52bf79 instanceof Error?_0x52bf79['message']:_0x3734cd(0x187));}}};function a56_0x79b3(_0x2b9067,_0x1c453c){_0x2b9067=_0x2b9067-0x177;const _0x33e262=a56_0x33e2();let _0x79b3b2=_0x33e262[_0x2b9067];return _0x79b3b2;}function parseParams(_0x52f331){const _0x2d38e8=a56_0xdb1631;if(!_0x52f331)return{};try{const _0x37d18b=JSON[_0x2d38e8(0x1a1)](_0x52f331);if(typeof _0x37d18b!==_0x2d38e8(0x188)||_0x37d18b===null||Array['isArray'](_0x37d18b))return{};return{'jsUrl':typeof _0x37d18b[_0x2d38e8(0x18a)]===_0x2d38e8(0x195)?_0x37d18b[_0x2d38e8(0x18a)][_0x2d38e8(0x177)]():undefined,'cssUrl':typeof _0x37d18b[_0x2d38e8(0x17e)]===_0x2d38e8(0x195)?_0x37d18b['cssUrl'][_0x2d38e8(0x177)]():undefined,'pages':Array[_0x2d38e8(0x1ad)](_0x37d18b[_0x2d38e8(0x1a0)])?_0x37d18b[_0x2d38e8(0x1a0)]['map'](String):undefined};}catch{return{};}}
@@ -1 +1 @@
1
- const a56_0x2f6fdf=a56_0x2234;function a56_0x2e3f(){const _0x29af7c=['skipped','1241976zbolHF','trim','label','cookie','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','Online\x20menu\x20list\x20fetched','9TKFIZo','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation','CANCEL','\x20menu(s)\x20updated','string','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','1364482gJaJNo','Menu\x20update\x20failed','log','yes','params','\x20updated.','\x20failed.','gray','cyan','1021815ANkwfh','flag','parse','yellow','\x20\x20Found\x20','jsUrl','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','boolean','Menu\x20update\x20completed:\x20','error','6nFRaeF','cssUrl','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','message','\x20updated,\x20','✓\x20Menu\x20update\x20completed:\x20','failed','477326aWYirT','\x20menu(s)\x20failed','1639045uCrEaJ','write','2308648naLRNg','str','validation','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20menu(s)...','updated','\x20\x20Update\x20','Updated\x20','menu','appCode','Updating\x20','map','length','9275088lDxpnr','\x20\x20Cancelled.'];a56_0x2e3f=function(){return _0x29af7c;};return a56_0x2e3f();}(function(_0x1a2214,_0x5f1a84){const _0x3e92a1=a56_0x2234,_0x4c603a=_0x1a2214();while(!![]){try{const _0x4b53e4=parseInt(_0x3e92a1(0x90))/0x1+parseInt(_0x3e92a1(0xa4))/0x2+parseInt(_0x3e92a1(0xb9))/0x3+parseInt(_0x3e92a1(0x94))/0x4+-parseInt(_0x3e92a1(0x92))/0x5+-parseInt(_0x3e92a1(0x89))/0x6*(parseInt(_0x3e92a1(0xb0))/0x7)+-parseInt(_0x3e92a1(0xa1))/0x8*(parseInt(_0x3e92a1(0xaa))/0x9);if(_0x4b53e4===_0x5f1a84)break;else _0x4c603a['push'](_0x4c603a['shift']());}catch(_0x41483b){_0x4c603a['push'](_0x4c603a['shift']());}}}(a56_0x2e3f,0x51888));import a56_0x359cd7 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';function a56_0x2234(_0x126ce4,_0x5d4679){_0x126ce4=_0x126ce4-0x84;const _0x2e3f50=a56_0x2e3f();let _0x2234e0=_0x2e3f50[_0x126ce4];return _0x2234e0;}export const menuUpdate={'service':a56_0x2f6fdf(0x9c),'command':'update','description':a56_0x2f6fdf(0x8b),'risk':a56_0x2f6fdf(0x93),'flags':[{'name':a56_0x2f6fdf(0xb4),'type':'string','description':a56_0x2f6fdf(0xaf)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a56_0x2f6fdf(0xb3),'type':a56_0x2f6fdf(0x86),'description':a56_0x2f6fdf(0xab)}],async 'execute'(_0x99eb1d){const _0x1979d3=a56_0x2f6fdf,_0x3c88f9=_0x99eb1d[_0x1979d3(0xba)](_0x1979d3(0xb3)),_0x52fbad=_0x99eb1d[_0x1979d3(0x95)]('params'),_0x28e01c=parseParams(_0x52fbad),_0x42c766=!!(_0x28e01c['jsUrl']||_0x28e01c[_0x1979d3(0x8a)]);if(_0x3c88f9||_0x42c766&&!isInteractive()){const _0x382508=await runMenuUpdateCore(_0x99eb1d[_0x1979d3(0x9d)],_0x99eb1d[_0x1979d3(0xa7)],_0x52fbad);return _0x382508[_0x1979d3(0xa3)]?console[_0x1979d3(0xb2)](_0x1979d3(0x85)):(console[_0x1979d3(0xb2)](_0x1979d3(0x8e)+_0x382508[_0x1979d3(0x99)]+_0x1979d3(0xad)),_0x382508[_0x1979d3(0x8f)]>0x0&&console[_0x1979d3(0x88)]('!\x20'+_0x382508[_0x1979d3(0x8f)]+_0x1979d3(0x91))),{'ok':_0x382508[_0x1979d3(0x8f)]===0x0};}requireInteractive();const _0x10fdf4=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x2def1c;try{_0x2def1c=await fetchOnlineMenuList(_0x99eb1d['appCode'],_0x99eb1d[_0x1979d3(0xa7)]),stopSpinner(_0x10fdf4,_0x1979d3(0xa9),!![]);}catch(_0x1dadb5){stopSpinner(_0x10fdf4,_0x1979d3(0x97),![]);throw CliErrors[_0x1979d3(0x96)](_0x1dadb5 instanceof Error?_0x1dadb5[_0x1979d3(0x8c)]:_0x1979d3(0x97));}const _0x120736=filterMenusWithResources(_0x2def1c);if(_0x120736['length']===0x0)return console[_0x1979d3(0xb2)](a56_0x359cd7[_0x1979d3(0xbc)](_0x1979d3(0xa8))),{'ok':!![]};console[_0x1979d3(0xb2)](),console[_0x1979d3(0xb2)](a56_0x359cd7[_0x1979d3(0xb8)](_0x1979d3(0xbd)+_0x120736[_0x1979d3(0xa0)]+'\x20menu(s)\x20with\x20existing\x20resources')),console[_0x1979d3(0xb2)](renderUpdateSummary(_0x120736[_0x1979d3(0x9f)](_0x38cc77=>_0x38cc77[_0x1979d3(0xa6)]),[_0x28e01c[_0x1979d3(0x84)],_0x28e01c[_0x1979d3(0x8a)]])),console['log']();let _0x27cf8b=_0x28e01c['jsUrl'],_0x372b8f=_0x28e01c['cssUrl'];if(!_0x27cf8b)try{_0x27cf8b=await askJsUrl();}catch(_0x16a30a){if(_0x16a30a[_0x1979d3(0x8c)]===_0x1979d3(0xac))return console[_0x1979d3(0xb2)](a56_0x359cd7[_0x1979d3(0xb7)](_0x1979d3(0xa2))),{'ok':!![]};throw _0x16a30a;}if(!_0x372b8f)try{_0x372b8f=await askCssUrl();}catch(_0x4298c0){if(_0x4298c0[_0x1979d3(0x8c)]===_0x1979d3(0xac))return console[_0x1979d3(0xb2)](a56_0x359cd7[_0x1979d3(0xb7)](_0x1979d3(0xa2))),{'ok':!![]};throw _0x4298c0;}const _0x2df52f=await askConfirm(_0x1979d3(0x9a)+_0x120736[_0x1979d3(0xa0)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x27cf8b+'\x20and\x20CSS:\x20'+_0x372b8f+'?');if(!_0x2df52f)return console[_0x1979d3(0xb2)](a56_0x359cd7[_0x1979d3(0xb7)](_0x1979d3(0xa2))),{'ok':!![]};const _0x56085a=[_0x27cf8b,_0x372b8f],_0x28610c=startSpinner(_0x1979d3(0x9e)+_0x120736['length']+_0x1979d3(0x98));try{const _0x1ff958=await doUpdateCdnUrls(_0x99eb1d[_0x1979d3(0x9d)],_0x99eb1d[_0x1979d3(0xa7)],_0x120736,_0x56085a);return stopSpinner(_0x28610c,_0x1979d3(0x9b)+_0x1ff958[_0x1979d3(0x99)]+'\x20menu(s)',_0x1ff958['failed']===0x0),{'ok':_0x1ff958[_0x1979d3(0x8f)]===0x0,'data':_0x1ff958,'message':_0x1ff958[_0x1979d3(0x8f)]>0x0?_0x1979d3(0x87)+_0x1ff958[_0x1979d3(0x99)]+_0x1979d3(0x8d)+_0x1ff958[_0x1979d3(0x8f)]+_0x1979d3(0xb6):_0x1979d3(0x87)+_0x1ff958[_0x1979d3(0x99)]+_0x1979d3(0xb5)};}catch(_0x3aa67a){stopSpinner(_0x28610c,_0x1979d3(0xb1),![]);throw CliErrors['validation'](_0x3aa67a instanceof Error?_0x3aa67a[_0x1979d3(0x8c)]:_0x1979d3(0xb1));}}};function parseParams(_0x3c6b47){const _0x33b309=a56_0x2f6fdf;if(!_0x3c6b47)return{};try{const _0x4e7c23=JSON[_0x33b309(0xbb)](_0x3c6b47);if(typeof _0x4e7c23!=='object'||_0x4e7c23===null||Array['isArray'](_0x4e7c23))return{};return{'jsUrl':typeof _0x4e7c23[_0x33b309(0x84)]===_0x33b309(0xae)?_0x4e7c23[_0x33b309(0x84)][_0x33b309(0xa5)]():undefined,'cssUrl':typeof _0x4e7c23['cssUrl']===_0x33b309(0xae)?_0x4e7c23[_0x33b309(0x8a)][_0x33b309(0xa5)]():undefined};}catch{return{};}}
1
+ const a57_0x3118e6=a57_0x446c;function a57_0x446c(_0x5d2a25,_0x11c463){_0x5d2a25=_0x5d2a25-0xa4;const _0x191921=a57_0x1919();let _0x446c21=_0x191921[_0x5d2a25];return _0x446c21;}(function(_0xad1f6,_0x1357e6){const _0x5929b4=a57_0x446c,_0x1ef82a=_0xad1f6();while(!![]){try{const _0x515fc6=parseInt(_0x5929b4(0xba))/0x1*(-parseInt(_0x5929b4(0xd0))/0x2)+parseInt(_0x5929b4(0xc8))/0x3*(parseInt(_0x5929b4(0xc2))/0x4)+parseInt(_0x5929b4(0xb4))/0x5*(parseInt(_0x5929b4(0xd5))/0x6)+parseInt(_0x5929b4(0xaf))/0x7*(parseInt(_0x5929b4(0xac))/0x8)+parseInt(_0x5929b4(0xbb))/0x9+parseInt(_0x5929b4(0xd1))/0xa*(-parseInt(_0x5929b4(0xd3))/0xb)+-parseInt(_0x5929b4(0xc7))/0xc;if(_0x515fc6===_0x1357e6)break;else _0x1ef82a['push'](_0x1ef82a['shift']());}catch(_0x469da3){_0x1ef82a['push'](_0x1ef82a['shift']());}}}(a57_0x1919,0x4cb08));import a57_0x25fac9 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';function a57_0x1919(){const _0x510b6a=['isArray','cookie','2002UEDNsD','log','params','Fetching\x20online\x20menu\x20list...','flag','251135qlTjdH','CANCEL','length','boolean','map','Failed\x20to\x20fetch\x20online\x20menu\x20list','3643sQRARr','4111749xshOGx','\x20updated.','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','appCode','yes','update','label','68fOomtk','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','jsUrl','string','\x20\x20Cancelled.','9693468aNtkES','82437YYPLiK','Updated\x20','error','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','cyan','\x20menu(s)\x20updated','\x20menu(s)...','str','2xWISQr','430oakGwg','\x20\x20Update\x20','98296khcENA','Updating\x20','12fBoiIW','\x20failed.','\x20and\x20CSS:\x20','✓\x20Menu\x20update\x20completed:\x20','failed','Menu\x20update\x20failed','\x20menu(s)\x20with\x20JS:\x20','Menu\x20update\x20completed:\x20','updated','gray','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation','message','validation','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','cssUrl','trim','13576Oafxbm'];a57_0x1919=function(){return _0x510b6a;};return a57_0x1919();}import{runMenuUpdateCore}from'./shared/update-core.js';export const menuUpdate={'service':'menu','command':a57_0x3118e6(0xc0),'description':a57_0x3118e6(0xa8),'risk':'write','flags':[{'name':a57_0x3118e6(0xb1),'type':a57_0x3118e6(0xc5),'description':a57_0x3118e6(0xcb)+a57_0x3118e6(0xa9)},{'name':a57_0x3118e6(0xbf),'type':a57_0x3118e6(0xb7),'description':a57_0x3118e6(0xa5)}],async 'execute'(_0x3c04a2){const _0x2bf6d0=a57_0x3118e6,_0x3e5212=_0x3c04a2[_0x2bf6d0(0xb3)](_0x2bf6d0(0xbf)),_0x38a941=_0x3c04a2[_0x2bf6d0(0xcf)](_0x2bf6d0(0xb1)),_0x5c79b1=parseParams(_0x38a941),_0x1897d=!!(_0x5c79b1[_0x2bf6d0(0xc4)]||_0x5c79b1['cssUrl']);if(_0x3e5212||_0x1897d&&!isInteractive()){const _0x317595=await runMenuUpdateCore(_0x3c04a2[_0x2bf6d0(0xbe)],_0x3c04a2[_0x2bf6d0(0xae)],_0x38a941);return _0x317595['skipped']?console[_0x2bf6d0(0xb0)](_0x2bf6d0(0xc3)):(console[_0x2bf6d0(0xb0)](_0x2bf6d0(0xd8)+_0x317595['updated']+_0x2bf6d0(0xcd)),_0x317595[_0x2bf6d0(0xd9)]>0x0&&console[_0x2bf6d0(0xca)]('!\x20'+_0x317595[_0x2bf6d0(0xd9)]+'\x20menu(s)\x20failed')),{'ok':_0x317595[_0x2bf6d0(0xd9)]===0x0};}requireInteractive();const _0x1c5261=startSpinner(_0x2bf6d0(0xb2));let _0x5b2f28;try{_0x5b2f28=await fetchOnlineMenuList(_0x3c04a2[_0x2bf6d0(0xbe)],_0x3c04a2[_0x2bf6d0(0xae)]),stopSpinner(_0x1c5261,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x106d27){stopSpinner(_0x1c5261,_0x2bf6d0(0xb9),![]);throw CliErrors[_0x2bf6d0(0xa7)](_0x106d27 instanceof Error?_0x106d27[_0x2bf6d0(0xa6)]:_0x2bf6d0(0xb9));}const _0x52a0d9=filterMenusWithResources(_0x5b2f28);if(_0x52a0d9[_0x2bf6d0(0xb6)]===0x0)return console['log'](a57_0x25fac9['yellow'](_0x2bf6d0(0xbd))),{'ok':!![]};console[_0x2bf6d0(0xb0)](),console[_0x2bf6d0(0xb0)](a57_0x25fac9[_0x2bf6d0(0xcc)]('\x20\x20Found\x20'+_0x52a0d9[_0x2bf6d0(0xb6)]+'\x20menu(s)\x20with\x20existing\x20resources')),console[_0x2bf6d0(0xb0)](renderUpdateSummary(_0x52a0d9[_0x2bf6d0(0xb8)](_0x5a5ec9=>_0x5a5ec9[_0x2bf6d0(0xc1)]),[_0x5c79b1[_0x2bf6d0(0xc4)],_0x5c79b1[_0x2bf6d0(0xaa)]])),console[_0x2bf6d0(0xb0)]();let _0x502420=_0x5c79b1[_0x2bf6d0(0xc4)],_0x48ac5f=_0x5c79b1[_0x2bf6d0(0xaa)];if(!_0x502420)try{_0x502420=await askJsUrl();}catch(_0x2a25c4){if(_0x2a25c4[_0x2bf6d0(0xa6)]===_0x2bf6d0(0xb5))return console[_0x2bf6d0(0xb0)](a57_0x25fac9[_0x2bf6d0(0xa4)](_0x2bf6d0(0xc6))),{'ok':!![]};throw _0x2a25c4;}if(!_0x48ac5f)try{_0x48ac5f=await askCssUrl();}catch(_0xbaca9e){if(_0xbaca9e[_0x2bf6d0(0xa6)]===_0x2bf6d0(0xb5))return console[_0x2bf6d0(0xb0)](a57_0x25fac9['gray']('\x20\x20Cancelled.')),{'ok':!![]};throw _0xbaca9e;}const _0x5f490b=await askConfirm(_0x2bf6d0(0xd2)+_0x52a0d9['length']+_0x2bf6d0(0xdb)+_0x502420+_0x2bf6d0(0xd7)+_0x48ac5f+'?');if(!_0x5f490b)return console['log'](a57_0x25fac9['gray'](_0x2bf6d0(0xc6))),{'ok':!![]};const _0x36892b=[_0x502420,_0x48ac5f],_0x3a935f=startSpinner(_0x2bf6d0(0xd4)+_0x52a0d9[_0x2bf6d0(0xb6)]+_0x2bf6d0(0xce));try{const _0x51fe63=await doUpdateCdnUrls(_0x3c04a2[_0x2bf6d0(0xbe)],_0x3c04a2[_0x2bf6d0(0xae)],_0x52a0d9,_0x36892b);return stopSpinner(_0x3a935f,_0x2bf6d0(0xc9)+_0x51fe63[_0x2bf6d0(0xdd)]+'\x20menu(s)',_0x51fe63[_0x2bf6d0(0xd9)]===0x0),{'ok':_0x51fe63[_0x2bf6d0(0xd9)]===0x0,'data':_0x51fe63,'message':_0x51fe63[_0x2bf6d0(0xd9)]>0x0?'Menu\x20update\x20completed:\x20'+_0x51fe63[_0x2bf6d0(0xdd)]+'\x20updated,\x20'+_0x51fe63[_0x2bf6d0(0xd9)]+_0x2bf6d0(0xd6):_0x2bf6d0(0xdc)+_0x51fe63['updated']+_0x2bf6d0(0xbc)};}catch(_0xc6b2a8){stopSpinner(_0x3a935f,'Menu\x20update\x20failed',![]);throw CliErrors[_0x2bf6d0(0xa7)](_0xc6b2a8 instanceof Error?_0xc6b2a8[_0x2bf6d0(0xa6)]:_0x2bf6d0(0xda));}}};function parseParams(_0x30a644){const _0x21ed1c=a57_0x3118e6;if(!_0x30a644)return{};try{const _0x59e262=JSON['parse'](_0x30a644);if(typeof _0x59e262!=='object'||_0x59e262===null||Array[_0x21ed1c(0xad)](_0x59e262))return{};return{'jsUrl':typeof _0x59e262[_0x21ed1c(0xc4)]===_0x21ed1c(0xc5)?_0x59e262[_0x21ed1c(0xc4)][_0x21ed1c(0xab)]():undefined,'cssUrl':typeof _0x59e262[_0x21ed1c(0xaa)]===_0x21ed1c(0xc5)?_0x59e262[_0x21ed1c(0xaa)][_0x21ed1c(0xab)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a57_0x5a41(){const _0x56f224=['424566YazsnI','node_modules','toString','3RdszcM','216042sACGiV','cwd','预览服务器启动失败','Preview\x20project','537890lCBEAa','预览服务器启动出错','env','now','preview','执行预览命令','912112sfrrSq','stderr','vite\x20preview','logger','140FVtEvf','all','close','success','40OrZXwn','build','error','PATH','vite\x20preview\x20exited\x20with\x20code\x20','58590FSMovQ','info','1122443VWAspA','inherit','--watch','预览服务器启动成功','pipe','vite','trim','6iuLPiJ','143gwFoye','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','12YTvtwk','1179932xucjbB'];a57_0x5a41=function(){return _0x56f224;};return a57_0x5a41();}const a57_0x58ebd7=a57_0x134b;function a57_0x134b(_0x82b4b5,_0x4f6906){_0x82b4b5=_0x82b4b5-0x11f;const _0x5a41da=a57_0x5a41();let _0x134b1d=_0x5a41da[_0x82b4b5];return _0x134b1d;}(function(_0x1c6598,_0x1da516){const _0x4e3c01=a57_0x134b,_0x4e52d4=_0x1c6598();while(!![]){try{const _0x1e3605=-parseInt(_0x4e3c01(0x13c))/0x1*(-parseInt(_0x4e3c01(0x13d))/0x2)+-parseInt(_0x4e3c01(0x134))/0x3*(-parseInt(_0x4e3c01(0x147))/0x4)+parseInt(_0x4e3c01(0x122))/0x5*(-parseInt(_0x4e3c01(0x12b))/0x6)+parseInt(_0x4e3c01(0x12d))/0x7*(parseInt(_0x4e3c01(0x126))/0x8)+-parseInt(_0x4e3c01(0x139))/0x9+parseInt(_0x4e3c01(0x141))/0xa*(-parseInt(_0x4e3c01(0x135))/0xb)+-parseInt(_0x4e3c01(0x137))/0xc*(parseInt(_0x4e3c01(0x138))/0xd);if(_0x1e3605===_0x1da516)break;else _0x4e52d4['push'](_0x4e52d4['shift']());}catch(_0x2af060){_0x4e52d4['push'](_0x4e52d4['shift']());}}}(a57_0x5a41,0x730d1));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function runPreview(_0x52968f){return new Promise((_0x1b4f9e,_0x712e92)=>{const _0x1de99c=a57_0x134b,_0x4e21cd=Date[_0x1de99c(0x144)]();_0x52968f[_0x1de99c(0x121)][_0x1de99c(0x12c)](_0x1de99c(0x145),'启动预览服务器',{'command':_0x1de99c(0x120)});let _0x27ef38='';const _0x56395d=spawn('vite',[_0x1de99c(0x145)],{'stdio':[_0x1de99c(0x12e),_0x1de99c(0x12e),_0x1de99c(0x131)],'shell':!![],'env':{...process[_0x1de99c(0x143)],'PATH':''+join(process[_0x1de99c(0x13e)](),'node_modules','.bin')+delimiter+process[_0x1de99c(0x143)]['PATH']}});_0x56395d[_0x1de99c(0x11f)]?.['on']('data',_0x2863d3=>{const _0x4d676c=_0x1de99c;_0x27ef38+=_0x2863d3[_0x4d676c(0x13b)]();}),_0x56395d['on'](_0x1de99c(0x124),_0x14aaf5=>{const _0x480f90=_0x1de99c,_0xf91b36=Date[_0x480f90(0x144)]()-_0x4e21cd;if(_0x14aaf5===0x0||_0x14aaf5===null)_0x52968f[_0x480f90(0x121)][_0x480f90(0x125)]('preview',_0x480f90(0x130),_0xf91b36),_0x1b4f9e();else{const _0x28b99a={'exitCode':_0x14aaf5,'duration':_0xf91b36,'command':_0x480f90(0x120),'cwd':process[_0x480f90(0x13e)]()};_0x27ef38[_0x480f90(0x133)]()&&(_0x28b99a[_0x480f90(0x11f)]=_0x27ef38[_0x480f90(0x133)]()),_0x52968f[_0x480f90(0x121)][_0x480f90(0x128)](_0x480f90(0x145),_0x480f90(0x13f),_0x28b99a),_0x712e92(new Error(_0x480f90(0x12a)+_0x14aaf5));}}),_0x56395d['on'](_0x1de99c(0x128),_0x1ec981=>{const _0x43a94a=_0x1de99c,_0x194301=Date[_0x43a94a(0x144)]()-_0x4e21cd;_0x52968f[_0x43a94a(0x121)][_0x43a94a(0x128)](_0x43a94a(0x145),_0x43a94a(0x142),{'error':_0x1ec981['message'],'duration':_0x194301,'stderr':_0x27ef38[_0x43a94a(0x133)]()||undefined}),_0x712e92(_0x1ec981);});});}function runBuildWatch(){return new Promise((_0x1f1d67,_0x4d0f6b)=>{const _0x18de49=a57_0x134b,_0x337d8e=spawn(_0x18de49(0x132),[_0x18de49(0x127),_0x18de49(0x12f)],{'stdio':_0x18de49(0x12e),'shell':!![],'env':{...process['env'],'PATH':''+join(process['cwd'](),_0x18de49(0x13a),'.bin')+delimiter+process[_0x18de49(0x143)][_0x18de49(0x129)]}});_0x337d8e['on'](_0x18de49(0x124),_0x3f5c2d=>{const _0x36216d=_0x18de49;if(_0x3f5c2d===0x0||_0x3f5c2d===null)_0x1f1d67();else _0x4d0f6b(new Error(_0x36216d(0x136)+_0x3f5c2d));}),_0x337d8e['on']('error',_0x4d0f6b);});}export const previewCommand={'name':a57_0x58ebd7(0x145),'description':a57_0x58ebd7(0x140),async 'run'(_0x3dbc71,_0x5ec434,_0x3f2692){const _0x485c3b=a57_0x58ebd7,_0x349756=_0x3f2692['watch'];_0x3dbc71[_0x485c3b(0x121)][_0x485c3b(0x12c)](_0x485c3b(0x145),_0x485c3b(0x146)+(_0x349756?'\x20(监听模式)':'')),_0x349756?await Promise[_0x485c3b(0x123)]([runBuildWatch(),runPreview(_0x3dbc71)]):await runPreview(_0x3dbc71);}};
1
+ const a58_0x560f18=a58_0x3461;function a58_0x3461(_0x531b16,_0x2cae13){_0x531b16=_0x531b16-0x164;const _0x38ff20=a58_0x38ff();let _0x346180=_0x38ff20[_0x531b16];return _0x346180;}(function(_0x217962,_0x1f6ed1){const _0x27511a=a58_0x3461,_0x4463be=_0x217962();while(!![]){try{const _0x378786=-parseInt(_0x27511a(0x16e))/0x1+parseInt(_0x27511a(0x186))/0x2*(parseInt(_0x27511a(0x171))/0x3)+-parseInt(_0x27511a(0x17e))/0x4+-parseInt(_0x27511a(0x187))/0x5+-parseInt(_0x27511a(0x17f))/0x6*(-parseInt(_0x27511a(0x16a))/0x7)+-parseInt(_0x27511a(0x172))/0x8*(-parseInt(_0x27511a(0x168))/0x9)+parseInt(_0x27511a(0x17a))/0xa;if(_0x378786===_0x1f6ed1)break;else _0x4463be['push'](_0x4463be['shift']());}catch(_0x4ae4c6){_0x4463be['push'](_0x4463be['shift']());}}}(a58_0x38ff,0x44756));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function runPreview(_0x5f2ce6){return new Promise((_0x430bdc,_0x8a792)=>{const _0x496ac2=a58_0x3461,_0x3cc5cf=Date[_0x496ac2(0x175)]();_0x5f2ce6['logger']['info']('preview',_0x496ac2(0x16c),{'command':'vite\x20preview'});let _0x3d66ea='';const _0x4b1fb5=spawn(_0x496ac2(0x166),[_0x496ac2(0x183)],{'stdio':[_0x496ac2(0x184),'inherit','pipe'],'shell':!![],'env':{...process['env'],'PATH':''+join(process[_0x496ac2(0x167)](),'node_modules',_0x496ac2(0x181))+delimiter+process[_0x496ac2(0x16f)][_0x496ac2(0x165)]}});_0x4b1fb5[_0x496ac2(0x185)]?.['on']('data',_0x4fff26=>{_0x3d66ea+=_0x4fff26['toString']();}),_0x4b1fb5['on'](_0x496ac2(0x16d),_0x5677cb=>{const _0x2d785d=_0x496ac2,_0x1e08a1=Date[_0x2d785d(0x175)]()-_0x3cc5cf;if(_0x5677cb===0x0||_0x5677cb===null)_0x5f2ce6[_0x2d785d(0x176)]['success'](_0x2d785d(0x183),'预览服务器启动成功',_0x1e08a1),_0x430bdc();else{const _0x19588f={'exitCode':_0x5677cb,'duration':_0x1e08a1,'command':_0x2d785d(0x177),'cwd':process[_0x2d785d(0x167)]()};_0x3d66ea[_0x2d785d(0x17b)]()&&(_0x19588f[_0x2d785d(0x185)]=_0x3d66ea[_0x2d785d(0x17b)]()),_0x5f2ce6['logger']['error'](_0x2d785d(0x183),_0x2d785d(0x173),_0x19588f),_0x8a792(new Error(_0x2d785d(0x182)+_0x5677cb));}}),_0x4b1fb5['on'](_0x496ac2(0x16b),_0x3f93dd=>{const _0x2b1da4=_0x496ac2,_0x54ed49=Date[_0x2b1da4(0x175)]()-_0x3cc5cf;_0x5f2ce6[_0x2b1da4(0x176)]['error']('preview',_0x2b1da4(0x17c),{'error':_0x3f93dd[_0x2b1da4(0x179)],'duration':_0x54ed49,'stderr':_0x3d66ea[_0x2b1da4(0x17b)]()||undefined}),_0x8a792(_0x3f93dd);});});}function runBuildWatch(){return new Promise((_0x22f7d6,_0x1889df)=>{const _0x5e389e=a58_0x3461,_0x1aa495=spawn(_0x5e389e(0x166),['build',_0x5e389e(0x164)],{'stdio':_0x5e389e(0x184),'shell':!![],'env':{...process[_0x5e389e(0x16f)],'PATH':''+join(process[_0x5e389e(0x167)](),_0x5e389e(0x17d),_0x5e389e(0x181))+delimiter+process['env'][_0x5e389e(0x165)]}});_0x1aa495['on'](_0x5e389e(0x16d),_0x146d47=>{const _0x32d48c=_0x5e389e;if(_0x146d47===0x0||_0x146d47===null)_0x22f7d6();else _0x1889df(new Error(_0x32d48c(0x169)+_0x146d47));}),_0x1aa495['on']('error',_0x1889df);});}export const previewCommand={'name':a58_0x560f18(0x183),'description':'Preview\x20project',async 'run'(_0x42740d,_0x4544b8,_0x48c170){const _0xf9a41=a58_0x560f18,_0x45d8c1=_0x48c170[_0xf9a41(0x180)];_0x42740d[_0xf9a41(0x176)]['info'](_0xf9a41(0x183),_0xf9a41(0x170)+(_0x45d8c1?_0xf9a41(0x178):'')),_0x45d8c1?await Promise[_0xf9a41(0x174)]([runBuildWatch(),runPreview(_0x42740d)]):await runPreview(_0x42740d);}};function a58_0x38ff(){const _0x15465f=['now','logger','vite\x20preview','\x20(监听模式)','message','543360SfErQf','trim','预览服务器启动出错','node_modules','685540FrHTlv','402FdRlZZ','watch','.bin','vite\x20preview\x20exited\x20with\x20code\x20','preview','inherit','stderr','1064170GZSYls','643980UCIfsD','--watch','PATH','vite','cwd','519381ZRLWeZ','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','13489tqOreU','error','启动预览服务器','close','365779HSrKdo','env','执行预览命令','3yMIysl','32sgjokD','预览服务器启动失败','all'];a58_0x38ff=function(){return _0x15465f;};return a58_0x38ff();}
@@ -1 +1 @@
1
- function a58_0xb598(){const _0x3c4f53=['Step\x206/6:\x20Installing\x20new\x20skill...','upgrade','info','removed\x20','object','log','join','already\x20exists\x20(will\x20merge)','.lovrabet','Step\x202/6:\x20.lovrabet/\x20removal\x20failed\x20—\x20','\x20removed','path','Step\x202/6:\x20Removing\x20.lovrabet/\x20directory...','\x20→\x20','includes','\x20\x20Action:\x20delete','done','\x20\x20Fields\x20to\x20migrate:\x20','needed','isArray','534716aXzsHo','Step\x205/6:\x20Remove\x20old\x20skill\x20—\x20','filter','3676692kyQZvP','step','mcpServers','files','72027fPoVYr','message','skipped','Config\x20file:','inherit','Remove\x20old\x20skill','Step\x204/6:\x20Cleaning\x20MCP\x20config...','Step\x204/6:\x20MCP\x20config\x20—\x20','utf8','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Step\x202/6:\x20.lovrabet/\x20directory\x20removed','skipped\x20(no\x20legacy\x20config)','Clean\x20MCP\x20config','Step\x203/6:\x20Legacy\x20artifacts\x20—\x20','FAIL','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','entries','gray','no\x20legacy\x20entry','CANCEL','yellow','red','Legacy\x20artifacts:','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global','error','===\x20Upgrade\x20Analysis\x20===','not\x20found\x20(will\x20create)','.cursor/rules/lovrabet_rules.mdc','status','green','label','keys','fail','1423910EaVtrJ','exit\x20','push','Skill\x20swap:','952eqtYiU','oldPath','length','Step\x202/6:\x20.lovrabet/\x20not\x20found,\x20skipped','succeed','Upgrade\x20completed\x20successfully!','start','Step\x206/6:\x20Install\x20new\x20skill\x20—\x20','values','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','.cursor/mcp.json','lovrabet/rabetbase','.bak','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','17154XJWhDA','5655805KGnqkL','139fUMIDI','\x20\x20\x20\x20\x20\x20\x20','yes','string','oldMcpConfig','@lovrabet/dataset-mcp-server','configMigration','FOUND','lovrabet/rabetbase\x20installed\x20globally','cwd','args','Upgrade\x20cancelled.','.claude/skills/lovrabet','nonInteractive','oldArtifacts','cyan','Config\x20migration','3836481GSxjWl','detail','Remove\x20.lovrabet/','hasNewConfig','Remove\x20legacy\x20artifacts','\x20removed\x20(','none\x20found','failed','some','not\x20needed','60VoANXt','===\x20Upgrade\x20Summary\x20===','Step\x205/6:\x20Removing\x20old\x20skill...','385AxuXsY','\x20\x20Step\x20','Proceed\x20with\x20upgrade?'];a58_0xb598=function(){return _0x3c4f53;};return a58_0xb598();}const a58_0x4a89a=a58_0x45ed;(function(_0x230055,_0x8443eb){const _0x5ef50b=a58_0x45ed,_0x12930a=_0x230055();while(!![]){try{const _0x52eed3=-parseInt(_0x5ef50b(0x203))/0x1*(parseInt(_0x5ef50b(0x201))/0x2)+-parseInt(_0x5ef50b(0x1a3))/0x3+-parseInt(_0x5ef50b(0x1ca))/0x4+-parseInt(_0x5ef50b(0x202))/0x5+parseInt(_0x5ef50b(0x1ad))/0x6*(-parseInt(_0x5ef50b(0x1c7))/0x7)+-parseInt(_0x5ef50b(0x1f3))/0x8*(-parseInt(_0x5ef50b(0x1ce))/0x9)+-parseInt(_0x5ef50b(0x1ef))/0xa*(-parseInt(_0x5ef50b(0x1b0))/0xb);if(_0x52eed3===_0x8443eb)break;else _0x12930a['push'](_0x12930a['shift']());}catch(_0x498b7c){_0x12930a['push'](_0x12930a['shift']());}}}(a58_0xb598,0x9ee2e));import a58_0x4e1702 from'chalk';import a58_0x41fa84 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../context.js';import{CORE_IDE_CONFIGS}from'../utils/ai_config.js';import{runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../skills/npx-skills-add.js';import{askConfirm}from'./menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x17087b=>_0x17087b!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x59abf4){const _0x41e6bb=a58_0x45ed,_0x27da4e=[];for(const _0xbcea0e of Object[_0x41e6bb(0x1fb)](CORE_IDE_CONFIGS)){if(_0xbcea0e['files'])for(const _0x1c3018 of _0xbcea0e[_0x41e6bb(0x1cd)]){_0x27da4e[_0x41e6bb(0x1f1)](resolve(_0x59abf4,_0x1c3018[_0x41e6bb(0x1be)]));}}return _0x27da4e;}function analyse(_0xee107c){const _0x27de80=a58_0x45ed;let _0x3ed059=null;const _0x445234=resolve(_0xee107c,NEW_CONFIG_NAME),_0x3235c8=existsSync(_0x445234);for(const _0x4dcfbd of LEGACY_CONFIG_NAMES){const _0xe1e152=resolve(_0xee107c,_0x4dcfbd);if(existsSync(_0xe1e152)){const _0x3f2d4a=readConfigFile(_0xe1e152),_0x22dee3=Object[_0x27de80(0x1ed)](_0x3f2d4a)[_0x27de80(0x1c9)](_0x1c68f8=>typeof _0x3f2d4a[_0x1c68f8]!=='undefined');_0x3ed059={'oldPath':_0xe1e152,'hasNewConfig':_0x3235c8,'fields':_0x22dee3};break;}}const _0x220363=[],_0x272179=resolve(_0xee107c,_0x27de80(0x1bb));if(existsSync(_0x272179))_0x220363[_0x27de80(0x1f1)](_0x272179);const _0x15231b=resolve(_0xee107c,_0x27de80(0x1e9));if(existsSync(_0x15231b))_0x220363[_0x27de80(0x1f1)](_0x15231b);const _0x11b690=resolve(_0xee107c,_0x27de80(0x19e));if(existsSync(_0x11b690))_0x220363[_0x27de80(0x1f1)](_0x11b690);for(const _0x4a0fc0 of collectIdeSkillFiles(_0xee107c)){if(existsSync(_0x4a0fc0))_0x220363['push'](_0x4a0fc0);}let _0x1db631=null;const _0xc689d0=resolve(_0xee107c,_0x27de80(0x1fd));if(existsSync(_0xc689d0))try{const _0x273a2a=JSON['parse'](readFileSync(_0xc689d0,_0x27de80(0x1d6)));if(_0x273a2a?.[_0x27de80(0x1cc)]&&typeof _0x273a2a[_0x27de80(0x1cc)]===_0x27de80(0x1b7)){const _0x522927=[];for(const [_0x43c771,_0x4852ae]of Object[_0x27de80(0x1de)](_0x273a2a['mcpServers'])){const _0x1147b8=_0x4852ae;_0x1147b8?.['args']&&Array[_0x27de80(0x1c6)](_0x1147b8[_0x27de80(0x19c)])&&_0x1147b8[_0x27de80(0x19c)][_0x27de80(0x1ab)](_0x450f78=>typeof _0x450f78==='string'&&_0x450f78['includes']('@lovrabet/dataset-mcp-server'))&&_0x522927[_0x27de80(0x1f1)](_0x43c771);}_0x522927[_0x27de80(0x1f5)]>0x0&&(_0x1db631={'path':_0xc689d0,'keys':_0x522927});}}catch{}const _0x857b71=_0x220363['length']>0x0||_0x3ed059!==null;return{'configMigration':_0x3ed059,'oldArtifacts':_0x220363,'oldMcpConfig':_0x1db631,'needsSkillSwap':_0x857b71};}function printReport(_0x34e5fc){const _0x5ad0bb=a58_0x45ed,{configMigration:_0x56a70e,oldArtifacts:_0x203288,oldMcpConfig:_0x4dc8b5,needsSkillSwap:_0x4ea741}=_0x34e5fc;console[_0x5ad0bb(0x1b8)](''),console[_0x5ad0bb(0x1b8)](a58_0x4e1702['bold'](_0x5ad0bb(0x1e7))),console[_0x5ad0bb(0x1b8)]('');_0x56a70e?(console[_0x5ad0bb(0x1b8)](a58_0x4e1702[_0x5ad0bb(0x1a1)](_0x5ad0bb(0x1d1))+('\x20\x20'+a58_0x4e1702['yellow'](_0x56a70e[_0x5ad0bb(0x1f4)]))),console['log'](_0x5ad0bb(0x1d7)+(_0x56a70e[_0x5ad0bb(0x1a6)]?a58_0x4e1702[_0x5ad0bb(0x1eb)](_0x5ad0bb(0x1ba)):a58_0x4e1702['gray'](_0x5ad0bb(0x1e8)))),console[_0x5ad0bb(0x1b8)](_0x5ad0bb(0x1c4)+_0x56a70e['fields']['join'](',\x20')),console[_0x5ad0bb(0x1b8)](_0x5ad0bb(0x1fc))):console[_0x5ad0bb(0x1b8)](a58_0x4e1702['cyan']('Config\x20file:')+'\x20\x20'+a58_0x4e1702[_0x5ad0bb(0x1df)]('no\x20legacy\x20config\x20found'));console['log']('');if(_0x203288[_0x5ad0bb(0x1f5)]>0x0){console[_0x5ad0bb(0x1b8)](a58_0x4e1702[_0x5ad0bb(0x1a1)](_0x5ad0bb(0x1e4)));for(const _0x4f00fe of _0x203288){console[_0x5ad0bb(0x1b8)]('\x20\x20'+a58_0x4e1702['red'](_0x5ad0bb(0x199))+'\x20\x20'+_0x4f00fe);}console['log'](_0x5ad0bb(0x1c2));}else console[_0x5ad0bb(0x1b8)](a58_0x4e1702['cyan'](_0x5ad0bb(0x1e4))+'\x20\x20'+a58_0x4e1702[_0x5ad0bb(0x1df)](_0x5ad0bb(0x1a9)));console[_0x5ad0bb(0x1b8)](''),_0x4dc8b5?(console['log'](a58_0x4e1702[_0x5ad0bb(0x1a1)]('MCP\x20config:')+('\x20\x20'+a58_0x4e1702['yellow'](_0x4dc8b5['path'])+'\x20→\x20keys:\x20'+_0x4dc8b5[_0x5ad0bb(0x1ed)][_0x5ad0bb(0x1b9)](',\x20'))),console['log']('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x5ad0bb(0x1b8)](a58_0x4e1702[_0x5ad0bb(0x1a1)]('MCP\x20config:')+'\x20\x20'+a58_0x4e1702[_0x5ad0bb(0x1df)](_0x5ad0bb(0x1e0))),console[_0x5ad0bb(0x1b8)](''),console['log'](a58_0x4e1702[_0x5ad0bb(0x1a1)](_0x5ad0bb(0x1f2))+('\x20\x20'+(_0x4ea741?a58_0x4e1702['yellow'](_0x5ad0bb(0x1c5)):a58_0x4e1702['green'](_0x5ad0bb(0x1ac))))),_0x4ea741&&console[_0x5ad0bb(0x1b8)](_0x5ad0bb(0x1e5)),console[_0x5ad0bb(0x1b8)]('');}function execConfigMigration(_0x444292,_0x4b78f9){const _0x5a902e=a58_0x45ed,{configMigration:_0x21d7eb}=_0x444292;if(!_0x21d7eb?.['oldPath'])return{'step':0x1,'label':_0x5a902e(0x1a2),'ok':!![],'detail':_0x5a902e(0x1d9)};const _0x400bfc=readConfigFile(_0x21d7eb[_0x5a902e(0x1f4)]),_0x52f88e=resolve(_0x4b78f9,NEW_CONFIG_NAME),_0x5b1bda=_0x21d7eb['hasNewConfig']?readConfigFile(_0x52f88e):{};for(const [_0x8c19b9,_0x4d6d3b]of Object[_0x5a902e(0x1de)](_0x400bfc)){!(_0x8c19b9 in _0x5b1bda)&&(_0x5b1bda[_0x8c19b9]=_0x4d6d3b);}writeConfigFile(_0x52f88e,_0x5b1bda);const _0x2afbca=_0x21d7eb[_0x5a902e(0x1f4)]+_0x5a902e(0x1ff);return renameSync(_0x21d7eb['oldPath'],_0x2afbca),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x21d7eb[_0x5a902e(0x1f4)]+_0x5a902e(0x1c0)+_0x52f88e+'\x20(backup:\x20'+_0x2afbca+')'};}function execRemoveOldArtifacts(_0x115bf3){const _0x58dbb1=a58_0x45ed,_0x5dd45f=[];for(const _0xdc9fcc of _0x115bf3){try{if(!existsSync(_0xdc9fcc))continue;const _0x2929f1=tryStat(_0xdc9fcc);_0x2929f1?.['isDirectory']()?rmSync(_0xdc9fcc,{'recursive':!![],'force':!![]}):unlinkSync(_0xdc9fcc);}catch(_0xc7ff9b){_0x5dd45f[_0x58dbb1(0x1f1)](_0xdc9fcc+':\x20'+_0xc7ff9b[_0x58dbb1(0x1cf)]);}}return{'step':0x3,'label':_0x58dbb1(0x1a7),'ok':_0x5dd45f[_0x58dbb1(0x1f5)]===0x0,'detail':_0x5dd45f[_0x58dbb1(0x1f5)]>0x0?_0x115bf3[_0x58dbb1(0x1f5)]-_0x5dd45f['length']+'/'+_0x115bf3['length']+_0x58dbb1(0x1a8)+_0x5dd45f[_0x58dbb1(0x1b9)](';\x20')+')':_0x115bf3[_0x58dbb1(0x1f5)]+_0x58dbb1(0x1bd)};}function execCleanMcp(_0x5768c8){const _0xb16f4c=a58_0x45ed;if(!_0x5768c8[_0xb16f4c(0x196)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0xb16f4c(0x1d0)};try{const _0x1b8fbf=readFileSync(_0x5768c8['oldMcpConfig'][_0xb16f4c(0x1be)],_0xb16f4c(0x1d6)),_0x86b54a=JSON['parse'](_0x1b8fbf);if(_0x86b54a?.[_0xb16f4c(0x1cc)]&&typeof _0x86b54a[_0xb16f4c(0x1cc)]===_0xb16f4c(0x1b7)){const _0xbf5c3a=[];for(const [_0x20d3f8,_0xc39e5d]of Object['entries'](_0x86b54a[_0xb16f4c(0x1cc)])){_0xc39e5d?.['args']&&Array[_0xb16f4c(0x1c6)](_0xc39e5d[_0xb16f4c(0x19c)])&&_0xc39e5d[_0xb16f4c(0x19c)][_0xb16f4c(0x1ab)](_0x19dda6=>typeof _0x19dda6===_0xb16f4c(0x195)&&_0x19dda6[_0xb16f4c(0x1c1)](_0xb16f4c(0x197)))&&_0xbf5c3a['push'](_0x20d3f8);}for(const _0x51d157 of _0xbf5c3a){delete _0x86b54a[_0xb16f4c(0x1cc)][_0x51d157];}return _0xbf5c3a[_0xb16f4c(0x1f5)]>0x0&&writeFileSync(_0x5768c8[_0xb16f4c(0x196)][_0xb16f4c(0x1be)],JSON['stringify'](_0x86b54a,null,0x2)+'\x0a',_0xb16f4c(0x1d6)),{'step':0x4,'label':_0xb16f4c(0x1da),'ok':!![],'detail':_0xb16f4c(0x1b6)+_0xbf5c3a[_0xb16f4c(0x1b9)](',\x20')+'\x20from\x20'+_0x5768c8[_0xb16f4c(0x196)][_0xb16f4c(0x1be)]};}return{'step':0x4,'label':_0xb16f4c(0x1da),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x3320d4){return{'step':0x4,'label':_0xb16f4c(0x1da),'ok':![],'detail':_0x3320d4[_0xb16f4c(0x1cf)]};}}function execSkillsRemove(_0x3a977f){const _0x506d96=a58_0x45ed,_0x1d3f77=runNpxSkillsRemove(_0x3a977f,{'stdio':_0x506d96(0x1d2)});return{'step':0x5,'label':_0x506d96(0x1d3),'ok':_0x1d3f77['ok'],'detail':_0x1d3f77['ok']?'lovrabet/lovrabet-skill\x20removed':_0x1d3f77[_0x506d96(0x1e6)]??_0x506d96(0x1f0)+_0x1d3f77[_0x506d96(0x1ea)]};}function execSkillsAdd(_0xcaffc9){const _0x261e60=a58_0x45ed,_0x26c1bc=runNpxSkillsAddGlobal(_0xcaffc9,_0x261e60(0x1fe),{'stdio':'inherit'});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x26c1bc['ok'],'detail':_0x26c1bc['ok']?_0x261e60(0x19a):_0x26c1bc[_0x261e60(0x1e6)]??'exit\x20'+_0x26c1bc[_0x261e60(0x1ea)]};}function a58_0x45ed(_0x1a5c92,_0x1dfecd){_0x1a5c92=_0x1a5c92-0x194;const _0xb598c4=a58_0xb598();let _0x45eddf=_0xb598c4[_0x1a5c92];return _0x45eddf;}function tryStat(_0x2bd71d){try{return statSync(_0x2bd71d);}catch{return undefined;}}function printSummary(_0x1aa95c){const _0x569fa5=a58_0x45ed;console['log'](''),console['log'](a58_0x4e1702['bold'](_0x569fa5(0x1ae))),console[_0x569fa5(0x1b8)]('');for(const _0x36a51b of _0x1aa95c){const _0x3f57e1=_0x36a51b['ok']?a58_0x4e1702['green']('OK'):a58_0x4e1702[_0x569fa5(0x1e3)](_0x569fa5(0x1dc));console[_0x569fa5(0x1b8)]('\x20\x20'+_0x3f57e1+_0x569fa5(0x1b1)+_0x36a51b[_0x569fa5(0x1cb)]+':\x20'+_0x36a51b[_0x569fa5(0x1ec)]);if(_0x36a51b[_0x569fa5(0x1a4)])console[_0x569fa5(0x1b8)](_0x569fa5(0x204)+a58_0x4e1702['gray'](_0x36a51b[_0x569fa5(0x1a4)]));}console[_0x569fa5(0x1b8)]('');}export async function upgradeApp(_0x348e5d,_0x249cd5){const _0x225455=a58_0x45ed,_0x12e6c5=process[_0x225455(0x19b)](),_0x13d6bb=analyse(_0x12e6c5),_0x25719a=!_0x13d6bb[_0x225455(0x198)]&&_0x13d6bb['oldArtifacts'][_0x225455(0x1f5)]===0x0&&!_0x13d6bb['oldMcpConfig']&&!_0x13d6bb['needsSkillSwap'];if(_0x25719a){console['log'](a58_0x4e1702[_0x225455(0x1eb)](_0x225455(0x200)));return;}printReport(_0x13d6bb);const _0x47b61a=_0x249cd5[_0x225455(0x194)]||_0x249cd5['Y']||_0x348e5d[_0x225455(0x19f)];if(!_0x47b61a)try{const _0x5e11f1=await askConfirm(_0x225455(0x1b2));if(!_0x5e11f1){console[_0x225455(0x1b8)](a58_0x4e1702['gray']('Upgrade\x20cancelled.'));return;}}catch(_0x1f4a05){if(_0x1f4a05?.['message']===_0x225455(0x1e1)){console[_0x225455(0x1b8)](a58_0x4e1702[_0x225455(0x1df)](_0x225455(0x19d)));return;}throw _0x1f4a05;}const _0x4fb8be=[],_0x5b9975=a58_0x41fa84({'text':'Step\x201/6:\x20Migrating\x20config...','color':_0x225455(0x1a1)})[_0x225455(0x1f9)](),_0x591fdd=execConfigMigration(_0x13d6bb,_0x12e6c5);_0x4fb8be[_0x225455(0x1f1)](_0x591fdd),_0x5b9975[_0x591fdd['ok']?_0x225455(0x1f7):_0x225455(0x1ee)]('Step\x201/6:\x20Config\x20migration\x20—\x20'+(_0x591fdd[_0x225455(0x1a4)]??(_0x591fdd['ok']?_0x225455(0x1c3):_0x225455(0x1aa))));const _0x12c522=resolve(_0x12e6c5,_0x225455(0x1bb)),_0x5f09a8=a58_0x41fa84({'text':_0x225455(0x1bf),'color':'cyan'})[_0x225455(0x1f9)]();if(existsSync(_0x12c522))try{rmSync(_0x12c522,{'recursive':!![],'force':!![]}),_0x5f09a8[_0x225455(0x1f7)](_0x225455(0x1d8)),_0x4fb8be[_0x225455(0x1f1)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x4af1e1){_0x5f09a8['fail'](_0x225455(0x1bc)+_0x4af1e1[_0x225455(0x1cf)]),_0x4fb8be[_0x225455(0x1f1)]({'step':0x2,'label':_0x225455(0x1a5),'ok':![],'detail':_0x4af1e1['message']});}else _0x5f09a8[_0x225455(0x1b5)](_0x225455(0x1f6)),_0x4fb8be[_0x225455(0x1f1)]({'step':0x2,'label':_0x225455(0x1a5),'ok':!![],'detail':_0x225455(0x1d0)});const _0x3038f3=a58_0x41fa84({'text':'Step\x203/6:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':'cyan'})[_0x225455(0x1f9)](),_0x272924=execRemoveOldArtifacts(_0x13d6bb[_0x225455(0x1a0)]);_0x4fb8be[_0x225455(0x1f1)](_0x272924),_0x3038f3[_0x272924['ok']?_0x225455(0x1f7):_0x225455(0x1ee)](_0x225455(0x1db)+(_0x272924[_0x225455(0x1a4)]??(_0x272924['ok']?_0x225455(0x1c3):_0x225455(0x1aa))));const _0x186eaa=a58_0x41fa84({'text':_0x225455(0x1d4),'color':_0x225455(0x1a1)})['start'](),_0x451429=execCleanMcp(_0x13d6bb);_0x4fb8be[_0x225455(0x1f1)](_0x451429),_0x186eaa[_0x451429['ok']?_0x225455(0x1f7):_0x225455(0x1ee)](_0x225455(0x1d5)+(_0x451429[_0x225455(0x1a4)]??(_0x451429['ok']?_0x225455(0x1c3):_0x225455(0x1aa))));const _0x10be82=a58_0x41fa84({'text':_0x225455(0x1af),'color':_0x225455(0x1a1)})['start'](),_0x212e9a=execSkillsRemove(_0x12e6c5);_0x4fb8be[_0x225455(0x1f1)](_0x212e9a),_0x10be82[_0x212e9a['ok']?_0x225455(0x1f7):_0x225455(0x1ee)](_0x225455(0x1c8)+(_0x212e9a[_0x225455(0x1a4)]??(_0x212e9a['ok']?_0x225455(0x1c3):'failed')));const _0x11e3f8=a58_0x41fa84({'text':_0x225455(0x1b3),'color':_0x225455(0x1a1)})['start'](),_0x2f313e=execSkillsAdd(_0x12e6c5);_0x4fb8be[_0x225455(0x1f1)](_0x2f313e),_0x11e3f8[_0x2f313e['ok']?_0x225455(0x1f7):_0x225455(0x1ee)](_0x225455(0x1fa)+(_0x2f313e['detail']??(_0x2f313e['ok']?_0x225455(0x1c3):_0x225455(0x1aa)))),printSummary(_0x4fb8be);const _0x2038ef=_0x4fb8be['some'](_0x15b4f0=>!_0x15b4f0['ok']);_0x2038ef?console[_0x225455(0x1b8)](a58_0x4e1702[_0x225455(0x1e2)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x225455(0x1b8)](a58_0x4e1702[_0x225455(0x1eb)](_0x225455(0x1f8)));}export const upgradeCommand={'name':a58_0x4a89a(0x1b4),'description':a58_0x4a89a(0x1dd),async 'run'(_0x1bc744,_0x3070a1,_0x2347be){await upgradeApp(_0x1bc744,_0x2347be);}};
1
+ const a59_0x4bf7bc=a59_0x41ae;function a59_0x41ae(_0x524b69,_0x42ab29){_0x524b69=_0x524b69-0x1c9;const _0x46403b=a59_0x4640();let _0x41ae94=_0x46403b[_0x524b69];return _0x41ae94;}(function(_0x570e33,_0x3b8e9d){const _0x452dd8=a59_0x41ae,_0x111eb3=_0x570e33();while(!![]){try{const _0x23bd92=-parseInt(_0x452dd8(0x209))/0x1*(parseInt(_0x452dd8(0x224))/0x2)+parseInt(_0x452dd8(0x211))/0x3+parseInt(_0x452dd8(0x225))/0x4+-parseInt(_0x452dd8(0x1d7))/0x5+-parseInt(_0x452dd8(0x1d4))/0x6*(parseInt(_0x452dd8(0x23a))/0x7)+-parseInt(_0x452dd8(0x1f1))/0x8*(-parseInt(_0x452dd8(0x208))/0x9)+-parseInt(_0x452dd8(0x213))/0xa*(-parseInt(_0x452dd8(0x1d2))/0xb);if(_0x23bd92===_0x3b8e9d)break;else _0x111eb3['push'](_0x111eb3['shift']());}catch(_0x1d4f18){_0x111eb3['push'](_0x111eb3['shift']());}}}(a59_0x4640,0x37c70));import a59_0x4ac0ca from'chalk';import a59_0x2e73e7 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../context.js';function a59_0x4640(){const _0x131584=['lovrabet/lovrabet-skill\x20removed','succeed','.cursor/rules/lovrabet_rules.mdc','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','Step\x201/6:\x20Migrating\x20config...','282636nPwEnn','detail','30vqtYoH','label','red','Remove\x20.lovrabet/','string','no\x20matching\x20entry\x20found','Config\x20migration','stringify','no\x20legacy\x20entry','Legacy\x20artifacts:','info','Step\x202/6:\x20.lovrabet/\x20directory\x20removed','log','\x20\x20Action:\x20delete','oldPath','Step\x203/6:\x20Legacy\x20artifacts\x20—\x20','filter','124420skWCsM','333948HICbes','isArray','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','fields','CANCEL','lovrabet/rabetbase','done','oldArtifacts','cwd','length','failed','@lovrabet/dataset-mcp-server','Step\x204/6:\x20MCP\x20config\x20—\x20','nonInteractive','MCP\x20config:','entries','\x20from\x20','values','object','hasNewConfig','mcpServers','190358Uhchzt','keys','needed','skipped','Step\x204/6:\x20Cleaning\x20MCP\x20config...','step','Upgrade\x20cancelled.','configMigration','undefined','oldMcpConfig','status','\x20\x20New\x20config\x20(.rabetbase.json):\x20','FOUND','\x20\x20\x20\x20\x20\x20\x20','yes','.lovrabet','1177847qLaRUm','Step\x201/6:\x20Config\x20migration\x20—\x20','18pOFkfZ','===\x20Upgrade\x20Analysis\x20===','parse','452755hbpawW','.cursor/mcp.json','files','Step\x202/6:\x20Removing\x20.lovrabet/\x20directory...','removed\x20','green','\x20(backup:\x20','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','not\x20found\x20(will\x20create)','Step\x202/6:\x20.lovrabet/\x20not\x20found,\x20skipped','fail','Config\x20file:','needsSkillSwap','FAIL','not\x20needed','includes','args','path','utf8','cyan','Skill\x20swap:','gray','start','Step\x206/6:\x20Installing\x20new\x20skill...','.bak','exit\x20','2248GXnDWc','Install\x20new\x20skill','error','Step\x203/6:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','\x20→\x20keys:\x20','Upgrade\x20completed\x20successfully!','no\x20legacy\x20config\x20found','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global','Proceed\x20with\x20upgrade?','\x20\x20Fields\x20to\x20migrate:\x20','yellow','lovrabet/rabetbase\x20installed\x20globally','Step\x206/6:\x20Install\x20new\x20skill\x20—\x20','none\x20found','Step\x205/6:\x20Remove\x20old\x20skill\x20—\x20','\x20→\x20','\x20\x20Step\x20','message','inherit','push','Clean\x20MCP\x20config','Step\x205/6:\x20Removing\x20old\x20skill...','\x20removed','6813fPqSrE','5SIhVTr','join','some'];a59_0x4640=function(){return _0x131584;};return a59_0x4640();}import{CORE_IDE_CONFIGS}from'../utils/ai_config.js';import{runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../skills/npx-skills-add.js';import{askConfirm}from'./menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a59_0x4bf7bc(0x223)](_0x3eeed8=>_0x3eeed8!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x717b36){const _0x1ba626=a59_0x4bf7bc,_0xb1e13=[];for(const _0x1ddd97 of Object[_0x1ba626(0x236)](CORE_IDE_CONFIGS)){if(_0x1ddd97[_0x1ba626(0x1d9)])for(const _0x262790 of _0x1ddd97['files']){_0xb1e13[_0x1ba626(0x204)](resolve(_0x717b36,_0x262790[_0x1ba626(0x1e8)]));}}return _0xb1e13;}function analyse(_0x3bd82b){const _0x14d582=a59_0x4bf7bc;let _0x553020=null;const _0x8b8c19=resolve(_0x3bd82b,NEW_CONFIG_NAME),_0x2d522e=existsSync(_0x8b8c19);for(const _0x5e23b4 of LEGACY_CONFIG_NAMES){const _0x13e973=resolve(_0x3bd82b,_0x5e23b4);if(existsSync(_0x13e973)){const _0x46c5cb=readConfigFile(_0x13e973),_0x3d4155=Object['keys'](_0x46c5cb)[_0x14d582(0x223)](_0x4b61e2=>typeof _0x46c5cb[_0x4b61e2]!==_0x14d582(0x1ca));_0x553020={'oldPath':_0x13e973,'hasNewConfig':_0x2d522e,'fields':_0x3d4155};break;}}const _0x3c556f=[],_0xb54c0e=resolve(_0x3bd82b,'.lovrabet');if(existsSync(_0xb54c0e))_0x3c556f[_0x14d582(0x204)](_0xb54c0e);const _0x395b2f=resolve(_0x3bd82b,_0x14d582(0x20e));if(existsSync(_0x395b2f))_0x3c556f[_0x14d582(0x204)](_0x395b2f);const _0x5c543c=resolve(_0x3bd82b,'.claude/skills/lovrabet');if(existsSync(_0x5c543c))_0x3c556f['push'](_0x5c543c);for(const _0x167bbc of collectIdeSkillFiles(_0x3bd82b)){if(existsSync(_0x167bbc))_0x3c556f[_0x14d582(0x204)](_0x167bbc);}let _0x42726e=null;const _0x5b989f=resolve(_0x3bd82b,_0x14d582(0x1d8));if(existsSync(_0x5b989f))try{const _0x4c2541=JSON[_0x14d582(0x1d6)](readFileSync(_0x5b989f,_0x14d582(0x1e9)));if(_0x4c2541?.[_0x14d582(0x239)]&&typeof _0x4c2541[_0x14d582(0x239)]==='object'){const _0x26edf7=[];for(const [_0x10e174,_0x54281b]of Object[_0x14d582(0x234)](_0x4c2541[_0x14d582(0x239)])){const _0x58eaac=_0x54281b;_0x58eaac?.['args']&&Array[_0x14d582(0x226)](_0x58eaac[_0x14d582(0x1e7)])&&_0x58eaac[_0x14d582(0x1e7)]['some'](_0x157a87=>typeof _0x157a87==='string'&&_0x157a87[_0x14d582(0x1e6)]('@lovrabet/dataset-mcp-server'))&&_0x26edf7[_0x14d582(0x204)](_0x10e174);}_0x26edf7[_0x14d582(0x22e)]>0x0&&(_0x42726e={'path':_0x5b989f,'keys':_0x26edf7});}}catch{}const _0x474007=_0x3c556f[_0x14d582(0x22e)]>0x0||_0x553020!==null;return{'configMigration':_0x553020,'oldArtifacts':_0x3c556f,'oldMcpConfig':_0x42726e,'needsSkillSwap':_0x474007};}function printReport(_0x46c211){const _0x3a00fb=a59_0x4bf7bc,{configMigration:_0x575b5e,oldArtifacts:_0x255265,oldMcpConfig:_0x287391,needsSkillSwap:_0x6d8210}=_0x46c211;console[_0x3a00fb(0x21f)](''),console[_0x3a00fb(0x21f)](a59_0x4ac0ca['bold'](_0x3a00fb(0x1d5))),console['log']('');_0x575b5e?(console[_0x3a00fb(0x21f)](a59_0x4ac0ca['cyan'](_0x3a00fb(0x1e2))+('\x20\x20'+a59_0x4ac0ca[_0x3a00fb(0x1fb)](_0x575b5e['oldPath']))),console['log'](_0x3a00fb(0x1cd)+(_0x575b5e[_0x3a00fb(0x238)]?a59_0x4ac0ca[_0x3a00fb(0x1dc)]('already\x20exists\x20(will\x20merge)'):a59_0x4ac0ca[_0x3a00fb(0x1ec)](_0x3a00fb(0x1df)))),console[_0x3a00fb(0x21f)](_0x3a00fb(0x1fa)+_0x575b5e[_0x3a00fb(0x228)][_0x3a00fb(0x20a)](',\x20')),console[_0x3a00fb(0x21f)](_0x3a00fb(0x20f))):console['log'](a59_0x4ac0ca[_0x3a00fb(0x1ea)](_0x3a00fb(0x1e2))+'\x20\x20'+a59_0x4ac0ca[_0x3a00fb(0x1ec)](_0x3a00fb(0x1f7)));console[_0x3a00fb(0x21f)]('');if(_0x255265[_0x3a00fb(0x22e)]>0x0){console[_0x3a00fb(0x21f)](a59_0x4ac0ca['cyan'](_0x3a00fb(0x21c)));for(const _0xcc182a of _0x255265){console[_0x3a00fb(0x21f)]('\x20\x20'+a59_0x4ac0ca[_0x3a00fb(0x215)](_0x3a00fb(0x1ce))+'\x20\x20'+_0xcc182a);}console[_0x3a00fb(0x21f)](_0x3a00fb(0x220));}else console[_0x3a00fb(0x21f)](a59_0x4ac0ca[_0x3a00fb(0x1ea)]('Legacy\x20artifacts:')+'\x20\x20'+a59_0x4ac0ca[_0x3a00fb(0x1ec)](_0x3a00fb(0x1fe)));console[_0x3a00fb(0x21f)](''),_0x287391?(console['log'](a59_0x4ac0ca[_0x3a00fb(0x1ea)](_0x3a00fb(0x233))+('\x20\x20'+a59_0x4ac0ca[_0x3a00fb(0x1fb)](_0x287391['path'])+_0x3a00fb(0x1f5)+_0x287391[_0x3a00fb(0x23b)][_0x3a00fb(0x20a)](',\x20'))),console[_0x3a00fb(0x21f)](_0x3a00fb(0x1de))):console['log'](a59_0x4ac0ca[_0x3a00fb(0x1ea)]('MCP\x20config:')+'\x20\x20'+a59_0x4ac0ca[_0x3a00fb(0x1ec)](_0x3a00fb(0x21b))),console['log'](''),console[_0x3a00fb(0x21f)](a59_0x4ac0ca[_0x3a00fb(0x1ea)](_0x3a00fb(0x1eb))+('\x20\x20'+(_0x6d8210?a59_0x4ac0ca[_0x3a00fb(0x1fb)](_0x3a00fb(0x23c)):a59_0x4ac0ca['green'](_0x3a00fb(0x1e5))))),_0x6d8210&&console['log'](_0x3a00fb(0x1f8)),console[_0x3a00fb(0x21f)]('');}function execConfigMigration(_0x15bfc7,_0x2d40fe){const _0x56e3d1=a59_0x4bf7bc,{configMigration:_0x3bd9e6}=_0x15bfc7;if(!_0x3bd9e6?.['oldPath'])return{'step':0x1,'label':_0x56e3d1(0x219),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x5bdd93=readConfigFile(_0x3bd9e6[_0x56e3d1(0x221)]),_0x2b91f9=resolve(_0x2d40fe,NEW_CONFIG_NAME),_0x5b5187=_0x3bd9e6['hasNewConfig']?readConfigFile(_0x2b91f9):{};for(const [_0xf3f286,_0x391233]of Object[_0x56e3d1(0x234)](_0x5bdd93)){!(_0xf3f286 in _0x5b5187)&&(_0x5b5187[_0xf3f286]=_0x391233);}writeConfigFile(_0x2b91f9,_0x5b5187);const _0x55d89c=_0x3bd9e6[_0x56e3d1(0x221)]+_0x56e3d1(0x1ef);return renameSync(_0x3bd9e6[_0x56e3d1(0x221)],_0x55d89c),{'step':0x1,'label':_0x56e3d1(0x219),'ok':!![],'detail':_0x3bd9e6[_0x56e3d1(0x221)]+_0x56e3d1(0x200)+_0x2b91f9+_0x56e3d1(0x1dd)+_0x55d89c+')'};}function execRemoveOldArtifacts(_0x11a78f){const _0x2238a2=a59_0x4bf7bc,_0x1c3fa2=[];for(const _0xc3d8b5 of _0x11a78f){try{if(!existsSync(_0xc3d8b5))continue;const _0x3b2f41=tryStat(_0xc3d8b5);_0x3b2f41?.['isDirectory']()?rmSync(_0xc3d8b5,{'recursive':!![],'force':!![]}):unlinkSync(_0xc3d8b5);}catch(_0x3ccb72){_0x1c3fa2[_0x2238a2(0x204)](_0xc3d8b5+':\x20'+_0x3ccb72[_0x2238a2(0x202)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x1c3fa2[_0x2238a2(0x22e)]===0x0,'detail':_0x1c3fa2[_0x2238a2(0x22e)]>0x0?_0x11a78f['length']-_0x1c3fa2[_0x2238a2(0x22e)]+'/'+_0x11a78f['length']+'\x20removed\x20('+_0x1c3fa2[_0x2238a2(0x20a)](';\x20')+')':_0x11a78f[_0x2238a2(0x22e)]+_0x2238a2(0x207)};}function execCleanMcp(_0x45e11c){const _0x433626=a59_0x4bf7bc;if(!_0x45e11c[_0x433626(0x1cb)])return{'step':0x4,'label':_0x433626(0x205),'ok':!![],'detail':_0x433626(0x23d)};try{const _0xa3650f=readFileSync(_0x45e11c[_0x433626(0x1cb)][_0x433626(0x1e8)],_0x433626(0x1e9)),_0x459b8d=JSON[_0x433626(0x1d6)](_0xa3650f);if(_0x459b8d?.['mcpServers']&&typeof _0x459b8d[_0x433626(0x239)]===_0x433626(0x237)){const _0x14a810=[];for(const [_0x5a109b,_0x1074cc]of Object[_0x433626(0x234)](_0x459b8d[_0x433626(0x239)])){_0x1074cc?.[_0x433626(0x1e7)]&&Array[_0x433626(0x226)](_0x1074cc[_0x433626(0x1e7)])&&_0x1074cc[_0x433626(0x1e7)][_0x433626(0x20b)](_0x48318e=>typeof _0x48318e===_0x433626(0x217)&&_0x48318e[_0x433626(0x1e6)](_0x433626(0x230)))&&_0x14a810[_0x433626(0x204)](_0x5a109b);}for(const _0x1a1aad of _0x14a810){delete _0x459b8d[_0x433626(0x239)][_0x1a1aad];}return _0x14a810[_0x433626(0x22e)]>0x0&&writeFileSync(_0x45e11c[_0x433626(0x1cb)][_0x433626(0x1e8)],JSON[_0x433626(0x21a)](_0x459b8d,null,0x2)+'\x0a',_0x433626(0x1e9)),{'step':0x4,'label':_0x433626(0x205),'ok':!![],'detail':_0x433626(0x1db)+_0x14a810['join'](',\x20')+_0x433626(0x235)+_0x45e11c[_0x433626(0x1cb)][_0x433626(0x1e8)]};}return{'step':0x4,'label':_0x433626(0x205),'ok':!![],'detail':_0x433626(0x218)};}catch(_0x1b38ec){return{'step':0x4,'label':_0x433626(0x205),'ok':![],'detail':_0x1b38ec[_0x433626(0x202)]};}}function execSkillsRemove(_0x23c167){const _0x1da9a9=a59_0x4bf7bc,_0x1504c8=runNpxSkillsRemove(_0x23c167,{'stdio':_0x1da9a9(0x203)});return{'step':0x5,'label':'Remove\x20old\x20skill','ok':_0x1504c8['ok'],'detail':_0x1504c8['ok']?_0x1da9a9(0x20c):_0x1504c8[_0x1da9a9(0x1f3)]??_0x1da9a9(0x1f0)+_0x1504c8[_0x1da9a9(0x1cc)]};}function execSkillsAdd(_0x3a0805){const _0xb57039=a59_0x4bf7bc,_0x558d0d=runNpxSkillsAddGlobal(_0x3a0805,_0xb57039(0x22a),{'stdio':'inherit'});return{'step':0x6,'label':_0xb57039(0x1f2),'ok':_0x558d0d['ok'],'detail':_0x558d0d['ok']?_0xb57039(0x1fc):_0x558d0d[_0xb57039(0x1f3)]??'exit\x20'+_0x558d0d[_0xb57039(0x1cc)]};}function tryStat(_0x196b99){try{return statSync(_0x196b99);}catch{return undefined;}}function printSummary(_0x3cc605){const _0x51cc8c=a59_0x4bf7bc;console[_0x51cc8c(0x21f)](''),console['log'](a59_0x4ac0ca['bold']('===\x20Upgrade\x20Summary\x20===')),console['log']('');for(const _0x21a6bd of _0x3cc605){const _0x5d2fdf=_0x21a6bd['ok']?a59_0x4ac0ca['green']('OK'):a59_0x4ac0ca[_0x51cc8c(0x215)](_0x51cc8c(0x1e4));console[_0x51cc8c(0x21f)]('\x20\x20'+_0x5d2fdf+_0x51cc8c(0x201)+_0x21a6bd[_0x51cc8c(0x23f)]+':\x20'+_0x21a6bd[_0x51cc8c(0x214)]);if(_0x21a6bd[_0x51cc8c(0x212)])console['log'](_0x51cc8c(0x1cf)+a59_0x4ac0ca['gray'](_0x21a6bd[_0x51cc8c(0x212)]));}console[_0x51cc8c(0x21f)]('');}export async function upgradeApp(_0x43523c,_0x4e1d21){const _0x3649b9=a59_0x4bf7bc,_0x57ab2a=process[_0x3649b9(0x22d)](),_0x2d26ab=analyse(_0x57ab2a),_0x4a4c31=!_0x2d26ab[_0x3649b9(0x1c9)]&&_0x2d26ab[_0x3649b9(0x22c)][_0x3649b9(0x22e)]===0x0&&!_0x2d26ab[_0x3649b9(0x1cb)]&&!_0x2d26ab[_0x3649b9(0x1e3)];if(_0x4a4c31){console[_0x3649b9(0x21f)](a59_0x4ac0ca[_0x3649b9(0x1dc)](_0x3649b9(0x227)));return;}printReport(_0x2d26ab);const _0x477e48=_0x4e1d21[_0x3649b9(0x1d0)]||_0x4e1d21['Y']||_0x43523c[_0x3649b9(0x232)];if(!_0x477e48)try{const _0x3ebe6d=await askConfirm(_0x3649b9(0x1f9));if(!_0x3ebe6d){console[_0x3649b9(0x21f)](a59_0x4ac0ca[_0x3649b9(0x1ec)](_0x3649b9(0x240)));return;}}catch(_0x113086){if(_0x113086?.[_0x3649b9(0x202)]===_0x3649b9(0x229)){console[_0x3649b9(0x21f)](a59_0x4ac0ca[_0x3649b9(0x1ec)](_0x3649b9(0x240)));return;}throw _0x113086;}const _0x450542=[],_0xa33523=a59_0x2e73e7({'text':_0x3649b9(0x210),'color':_0x3649b9(0x1ea)})[_0x3649b9(0x1ed)](),_0x26b8f8=execConfigMigration(_0x2d26ab,_0x57ab2a);_0x450542[_0x3649b9(0x204)](_0x26b8f8),_0xa33523[_0x26b8f8['ok']?_0x3649b9(0x20d):_0x3649b9(0x1e1)](_0x3649b9(0x1d3)+(_0x26b8f8[_0x3649b9(0x212)]??(_0x26b8f8['ok']?_0x3649b9(0x22b):_0x3649b9(0x22f))));const _0x5ac375=resolve(_0x57ab2a,_0x3649b9(0x1d1)),_0x5809c4=a59_0x2e73e7({'text':_0x3649b9(0x1da),'color':_0x3649b9(0x1ea)})[_0x3649b9(0x1ed)]();if(existsSync(_0x5ac375))try{rmSync(_0x5ac375,{'recursive':!![],'force':!![]}),_0x5809c4[_0x3649b9(0x20d)](_0x3649b9(0x21e)),_0x450542['push']({'step':0x2,'label':_0x3649b9(0x216),'ok':!![]});}catch(_0x562eab){_0x5809c4[_0x3649b9(0x1e1)]('Step\x202/6:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x562eab['message']),_0x450542['push']({'step':0x2,'label':_0x3649b9(0x216),'ok':![],'detail':_0x562eab[_0x3649b9(0x202)]});}else _0x5809c4[_0x3649b9(0x21d)](_0x3649b9(0x1e0)),_0x450542[_0x3649b9(0x204)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x3649b9(0x23d)});const _0x16c27a=a59_0x2e73e7({'text':_0x3649b9(0x1f4),'color':'cyan'})[_0x3649b9(0x1ed)](),_0x4653b2=execRemoveOldArtifacts(_0x2d26ab[_0x3649b9(0x22c)]);_0x450542[_0x3649b9(0x204)](_0x4653b2),_0x16c27a[_0x4653b2['ok']?_0x3649b9(0x20d):_0x3649b9(0x1e1)](_0x3649b9(0x222)+(_0x4653b2['detail']??(_0x4653b2['ok']?_0x3649b9(0x22b):_0x3649b9(0x22f))));const _0x16dd6e=a59_0x2e73e7({'text':_0x3649b9(0x23e),'color':_0x3649b9(0x1ea)})['start'](),_0x2e80d2=execCleanMcp(_0x2d26ab);_0x450542['push'](_0x2e80d2),_0x16dd6e[_0x2e80d2['ok']?'succeed':'fail'](_0x3649b9(0x231)+(_0x2e80d2[_0x3649b9(0x212)]??(_0x2e80d2['ok']?_0x3649b9(0x22b):'failed')));const _0x2c240e=a59_0x2e73e7({'text':_0x3649b9(0x206),'color':'cyan'})[_0x3649b9(0x1ed)](),_0x93ca95=execSkillsRemove(_0x57ab2a);_0x450542[_0x3649b9(0x204)](_0x93ca95),_0x2c240e[_0x93ca95['ok']?_0x3649b9(0x20d):'fail'](_0x3649b9(0x1ff)+(_0x93ca95[_0x3649b9(0x212)]??(_0x93ca95['ok']?_0x3649b9(0x22b):'failed')));const _0x53b76b=a59_0x2e73e7({'text':_0x3649b9(0x1ee),'color':_0x3649b9(0x1ea)})[_0x3649b9(0x1ed)](),_0xed0d3b=execSkillsAdd(_0x57ab2a);_0x450542['push'](_0xed0d3b),_0x53b76b[_0xed0d3b['ok']?_0x3649b9(0x20d):_0x3649b9(0x1e1)](_0x3649b9(0x1fd)+(_0xed0d3b[_0x3649b9(0x212)]??(_0xed0d3b['ok']?_0x3649b9(0x22b):_0x3649b9(0x22f)))),printSummary(_0x450542);const _0xcf0c3f=_0x450542[_0x3649b9(0x20b)](_0x3d120a=>!_0x3d120a['ok']);_0xcf0c3f?console[_0x3649b9(0x21f)](a59_0x4ac0ca[_0x3649b9(0x1fb)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console['log'](a59_0x4ac0ca['green'](_0x3649b9(0x1f6)));}export const upgradeCommand={'name':'upgrade','description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli',async 'run'(_0x356179,_0x4529d2,_0x5ec829){await upgradeApp(_0x356179,_0x5ec829);}};
@@ -1 +1 @@
1
- const a59_0x74bd7f=a59_0x19d2;(function(_0x5f51ba,_0x3f22f3){const _0x243912=a59_0x19d2,_0xabee1f=_0x5f51ba();while(!![]){try{const _0x271cc7=-parseInt(_0x243912(0x1d1))/0x1+parseInt(_0x243912(0x20f))/0x2+-parseInt(_0x243912(0x20e))/0x3+-parseInt(_0x243912(0x1f8))/0x4+-parseInt(_0x243912(0x1e8))/0x5+-parseInt(_0x243912(0x204))/0x6+parseInt(_0x243912(0x20c))/0x7*(parseInt(_0x243912(0x1f3))/0x8);if(_0x271cc7===_0x3f22f3)break;else _0xabee1f['push'](_0xabee1f['shift']());}catch(_0x39c837){_0xabee1f['push'](_0xabee1f['shift']());}}}(a59_0x1221,0xd00c2));import{initCommand}from'./init.js';import{createCommand}from'./create.js';import{upgradeCommand}from'./project-upgrade.js';import{runCommand}from'./run.js';import{authCommand}from'./auth.js';import{logoutCommand}from'./logout.js';import{configCommand}from'./config.js';function a59_0x1221(){const _0x38475b=['Set\x20config\x20value\x20(key\x20value)','Clear\x20command\x20history\x20logs','risk','install','Get\x20config\x20value\x20(key)','Menu','upgrade','remove','run','project','SQL\x20Queries','Switch\x20the\x20default\x20app','list','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','use','Run\x20Scripts','Project','6028310wALoeh','set','Clear\x20login\x20session','has','Initialize\x20.rabetbase.json\x20config','start','config','push','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','doctor','map','53132328OnbPvR','App\x20Management','View\x20command\x20history\x20logs','app','preview','6467232uKoBEn','Configure\x20MCP\x20server\x20for\x20AI\x20tools','Authentication','service','add','Add\x20an\x20app\x20to\x20config','from','logout','Logs','skill','auth','Diagnostics','1237686jTPdRD','build','check','clear','Install\x20developer\x20skill\x20package','Remove\x20an\x20app\x20from\x20config','defaultCommand','Dataset\x20&\x20Operations','7lgrVWF','\x20\x20[write]','4436133ScpINP','680352LXhraC','<script>','description','Self\x20Update','Run\x20any\x20package.json\x20script','BFF\x20Scripts','command','passCommandAsArg','wildcardModule','mcp','create','get','module','1622093YyqeFt','Skills','MCP\x20(AI\x20Tools)','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','Login\x20via\x20browser','show'];a59_0x1221=function(){return _0x38475b;};return a59_0x1221();}import{mcpCommand}from'./mcp.js';import{skillCommand}from'./skill.js';function a59_0x19d2(_0x524aaf,_0x1e11cc){_0x524aaf=_0x524aaf-0x1c7;const _0x1221bc=a59_0x1221();let _0x19d254=_0x1221bc[_0x524aaf];return _0x19d254;}import{logsCommand}from'./logs.js';import{appCommand}from'./app.js';import{updateCommand}from'./cli-update.js';import{doctorCommand}from'./doctor.js';import{apiDefinitions}from'./api/index.js';import{bffDefinitions}from'./bff/index.js';import{sqlDefinitions}from'./sql/index.js';import{datasetDefinitions}from'./dataset/index.js';import{codegenDefinitions}from'./codegen/index.js';import{menuDefinitions}from'./menu/index.js';export const serviceRegistry=[];const serviceByName=new Map(),legacyHandlers=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x351805){const _0x13b52f=a59_0x19d2;for(const _0x442625 of _0x351805){definitions['set'](_0x442625[_0x13b52f(0x1fb)]+':'+_0x442625[_0x13b52f(0x1ca)],_0x442625);let _0x7c4522=serviceGroups[_0x13b52f(0x1cf)](_0x442625[_0x13b52f(0x1fb)]);!_0x7c4522&&(_0x7c4522=[],serviceGroups[_0x13b52f(0x1e9)](_0x442625[_0x13b52f(0x1fb)],_0x7c4522)),_0x7c4522[_0x13b52f(0x1ef)](_0x442625);}}function registerDeclarativeService(_0x50e4f2,_0x3de652){const _0xcf223d=a59_0x19d2;registerDefinitions(_0x3de652);const _0x28e2ce=_0x2c6d1d=>_0x2c6d1d==='read'?'':_0x2c6d1d==='write'?_0xcf223d(0x20d):'\x20\x20[high-risk-write]',_0x307a43={'service':_0x3de652[0x0][_0xcf223d(0x1fb)],'label':_0x50e4f2,'commands':_0x3de652[_0xcf223d(0x1f2)](_0x4d18e3=>({'command':_0x4d18e3[_0xcf223d(0x1ca)],'description':_0x4d18e3['description'],'tag':_0x28e2ce(_0x4d18e3[_0xcf223d(0x1d9)])})),'declarative':!![]};serviceRegistry[_0xcf223d(0x1ef)](_0x307a43),serviceByName['set'](_0x307a43[_0xcf223d(0x1fb)],_0x307a43);}function registerLegacyService(_0xdc5e45,_0x5ef118,_0xcb9c34,_0x273161){const _0x35d680=a59_0x19d2,_0x33fdd6={'service':_0xdc5e45,'label':_0x5ef118,'commands':_0xcb9c34[_0x35d680(0x1f2)](_0x5a7ee0=>({'command':_0x5a7ee0[_0x35d680(0x1ca)],'description':_0x5a7ee0[_0x35d680(0x211)],'tag':''})),'declarative':![],'defaultCommand':_0x273161?.[_0x35d680(0x20a)],'wildcardModule':_0x273161?.[_0x35d680(0x1cc)]};serviceRegistry[_0x35d680(0x1ef)](_0x33fdd6),serviceByName[_0x35d680(0x1e9)](_0xdc5e45,_0x33fdd6);for(const _0x368c8c of _0xcb9c34){legacyHandlers['set'](_0xdc5e45+':'+_0x368c8c['command'],{'module':_0x368c8c[_0x35d680(0x1d0)],'passCommandAsArg':_0x368c8c[_0x35d680(0x1cb)]});}}registerLegacyService('project',a59_0x74bd7f(0x1e7),[{'command':'init','description':a59_0x74bd7f(0x1ec),'module':initCommand},{'command':'create','description':'Create\x20a\x20new\x20project','module':createCommand},{'command':a59_0x74bd7f(0x1dd),'description':a59_0x74bd7f(0x1f0),'module':upgradeCommand}]),registerLegacyService(a59_0x74bd7f(0x1f6),a59_0x74bd7f(0x1f4),[{'command':'list','description':'List\x20all\x20configured\x20apps','module':appCommand,'passCommandAsArg':!![]},{'command':a59_0x74bd7f(0x1e5),'description':a59_0x74bd7f(0x1e2),'module':appCommand,'passCommandAsArg':!![]},{'command':a59_0x74bd7f(0x1fc),'description':a59_0x74bd7f(0x1fd),'module':appCommand,'passCommandAsArg':!![]},{'command':a59_0x74bd7f(0x1de),'description':a59_0x74bd7f(0x209),'module':appCommand,'passCommandAsArg':!![]}],{'defaultCommand':a59_0x74bd7f(0x1e3)}),registerLegacyService(a59_0x74bd7f(0x1df),a59_0x74bd7f(0x1e6),[{'command':a59_0x74bd7f(0x210),'description':a59_0x74bd7f(0x1c8),'module':runCommand}],{'wildcardModule':runCommand}),registerLegacyService('auth',a59_0x74bd7f(0x1fa),[{'command':'login','description':a59_0x74bd7f(0x1d5),'module':authCommand},{'command':a59_0x74bd7f(0x1ff),'description':a59_0x74bd7f(0x1ea),'module':logoutCommand}],{'defaultCommand':'login'}),registerLegacyService('update',a59_0x74bd7f(0x1c7),[{'command':a59_0x74bd7f(0x1df),'description':a59_0x74bd7f(0x1e4),'module':updateCommand}],{'defaultCommand':a59_0x74bd7f(0x1df)}),registerLegacyService(a59_0x74bd7f(0x1f1),a59_0x74bd7f(0x203),[{'command':a59_0x74bd7f(0x206),'description':a59_0x74bd7f(0x1d4),'module':doctorCommand}],{'defaultCommand':a59_0x74bd7f(0x206)}),registerLegacyService(a59_0x74bd7f(0x1ee),'Configuration',[{'command':a59_0x74bd7f(0x1e9),'description':a59_0x74bd7f(0x1d7),'module':configCommand,'passCommandAsArg':!![]},{'command':'get','description':a59_0x74bd7f(0x1db),'module':configCommand,'passCommandAsArg':!![]},{'command':a59_0x74bd7f(0x1e3),'description':'List\x20all\x20config\x20values','module':configCommand,'passCommandAsArg':!![]}]),registerDeclarativeService('API',apiDefinitions),registerDeclarativeService(a59_0x74bd7f(0x1dc),menuDefinitions),registerDeclarativeService(a59_0x74bd7f(0x20b),datasetDefinitions),registerDeclarativeService(a59_0x74bd7f(0x1c9),bffDefinitions),registerDeclarativeService(a59_0x74bd7f(0x1e1),sqlDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerLegacyService(a59_0x74bd7f(0x1cd),a59_0x74bd7f(0x1d3),[{'command':'install','description':a59_0x74bd7f(0x1f9),'module':mcpCommand,'passCommandAsArg':!![]}]),registerLegacyService(a59_0x74bd7f(0x201),a59_0x74bd7f(0x1d2),[{'command':a59_0x74bd7f(0x1da),'description':a59_0x74bd7f(0x208),'module':skillCommand,'passCommandAsArg':!![]}]),registerLegacyService('logs',a59_0x74bd7f(0x200),[{'command':a59_0x74bd7f(0x1d6),'description':a59_0x74bd7f(0x1f5),'module':logsCommand},{'command':a59_0x74bd7f(0x207),'description':a59_0x74bd7f(0x1d8),'module':logsCommand,'passCommandAsArg':!![]}],{'defaultCommand':a59_0x74bd7f(0x1d6)});export const deprecatedAliases={'init':{'service':a59_0x74bd7f(0x1e0),'command':'init'},'create':{'service':a59_0x74bd7f(0x1e0),'command':a59_0x74bd7f(0x1ce)},'start':{'service':a59_0x74bd7f(0x1df),'command':a59_0x74bd7f(0x1ed)},'build':{'service':a59_0x74bd7f(0x1df),'command':a59_0x74bd7f(0x205)},'preview':{'service':a59_0x74bd7f(0x1df),'command':a59_0x74bd7f(0x1f7)},'logout':{'service':a59_0x74bd7f(0x202),'command':'logout'},'skills':{'service':'skill','command':a59_0x74bd7f(0x1da)}};export function findDefinition(_0x701a42,_0x3610af){const _0x4389ba=a59_0x74bd7f;return definitions[_0x4389ba(0x1cf)](_0x701a42+':'+_0x3610af);}export function isKnownService(_0x314d5c){const _0x4f4718=a59_0x74bd7f;return serviceByName[_0x4f4718(0x1eb)](_0x314d5c);}export function isDeclarativeService(_0x33a021){return serviceGroups['has'](_0x33a021);}export function getServiceEntry(_0x16af51){return serviceByName['get'](_0x16af51);}export function getLegacyHandler(_0x3c3b8a,_0x2896c2){const _0x4cae22=a59_0x74bd7f;return legacyHandlers[_0x4cae22(0x1cf)](_0x3c3b8a+':'+_0x2896c2);}export function getAllDefinitions(){const _0x145829=a59_0x74bd7f;return Array[_0x145829(0x1fe)](definitions['values']());}
1
+ function a60_0x582b(_0x20f12a,_0x24faf6){_0x20f12a=_0x20f12a-0x12d;const _0x4ba729=a60_0x4ba7();let _0x582b03=_0x4ba729[_0x20f12a];return _0x582b03;}const a60_0xf1026c=a60_0x582b;(function(_0x414fa1,_0x3cfce1){const _0x4996b7=a60_0x582b,_0x352684=_0x414fa1();while(!![]){try{const _0x4a63c2=-parseInt(_0x4996b7(0x139))/0x1+-parseInt(_0x4996b7(0x159))/0x2*(-parseInt(_0x4996b7(0x152))/0x3)+parseInt(_0x4996b7(0x138))/0x4+parseInt(_0x4996b7(0x14d))/0x5*(parseInt(_0x4996b7(0x13c))/0x6)+-parseInt(_0x4996b7(0x160))/0x7*(-parseInt(_0x4996b7(0x170))/0x8)+-parseInt(_0x4996b7(0x133))/0x9+parseInt(_0x4996b7(0x144))/0xa*(parseInt(_0x4996b7(0x134))/0xb);if(_0x4a63c2===_0x3cfce1)break;else _0x352684['push'](_0x352684['shift']());}catch(_0x58f0ae){_0x352684['push'](_0x352684['shift']());}}}(a60_0x4ba7,0x2db47));import{initCommand}from'./init.js';import{createCommand}from'./create.js';import{upgradeCommand}from'./project-upgrade.js';import{runCommand}from'./run.js';import{authCommand}from'./auth.js';import{logoutCommand}from'./logout.js';import{configCommand}from'./config.js';function a60_0x4ba7(){const _0x1f123b=['push','use','project','preview','update','Login\x20via\x20browser','Run\x20any\x20package.json\x20script','107040KenSNW','View\x20command\x20history\x20logs','write','check','auth','Initialize\x20.rabetbase.json\x20config','read','show','skill','1580YCgumG','command','mcp','clear','run','33UMTDrp','SQL\x20Queries','Set\x20config\x20value\x20(key\x20value)','API','add','MCP\x20(AI\x20Tools)','map','1800mzusof','start','service','from','Self\x20Update','Menu','\x20\x20[high-risk-write]','74949XtKlfc','Install\x20developer\x20skill\x20package','Dataset\x20&\x20Operations','Code\x20Generation','risk','remove','logout','app','list','Remove\x20an\x20app\x20from\x20config','values','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Authentication','doctor','install','Logs','128QkfXgt','Run\x20Scripts','description','BFF\x20Scripts','create','passCommandAsArg','login','config','Configure\x20MCP\x20server\x20for\x20AI\x20tools','wildcardModule','List\x20all\x20configured\x20apps','get','set','defaultCommand','Switch\x20the\x20default\x20app','has','2010177NHtUtC','55PftLSL','Diagnostics','Clear\x20command\x20history\x20logs','init','791800paJtVc','372882VNZISY','Skills','App\x20Management','6660vyMaAQ'];a60_0x4ba7=function(){return _0x1f123b;};return a60_0x4ba7();}import{mcpCommand}from'./mcp.js';import{skillCommand}from'./skill.js';import{logsCommand}from'./logs.js';import{appCommand}from'./app.js';import{updateCommand}from'./cli-update.js';import{doctorCommand}from'./doctor.js';import{apiDefinitions}from'./api/index.js';import{bffDefinitions}from'./bff/index.js';import{sqlDefinitions}from'./sql/index.js';import{datasetDefinitions}from'./dataset/index.js';import{codegenDefinitions}from'./codegen/index.js';import{menuDefinitions}from'./menu/index.js';export const serviceRegistry=[];const serviceByName=new Map(),legacyHandlers=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x35c14a){const _0x31ee1c=a60_0x582b;for(const _0x23f790 of _0x35c14a){definitions[_0x31ee1c(0x12f)](_0x23f790['service']+':'+_0x23f790['command'],_0x23f790);let _0x45ca7e=serviceGroups[_0x31ee1c(0x12e)](_0x23f790['service']);!_0x45ca7e&&(_0x45ca7e=[],serviceGroups['set'](_0x23f790[_0x31ee1c(0x15b)],_0x45ca7e)),_0x45ca7e[_0x31ee1c(0x13d)](_0x23f790);}}function registerDeclarativeService(_0x2cb09d,_0x421ba8){const _0x107419=a60_0x582b;registerDefinitions(_0x421ba8);const _0x10b394=_0xf65a33=>_0xf65a33===_0x107419(0x14a)?'':_0xf65a33===_0x107419(0x146)?'\x20\x20[write]':_0x107419(0x15f),_0x170e88={'service':_0x421ba8[0x0][_0x107419(0x15b)],'label':_0x2cb09d,'commands':_0x421ba8[_0x107419(0x158)](_0x179f7e=>({'command':_0x179f7e[_0x107419(0x14e)],'description':_0x179f7e[_0x107419(0x172)],'tag':_0x10b394(_0x179f7e[_0x107419(0x164)])})),'declarative':!![]};serviceRegistry[_0x107419(0x13d)](_0x170e88),serviceByName[_0x107419(0x12f)](_0x170e88['service'],_0x170e88);}function registerLegacyService(_0x155189,_0x2ed682,_0x12739f,_0x1f393e){const _0x426ba0=a60_0x582b,_0x5d920b={'service':_0x155189,'label':_0x2ed682,'commands':_0x12739f[_0x426ba0(0x158)](_0x37db6c=>({'command':_0x37db6c['command'],'description':_0x37db6c[_0x426ba0(0x172)],'tag':''})),'declarative':![],'defaultCommand':_0x1f393e?.[_0x426ba0(0x130)],'wildcardModule':_0x1f393e?.[_0x426ba0(0x179)]};serviceRegistry[_0x426ba0(0x13d)](_0x5d920b),serviceByName[_0x426ba0(0x12f)](_0x155189,_0x5d920b);for(const _0x3e6562 of _0x12739f){legacyHandlers[_0x426ba0(0x12f)](_0x155189+':'+_0x3e6562[_0x426ba0(0x14e)],{'module':_0x3e6562['module'],'passCommandAsArg':_0x3e6562[_0x426ba0(0x175)]});}}registerLegacyService(a60_0xf1026c(0x13f),'Project',[{'command':a60_0xf1026c(0x137),'description':a60_0xf1026c(0x149),'module':initCommand},{'command':'create','description':'Create\x20a\x20new\x20project','module':createCommand},{'command':'upgrade','description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','module':upgradeCommand}]),registerLegacyService(a60_0xf1026c(0x167),a60_0xf1026c(0x13b),[{'command':a60_0xf1026c(0x168),'description':a60_0xf1026c(0x12d),'module':appCommand,'passCommandAsArg':!![]},{'command':a60_0xf1026c(0x13e),'description':a60_0xf1026c(0x131),'module':appCommand,'passCommandAsArg':!![]},{'command':a60_0xf1026c(0x156),'description':'Add\x20an\x20app\x20to\x20config','module':appCommand,'passCommandAsArg':!![]},{'command':a60_0xf1026c(0x165),'description':a60_0xf1026c(0x169),'module':appCommand,'passCommandAsArg':!![]}],{'defaultCommand':a60_0xf1026c(0x168)}),registerLegacyService(a60_0xf1026c(0x151),a60_0xf1026c(0x171),[{'command':'<script>','description':a60_0xf1026c(0x143),'module':runCommand}],{'wildcardModule':runCommand}),registerLegacyService(a60_0xf1026c(0x148),a60_0xf1026c(0x16c),[{'command':a60_0xf1026c(0x176),'description':a60_0xf1026c(0x142),'module':authCommand},{'command':a60_0xf1026c(0x166),'description':'Clear\x20login\x20session','module':logoutCommand}],{'defaultCommand':a60_0xf1026c(0x176)}),registerLegacyService(a60_0xf1026c(0x141),a60_0xf1026c(0x15d),[{'command':'run','description':a60_0xf1026c(0x16b),'module':updateCommand}],{'defaultCommand':a60_0xf1026c(0x151)}),registerLegacyService(a60_0xf1026c(0x16d),a60_0xf1026c(0x135),[{'command':a60_0xf1026c(0x147),'description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','module':doctorCommand}],{'defaultCommand':a60_0xf1026c(0x147)}),registerLegacyService(a60_0xf1026c(0x177),'Configuration',[{'command':a60_0xf1026c(0x12f),'description':a60_0xf1026c(0x154),'module':configCommand,'passCommandAsArg':!![]},{'command':a60_0xf1026c(0x12e),'description':'Get\x20config\x20value\x20(key)','module':configCommand,'passCommandAsArg':!![]},{'command':a60_0xf1026c(0x168),'description':'List\x20all\x20config\x20values','module':configCommand,'passCommandAsArg':!![]}]),registerDeclarativeService(a60_0xf1026c(0x155),apiDefinitions),registerDeclarativeService(a60_0xf1026c(0x15e),menuDefinitions),registerDeclarativeService(a60_0xf1026c(0x162),datasetDefinitions),registerDeclarativeService(a60_0xf1026c(0x173),bffDefinitions),registerDeclarativeService(a60_0xf1026c(0x153),sqlDefinitions),registerDeclarativeService(a60_0xf1026c(0x163),codegenDefinitions),registerLegacyService(a60_0xf1026c(0x14f),a60_0xf1026c(0x157),[{'command':a60_0xf1026c(0x16e),'description':a60_0xf1026c(0x178),'module':mcpCommand,'passCommandAsArg':!![]}]),registerLegacyService('skill',a60_0xf1026c(0x13a),[{'command':a60_0xf1026c(0x16e),'description':a60_0xf1026c(0x161),'module':skillCommand,'passCommandAsArg':!![]}]),registerLegacyService('logs',a60_0xf1026c(0x16f),[{'command':'show','description':a60_0xf1026c(0x145),'module':logsCommand},{'command':a60_0xf1026c(0x150),'description':a60_0xf1026c(0x136),'module':logsCommand,'passCommandAsArg':!![]}],{'defaultCommand':a60_0xf1026c(0x14b)});export const deprecatedAliases={'init':{'service':'project','command':a60_0xf1026c(0x137)},'create':{'service':'project','command':a60_0xf1026c(0x174)},'start':{'service':a60_0xf1026c(0x151),'command':a60_0xf1026c(0x15a)},'build':{'service':a60_0xf1026c(0x151),'command':'build'},'preview':{'service':a60_0xf1026c(0x151),'command':a60_0xf1026c(0x140)},'logout':{'service':'auth','command':'logout'},'skills':{'service':a60_0xf1026c(0x14c),'command':a60_0xf1026c(0x16e)}};export function findDefinition(_0x260566,_0xed281f){return definitions['get'](_0x260566+':'+_0xed281f);}export function isKnownService(_0x422391){return serviceByName['has'](_0x422391);}export function isDeclarativeService(_0x165d8f){const _0x3b979a=a60_0xf1026c;return serviceGroups[_0x3b979a(0x132)](_0x165d8f);}export function getServiceEntry(_0x5ef5d7){const _0x2914ed=a60_0xf1026c;return serviceByName[_0x2914ed(0x12e)](_0x5ef5d7);}export function getLegacyHandler(_0xf8625e,_0x3b7aab){const _0xda71af=a60_0xf1026c;return legacyHandlers[_0xda71af(0x12e)](_0xf8625e+':'+_0x3b7aab);}export function getAllDefinitions(){const _0x3bc8e2=a60_0xf1026c;return Array[_0x3bc8e2(0x15c)](definitions[_0x3bc8e2(0x16a)]());}
@@ -1 +1 @@
1
- function a60_0x521f(){const _0x24c952=['.bin','(none)','pnpm','yarn.lock','--watch','bun','bun.lock','33eHLxgp','dev','3288XtaJLP','\x0a\x20\x20Available\x20scripts:\x0a','916095mfQKpH','parse','Run\x20a\x20package.json\x20script','package.json','inherit','env','preview\x20--watch\x20mode:\x20vite\x20build\x20--watch\x20+\x20vite\x20preview','6562yHZUZD','run','has','logger','preview','slice','vite','Error:\x20No\x20package.json\x20found\x20in\x20current\x20directory.','entries','needsUpgrade','pnpm-lock.yaml','build','No\x20scripts\x20defined\x20in\x20package.json.','node_modules','704200IzOvzJ','scripts','start','\x20exited\x20with\x20code\x20','log','keys','cwd','\x20\x20Available:\x20','PATH','9481887tAossU','3388NKOgLp','length','error','\x22\x20not\x20found\x20in\x20package.json.\x0a','\x20run\x20','info','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','1845940LmTMRv','utf-8','2892568rIesyt','npm','padEnd','all','exit','close','join'];a60_0x521f=function(){return _0x24c952;};return a60_0x521f();}const a60_0x793158=a60_0x5507;(function(_0x51a2d7,_0x1f8b55){const _0x3588ec=a60_0x5507,_0x47d1da=_0x51a2d7();while(!![]){try{const _0x5bf588=parseInt(_0x3588ec(0x1d4))/0x1*(-parseInt(_0x3588ec(0x1df))/0x2)+-parseInt(_0x3588ec(0x1d8))/0x3+-parseInt(_0x3588ec(0x1b3))/0x4+parseInt(_0x3588ec(0x1c4))/0x5+parseInt(_0x3588ec(0x1d6))/0x6*(-parseInt(_0x3588ec(0x1bd))/0x7)+-parseInt(_0x3588ec(0x1c6))/0x8+parseInt(_0x3588ec(0x1bc))/0x9;if(_0x5bf588===_0x1f8b55)break;else _0x47d1da['push'](_0x47d1da['shift']());}catch(_0x348cc0){_0x47d1da['push'](_0x47d1da['shift']());}}}(a60_0x521f,0x325a0));import{readFileSync,existsSync}from'node:fs';import{resolve,delimiter,join}from'node:path';function a60_0x5507(_0x2ee634,_0x3c1a34){_0x2ee634=_0x2ee634-0x1a7;const _0x521fc6=a60_0x521f();let _0x5507bc=_0x521fc6[_0x2ee634];return _0x5507bc;}import{spawn}from'node:child_process';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a60_0x793158(0x1b5),a60_0x793158(0x1d5)]);function readPackageScripts(_0x58c385){const _0x29ebc6=a60_0x793158,_0x4bf79c=resolve(_0x58c385,_0x29ebc6(0x1db));if(!existsSync(_0x4bf79c))return null;try{const _0x35fe56=JSON[_0x29ebc6(0x1d9)](readFileSync(_0x4bf79c,_0x29ebc6(0x1c5)));return _0x35fe56[_0x29ebc6(0x1b4)]??{};}catch{return null;}}function detectPackageManager(_0x24786a){const _0x1a82bf=a60_0x793158;if(existsSync(resolve(_0x24786a,'bun.lockb'))||existsSync(resolve(_0x24786a,_0x1a82bf(0x1d3))))return _0x1a82bf(0x1d2);if(existsSync(resolve(_0x24786a,_0x1a82bf(0x1af))))return _0x1a82bf(0x1cf);if(existsSync(resolve(_0x24786a,_0x1a82bf(0x1d0))))return'yarn';return _0x1a82bf(0x1c7);}async function versionCheck(_0x36814d){const _0x5d7c8c=a60_0x793158,_0x277580=await checkCliVersion();if(_0x277580[_0x5d7c8c(0x1ae)])printCliUpgradeWarning(_0x277580);const _0x7a6476=await checkSdkVersion(_0x36814d);if(_0x7a6476[_0x5d7c8c(0x1ae)])printSdkUpgradeWarning(_0x7a6476);}function spawnScript(_0x43a696,_0x228435,_0x15a6a9,_0x23e4a4){return new Promise((_0x1db5a1,_0x1d05af)=>{const _0x244efa=a60_0x5507,_0x46cf30=[_0x244efa(0x1e0),_0x228435,..._0x15a6a9],_0x7b0871=spawn(_0x43a696,_0x46cf30,{'cwd':_0x23e4a4,'stdio':_0x244efa(0x1dc),'shell':!![],'env':{...process[_0x244efa(0x1dd)],'PATH':''+join(_0x23e4a4,_0x244efa(0x1b2),_0x244efa(0x1cd))+delimiter+process['env'][_0x244efa(0x1bb)]}});_0x7b0871['on'](_0x244efa(0x1cb),_0x55f2b6=>{const _0x42a49e=_0x244efa;if(_0x55f2b6===0x0||_0x55f2b6===null)_0x1db5a1();else _0x1d05af(new Error(_0x43a696+_0x42a49e(0x1c1)+_0x228435+_0x42a49e(0x1b6)+_0x55f2b6));}),_0x7b0871['on'](_0x244efa(0x1bf),_0x1d05af);});}function spawnViteBuildWatch(_0x533ac4){return new Promise((_0xafda8d,_0x40b60b)=>{const _0x59facb=a60_0x5507,_0xeefb5d=spawn(_0x59facb(0x1ab),[_0x59facb(0x1b0),_0x59facb(0x1d1)],{'cwd':_0x533ac4,'stdio':_0x59facb(0x1dc),'shell':!![],'env':{...process['env'],'PATH':''+join(_0x533ac4,'node_modules',_0x59facb(0x1cd))+delimiter+process[_0x59facb(0x1dd)][_0x59facb(0x1bb)]}});_0xeefb5d['on'](_0x59facb(0x1cb),_0x54a7fb=>{const _0x978020=_0x59facb;if(_0x54a7fb===0x0||_0x54a7fb===null)_0xafda8d();else _0x40b60b(new Error(_0x978020(0x1c3)+_0x54a7fb));}),_0xeefb5d['on'](_0x59facb(0x1bf),_0x40b60b);});}function spawnVitePreview(_0x54d2e6){return new Promise((_0x555efc,_0x4eb6c4)=>{const _0x5f3256=a60_0x5507,_0x55f376=spawn(_0x5f3256(0x1ab),[_0x5f3256(0x1a9)],{'cwd':_0x54d2e6,'stdio':_0x5f3256(0x1dc),'shell':!![],'env':{...process[_0x5f3256(0x1dd)],'PATH':''+join(_0x54d2e6,_0x5f3256(0x1b2),_0x5f3256(0x1cd))+delimiter+process[_0x5f3256(0x1dd)][_0x5f3256(0x1bb)]}});_0x55f376['on']('close',_0x9df147=>{if(_0x9df147===0x0||_0x9df147===null)_0x555efc();else _0x4eb6c4(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x9df147));}),_0x55f376['on'](_0x5f3256(0x1bf),_0x4eb6c4);});}export const runCommand={'name':a60_0x793158(0x1e0),'description':a60_0x793158(0x1da),async 'run'(_0x231c77,_0x4378e4,_0x572bd9){const _0x60c0b3=a60_0x793158,_0x23e286=process[_0x60c0b3(0x1b9)](),_0x4714c2=_0x4378e4[0x0],_0x3dacbc=_0x4378e4[_0x60c0b3(0x1aa)](0x1),_0x65a820=readPackageScripts(_0x23e286);!_0x65a820&&(console['error'](_0x60c0b3(0x1ac)),process[_0x60c0b3(0x1ca)](0x1));if(!_0x4714c2){const _0x384f2c=Object[_0x60c0b3(0x1b8)](_0x65a820);if(_0x384f2c[_0x60c0b3(0x1be)]===0x0)console[_0x60c0b3(0x1b7)](_0x60c0b3(0x1b1));else{console[_0x60c0b3(0x1b7)](_0x60c0b3(0x1d7));const _0x3cb8b7=Math['max'](..._0x384f2c['map'](_0x201c24=>_0x201c24[_0x60c0b3(0x1be)]));for(const [_0x1ca4da,_0x39e5e1]of Object[_0x60c0b3(0x1ad)](_0x65a820)){console['log']('\x20\x20\x20\x20'+_0x1ca4da[_0x60c0b3(0x1c8)](_0x3cb8b7+0x2)+_0x39e5e1);}console[_0x60c0b3(0x1b7)]('\x0a\x20\x20Usage:\x20rabetbase\x20run\x20<script>\x0a');}return;}!_0x65a820[_0x4714c2]&&(console['error']('Error:\x20Script\x20\x22'+_0x4714c2+_0x60c0b3(0x1c0)+(_0x60c0b3(0x1ba)+(Object[_0x60c0b3(0x1b8)](_0x65a820)[_0x60c0b3(0x1cc)](',\x20')||_0x60c0b3(0x1ce)))),process[_0x60c0b3(0x1ca)](0x1));const _0x21b5a7=detectPackageManager(_0x23e286);VERSION_CHECK_SCRIPTS[_0x60c0b3(0x1a7)](_0x4714c2)&&await versionCheck(_0x23e286);if(_0x4714c2==='preview'&&_0x572bd9['watch']){_0x231c77[_0x60c0b3(0x1a8)][_0x60c0b3(0x1c2)]('run',_0x60c0b3(0x1de)),await Promise[_0x60c0b3(0x1c9)]([spawnViteBuildWatch(_0x23e286),spawnVitePreview(_0x23e286)]);return;}_0x231c77[_0x60c0b3(0x1a8)]['info'](_0x60c0b3(0x1e0),_0x21b5a7+_0x60c0b3(0x1c1)+_0x4714c2+(_0x3dacbc[_0x60c0b3(0x1be)]?'\x20'+_0x3dacbc['join']('\x20'):'')),await spawnScript(_0x21b5a7,_0x4714c2,_0x3dacbc,_0x23e286);}};
1
+ const a61_0x2d375c=a61_0x3588;function a61_0x391f(){const _0x298566=['keys','\x0a\x20\x20Available\x20scripts:\x0a','PATH','165tnxBWQ','length','package.json','(none)','error','2640184mFIPno','watch','npm','inherit','pnpm-lock.yaml','3565755SmpySx','bun','dev','needsUpgrade','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','max','all','\x20run\x20','cwd','428fWxlQl','scripts','exit','.bin','\x0a\x20\x20Usage:\x20rabetbase\x20run\x20<script>\x0a','join','info','node_modules','\x20\x20Available:\x20','has','start','preview','No\x20scripts\x20defined\x20in\x20package.json.','entries','build','\x20exited\x20with\x20code\x20','env','slice','--watch','Error:\x20Script\x20\x22','4476oxmHjb','\x22\x20not\x20found\x20in\x20package.json.\x0a','log','10pDxsbf','vite\x20preview\x20exited\x20with\x20code\x20','38430qWERLh','418791QJPOan','yarn','2SaClyT','yarn.lock','\x20\x20\x20\x20','run','pnpm','Run\x20a\x20package.json\x20script','8553215VQXudA','padEnd','close','935984uSIeCi','parse'];a61_0x391f=function(){return _0x298566;};return a61_0x391f();}(function(_0x3fea7d,_0x350966){const _0x3ae429=a61_0x3588,_0x22991c=_0x3fea7d();while(!![]){try{const _0x4995a6=parseInt(_0x3ae429(0x1e7))/0x1*(parseInt(_0x3ae429(0x1e9))/0x2)+-parseInt(_0x3ae429(0x21e))/0x3*(-parseInt(_0x3ae429(0x20a))/0x4)+parseInt(_0x3ae429(0x1f7))/0x5*(parseInt(_0x3ae429(0x223))/0x6)+parseInt(_0x3ae429(0x1f2))/0x7+-parseInt(_0x3ae429(0x1fc))/0x8+parseInt(_0x3ae429(0x201))/0x9+-parseInt(_0x3ae429(0x221))/0xa*(parseInt(_0x3ae429(0x1ef))/0xb);if(_0x4995a6===_0x350966)break;else _0x22991c['push'](_0x22991c['shift']());}catch(_0x58b5df){_0x22991c['push'](_0x22991c['shift']());}}}(a61_0x391f,0x33c97));import{readFileSync,existsSync}from'node:fs';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';function a61_0x3588(_0x47b2c7,_0x5c7036){_0x47b2c7=_0x47b2c7-0x1e7;const _0x391f99=a61_0x391f();let _0x358818=_0x391f99[_0x47b2c7];return _0x358818;}const VERSION_CHECK_SCRIPTS=new Set([a61_0x2d375c(0x214),a61_0x2d375c(0x203)]);function readPackageScripts(_0x309915){const _0x4c6b63=a61_0x2d375c,_0x3f8e0a=resolve(_0x309915,_0x4c6b63(0x1f9));if(!existsSync(_0x3f8e0a))return null;try{const _0x2b7732=JSON[_0x4c6b63(0x1f3)](readFileSync(_0x3f8e0a,'utf-8'));return _0x2b7732[_0x4c6b63(0x20b)]??{};}catch{return null;}}function detectPackageManager(_0x50ecc6){const _0x5c802f=a61_0x2d375c;if(existsSync(resolve(_0x50ecc6,'bun.lockb'))||existsSync(resolve(_0x50ecc6,'bun.lock')))return _0x5c802f(0x202);if(existsSync(resolve(_0x50ecc6,_0x5c802f(0x200))))return _0x5c802f(0x1ed);if(existsSync(resolve(_0x50ecc6,_0x5c802f(0x1ea))))return _0x5c802f(0x1e8);return _0x5c802f(0x1fe);}async function versionCheck(_0xebe114){const _0x293b11=a61_0x2d375c,_0x3bf269=await checkCliVersion();if(_0x3bf269[_0x293b11(0x204)])printCliUpgradeWarning(_0x3bf269);const _0x1865de=await checkSdkVersion(_0xebe114);if(_0x1865de[_0x293b11(0x204)])printSdkUpgradeWarning(_0x1865de);}function spawnScript(_0xa78727,_0x534b34,_0x38534e,_0x3388c6){return new Promise((_0x13f4d5,_0x5e9c76)=>{const _0x973264=a61_0x3588,_0x31061e=[_0x973264(0x1ec),_0x534b34,..._0x38534e],_0x560027=spawn(_0xa78727,_0x31061e,{'cwd':_0x3388c6,'stdio':_0x973264(0x1ff),'shell':!![],'env':{...process[_0x973264(0x21a)],'PATH':''+join(_0x3388c6,_0x973264(0x211),_0x973264(0x20d))+delimiter+process[_0x973264(0x21a)]['PATH']}});_0x560027['on']('close',_0x54b28e=>{const _0x4a1fdb=_0x973264;if(_0x54b28e===0x0||_0x54b28e===null)_0x13f4d5();else _0x5e9c76(new Error(_0xa78727+'\x20run\x20'+_0x534b34+_0x4a1fdb(0x219)+_0x54b28e));}),_0x560027['on'](_0x973264(0x1fb),_0x5e9c76);});}function spawnViteBuildWatch(_0x4b0ada){return new Promise((_0x52677c,_0x4a38da)=>{const _0x3c3e26=a61_0x3588,_0x307cc0=spawn('vite',[_0x3c3e26(0x218),_0x3c3e26(0x21c)],{'cwd':_0x4b0ada,'stdio':_0x3c3e26(0x1ff),'shell':!![],'env':{...process['env'],'PATH':''+join(_0x4b0ada,_0x3c3e26(0x211),'.bin')+delimiter+process['env'][_0x3c3e26(0x1f6)]}});_0x307cc0['on'](_0x3c3e26(0x1f1),_0x569841=>{const _0xda5c1d=_0x3c3e26;if(_0x569841===0x0||_0x569841===null)_0x52677c();else _0x4a38da(new Error(_0xda5c1d(0x205)+_0x569841));}),_0x307cc0['on'](_0x3c3e26(0x1fb),_0x4a38da);});}function spawnVitePreview(_0x350f23){return new Promise((_0x1253a5,_0x55890b)=>{const _0x1989f3=a61_0x3588,_0x2ce880=spawn('vite',['preview'],{'cwd':_0x350f23,'stdio':_0x1989f3(0x1ff),'shell':!![],'env':{...process[_0x1989f3(0x21a)],'PATH':''+join(_0x350f23,_0x1989f3(0x211),_0x1989f3(0x20d))+delimiter+process[_0x1989f3(0x21a)][_0x1989f3(0x1f6)]}});_0x2ce880['on']('close',_0x27779d=>{const _0x534d5c=_0x1989f3;if(_0x27779d===0x0||_0x27779d===null)_0x1253a5();else _0x55890b(new Error(_0x534d5c(0x222)+_0x27779d));}),_0x2ce880['on']('error',_0x55890b);});}export const runCommand={'name':a61_0x2d375c(0x1ec),'description':a61_0x2d375c(0x1ee),async 'run'(_0x149889,_0x470384,_0x17ba58){const _0x41e8c7=a61_0x2d375c,_0x51bf28=process[_0x41e8c7(0x209)](),_0x440b5a=_0x470384[0x0],_0x18301d=_0x470384[_0x41e8c7(0x21b)](0x1),_0x1a2712=readPackageScripts(_0x51bf28);!_0x1a2712&&(console[_0x41e8c7(0x1fb)]('Error:\x20No\x20package.json\x20found\x20in\x20current\x20directory.'),process[_0x41e8c7(0x20c)](0x1));if(!_0x440b5a){const _0x18be7e=Object[_0x41e8c7(0x1f4)](_0x1a2712);if(_0x18be7e['length']===0x0)console[_0x41e8c7(0x220)](_0x41e8c7(0x216));else{console[_0x41e8c7(0x220)](_0x41e8c7(0x1f5));const _0xc628f0=Math[_0x41e8c7(0x206)](..._0x18be7e['map'](_0x329525=>_0x329525[_0x41e8c7(0x1f8)]));for(const [_0x1d3407,_0x557240]of Object[_0x41e8c7(0x217)](_0x1a2712)){console['log'](_0x41e8c7(0x1eb)+_0x1d3407[_0x41e8c7(0x1f0)](_0xc628f0+0x2)+_0x557240);}console[_0x41e8c7(0x220)](_0x41e8c7(0x20e));}return;}!_0x1a2712[_0x440b5a]&&(console[_0x41e8c7(0x1fb)](_0x41e8c7(0x21d)+_0x440b5a+_0x41e8c7(0x21f)+(_0x41e8c7(0x212)+(Object[_0x41e8c7(0x1f4)](_0x1a2712)[_0x41e8c7(0x20f)](',\x20')||_0x41e8c7(0x1fa)))),process[_0x41e8c7(0x20c)](0x1));const _0x462dfa=detectPackageManager(_0x51bf28);VERSION_CHECK_SCRIPTS[_0x41e8c7(0x213)](_0x440b5a)&&await versionCheck(_0x51bf28);if(_0x440b5a===_0x41e8c7(0x215)&&_0x17ba58[_0x41e8c7(0x1fd)]){_0x149889['logger'][_0x41e8c7(0x210)]('run','preview\x20--watch\x20mode:\x20vite\x20build\x20--watch\x20+\x20vite\x20preview'),await Promise[_0x41e8c7(0x207)]([spawnViteBuildWatch(_0x51bf28),spawnVitePreview(_0x51bf28)]);return;}_0x149889['logger'][_0x41e8c7(0x210)](_0x41e8c7(0x1ec),_0x462dfa+_0x41e8c7(0x208)+_0x440b5a+(_0x18301d['length']?'\x20'+_0x18301d[_0x41e8c7(0x20f)]('\x20'):'')),await spawnScript(_0x462dfa,_0x440b5a,_0x18301d,_0x51bf28);}};