@lovrabet/rabetbase-cli 2.0.2-beta.3 → 2.0.2-beta.6

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 (129) 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/is-session-valid.js +1 -1
  10. package/lib/auth/logout.js +1 -1
  11. package/lib/cli-flags.js +1 -1
  12. package/lib/cli.js +1 -1
  13. package/lib/commands/api/doc.js +1 -1
  14. package/lib/commands/api/index.js +1 -1
  15. package/lib/commands/api/list.js +1 -1
  16. package/lib/commands/api/pull.js +1 -1
  17. package/lib/commands/app.js +1 -1
  18. package/lib/commands/auth.js +1 -1
  19. package/lib/commands/bff/delete.js +1 -1
  20. package/lib/commands/bff/detail.js +1 -1
  21. package/lib/commands/bff/index.js +1 -1
  22. package/lib/commands/bff/list.js +1 -1
  23. package/lib/commands/bff/new.js +1 -1
  24. package/lib/commands/bff/pull.js +1 -1
  25. package/lib/commands/bff/push.js +1 -1
  26. package/lib/commands/bff/status.js +1 -1
  27. package/lib/commands/build.js +1 -1
  28. package/lib/commands/cli-update.js +1 -0
  29. package/lib/commands/codegen/index.js +1 -1
  30. package/lib/commands/codegen/sdk.js +1 -1
  31. package/lib/commands/codegen/sql.js +1 -1
  32. package/lib/commands/common/flags.js +1 -1
  33. package/lib/commands/config.js +1 -1
  34. package/lib/commands/create.js +1 -1
  35. package/lib/commands/dataset/detail.js +1 -1
  36. package/lib/commands/dataset/index.js +1 -1
  37. package/lib/commands/dataset/links.js +1 -1
  38. package/lib/commands/dataset/list.js +1 -1
  39. package/lib/commands/dataset/operations.js +1 -1
  40. package/lib/commands/doctor.js +1 -0
  41. package/lib/commands/init.js +1 -1
  42. package/lib/commands/logout.js +1 -1
  43. package/lib/commands/logs.js +1 -1
  44. package/lib/commands/mcp.js +1 -1
  45. package/lib/commands/menu/index.js +1 -1
  46. package/lib/commands/menu/shared/compare-table.js +1 -1
  47. package/lib/commands/menu/shared/index.js +1 -1
  48. package/lib/commands/menu/shared/inquirer.js +1 -1
  49. package/lib/commands/menu/shared/local-pages.js +1 -1
  50. package/lib/commands/menu/shared/logic.js +1 -1
  51. package/lib/commands/menu/shared/service.js +1 -1
  52. package/lib/commands/menu/shared/sync-core.js +1 -1
  53. package/lib/commands/menu/shared/update-core.js +1 -1
  54. package/lib/commands/menu/shared/valid-url.js +1 -1
  55. package/lib/commands/menu/sync.js +1 -1
  56. package/lib/commands/menu/update.js +1 -1
  57. package/lib/commands/preview.js +1 -1
  58. package/lib/commands/project-upgrade.js +1 -0
  59. package/lib/commands/registry.js +1 -1
  60. package/lib/commands/run.js +1 -1
  61. package/lib/commands/skill.js +1 -1
  62. package/lib/commands/sql/detail.js +1 -1
  63. package/lib/commands/sql/exec.js +1 -1
  64. package/lib/commands/sql/index.js +1 -1
  65. package/lib/commands/sql/list.js +1 -1
  66. package/lib/commands/sql/save.js +1 -1
  67. package/lib/commands/sql/validate.js +1 -1
  68. package/lib/commands/start.js +1 -1
  69. package/lib/config/config-help.js +1 -1
  70. package/lib/config/main.js +1 -1
  71. package/lib/constant/cli.js +1 -1
  72. package/lib/constant/domain.js +1 -1
  73. package/lib/constant/env.js +1 -1
  74. package/lib/context.js +1 -1
  75. package/lib/core/alias-resolver.js +1 -1
  76. package/lib/core/api-client.js +1 -1
  77. package/lib/core/bff/config.js +1 -1
  78. package/lib/core/bff/file-system.js +1 -1
  79. package/lib/core/bff/hash.js +1 -1
  80. package/lib/core/bff/lock.js +1 -1
  81. package/lib/core/bff/utils.js +1 -1
  82. package/lib/core/db-resolver.js +1 -1
  83. package/lib/core/sql-validator.js +1 -1
  84. package/lib/create-app/enhanced-guided-create.js +1 -1
  85. package/lib/create-app/format-elapsed.js +1 -1
  86. package/lib/create-app/main.js +1 -1
  87. package/lib/create-app/non-interactive.js +1 -1
  88. package/lib/create-app/task-finished.js +1 -1
  89. package/lib/create-app/task-loading.js +1 -1
  90. package/lib/create-app/task-running.js +1 -1
  91. package/lib/create-app/task-time.js +1 -1
  92. package/lib/create-app/use-copy-project-template.js +1 -1
  93. package/lib/create-app/use-format-code.js +1 -1
  94. package/lib/create-app/use-install-dependencies.js +1 -1
  95. package/lib/errors.js +1 -1
  96. package/lib/framework/flags.js +1 -1
  97. package/lib/framework/help.js +1 -1
  98. package/lib/framework/index.js +1 -1
  99. package/lib/framework/output.js +1 -1
  100. package/lib/framework/response.js +1 -1
  101. package/lib/framework/runner.js +1 -1
  102. package/lib/generated/build-info.js +1 -1
  103. package/lib/help.js +1 -1
  104. package/lib/init/main.js +1 -1
  105. package/lib/mcp/McpInstallUI.js +1 -1
  106. package/lib/mcp/claude.js +1 -1
  107. package/lib/mcp/cursor.js +1 -1
  108. package/lib/mcp/main.js +1 -1
  109. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  110. package/lib/mcp/mcp-installer.js +1 -1
  111. package/lib/skills/main.js +1 -1
  112. package/lib/skills/npx-skills-add.js +1 -1
  113. package/lib/ui/IDESelector.js +1 -1
  114. package/lib/ui/useIDESelection.js +1 -1
  115. package/lib/utils/ai_config.js +1 -1
  116. package/lib/utils/cdn-config.js +1 -1
  117. package/lib/utils/check-sdk-version.js +1 -1
  118. package/lib/utils/cli-version-check.js +1 -1
  119. package/lib/utils/config.js +1 -1
  120. package/lib/utils/copy-directory.js +1 -1
  121. package/lib/utils/file-utils.js +1 -1
  122. package/lib/utils/guides-cdn.js +1 -1
  123. package/lib/utils/http-client.js +1 -1
  124. package/lib/utils/logger.js +1 -1
  125. package/lib/utils/rules-cdn.js +1 -1
  126. package/lib/utils/sleep.js +1 -1
  127. package/lib/utils/template-replacer.js +1 -1
  128. package/package.json +1 -1
  129. package/lib/api/pull-silent.js +0 -1
@@ -1 +1 @@
1
- (function(_0x4d69fd,_0x26bd51){const _0x758df9=a49_0x317e,_0x3af392=_0x4d69fd();while(!![]){try{const _0x365513=parseInt(_0x758df9(0x1a1))/0x1+parseInt(_0x758df9(0x1a7))/0x2+-parseInt(_0x758df9(0x1b0))/0x3+-parseInt(_0x758df9(0x1ae))/0x4*(-parseInt(_0x758df9(0x1b4))/0x5)+parseInt(_0x758df9(0x1a4))/0x6+-parseInt(_0x758df9(0x1a0))/0x7+-parseInt(_0x758df9(0x1bf))/0x8;if(_0x365513===_0x26bd51)break;else _0x3af392['push'](_0x3af392['shift']());}catch(_0x3bba2e){_0x3af392['push'](_0x3af392['shift']());}}}(a49_0x5e40,0xd2a32));import{getApiDomain}from'../../../constant/domain.js';import{getEnv}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';export async function getOnlineMenuList(_0x264de4,_0x2f57fe){const _0x541de3=a49_0x317e,_0x4dd45b=getEnv();logger['info'](_0x541de3(0x1a3),_0x4dd45b===_0x541de3(0x1a6)?_0x541de3(0x1ba)+_0x264de4+')':_0x541de3(0x1a2)+_0x264de4+')');const _0x196f58=await fetch(getApiDomain()+'/smartapi/menu/find?appCode='+_0x264de4,{'method':_0x541de3(0x1c3),'headers':{'Content-Type':_0x541de3(0x1ad),'Cookie':_0x2f57fe}});if(!_0x196f58['ok']){if(_0x196f58[_0x541de3(0x19d)]===0x191){const _0x35b72b='Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again';logger['error']('get-online-menu-list',_0x35b72b,{'status':_0x196f58[_0x541de3(0x19d)]});throw new Error(_0x35b72b);}const _0x11e085=_0x541de3(0x1c5)+_0x196f58['status'];logger['error']('get-online-menu-list',_0x11e085);throw new Error(_0x11e085);}const _0x594fc9=await _0x196f58[_0x541de3(0x1aa)]();if(!_0x594fc9[_0x541de3(0x1ab)]){const _0x5ccbaa=_0x541de3(0x1cb)+(_0x594fc9['errorMsg']||_0x541de3(0x1b9));logger[_0x541de3(0x1ca)](_0x541de3(0x1a3),_0x5ccbaa,{'errorCode':_0x594fc9[_0x541de3(0x1c0)],'errorMsg':_0x594fc9[_0x541de3(0x1a9)]});throw new Error(_0x5ccbaa);}if(!_0x594fc9[_0x541de3(0x1c1)])return logger[_0x541de3(0x19b)]('get-online-menu-list','Server\x20returned\x20empty\x20menu\x20list'),[];return logger[_0x541de3(0x19b)](_0x541de3(0x1a3),_0x541de3(0x1d4)+_0x594fc9[_0x541de3(0x1c1)][_0x541de3(0x1cf)]+_0x541de3(0x1c6)),_0x594fc9[_0x541de3(0x1c1)]['map'](flattenMenuItem)[_0x541de3(0x1af)]();}function flattenMenuItem(_0x2810f4){const _0x50ff6f=a49_0x317e;let _0x4d839a=[];try{if(_0x2810f4['extend']?.[_0x50ff6f(0x1d5)]){const _0x1893f4=JSON[_0x50ff6f(0x1ac)](_0x2810f4[_0x50ff6f(0x1d2)][_0x50ff6f(0x1d5)]);Array[_0x50ff6f(0x1bd)](_0x1893f4)&&(_0x4d839a=_0x1893f4);}}catch(_0xe72e1c){}const _0x44ac4a=[{'id':_0x2810f4['id'],'path':_0x2810f4[_0x50ff6f(0x1b2)],'label':_0x2810f4['label'],'resources':_0x4d839a}];if(_0x2810f4[_0x50ff6f(0x1d3)]&&_0x2810f4[_0x50ff6f(0x1d3)][_0x50ff6f(0x1cf)]>0x0)for(const _0x1ab36d of _0x2810f4['children']){_0x44ac4a[_0x50ff6f(0x1b6)](...flattenMenuItem(_0x1ab36d));}return _0x44ac4a;}export async function createMenu(_0x13b44b,_0x39a32e,_0x125bc4){const _0x57db9d=a49_0x317e;logger[_0x57db9d(0x19b)](_0x57db9d(0x19c),_0x57db9d(0x1a5)+_0x125bc4['label']+'\x20('+_0x125bc4[_0x57db9d(0x1b2)]+')');const _0x36c11d={'appCode':_0x13b44b,'type':_0x57db9d(0x1c4),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x125bc4[_0x57db9d(0x1d5)]?JSON[_0x57db9d(0x1cc)](_0x125bc4['resources']):undefined},..._0x125bc4},_0x3ea9ca=await fetch(getApiDomain()+_0x57db9d(0x1cd),{'method':_0x57db9d(0x1a8),'body':JSON['stringify'](_0x36c11d),'headers':{'Content-Type':'application/json','Cookie':_0x39a32e}});if(!_0x3ea9ca['ok']){if(_0x3ea9ca[_0x57db9d(0x19d)]===0x191){const _0xc31d3d=_0x57db9d(0x1b3);logger['error'](_0x57db9d(0x19c),_0xc31d3d,{'status':_0x3ea9ca[_0x57db9d(0x19d)],'menu':_0x125bc4['label']});throw new Error(_0xc31d3d);}const _0x2661bf=_0x57db9d(0x1ce)+_0x3ea9ca['status'];logger[_0x57db9d(0x1ca)](_0x57db9d(0x19c),_0x2661bf,{'menu':_0x125bc4['label']});throw new Error(_0x2661bf);}const _0x25e42f=await _0x3ea9ca[_0x57db9d(0x1aa)]();if(!_0x25e42f[_0x57db9d(0x1ab)]){const _0x3c909c=_0x57db9d(0x1c8)+(_0x25e42f[_0x57db9d(0x1a9)]||_0x57db9d(0x1b9));logger['error'](_0x57db9d(0x19c),_0x3c909c,{'errorCode':_0x25e42f[_0x57db9d(0x1c0)],'errorMsg':_0x25e42f[_0x57db9d(0x1a9)],'menu':_0x125bc4['label']});throw new Error(_0x3c909c);}logger[_0x57db9d(0x19b)]('create-menu',_0x57db9d(0x1bc)+_0x125bc4[_0x57db9d(0x1bb)],_0x25e42f[_0x57db9d(0x1c1)]);}async function createSingleMenu(_0x4f8571,_0x5e505c,_0x1dfd9a,_0x51527e){const _0x192c3c=a49_0x317e,_0x247272={'appCode':_0x4f8571,'type':_0x192c3c(0x1c4),'sort':0x0,'extend':{'loadScriptMode':_0x192c3c(0x1d1),'resources':_0x51527e?JSON['stringify'](_0x51527e):undefined},'label':_0x1dfd9a[_0x192c3c(0x1bb)],'path':_0x1dfd9a[_0x192c3c(0x1b2)]},_0x12de30=await fetch(getApiDomain()+'/smartapi/menu/create',{'method':_0x192c3c(0x1a8),'body':JSON[_0x192c3c(0x1cc)](_0x247272),'headers':{'Content-Type':_0x192c3c(0x1ad),'Cookie':_0x5e505c}});if(!_0x12de30['ok']){if(_0x12de30[_0x192c3c(0x19d)]===0x191){const _0x374e86=_0x192c3c(0x1b3);logger['error'](_0x192c3c(0x19c),_0x374e86,{'status':_0x12de30[_0x192c3c(0x19d)],'menu':_0x1dfd9a[_0x192c3c(0x1bb)]});throw new Error(_0x374e86);}const _0x3ef0c1=_0x192c3c(0x1ce)+_0x12de30[_0x192c3c(0x19d)];logger[_0x192c3c(0x1ca)]('create-menu',_0x3ef0c1,{'menu':_0x1dfd9a[_0x192c3c(0x1bb)]});throw new Error(_0x3ef0c1);}const _0xc01c09=await _0x12de30['json']();if(!_0xc01c09[_0x192c3c(0x1ab)]){if(_0xc01c09[_0x192c3c(0x1c0)]==='0011'||_0xc01c09[_0x192c3c(0x1a9)]?.[_0x192c3c(0x19f)]('登录')){const _0x425fcc=_0x192c3c(0x1be);logger[_0x192c3c(0x1ca)]('create-menu',_0x425fcc,{'errorCode':_0xc01c09[_0x192c3c(0x1c0)],'errorMsg':_0xc01c09[_0x192c3c(0x1a9)],'menu':_0x1dfd9a[_0x192c3c(0x1bb)]});throw new Error(_0x425fcc);}const _0x5f1e1c=_0x192c3c(0x1c8)+(_0xc01c09['errorMsg']||_0x192c3c(0x1b9));logger['error'](_0x192c3c(0x19c),_0x5f1e1c,{'errorCode':_0xc01c09[_0x192c3c(0x1c0)],'errorMsg':_0xc01c09['errorMsg'],'menu':_0x1dfd9a['label']});throw new Error(_0x5f1e1c);}logger[_0x192c3c(0x19b)](_0x192c3c(0x19c),'Menu\x20created\x20successfully:\x20'+_0x1dfd9a[_0x192c3c(0x1bb)]);}function a49_0x317e(_0x5f5481,_0x3bdef2){_0x5f5481=_0x5f5481-0x19b;const _0x5e40ea=a49_0x5e40();let _0x317e82=_0x5e40ea[_0x5f5481];return _0x317e82;}export async function createMenus(_0x4b033f,_0x9c9474,_0x2bad43,_0x2cfed3){const _0x3e3bcf=a49_0x317e;logger[_0x3e3bcf(0x19b)](_0x3e3bcf(0x1b7),_0x3e3bcf(0x1b1)+_0x2bad43[_0x3e3bcf(0x1cf)]),await Promise[_0x3e3bcf(0x19e)](_0x2bad43[_0x3e3bcf(0x1b8)](async _0x40dce5=>{await createSingleMenu(_0x4b033f,_0x9c9474,_0x40dce5,_0x2cfed3);})),logger[_0x3e3bcf(0x19b)]('create-menus','Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x2bad43['length']);}function a49_0x5e40(){const _0xfd4f54=['data','Failed\x20to\x20update\x20menu\x20assets:\x20','GET','procode','Failed\x20to\x20fetch\x20menu\x20list,\x20HTTP\x20status:\x20','\x20online\x20menus\x20successfully','update-menu-cdn-url','Failed\x20to\x20create\x20menu:\x20','Updating\x20menu\x20asset\x20links:\x20','error','Failed\x20to\x20fetch\x20menu\x20list:\x20','stringify','/smartapi/menu/create','Failed\x20to\x20create\x20menu,\x20HTTP\x20status:\x20','length','Menu\x20assets\x20synced:\x20','import','extend','children','Fetched\x20','resources','info','create-menu','status','all','includes','5104120FaSuxK','1177125vYYEUN','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','get-online-menu-list','85908OryrIr','Creating\x20menu:\x20','online','1183234rtvmux','POST','errorMsg','json','success','parse','application/json','4TWVjVR','flat','2277735eSoiwN','Start\x20batch\x20menu\x20creation,\x20total\x20','path','Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','3447225hRTYYt','/smartapi/menu/update','push','create-menus','map','Error','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','label','Menu\x20created\x20successfully:\x20','isArray','Auth\x20validation\x20failed.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','970640XzPNCN','errorCode'];a49_0x5e40=function(){return _0xfd4f54;};return a49_0x5e40();}export async function updateMenuCdnUrl(_0xc98d06,_0x4ac294,_0x648b48){const _0x22ae39=a49_0x317e;logger[_0x22ae39(0x19b)](_0x22ae39(0x1c7),_0x22ae39(0x1c9)+_0x648b48['label']+'\x20('+_0x648b48[_0x22ae39(0x1b2)]+')');const _0x27511e={'id':_0x648b48['id'],'appCode':_0xc98d06,'extend':{'loadScriptMode':'import','resources':_0x648b48[_0x22ae39(0x1d5)]?JSON['stringify'](_0x648b48['resources']):undefined}},_0x37a99f=await fetch(getApiDomain()+_0x22ae39(0x1b5),{'method':_0x22ae39(0x1a8),'body':JSON[_0x22ae39(0x1cc)](_0x27511e),'headers':{'Content-Type':_0x22ae39(0x1ad),'Cookie':_0x4ac294}});if(!_0x37a99f['ok']){if(_0x37a99f[_0x22ae39(0x19d)]===0x191){const _0x24b80b=_0x22ae39(0x1b3);logger[_0x22ae39(0x1ca)]('update-menu-cdn-url',_0x24b80b,{'status':_0x37a99f[_0x22ae39(0x19d)],'menu':_0x648b48['label']});throw new Error(_0x24b80b);}const _0x5affe7=_0x22ae39(0x1c2)+_0x37a99f[_0x22ae39(0x19d)];logger[_0x22ae39(0x1ca)](_0x22ae39(0x1c7),_0x5affe7,{'menu':_0x648b48['label']});throw new Error(_0x5affe7);}const _0x4a742b=await _0x37a99f[_0x22ae39(0x1aa)]();if(!_0x4a742b[_0x22ae39(0x1ab)]){const _0x2796ee='Failed\x20to\x20update\x20menu\x20assets:\x20'+(_0x4a742b['errorMsg']||_0x22ae39(0x1b9));logger[_0x22ae39(0x1ca)](_0x22ae39(0x1c7),_0x2796ee,{'errorCode':_0x4a742b[_0x22ae39(0x1c0)],'errorMsg':_0x4a742b[_0x22ae39(0x1a9)],'menu':_0x648b48['label']});throw new Error(_0x2796ee);}logger[_0x22ae39(0x19b)]('update-menu-cdn-url',_0x22ae39(0x1d0)+_0x648b48['label'],_0x4a742b[_0x22ae39(0x1c1)]);}
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 +1 @@
1
- (function(_0x12a32c,_0x2e1888){const _0xef3623=a50_0x10a7,_0x28882d=_0x12a32c();while(!![]){try{const _0x1654fd=-parseInt(_0xef3623(0xa7))/0x1+parseInt(_0xef3623(0x8d))/0x2+-parseInt(_0xef3623(0x96))/0x3*(parseInt(_0xef3623(0x94))/0x4)+parseInt(_0xef3623(0x9f))/0x5+parseInt(_0xef3623(0x7a))/0x6+-parseInt(_0xef3623(0xa1))/0x7*(parseInt(_0xef3623(0x81))/0x8)+-parseInt(_0xef3623(0x86))/0x9*(-parseInt(_0xef3623(0xa3))/0xa);if(_0x1654fd===_0x2e1888)break;else _0x28882d['push'](_0x28882d['shift']());}catch(_0x4ab3b3){_0x28882d['push'](_0x28882d['shift']());}}}(a50_0x5e3c,0xb39f3));function a50_0x10a7(_0x3ba8b1,_0x49bb38){_0x3ba8b1=_0x3ba8b1-0x7a;const _0x5e3c60=a50_0x5e3c();let _0x10a7b7=_0x5e3c60[_0x3ba8b1];return _0x10a7b7;}import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';function a50_0x5e3c(){const _0x3e48d2=['JS\x20URL\x20is\x20unreachable:\x20','concat','menu-sync','utf8','setLogPath','label','push','length','887010NCopup','filter','1441657boZeDi','string','60VTiHHD','Invalid\x20--params:\x20','trim','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','479806NxSsUZ','jsUrl','data','message','Start\x20non-interactive\x20menu\x20sync','1779474WEKijE','--params.','map','stdin','parse','join','No\x20local\x20pages\x20matched\x20labels:\x20','8BOfVlA','path','selectedLabels','isTTY','end','767727IskePn','pages','readableEnded','isArray','toString','has','cssUrl','1255970NcDCzy','cwd','split','object','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','field','info','4TInJZh','startsWith','576888jGiHka'];a50_0x5e3c=function(){return _0x3e48d2;};return a50_0x5e3c();}import{logger}from'../../../utils/logger.js';function validateParams(_0x2183fc){const _0x1cf815=a50_0x10a7,_0x5146cf=[];return _0x2183fc['jsUrl']&&!isValidJsHttpsUrl(_0x2183fc[_0x1cf815(0xa8)])&&_0x5146cf['push']({'field':'jsUrl','message':_0x1cf815(0x91)}),_0x2183fc[_0x1cf815(0x8c)]&&!isValidCssHttpsUrl(_0x2183fc[_0x1cf815(0x8c)])&&_0x5146cf[_0x1cf815(0x9d)]({'field':'cssUrl','message':_0x1cf815(0xa6)}),_0x5146cf;}export async function runMenuSyncCore(_0x4efde5,_0x274974,_0x4338cd=[],_0x411f31){const _0x1c4455=a50_0x10a7,_0xf8f1e3=parseParamsFlag(_0x411f31),_0xf62f99=_0x4338cd['length']>0x0?_0x4338cd:_0xf8f1e3[_0x1c4455(0x83)],_0x1fced3=_0xf8f1e3[_0x1c4455(0xa8)],_0x139298=_0xf8f1e3[_0x1c4455(0x8c)],_0x49eff5=[];if(_0x1fced3)_0x49eff5[_0x1c4455(0x9d)](_0x1fced3);if(_0x139298)_0x49eff5[_0x1c4455(0x9d)](_0x139298);const _0x44f691=validateParams(_0xf8f1e3);if(_0x44f691[_0x1c4455(0x9e)]>0x0){const _0x3d8ba7=_0x44f691[_0x1c4455(0x7c)](_0x502b72=>_0x1c4455(0x7b)+_0x502b72[_0x1c4455(0x92)]+':\x20'+_0x502b72[_0x1c4455(0xaa)])[_0x1c4455(0x7f)](';\x20');throw new Error(_0x1c4455(0xa4)+_0x3d8ba7);}logger[_0x1c4455(0x9b)](process[_0x1c4455(0x8e)]()),logger[_0x1c4455(0x93)](_0x1c4455(0x99),_0x1c4455(0xab),{'appCode':_0x4efde5,'selectedCount':_0xf62f99?.[_0x1c4455(0x9e)],'jsUrl':_0x1fced3,'cssUrl':_0x139298});if(_0x1fced3){const _0xc92f0c=await isUrlReachable(_0x1fced3);if(!_0xc92f0c)throw new Error(_0x1c4455(0x97)+_0x1fced3);}if(_0x139298){const _0x8ec8e5=await isUrlReachable(_0x139298);if(!_0x8ec8e5)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x139298);}const _0x3fe370=getLocalPages();if(_0x3fe370[_0x1c4455(0x9e)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x382f4a=await getOnlineMenuList(_0x4efde5,_0x274974),_0x34dc9c=new Set(_0x382f4a[_0x1c4455(0x7c)](_0x5ae13f=>_0x5ae13f[_0x1c4455(0x82)]));let _0x3c0ad8;if(_0xf62f99&&_0xf62f99[_0x1c4455(0x9e)]>0x0){const _0x379ee3=new Set(_0xf62f99[_0x1c4455(0x7c)](_0x274f84=>_0x274f84[_0x1c4455(0xa5)]()));_0x3c0ad8=_0x3fe370[_0x1c4455(0xa0)](_0x521fda=>_0x379ee3[_0x1c4455(0x8b)](_0x521fda[_0x1c4455(0x9c)]));if(_0x3c0ad8['length']===0x0){const _0x4bc4b1=_0x3fe370['map'](_0x338f1f=>_0x338f1f[_0x1c4455(0x9c)])[_0x1c4455(0x7f)](',\x20');throw new Error(_0x1c4455(0x80)+[..._0x379ee3][_0x1c4455(0x7f)](',\x20')+'\x0a\x20\x20Available\x20local\x20pages:\x20'+_0x4bc4b1);}}else _0x3c0ad8=_0x3fe370['filter'](_0x40e020=>!_0x34dc9c[_0x1c4455(0x8b)](_0x40e020['path']));if(_0x3c0ad8[_0x1c4455(0x9e)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x4efde5,_0x274974,_0x3c0ad8,_0x49eff5['length']>0x0?_0x49eff5:undefined),logger[_0x1c4455(0x93)](_0x1c4455(0x99),'Menu\x20sync\x20completed',{'count':_0x3c0ad8[_0x1c4455(0x9e)],'resources':_0x49eff5}),{'created':_0x3c0ad8[_0x1c4455(0x9e)],'skipped':![],'targetPages':_0x3c0ad8};}export async function readPageLabelsFromStdin(){const _0x49342e=a50_0x10a7;if(!process[_0x49342e(0x7d)][_0x49342e(0x84)]&&!process[_0x49342e(0x7d)][_0x49342e(0x88)])return new Promise(_0x465838=>{const _0x200793=_0x49342e,_0xd7f593=[];process['stdin']['on'](_0x200793(0xa9),_0x422631=>_0xd7f593['push'](_0x422631)),process[_0x200793(0x7d)]['on'](_0x200793(0x85),()=>{const _0x189572=_0x200793,_0x4f0fb8=Buffer[_0x189572(0x98)](_0xd7f593)[_0x189572(0x8a)](_0x189572(0x9a)),_0x5136a2=_0x4f0fb8[_0x189572(0x8f)]('\x0a')[_0x189572(0x7c)](_0x34c4f8=>_0x34c4f8[_0x189572(0xa5)]())[_0x189572(0xa0)](_0x9e5645=>_0x9e5645['length']>0x0&&!_0x9e5645[_0x189572(0x95)]('#'));_0x465838(_0x5136a2);}),setTimeout(()=>_0x465838([]),0x1f4);});return[];}function parseParamsFlag(_0xd7e0b8){const _0x534788=a50_0x10a7;if(!_0xd7e0b8||typeof _0xd7e0b8!=='string')return{};try{const _0x550992=JSON[_0x534788(0x7e)](_0xd7e0b8);if(typeof _0x550992!==_0x534788(0x90)||_0x550992===null||Array[_0x534788(0x89)](_0x550992))return{};return{'selectedLabels':Array[_0x534788(0x89)](_0x550992[_0x534788(0x87)])?_0x550992['pages'][_0x534788(0x7c)](String):undefined,'jsUrl':typeof _0x550992[_0x534788(0xa8)]==='string'?_0x550992['jsUrl']['trim']():undefined,'cssUrl':typeof _0x550992[_0x534788(0x8c)]===_0x534788(0xa2)?_0x550992[_0x534788(0x8c)][_0x534788(0xa5)]():undefined};}catch{return{};}}
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 +1 @@
1
- (function(_0x1c28fe,_0x3c507b){const _0x4289d5=a52_0x2a0b,_0x54af93=_0x1c28fe();while(!![]){try{const _0x3ebee4=parseInt(_0x4289d5(0xb4))/0x1+-parseInt(_0x4289d5(0xb3))/0x2*(parseInt(_0x4289d5(0xa9))/0x3)+-parseInt(_0x4289d5(0xc6))/0x4+parseInt(_0x4289d5(0xc2))/0x5+parseInt(_0x4289d5(0xb2))/0x6+parseInt(_0x4289d5(0xc0))/0x7*(-parseInt(_0x4289d5(0xab))/0x8)+-parseInt(_0x4289d5(0xca))/0x9;if(_0x3ebee4===_0x3c507b)break;else _0x54af93['push'](_0x54af93['shift']());}catch(_0x5ef1ea){_0x54af93['push'](_0x54af93['shift']());}}}(a52_0x4fdb,0xbce9a));import{updateMenuCdnUrl,getOnlineMenuList}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0xb43c1c){const _0x8367e4=a52_0x2a0b,_0x35a8ad=[];return _0xb43c1c[_0x8367e4(0xc4)]&&!isValidJsHttpsUrl(_0xb43c1c['jsUrl'])&&_0x35a8ad['push']({'field':_0x8367e4(0xc4),'message':_0x8367e4(0xba)}),_0xb43c1c['cssUrl']&&!isValidCssHttpsUrl(_0xb43c1c[_0x8367e4(0xaa)])&&_0x35a8ad[_0x8367e4(0xb5)]({'field':_0x8367e4(0xaa),'message':_0x8367e4(0xa7)}),_0x35a8ad;}export async function runMenuUpdateCore(_0x28c342,_0x53076e,_0x648d14){const _0x47ae69=a52_0x2a0b,_0x39cae1=parseUpdateParamsFlag(_0x648d14),_0x2a0b9c=[];if(_0x39cae1['jsUrl'])_0x2a0b9c[_0x47ae69(0xb5)](_0x39cae1[_0x47ae69(0xc4)]);if(_0x39cae1[_0x47ae69(0xaa)])_0x2a0b9c[_0x47ae69(0xb5)](_0x39cae1[_0x47ae69(0xaa)]);const _0x306161=validateParams(_0x39cae1);if(_0x306161[_0x47ae69(0xb9)]>0x0){const _0x33f20e=_0x306161[_0x47ae69(0xc8)](_0x3a73e8=>_0x47ae69(0xbc)+_0x3a73e8[_0x47ae69(0xac)]+':\x20'+_0x3a73e8[_0x47ae69(0xb7)])[_0x47ae69(0xb6)](';\x20');throw new Error(_0x47ae69(0xb8)+_0x33f20e);}logger['setLogPath'](process[_0x47ae69(0xb1)]()),logger['info'](_0x47ae69(0xbd),_0x47ae69(0xbf),{'appCode':_0x28c342,'jsUrl':_0x39cae1['jsUrl'],'cssUrl':_0x39cae1['cssUrl']});if(_0x39cae1['jsUrl']){const _0x34495f=await isUrlReachable(_0x39cae1['jsUrl']);if(!_0x34495f)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x39cae1[_0x47ae69(0xc4)]);}if(_0x39cae1[_0x47ae69(0xaa)]){const _0x1ef389=await isUrlReachable(_0x39cae1['cssUrl']);if(!_0x1ef389)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x39cae1[_0x47ae69(0xaa)]);}const _0x19f738=await getOnlineMenuList(_0x28c342,_0x53076e),_0x28cf78=_0x19f738[_0x47ae69(0xc9)](_0x3b7099=>_0x3b7099[_0x47ae69(0xaf)]['length']>0x0);if(_0x28cf78['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x297844=await Promise['allSettled'](_0x28cf78[_0x47ae69(0xc8)](_0x4022dd=>updateMenuCdnUrl(_0x28c342,_0x53076e,{'id':_0x4022dd['id'],'label':_0x4022dd[_0x47ae69(0xae)],'path':_0x4022dd[_0x47ae69(0xc5)],'resources':_0x2a0b9c}))),_0x4693bf=_0x297844['filter'](_0x333dce=>_0x333dce[_0x47ae69(0xa8)]===_0x47ae69(0xb0))[_0x47ae69(0xb9)];return logger[_0x47ae69(0xa6)](_0x47ae69(0xbd),_0x47ae69(0xc1),{'count':_0x28cf78[_0x47ae69(0xb9)],'resources':_0x2a0b9c}),{'updated':_0x28cf78[_0x47ae69(0xb9)]-_0x4693bf,'failed':_0x4693bf,'skipped':![]};}function a52_0x2a0b(_0x48191b,_0x7a2b48){_0x48191b=_0x48191b-0xa6;const _0x4fdb19=a52_0x4fdb();let _0x2a0b6d=_0x4fdb19[_0x48191b];return _0x2a0b6d;}function a52_0x4fdb(){const _0x35beb4=['isArray','Start\x20non-interactive\x20menu\x20update','4130atQaVY','Menu\x20update\x20completed','6824685BmtEsP','string','jsUrl','path','4549892WHvGZb','object','map','filter','10524024dPZeoP','info','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','status','3fRvojU','cssUrl','744uyitQU','field','parse','label','resources','rejected','cwd','4765104iJKSLm','389478XkYNbw','1171083MJAVdm','push','join','message','Invalid\x20--params:\x20','length','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','trim','--params.','menu-update'];a52_0x4fdb=function(){return _0x35beb4;};return a52_0x4fdb();}function parseUpdateParamsFlag(_0x11af93){const _0x4abf4a=a52_0x2a0b;if(!_0x11af93||typeof _0x11af93!=='string')return{};try{const _0x11c336=JSON[_0x4abf4a(0xad)](_0x11af93);if(typeof _0x11c336!==_0x4abf4a(0xc7)||_0x11c336===null||Array[_0x4abf4a(0xbe)](_0x11c336))return{};return{'jsUrl':typeof _0x11c336[_0x4abf4a(0xc4)]===_0x4abf4a(0xc3)?_0x11c336[_0x4abf4a(0xc4)][_0x4abf4a(0xbb)]():undefined,'cssUrl':typeof _0x11c336[_0x4abf4a(0xaa)]===_0x4abf4a(0xc3)?_0x11c336[_0x4abf4a(0xaa)][_0x4abf4a(0xbb)]():undefined};}catch{return{};}}
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 +1 @@
1
- (function(_0x1f5977,_0x1b39e4){const _0x2e7763=a53_0x28d0,_0x5d31e2=_0x1f5977();while(!![]){try{const _0x351187=-parseInt(_0x2e7763(0x15c))/0x1+parseInt(_0x2e7763(0x159))/0x2*(parseInt(_0x2e7763(0x158))/0x3)+parseInt(_0x2e7763(0x15d))/0x4*(-parseInt(_0x2e7763(0x15e))/0x5)+-parseInt(_0x2e7763(0x161))/0x6+parseInt(_0x2e7763(0x163))/0x7*(-parseInt(_0x2e7763(0x15a))/0x8)+parseInt(_0x2e7763(0x160))/0x9+parseInt(_0x2e7763(0x15b))/0xa;if(_0x351187===_0x1b39e4)break;else _0x5d31e2['push'](_0x5d31e2['shift']());}catch(_0x345a49){_0x5d31e2['push'](_0x5d31e2['shift']());}}}(a53_0x20d0,0x5b9dc));function a53_0x28d0(_0x3d3ea2,_0x2f4350){_0x3d3ea2=_0x3d3ea2-0x158;const _0x20d05e=a53_0x20d0();let _0x28d01c=_0x20d05e[_0x3d3ea2];return _0x28d01c;}export function isValidJsHttpsUrl(_0xc48c63){const _0x20a618=a53_0x28d0;return/^https:\/\/.+\.js(\?.*)?$/[_0x20a618(0x162)](_0xc48c63[_0x20a618(0x15f)]());}export function isValidCssHttpsUrl(_0x5c90dd){const _0x3e98d4=a53_0x28d0;return/^https:\/\/.+\.css(\?.*)?$/[_0x3e98d4(0x162)](_0x5c90dd[_0x3e98d4(0x15f)]());}export async function isUrlReachable(_0x6b6d60){try{const _0x479785=await fetch(_0x6b6d60,{'method':'HEAD'});return _0x479785['ok'];}catch{return![];}}function a53_0x20d0(){const _0x5d2a87=['22290HxlYos','182LNHuLN','172936nELuxf','1842640HRLgCN','172709rWbWyy','16qozMhq','634520phsgqB','trim','6318009NuTadw','2132946CIiyBL','test','49zNYnnk'];a53_0x20d0=function(){return _0x5d2a87;};return a53_0x20d0();}
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 +1 @@
1
- const a54_0x33137a=a54_0x3286;(function(_0x40adc7,_0x56ea4b){const _0x28fcb5=a54_0x3286,_0x49f6bd=_0x40adc7();while(!![]){try{const _0x5a451c=-parseInt(_0x28fcb5(0x1db))/0x1+-parseInt(_0x28fcb5(0x1f5))/0x2+-parseInt(_0x28fcb5(0x1d6))/0x3*(-parseInt(_0x28fcb5(0x1ce))/0x4)+-parseInt(_0x28fcb5(0x1c0))/0x5*(-parseInt(_0x28fcb5(0x1e5))/0x6)+-parseInt(_0x28fcb5(0x1d5))/0x7*(parseInt(_0x28fcb5(0x1d8))/0x8)+parseInt(_0x28fcb5(0x1f1))/0x9+parseInt(_0x28fcb5(0x1e3))/0xa;if(_0x5a451c===_0x56ea4b)break;else _0x49f6bd['push'](_0x49f6bd['shift']());}catch(_0x26b3bc){_0x49f6bd['push'](_0x49f6bd['shift']());}}}(a54_0x42eb,0x40bb0));function a54_0x42eb(){const _0x301521=['2998215CmaRGs','Menu\x20creation\x20failed','validation','pages','202316LYCzPr','log','\x20menu(s)','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','Fetching\x20online\x20menu\x20list...','menu','\x20failed.','117890pZaSem','yes','isArray','✓\x20Menu\x20sync\x20completed:\x20','\x20page(s)','params','\x20menu(s)\x20created','map','string','Creating\x20','\x20menu(s)\x20with\x20JS:\x20','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','flag','trim','2148NGHBBw','\x20menu(s)...','cssUrl','Menu\x20sync\x20completed:\x20','str','sync','localPages','86471xrXtnW','1491mbdpXI','object','144ApzBwB','jsUrl','gray','395295uFqVZR','Online\x20menu\x20list\x20fetched','message','\x20\x20✓\x20Selected:\x20','Created\x20','appCode','failed','created','538270tzUdlY','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','84ebfDNU','onlineMenuList','parse','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','size','length','Failed\x20to\x20fetch\x20online\x20menu\x20list','CANCEL','\x20\x20Create\x20','\x20\x20Cancelled.','cookie','skipped'];a54_0x42eb=function(){return _0x301521;};return a54_0x42eb();}import a54_0x1594cf from'chalk';function a54_0x3286(_0x3777d8,_0x3c0841){_0x3777d8=_0x3777d8-0x1bb;const _0x42ebd7=a54_0x42eb();let _0x328628=_0x42ebd7[_0x3777d8];return _0x328628;}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':a54_0x33137a(0x1be),'command':a54_0x33137a(0x1d3),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':'write','flags':[{'name':a54_0x33137a(0x1c5),'type':a54_0x33137a(0x1c8),'description':a54_0x33137a(0x1e8)+a54_0x33137a(0x1bc)},{'name':'yes','type':'boolean','description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0x41824e){const _0x5d6d93=a54_0x33137a,_0x89537e=_0x41824e[_0x5d6d93(0x1cc)](_0x5d6d93(0x1c1)),_0x5c526d=_0x41824e[_0x5d6d93(0x1d2)](_0x5d6d93(0x1c5)),_0x43fd65=parseParams(_0x5c526d),_0x508539=!!(_0x43fd65['jsUrl']||_0x43fd65[_0x5d6d93(0x1d0)]||_0x43fd65[_0x5d6d93(0x1f4)]&&_0x43fd65[_0x5d6d93(0x1f4)]['length']>0x0);if(_0x89537e||_0x508539){let _0x9ad80f=[];!isInteractive()&&!_0x43fd65[_0x5d6d93(0x1f4)]?.['length']&&(_0x9ad80f=await readPageLabelsFromStdin());const _0x370fae=await runMenuSyncCore(_0x41824e[_0x5d6d93(0x1e0)],_0x41824e[_0x5d6d93(0x1ef)],_0x9ad80f['length']>0x0?_0x9ad80f:_0x43fd65[_0x5d6d93(0x1f4)]??[],_0x5c526d);if(_0x370fae[_0x5d6d93(0x1f0)]){const _0x31f53b=getLocalPages();_0x31f53b[_0x5d6d93(0x1ea)]===0x0?console[_0x5d6d93(0x1f6)](_0x5d6d93(0x1cb)):console[_0x5d6d93(0x1f6)]('✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform');}else console[_0x5d6d93(0x1f6)](_0x5d6d93(0x1c3)+_0x370fae[_0x5d6d93(0x1e2)]+_0x5d6d93(0x1c6));return{'ok':!![]};}requireInteractive();const _0x26dc40=startSpinner(_0x5d6d93(0x1bd));let _0x1c41f1,_0x13d5cf,_0x36ab24;try{const _0x4ba65c=await fetchMenuData(_0x41824e[_0x5d6d93(0x1e0)],_0x41824e[_0x5d6d93(0x1ef)]);_0x1c41f1=_0x4ba65c[_0x5d6d93(0x1d4)],_0x13d5cf=_0x4ba65c['onlinePaths'],_0x36ab24=_0x4ba65c[_0x5d6d93(0x1e6)],stopSpinner(_0x26dc40,_0x5d6d93(0x1dc),!![]);}catch(_0x537281){stopSpinner(_0x26dc40,_0x5d6d93(0x1eb),![]);throw CliErrors['validation'](_0x537281 instanceof Error?_0x537281['message']:_0x5d6d93(0x1eb));}if(_0x1c41f1[_0x5d6d93(0x1ea)]===0x0)return console[_0x5d6d93(0x1f6)](a54_0x1594cf['yellow'](_0x5d6d93(0x1e4))),{'ok':!![]};const _0x35e5b5=buildCompareRows(_0x1c41f1,_0x13d5cf);console['log'](renderCompareTable(_0x35e5b5)),console[_0x5d6d93(0x1f6)]();const _0x3ed0fb=_0x43fd65[_0x5d6d93(0x1f4)],_0x81faf6=await selectPages(_0x1c41f1,_0x13d5cf,_0x3ed0fb);console[_0x5d6d93(0x1f6)](),console[_0x5d6d93(0x1f6)](a54_0x1594cf['cyan'](_0x5d6d93(0x1de)+_0x81faf6['length']+_0x5d6d93(0x1c4)));const _0x2b109c=_0x43fd65[_0x5d6d93(0x1d9)]&&_0x43fd65[_0x5d6d93(0x1d0)];if(!_0x2b109c){console[_0x5d6d93(0x1f6)](renderSyncSummary(_0x81faf6,_0x13d5cf[_0x5d6d93(0x1e9)]>0x0));const _0x5188be=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x5188be)return console[_0x5d6d93(0x1f6)](a54_0x1594cf[_0x5d6d93(0x1da)](_0x5d6d93(0x1ee))),{'ok':!![]};}let _0x2a5cbd=_0x43fd65[_0x5d6d93(0x1d9)],_0x288389=_0x43fd65['cssUrl'];if(!_0x2a5cbd)try{_0x2a5cbd=await askJsUrl();}catch(_0x2cecdd){if(_0x2cecdd[_0x5d6d93(0x1dd)]===_0x5d6d93(0x1ec))return console['log'](a54_0x1594cf[_0x5d6d93(0x1da)](_0x5d6d93(0x1ee))),{'ok':!![]};throw _0x2cecdd;}if(!_0x288389)try{_0x288389=await askCssUrl();}catch(_0x329037){if(_0x329037[_0x5d6d93(0x1dd)]==='CANCEL')return console[_0x5d6d93(0x1f6)](a54_0x1594cf[_0x5d6d93(0x1da)](_0x5d6d93(0x1ee))),{'ok':!![]};throw _0x329037;}const _0x123e9a=await askConfirm(_0x5d6d93(0x1ed)+_0x81faf6[_0x5d6d93(0x1ea)]+_0x5d6d93(0x1ca)+_0x2a5cbd+'\x20and\x20CSS:\x20'+_0x288389+'?');if(!_0x123e9a)return console[_0x5d6d93(0x1f6)](a54_0x1594cf[_0x5d6d93(0x1da)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x5f16ca=[_0x2a5cbd,_0x288389],_0x5d0301=startSpinner(_0x5d6d93(0x1c9)+_0x81faf6[_0x5d6d93(0x1ea)]+_0x5d6d93(0x1cf));try{const _0x510528=await doCreateMenus(_0x41824e[_0x5d6d93(0x1e0)],_0x41824e['cookie'],_0x81faf6,_0x5f16ca);return stopSpinner(_0x5d0301,_0x5d6d93(0x1df)+_0x510528[_0x5d6d93(0x1e2)]+_0x5d6d93(0x1bb),!![]),{'ok':!![],'data':_0x510528,'message':_0x5d6d93(0x1d1)+_0x510528['created']+'\x20created,\x20'+_0x510528[_0x5d6d93(0x1e1)]+_0x5d6d93(0x1bf)};}catch(_0x193ecc){stopSpinner(_0x5d0301,_0x5d6d93(0x1f2),![]);throw CliErrors[_0x5d6d93(0x1f3)](_0x193ecc instanceof Error?_0x193ecc['message']:'Menu\x20creation\x20failed');}}};function parseParams(_0x1f2296){const _0x2577a6=a54_0x33137a;if(!_0x1f2296)return{};try{const _0x274866=JSON[_0x2577a6(0x1e7)](_0x1f2296);if(typeof _0x274866!==_0x2577a6(0x1d7)||_0x274866===null||Array['isArray'](_0x274866))return{};return{'jsUrl':typeof _0x274866[_0x2577a6(0x1d9)]==='string'?_0x274866[_0x2577a6(0x1d9)][_0x2577a6(0x1cd)]():undefined,'cssUrl':typeof _0x274866[_0x2577a6(0x1d0)]==='string'?_0x274866[_0x2577a6(0x1d0)][_0x2577a6(0x1cd)]():undefined,'pages':Array[_0x2577a6(0x1c2)](_0x274866[_0x2577a6(0x1f4)])?_0x274866[_0x2577a6(0x1f4)][_0x2577a6(0x1c7)](String):undefined};}catch{return{};}}
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 +1 @@
1
- function a55_0x27d0(){const _0x29d069=['Menu\x20update\x20completed:\x20','trim','CANCEL','26469010gDPYLc','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','\x20updated,\x20','1718133gElSih','35576wrRxaM','error','\x20menu(s)\x20failed','\x20menu(s)...','\x20menu(s)','object','Fetching\x20online\x20menu\x20list...','yes','isArray','params','\x20failed.','\x20menu(s)\x20updated','\x20\x20Cancelled.','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','8403588ZCitEa','boolean','length','4088695RfLoBe','string','yellow','cssUrl','\x20and\x20CSS:\x20','gray','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','Menu\x20update\x20failed','Failed\x20to\x20fetch\x20online\x20menu\x20list','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','329NHFpVc','message','jsUrl','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation','log','cookie','cyan','4502iSppGS','\x20menu(s)\x20with\x20existing\x20resources','updated','159lPQceu','\x20menu(s)\x20with\x20JS:\x20','\x20\x20Found\x20','appCode','✓\x20Menu\x20update\x20completed:\x20','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','write','menu','Updated\x20','str','8GCOBOF','Online\x20menu\x20list\x20fetched','flag','Updating\x20','\x20updated.','label','map','validation','5000760JLoSIo','11titxot','failed'];a55_0x27d0=function(){return _0x29d069;};return a55_0x27d0();}const a55_0x2eebbc=a55_0xb2ac;(function(_0x4d615a,_0x5b0676){const _0x53446e=a55_0xb2ac,_0x21b1c0=_0x4d615a();while(!![]){try{const _0x4e3b26=parseInt(_0x53446e(0x179))/0x1*(-parseInt(_0x53446e(0x176))/0x2)+parseInt(_0x53446e(0x194))/0x3*(-parseInt(_0x53446e(0x183))/0x4)+-parseInt(_0x53446e(0x165))/0x5+-parseInt(_0x53446e(0x18b))/0x6+parseInt(_0x53446e(0x16f))/0x7*(parseInt(_0x53446e(0x195))/0x8)+parseInt(_0x53446e(0x162))/0x9+parseInt(_0x53446e(0x191))/0xa*(parseInt(_0x53446e(0x18c))/0xb);if(_0x4e3b26===_0x5b0676)break;else _0x21b1c0['push'](_0x21b1c0['shift']());}catch(_0x489a1e){_0x21b1c0['push'](_0x21b1c0['shift']());}}}(a55_0x27d0,0x9b0e8));import a55_0x4d96e8 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'./shared/logic.js';import{renderUpdateSummary}from'./shared/compare-table.js';function a55_0xb2ac(_0x5d040a,_0x1df71b){_0x5d040a=_0x5d040a-0x159;const _0x27d01c=a55_0x27d0();let _0xb2acce=_0x27d01c[_0x5d040a];return _0xb2acce;}import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'./shared/inquirer.js';import{CliErrors}from'../../errors.js';import{runMenuUpdateCore}from'./shared/update-core.js';export const menuUpdate={'service':a55_0x2eebbc(0x180),'command':'update','description':a55_0x2eebbc(0x16e),'risk':a55_0x2eebbc(0x17f),'flags':[{'name':a55_0x2eebbc(0x15d),'type':a55_0x2eebbc(0x166),'description':a55_0x2eebbc(0x16b)+a55_0x2eebbc(0x192)},{'name':a55_0x2eebbc(0x15b),'type':a55_0x2eebbc(0x163),'description':a55_0x2eebbc(0x172)}],async 'execute'(_0x536694){const _0x41c94d=a55_0x2eebbc,_0x32eec0=_0x536694[_0x41c94d(0x185)](_0x41c94d(0x15b)),_0x4310f3=_0x536694[_0x41c94d(0x182)](_0x41c94d(0x15d)),_0x416a4d=parseParams(_0x4310f3),_0x4ccb26=!!(_0x416a4d[_0x41c94d(0x171)]||_0x416a4d[_0x41c94d(0x168)]);if(_0x32eec0||_0x4ccb26&&!isInteractive()){const _0x2d4715=await runMenuUpdateCore(_0x536694[_0x41c94d(0x17c)],_0x536694[_0x41c94d(0x174)],_0x4310f3);return _0x2d4715['skipped']?console[_0x41c94d(0x173)](_0x41c94d(0x161)):(console[_0x41c94d(0x173)](_0x41c94d(0x17d)+_0x2d4715[_0x41c94d(0x178)]+_0x41c94d(0x15f)),_0x2d4715[_0x41c94d(0x18d)]>0x0&&console[_0x41c94d(0x196)]('!\x20'+_0x2d4715[_0x41c94d(0x18d)]+_0x41c94d(0x197))),{'ok':_0x2d4715['failed']===0x0};}requireInteractive();const _0x5bae59=startSpinner(_0x41c94d(0x15a));let _0x111450;try{_0x111450=await fetchOnlineMenuList(_0x536694['appCode'],_0x536694[_0x41c94d(0x174)]),stopSpinner(_0x5bae59,_0x41c94d(0x184),!![]);}catch(_0x505f7e){stopSpinner(_0x5bae59,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors['validation'](_0x505f7e instanceof Error?_0x505f7e['message']:_0x41c94d(0x16d));}const _0x2fe05b=filterMenusWithResources(_0x111450);if(_0x2fe05b[_0x41c94d(0x164)]===0x0)return console[_0x41c94d(0x173)](a55_0x4d96e8[_0x41c94d(0x167)](_0x41c94d(0x17e))),{'ok':!![]};console[_0x41c94d(0x173)](),console[_0x41c94d(0x173)](a55_0x4d96e8[_0x41c94d(0x175)](_0x41c94d(0x17b)+_0x2fe05b[_0x41c94d(0x164)]+_0x41c94d(0x177))),console['log'](renderUpdateSummary(_0x2fe05b[_0x41c94d(0x189)](_0x56ffda=>_0x56ffda[_0x41c94d(0x188)]),[_0x416a4d[_0x41c94d(0x171)],_0x416a4d[_0x41c94d(0x168)]])),console[_0x41c94d(0x173)]();let _0x45ec96=_0x416a4d['jsUrl'],_0x1979bd=_0x416a4d[_0x41c94d(0x168)];if(!_0x45ec96)try{_0x45ec96=await askJsUrl();}catch(_0x27cd0d){if(_0x27cd0d['message']===_0x41c94d(0x190))return console[_0x41c94d(0x173)](a55_0x4d96e8['gray'](_0x41c94d(0x160))),{'ok':!![]};throw _0x27cd0d;}if(!_0x1979bd)try{_0x1979bd=await askCssUrl();}catch(_0x43cb41){if(_0x43cb41[_0x41c94d(0x170)]===_0x41c94d(0x190))return console[_0x41c94d(0x173)](a55_0x4d96e8[_0x41c94d(0x16a)](_0x41c94d(0x160))),{'ok':!![]};throw _0x43cb41;}const _0x42e8ac=await askConfirm('\x20\x20Update\x20'+_0x2fe05b[_0x41c94d(0x164)]+_0x41c94d(0x17a)+_0x45ec96+_0x41c94d(0x169)+_0x1979bd+'?');if(!_0x42e8ac)return console[_0x41c94d(0x173)](a55_0x4d96e8[_0x41c94d(0x16a)]('\x20\x20Cancelled.')),{'ok':!![]};const _0x17d175=[_0x45ec96,_0x1979bd],_0x48bd87=startSpinner(_0x41c94d(0x186)+_0x2fe05b[_0x41c94d(0x164)]+_0x41c94d(0x198));try{const _0x3fa3b1=await doUpdateCdnUrls(_0x536694[_0x41c94d(0x17c)],_0x536694[_0x41c94d(0x174)],_0x2fe05b,_0x17d175);return stopSpinner(_0x48bd87,_0x41c94d(0x181)+_0x3fa3b1[_0x41c94d(0x178)]+_0x41c94d(0x199),_0x3fa3b1['failed']===0x0),{'ok':_0x3fa3b1['failed']===0x0,'data':_0x3fa3b1,'message':_0x3fa3b1[_0x41c94d(0x18d)]>0x0?_0x41c94d(0x18e)+_0x3fa3b1[_0x41c94d(0x178)]+_0x41c94d(0x193)+_0x3fa3b1[_0x41c94d(0x18d)]+_0x41c94d(0x15e):'Menu\x20update\x20completed:\x20'+_0x3fa3b1[_0x41c94d(0x178)]+_0x41c94d(0x187)};}catch(_0x126399){stopSpinner(_0x48bd87,_0x41c94d(0x16c),![]);throw CliErrors[_0x41c94d(0x18a)](_0x126399 instanceof Error?_0x126399[_0x41c94d(0x170)]:_0x41c94d(0x16c));}}};function parseParams(_0x1d80ff){const _0xb1df18=a55_0x2eebbc;if(!_0x1d80ff)return{};try{const _0x367473=JSON['parse'](_0x1d80ff);if(typeof _0x367473!==_0xb1df18(0x159)||_0x367473===null||Array[_0xb1df18(0x15c)](_0x367473))return{};return{'jsUrl':typeof _0x367473['jsUrl']===_0xb1df18(0x166)?_0x367473[_0xb1df18(0x171)][_0xb1df18(0x18f)]():undefined,'cssUrl':typeof _0x367473['cssUrl']==='string'?_0x367473[_0xb1df18(0x168)][_0xb1df18(0x18f)]():undefined};}catch{return{};}}
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 +1 @@
1
- const a56_0x35e4eb=a56_0xecdf;(function(_0x34e9e6,_0x3c391f){const _0x2df560=a56_0xecdf,_0x327a8a=_0x34e9e6();while(!![]){try{const _0x5ba86d=-parseInt(_0x2df560(0xdb))/0x1+-parseInt(_0x2df560(0xf8))/0x2*(parseInt(_0x2df560(0xfc))/0x3)+-parseInt(_0x2df560(0xeb))/0x4*(-parseInt(_0x2df560(0xf4))/0x5)+-parseInt(_0x2df560(0xdf))/0x6+-parseInt(_0x2df560(0xf9))/0x7*(parseInt(_0x2df560(0xfd))/0x8)+parseInt(_0x2df560(0xfe))/0x9+parseInt(_0x2df560(0xe5))/0xa;if(_0x5ba86d===_0x3c391f)break;else _0x327a8a['push'](_0x327a8a['shift']());}catch(_0xe1f5e7){_0x327a8a['push'](_0x327a8a['shift']());}}}(a56_0x5bb9,0xa3e12));function a56_0xecdf(_0x176db3,_0x2568f6){_0x176db3=_0x176db3-0xd8;const _0x5bb923=a56_0x5bb9();let _0xecdfe=_0x5bb923[_0x176db3];return _0xecdfe;}import{delimiter,join}from'node:path';function a56_0x5bb9(){const _0x459c2e=['48604EXvTIQ','预览服务器启动成功','error','vite\x20preview\x20exited\x20with\x20code\x20','watch','vite\x20preview','启动预览服务器','env','all','35oqnVgL','pipe','now','\x20(监听模式)','953774PdfIbL','249746whqgrc','data','success','3VBmQSF','248UcQLBO','2733156QTfnwa','logger','build','cwd','347854CNLZMa','trim','preview','vite','603858XszWUF','close','PATH','info','执行预览命令','node_modules','23139110VhqvDy','.bin','Preview\x20project','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','message','inherit'];a56_0x5bb9=function(){return _0x459c2e;};return a56_0x5bb9();}import{spawn}from'node:child_process';function runPreview(_0x57c959){return new Promise((_0x31b85c,_0x233efe)=>{const _0x1a6db7=a56_0xecdf,_0x20bd63=Date[_0x1a6db7(0xf6)]();_0x57c959[_0x1a6db7(0xd8)][_0x1a6db7(0xe2)](_0x1a6db7(0xdd),_0x1a6db7(0xf1),{'command':_0x1a6db7(0xf0)});let _0x3c031a='';const _0x56e121=spawn(_0x1a6db7(0xde),[_0x1a6db7(0xdd)],{'stdio':['inherit',_0x1a6db7(0xea),_0x1a6db7(0xf5)],'shell':!![],'env':{...process[_0x1a6db7(0xf2)],'PATH':''+join(process[_0x1a6db7(0xda)](),_0x1a6db7(0xe4),_0x1a6db7(0xe6))+delimiter+process[_0x1a6db7(0xf2)][_0x1a6db7(0xe1)]}});_0x56e121['stderr']?.['on'](_0x1a6db7(0xfa),_0x2f46e8=>{_0x3c031a+=_0x2f46e8['toString']();}),_0x56e121['on']('close',_0x17251a=>{const _0x18c688=_0x1a6db7,_0x2089fa=Date[_0x18c688(0xf6)]()-_0x20bd63;if(_0x17251a===0x0||_0x17251a===null)_0x57c959['logger'][_0x18c688(0xfb)]('preview',_0x18c688(0xec),_0x2089fa),_0x31b85c();else{const _0x3a7a92={'exitCode':_0x17251a,'duration':_0x2089fa,'command':_0x18c688(0xf0),'cwd':process[_0x18c688(0xda)]()};_0x3c031a['trim']()&&(_0x3a7a92['stderr']=_0x3c031a[_0x18c688(0xdc)]()),_0x57c959[_0x18c688(0xd8)]['error']('preview','预览服务器启动失败',_0x3a7a92),_0x233efe(new Error(_0x18c688(0xee)+_0x17251a));}}),_0x56e121['on'](_0x1a6db7(0xed),_0xb358dc=>{const _0x4db094=_0x1a6db7,_0x259cd3=Date[_0x4db094(0xf6)]()-_0x20bd63;_0x57c959['logger'][_0x4db094(0xed)](_0x4db094(0xdd),'预览服务器启动出错',{'error':_0xb358dc[_0x4db094(0xe9)],'duration':_0x259cd3,'stderr':_0x3c031a[_0x4db094(0xdc)]()||undefined}),_0x233efe(_0xb358dc);});});}function runBuildWatch(){return new Promise((_0x339508,_0x5c540e)=>{const _0x1bfe47=a56_0xecdf,_0x432fd6=spawn('vite',[_0x1bfe47(0xd9),'--watch'],{'stdio':_0x1bfe47(0xea),'shell':!![],'env':{...process[_0x1bfe47(0xf2)],'PATH':''+join(process[_0x1bfe47(0xda)](),'node_modules',_0x1bfe47(0xe6))+delimiter+process[_0x1bfe47(0xf2)][_0x1bfe47(0xe1)]}});_0x432fd6['on'](_0x1bfe47(0xe0),_0x5e5a85=>{const _0x5edabd=_0x1bfe47;if(_0x5e5a85===0x0||_0x5e5a85===null)_0x339508();else _0x5c540e(new Error(_0x5edabd(0xe8)+_0x5e5a85));}),_0x432fd6['on'](_0x1bfe47(0xed),_0x5c540e);});}export const previewCommand={'name':a56_0x35e4eb(0xdd),'description':a56_0x35e4eb(0xe7),async 'run'(_0x40b1f6,_0x59d9e6,_0x39e903){const _0x5d8dbe=a56_0x35e4eb,_0x5af001=_0x39e903[_0x5d8dbe(0xef)];_0x40b1f6[_0x5d8dbe(0xd8)][_0x5d8dbe(0xe2)](_0x5d8dbe(0xdd),_0x5d8dbe(0xe3)+(_0x5af001?_0x5d8dbe(0xf7):'')),_0x5af001?await Promise[_0x5d8dbe(0xf3)]([runBuildWatch(),runPreview(_0x40b1f6)]):await runPreview(_0x40b1f6);}};
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);}};
@@ -0,0 +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 +1 @@
1
- const a57_0x53c419=a57_0x5f18;function a57_0x5f18(_0x189366,_0x53f71b){_0x189366=_0x189366-0x140;const _0x554770=a57_0x5547();let _0x5f1887=_0x554770[_0x189366];return _0x5f1887;}(function(_0x346e54,_0x514b59){const _0x291d1c=a57_0x5f18,_0x14e30b=_0x346e54();while(!![]){try{const _0x20cc25=parseInt(_0x291d1c(0x153))/0x1*(parseInt(_0x291d1c(0x162))/0x2)+parseInt(_0x291d1c(0x172))/0x3+-parseInt(_0x291d1c(0x156))/0x4*(-parseInt(_0x291d1c(0x146))/0x5)+-parseInt(_0x291d1c(0x16a))/0x6+parseInt(_0x291d1c(0x180))/0x7+-parseInt(_0x291d1c(0x14e))/0x8*(-parseInt(_0x291d1c(0x15f))/0x9)+-parseInt(_0x291d1c(0x144))/0xa;if(_0x20cc25===_0x514b59)break;else _0x14e30b['push'](_0x14e30b['shift']());}catch(_0x4b1283){_0x14e30b['push'](_0x14e30b['shift']());}}}(a57_0x5547,0x78b74));import{initCommand}from'./init.js';import{createCommand}from'./create.js';import{runCommand}from'./run.js';import{authCommand}from'./auth.js';import{logoutCommand}from'./logout.js';import{configCommand}from'./config.js';import{mcpCommand}from'./mcp.js';import{skillCommand}from'./skill.js';import{logsCommand}from'./logs.js';import{appCommand}from'./app.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(_0xd868dc){const _0x19e2ae=a57_0x5f18;for(const _0x5ebee7 of _0xd868dc){definitions[_0x19e2ae(0x177)](_0x5ebee7[_0x19e2ae(0x167)]+':'+_0x5ebee7['command'],_0x5ebee7);let _0x312514=serviceGroups['get'](_0x5ebee7[_0x19e2ae(0x167)]);!_0x312514&&(_0x312514=[],serviceGroups[_0x19e2ae(0x177)](_0x5ebee7['service'],_0x312514)),_0x312514[_0x19e2ae(0x17a)](_0x5ebee7);}}function registerDeclarativeService(_0x2a2ded,_0x1ebe26){const _0x3b2f89=a57_0x5f18;registerDefinitions(_0x1ebe26);const _0x3bac93=_0x2671c2=>_0x2671c2===_0x3b2f89(0x148)?'':_0x2671c2===_0x3b2f89(0x157)?_0x3b2f89(0x160):_0x3b2f89(0x15e),_0x18341b={'service':_0x1ebe26[0x0][_0x3b2f89(0x167)],'label':_0x2a2ded,'commands':_0x1ebe26[_0x3b2f89(0x149)](_0x2f4b25=>({'command':_0x2f4b25[_0x3b2f89(0x15b)],'description':_0x2f4b25[_0x3b2f89(0x14d)],'tag':_0x3bac93(_0x2f4b25[_0x3b2f89(0x175)])})),'declarative':!![]};serviceRegistry['push'](_0x18341b),serviceByName[_0x3b2f89(0x177)](_0x18341b[_0x3b2f89(0x167)],_0x18341b);}function registerLegacyService(_0x574f6b,_0x4120f5,_0x328f2d,_0x168c3b){const _0x5004a8=a57_0x5f18,_0x13364d={'service':_0x574f6b,'label':_0x4120f5,'commands':_0x328f2d[_0x5004a8(0x149)](_0x12a31d=>({'command':_0x12a31d['command'],'description':_0x12a31d[_0x5004a8(0x14d)],'tag':''})),'declarative':![],'defaultCommand':_0x168c3b?.[_0x5004a8(0x16b)],'wildcardModule':_0x168c3b?.[_0x5004a8(0x170)]};serviceRegistry['push'](_0x13364d),serviceByName[_0x5004a8(0x177)](_0x574f6b,_0x13364d);for(const _0x3ec716 of _0x328f2d){legacyHandlers['set'](_0x574f6b+':'+_0x3ec716['command'],{'module':_0x3ec716[_0x5004a8(0x17f)],'passCommandAsArg':_0x3ec716['passCommandAsArg']});}}registerLegacyService('project',a57_0x53c419(0x15c),[{'command':a57_0x53c419(0x173),'description':'Initialize\x20.rabetbase.json\x20config','module':initCommand},{'command':a57_0x53c419(0x152),'description':a57_0x53c419(0x168),'module':createCommand}]),registerLegacyService(a57_0x53c419(0x140),a57_0x53c419(0x179),[{'command':a57_0x53c419(0x16c),'description':a57_0x53c419(0x17b),'module':appCommand,'passCommandAsArg':!![]},{'command':a57_0x53c419(0x154),'description':a57_0x53c419(0x17c),'module':appCommand,'passCommandAsArg':!![]},{'command':a57_0x53c419(0x143),'description':a57_0x53c419(0x142),'module':appCommand,'passCommandAsArg':!![]},{'command':a57_0x53c419(0x178),'description':'Remove\x20an\x20app\x20from\x20config','module':appCommand,'passCommandAsArg':!![]}],{'defaultCommand':a57_0x53c419(0x16c)}),registerLegacyService(a57_0x53c419(0x16d),'Run\x20Scripts',[{'command':a57_0x53c419(0x14b),'description':a57_0x53c419(0x176),'module':runCommand}],{'wildcardModule':runCommand}),registerLegacyService(a57_0x53c419(0x164),a57_0x53c419(0x174),[{'command':a57_0x53c419(0x166),'description':'Login\x20via\x20browser','module':authCommand},{'command':'logout','description':'Clear\x20login\x20session','module':logoutCommand}],{'defaultCommand':a57_0x53c419(0x166)}),registerLegacyService(a57_0x53c419(0x161),a57_0x53c419(0x16f),[{'command':a57_0x53c419(0x177),'description':'Set\x20config\x20value\x20(key\x20value)','module':configCommand,'passCommandAsArg':!![]}]),registerDeclarativeService(a57_0x53c419(0x155),apiDefinitions),registerDeclarativeService('Menu',menuDefinitions),registerDeclarativeService(a57_0x53c419(0x171),datasetDefinitions),registerDeclarativeService(a57_0x53c419(0x15d),bffDefinitions),registerDeclarativeService('SQL\x20Queries',sqlDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerLegacyService(a57_0x53c419(0x14f),a57_0x53c419(0x141),[{'command':a57_0x53c419(0x145),'description':a57_0x53c419(0x15a),'module':mcpCommand,'passCommandAsArg':!![]}]),registerLegacyService(a57_0x53c419(0x158),'Skills',[{'command':a57_0x53c419(0x145),'description':a57_0x53c419(0x163),'module':skillCommand,'passCommandAsArg':!![]}]),registerLegacyService(a57_0x53c419(0x147),a57_0x53c419(0x151),[{'command':a57_0x53c419(0x16e),'description':a57_0x53c419(0x169),'module':logsCommand},{'command':a57_0x53c419(0x159),'description':a57_0x53c419(0x17e),'module':logsCommand,'passCommandAsArg':!![]}],{'defaultCommand':a57_0x53c419(0x16e)});export const deprecatedAliases={'init':{'service':a57_0x53c419(0x150),'command':a57_0x53c419(0x173)},'create':{'service':a57_0x53c419(0x150),'command':a57_0x53c419(0x152)},'start':{'service':'run','command':'start'},'build':{'service':a57_0x53c419(0x16d),'command':a57_0x53c419(0x14c)},'preview':{'service':a57_0x53c419(0x16d),'command':'preview'},'logout':{'service':a57_0x53c419(0x164),'command':'logout'},'skills':{'service':a57_0x53c419(0x158),'command':'install'}};export function findDefinition(_0x3421c4,_0x42f925){return definitions['get'](_0x3421c4+':'+_0x42f925);}export function isKnownService(_0x554165){const _0x192811=a57_0x53c419;return serviceByName[_0x192811(0x181)](_0x554165);}function a57_0x5547(){const _0x9b2f54=['1302895GoTNQB','logs','read','map','values','<script>','build','description','72TEjWOh','mcp','project','Logs','create','1RNrkRy','use','API','8vHtxgK','write','skill','clear','Configure\x20MCP\x20server\x20for\x20AI\x20tools','command','Project','BFF\x20Scripts','\x20\x20[high-risk-write]','907191mxARwr','\x20\x20[write]','config','1496204CXRAAh','Install\x20developer\x20skill\x20package','auth','from','login','service','Create\x20a\x20new\x20project','View\x20command\x20history\x20logs','820302lNCCEM','defaultCommand','list','run','show','Configuration','wildcardModule','Dataset\x20&\x20Operations','1779093oCkvUU','init','Authentication','risk','Run\x20any\x20package.json\x20script','set','remove','App\x20Management','push','List\x20all\x20configured\x20apps','Switch\x20the\x20default\x20app','get','Clear\x20command\x20history\x20logs','module','6102397VluAid','has','app','MCP\x20(AI\x20Tools)','Add\x20an\x20app\x20to\x20config','add','30100840ErFiNL','install'];a57_0x5547=function(){return _0x9b2f54;};return a57_0x5547();}export function isDeclarativeService(_0x192655){const _0xfe4f5a=a57_0x53c419;return serviceGroups[_0xfe4f5a(0x181)](_0x192655);}export function getServiceEntry(_0x58c877){const _0x3d6325=a57_0x53c419;return serviceByName[_0x3d6325(0x17d)](_0x58c877);}export function getLegacyHandler(_0x3b65c5,_0x124218){const _0x5d4c1b=a57_0x53c419;return legacyHandlers[_0x5d4c1b(0x17d)](_0x3b65c5+':'+_0x124218);}export function getAllDefinitions(){const _0x406b68=a57_0x53c419;return Array[_0x406b68(0x165)](definitions[_0x406b68(0x14a)]());}
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 +1 @@
1
- const a58_0x16d274=a58_0x236c;(function(_0x38d94f,_0x4c96a4){const _0x264955=a58_0x236c,_0x37e267=_0x38d94f();while(!![]){try{const _0x496cfb=parseInt(_0x264955(0x1b7))/0x1+parseInt(_0x264955(0x1f1))/0x2+parseInt(_0x264955(0x1e8))/0x3*(-parseInt(_0x264955(0x1f0))/0x4)+parseInt(_0x264955(0x1c9))/0x5+parseInt(_0x264955(0x1c8))/0x6*(parseInt(_0x264955(0x1cd))/0x7)+parseInt(_0x264955(0x1bd))/0x8+parseInt(_0x264955(0x1e2))/0x9*(-parseInt(_0x264955(0x1bc))/0xa);if(_0x496cfb===_0x4c96a4)break;else _0x37e267['push'](_0x37e267['shift']());}catch(_0x2f85b5){_0x37e267['push'](_0x37e267['shift']());}}}(a58_0x495e,0xb71ed));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';const VERSION_CHECK_SCRIPTS=new Set([a58_0x16d274(0x1dd),'dev']);function readPackageScripts(_0xc42130){const _0x3aed54=a58_0x16d274,_0x4165cf=resolve(_0xc42130,_0x3aed54(0x1d0));if(!existsSync(_0x4165cf))return null;try{const _0x1ec429=JSON[_0x3aed54(0x1e1)](readFileSync(_0x4165cf,_0x3aed54(0x1c4)));return _0x1ec429[_0x3aed54(0x1b8)]??{};}catch{return null;}}function detectPackageManager(_0x530539){const _0x633513=a58_0x16d274;if(existsSync(resolve(_0x530539,_0x633513(0x1d9)))||existsSync(resolve(_0x530539,'bun.lock')))return _0x633513(0x1d6);if(existsSync(resolve(_0x530539,_0x633513(0x1dc))))return _0x633513(0x1da);if(existsSync(resolve(_0x530539,'yarn.lock')))return _0x633513(0x1be);return _0x633513(0x1ed);}async function versionCheck(_0x52b865){const _0x587cd9=a58_0x16d274,_0x3bed1e=await checkCliVersion();if(_0x3bed1e['needsUpgrade'])printCliUpgradeWarning(_0x3bed1e);const _0x3acc25=await checkSdkVersion(_0x52b865);if(_0x3acc25[_0x587cd9(0x1d4)])printSdkUpgradeWarning(_0x3acc25);}function spawnScript(_0x42329b,_0x46ee3f,_0x49351f,_0x255eea){return new Promise((_0x5522b2,_0x5b7962)=>{const _0x30d6c7=a58_0x236c,_0x39f046=['run',_0x46ee3f,..._0x49351f],_0x34b1aa=spawn(_0x42329b,_0x39f046,{'cwd':_0x255eea,'stdio':_0x30d6c7(0x1e3),'shell':!![],'env':{...process[_0x30d6c7(0x1c2)],'PATH':''+join(_0x255eea,'node_modules',_0x30d6c7(0x1b5))+delimiter+process[_0x30d6c7(0x1c2)][_0x30d6c7(0x1ce)]}});_0x34b1aa['on'](_0x30d6c7(0x1b6),_0xb06eb5=>{if(_0xb06eb5===0x0||_0xb06eb5===null)_0x5522b2();else _0x5b7962(new Error(_0x42329b+'\x20run\x20'+_0x46ee3f+'\x20exited\x20with\x20code\x20'+_0xb06eb5));}),_0x34b1aa['on'](_0x30d6c7(0x1c1),_0x5b7962);});}function a58_0x236c(_0x7e3df2,_0xbc67c){_0x7e3df2=_0x7e3df2-0x1b4;const _0x495edd=a58_0x495e();let _0x236c9b=_0x495edd[_0x7e3df2];return _0x236c9b;}function spawnViteBuildWatch(_0x17ca6c){return new Promise((_0x75625a,_0x4032a0)=>{const _0x2651b1=a58_0x236c,_0x20a447=spawn(_0x2651b1(0x1c6),[_0x2651b1(0x1db),_0x2651b1(0x1e7)],{'cwd':_0x17ca6c,'stdio':'inherit','shell':!![],'env':{...process[_0x2651b1(0x1c2)],'PATH':''+join(_0x17ca6c,_0x2651b1(0x1de),_0x2651b1(0x1b5))+delimiter+process[_0x2651b1(0x1c2)][_0x2651b1(0x1ce)]}});_0x20a447['on']('close',_0x42cbef=>{const _0x424dee=_0x2651b1;if(_0x42cbef===0x0||_0x42cbef===null)_0x75625a();else _0x4032a0(new Error(_0x424dee(0x1bb)+_0x42cbef));}),_0x20a447['on'](_0x2651b1(0x1c1),_0x4032a0);});}function a58_0x495e(){const _0x52c389=['bun.lockb','pnpm','build','pnpm-lock.yaml','start','node_modules','\x0a\x20\x20Usage:\x20rabetbase\x20run\x20<script>\x0a','No\x20scripts\x20defined\x20in\x20package.json.','parse','23351337vfLtMS','inherit','\x0a\x20\x20Available\x20scripts:\x0a','exit','padEnd','--watch','31278mCZcoy','Error:\x20Script\x20\x22','entries','vite\x20preview\x20exited\x20with\x20code\x20','Error:\x20No\x20package.json\x20found\x20in\x20current\x20directory.','npm','\x20run\x20','has','4aQPEAa','655342eDQjQk','preview','Run\x20a\x20package.json\x20script','run','.bin','close','810458DTHubt','scripts','\x20\x20\x20\x20','map','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','10qjbAZd','6751048NlLAAz','yarn','slice','info','error','env','max','utf-8','all','vite','log','1568622TlkQjz','329425pSEsDs','(none)','cwd','watch','35LUjWly','PATH','logger','package.json','length','keys','\x22\x20not\x20found\x20in\x20package.json.\x0a','needsUpgrade','join','bun','\x20\x20Available:\x20','preview\x20--watch\x20mode:\x20vite\x20build\x20--watch\x20+\x20vite\x20preview'];a58_0x495e=function(){return _0x52c389;};return a58_0x495e();}function spawnVitePreview(_0x45bdc5){return new Promise((_0xb2c2de,_0x362f15)=>{const _0x30f21d=a58_0x236c,_0xf354f8=spawn(_0x30f21d(0x1c6),[_0x30f21d(0x1f2)],{'cwd':_0x45bdc5,'stdio':_0x30f21d(0x1e3),'shell':!![],'env':{...process['env'],'PATH':''+join(_0x45bdc5,'node_modules',_0x30f21d(0x1b5))+delimiter+process['env']['PATH']}});_0xf354f8['on'](_0x30f21d(0x1b6),_0x168e96=>{const _0x3c95e3=_0x30f21d;if(_0x168e96===0x0||_0x168e96===null)_0xb2c2de();else _0x362f15(new Error(_0x3c95e3(0x1eb)+_0x168e96));}),_0xf354f8['on'](_0x30f21d(0x1c1),_0x362f15);});}export const runCommand={'name':a58_0x16d274(0x1b4),'description':a58_0x16d274(0x1f3),async 'run'(_0x35d41c,_0x5152f7,_0x4c48e6){const _0x3424b9=a58_0x16d274,_0x406520=process[_0x3424b9(0x1cb)](),_0x13e41d=_0x5152f7[0x0],_0x464070=_0x5152f7[_0x3424b9(0x1bf)](0x1),_0x2025f1=readPackageScripts(_0x406520);!_0x2025f1&&(console[_0x3424b9(0x1c1)](_0x3424b9(0x1ec)),process[_0x3424b9(0x1e5)](0x1));if(!_0x13e41d){const _0x46bace=Object[_0x3424b9(0x1d2)](_0x2025f1);if(_0x46bace['length']===0x0)console[_0x3424b9(0x1c7)](_0x3424b9(0x1e0));else{console[_0x3424b9(0x1c7)](_0x3424b9(0x1e4));const _0x127f1b=Math[_0x3424b9(0x1c3)](..._0x46bace[_0x3424b9(0x1ba)](_0x3122aa=>_0x3122aa[_0x3424b9(0x1d1)]));for(const [_0x38d16c,_0x1caf52]of Object[_0x3424b9(0x1ea)](_0x2025f1)){console[_0x3424b9(0x1c7)](_0x3424b9(0x1b9)+_0x38d16c[_0x3424b9(0x1e6)](_0x127f1b+0x2)+_0x1caf52);}console[_0x3424b9(0x1c7)](_0x3424b9(0x1df));}return;}!_0x2025f1[_0x13e41d]&&(console[_0x3424b9(0x1c1)](_0x3424b9(0x1e9)+_0x13e41d+_0x3424b9(0x1d3)+(_0x3424b9(0x1d7)+(Object[_0x3424b9(0x1d2)](_0x2025f1)[_0x3424b9(0x1d5)](',\x20')||_0x3424b9(0x1ca)))),process['exit'](0x1));const _0x2bcd56=detectPackageManager(_0x406520);VERSION_CHECK_SCRIPTS[_0x3424b9(0x1ef)](_0x13e41d)&&await versionCheck(_0x406520);if(_0x13e41d==='preview'&&_0x4c48e6[_0x3424b9(0x1cc)]){_0x35d41c[_0x3424b9(0x1cf)][_0x3424b9(0x1c0)](_0x3424b9(0x1b4),_0x3424b9(0x1d8)),await Promise[_0x3424b9(0x1c5)]([spawnViteBuildWatch(_0x406520),spawnVitePreview(_0x406520)]);return;}_0x35d41c[_0x3424b9(0x1cf)][_0x3424b9(0x1c0)](_0x3424b9(0x1b4),_0x2bcd56+_0x3424b9(0x1ee)+_0x13e41d+(_0x464070['length']?'\x20'+_0x464070[_0x3424b9(0x1d5)]('\x20'):'')),await spawnScript(_0x2bcd56,_0x13e41d,_0x464070,_0x406520);}};
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 +1 @@
1
- (function(_0x118523,_0xbf0674){const _0x5f206d=a59_0x58f4,_0x480fd2=_0x118523();while(!![]){try{const _0x480f91=parseInt(_0x5f206d(0x1e5))/0x1*(-parseInt(_0x5f206d(0x1e3))/0x2)+-parseInt(_0x5f206d(0x1e0))/0x3+parseInt(_0x5f206d(0x1ec))/0x4*(-parseInt(_0x5f206d(0x1ef))/0x5)+parseInt(_0x5f206d(0x1db))/0x6+parseInt(_0x5f206d(0x1dd))/0x7+-parseInt(_0x5f206d(0x1df))/0x8+parseInt(_0x5f206d(0x1e2))/0x9;if(_0x480f91===_0xbf0674)break;else _0x480fd2['push'](_0x480fd2['shift']());}catch(_0x2a4f8b){_0x480fd2['push'](_0x480fd2['shift']());}}}(a59_0x283c,0xa3472));import{skillsCommand as a59_0x5ae451}from'../skills/main.js';function a59_0x58f4(_0x5e692b,_0x156c48){_0x5e692b=_0x5e692b-0x1d9;const _0x283c39=a59_0x283c();let _0x58f493=_0x283c39[_0x5e692b];return _0x58f493;}import{CliErrors}from'../errors.js';function a59_0x283c(){const _0x425c92=['apiError','20ooOgxe','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/lovrabet-skill\x20--skill\x20Lovrabet)...','cwd','info','setLogPath','error','log','rabetbase\x20skill\x20installed','2565816mWyDjr','npx\x20skills\x20add\x20failed:\x20','142310gcmnkx','unknown','4485024lTyGaw','337350KbntpT','logger','20858040doZRfp','4556IdAedq','install','241zLGREn','inherit','pipe','skill-install','执行安装技能包命令(委托给\x20npx\x20skills)','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','../skills/npx-skills-add.js','874664PoTldN','nonInteractive'];a59_0x283c=function(){return _0x425c92;};return a59_0x283c();}export const skillCommand={'name':'skill','description':'Install\x20skill\x20packages',async 'run'(_0x43d28f,_0x1bea38,_0x8e4a57){const _0x1e7a53=a59_0x58f4,_0x281784=_0x1bea38[0x0];if(_0x281784===_0x1e7a53(0x1e4)){_0x43d28f[_0x1e7a53(0x1e1)][_0x1e7a53(0x1f3)](process[_0x1e7a53(0x1f1)]()),_0x43d28f[_0x1e7a53(0x1e1)][_0x1e7a53(0x1f2)](_0x1e7a53(0x1e8),_0x1e7a53(0x1e9));const {runNpxSkillsAdd:_0x30163c}=await import(_0x1e7a53(0x1eb)),_0x4fdd3f=_0x43d28f[_0x1e7a53(0x1ed)]?_0x1e7a53(0x1e7):_0x1e7a53(0x1e6);console['log'](_0x1e7a53(0x1f0));const _0x46a977=_0x30163c(process[_0x1e7a53(0x1f1)](),{'stdio':_0x4fdd3f});if(_0x46a977['skipped'])console[_0x1e7a53(0x1d9)](_0x1e7a53(0x1ea));else{if(_0x46a977['ok'])console[_0x1e7a53(0x1d9)](_0x1e7a53(0x1da));else throw CliErrors[_0x1e7a53(0x1ee)](_0x1e7a53(0x1dc)+(_0x46a977[_0x1e7a53(0x1f4)]||_0x1e7a53(0x1de)),'Check\x20network\x20connectivity\x20and\x20try\x20again.');}}else await a59_0x5ae451(_0x281784,[],_0x8e4a57);}};
1
+ const a61_0x523a9a=a61_0x2b24;function a61_0x2b24(_0x488a1d,_0x501fb2){_0x488a1d=_0x488a1d-0x199;const _0x71b121=a61_0x71b1();let _0x2b2483=_0x71b121[_0x488a1d];return _0x2b2483;}(function(_0x275bcc,_0x56c81e){const _0x2c76a3=a61_0x2b24,_0xb36ef6=_0x275bcc();while(!![]){try{const _0x12cb1e=parseInt(_0x2c76a3(0x1a0))/0x1+-parseInt(_0x2c76a3(0x1a4))/0x2*(parseInt(_0x2c76a3(0x19a))/0x3)+parseInt(_0x2c76a3(0x1a7))/0x4*(-parseInt(_0x2c76a3(0x1b8))/0x5)+-parseInt(_0x2c76a3(0x1b0))/0x6*(parseInt(_0x2c76a3(0x1b5))/0x7)+parseInt(_0x2c76a3(0x1a3))/0x8*(-parseInt(_0x2c76a3(0x1ad))/0x9)+-parseInt(_0x2c76a3(0x1b6))/0xa*(-parseInt(_0x2c76a3(0x1a5))/0xb)+parseInt(_0x2c76a3(0x19d))/0xc;if(_0x12cb1e===_0x56c81e)break;else _0xb36ef6['push'](_0xb36ef6['shift']());}catch(_0x5f8988){_0xb36ef6['push'](_0xb36ef6['shift']());}}}(a61_0x71b1,0xd32ac));function a61_0x71b1(){const _0x4a9f9e=['1699300EStKFX','npx\x20skills\x20add\x20failed:\x20','skill-install','71376UjBAvL','3460LSLlMv','132fIjfOn','log','3445696cHFhqk','rabetbase\x20skill\x20installed','lovrabet/rabetbase','skill','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...','setLogPath','576NZGKCk','执行安装技能包命令(委托给\x20npx\x20skills\x20--global)','nonInteractive','3010458XxkfCf','install','../skills/npx-skills-add.js','info','cwd','7rukIxA','1271170lAkOCG','Install\x20skill\x20packages','10HAnNGC','unknown','skipped','2658hywcXY','logger','Check\x20network\x20connectivity\x20and\x20try\x20again.','23623380dCvkBo','error','pipe'];a61_0x71b1=function(){return _0x4a9f9e;};return a61_0x71b1();}import{skillsCommand as a61_0x49016a}from'../skills/main.js';import{CliErrors}from'../errors.js';export const skillCommand={'name':a61_0x523a9a(0x1aa),'description':a61_0x523a9a(0x1b7),async 'run'(_0x441f96,_0xe26305,_0x57baf9){const _0xab31ac=a61_0x523a9a,_0x252243=_0xe26305[0x0];if(_0x252243===_0xab31ac(0x1b1)){_0x441f96[_0xab31ac(0x19b)][_0xab31ac(0x1ac)](process[_0xab31ac(0x1b4)]()),_0x441f96[_0xab31ac(0x19b)][_0xab31ac(0x1b3)](_0xab31ac(0x1a2),_0xab31ac(0x1ae));const {runNpxSkillsAddGlobal:_0x5abe61}=await import(_0xab31ac(0x1b2)),_0x4b5f39=_0x441f96[_0xab31ac(0x1af)]?_0xab31ac(0x19f):'inherit';console[_0xab31ac(0x1a6)](_0xab31ac(0x1ab));const _0x483a8c=_0x5abe61(process[_0xab31ac(0x1b4)](),_0xab31ac(0x1a9),{'stdio':_0x4b5f39});if(_0x483a8c[_0xab31ac(0x199)])console[_0xab31ac(0x1a6)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.');else{if(_0x483a8c['ok'])console[_0xab31ac(0x1a6)](_0xab31ac(0x1a8));else throw CliErrors['apiError'](_0xab31ac(0x1a1)+(_0x483a8c[_0xab31ac(0x19e)]||_0xab31ac(0x1b9)),_0xab31ac(0x19c));}}else await a61_0x49016a(_0x252243,[],_0x57baf9);}};
@@ -1 +1 @@
1
- const a60_0x5c52b8=a60_0x54ba;function a60_0x54ba(_0x4550cb,_0x44cdf7){_0x4550cb=_0x4550cb-0x1ca;const _0x1913c2=a60_0x1913();let _0x54baf7=_0x1913c2[_0x4550cb];return _0x54baf7;}(function(_0x31c335,_0x296f14){const _0x1e08f1=a60_0x54ba,_0x370ae5=_0x31c335();while(!![]){try{const _0xe54234=-parseInt(_0x1e08f1(0x1d0))/0x1*(-parseInt(_0x1e08f1(0x1d1))/0x2)+parseInt(_0x1e08f1(0x1d5))/0x3+parseInt(_0x1e08f1(0x1d3))/0x4*(-parseInt(_0x1e08f1(0x1df))/0x5)+-parseInt(_0x1e08f1(0x1e1))/0x6*(-parseInt(_0x1e08f1(0x1d7))/0x7)+-parseInt(_0x1e08f1(0x1e2))/0x8+-parseInt(_0x1e08f1(0x1de))/0x9*(-parseInt(_0x1e08f1(0x1ce))/0xa)+-parseInt(_0x1e08f1(0x1dd))/0xb*(-parseInt(_0x1e08f1(0x1da))/0xc);if(_0xe54234===_0x296f14)break;else _0x370ae5['push'](_0x370ae5['shift']());}catch(_0x20d5fb){_0x370ae5['push'](_0x370ae5['shift']());}}}(a60_0x1913,0xa431a));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../common/flags.js';function a60_0x1913(){const _0x2d9a6b=['101sVCAZk','13382TUYlpF','Return\x20full\x20raw\x20SQL\x20query\x20object','8rIsoPc','description','523110pZVzZJ','sqlContent','2400223XtRKLw','sqlCode','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','286656AQMYUi','boolean','dbId','176nqgcvx','36fwxEbg','739195asWXVK','verbose','6PrKotK','7208848TGhnKs','read','sqlName','detail','sqlcode','735160VrIqsI','bool'];a60_0x1913=function(){return _0x2d9a6b;};return a60_0x1913();}export const sqlDetail={'service':'sql','command':a60_0x5c52b8(0x1cc),'description':a60_0x5c52b8(0x1d9),'risk':a60_0x5c52b8(0x1ca),'flags':[SQLCODE_FLAG,{'name':a60_0x5c52b8(0x1e0),'type':a60_0x5c52b8(0x1db),'description':a60_0x5c52b8(0x1d2)}],async 'execute'(_0x305c7d){const _0x2bb8b0=a60_0x5c52b8,_0x459005=await getSqlQueryInfo(_0x305c7d['appCode'],_0x305c7d['str'](_0x2bb8b0(0x1cd))),_0x47c8cc=_0x305c7d[_0x2bb8b0(0x1cf)](_0x2bb8b0(0x1e0));if(_0x47c8cc)return{'ok':!![],'data':_0x459005};const _0x16fd9f=_0x459005['dbId']?await getDbName(_0x305c7d['appCode'],_0x459005[_0x2bb8b0(0x1dc)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x459005[_0x2bb8b0(0x1d8)],'sqlName':_0x459005[_0x2bb8b0(0x1cb)],'db':_0x16fd9f?_0x16fd9f+'\x20('+_0x459005[_0x2bb8b0(0x1dc)]+')':_0x459005[_0x2bb8b0(0x1dc)]??'','description':_0x459005[_0x2bb8b0(0x1d4)]??'','sqlContent':_0x459005[_0x2bb8b0(0x1d6)]??''}};}};
1
+ const a62_0x1ddacd=a62_0x1262;function a62_0x1262(_0x57d0b7,_0x9f19e){_0x57d0b7=_0x57d0b7-0x11d;const _0xf4f2c3=a62_0xf4f2();let _0x12626a=_0xf4f2c3[_0x57d0b7];return _0x12626a;}(function(_0x417e01,_0x4b33db){const _0x4cea67=a62_0x1262,_0x2022ff=_0x417e01();while(!![]){try{const _0x269dda=parseInt(_0x4cea67(0x122))/0x1*(-parseInt(_0x4cea67(0x131))/0x2)+parseInt(_0x4cea67(0x11d))/0x3+parseInt(_0x4cea67(0x11f))/0x4+-parseInt(_0x4cea67(0x125))/0x5*(-parseInt(_0x4cea67(0x12d))/0x6)+-parseInt(_0x4cea67(0x126))/0x7*(-parseInt(_0x4cea67(0x129))/0x8)+-parseInt(_0x4cea67(0x11e))/0x9*(parseInt(_0x4cea67(0x12c))/0xa)+parseInt(_0x4cea67(0x124))/0xb*(-parseInt(_0x4cea67(0x121))/0xc);if(_0x269dda===_0x4b33db)break;else _0x2022ff['push'](_0x2022ff['shift']());}catch(_0x225164){_0x2022ff['push'](_0x2022ff['shift']());}}}(a62_0xf4f2,0x8d091));import{getSqlQueryInfo}from'../../core/api-client.js';function a62_0xf4f2(){const _0x363727=['Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','appCode','1000659rsQwFN','92997dnqHsO','2427396lSHHWf','str','3721764MVcjLh','47035VoRqsN','sqlContent','11YZhULW','294115NDVdlJ','5019nFdiyJ','detail','sqlcode','10536cQvFcK','sql','description','1090GwQfEz','18WElGLI','verbose','sqlCode','dbId','2RitQDS'];a62_0xf4f2=function(){return _0x363727;};return a62_0xf4f2();}import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../common/flags.js';export const sqlDetail={'service':a62_0x1ddacd(0x12a),'command':a62_0x1ddacd(0x127),'description':a62_0x1ddacd(0x132),'risk':'read','flags':[SQLCODE_FLAG,{'name':a62_0x1ddacd(0x12e),'type':'boolean','description':'Return\x20full\x20raw\x20SQL\x20query\x20object'}],async 'execute'(_0x395445){const _0x1b52c0=a62_0x1ddacd,_0x325d7e=await getSqlQueryInfo(_0x395445[_0x1b52c0(0x133)],_0x395445[_0x1b52c0(0x120)](_0x1b52c0(0x128))),_0xbe9b7a=_0x395445['bool'](_0x1b52c0(0x12e));if(_0xbe9b7a)return{'ok':!![],'data':_0x325d7e};const _0x44416b=_0x325d7e[_0x1b52c0(0x130)]?await getDbName(_0x395445[_0x1b52c0(0x133)],_0x325d7e[_0x1b52c0(0x130)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x325d7e[_0x1b52c0(0x12f)],'sqlName':_0x325d7e['sqlName'],'db':_0x44416b?_0x44416b+'\x20('+_0x325d7e[_0x1b52c0(0x130)]+')':_0x325d7e[_0x1b52c0(0x130)]??'','description':_0x325d7e[_0x1b52c0(0x12b)]??'','sqlContent':_0x325d7e[_0x1b52c0(0x123)]??''}};}};