@lovrabet/rabetbase-cli 2.0.2-beta.8 → 2.0.2-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (133) hide show
  1. package/lib/api/api-doc.js +1 -1
  2. package/lib/api/fetch-model-list.js +1 -1
  3. package/lib/api/generate-api-file.js +1 -1
  4. package/lib/auth/auth-server-ui.js +1 -1
  5. package/lib/auth/auth-server.js +1 -1
  6. package/lib/auth/constant.js +1 -1
  7. package/lib/auth/get-cookie.js +1 -1
  8. package/lib/auth/get-session-user.js +1 -1
  9. package/lib/auth/is-session-valid.js +1 -1
  10. package/lib/auth/logout.js +1 -1
  11. package/lib/cli-flags.js +1 -1
  12. package/lib/cli.js +1 -1
  13. package/lib/commands/api/doc.js +1 -1
  14. package/lib/commands/api/index.js +1 -1
  15. package/lib/commands/api/list.js +1 -1
  16. package/lib/commands/api/pull.js +1 -1
  17. package/lib/commands/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 -1
  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 -1
  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/menu/index.js +1 -1
  45. package/lib/commands/menu/shared/compare-table.js +1 -1
  46. package/lib/commands/menu/shared/index.js +1 -1
  47. package/lib/commands/menu/shared/inquirer.js +1 -1
  48. package/lib/commands/menu/shared/local-pages.js +1 -1
  49. package/lib/commands/menu/shared/logic.js +1 -1
  50. package/lib/commands/menu/shared/service.js +1 -1
  51. package/lib/commands/menu/shared/sync-core.js +1 -1
  52. package/lib/commands/menu/shared/update-core.js +1 -1
  53. package/lib/commands/menu/shared/valid-url.js +1 -1
  54. package/lib/commands/menu/sync.js +1 -1
  55. package/lib/commands/menu/update.js +1 -1
  56. package/lib/commands/preview.js +1 -1
  57. package/lib/commands/project-upgrade.js +1 -1
  58. package/lib/commands/registry.js +1 -1
  59. package/lib/commands/run.js +1 -1
  60. package/lib/commands/skill.js +1 -1
  61. package/lib/commands/sql/detail.js +1 -1
  62. package/lib/commands/sql/exec.js +1 -1
  63. package/lib/commands/sql/index.js +1 -1
  64. package/lib/commands/sql/list.js +1 -1
  65. package/lib/commands/sql/save.js +1 -1
  66. package/lib/commands/sql/validate.js +1 -1
  67. package/lib/commands/start.js +1 -1
  68. package/lib/config/config-help.js +1 -1
  69. package/lib/config/main.js +1 -1
  70. package/lib/constant/cli.js +1 -1
  71. package/lib/constant/domain.js +1 -1
  72. package/lib/constant/env.js +1 -1
  73. package/lib/context.js +1 -1
  74. package/lib/core/alias-resolver.js +1 -1
  75. package/lib/core/api-client.js +1 -1
  76. package/lib/core/bff/config.js +1 -1
  77. package/lib/core/bff/file-system.js +1 -1
  78. package/lib/core/bff/hash.js +1 -1
  79. package/lib/core/bff/lock.js +1 -1
  80. package/lib/core/bff/utils.js +1 -1
  81. package/lib/core/db-resolver.js +1 -1
  82. package/lib/core/sql-validator.js +1 -1
  83. package/lib/create-app/enhanced-guided-create.js +1 -1
  84. package/lib/create-app/format-elapsed.js +1 -1
  85. package/lib/create-app/main.js +1 -1
  86. package/lib/create-app/non-interactive.js +1 -1
  87. package/lib/create-app/task-finished.js +1 -1
  88. package/lib/create-app/task-loading.js +1 -1
  89. package/lib/create-app/task-running.js +1 -1
  90. package/lib/create-app/task-time.js +1 -1
  91. package/lib/create-app/use-copy-project-template.js +1 -1
  92. package/lib/create-app/use-format-code.js +1 -1
  93. package/lib/create-app/use-install-dependencies.js +1 -1
  94. package/lib/errors.js +1 -1
  95. package/lib/framework/flags.js +1 -1
  96. package/lib/framework/help.js +1 -1
  97. package/lib/framework/index.js +1 -1
  98. package/lib/framework/output.js +1 -1
  99. package/lib/framework/response.js +1 -1
  100. package/lib/framework/runner.js +1 -1
  101. package/lib/generated/build-info.js +1 -1
  102. package/lib/help.js +1 -1
  103. package/lib/init/main.js +1 -1
  104. package/lib/skills/main.js +1 -1
  105. package/lib/skills/npx-skills-add.js +1 -1
  106. package/lib/telemetry/cli-help-trace.js +1 -1
  107. package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
  108. package/lib/utils/ai_config.js +1 -1
  109. package/lib/utils/cdn-config.js +1 -1
  110. package/lib/utils/check-sdk-version.js +1 -1
  111. package/lib/utils/cli-version-check.js +1 -1
  112. package/lib/utils/config.js +1 -1
  113. package/lib/utils/copy-directory.js +1 -1
  114. package/lib/utils/file-utils.js +1 -1
  115. package/lib/utils/guides-cdn.js +1 -1
  116. package/lib/utils/http-client.js +1 -1
  117. package/lib/utils/logger.js +1 -1
  118. package/lib/utils/platform.js +1 -0
  119. package/lib/utils/rules-cdn.js +1 -1
  120. package/lib/utils/sleep.js +1 -1
  121. package/lib/utils/template-replacer.js +1 -1
  122. package/package.json +2 -2
  123. package/lib/ai-setup/config.js +0 -1
  124. package/lib/commands/mcp.js +0 -1
  125. package/lib/mcp/McpInstallUI.js +0 -1
  126. package/lib/mcp/claude.js +0 -1
  127. package/lib/mcp/cursor.js +0 -1
  128. package/lib/mcp/main.js +0 -1
  129. package/lib/mcp/mcp-install-non-interactive.js +0 -1
  130. package/lib/mcp/mcp-installer.js +0 -1
  131. package/lib/telemetry/otel-logger-version.js +0 -1
  132. package/lib/ui/IDESelector.js +0 -1
  133. package/lib/ui/useIDESelection.js +0 -1
@@ -1 +1 @@
1
- (function(_0x4fdf63,_0x40ff0c){const _0x196ecc=a52_0x3d5f,_0x5776ca=_0x4fdf63();while(!![]){try{const _0x2f53f9=parseInt(_0x196ecc(0x1c4))/0x1*(-parseInt(_0x196ecc(0x1bf))/0x2)+-parseInt(_0x196ecc(0x1cf))/0x3+parseInt(_0x196ecc(0x1d6))/0x4+-parseInt(_0x196ecc(0x1c7))/0x5*(parseInt(_0x196ecc(0x1d9))/0x6)+parseInt(_0x196ecc(0x1c1))/0x7+-parseInt(_0x196ecc(0x1c0))/0x8+-parseInt(_0x196ecc(0x1d2))/0x9*(-parseInt(_0x196ecc(0x1cc))/0xa);if(_0x2f53f9===_0x40ff0c)break;else _0x5776ca['push'](_0x5776ca['shift']());}catch(_0x297cc4){_0x5776ca['push'](_0x5776ca['shift']());}}}(a52_0x796d,0x386f6));import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';function a52_0x3d5f(_0x14cb7c,_0x253802){_0x14cb7c=_0x14cb7c-0x1b8;const _0x796d57=a52_0x796d();let _0x3d5fcc=_0x796d57[_0x14cb7c];return _0x3d5fcc;}import{logger}from'../../../utils/logger.js';function validateParams(_0x2d8e90){const _0x404686=a52_0x3d5f,_0x4fad86=[];return _0x2d8e90['jsUrl']&&!isValidJsHttpsUrl(_0x2d8e90[_0x404686(0x1ca)])&&_0x4fad86[_0x404686(0x1de)]({'field':_0x404686(0x1ca),'message':_0x404686(0x1d0)}),_0x2d8e90['cssUrl']&&!isValidCssHttpsUrl(_0x2d8e90[_0x404686(0x1c8)])&&_0x4fad86['push']({'field':'cssUrl','message':_0x404686(0x1c3)}),_0x4fad86;}export async function runMenuSyncCore(_0x53bb9f,_0x5bb224,_0x3bd813=[],_0x3d707e){const _0xb8d931=a52_0x3d5f,_0x24b063=parseParamsFlag(_0x3d707e),_0x1f3b4d=_0x3bd813[_0xb8d931(0x1be)]>0x0?_0x3bd813:_0x24b063[_0xb8d931(0x1d8)],_0x1e404e=_0x24b063[_0xb8d931(0x1ca)],_0x12a6f2=_0x24b063[_0xb8d931(0x1c8)],_0xb2ae34=[];if(_0x1e404e)_0xb2ae34['push'](_0x1e404e);if(_0x12a6f2)_0xb2ae34[_0xb8d931(0x1de)](_0x12a6f2);const _0x221840=validateParams(_0x24b063);if(_0x221840['length']>0x0){const _0x3e7ee5=_0x221840['map'](_0x2b1a7c=>'--params.'+_0x2b1a7c[_0xb8d931(0x1d1)]+':\x20'+_0x2b1a7c['message'])[_0xb8d931(0x1d4)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x3e7ee5);}logger['setLogPath'](process['cwd']()),logger['info'](_0xb8d931(0x1c9),'Start\x20non-interactive\x20menu\x20sync',{'appCode':_0x53bb9f,'selectedCount':_0x1f3b4d?.[_0xb8d931(0x1be)],'jsUrl':_0x1e404e,'cssUrl':_0x12a6f2});if(_0x1e404e){const _0x37094e=await isUrlReachable(_0x1e404e);if(!_0x37094e)throw new Error(_0xb8d931(0x1b8)+_0x1e404e);}if(_0x12a6f2){const _0xbf6ca0=await isUrlReachable(_0x12a6f2);if(!_0xbf6ca0)throw new Error(_0xb8d931(0x1ce)+_0x12a6f2);}const _0x36192c=getLocalPages();if(_0x36192c['length']===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x3e7e7c=await getOnlineMenuList(_0x53bb9f,_0x5bb224),_0x257c96=new Set(_0x3e7e7c[_0xb8d931(0x1c2)](_0x358f51=>_0x358f51[_0xb8d931(0x1d5)]));let _0x51768d;if(_0x1f3b4d&&_0x1f3b4d[_0xb8d931(0x1be)]>0x0){const _0x1934dd=new Set(_0x1f3b4d[_0xb8d931(0x1c2)](_0x2a83a7=>_0x2a83a7[_0xb8d931(0x1b9)]()));_0x51768d=_0x36192c[_0xb8d931(0x1c5)](_0x28ca5f=>_0x1934dd[_0xb8d931(0x1da)](_0x28ca5f[_0xb8d931(0x1bd)]));if(_0x51768d['length']===0x0){const _0x1a4ff0=_0x36192c['map'](_0x33be79=>_0x33be79[_0xb8d931(0x1bd)])[_0xb8d931(0x1d4)](',\x20');throw new Error(_0xb8d931(0x1cd)+[..._0x1934dd]['join'](',\x20')+'\x0a\x20\x20Available\x20local\x20pages:\x20'+_0x1a4ff0);}}else _0x51768d=_0x36192c[_0xb8d931(0x1c5)](_0x235244=>!_0x257c96['has'](_0x235244[_0xb8d931(0x1d5)]));if(_0x51768d[_0xb8d931(0x1be)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x53bb9f,_0x5bb224,_0x51768d,_0xb2ae34[_0xb8d931(0x1be)]>0x0?_0xb2ae34:undefined),logger[_0xb8d931(0x1bc)](_0xb8d931(0x1c9),_0xb8d931(0x1db),{'count':_0x51768d[_0xb8d931(0x1be)],'resources':_0xb2ae34}),{'created':_0x51768d[_0xb8d931(0x1be)],'skipped':![],'targetPages':_0x51768d};}export async function readPageLabelsFromStdin(){const _0x22d122=a52_0x3d5f;if(!process[_0x22d122(0x1cb)][_0x22d122(0x1dd)]&&!process['stdin']['readableEnded'])return new Promise(_0x24c9c9=>{const _0x116ed7=_0x22d122,_0x4d1ba9=[];process[_0x116ed7(0x1cb)]['on']('data',_0x484f8e=>_0x4d1ba9['push'](_0x484f8e)),process[_0x116ed7(0x1cb)]['on'](_0x116ed7(0x1bb),()=>{const _0x2f0863=_0x116ed7,_0x13cd80=Buffer['concat'](_0x4d1ba9)[_0x2f0863(0x1df)](_0x2f0863(0x1dc)),_0x2c46b8=_0x13cd80[_0x2f0863(0x1ba)]('\x0a')[_0x2f0863(0x1c2)](_0x1c9101=>_0x1c9101[_0x2f0863(0x1b9)]())[_0x2f0863(0x1c5)](_0x3e0731=>_0x3e0731[_0x2f0863(0x1be)]>0x0&&!_0x3e0731['startsWith']('#'));_0x24c9c9(_0x2c46b8);}),setTimeout(()=>_0x24c9c9([]),0x1f4);});return[];}function a52_0x796d(){const _0xcc54bd=['jsUrl','stdin','80IYdjsR','No\x20local\x20pages\x20matched\x20labels:\x20','CSS\x20URL\x20is\x20unreachable:\x20','1120857CpXoba','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','field','1458954ZEeDTN','pages','join','path','889692ykyXLe','isArray','selectedLabels','3450sseHFn','has','Menu\x20sync\x20completed','utf8','isTTY','push','toString','JS\x20URL\x20is\x20unreachable:\x20','trim','split','end','info','label','length','278026YVwmFL','3167056YwbSKO','510482qfXqAM','map','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','1UQLLJF','filter','string','3935wAxDHf','cssUrl','menu-sync'];a52_0x796d=function(){return _0xcc54bd;};return a52_0x796d();}function parseParamsFlag(_0x11a06d){const _0x22a813=a52_0x3d5f;if(!_0x11a06d||typeof _0x11a06d!==_0x22a813(0x1c6))return{};try{const _0x3b0a8f=JSON['parse'](_0x11a06d);if(typeof _0x3b0a8f!=='object'||_0x3b0a8f===null||Array[_0x22a813(0x1d7)](_0x3b0a8f))return{};return{'selectedLabels':Array[_0x22a813(0x1d7)](_0x3b0a8f[_0x22a813(0x1d3)])?_0x3b0a8f['pages']['map'](String):undefined,'jsUrl':typeof _0x3b0a8f[_0x22a813(0x1ca)]===_0x22a813(0x1c6)?_0x3b0a8f[_0x22a813(0x1ca)][_0x22a813(0x1b9)]():undefined,'cssUrl':typeof _0x3b0a8f[_0x22a813(0x1c8)]===_0x22a813(0x1c6)?_0x3b0a8f[_0x22a813(0x1c8)][_0x22a813(0x1b9)]():undefined};}catch{return{};}}
1
+ (function(_0xd51ef8,_0x4cc4e8){const _0xf005f0=a50_0x6e6c,_0x5df52c=_0xd51ef8();while(!![]){try{const _0x255610=parseInt(_0xf005f0(0x90))/0x1+-parseInt(_0xf005f0(0x86))/0x2+parseInt(_0xf005f0(0x8b))/0x3*(parseInt(_0xf005f0(0xa4))/0x4)+-parseInt(_0xf005f0(0x8e))/0x5+parseInt(_0xf005f0(0xac))/0x6+parseInt(_0xf005f0(0x89))/0x7+-parseInt(_0xf005f0(0x97))/0x8;if(_0x255610===_0x4cc4e8)break;else _0x5df52c['push'](_0x5df52c['shift']());}catch(_0x5a7a2d){_0x5df52c['push'](_0x5df52c['shift']());}}}(a50_0x5cdf,0xddbbe));function a50_0x5cdf(){const _0xd0456b=['Invalid\x20--params:\x20','trim','6383970taaqVo','--params.','\x0a\x20\x20Available\x20local\x20pages:\x20','toString','split','setLogPath','665288dCZMYS','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','push','8337532tQkucf','Start\x20non-interactive\x20menu\x20sync','9PfJpmh','selectedLabels','join','3999470XltaTF','JS\x20URL\x20is\x20unreachable:\x20','1506423OGaNjO','Menu\x20sync\x20completed','isArray','map','stdin','end','CSS\x20URL\x20is\x20unreachable:\x20','27011688DRmgaW','data','has','concat','object','pages','path','cssUrl','parse','length','label','jsUrl','isTTY','2207636reUrFd','info','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','utf8','filter','string'];a50_0x5cdf=function(){return _0xd0456b;};return a50_0x5cdf();}import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus}from'./service.js';function a50_0x6e6c(_0x5ce7ad,_0x515bc8){_0x5ce7ad=_0x5ce7ad-0x86;const _0x5cdf36=a50_0x5cdf();let _0x6e6cb2=_0x5cdf36[_0x5ce7ad];return _0x6e6cb2;}import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x58837a){const _0x5a4360=a50_0x6e6c,_0x144f3e=[];return _0x58837a['jsUrl']&&!isValidJsHttpsUrl(_0x58837a[_0x5a4360(0xa2)])&&_0x144f3e[_0x5a4360(0x88)]({'field':'jsUrl','message':_0x5a4360(0x87)}),_0x58837a[_0x5a4360(0x9e)]&&!isValidCssHttpsUrl(_0x58837a[_0x5a4360(0x9e)])&&_0x144f3e['push']({'field':_0x5a4360(0x9e),'message':_0x5a4360(0xa6)}),_0x144f3e;}export async function runMenuSyncCore(_0x4c5f2e,_0x3a2796,_0x25fc4d=[],_0x146808){const _0x4d9e85=a50_0x6e6c,_0x3e467b=parseParamsFlag(_0x146808),_0x337152=_0x25fc4d['length']>0x0?_0x25fc4d:_0x3e467b[_0x4d9e85(0x8c)],_0x1ba7e2=_0x3e467b['jsUrl'],_0x51067d=_0x3e467b[_0x4d9e85(0x9e)],_0x42337c=[];if(_0x1ba7e2)_0x42337c['push'](_0x1ba7e2);if(_0x51067d)_0x42337c[_0x4d9e85(0x88)](_0x51067d);const _0x5079d6=validateParams(_0x3e467b);if(_0x5079d6['length']>0x0){const _0x4287d2=_0x5079d6[_0x4d9e85(0x93)](_0xab7673=>_0x4d9e85(0xad)+_0xab7673['field']+':\x20'+_0xab7673['message'])[_0x4d9e85(0x8d)](';\x20');throw new Error(_0x4d9e85(0xaa)+_0x4287d2);}logger[_0x4d9e85(0xb1)](process['cwd']()),logger[_0x4d9e85(0xa5)]('menu-sync',_0x4d9e85(0x8a),{'appCode':_0x4c5f2e,'selectedCount':_0x337152?.[_0x4d9e85(0xa0)],'jsUrl':_0x1ba7e2,'cssUrl':_0x51067d});if(_0x1ba7e2){const _0x7855f4=await isUrlReachable(_0x1ba7e2);if(!_0x7855f4)throw new Error(_0x4d9e85(0x8f)+_0x1ba7e2);}if(_0x51067d){const _0xf1c5cd=await isUrlReachable(_0x51067d);if(!_0xf1c5cd)throw new Error(_0x4d9e85(0x96)+_0x51067d);}const _0x531228=getLocalPages();if(_0x531228[_0x4d9e85(0xa0)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x572198=await getOnlineMenuList(_0x4c5f2e,_0x3a2796),_0x4877f4=new Set(_0x572198['map'](_0x52ef54=>_0x52ef54['path']));let _0x442b56;if(_0x337152&&_0x337152[_0x4d9e85(0xa0)]>0x0){const _0x29cb08=new Set(_0x337152[_0x4d9e85(0x93)](_0x5c9d88=>_0x5c9d88[_0x4d9e85(0xab)]()));_0x442b56=_0x531228[_0x4d9e85(0xa8)](_0xc65b94=>_0x29cb08[_0x4d9e85(0x99)](_0xc65b94[_0x4d9e85(0xa1)]));if(_0x442b56['length']===0x0){const _0xa51fc5=_0x531228[_0x4d9e85(0x93)](_0x249391=>_0x249391[_0x4d9e85(0xa1)])[_0x4d9e85(0x8d)](',\x20');throw new Error('No\x20local\x20pages\x20matched\x20labels:\x20'+[..._0x29cb08][_0x4d9e85(0x8d)](',\x20')+_0x4d9e85(0xae)+_0xa51fc5);}}else _0x442b56=_0x531228[_0x4d9e85(0xa8)](_0x221060=>!_0x4877f4[_0x4d9e85(0x99)](_0x221060[_0x4d9e85(0x9d)]));if(_0x442b56[_0x4d9e85(0xa0)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x4c5f2e,_0x3a2796,_0x442b56,_0x42337c[_0x4d9e85(0xa0)]>0x0?_0x42337c:undefined),logger[_0x4d9e85(0xa5)]('menu-sync',_0x4d9e85(0x91),{'count':_0x442b56[_0x4d9e85(0xa0)],'resources':_0x42337c}),{'created':_0x442b56[_0x4d9e85(0xa0)],'skipped':![],'targetPages':_0x442b56};}export async function readPageLabelsFromStdin(){const _0x1996c4=a50_0x6e6c;if(!process['stdin'][_0x1996c4(0xa3)]&&!process[_0x1996c4(0x94)]['readableEnded'])return new Promise(_0xfa087=>{const _0x5b0657=_0x1996c4,_0x463bef=[];process[_0x5b0657(0x94)]['on'](_0x5b0657(0x98),_0x14d775=>_0x463bef[_0x5b0657(0x88)](_0x14d775)),process[_0x5b0657(0x94)]['on'](_0x5b0657(0x95),()=>{const _0x405417=_0x5b0657,_0x4357d6=Buffer[_0x405417(0x9a)](_0x463bef)[_0x405417(0xaf)](_0x405417(0xa7)),_0x24f6ee=_0x4357d6[_0x405417(0xb0)]('\x0a')[_0x405417(0x93)](_0x2fa534=>_0x2fa534['trim']())['filter'](_0x296385=>_0x296385[_0x405417(0xa0)]>0x0&&!_0x296385['startsWith']('#'));_0xfa087(_0x24f6ee);}),setTimeout(()=>_0xfa087([]),0x1f4);});return[];}function parseParamsFlag(_0x437a39){const _0x59b065=a50_0x6e6c;if(!_0x437a39||typeof _0x437a39!==_0x59b065(0xa9))return{};try{const _0x26873e=JSON[_0x59b065(0x9f)](_0x437a39);if(typeof _0x26873e!==_0x59b065(0x9b)||_0x26873e===null||Array[_0x59b065(0x92)](_0x26873e))return{};return{'selectedLabels':Array[_0x59b065(0x92)](_0x26873e[_0x59b065(0x9c)])?_0x26873e[_0x59b065(0x9c)]['map'](String):undefined,'jsUrl':typeof _0x26873e[_0x59b065(0xa2)]===_0x59b065(0xa9)?_0x26873e[_0x59b065(0xa2)][_0x59b065(0xab)]():undefined,'cssUrl':typeof _0x26873e[_0x59b065(0x9e)]===_0x59b065(0xa9)?_0x26873e[_0x59b065(0x9e)][_0x59b065(0xab)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x23ee85,_0x3353fe){const _0x329300=a54_0x4ddc,_0x1b13d1=_0x23ee85();while(!![]){try{const _0x7d3267=parseInt(_0x329300(0x90))/0x1+-parseInt(_0x329300(0x87))/0x2+parseInt(_0x329300(0x92))/0x3+parseInt(_0x329300(0x85))/0x4+parseInt(_0x329300(0x8b))/0x5+-parseInt(_0x329300(0x91))/0x6*(parseInt(_0x329300(0x77))/0x7)+-parseInt(_0x329300(0x89))/0x8;if(_0x7d3267===_0x3353fe)break;else _0x1b13d1['push'](_0x1b13d1['shift']());}catch(_0x51f9b6){_0x1b13d1['push'](_0x1b13d1['shift']());}}}(a54_0x5b39,0x26410));import{updateMenuCdnUrl,getOnlineMenuList}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0x3c0e07){const _0xe8ab87=a54_0x4ddc,_0xa1480c=[];return _0x3c0e07[_0xe8ab87(0x8c)]&&!isValidJsHttpsUrl(_0x3c0e07['jsUrl'])&&_0xa1480c[_0xe8ab87(0x7e)]({'field':_0xe8ab87(0x8c),'message':'JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL'}),_0x3c0e07[_0xe8ab87(0x79)]&&!isValidCssHttpsUrl(_0x3c0e07[_0xe8ab87(0x79)])&&_0xa1480c[_0xe8ab87(0x7e)]({'field':_0xe8ab87(0x79),'message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0xa1480c;}export async function runMenuUpdateCore(_0x4dcc60,_0x484f7d,_0x12a443){const _0x2a0cfe=a54_0x4ddc,_0x533832=parseUpdateParamsFlag(_0x12a443),_0x33eddb=[];if(_0x533832[_0x2a0cfe(0x8c)])_0x33eddb[_0x2a0cfe(0x7e)](_0x533832[_0x2a0cfe(0x8c)]);if(_0x533832[_0x2a0cfe(0x79)])_0x33eddb[_0x2a0cfe(0x7e)](_0x533832['cssUrl']);const _0x47aefa=validateParams(_0x533832);if(_0x47aefa[_0x2a0cfe(0x7b)]>0x0){const _0x1fc7ac=_0x47aefa[_0x2a0cfe(0x7a)](_0x49d6dc=>_0x2a0cfe(0x82)+_0x49d6dc[_0x2a0cfe(0x76)]+':\x20'+_0x49d6dc[_0x2a0cfe(0x74)])[_0x2a0cfe(0x8d)](';\x20');throw new Error(_0x2a0cfe(0x8f)+_0x1fc7ac);}logger[_0x2a0cfe(0x78)](process['cwd']()),logger[_0x2a0cfe(0x81)](_0x2a0cfe(0x86),_0x2a0cfe(0x7f),{'appCode':_0x4dcc60,'jsUrl':_0x533832[_0x2a0cfe(0x8c)],'cssUrl':_0x533832[_0x2a0cfe(0x79)]});if(_0x533832[_0x2a0cfe(0x8c)]){const _0x1260f9=await isUrlReachable(_0x533832[_0x2a0cfe(0x8c)]);if(!_0x1260f9)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x533832['jsUrl']);}if(_0x533832['cssUrl']){const _0x3da492=await isUrlReachable(_0x533832[_0x2a0cfe(0x79)]);if(!_0x3da492)throw new Error(_0x2a0cfe(0x7d)+_0x533832[_0x2a0cfe(0x79)]);}const _0x5e9489=await getOnlineMenuList(_0x4dcc60,_0x484f7d),_0x20b78a=_0x5e9489[_0x2a0cfe(0x84)](_0x40c483=>_0x40c483['resources']['length']>0x0);if(_0x20b78a[_0x2a0cfe(0x7b)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x4eff49=await Promise[_0x2a0cfe(0x75)](_0x20b78a[_0x2a0cfe(0x7a)](_0x7446e=>updateMenuCdnUrl(_0x4dcc60,_0x484f7d,{'id':_0x7446e['id'],'label':_0x7446e[_0x2a0cfe(0x7c)],'path':_0x7446e[_0x2a0cfe(0x8e)],'resources':_0x33eddb}))),_0x382092=_0x4eff49[_0x2a0cfe(0x84)](_0xe97533=>_0xe97533[_0x2a0cfe(0x8a)]==='rejected')[_0x2a0cfe(0x7b)];return logger[_0x2a0cfe(0x81)](_0x2a0cfe(0x86),_0x2a0cfe(0x83),{'count':_0x20b78a[_0x2a0cfe(0x7b)],'resources':_0x33eddb}),{'updated':_0x20b78a['length']-_0x382092,'failed':_0x382092,'skipped':![]};}function a54_0x4ddc(_0x15f6b9,_0x3b33e6){_0x15f6b9=_0x15f6b9-0x74;const _0x5b3935=a54_0x5b39();let _0x4ddca1=_0x5b3935[_0x15f6b9];return _0x4ddca1;}function parseUpdateParamsFlag(_0x4d2c62){const _0x472d3f=a54_0x4ddc;if(!_0x4d2c62||typeof _0x4d2c62!==_0x472d3f(0x80))return{};try{const _0x7dadd3=JSON['parse'](_0x4d2c62);if(typeof _0x7dadd3!=='object'||_0x7dadd3===null||Array[_0x472d3f(0x88)](_0x7dadd3))return{};return{'jsUrl':typeof _0x7dadd3[_0x472d3f(0x8c)]===_0x472d3f(0x80)?_0x7dadd3[_0x472d3f(0x8c)][_0x472d3f(0x93)]():undefined,'cssUrl':typeof _0x7dadd3[_0x472d3f(0x79)]===_0x472d3f(0x80)?_0x7dadd3[_0x472d3f(0x79)][_0x472d3f(0x93)]():undefined};}catch{return{};}}function a54_0x5b39(){const _0x1ad9f7=['613652qJTvKp','menu-update','373358ARuHsj','isArray','1144112qqMbpA','status','1416415ZqkMUg','jsUrl','join','path','Invalid\x20--params:\x20','164668vzkdtc','960726jhvEqf','135414dKUVIt','trim','message','allSettled','field','7Qtvlzl','setLogPath','cssUrl','map','length','label','CSS\x20URL\x20is\x20unreachable:\x20','push','Start\x20non-interactive\x20menu\x20update','string','info','--params.','Menu\x20update\x20completed','filter'];a54_0x5b39=function(){return _0x1ad9f7;};return a54_0x5b39();}
1
+ function a52_0x1c26(_0x7982c,_0x2ffcf7){_0x7982c=_0x7982c-0x1a3;const _0x5e95a8=a52_0x5e95();let _0x1c26b7=_0x5e95a8[_0x7982c];return _0x1c26b7;}(function(_0x4fe07e,_0x2d76a0){const _0x20f158=a52_0x1c26,_0x4afc89=_0x4fe07e();while(!![]){try{const _0x2c8ee5=parseInt(_0x20f158(0x1b1))/0x1+-parseInt(_0x20f158(0x1a5))/0x2*(-parseInt(_0x20f158(0x1b0))/0x3)+-parseInt(_0x20f158(0x1b6))/0x4*(parseInt(_0x20f158(0x1b2))/0x5)+parseInt(_0x20f158(0x1ba))/0x6+parseInt(_0x20f158(0x1a7))/0x7+parseInt(_0x20f158(0x1ad))/0x8+-parseInt(_0x20f158(0x1b5))/0x9;if(_0x2c8ee5===_0x2d76a0)break;else _0x4afc89['push'](_0x4afc89['shift']());}catch(_0x546850){_0x4afc89['push'](_0x4afc89['shift']());}}}(a52_0x5e95,0x6b550));import{updateMenuCdnUrl,getOnlineMenuList}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function a52_0x5e95(){const _0x153dfa=['push','path','49032IaBSXn','395791YIsShJ','210biAliP','jsUrl','join','12734649ggtAuI','10300LQZVWY','menu-update','isArray','Menu\x20update\x20completed','1682466fJIIiQ','setLogPath','JS\x20URL\x20is\x20unreachable:\x20','cwd','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','cssUrl','--params.','map','string','58vedUhY','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','812518IAZJKR','object','trim','message','length','parse','5571928UpjJOq'];a52_0x5e95=function(){return _0x153dfa;};return a52_0x5e95();}function validateParams(_0x11c1ce){const _0x4cd1c1=a52_0x1c26,_0x1750c6=[];return _0x11c1ce['jsUrl']&&!isValidJsHttpsUrl(_0x11c1ce[_0x4cd1c1(0x1b3)])&&_0x1750c6[_0x4cd1c1(0x1ae)]({'field':'jsUrl','message':_0x4cd1c1(0x1be)}),_0x11c1ce['cssUrl']&&!isValidCssHttpsUrl(_0x11c1ce[_0x4cd1c1(0x1bf)])&&_0x1750c6[_0x4cd1c1(0x1ae)]({'field':_0x4cd1c1(0x1bf),'message':_0x4cd1c1(0x1a6)}),_0x1750c6;}export async function runMenuUpdateCore(_0x294622,_0x52ee0d,_0x556c91){const _0x57c2de=a52_0x1c26,_0x11b250=parseUpdateParamsFlag(_0x556c91),_0x4c26b4=[];if(_0x11b250['jsUrl'])_0x4c26b4[_0x57c2de(0x1ae)](_0x11b250[_0x57c2de(0x1b3)]);if(_0x11b250[_0x57c2de(0x1bf)])_0x4c26b4['push'](_0x11b250[_0x57c2de(0x1bf)]);const _0x146107=validateParams(_0x11b250);if(_0x146107[_0x57c2de(0x1ab)]>0x0){const _0x26f818=_0x146107[_0x57c2de(0x1a3)](_0x3fb9cf=>_0x57c2de(0x1c0)+_0x3fb9cf['field']+':\x20'+_0x3fb9cf[_0x57c2de(0x1aa)])[_0x57c2de(0x1b4)](';\x20');throw new Error('Invalid\x20--params:\x20'+_0x26f818);}logger[_0x57c2de(0x1bb)](process[_0x57c2de(0x1bd)]()),logger['info'](_0x57c2de(0x1b7),'Start\x20non-interactive\x20menu\x20update',{'appCode':_0x294622,'jsUrl':_0x11b250[_0x57c2de(0x1b3)],'cssUrl':_0x11b250['cssUrl']});if(_0x11b250[_0x57c2de(0x1b3)]){const _0x280667=await isUrlReachable(_0x11b250[_0x57c2de(0x1b3)]);if(!_0x280667)throw new Error(_0x57c2de(0x1bc)+_0x11b250[_0x57c2de(0x1b3)]);}if(_0x11b250['cssUrl']){const _0x3d8f30=await isUrlReachable(_0x11b250[_0x57c2de(0x1bf)]);if(!_0x3d8f30)throw new Error('CSS\x20URL\x20is\x20unreachable:\x20'+_0x11b250[_0x57c2de(0x1bf)]);}const _0x44a9b8=await getOnlineMenuList(_0x294622,_0x52ee0d),_0xd1c62c=_0x44a9b8['filter'](_0x28730a=>_0x28730a['resources'][_0x57c2de(0x1ab)]>0x0);if(_0xd1c62c['length']===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x5713dd=await Promise['allSettled'](_0xd1c62c[_0x57c2de(0x1a3)](_0xc749d7=>updateMenuCdnUrl(_0x294622,_0x52ee0d,{'id':_0xc749d7['id'],'label':_0xc749d7['label'],'path':_0xc749d7[_0x57c2de(0x1af)],'resources':_0x4c26b4}))),_0x4d1dfd=_0x5713dd['filter'](_0xe5c276=>_0xe5c276['status']==='rejected')[_0x57c2de(0x1ab)];return logger['info']('menu-update',_0x57c2de(0x1b9),{'count':_0xd1c62c['length'],'resources':_0x4c26b4}),{'updated':_0xd1c62c[_0x57c2de(0x1ab)]-_0x4d1dfd,'failed':_0x4d1dfd,'skipped':![]};}function parseUpdateParamsFlag(_0xccca8b){const _0x531c78=a52_0x1c26;if(!_0xccca8b||typeof _0xccca8b!=='string')return{};try{const _0x10921b=JSON[_0x531c78(0x1ac)](_0xccca8b);if(typeof _0x10921b!==_0x531c78(0x1a8)||_0x10921b===null||Array[_0x531c78(0x1b8)](_0x10921b))return{};return{'jsUrl':typeof _0x10921b[_0x531c78(0x1b3)]===_0x531c78(0x1a4)?_0x10921b[_0x531c78(0x1b3)][_0x531c78(0x1a9)]():undefined,'cssUrl':typeof _0x10921b[_0x531c78(0x1bf)]==='string'?_0x10921b[_0x531c78(0x1bf)]['trim']():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- (function(_0x43e980,_0x4ee54f){const _0x3f015f=a55_0xd707,_0x11ca14=_0x43e980();while(!![]){try{const _0x1e6d9e=parseInt(_0x3f015f(0x7f))/0x1*(-parseInt(_0x3f015f(0x84))/0x2)+parseInt(_0x3f015f(0x7d))/0x3*(-parseInt(_0x3f015f(0x80))/0x4)+parseInt(_0x3f015f(0x83))/0x5+-parseInt(_0x3f015f(0x81))/0x6+parseInt(_0x3f015f(0x7c))/0x7+-parseInt(_0x3f015f(0x7e))/0x8+parseInt(_0x3f015f(0x85))/0x9;if(_0x1e6d9e===_0x4ee54f)break;else _0x11ca14['push'](_0x11ca14['shift']());}catch(_0x501991){_0x11ca14['push'](_0x11ca14['shift']());}}}(a55_0x57c5,0x4f7c6));export function isValidJsHttpsUrl(_0x3f86c1){const _0x396dbc=a55_0xd707;return/^https:\/\/.+\.js(\?.*)?$/[_0x396dbc(0x86)](_0x3f86c1[_0x396dbc(0x82)]());}export function isValidCssHttpsUrl(_0x22994d){const _0x23f39b=a55_0xd707;return/^https:\/\/.+\.css(\?.*)?$/[_0x23f39b(0x86)](_0x22994d['trim']());}function a55_0xd707(_0x2ce2a4,_0x104f0c){_0x2ce2a4=_0x2ce2a4-0x7c;const _0x57c5ea=a55_0x57c5();let _0xd7076a=_0x57c5ea[_0x2ce2a4];return _0xd7076a;}function a55_0x57c5(){const _0xa4b8a0=['2224124IXvKZk','2351580aaEFtk','trim','1060095BtdjtK','57686fCeLFm','15313581DTYFCJ','test','396144kguvZZ','3NqneIS','4188216Tyeaue','6xDRdJx'];a55_0x57c5=function(){return _0xa4b8a0;};return a55_0x57c5();}export async function isUrlReachable(_0x1a6e74){try{const _0x54b291=await fetch(_0x1a6e74,{'method':'HEAD'});return _0x54b291['ok'];}catch{return![];}}
1
+ function a53_0x5c51(_0x1e5483,_0x4130a6){_0x1e5483=_0x1e5483-0x8a;const _0x1ba588=a53_0x1ba5();let _0x5c51e4=_0x1ba588[_0x1e5483];return _0x5c51e4;}(function(_0x444166,_0x5562de){const _0x2a66a8=a53_0x5c51,_0x592ac0=_0x444166();while(!![]){try{const _0x25ce4f=parseInt(_0x2a66a8(0x90))/0x1+-parseInt(_0x2a66a8(0x8f))/0x2+-parseInt(_0x2a66a8(0x8c))/0x3*(parseInt(_0x2a66a8(0x93))/0x4)+parseInt(_0x2a66a8(0x92))/0x5+-parseInt(_0x2a66a8(0x8d))/0x6+parseInt(_0x2a66a8(0x8e))/0x7+parseInt(_0x2a66a8(0x8b))/0x8;if(_0x25ce4f===_0x5562de)break;else _0x592ac0['push'](_0x592ac0['shift']());}catch(_0x10cacd){_0x592ac0['push'](_0x592ac0['shift']());}}}(a53_0x1ba5,0xbd111));export function isValidJsHttpsUrl(_0x59968e){const _0x7ca4fc=a53_0x5c51;return/^https:\/\/.+\.js(\?.*)?$/[_0x7ca4fc(0x8a)](_0x59968e[_0x7ca4fc(0x91)]());}function a53_0x1ba5(){const _0x2826b6=['trim','3818525qOnCMw','148NlVbka','test','7875936twfuQn','71607xqJUUw','6747954TQOYlt','5845231OItZHg','2064832ddRzIJ','1231415FdtWaQ'];a53_0x1ba5=function(){return _0x2826b6;};return a53_0x1ba5();}export function isValidCssHttpsUrl(_0x1820bb){return/^https:\/\/.+\.css(\?.*)?$/['test'](_0x1820bb['trim']());}export async function isUrlReachable(_0x26e0ea){try{const _0x17288b=await fetch(_0x26e0ea,{'method':'HEAD'});return _0x17288b['ok'];}catch{return![];}}
@@ -1 +1 @@
1
- const a56_0x29ff5f=a56_0x2dfa;(function(_0x17a470,_0x590f06){const _0x3d84a5=a56_0x2dfa,_0x3d5b0a=_0x17a470();while(!![]){try{const _0x282be3=parseInt(_0x3d84a5(0x1e6))/0x1+parseInt(_0x3d84a5(0x1ee))/0x2*(parseInt(_0x3d84a5(0x1cc))/0x3)+parseInt(_0x3d84a5(0x1c8))/0x4*(parseInt(_0x3d84a5(0x1ed))/0x5)+parseInt(_0x3d84a5(0x1bf))/0x6+parseInt(_0x3d84a5(0x1bb))/0x7*(-parseInt(_0x3d84a5(0x1d9))/0x8)+parseInt(_0x3d84a5(0x1c5))/0x9*(parseInt(_0x3d84a5(0x1dd))/0xa)+-parseInt(_0x3d84a5(0x1b8))/0xb*(parseInt(_0x3d84a5(0x1ea))/0xc);if(_0x282be3===_0x590f06)break;else _0x3d5b0a['push'](_0x3d5b0a['shift']());}catch(_0x482e71){_0x3d5b0a['push'](_0x3d5b0a['shift']());}}}(a56_0x529f,0x543bf));import a56_0x17a83b from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'./shared/logic.js';import{renderCompareTable,renderSyncSummary}from'./shared/compare-table.js';function a56_0x2dfa(_0x54e430,_0x4d6095){_0x54e430=_0x54e430-0x1b5;const _0x529fc3=a56_0x529f();let _0x2dfa8c=_0x529fc3[_0x54e430];return _0x2dfa8c;}function a56_0x529f(){const _0x5df53f=['boolean','27478vvgZap','string','Failed\x20to\x20fetch\x20online\x20menu\x20list','161teebei','validation','Menu\x20sync\x20completed:\x20','trim','2568294FSzDjs','sync','Created\x20','Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform','\x20failed.','cssUrl','266913zNhEvm','onlineMenuList','log','20xJkaTa','Menu\x20creation\x20failed','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','message','6Qfbcyn','\x20menu(s)','created','\x20and\x20CSS:\x20','gray','length','object','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','CANCEL','\x20page(s)','\x20menu(s)\x20with\x20JS:\x20','\x20\x20Cancelled.','pages','26040KGjaJh','appCode','size','write','150PnacCm','localPages','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','skipped','failed','jsUrl','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','params','isArray','604624gzbOxz','\x20\x20Create\x20','yes','Creating\x20','10644VZUYrj','cookie','\x20\x20✓\x20Selected:\x20','630550gpaepy','527536JhQYue','Online\x20menu\x20list\x20fetched','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20menu(s)\x20created','onlinePaths','menu'];a56_0x529f=function(){return _0x5df53f;};return a56_0x529f();}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':a56_0x29ff5f(0x1b6),'command':a56_0x29ff5f(0x1c0),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a56_0x29ff5f(0x1dc),'flags':[{'name':a56_0x29ff5f(0x1e4),'type':'string','description':a56_0x29ff5f(0x1df)+a56_0x29ff5f(0x1d3)},{'name':a56_0x29ff5f(0x1e8),'type':a56_0x29ff5f(0x1b7),'description':a56_0x29ff5f(0x1c2)}],async 'execute'(_0x47120e){const _0x1d95d2=a56_0x29ff5f,_0xc4b0fb=_0x47120e['flag']('yes'),_0x4228f0=_0x47120e['str'](_0x1d95d2(0x1e4)),_0x4fe108=parseParams(_0x4228f0),_0x36f761=!!(_0x4fe108[_0x1d95d2(0x1e2)]||_0x4fe108[_0x1d95d2(0x1c4)]||_0x4fe108[_0x1d95d2(0x1d8)]&&_0x4fe108[_0x1d95d2(0x1d8)]['length']>0x0);if(_0xc4b0fb||_0x36f761){let _0x44f542=[];!isInteractive()&&!_0x4fe108['pages']?.[_0x1d95d2(0x1d1)]&&(_0x44f542=await readPageLabelsFromStdin());const _0x27da6d=await runMenuSyncCore(_0x47120e[_0x1d95d2(0x1da)],_0x47120e[_0x1d95d2(0x1eb)],_0x44f542[_0x1d95d2(0x1d1)]>0x0?_0x44f542:_0x4fe108[_0x1d95d2(0x1d8)]??[],_0x4228f0);if(_0x27da6d[_0x1d95d2(0x1e0)]){const _0x21738e=getLocalPages();_0x21738e[_0x1d95d2(0x1d1)]===0x0?console[_0x1d95d2(0x1c7)](_0x1d95d2(0x1ca)):console['log'](_0x1d95d2(0x1f0));}else console[_0x1d95d2(0x1c7)]('✓\x20Menu\x20sync\x20completed:\x20'+_0x27da6d[_0x1d95d2(0x1ce)]+_0x1d95d2(0x1f1));return{'ok':!![]};}requireInteractive();const _0x584118=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x371e37,_0x12a54d,_0x1c4639;try{const _0x1a340b=await fetchMenuData(_0x47120e[_0x1d95d2(0x1da)],_0x47120e[_0x1d95d2(0x1eb)]);_0x371e37=_0x1a340b[_0x1d95d2(0x1de)],_0x12a54d=_0x1a340b[_0x1d95d2(0x1b5)],_0x1c4639=_0x1a340b[_0x1d95d2(0x1c6)],stopSpinner(_0x584118,_0x1d95d2(0x1ef),!![]);}catch(_0xf1540d){stopSpinner(_0x584118,_0x1d95d2(0x1ba),![]);throw CliErrors[_0x1d95d2(0x1bc)](_0xf1540d instanceof Error?_0xf1540d[_0x1d95d2(0x1cb)]:_0x1d95d2(0x1ba));}if(_0x371e37[_0x1d95d2(0x1d1)]===0x0)return console[_0x1d95d2(0x1c7)](a56_0x17a83b['yellow'](_0x1d95d2(0x1e3))),{'ok':!![]};const _0x182e59=buildCompareRows(_0x371e37,_0x12a54d);console[_0x1d95d2(0x1c7)](renderCompareTable(_0x182e59)),console['log']();const _0x57c840=_0x4fe108[_0x1d95d2(0x1d8)],_0x10038d=await selectPages(_0x371e37,_0x12a54d,_0x57c840);console['log'](),console[_0x1d95d2(0x1c7)](a56_0x17a83b['cyan'](_0x1d95d2(0x1ec)+_0x10038d['length']+_0x1d95d2(0x1d5)));const _0x63fbb7=_0x4fe108[_0x1d95d2(0x1e2)]&&_0x4fe108['cssUrl'];if(!_0x63fbb7){console[_0x1d95d2(0x1c7)](renderSyncSummary(_0x10038d,_0x12a54d[_0x1d95d2(0x1db)]>0x0));const _0x387778=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x387778)return console['log'](a56_0x17a83b[_0x1d95d2(0x1d0)](_0x1d95d2(0x1d7))),{'ok':!![]};}let _0x49b76c=_0x4fe108[_0x1d95d2(0x1e2)],_0x1088a8=_0x4fe108[_0x1d95d2(0x1c4)];if(!_0x49b76c)try{_0x49b76c=await askJsUrl();}catch(_0xc5ce29){if(_0xc5ce29['message']==='CANCEL')return console[_0x1d95d2(0x1c7)](a56_0x17a83b[_0x1d95d2(0x1d0)](_0x1d95d2(0x1d7))),{'ok':!![]};throw _0xc5ce29;}if(!_0x1088a8)try{_0x1088a8=await askCssUrl();}catch(_0x127054){if(_0x127054['message']===_0x1d95d2(0x1d4))return console['log'](a56_0x17a83b['gray'](_0x1d95d2(0x1d7))),{'ok':!![]};throw _0x127054;}const _0x5bc6e6=await askConfirm(_0x1d95d2(0x1e7)+_0x10038d[_0x1d95d2(0x1d1)]+_0x1d95d2(0x1d6)+_0x49b76c+_0x1d95d2(0x1cf)+_0x1088a8+'?');if(!_0x5bc6e6)return console['log'](a56_0x17a83b[_0x1d95d2(0x1d0)](_0x1d95d2(0x1d7))),{'ok':!![]};const _0x4dbf12=[_0x49b76c,_0x1088a8],_0xe098ba=startSpinner(_0x1d95d2(0x1e9)+_0x10038d[_0x1d95d2(0x1d1)]+'\x20menu(s)...');try{const _0x30b3b3=await doCreateMenus(_0x47120e[_0x1d95d2(0x1da)],_0x47120e['cookie'],_0x10038d,_0x4dbf12);return stopSpinner(_0xe098ba,_0x1d95d2(0x1c1)+_0x30b3b3[_0x1d95d2(0x1ce)]+_0x1d95d2(0x1cd),!![]),{'ok':!![],'data':_0x30b3b3,'message':_0x1d95d2(0x1bd)+_0x30b3b3[_0x1d95d2(0x1ce)]+'\x20created,\x20'+_0x30b3b3[_0x1d95d2(0x1e1)]+_0x1d95d2(0x1c3)};}catch(_0x160e48){stopSpinner(_0xe098ba,_0x1d95d2(0x1c9),![]);throw CliErrors['validation'](_0x160e48 instanceof Error?_0x160e48[_0x1d95d2(0x1cb)]:_0x1d95d2(0x1c9));}}};function parseParams(_0x47ce38){const _0x5be256=a56_0x29ff5f;if(!_0x47ce38)return{};try{const _0x51ef16=JSON['parse'](_0x47ce38);if(typeof _0x51ef16!==_0x5be256(0x1d2)||_0x51ef16===null||Array[_0x5be256(0x1e5)](_0x51ef16))return{};return{'jsUrl':typeof _0x51ef16['jsUrl']==='string'?_0x51ef16[_0x5be256(0x1e2)]['trim']():undefined,'cssUrl':typeof _0x51ef16[_0x5be256(0x1c4)]===_0x5be256(0x1b9)?_0x51ef16['cssUrl'][_0x5be256(0x1be)]():undefined,'pages':Array[_0x5be256(0x1e5)](_0x51ef16[_0x5be256(0x1d8)])?_0x51ef16[_0x5be256(0x1d8)]['map'](String):undefined};}catch{return{};}}
1
+ const a54_0x589d3=a54_0x2135;(function(_0x55be95,_0x14c8fb){const _0xf52bbe=a54_0x2135,_0x27a4bf=_0x55be95();while(!![]){try{const _0x3fddb1=-parseInt(_0xf52bbe(0x18c))/0x1*(-parseInt(_0xf52bbe(0x161))/0x2)+-parseInt(_0xf52bbe(0x172))/0x3*(-parseInt(_0xf52bbe(0x160))/0x4)+parseInt(_0xf52bbe(0x184))/0x5+-parseInt(_0xf52bbe(0x169))/0x6*(-parseInt(_0xf52bbe(0x15f))/0x7)+parseInt(_0xf52bbe(0x17b))/0x8+parseInt(_0xf52bbe(0x16e))/0x9+-parseInt(_0xf52bbe(0x177))/0xa;if(_0x3fddb1===_0x14c8fb)break;else _0x27a4bf['push'](_0x27a4bf['shift']());}catch(_0x17a017){_0x27a4bf['push'](_0x27a4bf['shift']());}}}(a54_0x5aaf,0x887d8));import a54_0x483c41 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';function a54_0x5aaf(){const _0x4597e4=['params','\x20page(s)','log','onlineMenuList','cookie','string','517052tRzwVP','cssUrl','\x20menu(s)\x20with\x20JS:\x20','onlinePaths','Created\x20','Fetching\x20online\x20menu\x20list...','map','pages','Menu\x20sync\x20completed:\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','menu','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','object','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','length','cyan','\x20and\x20CSS:\x20','3604118YLWVkM','4TYhRpK','2UXOHBN','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','jsUrl','created','\x20menu(s)...','parse','skipped','Creating\x20','12sAVLCG','isArray','Menu\x20creation\x20failed','validation','trim','4879134ZWXwMu','CANCEL','failed','Online\x20menu\x20list\x20fetched','2055192YrIiiP','\x20\x20Cancelled.','sync','\x20menu(s)\x20created','\x20\x20Create\x20','33818780DgEPLM','boolean','✓\x20Menu\x20sync\x20completed:\x20','\x20\x20✓\x20Selected:\x20','5233232oWusxq','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first','message','yes','write','gray','Sync\x20local\x20pages\x20as\x20platform\x20menus','appCode','2563990QFokzc','\x20created,\x20'];a54_0x5aaf=function(){return _0x4597e4;};return a54_0x5aaf();}import{runMenuSyncCore,readPageLabelsFromStdin}from'./shared/sync-core.js';import{getLocalPages}from'./shared/local-pages.js';export const menuSync={'service':a54_0x589d3(0x196),'command':a54_0x589d3(0x174),'description':a54_0x589d3(0x182),'risk':a54_0x589d3(0x180),'flags':[{'name':a54_0x589d3(0x186),'type':'string','description':a54_0x589d3(0x162)+a54_0x589d3(0x199)},{'name':a54_0x589d3(0x17f),'type':a54_0x589d3(0x178),'description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0x3afbc4){const _0x4f4e67=a54_0x589d3,_0x2add3e=_0x3afbc4['flag'](_0x4f4e67(0x17f)),_0x4d26b3=_0x3afbc4['str'](_0x4f4e67(0x186)),_0x22348d=parseParams(_0x4d26b3),_0x343efb=!!(_0x22348d['jsUrl']||_0x22348d[_0x4f4e67(0x18d)]||_0x22348d[_0x4f4e67(0x193)]&&_0x22348d[_0x4f4e67(0x193)][_0x4f4e67(0x19a)]>0x0);if(_0x2add3e||_0x343efb){let _0x22ef75=[];!isInteractive()&&!_0x22348d[_0x4f4e67(0x193)]?.[_0x4f4e67(0x19a)]&&(_0x22ef75=await readPageLabelsFromStdin());const _0x3778b5=await runMenuSyncCore(_0x3afbc4['appCode'],_0x3afbc4[_0x4f4e67(0x18a)],_0x22ef75[_0x4f4e67(0x19a)]>0x0?_0x22ef75:_0x22348d[_0x4f4e67(0x193)]??[],_0x4d26b3);if(_0x3778b5[_0x4f4e67(0x167)]){const _0x3ec360=getLocalPages();_0x3ec360['length']===0x0?console[_0x4f4e67(0x188)](_0x4f4e67(0x197)):console[_0x4f4e67(0x188)](_0x4f4e67(0x17c));}else console['log'](_0x4f4e67(0x179)+_0x3778b5['created']+_0x4f4e67(0x175));return{'ok':!![]};}requireInteractive();const _0x11dac4=startSpinner(_0x4f4e67(0x191));let _0x3c42d2,_0x270482,_0x270e5f;try{const _0x27395d=await fetchMenuData(_0x3afbc4[_0x4f4e67(0x183)],_0x3afbc4[_0x4f4e67(0x18a)]);_0x3c42d2=_0x27395d['localPages'],_0x270482=_0x27395d[_0x4f4e67(0x18f)],_0x270e5f=_0x27395d[_0x4f4e67(0x189)],stopSpinner(_0x11dac4,_0x4f4e67(0x171),!![]);}catch(_0x5ee731){stopSpinner(_0x11dac4,_0x4f4e67(0x195),![]);throw CliErrors[_0x4f4e67(0x16c)](_0x5ee731 instanceof Error?_0x5ee731[_0x4f4e67(0x17e)]:_0x4f4e67(0x195));}if(_0x3c42d2[_0x4f4e67(0x19a)]===0x0)return console[_0x4f4e67(0x188)](a54_0x483c41['yellow'](_0x4f4e67(0x17d))),{'ok':!![]};const _0x2d3e80=buildCompareRows(_0x3c42d2,_0x270482);console['log'](renderCompareTable(_0x2d3e80)),console['log']();const _0x4aca67=_0x22348d[_0x4f4e67(0x193)],_0x5571c4=await selectPages(_0x3c42d2,_0x270482,_0x4aca67);console[_0x4f4e67(0x188)](),console[_0x4f4e67(0x188)](a54_0x483c41[_0x4f4e67(0x19b)](_0x4f4e67(0x17a)+_0x5571c4[_0x4f4e67(0x19a)]+_0x4f4e67(0x187)));const _0x9463ac=_0x22348d[_0x4f4e67(0x163)]&&_0x22348d['cssUrl'];if(!_0x9463ac){console[_0x4f4e67(0x188)](renderSyncSummary(_0x5571c4,_0x270482['size']>0x0));const _0x355e95=await askConfirm('\x20\x20Continue\x20with\x20creation?');if(!_0x355e95)return console['log'](a54_0x483c41[_0x4f4e67(0x181)](_0x4f4e67(0x173))),{'ok':!![]};}let _0x47f425=_0x22348d['jsUrl'],_0x5e7b41=_0x22348d[_0x4f4e67(0x18d)];if(!_0x47f425)try{_0x47f425=await askJsUrl();}catch(_0x1675cf){if(_0x1675cf['message']===_0x4f4e67(0x16f))return console[_0x4f4e67(0x188)](a54_0x483c41[_0x4f4e67(0x181)]('\x20\x20Cancelled.')),{'ok':!![]};throw _0x1675cf;}if(!_0x5e7b41)try{_0x5e7b41=await askCssUrl();}catch(_0x32dbff){if(_0x32dbff[_0x4f4e67(0x17e)]===_0x4f4e67(0x16f))return console['log'](a54_0x483c41[_0x4f4e67(0x181)]('\x20\x20Cancelled.')),{'ok':!![]};throw _0x32dbff;}const _0x567a91=await askConfirm(_0x4f4e67(0x176)+_0x5571c4['length']+_0x4f4e67(0x18e)+_0x47f425+_0x4f4e67(0x19c)+_0x5e7b41+'?');if(!_0x567a91)return console[_0x4f4e67(0x188)](a54_0x483c41[_0x4f4e67(0x181)](_0x4f4e67(0x173))),{'ok':!![]};const _0x20c4a1=[_0x47f425,_0x5e7b41],_0x17413f=startSpinner(_0x4f4e67(0x168)+_0x5571c4[_0x4f4e67(0x19a)]+_0x4f4e67(0x165));try{const _0x4dbc82=await doCreateMenus(_0x3afbc4['appCode'],_0x3afbc4[_0x4f4e67(0x18a)],_0x5571c4,_0x20c4a1);return stopSpinner(_0x17413f,_0x4f4e67(0x190)+_0x4dbc82[_0x4f4e67(0x164)]+'\x20menu(s)',!![]),{'ok':!![],'data':_0x4dbc82,'message':_0x4f4e67(0x194)+_0x4dbc82['created']+_0x4f4e67(0x185)+_0x4dbc82[_0x4f4e67(0x170)]+'\x20failed.'};}catch(_0x10d50a){stopSpinner(_0x17413f,'Menu\x20creation\x20failed',![]);throw CliErrors['validation'](_0x10d50a instanceof Error?_0x10d50a[_0x4f4e67(0x17e)]:_0x4f4e67(0x16b));}}};function a54_0x2135(_0x253f40,_0x285506){_0x253f40=_0x253f40-0x15f;const _0x5aafc5=a54_0x5aaf();let _0x213542=_0x5aafc5[_0x253f40];return _0x213542;}function parseParams(_0x5a2231){const _0x3c1096=a54_0x589d3;if(!_0x5a2231)return{};try{const _0x1d93ea=JSON[_0x3c1096(0x166)](_0x5a2231);if(typeof _0x1d93ea!==_0x3c1096(0x198)||_0x1d93ea===null||Array[_0x3c1096(0x16a)](_0x1d93ea))return{};return{'jsUrl':typeof _0x1d93ea[_0x3c1096(0x163)]===_0x3c1096(0x18b)?_0x1d93ea[_0x3c1096(0x163)][_0x3c1096(0x16d)]():undefined,'cssUrl':typeof _0x1d93ea[_0x3c1096(0x18d)]===_0x3c1096(0x18b)?_0x1d93ea[_0x3c1096(0x18d)][_0x3c1096(0x16d)]():undefined,'pages':Array[_0x3c1096(0x16a)](_0x1d93ea[_0x3c1096(0x193)])?_0x1d93ea[_0x3c1096(0x193)][_0x3c1096(0x192)](String):undefined};}catch{return{};}}
@@ -1 +1 @@
1
- function a57_0x3635(){const _0x5b5fd2=['validation','boolean','log','label','Updating\x20','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','params','jsUrl','map','Online\x20menu\x20list\x20fetched','\x20menu(s)...','\x20\x20Update\x20','gray','2016654oIqrWr','Updated\x20','trim','280TtVKNz','flag','yes','\x20menu(s)\x20updated','cyan','1242152VlNYyY','41616dRamom','parse','string','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','Failed\x20to\x20fetch\x20online\x20menu\x20list','error','\x20menu(s)\x20failed','\x20\x20Found\x20','str','length','\x20menu(s)\x20with\x20JS:\x20','7612mqfqdX','✓\x20Menu\x20update\x20completed:\x20','\x20and\x20CSS:\x20','\x20\x20Cancelled.','message','failed','write','Menu\x20update\x20completed:\x20','cssUrl','30388LPVxIi','179808vpGGbN','isArray','123gPcYDK','\x20updated,\x20','7NmRihc','updated','\x20failed.','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation','CANCEL','cookie','skipped','1803160NghTNr','\x20menu(s)\x20with\x20existing\x20resources','appCode','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','Menu\x20update\x20failed'];a57_0x3635=function(){return _0x5b5fd2;};return a57_0x3635();}const a57_0x50943f=a57_0x1ddc;(function(_0x271f69,_0x55d3f6){const _0x54de17=a57_0x1ddc,_0x17f4c5=_0x271f69();while(!![]){try{const _0x1ad56f=parseInt(_0x54de17(0x203))/0x1+-parseInt(_0x54de17(0x202))/0x2+parseInt(_0x54de17(0x205))/0x3*(parseInt(_0x54de17(0x1f9))/0x4)+-parseInt(_0x54de17(0x20e))/0x5+-parseInt(_0x54de17(0x1e5))/0x6*(-parseInt(_0x54de17(0x207))/0x7)+-parseInt(_0x54de17(0x1ed))/0x8+parseInt(_0x54de17(0x1ee))/0x9*(parseInt(_0x54de17(0x1e8))/0xa);if(_0x1ad56f===_0x55d3f6)break;else _0x17f4c5['push'](_0x17f4c5['shift']());}catch(_0x1c8e83){_0x17f4c5['push'](_0x17f4c5['shift']());}}}(a57_0x3635,0x2ef3d));import a57_0x14e504 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'./shared/logic.js';import{renderUpdateSummary}from'./shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'./shared/inquirer.js';function a57_0x1ddc(_0xd89d59,_0x83dc85){_0xd89d59=_0xd89d59-0x1dd;const _0x36357c=a57_0x3635();let _0x1ddc03=_0x36357c[_0xd89d59];return _0x1ddc03;}import{CliErrors}from'../../errors.js';import{runMenuUpdateCore}from'./shared/update-core.js';export const menuUpdate={'service':'menu','command':'update','description':a57_0x50943f(0x211),'risk':a57_0x50943f(0x1ff),'flags':[{'name':a57_0x50943f(0x1de),'type':a57_0x50943f(0x1f0),'description':a57_0x50943f(0x1f1)+a57_0x50943f(0x1dd)},{'name':a57_0x50943f(0x1ea),'type':a57_0x50943f(0x214),'description':a57_0x50943f(0x20a)}],async 'execute'(_0x515cf8){const _0x5c1389=a57_0x50943f,_0x57e9fa=_0x515cf8[_0x5c1389(0x1e9)](_0x5c1389(0x1ea)),_0x23a69d=_0x515cf8[_0x5c1389(0x1f6)]('params'),_0x1f8ecd=parseParams(_0x23a69d),_0x48c244=!!(_0x1f8ecd[_0x5c1389(0x1df)]||_0x1f8ecd[_0x5c1389(0x201)]);if(_0x57e9fa||_0x48c244&&!isInteractive()){const _0x416aaf=await runMenuUpdateCore(_0x515cf8['appCode'],_0x515cf8['cookie'],_0x23a69d);return _0x416aaf[_0x5c1389(0x20d)]?console[_0x5c1389(0x215)]('!\x20No\x20menus\x20with\x20existing\x20resources\x20found'):(console['log'](_0x5c1389(0x1fa)+_0x416aaf[_0x5c1389(0x208)]+_0x5c1389(0x1eb)),_0x416aaf['failed']>0x0&&console[_0x5c1389(0x1f3)]('!\x20'+_0x416aaf[_0x5c1389(0x1fe)]+_0x5c1389(0x1f4))),{'ok':_0x416aaf['failed']===0x0};}requireInteractive();const _0x4d3040=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x230709;try{_0x230709=await fetchOnlineMenuList(_0x515cf8['appCode'],_0x515cf8[_0x5c1389(0x20c)]),stopSpinner(_0x4d3040,_0x5c1389(0x1e1),!![]);}catch(_0x57a5c6){stopSpinner(_0x4d3040,_0x5c1389(0x1f2),![]);throw CliErrors[_0x5c1389(0x213)](_0x57a5c6 instanceof Error?_0x57a5c6['message']:'Failed\x20to\x20fetch\x20online\x20menu\x20list');}const _0x2bfadb=filterMenusWithResources(_0x230709);if(_0x2bfadb['length']===0x0)return console[_0x5c1389(0x215)](a57_0x14e504['yellow']('\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found')),{'ok':!![]};console['log'](),console[_0x5c1389(0x215)](a57_0x14e504[_0x5c1389(0x1ec)](_0x5c1389(0x1f5)+_0x2bfadb['length']+_0x5c1389(0x20f))),console[_0x5c1389(0x215)](renderUpdateSummary(_0x2bfadb[_0x5c1389(0x1e0)](_0x271103=>_0x271103[_0x5c1389(0x216)]),[_0x1f8ecd['jsUrl'],_0x1f8ecd['cssUrl']])),console[_0x5c1389(0x215)]();let _0x45b5ad=_0x1f8ecd[_0x5c1389(0x1df)],_0x3202bc=_0x1f8ecd['cssUrl'];if(!_0x45b5ad)try{_0x45b5ad=await askJsUrl();}catch(_0x4e7f5e){if(_0x4e7f5e['message']===_0x5c1389(0x20b))return console['log'](a57_0x14e504[_0x5c1389(0x1e4)](_0x5c1389(0x1fc))),{'ok':!![]};throw _0x4e7f5e;}if(!_0x3202bc)try{_0x3202bc=await askCssUrl();}catch(_0x388257){if(_0x388257['message']===_0x5c1389(0x20b))return console[_0x5c1389(0x215)](a57_0x14e504[_0x5c1389(0x1e4)](_0x5c1389(0x1fc))),{'ok':!![]};throw _0x388257;}const _0x8ee9b1=await askConfirm(_0x5c1389(0x1e3)+_0x2bfadb[_0x5c1389(0x1f7)]+_0x5c1389(0x1f8)+_0x45b5ad+_0x5c1389(0x1fb)+_0x3202bc+'?');if(!_0x8ee9b1)return console[_0x5c1389(0x215)](a57_0x14e504[_0x5c1389(0x1e4)](_0x5c1389(0x1fc))),{'ok':!![]};const _0x21a36b=[_0x45b5ad,_0x3202bc],_0x5cd2a5=startSpinner(_0x5c1389(0x217)+_0x2bfadb[_0x5c1389(0x1f7)]+_0x5c1389(0x1e2));try{const _0x4af7cb=await doUpdateCdnUrls(_0x515cf8[_0x5c1389(0x210)],_0x515cf8[_0x5c1389(0x20c)],_0x2bfadb,_0x21a36b);return stopSpinner(_0x5cd2a5,_0x5c1389(0x1e6)+_0x4af7cb[_0x5c1389(0x208)]+'\x20menu(s)',_0x4af7cb[_0x5c1389(0x1fe)]===0x0),{'ok':_0x4af7cb['failed']===0x0,'data':_0x4af7cb,'message':_0x4af7cb['failed']>0x0?_0x5c1389(0x200)+_0x4af7cb[_0x5c1389(0x208)]+_0x5c1389(0x206)+_0x4af7cb[_0x5c1389(0x1fe)]+_0x5c1389(0x209):_0x5c1389(0x200)+_0x4af7cb[_0x5c1389(0x208)]+'\x20updated.'};}catch(_0x2a825f){stopSpinner(_0x5cd2a5,_0x5c1389(0x212),![]);throw CliErrors[_0x5c1389(0x213)](_0x2a825f instanceof Error?_0x2a825f[_0x5c1389(0x1fd)]:'Menu\x20update\x20failed');}}};function parseParams(_0x172150){const _0x13d480=a57_0x50943f;if(!_0x172150)return{};try{const _0x569851=JSON[_0x13d480(0x1ef)](_0x172150);if(typeof _0x569851!=='object'||_0x569851===null||Array[_0x13d480(0x204)](_0x569851))return{};return{'jsUrl':typeof _0x569851[_0x13d480(0x1df)]===_0x13d480(0x1f0)?_0x569851[_0x13d480(0x1df)][_0x13d480(0x1e7)]():undefined,'cssUrl':typeof _0x569851['cssUrl']===_0x13d480(0x1f0)?_0x569851['cssUrl'][_0x13d480(0x1e7)]():undefined};}catch{return{};}}
1
+ const a55_0x21f760=a55_0x5c80;(function(_0x1e725d,_0x1b22ae){const _0x367461=a55_0x5c80,_0x52b58f=_0x1e725d();while(!![]){try{const _0x19a755=parseInt(_0x367461(0x1e7))/0x1*(parseInt(_0x367461(0x1e6))/0x2)+-parseInt(_0x367461(0x1d2))/0x3+-parseInt(_0x367461(0x1ce))/0x4*(parseInt(_0x367461(0x1ed))/0x5)+-parseInt(_0x367461(0x1c6))/0x6+parseInt(_0x367461(0x1e4))/0x7*(parseInt(_0x367461(0x1c1))/0x8)+parseInt(_0x367461(0x1cd))/0x9+parseInt(_0x367461(0x1b9))/0xa*(-parseInt(_0x367461(0x1cb))/0xb);if(_0x19a755===_0x1b22ae)break;else _0x52b58f['push'](_0x52b58f['shift']());}catch(_0x233a96){_0x52b58f['push'](_0x52b58f['shift']());}}}(a55_0x54cb,0x1b629));import a55_0x264d53 from'chalk';function a55_0x5c80(_0x2d7284,_0x5a3126){_0x2d7284=_0x2d7284-0x1b6;const _0x54cb6b=a55_0x54cb();let _0x5c80f4=_0x54cb6b[_0x2d7284];return _0x5c80f4;}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 a55_0x54cb(){const _0xa21484=['yellow','CANCEL','menu','\x20failed.','length','Menu\x20update\x20completed:\x20','Fetching\x20online\x20menu\x20list...','7AFevnO','trim','100smYTnV','2606yDEEFR','map','flag','\x20menu(s)\x20with\x20existing\x20resources','\x20\x20Cancelled.','parse','255455wHQZDv','skipped','Updated\x20','cookie','yes','810WkzEnX','Menu\x20update\x20failed','cyan','failed','boolean','object','jsUrl','cssUrl','1413256WmVbcu','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','validation','log','update','690894pMNmmm','gray','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','message','\x20menu(s)','3366QDsotn','\x20menu(s)...','1072773dDrkii','8lexQRA','✓\x20Menu\x20update\x20completed:\x20','appCode','Online\x20menu\x20list\x20fetched','215604gJMqGV','string','updated','isArray','params','\x20menu(s)\x20updated','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20\x20Found\x20','\x20updated,\x20','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources'];a55_0x54cb=function(){return _0xa21484;};return a55_0x54cb();}export const menuUpdate={'service':a55_0x21f760(0x1df),'command':a55_0x21f760(0x1c5),'description':a55_0x21f760(0x1dc),'risk':'write','flags':[{'name':a55_0x21f760(0x1d6),'type':a55_0x21f760(0x1d3),'description':a55_0x21f760(0x1c8)+a55_0x21f760(0x1d8)},{'name':a55_0x21f760(0x1b8),'type':a55_0x21f760(0x1bd),'description':'Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation'}],async 'execute'(_0x37c706){const _0x22e775=a55_0x21f760,_0x4c57f5=_0x37c706[_0x22e775(0x1e9)]('yes'),_0x4d5f45=_0x37c706['str']('params'),_0x3f37b4=parseParams(_0x4d5f45),_0x3fde15=!!(_0x3f37b4['jsUrl']||_0x3f37b4[_0x22e775(0x1c0)]);if(_0x4c57f5||_0x3fde15&&!isInteractive()){const _0x16bd68=await runMenuUpdateCore(_0x37c706['appCode'],_0x37c706['cookie'],_0x4d5f45);return _0x16bd68[_0x22e775(0x1ee)]?console[_0x22e775(0x1c4)](_0x22e775(0x1c2)):(console[_0x22e775(0x1c4)](_0x22e775(0x1cf)+_0x16bd68['updated']+_0x22e775(0x1d7)),_0x16bd68[_0x22e775(0x1bc)]>0x0&&console['error']('!\x20'+_0x16bd68['failed']+'\x20menu(s)\x20failed')),{'ok':_0x16bd68[_0x22e775(0x1bc)]===0x0};}requireInteractive();const _0x5ccc23=startSpinner(_0x22e775(0x1e3));let _0x4d9f0d;try{_0x4d9f0d=await fetchOnlineMenuList(_0x37c706[_0x22e775(0x1d0)],_0x37c706[_0x22e775(0x1b7)]),stopSpinner(_0x5ccc23,_0x22e775(0x1d1),!![]);}catch(_0xd1e111){stopSpinner(_0x5ccc23,_0x22e775(0x1d9),![]);throw CliErrors[_0x22e775(0x1c3)](_0xd1e111 instanceof Error?_0xd1e111[_0x22e775(0x1c9)]:_0x22e775(0x1d9));}const _0x3470e9=filterMenusWithResources(_0x4d9f0d);if(_0x3470e9['length']===0x0)return console[_0x22e775(0x1c4)](a55_0x264d53[_0x22e775(0x1dd)]('\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found')),{'ok':!![]};console[_0x22e775(0x1c4)](),console['log'](a55_0x264d53[_0x22e775(0x1bb)](_0x22e775(0x1da)+_0x3470e9[_0x22e775(0x1e1)]+_0x22e775(0x1ea))),console['log'](renderUpdateSummary(_0x3470e9[_0x22e775(0x1e8)](_0x19be79=>_0x19be79['label']),[_0x3f37b4[_0x22e775(0x1bf)],_0x3f37b4['cssUrl']])),console[_0x22e775(0x1c4)]();let _0x2355c1=_0x3f37b4[_0x22e775(0x1bf)],_0x51aa92=_0x3f37b4[_0x22e775(0x1c0)];if(!_0x2355c1)try{_0x2355c1=await askJsUrl();}catch(_0x1d75f6){if(_0x1d75f6['message']===_0x22e775(0x1de))return console[_0x22e775(0x1c4)](a55_0x264d53[_0x22e775(0x1c7)](_0x22e775(0x1eb))),{'ok':!![]};throw _0x1d75f6;}if(!_0x51aa92)try{_0x51aa92=await askCssUrl();}catch(_0x4b7e44){if(_0x4b7e44[_0x22e775(0x1c9)]==='CANCEL')return console[_0x22e775(0x1c4)](a55_0x264d53[_0x22e775(0x1c7)](_0x22e775(0x1eb))),{'ok':!![]};throw _0x4b7e44;}const _0x211a26=await askConfirm('\x20\x20Update\x20'+_0x3470e9[_0x22e775(0x1e1)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x2355c1+'\x20and\x20CSS:\x20'+_0x51aa92+'?');if(!_0x211a26)return console[_0x22e775(0x1c4)](a55_0x264d53[_0x22e775(0x1c7)](_0x22e775(0x1eb))),{'ok':!![]};const _0x1f4158=[_0x2355c1,_0x51aa92],_0x2ead36=startSpinner('Updating\x20'+_0x3470e9['length']+_0x22e775(0x1cc));try{const _0x54931d=await doUpdateCdnUrls(_0x37c706[_0x22e775(0x1d0)],_0x37c706[_0x22e775(0x1b7)],_0x3470e9,_0x1f4158);return stopSpinner(_0x2ead36,_0x22e775(0x1b6)+_0x54931d[_0x22e775(0x1d4)]+_0x22e775(0x1ca),_0x54931d[_0x22e775(0x1bc)]===0x0),{'ok':_0x54931d[_0x22e775(0x1bc)]===0x0,'data':_0x54931d,'message':_0x54931d[_0x22e775(0x1bc)]>0x0?_0x22e775(0x1e2)+_0x54931d[_0x22e775(0x1d4)]+_0x22e775(0x1db)+_0x54931d['failed']+_0x22e775(0x1e0):_0x22e775(0x1e2)+_0x54931d[_0x22e775(0x1d4)]+'\x20updated.'};}catch(_0x32f61e){stopSpinner(_0x2ead36,_0x22e775(0x1ba),![]);throw CliErrors[_0x22e775(0x1c3)](_0x32f61e instanceof Error?_0x32f61e[_0x22e775(0x1c9)]:_0x22e775(0x1ba));}}};function parseParams(_0x340351){const _0x2545c6=a55_0x21f760;if(!_0x340351)return{};try{const _0x44e81c=JSON[_0x2545c6(0x1ec)](_0x340351);if(typeof _0x44e81c!==_0x2545c6(0x1be)||_0x44e81c===null||Array[_0x2545c6(0x1d5)](_0x44e81c))return{};return{'jsUrl':typeof _0x44e81c[_0x2545c6(0x1bf)]===_0x2545c6(0x1d3)?_0x44e81c[_0x2545c6(0x1bf)][_0x2545c6(0x1e5)]():undefined,'cssUrl':typeof _0x44e81c[_0x2545c6(0x1c0)]===_0x2545c6(0x1d3)?_0x44e81c['cssUrl'][_0x2545c6(0x1e5)]():undefined};}catch{return{};}}
@@ -1 +1 @@
1
- const a58_0x129a07=a58_0x4a37;(function(_0x32badd,_0x3e2de8){const _0x54a2ad=a58_0x4a37,_0xd451a9=_0x32badd();while(!![]){try{const _0xf227c6=parseInt(_0x54a2ad(0x204))/0x1+-parseInt(_0x54a2ad(0x1fb))/0x2+parseInt(_0x54a2ad(0x210))/0x3+-parseInt(_0x54a2ad(0x218))/0x4*(parseInt(_0x54a2ad(0x20e))/0x5)+-parseInt(_0x54a2ad(0x1ff))/0x6+-parseInt(_0x54a2ad(0x1f8))/0x7*(parseInt(_0x54a2ad(0x1fc))/0x8)+parseInt(_0x54a2ad(0x1f3))/0x9;if(_0xf227c6===_0x3e2de8)break;else _0xd451a9['push'](_0xd451a9['shift']());}catch(_0x3119f9){_0xd451a9['push'](_0xd451a9['shift']());}}}(a58_0x2520,0xbccb8));function a58_0x2520(){const _0x5a1a56=['\x20(监听模式)','pipe','close','执行预览命令','--watch','45LkHryZ','trim','3312726jnarwz','toString','data','预览服务器启动成功','error','message','.bin','logger','397636bDeIzQ','10453293dEZKPO','vite','preview','inherit','Preview\x20project','204764sLHIBJ','info','all','577092kwFpma','88Rbefvc','node_modules','PATH','389124OKhnIi','cwd','success','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','watch','77438ASwAfH','stderr','env','vite\x20preview','预览服务器启动失败'];a58_0x2520=function(){return _0x5a1a56;};return a58_0x2520();}import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function a58_0x4a37(_0x55b750,_0x4a1e06){_0x55b750=_0x55b750-0x1f3;const _0x2520f3=a58_0x2520();let _0x4a3794=_0x2520f3[_0x55b750];return _0x4a3794;}function runPreview(_0x4ae8fc){return new Promise((_0x2af4f,_0x3265c2)=>{const _0x3909b1=a58_0x4a37,_0x3d133a=Date['now']();_0x4ae8fc[_0x3909b1(0x217)][_0x3909b1(0x1f9)](_0x3909b1(0x1f5),'启动预览服务器',{'command':_0x3909b1(0x207)});let _0x134898='';const _0x414b36=spawn(_0x3909b1(0x1f4),[_0x3909b1(0x1f5)],{'stdio':[_0x3909b1(0x1f6),_0x3909b1(0x1f6),_0x3909b1(0x20a)],'shell':!![],'env':{...process[_0x3909b1(0x206)],'PATH':''+join(process[_0x3909b1(0x200)](),_0x3909b1(0x1fd),_0x3909b1(0x216))+delimiter+process['env'][_0x3909b1(0x1fe)]}});_0x414b36[_0x3909b1(0x205)]?.['on'](_0x3909b1(0x212),_0x133ae0=>{const _0x31c671=_0x3909b1;_0x134898+=_0x133ae0[_0x31c671(0x211)]();}),_0x414b36['on']('close',_0x31b3d8=>{const _0x3c0f5d=_0x3909b1,_0x25b34a=Date['now']()-_0x3d133a;if(_0x31b3d8===0x0||_0x31b3d8===null)_0x4ae8fc[_0x3c0f5d(0x217)][_0x3c0f5d(0x201)]('preview',_0x3c0f5d(0x213),_0x25b34a),_0x2af4f();else{const _0x2a84eb={'exitCode':_0x31b3d8,'duration':_0x25b34a,'command':'vite\x20preview','cwd':process['cwd']()};_0x134898[_0x3c0f5d(0x20f)]()&&(_0x2a84eb[_0x3c0f5d(0x205)]=_0x134898['trim']()),_0x4ae8fc[_0x3c0f5d(0x217)]['error'](_0x3c0f5d(0x1f5),_0x3c0f5d(0x208),_0x2a84eb),_0x3265c2(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x31b3d8));}}),_0x414b36['on']('error',_0x27b8e2=>{const _0x4686fe=_0x3909b1,_0x193f46=Date['now']()-_0x3d133a;_0x4ae8fc[_0x4686fe(0x217)][_0x4686fe(0x214)](_0x4686fe(0x1f5),'预览服务器启动出错',{'error':_0x27b8e2[_0x4686fe(0x215)],'duration':_0x193f46,'stderr':_0x134898[_0x4686fe(0x20f)]()||undefined}),_0x3265c2(_0x27b8e2);});});}function runBuildWatch(){return new Promise((_0x809ef5,_0x2d5ff4)=>{const _0x388bb7=a58_0x4a37,_0x2aa9f3=spawn(_0x388bb7(0x1f4),['build',_0x388bb7(0x20d)],{'stdio':_0x388bb7(0x1f6),'shell':!![],'env':{...process[_0x388bb7(0x206)],'PATH':''+join(process[_0x388bb7(0x200)](),_0x388bb7(0x1fd),'.bin')+delimiter+process[_0x388bb7(0x206)]['PATH']}});_0x2aa9f3['on'](_0x388bb7(0x20b),_0x3aced6=>{const _0xf2b650=_0x388bb7;if(_0x3aced6===0x0||_0x3aced6===null)_0x809ef5();else _0x2d5ff4(new Error(_0xf2b650(0x202)+_0x3aced6));}),_0x2aa9f3['on']('error',_0x2d5ff4);});}export const previewCommand={'name':a58_0x129a07(0x1f5),'description':a58_0x129a07(0x1f7),async 'run'(_0x159aec,_0x422e5d,_0x29a069){const _0x4ff651=a58_0x129a07,_0x3af365=_0x29a069[_0x4ff651(0x203)];_0x159aec[_0x4ff651(0x217)][_0x4ff651(0x1f9)](_0x4ff651(0x1f5),_0x4ff651(0x20c)+(_0x3af365?_0x4ff651(0x209):'')),_0x3af365?await Promise[_0x4ff651(0x1fa)]([runBuildWatch(),runPreview(_0x159aec)]):await runPreview(_0x159aec);}};
1
+ function a56_0x5d78(_0x50d4f2,_0x3778f7){_0x50d4f2=_0x50d4f2-0xe0;const _0xe0cd09=a56_0xe0cd();let _0x5d7892=_0xe0cd09[_0x50d4f2];return _0x5d7892;}const a56_0xac7401=a56_0x5d78;(function(_0x4683a8,_0x5ce10a){const _0x45d050=a56_0x5d78,_0x32296d=_0x4683a8();while(!![]){try{const _0x310313=parseInt(_0x45d050(0x100))/0x1+-parseInt(_0x45d050(0xe1))/0x2*(parseInt(_0x45d050(0xfc))/0x3)+-parseInt(_0x45d050(0xeb))/0x4+-parseInt(_0x45d050(0xf3))/0x5+parseInt(_0x45d050(0x101))/0x6+-parseInt(_0x45d050(0xe5))/0x7+parseInt(_0x45d050(0xff))/0x8;if(_0x310313===_0x5ce10a)break;else _0x32296d['push'](_0x32296d['shift']());}catch(_0x4fdeb5){_0x32296d['push'](_0x32296d['shift']());}}}(a56_0xe0cd,0xd90d1));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function runPreview(_0x38e161){return new Promise((_0x4947f7,_0x53e0d4)=>{const _0x4c15e9=a56_0x5d78,_0xeb94fe=Date[_0x4c15e9(0xf6)]();_0x38e161[_0x4c15e9(0xe7)]['info'](_0x4c15e9(0xee),_0x4c15e9(0xe4),{'command':_0x4c15e9(0xe3)});let _0x579bf3='';const _0x16fb97=spawn(_0x4c15e9(0x103),[_0x4c15e9(0xee)],{'stdio':['inherit',_0x4c15e9(0xea),_0x4c15e9(0xf2)],'shell':!![],'env':{...process[_0x4c15e9(0xfd)],'PATH':''+join(process[_0x4c15e9(0xf0)](),'node_modules',_0x4c15e9(0xf4))+delimiter+process['env'][_0x4c15e9(0xf8)]}});_0x16fb97['stderr']?.['on'](_0x4c15e9(0xe0),_0x5e75bb=>{const _0xc567ba=_0x4c15e9;_0x579bf3+=_0x5e75bb[_0xc567ba(0xed)]();}),_0x16fb97['on']('close',_0x1fb194=>{const _0x43b43b=_0x4c15e9,_0x140c03=Date['now']()-_0xeb94fe;if(_0x1fb194===0x0||_0x1fb194===null)_0x38e161[_0x43b43b(0xe7)][_0x43b43b(0xe8)](_0x43b43b(0xee),'预览服务器启动成功',_0x140c03),_0x4947f7();else{const _0x2600b2={'exitCode':_0x1fb194,'duration':_0x140c03,'command':_0x43b43b(0xe3),'cwd':process['cwd']()};_0x579bf3[_0x43b43b(0x105)]()&&(_0x2600b2[_0x43b43b(0xf1)]=_0x579bf3[_0x43b43b(0x105)]()),_0x38e161[_0x43b43b(0xe7)][_0x43b43b(0xec)](_0x43b43b(0xee),_0x43b43b(0xe6),_0x2600b2),_0x53e0d4(new Error(_0x43b43b(0xfa)+_0x1fb194));}}),_0x16fb97['on'](_0x4c15e9(0xec),_0x307986=>{const _0x254362=_0x4c15e9,_0x8f16=Date[_0x254362(0xf6)]()-_0xeb94fe;_0x38e161[_0x254362(0xe7)][_0x254362(0xec)]('preview',_0x254362(0xf9),{'error':_0x307986[_0x254362(0x106)],'duration':_0x8f16,'stderr':_0x579bf3[_0x254362(0x105)]()||undefined}),_0x53e0d4(_0x307986);});});}function runBuildWatch(){return new Promise((_0x23351d,_0x19d382)=>{const _0x4c84a7=a56_0x5d78,_0x3ec555=spawn(_0x4c84a7(0x103),[_0x4c84a7(0xf7),'--watch'],{'stdio':_0x4c84a7(0xea),'shell':!![],'env':{...process[_0x4c84a7(0xfd)],'PATH':''+join(process[_0x4c84a7(0xf0)](),_0x4c84a7(0xe9),_0x4c84a7(0xf4))+delimiter+process['env'][_0x4c84a7(0xf8)]}});_0x3ec555['on'](_0x4c84a7(0xe2),_0x881a81=>{if(_0x881a81===0x0||_0x881a81===null)_0x23351d();else _0x19d382(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x881a81));}),_0x3ec555['on']('error',_0x19d382);});}export const previewCommand={'name':'preview','description':a56_0xac7401(0xef),async 'run'(_0x19aff2,_0x3c4f2e,_0x1f9136){const _0x4409f4=a56_0xac7401,_0x11b8f1=_0x1f9136[_0x4409f4(0xfe)];_0x19aff2['logger'][_0x4409f4(0x104)](_0x4409f4(0xee),_0x4409f4(0xfb)+(_0x11b8f1?_0x4409f4(0xf5):'')),_0x11b8f1?await Promise[_0x4409f4(0x102)]([runBuildWatch(),runPreview(_0x19aff2)]):await runPreview(_0x19aff2);}};function a56_0xe0cd(){const _0x57f2ca=['Preview\x20project','cwd','stderr','pipe','2723180kfESEr','.bin','\x20(监听模式)','now','build','PATH','预览服务器启动出错','vite\x20preview\x20exited\x20with\x20code\x20','执行预览命令','47679ochFhx','env','watch','10854448wlkPfz','1001546MBkaIU','7547562SSdgLg','all','vite','info','trim','message','data','118wgarxz','close','vite\x20preview','启动预览服务器','2420194OyPFHz','预览服务器启动失败','logger','success','node_modules','inherit','3596692ECXAXN','error','toString','preview'];a56_0xe0cd=function(){return _0x57f2ca;};return a56_0xe0cd();}
@@ -1 +1 @@
1
- const a59_0x81ba70=a59_0x2f2b;(function(_0x16870e,_0x6ba2db){const _0xf11705=a59_0x2f2b,_0x5c1074=_0x16870e();while(!![]){try{const _0x29947f=parseInt(_0xf11705(0xae))/0x1*(parseInt(_0xf11705(0xd2))/0x2)+parseInt(_0xf11705(0xc9))/0x3+-parseInt(_0xf11705(0x9e))/0x4*(parseInt(_0xf11705(0xb7))/0x5)+parseInt(_0xf11705(0x93))/0x6*(-parseInt(_0xf11705(0xe0))/0x7)+parseInt(_0xf11705(0xf5))/0x8+-parseInt(_0xf11705(0xb6))/0x9*(-parseInt(_0xf11705(0xd6))/0xa)+-parseInt(_0xf11705(0xd3))/0xb;if(_0x29947f===_0x6ba2db)break;else _0x5c1074['push'](_0x5c1074['shift']());}catch(_0x2d9986){_0x5c1074['push'](_0x5c1074['shift']());}}}(a59_0x7f6c,0x8b852));import a59_0x2a5b79 from'chalk';import a59_0x19a77d 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[a59_0x81ba70(0xeb)](_0x3d6c4e=>_0x3d6c4e!==NEW_CONFIG_NAME);function a59_0x2f2b(_0x40cff9,_0x46579a){_0x40cff9=_0x40cff9-0x86;const _0x7f6cad=a59_0x7f6c();let _0x2f2b26=_0x7f6cad[_0x40cff9];return _0x2f2b26;}function collectIdeSkillFiles(_0xb49e5b){const _0x2db33b=a59_0x81ba70,_0x397212=[];for(const _0x6739ac of Object[_0x2db33b(0xc5)](CORE_IDE_CONFIGS)){if(_0x6739ac['files'])for(const _0x3690e3 of _0x6739ac[_0x2db33b(0xe7)]){_0x397212[_0x2db33b(0x97)](resolve(_0xb49e5b,_0x3690e3[_0x2db33b(0xda)]));}}return _0x397212;}function analyse(_0x551891){const _0x55a894=a59_0x81ba70;let _0x4af43a=null;const _0x10264c=resolve(_0x551891,NEW_CONFIG_NAME),_0x3bc1f2=existsSync(_0x10264c);for(const _0x3da1e3 of LEGACY_CONFIG_NAMES){const _0x342a12=resolve(_0x551891,_0x3da1e3);if(existsSync(_0x342a12)){const _0x278612=readConfigFile(_0x342a12),_0x99d23a=Object[_0x55a894(0xf9)](_0x278612)[_0x55a894(0xeb)](_0x4bbf13=>typeof _0x278612[_0x4bbf13]!==_0x55a894(0xb1));_0x4af43a={'oldPath':_0x342a12,'hasNewConfig':_0x3bc1f2,'fields':_0x99d23a};break;}}const _0x18e18c=[],_0x1d39f6=resolve(_0x551891,_0x55a894(0x87));if(existsSync(_0x1d39f6))_0x18e18c[_0x55a894(0x97)](_0x1d39f6);const _0xbcae25=resolve(_0x551891,_0x55a894(0xf7));if(existsSync(_0xbcae25))_0x18e18c[_0x55a894(0x97)](_0xbcae25);const _0x541656=resolve(_0x551891,'.claude/skills/lovrabet');if(existsSync(_0x541656))_0x18e18c[_0x55a894(0x97)](_0x541656);for(const _0x4193ac of collectIdeSkillFiles(_0x551891)){if(existsSync(_0x4193ac))_0x18e18c[_0x55a894(0x97)](_0x4193ac);}let _0x3b133a=null;const _0x16205a=resolve(_0x551891,_0x55a894(0xe8));if(existsSync(_0x16205a))try{const _0xd08977=JSON[_0x55a894(0xa5)](readFileSync(_0x16205a,_0x55a894(0x9c)));if(_0xd08977?.[_0x55a894(0xdc)]&&typeof _0xd08977[_0x55a894(0xdc)]===_0x55a894(0x8d)){const _0x222c62=[];for(const [_0x49800b,_0x49bde1]of Object[_0x55a894(0xb2)](_0xd08977[_0x55a894(0xdc)])){const _0x5bdce7=_0x49bde1;_0x5bdce7?.[_0x55a894(0xd0)]&&Array[_0x55a894(0x96)](_0x5bdce7['args'])&&_0x5bdce7[_0x55a894(0xd0)]['some'](_0x2da472=>typeof _0x2da472===_0x55a894(0xc1)&&_0x2da472['includes'](_0x55a894(0xd1)))&&_0x222c62[_0x55a894(0x97)](_0x49800b);}_0x222c62[_0x55a894(0xc6)]>0x0&&(_0x3b133a={'path':_0x16205a,'keys':_0x222c62});}}catch{}const _0x33db27=_0x18e18c[_0x55a894(0xc6)]>0x0||_0x4af43a!==null;return{'configMigration':_0x4af43a,'oldArtifacts':_0x18e18c,'oldMcpConfig':_0x3b133a,'needsSkillSwap':_0x33db27};}function printReport(_0x3feefb){const _0x3a2359=a59_0x81ba70,{configMigration:_0x4c35d8,oldArtifacts:_0x21e847,oldMcpConfig:_0x15f1fe,needsSkillSwap:_0x2a4f00}=_0x3feefb;console[_0x3a2359(0xd8)](''),console[_0x3a2359(0xd8)](a59_0x2a5b79[_0x3a2359(0xa8)](_0x3a2359(0xf4))),console[_0x3a2359(0xd8)]('');_0x4c35d8?(console[_0x3a2359(0xd8)](a59_0x2a5b79[_0x3a2359(0xb3)]('Config\x20file:')+('\x20\x20'+a59_0x2a5b79['yellow'](_0x4c35d8[_0x3a2359(0xc0)]))),console[_0x3a2359(0xd8)](_0x3a2359(0xe6)+(_0x4c35d8[_0x3a2359(0xd7)]?a59_0x2a5b79[_0x3a2359(0xa2)](_0x3a2359(0xe1)):a59_0x2a5b79[_0x3a2359(0x8c)]('not\x20found\x20(will\x20create)'))),console[_0x3a2359(0xd8)]('\x20\x20Fields\x20to\x20migrate:\x20'+_0x4c35d8['fields']['join'](',\x20')),console[_0x3a2359(0xd8)](_0x3a2359(0x95))):console[_0x3a2359(0xd8)](a59_0x2a5b79['cyan'](_0x3a2359(0xfa))+'\x20\x20'+a59_0x2a5b79[_0x3a2359(0x8c)](_0x3a2359(0x9d)));console['log']('');if(_0x21e847[_0x3a2359(0xc6)]>0x0){console[_0x3a2359(0xd8)](a59_0x2a5b79[_0x3a2359(0xb3)]('Legacy\x20artifacts:'));for(const _0x50f276 of _0x21e847){console[_0x3a2359(0xd8)]('\x20\x20'+a59_0x2a5b79[_0x3a2359(0xe3)]('FOUND')+'\x20\x20'+_0x50f276);}console[_0x3a2359(0xd8)](_0x3a2359(0xa6));}else console[_0x3a2359(0xd8)](a59_0x2a5b79[_0x3a2359(0xb3)](_0x3a2359(0xe9))+'\x20\x20'+a59_0x2a5b79[_0x3a2359(0x8c)](_0x3a2359(0xcd)));console[_0x3a2359(0xd8)](''),_0x15f1fe?(console[_0x3a2359(0xd8)](a59_0x2a5b79['cyan'](_0x3a2359(0xa1))+('\x20\x20'+a59_0x2a5b79[_0x3a2359(0xee)](_0x15f1fe['path'])+_0x3a2359(0x8f)+_0x15f1fe['keys']['join'](',\x20'))),console[_0x3a2359(0xd8)](_0x3a2359(0xa9))):console[_0x3a2359(0xd8)](a59_0x2a5b79[_0x3a2359(0xb3)](_0x3a2359(0xa1))+'\x20\x20'+a59_0x2a5b79[_0x3a2359(0x8c)](_0x3a2359(0x86))),console[_0x3a2359(0xd8)](''),console[_0x3a2359(0xd8)](a59_0x2a5b79[_0x3a2359(0xb3)]('Skill\x20swap:')+('\x20\x20'+(_0x2a4f00?a59_0x2a5b79['yellow'](_0x3a2359(0x90)):a59_0x2a5b79[_0x3a2359(0xa2)](_0x3a2359(0xc8))))),_0x2a4f00&&console[_0x3a2359(0xd8)](_0x3a2359(0xa7)),console['log']('');}function execConfigMigration(_0x3f0466,_0xa1d0ed){const _0x4bb52a=a59_0x81ba70,{configMigration:_0x4ecfa5}=_0x3f0466;if(!_0x4ecfa5?.[_0x4bb52a(0xc0)])return{'step':0x1,'label':_0x4bb52a(0xcf),'ok':!![],'detail':_0x4bb52a(0xad)};const _0x35db1b=readConfigFile(_0x4ecfa5[_0x4bb52a(0xc0)]),_0x3d9642=resolve(_0xa1d0ed,NEW_CONFIG_NAME),_0x14a47d=_0x4ecfa5[_0x4bb52a(0xd7)]?readConfigFile(_0x3d9642):{};for(const [_0x59f0e9,_0x3b1c5a]of Object[_0x4bb52a(0xb2)](_0x35db1b)){!(_0x59f0e9 in _0x14a47d)&&(_0x14a47d[_0x59f0e9]=_0x3b1c5a);}writeConfigFile(_0x3d9642,_0x14a47d);const _0x1e905e=_0x4ecfa5[_0x4bb52a(0xc0)]+_0x4bb52a(0xc7);return renameSync(_0x4ecfa5['oldPath'],_0x1e905e),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x4ecfa5[_0x4bb52a(0xc0)]+_0x4bb52a(0xdb)+_0x3d9642+_0x4bb52a(0x8b)+_0x1e905e+')'};}function execRemoveOldArtifacts(_0x24d3ea){const _0x5dc7fb=a59_0x81ba70,_0x52e43d=[];for(const _0x14bbc2 of _0x24d3ea){try{if(!existsSync(_0x14bbc2))continue;const _0x430b59=tryStat(_0x14bbc2);_0x430b59?.[_0x5dc7fb(0xca)]()?rmSync(_0x14bbc2,{'recursive':!![],'force':!![]}):unlinkSync(_0x14bbc2);}catch(_0x29d587){_0x52e43d[_0x5dc7fb(0x97)](_0x14bbc2+':\x20'+_0x29d587[_0x5dc7fb(0xf8)]);}}return{'step':0x3,'label':_0x5dc7fb(0x9b),'ok':_0x52e43d[_0x5dc7fb(0xc6)]===0x0,'detail':_0x52e43d[_0x5dc7fb(0xc6)]>0x0?_0x24d3ea[_0x5dc7fb(0xc6)]-_0x52e43d[_0x5dc7fb(0xc6)]+'/'+_0x24d3ea[_0x5dc7fb(0xc6)]+'\x20removed\x20('+_0x52e43d['join'](';\x20')+')':_0x24d3ea[_0x5dc7fb(0xc6)]+_0x5dc7fb(0x91)};}function execCleanMcp(_0x503f4c){const _0x5f44e4=a59_0x81ba70;if(!_0x503f4c[_0x5f44e4(0xa3)])return{'step':0x4,'label':_0x5f44e4(0xd5),'ok':!![],'detail':_0x5f44e4(0xed)};try{const _0x18b19d=readFileSync(_0x503f4c[_0x5f44e4(0xa3)][_0x5f44e4(0xda)],_0x5f44e4(0x9c)),_0x1e052e=JSON['parse'](_0x18b19d);if(_0x1e052e?.['mcpServers']&&typeof _0x1e052e[_0x5f44e4(0xdc)]===_0x5f44e4(0x8d)){const _0x56b99b=[];for(const [_0x104cb5,_0x566ce3]of Object[_0x5f44e4(0xb2)](_0x1e052e[_0x5f44e4(0xdc)])){_0x566ce3?.['args']&&Array[_0x5f44e4(0x96)](_0x566ce3[_0x5f44e4(0xd0)])&&_0x566ce3[_0x5f44e4(0xd0)]['some'](_0x111ecb=>typeof _0x111ecb===_0x5f44e4(0xc1)&&_0x111ecb['includes'](_0x5f44e4(0xd1)))&&_0x56b99b[_0x5f44e4(0x97)](_0x104cb5);}for(const _0x361955 of _0x56b99b){delete _0x1e052e['mcpServers'][_0x361955];}return _0x56b99b[_0x5f44e4(0xc6)]>0x0&&writeFileSync(_0x503f4c[_0x5f44e4(0xa3)][_0x5f44e4(0xda)],JSON['stringify'](_0x1e052e,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x5f44e4(0x98)+_0x56b99b[_0x5f44e4(0xf0)](',\x20')+_0x5f44e4(0xd9)+_0x503f4c[_0x5f44e4(0xa3)][_0x5f44e4(0xda)]};}return{'step':0x4,'label':_0x5f44e4(0xd5),'ok':!![],'detail':_0x5f44e4(0xbb)};}catch(_0x448e8e){return{'step':0x4,'label':_0x5f44e4(0xd5),'ok':![],'detail':_0x448e8e['message']};}}function a59_0x7f6c(){const _0x41105e=['no\x20legacy\x20entry','.lovrabet','Remove\x20old\x20skill','upgrade','Step\x201/6:\x20Migrating\x20config...','\x20(backup:\x20','gray','object','Install\x20new\x20skill','\x20→\x20keys:\x20','needed','\x20removed','cwd','210GSvaGc','Step\x201/6:\x20Config\x20migration\x20—\x20','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','isArray','push','removed\x20','Step\x202/6:\x20.lovrabet/\x20directory\x20removed','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Remove\x20legacy\x20artifacts','utf8','no\x20legacy\x20config\x20found','4bFGdNt','exit\x20','Step\x205/6:\x20Remove\x20old\x20skill\x20—\x20','MCP\x20config:','green','oldMcpConfig','FAIL','parse','\x20\x20Action:\x20delete','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global','bold','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','lovrabet/rabetbase','succeed','configMigration','skipped\x20(no\x20legacy\x20config)','1cHTwXE','\x20\x20Step\x20','yes','undefined','entries','cyan','oldArtifacts','Step\x206/6:\x20Installing\x20new\x20skill...','1867158nbUKHJ','5015625QUqFgM','status','error','Step\x202/6:\x20.lovrabet/\x20removal\x20failed\x20—\x20','no\x20matching\x20entry\x20found','needsSkillSwap','Upgrade\x20cancelled.','some','Step\x204/6:\x20Cleaning\x20MCP\x20config...','oldPath','string','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','lovrabet/rabetbase\x20installed\x20globally','Upgrade\x20completed\x20successfully!','values','length','.bak','not\x20needed','1784943AGtFdQ','isDirectory','failed','step','none\x20found','start','Config\x20migration','args','@lovrabet/dataset-mcp-server','1331322eJcDYK','5258902PGtLjy','detail','Clean\x20MCP\x20config','10myjDec','hasNewConfig','log','\x20from\x20','path','\x20→\x20','mcpServers','Step\x202/6:\x20Removing\x20.lovrabet/\x20directory...','info','Remove\x20.lovrabet/','43918tJODOk','already\x20exists\x20(will\x20merge)','fail','red','===\x20Upgrade\x20Summary\x20===','Step\x206/6:\x20Install\x20new\x20skill\x20—\x20','\x20\x20New\x20config\x20(.rabetbase.json):\x20','files','.cursor/mcp.json','Legacy\x20artifacts:','Step\x205/6:\x20Removing\x20old\x20skill...','filter','Step\x202/6:\x20.lovrabet/\x20not\x20found,\x20skipped','skipped','yellow','inherit','join','lovrabet/lovrabet-skill\x20removed','nonInteractive','label','===\x20Upgrade\x20Analysis\x20===','6433336BkTjEt','done','.cursor/rules/lovrabet_rules.mdc','message','keys','Config\x20file:'];a59_0x7f6c=function(){return _0x41105e;};return a59_0x7f6c();}function execSkillsRemove(_0x3b360e){const _0xfad509=a59_0x81ba70,_0x54c8a4=runNpxSkillsRemove(_0x3b360e,{'stdio':_0xfad509(0xef)});return{'step':0x5,'label':_0xfad509(0x88),'ok':_0x54c8a4['ok'],'detail':_0x54c8a4['ok']?_0xfad509(0xf1):_0x54c8a4[_0xfad509(0xb9)]??_0xfad509(0x9f)+_0x54c8a4['status']};}function execSkillsAdd(_0x752faf){const _0x147d45=a59_0x81ba70,_0x12168e=runNpxSkillsAddGlobal(_0x752faf,_0x147d45(0xaa),{'stdio':_0x147d45(0xef)});return{'step':0x6,'label':_0x147d45(0x8e),'ok':_0x12168e['ok'],'detail':_0x12168e['ok']?_0x147d45(0xc3):_0x12168e[_0x147d45(0xb9)]??_0x147d45(0x9f)+_0x12168e[_0x147d45(0xb8)]};}function tryStat(_0x1c5360){try{return statSync(_0x1c5360);}catch{return undefined;}}function printSummary(_0x3837ab){const _0x380b22=a59_0x81ba70;console['log'](''),console[_0x380b22(0xd8)](a59_0x2a5b79[_0x380b22(0xa8)](_0x380b22(0xe4))),console[_0x380b22(0xd8)]('');for(const _0x4271c4 of _0x3837ab){const _0x12753a=_0x4271c4['ok']?a59_0x2a5b79[_0x380b22(0xa2)]('OK'):a59_0x2a5b79[_0x380b22(0xe3)](_0x380b22(0xa4));console[_0x380b22(0xd8)]('\x20\x20'+_0x12753a+_0x380b22(0xaf)+_0x4271c4[_0x380b22(0xcc)]+':\x20'+_0x4271c4[_0x380b22(0xf3)]);if(_0x4271c4['detail'])console[_0x380b22(0xd8)]('\x20\x20\x20\x20\x20\x20\x20'+a59_0x2a5b79[_0x380b22(0x8c)](_0x4271c4[_0x380b22(0xd4)]));}console[_0x380b22(0xd8)]('');}export async function upgradeApp(_0x1eadde,_0x5604ef){const _0xed46da=a59_0x81ba70,_0x31b8c7=process[_0xed46da(0x92)](),_0xfd3114=analyse(_0x31b8c7),_0x567032=!_0xfd3114[_0xed46da(0xac)]&&_0xfd3114[_0xed46da(0xb4)]['length']===0x0&&!_0xfd3114[_0xed46da(0xa3)]&&!_0xfd3114[_0xed46da(0xbc)];if(_0x567032){console[_0xed46da(0xd8)](a59_0x2a5b79[_0xed46da(0xa2)](_0xed46da(0xc2)));return;}printReport(_0xfd3114);const _0x362dd6=_0x5604ef[_0xed46da(0xb0)]||_0x5604ef['Y']||_0x1eadde[_0xed46da(0xf2)];if(!_0x362dd6)try{const _0x5b99db=await askConfirm('Proceed\x20with\x20upgrade?');if(!_0x5b99db){console[_0xed46da(0xd8)](a59_0x2a5b79['gray'](_0xed46da(0xbd)));return;}}catch(_0x498b0c){if(_0x498b0c?.[_0xed46da(0xf8)]==='CANCEL'){console[_0xed46da(0xd8)](a59_0x2a5b79[_0xed46da(0x8c)](_0xed46da(0xbd)));return;}throw _0x498b0c;}const _0x3207c1=[],_0x206f1d=a59_0x19a77d({'text':_0xed46da(0x8a),'color':_0xed46da(0xb3)})[_0xed46da(0xce)](),_0x289451=execConfigMigration(_0xfd3114,_0x31b8c7);_0x3207c1['push'](_0x289451),_0x206f1d[_0x289451['ok']?'succeed':'fail'](_0xed46da(0x94)+(_0x289451[_0xed46da(0xd4)]??(_0x289451['ok']?_0xed46da(0xf6):_0xed46da(0xcb))));const _0x36bf9a=resolve(_0x31b8c7,_0xed46da(0x87)),_0x53462a=a59_0x19a77d({'text':_0xed46da(0xdd),'color':_0xed46da(0xb3)})[_0xed46da(0xce)]();if(existsSync(_0x36bf9a))try{rmSync(_0x36bf9a,{'recursive':!![],'force':!![]}),_0x53462a[_0xed46da(0xab)](_0xed46da(0x99)),_0x3207c1[_0xed46da(0x97)]({'step':0x2,'label':_0xed46da(0xdf),'ok':!![]});}catch(_0x49dfa5){_0x53462a[_0xed46da(0xe2)](_0xed46da(0xba)+_0x49dfa5[_0xed46da(0xf8)]),_0x3207c1[_0xed46da(0x97)]({'step':0x2,'label':_0xed46da(0xdf),'ok':![],'detail':_0x49dfa5[_0xed46da(0xf8)]});}else _0x53462a[_0xed46da(0xde)](_0xed46da(0xec)),_0x3207c1[_0xed46da(0x97)]({'step':0x2,'label':_0xed46da(0xdf),'ok':!![],'detail':_0xed46da(0xed)});const _0x2d8cb2=a59_0x19a77d({'text':'Step\x203/6:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0xed46da(0xb3)})[_0xed46da(0xce)](),_0x1bdfee=execRemoveOldArtifacts(_0xfd3114[_0xed46da(0xb4)]);_0x3207c1[_0xed46da(0x97)](_0x1bdfee),_0x2d8cb2[_0x1bdfee['ok']?_0xed46da(0xab):_0xed46da(0xe2)]('Step\x203/6:\x20Legacy\x20artifacts\x20—\x20'+(_0x1bdfee[_0xed46da(0xd4)]??(_0x1bdfee['ok']?_0xed46da(0xf6):_0xed46da(0xcb))));const _0xd77755=a59_0x19a77d({'text':_0xed46da(0xbf),'color':_0xed46da(0xb3)})['start'](),_0x3a9b84=execCleanMcp(_0xfd3114);_0x3207c1[_0xed46da(0x97)](_0x3a9b84),_0xd77755[_0x3a9b84['ok']?_0xed46da(0xab):_0xed46da(0xe2)]('Step\x204/6:\x20MCP\x20config\x20—\x20'+(_0x3a9b84[_0xed46da(0xd4)]??(_0x3a9b84['ok']?'done':_0xed46da(0xcb))));const _0x473f71=a59_0x19a77d({'text':_0xed46da(0xea),'color':_0xed46da(0xb3)})[_0xed46da(0xce)](),_0x4ef442=execSkillsRemove(_0x31b8c7);_0x3207c1[_0xed46da(0x97)](_0x4ef442),_0x473f71[_0x4ef442['ok']?_0xed46da(0xab):_0xed46da(0xe2)](_0xed46da(0xa0)+(_0x4ef442[_0xed46da(0xd4)]??(_0x4ef442['ok']?_0xed46da(0xf6):'failed')));const _0x26f4af=a59_0x19a77d({'text':_0xed46da(0xb5),'color':_0xed46da(0xb3)})[_0xed46da(0xce)](),_0x50f722=execSkillsAdd(_0x31b8c7);_0x3207c1[_0xed46da(0x97)](_0x50f722),_0x26f4af[_0x50f722['ok']?_0xed46da(0xab):_0xed46da(0xe2)](_0xed46da(0xe5)+(_0x50f722[_0xed46da(0xd4)]??(_0x50f722['ok']?_0xed46da(0xf6):_0xed46da(0xcb)))),printSummary(_0x3207c1);const _0xdc0c38=_0x3207c1[_0xed46da(0xbe)](_0x1d7134=>!_0x1d7134['ok']);_0xdc0c38?console['log'](a59_0x2a5b79[_0xed46da(0xee)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0xed46da(0xd8)](a59_0x2a5b79['green'](_0xed46da(0xc4)));}export const upgradeCommand={'name':a59_0x81ba70(0x89),'description':a59_0x81ba70(0x9a),async 'run'(_0x2d09be,_0xcc23cd,_0x58739c){await upgradeApp(_0x2d09be,_0x58739c);}};
1
+ const a57_0x590ca6=a57_0x2ff0;(function(_0x2f7f4e,_0xb505){const _0xfb3b7d=a57_0x2ff0,_0x26607f=_0x2f7f4e();while(!![]){try{const _0x5916e2=-parseInt(_0xfb3b7d(0x104))/0x1+parseInt(_0xfb3b7d(0x11a))/0x2*(-parseInt(_0xfb3b7d(0x111))/0x3)+parseInt(_0xfb3b7d(0x132))/0x4*(-parseInt(_0xfb3b7d(0x10a))/0x5)+parseInt(_0xfb3b7d(0x124))/0x6+-parseInt(_0xfb3b7d(0xfd))/0x7+-parseInt(_0xfb3b7d(0x107))/0x8+parseInt(_0xfb3b7d(0x118))/0x9;if(_0x5916e2===_0xb505)break;else _0x26607f['push'](_0x26607f['shift']());}catch(_0x20dedc){_0x26607f['push'](_0x26607f['shift']());}}}(a57_0x545b,0x4594e));import a57_0x289342 from'chalk';import a57_0x1902fb from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';function a57_0x545b(){const _0x470ceb=['MCP\x20config:','Step\x205/6:\x20Removing\x20old\x20skill...','@lovrabet/dataset-mcp-server','oldPath','files','yellow','Step\x201/6:\x20Migrating\x20config...','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Remove\x20legacy\x20artifacts','failed','Step\x202/6:\x20.lovrabet/\x20not\x20found,\x20skipped','lovrabet/rabetbase','info','Remove\x20.lovrabet/','Step\x203/6:\x20Legacy\x20artifacts\x20—\x20','error','Remove\x20old\x20skill','\x20from\x20','upgrade','Step\x201/6:\x20Config\x20migration\x20—\x20','detail','.cursor/mcp.json','Step\x204/6:\x20Cleaning\x20MCP\x20config...','length','args','step','entries','label','nonInteractive','Skill\x20swap:','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','.lovrabet','status','already\x20exists\x20(will\x20merge)','Step\x202/6:\x20.lovrabet/\x20directory\x20removed','3351005WYAHOm','red','values','keys','none\x20found','\x20\x20Action:\x20delete','bold','163236YVpzmG','cwd','isArray','2322184ehZQzD','join','exit\x20','1902545yYVRti','FAIL','no\x20legacy\x20config\x20found','utf8','Step\x204/6:\x20MCP\x20config\x20—\x20','Step\x202/6:\x20Removing\x20.lovrabet/\x20directory...','Config\x20file:','3KcOvMk','oldMcpConfig','needed','\x20→\x20keys:\x20','fail','Clean\x20MCP\x20config','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','13907349pVVxOR','oldArtifacts','874154uGDybP','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','filter','string','cyan','green','not\x20needed','.bak','.claude/skills/lovrabet','\x20\x20Fields\x20to\x20migrate:\x20','2937330whBywF','Proceed\x20with\x20upgrade?','fields','no\x20matching\x20entry\x20found','.cursor/rules/lovrabet_rules.mdc','mcpServers','\x20removed','Step\x203/6:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','object','gray','skipped','done','inherit','===\x20Upgrade\x20Analysis\x20===','4fUnGDH','log','lovrabet/rabetbase\x20installed\x20globally','isDirectory','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Step\x205/6:\x20Remove\x20old\x20skill\x20—\x20','message','path','some','parse','includes','Legacy\x20artifacts:','succeed','push','FOUND','CANCEL','Config\x20migration','Step\x206/6:\x20Install\x20new\x20skill\x20—\x20','\x20\x20Step\x20','hasNewConfig','start'];a57_0x545b=function(){return _0x470ceb;};return a57_0x545b();}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[a57_0x590ca6(0x11c)](_0x222094=>_0x222094!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x318c41){const _0x1f6308=a57_0x590ca6,_0x16785e=[];for(const _0x2010b0 of Object[_0x1f6308(0xff)](CORE_IDE_CONFIGS)){if(_0x2010b0[_0x1f6308(0xdd)])for(const _0x19126a of _0x2010b0[_0x1f6308(0xdd)]){_0x16785e[_0x1f6308(0xd1)](resolve(_0x318c41,_0x19126a[_0x1f6308(0x139)]));}}return _0x16785e;}function analyse(_0x4472ba){const _0x3122a1=a57_0x590ca6;let _0x1257a5=null;const _0x45440d=resolve(_0x4472ba,NEW_CONFIG_NAME),_0x210350=existsSync(_0x45440d);for(const _0x490830 of LEGACY_CONFIG_NAMES){const _0x4b9a43=resolve(_0x4472ba,_0x490830);if(existsSync(_0x4b9a43)){const _0xe0f347=readConfigFile(_0x4b9a43),_0x37a7e8=Object[_0x3122a1(0x100)](_0xe0f347)['filter'](_0x47d263=>typeof _0xe0f347[_0x47d263]!=='undefined');_0x1257a5={'oldPath':_0x4b9a43,'hasNewConfig':_0x210350,'fields':_0x37a7e8};break;}}const _0x4c7962=[],_0x54b39d=resolve(_0x4472ba,'.lovrabet');if(existsSync(_0x54b39d))_0x4c7962[_0x3122a1(0xd1)](_0x54b39d);const _0x5c0061=resolve(_0x4472ba,_0x3122a1(0x128));if(existsSync(_0x5c0061))_0x4c7962[_0x3122a1(0xd1)](_0x5c0061);const _0x2bd7a5=resolve(_0x4472ba,_0x3122a1(0x122));if(existsSync(_0x2bd7a5))_0x4c7962[_0x3122a1(0xd1)](_0x2bd7a5);for(const _0x353f21 of collectIdeSkillFiles(_0x4472ba)){if(existsSync(_0x353f21))_0x4c7962[_0x3122a1(0xd1)](_0x353f21);}let _0xb5afa7=null;const _0x36ca5e=resolve(_0x4472ba,_0x3122a1(0xee));if(existsSync(_0x36ca5e))try{const _0x224795=JSON['parse'](readFileSync(_0x36ca5e,'utf8'));if(_0x224795?.[_0x3122a1(0x129)]&&typeof _0x224795[_0x3122a1(0x129)]===_0x3122a1(0x12c)){const _0x22a8df=[];for(const [_0x292f33,_0x35c19f]of Object[_0x3122a1(0xf3)](_0x224795[_0x3122a1(0x129)])){const _0x46a95c=_0x35c19f;_0x46a95c?.[_0x3122a1(0xf1)]&&Array[_0x3122a1(0x106)](_0x46a95c['args'])&&_0x46a95c[_0x3122a1(0xf1)][_0x3122a1(0x13a)](_0x56e186=>typeof _0x56e186===_0x3122a1(0x11d)&&_0x56e186[_0x3122a1(0x13c)](_0x3122a1(0xdb)))&&_0x22a8df[_0x3122a1(0xd1)](_0x292f33);}_0x22a8df['length']>0x0&&(_0xb5afa7={'path':_0x36ca5e,'keys':_0x22a8df});}}catch{}const _0x3486eb=_0x4c7962[_0x3122a1(0xf0)]>0x0||_0x1257a5!==null;return{'configMigration':_0x1257a5,'oldArtifacts':_0x4c7962,'oldMcpConfig':_0xb5afa7,'needsSkillSwap':_0x3486eb};}function printReport(_0x18ec78){const _0x5ba338=a57_0x590ca6,{configMigration:_0x3a37d5,oldArtifacts:_0x12ecad,oldMcpConfig:_0x4afe30,needsSkillSwap:_0x44c758}=_0x18ec78;console[_0x5ba338(0x133)](''),console[_0x5ba338(0x133)](a57_0x289342[_0x5ba338(0x103)](_0x5ba338(0x131))),console['log']('');_0x3a37d5?(console['log'](a57_0x289342[_0x5ba338(0x11e)]('Config\x20file:')+('\x20\x20'+a57_0x289342[_0x5ba338(0xde)](_0x3a37d5['oldPath']))),console[_0x5ba338(0x133)](_0x5ba338(0xe0)+(_0x3a37d5[_0x5ba338(0xd7)]?a57_0x289342['green'](_0x5ba338(0xfb)):a57_0x289342[_0x5ba338(0x12d)]('not\x20found\x20(will\x20create)'))),console[_0x5ba338(0x133)](_0x5ba338(0x123)+_0x3a37d5[_0x5ba338(0x126)]['join'](',\x20')),console[_0x5ba338(0x133)](_0x5ba338(0xf8))):console['log'](a57_0x289342[_0x5ba338(0x11e)](_0x5ba338(0x110))+'\x20\x20'+a57_0x289342[_0x5ba338(0x12d)](_0x5ba338(0x10c)));console[_0x5ba338(0x133)]('');if(_0x12ecad['length']>0x0){console[_0x5ba338(0x133)](a57_0x289342[_0x5ba338(0x11e)](_0x5ba338(0xcf)));for(const _0x28e3f0 of _0x12ecad){console[_0x5ba338(0x133)]('\x20\x20'+a57_0x289342['red'](_0x5ba338(0xd2))+'\x20\x20'+_0x28e3f0);}console[_0x5ba338(0x133)](_0x5ba338(0x102));}else console[_0x5ba338(0x133)](a57_0x289342[_0x5ba338(0x11e)](_0x5ba338(0xcf))+'\x20\x20'+a57_0x289342['gray'](_0x5ba338(0x101)));console['log'](''),_0x4afe30?(console['log'](a57_0x289342['cyan'](_0x5ba338(0xd9))+('\x20\x20'+a57_0x289342[_0x5ba338(0xde)](_0x4afe30[_0x5ba338(0x139)])+_0x5ba338(0x114)+_0x4afe30[_0x5ba338(0x100)][_0x5ba338(0x108)](',\x20'))),console['log'](_0x5ba338(0xf7))):console['log'](a57_0x289342[_0x5ba338(0x11e)](_0x5ba338(0xd9))+'\x20\x20'+a57_0x289342[_0x5ba338(0x12d)]('no\x20legacy\x20entry')),console[_0x5ba338(0x133)](''),console[_0x5ba338(0x133)](a57_0x289342[_0x5ba338(0x11e)](_0x5ba338(0xf6))+('\x20\x20'+(_0x44c758?a57_0x289342[_0x5ba338(0xde)](_0x5ba338(0x113)):a57_0x289342['green'](_0x5ba338(0x120))))),_0x44c758&&console[_0x5ba338(0x133)]('\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global'),console[_0x5ba338(0x133)]('');}function execConfigMigration(_0x381ee1,_0x316ac9){const _0x34cc05=a57_0x590ca6,{configMigration:_0x29a0a4}=_0x381ee1;if(!_0x29a0a4?.[_0x34cc05(0xdc)])return{'step':0x1,'label':_0x34cc05(0xd4),'ok':!![],'detail':'skipped\x20(no\x20legacy\x20config)'};const _0x902727=readConfigFile(_0x29a0a4[_0x34cc05(0xdc)]),_0x15f4fe=resolve(_0x316ac9,NEW_CONFIG_NAME),_0x33e0c2=_0x29a0a4[_0x34cc05(0xd7)]?readConfigFile(_0x15f4fe):{};for(const [_0x5d4797,_0x58329b]of Object['entries'](_0x902727)){!(_0x5d4797 in _0x33e0c2)&&(_0x33e0c2[_0x5d4797]=_0x58329b);}writeConfigFile(_0x15f4fe,_0x33e0c2);const _0x2e2271=_0x29a0a4['oldPath']+_0x34cc05(0x121);return renameSync(_0x29a0a4[_0x34cc05(0xdc)],_0x2e2271),{'step':0x1,'label':_0x34cc05(0xd4),'ok':!![],'detail':_0x29a0a4['oldPath']+'\x20→\x20'+_0x15f4fe+'\x20(backup:\x20'+_0x2e2271+')'};}function execRemoveOldArtifacts(_0x335bec){const _0x1c91f0=a57_0x590ca6,_0x3ecbab=[];for(const _0x55f2b6 of _0x335bec){try{if(!existsSync(_0x55f2b6))continue;const _0x57fc0a=tryStat(_0x55f2b6);_0x57fc0a?.[_0x1c91f0(0x135)]()?rmSync(_0x55f2b6,{'recursive':!![],'force':!![]}):unlinkSync(_0x55f2b6);}catch(_0x32d11b){_0x3ecbab[_0x1c91f0(0xd1)](_0x55f2b6+':\x20'+_0x32d11b['message']);}}return{'step':0x3,'label':_0x1c91f0(0xe1),'ok':_0x3ecbab['length']===0x0,'detail':_0x3ecbab[_0x1c91f0(0xf0)]>0x0?_0x335bec[_0x1c91f0(0xf0)]-_0x3ecbab['length']+'/'+_0x335bec['length']+'\x20removed\x20('+_0x3ecbab[_0x1c91f0(0x108)](';\x20')+')':_0x335bec[_0x1c91f0(0xf0)]+_0x1c91f0(0x12a)};}function execCleanMcp(_0x1556bd){const _0x3e6946=a57_0x590ca6;if(!_0x1556bd[_0x3e6946(0x112)])return{'step':0x4,'label':_0x3e6946(0x116),'ok':!![],'detail':_0x3e6946(0x12e)};try{const _0xd0c6ef=readFileSync(_0x1556bd[_0x3e6946(0x112)][_0x3e6946(0x139)],_0x3e6946(0x10d)),_0x309336=JSON[_0x3e6946(0x13b)](_0xd0c6ef);if(_0x309336?.[_0x3e6946(0x129)]&&typeof _0x309336[_0x3e6946(0x129)]==='object'){const _0x192b49=[];for(const [_0x4f7787,_0x5796cc]of Object['entries'](_0x309336[_0x3e6946(0x129)])){_0x5796cc?.[_0x3e6946(0xf1)]&&Array[_0x3e6946(0x106)](_0x5796cc[_0x3e6946(0xf1)])&&_0x5796cc['args'][_0x3e6946(0x13a)](_0x210b3e=>typeof _0x210b3e===_0x3e6946(0x11d)&&_0x210b3e[_0x3e6946(0x13c)](_0x3e6946(0xdb)))&&_0x192b49[_0x3e6946(0xd1)](_0x4f7787);}for(const _0x4b971d of _0x192b49){delete _0x309336['mcpServers'][_0x4b971d];}return _0x192b49[_0x3e6946(0xf0)]>0x0&&writeFileSync(_0x1556bd['oldMcpConfig']['path'],JSON['stringify'](_0x309336,null,0x2)+'\x0a',_0x3e6946(0x10d)),{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':'removed\x20'+_0x192b49[_0x3e6946(0x108)](',\x20')+_0x3e6946(0xea)+_0x1556bd[_0x3e6946(0x112)][_0x3e6946(0x139)]};}return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x3e6946(0x127)};}catch(_0x147369){return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':![],'detail':_0x147369[_0x3e6946(0x138)]};}}function execSkillsRemove(_0x1ea635){const _0x3e46ac=a57_0x590ca6,_0x62d1d0=runNpxSkillsRemove(_0x1ea635,{'stdio':_0x3e46ac(0x130)});return{'step':0x5,'label':_0x3e46ac(0xe9),'ok':_0x62d1d0['ok'],'detail':_0x62d1d0['ok']?'lovrabet/lovrabet-skill\x20removed':_0x62d1d0[_0x3e46ac(0xe8)]??_0x3e46ac(0x109)+_0x62d1d0[_0x3e46ac(0xfa)]};}function a57_0x2ff0(_0x135dac,_0x1568b4){_0x135dac=_0x135dac-0xcf;const _0x545b8c=a57_0x545b();let _0x2ff083=_0x545b8c[_0x135dac];return _0x2ff083;}function execSkillsAdd(_0x338024){const _0x3ba111=a57_0x590ca6,_0xa532ca=runNpxSkillsAddGlobal(_0x338024,_0x3ba111(0xe4),{'stdio':_0x3ba111(0x130)});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0xa532ca['ok'],'detail':_0xa532ca['ok']?_0x3ba111(0x134):_0xa532ca[_0x3ba111(0xe8)]??_0x3ba111(0x109)+_0xa532ca['status']};}function tryStat(_0x33f36e){try{return statSync(_0x33f36e);}catch{return undefined;}}function printSummary(_0x235e7a){const _0x2308fd=a57_0x590ca6;console[_0x2308fd(0x133)](''),console[_0x2308fd(0x133)](a57_0x289342['bold']('===\x20Upgrade\x20Summary\x20===')),console['log']('');for(const _0x838cf7 of _0x235e7a){const _0x48a37b=_0x838cf7['ok']?a57_0x289342[_0x2308fd(0x11f)]('OK'):a57_0x289342[_0x2308fd(0xfe)](_0x2308fd(0x10b));console[_0x2308fd(0x133)]('\x20\x20'+_0x48a37b+_0x2308fd(0xd6)+_0x838cf7[_0x2308fd(0xf2)]+':\x20'+_0x838cf7[_0x2308fd(0xf4)]);if(_0x838cf7[_0x2308fd(0xed)])console[_0x2308fd(0x133)]('\x20\x20\x20\x20\x20\x20\x20'+a57_0x289342[_0x2308fd(0x12d)](_0x838cf7[_0x2308fd(0xed)]));}console[_0x2308fd(0x133)]('');}export async function upgradeApp(_0x4c3e4f,_0x23cf46){const _0x178e09=a57_0x590ca6,_0xf6be9a=process[_0x178e09(0x105)](),_0x1fa617=analyse(_0xf6be9a),_0x54fd56=!_0x1fa617['configMigration']&&_0x1fa617[_0x178e09(0x119)][_0x178e09(0xf0)]===0x0&&!_0x1fa617['oldMcpConfig']&&!_0x1fa617['needsSkillSwap'];if(_0x54fd56){console[_0x178e09(0x133)](a57_0x289342['green'](_0x178e09(0x117)));return;}printReport(_0x1fa617);const _0x419887=_0x23cf46['yes']||_0x23cf46['Y']||_0x4c3e4f[_0x178e09(0xf5)];if(!_0x419887)try{const _0x3b94d4=await askConfirm(_0x178e09(0x125));if(!_0x3b94d4){console['log'](a57_0x289342[_0x178e09(0x12d)]('Upgrade\x20cancelled.'));return;}}catch(_0x5bdc80){if(_0x5bdc80?.[_0x178e09(0x138)]===_0x178e09(0xd3)){console['log'](a57_0x289342[_0x178e09(0x12d)]('Upgrade\x20cancelled.'));return;}throw _0x5bdc80;}const _0x14728c=[],_0xfe8f93=a57_0x1902fb({'text':_0x178e09(0xdf),'color':'cyan'})['start'](),_0xb80c5c=execConfigMigration(_0x1fa617,_0xf6be9a);_0x14728c[_0x178e09(0xd1)](_0xb80c5c),_0xfe8f93[_0xb80c5c['ok']?_0x178e09(0xd0):_0x178e09(0x115)](_0x178e09(0xec)+(_0xb80c5c[_0x178e09(0xed)]??(_0xb80c5c['ok']?_0x178e09(0x12f):'failed')));const _0x4ed4d1=resolve(_0xf6be9a,_0x178e09(0xf9)),_0x1431d6=a57_0x1902fb({'text':_0x178e09(0x10f),'color':'cyan'})[_0x178e09(0xd8)]();if(existsSync(_0x4ed4d1))try{rmSync(_0x4ed4d1,{'recursive':!![],'force':!![]}),_0x1431d6[_0x178e09(0xd0)](_0x178e09(0xfc)),_0x14728c[_0x178e09(0xd1)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x58cab7){_0x1431d6[_0x178e09(0x115)]('Step\x202/6:\x20.lovrabet/\x20removal\x20failed\x20—\x20'+_0x58cab7[_0x178e09(0x138)]),_0x14728c[_0x178e09(0xd1)]({'step':0x2,'label':_0x178e09(0xe6),'ok':![],'detail':_0x58cab7['message']});}else _0x1431d6[_0x178e09(0xe5)](_0x178e09(0xe3)),_0x14728c[_0x178e09(0xd1)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':_0x178e09(0x12e)});const _0x1821eb=a57_0x1902fb({'text':_0x178e09(0x12b),'color':'cyan'})[_0x178e09(0xd8)](),_0x11b1cb=execRemoveOldArtifacts(_0x1fa617[_0x178e09(0x119)]);_0x14728c[_0x178e09(0xd1)](_0x11b1cb),_0x1821eb[_0x11b1cb['ok']?_0x178e09(0xd0):_0x178e09(0x115)](_0x178e09(0xe7)+(_0x11b1cb['detail']??(_0x11b1cb['ok']?'done':_0x178e09(0xe2))));const _0x448ebc=a57_0x1902fb({'text':_0x178e09(0xef),'color':_0x178e09(0x11e)})[_0x178e09(0xd8)](),_0x1a7830=execCleanMcp(_0x1fa617);_0x14728c['push'](_0x1a7830),_0x448ebc[_0x1a7830['ok']?_0x178e09(0xd0):_0x178e09(0x115)](_0x178e09(0x10e)+(_0x1a7830[_0x178e09(0xed)]??(_0x1a7830['ok']?_0x178e09(0x12f):'failed')));const _0x26762c=a57_0x1902fb({'text':_0x178e09(0xda),'color':_0x178e09(0x11e)})[_0x178e09(0xd8)](),_0x7fe628=execSkillsRemove(_0xf6be9a);_0x14728c['push'](_0x7fe628),_0x26762c[_0x7fe628['ok']?_0x178e09(0xd0):_0x178e09(0x115)](_0x178e09(0x137)+(_0x7fe628[_0x178e09(0xed)]??(_0x7fe628['ok']?_0x178e09(0x12f):_0x178e09(0xe2))));const _0x1aa6c2=a57_0x1902fb({'text':'Step\x206/6:\x20Installing\x20new\x20skill...','color':'cyan'})[_0x178e09(0xd8)](),_0x57744b=execSkillsAdd(_0xf6be9a);_0x14728c[_0x178e09(0xd1)](_0x57744b),_0x1aa6c2[_0x57744b['ok']?_0x178e09(0xd0):'fail'](_0x178e09(0xd5)+(_0x57744b['detail']??(_0x57744b['ok']?'done':_0x178e09(0xe2)))),printSummary(_0x14728c);const _0x4f97aa=_0x14728c[_0x178e09(0x13a)](_0x15b7dd=>!_0x15b7dd['ok']);_0x4f97aa?console[_0x178e09(0x133)](a57_0x289342[_0x178e09(0xde)](_0x178e09(0x11b))):console[_0x178e09(0x133)](a57_0x289342[_0x178e09(0x11f)]('Upgrade\x20completed\x20successfully!'));}export const upgradeCommand={'name':a57_0x590ca6(0xeb),'description':a57_0x590ca6(0x136),async 'run'(_0x503c37,_0xcb1155,_0xea41ee){await upgradeApp(_0x503c37,_0xea41ee);}};
@@ -1 +1 @@
1
- const a60_0x13f788=a60_0x1db0;(function(_0xd71a1,_0x34b098){const _0x5e8e34=a60_0x1db0,_0x2569db=_0xd71a1();while(!![]){try{const _0x4e53da=parseInt(_0x5e8e34(0xd0))/0x1+-parseInt(_0x5e8e34(0xd5))/0x2*(parseInt(_0x5e8e34(0xa9))/0x3)+parseInt(_0x5e8e34(0xe8))/0x4*(parseInt(_0x5e8e34(0xd3))/0x5)+parseInt(_0x5e8e34(0xdf))/0x6*(-parseInt(_0x5e8e34(0xc8))/0x7)+parseInt(_0x5e8e34(0xe7))/0x8*(-parseInt(_0x5e8e34(0xa2))/0x9)+parseInt(_0x5e8e34(0xcb))/0xa+-parseInt(_0x5e8e34(0xd6))/0xb;if(_0x4e53da===_0x34b098)break;else _0x2569db['push'](_0x2569db['shift']());}catch(_0x46dd84){_0x2569db['push'](_0x2569db['shift']());}}}(a60_0x5751,0xd5e7a));import{initCommand}from'./init.js';import{createCommand}from'./create.js';import{upgradeCommand}from'./project-upgrade.js';import{runCommand}from'./run.js';import{authCommand}from'./auth.js';import{logoutCommand}from'./logout.js';import{configCommand}from'./config.js';function a60_0x1db0(_0x34b6ed,_0x103d74){_0x34b6ed=_0x34b6ed-0xa2;const _0x575152=a60_0x5751();let _0x1db0e3=_0x575152[_0x34b6ed];return _0x1db0e3;}import{mcpCommand}from'./mcp.js';import{skillCommand}from'./skill.js';import{logsCommand}from'./logs.js';import{appCommand}from'./app.js';import{updateCommand}from'./cli-update.js';import{doctorCommand}from'./doctor.js';import{apiDefinitions}from'./api/index.js';import{bffDefinitions}from'./bff/index.js';import{sqlDefinitions}from'./sql/index.js';import{datasetDefinitions}from'./dataset/index.js';import{codegenDefinitions}from'./codegen/index.js';import{menuDefinitions}from'./menu/index.js';export const serviceRegistry=[];const serviceByName=new Map(),legacyHandlers=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x2ccd80){const _0x539f8c=a60_0x1db0;for(const _0x3b5033 of _0x2ccd80){definitions[_0x539f8c(0xa8)](_0x3b5033[_0x539f8c(0xbc)]+':'+_0x3b5033[_0x539f8c(0xa7)],_0x3b5033);let _0x23ff5b=serviceGroups['get'](_0x3b5033[_0x539f8c(0xbc)]);!_0x23ff5b&&(_0x23ff5b=[],serviceGroups[_0x539f8c(0xa8)](_0x3b5033[_0x539f8c(0xbc)],_0x23ff5b)),_0x23ff5b[_0x539f8c(0xa6)](_0x3b5033);}}function registerDeclarativeService(_0x5dbddf,_0x3facee){const _0x3133f2=a60_0x1db0;registerDefinitions(_0x3facee);const _0x1bca19=_0x15d4f0=>_0x15d4f0===_0x3133f2(0xb1)?'':_0x15d4f0===_0x3133f2(0xd9)?_0x3133f2(0xe9):_0x3133f2(0xe5),_0x3f883b={'service':_0x3facee[0x0]['service'],'label':_0x5dbddf,'commands':_0x3facee[_0x3133f2(0xc1)](_0x2355e2=>({'command':_0x2355e2[_0x3133f2(0xa7)],'description':_0x2355e2['description'],'tag':_0x1bca19(_0x2355e2[_0x3133f2(0xe0)])})),'declarative':!![]};serviceRegistry[_0x3133f2(0xa6)](_0x3f883b),serviceByName['set'](_0x3f883b['service'],_0x3f883b);}function registerLegacyService(_0x1b40f9,_0x3053a7,_0xc91a18,_0x19e4c0){const _0x4c3f38=a60_0x1db0,_0x37acf5={'service':_0x1b40f9,'label':_0x3053a7,'commands':_0xc91a18[_0x4c3f38(0xc1)](_0x23d576=>({'command':_0x23d576[_0x4c3f38(0xa7)],'description':_0x23d576[_0x4c3f38(0xa3)],'tag':''})),'declarative':![],'defaultCommand':_0x19e4c0?.[_0x4c3f38(0xc4)],'wildcardModule':_0x19e4c0?.[_0x4c3f38(0xa5)]};serviceRegistry[_0x4c3f38(0xa6)](_0x37acf5),serviceByName[_0x4c3f38(0xa8)](_0x1b40f9,_0x37acf5);for(const _0x15cd2c of _0xc91a18){legacyHandlers[_0x4c3f38(0xa8)](_0x1b40f9+':'+_0x15cd2c['command'],{'module':_0x15cd2c[_0x4c3f38(0xe2)],'passCommandAsArg':_0x15cd2c[_0x4c3f38(0xa4)]});}}registerLegacyService(a60_0x13f788(0xb2),a60_0x13f788(0xb5),[{'command':a60_0x13f788(0xaf),'description':'Initialize\x20.rabetbase.json\x20config','module':initCommand},{'command':'create','description':a60_0x13f788(0xbf),'module':createCommand},{'command':a60_0x13f788(0xbe),'description':'Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','module':upgradeCommand}]),registerLegacyService(a60_0x13f788(0xbd),'App\x20Management',[{'command':a60_0x13f788(0xb7),'description':'List\x20all\x20configured\x20apps','module':appCommand,'passCommandAsArg':!![]},{'command':a60_0x13f788(0xe6),'description':a60_0x13f788(0xdc),'module':appCommand,'passCommandAsArg':!![]},{'command':'add','description':a60_0x13f788(0xb9),'module':appCommand,'passCommandAsArg':!![]},{'command':a60_0x13f788(0xae),'description':a60_0x13f788(0xc7),'module':appCommand,'passCommandAsArg':!![]}],{'defaultCommand':a60_0x13f788(0xb7)}),registerLegacyService(a60_0x13f788(0xe3),'Run\x20Scripts',[{'command':a60_0x13f788(0xce),'description':a60_0x13f788(0xc3),'module':runCommand}],{'wildcardModule':runCommand}),registerLegacyService(a60_0x13f788(0xb4),'Authentication',[{'command':a60_0x13f788(0xcd),'description':a60_0x13f788(0xc2),'module':authCommand},{'command':a60_0x13f788(0xd7),'description':'Clear\x20login\x20session','module':logoutCommand}],{'defaultCommand':a60_0x13f788(0xcd)}),registerLegacyService('update',a60_0x13f788(0xc0),[{'command':a60_0x13f788(0xe3),'description':'Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','module':updateCommand}],{'defaultCommand':a60_0x13f788(0xe3)}),registerLegacyService(a60_0x13f788(0xd1),'Diagnostics',[{'command':a60_0x13f788(0xc5),'description':'Diagnose\x20CLI\x20configuration\x20and\x20connectivity','module':doctorCommand}],{'defaultCommand':'check'}),registerLegacyService(a60_0x13f788(0xba),'Configuration',[{'command':a60_0x13f788(0xa8),'description':a60_0x13f788(0xb8),'module':configCommand,'passCommandAsArg':!![]},{'command':a60_0x13f788(0xad),'description':a60_0x13f788(0xea),'module':configCommand,'passCommandAsArg':!![]},{'command':'list','description':a60_0x13f788(0xb6),'module':configCommand,'passCommandAsArg':!![]}]),registerDeclarativeService(a60_0x13f788(0xec),apiDefinitions),registerDeclarativeService(a60_0x13f788(0xdb),menuDefinitions),registerDeclarativeService(a60_0x13f788(0xd4),datasetDefinitions),registerDeclarativeService(a60_0x13f788(0xda),bffDefinitions),registerDeclarativeService(a60_0x13f788(0xd2),sqlDefinitions),registerDeclarativeService(a60_0x13f788(0xca),codegenDefinitions),registerLegacyService('mcp','MCP\x20(AI\x20Tools)',[{'command':a60_0x13f788(0xcf),'description':a60_0x13f788(0xd8),'module':mcpCommand,'passCommandAsArg':!![]}]),registerLegacyService(a60_0x13f788(0xdd),a60_0x13f788(0xc9),[{'command':'install','description':a60_0x13f788(0xb0),'module':skillCommand,'passCommandAsArg':!![]}]),registerLegacyService(a60_0x13f788(0xbb),a60_0x13f788(0xaa),[{'command':a60_0x13f788(0xeb),'description':'View\x20command\x20history\x20logs','module':logsCommand},{'command':a60_0x13f788(0xc6),'description':a60_0x13f788(0xb3),'module':logsCommand,'passCommandAsArg':!![]}],{'defaultCommand':a60_0x13f788(0xeb)});export const deprecatedAliases={'init':{'service':a60_0x13f788(0xb2),'command':a60_0x13f788(0xaf)},'create':{'service':a60_0x13f788(0xb2),'command':a60_0x13f788(0xab)},'start':{'service':a60_0x13f788(0xe3),'command':a60_0x13f788(0xe1)},'build':{'service':a60_0x13f788(0xe3),'command':a60_0x13f788(0xe4)},'preview':{'service':a60_0x13f788(0xe3),'command':'preview'},'logout':{'service':a60_0x13f788(0xb4),'command':a60_0x13f788(0xd7)},'skills':{'service':a60_0x13f788(0xdd),'command':'install'}};export function findDefinition(_0x56db08,_0x2c43b8){const _0x36c927=a60_0x13f788;return definitions[_0x36c927(0xad)](_0x56db08+':'+_0x2c43b8);}export function isKnownService(_0x4f8994){return serviceByName['has'](_0x4f8994);}export function isDeclarativeService(_0x4e4611){const _0x838bff=a60_0x13f788;return serviceGroups[_0x838bff(0xac)](_0x4e4611);}function a60_0x5751(){const _0x302dcb=['1264708tsYWlK','doctor','SQL\x20Queries','10415deTBuo','Dataset\x20&\x20Operations','66cdqRuq','790416HYTXVE','logout','Configure\x20MCP\x20server\x20for\x20AI\x20tools','write','BFF\x20Scripts','Menu','Switch\x20the\x20default\x20app','skill','from','2172UJEfzg','risk','start','module','run','build','\x20\x20[high-risk-write]','use','304FXCJlV','3204JyrApy','\x20\x20[write]','Get\x20config\x20value\x20(key)','show','API','381141fDTWzn','description','passCommandAsArg','wildcardModule','push','command','set','109113ExcqgF','Logs','create','has','get','remove','init','Install\x20developer\x20skill\x20package','read','project','Clear\x20command\x20history\x20logs','auth','Project','List\x20all\x20config\x20values','list','Set\x20config\x20value\x20(key\x20value)','Add\x20an\x20app\x20to\x20config','config','logs','service','app','upgrade','Create\x20a\x20new\x20project','Self\x20Update','map','Login\x20via\x20browser','Run\x20any\x20package.json\x20script','defaultCommand','check','clear','Remove\x20an\x20app\x20from\x20config','12075PBAHgO','Skills','Code\x20Generation','14487740eAgbYV','values','login','<script>','install'];a60_0x5751=function(){return _0x302dcb;};return a60_0x5751();}export function getServiceEntry(_0x1445f0){const _0x17dd29=a60_0x13f788;return serviceByName[_0x17dd29(0xad)](_0x1445f0);}export function getLegacyHandler(_0xe39c3a,_0x183a3d){const _0xc28c64=a60_0x13f788;return legacyHandlers[_0xc28c64(0xad)](_0xe39c3a+':'+_0x183a3d);}export function getAllDefinitions(){const _0x3542e5=a60_0x13f788;return Array[_0x3542e5(0xde)](definitions[_0x3542e5(0xcc)]());}
1
+ const a58_0x118c6e=a58_0x2e30;(function(_0x1b18f3,_0x560d12){const _0x429204=a58_0x2e30,_0x285849=_0x1b18f3();while(!![]){try{const _0x545d09=-parseInt(_0x429204(0x115))/0x1+-parseInt(_0x429204(0x119))/0x2*(parseInt(_0x429204(0x145))/0x3)+parseInt(_0x429204(0x113))/0x4+-parseInt(_0x429204(0x125))/0x5+parseInt(_0x429204(0x12e))/0x6+parseInt(_0x429204(0x121))/0x7+parseInt(_0x429204(0x158))/0x8;if(_0x545d09===_0x560d12)break;else _0x285849['push'](_0x285849['shift']());}catch(_0x2cec41){_0x285849['push'](_0x285849['shift']());}}}(a58_0x382a,0x9edb6));import{initCommand}from'./init.js';import{createCommand}from'./create.js';import{upgradeCommand}from'./project-upgrade.js';function a58_0x2e30(_0xd0301,_0x2964c0){_0xd0301=_0xd0301-0x113;const _0x382a64=a58_0x382a();let _0x2e3013=_0x382a64[_0xd0301];return _0x2e3013;}import{runCommand}from'./run.js';import{authCommand}from'./auth.js';import{logoutCommand}from'./logout.js';import{configCommand}from'./config.js';import{skillCommand}from'./skill.js';import{logsCommand}from'./logs.js';import{appCommand}from'./app.js';import{updateCommand}from'./cli-update.js';import{doctorCommand}from'./doctor.js';import{apiDefinitions}from'./api/index.js';import{bffDefinitions}from'./bff/index.js';import{sqlDefinitions}from'./sql/index.js';import{datasetDefinitions}from'./dataset/index.js';import{codegenDefinitions}from'./codegen/index.js';function a58_0x382a(){const _0x52a4b0=['Clear\x20command\x20history\x20logs','create','Install\x20developer\x20skill\x20package','push','risk','login','description','Configuration','use','Logs','project','doctor','map','update','check','<script>','Run\x20Scripts','3nPnoFg','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','Add\x20an\x20app\x20to\x20config','logout','init','Set\x20config\x20value\x20(key\x20value)','from','set','wildcardModule','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','Code\x20Generation','Remove\x20an\x20app\x20from\x20config','List\x20all\x20config\x20values','read','list','View\x20command\x20history\x20logs','auth','App\x20Management','module','9045400XBLyQl','passCommandAsArg','install','Diagnostics','write','808828sHAfgI','get','130251jPAfkq','Self\x20Update','Menu','app','2465342jONjSq','Dataset\x20&\x20Operations','Run\x20any\x20package.json\x20script','Login\x20via\x20browser','service','List\x20all\x20configured\x20apps','preview','Authentication','8770650DOgjON','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','Switch\x20the\x20default\x20app','command','5410110GctrDv','show','defaultCommand','build','clear','API','run','Create\x20a\x20new\x20project','SQL\x20Queries','3058740gkqAFq','skill','has','logs','Clear\x20login\x20session','start'];a58_0x382a=function(){return _0x52a4b0;};return a58_0x382a();}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(_0x59f454){const _0x32325b=a58_0x2e30;for(const _0x5cb2fe of _0x59f454){definitions[_0x32325b(0x14c)](_0x5cb2fe[_0x32325b(0x11d)]+':'+_0x5cb2fe[_0x32325b(0x124)],_0x5cb2fe);let _0x5dbf66=serviceGroups[_0x32325b(0x114)](_0x5cb2fe[_0x32325b(0x11d)]);!_0x5dbf66&&(_0x5dbf66=[],serviceGroups[_0x32325b(0x14c)](_0x5cb2fe[_0x32325b(0x11d)],_0x5dbf66)),_0x5dbf66[_0x32325b(0x137)](_0x5cb2fe);}}function registerDeclarativeService(_0x39cfe5,_0x3555b0){const _0x2b0a2b=a58_0x2e30;registerDefinitions(_0x3555b0);const _0x4377b6=_0x1a13b9=>_0x1a13b9===_0x2b0a2b(0x152)?'':_0x1a13b9===_0x2b0a2b(0x15c)?'\x20\x20[write]':'\x20\x20[high-risk-write]',_0x2e5dbe={'service':_0x3555b0[0x0][_0x2b0a2b(0x11d)],'label':_0x39cfe5,'commands':_0x3555b0[_0x2b0a2b(0x140)](_0x5caf86=>({'command':_0x5caf86[_0x2b0a2b(0x124)],'description':_0x5caf86[_0x2b0a2b(0x13a)],'tag':_0x4377b6(_0x5caf86[_0x2b0a2b(0x138)])})),'declarative':!![]};serviceRegistry[_0x2b0a2b(0x137)](_0x2e5dbe),serviceByName[_0x2b0a2b(0x14c)](_0x2e5dbe[_0x2b0a2b(0x11d)],_0x2e5dbe);}function registerLegacyService(_0x18077e,_0x5e427a,_0x2e62de,_0x27eff2){const _0x4002d3=a58_0x2e30,_0x57a68e={'service':_0x18077e,'label':_0x5e427a,'commands':_0x2e62de[_0x4002d3(0x140)](_0x36d7bc=>({'command':_0x36d7bc[_0x4002d3(0x124)],'description':_0x36d7bc['description'],'tag':''})),'declarative':![],'defaultCommand':_0x27eff2?.[_0x4002d3(0x127)],'wildcardModule':_0x27eff2?.[_0x4002d3(0x14d)]};serviceRegistry['push'](_0x57a68e),serviceByName[_0x4002d3(0x14c)](_0x18077e,_0x57a68e);for(const _0x420d98 of _0x2e62de){legacyHandlers[_0x4002d3(0x14c)](_0x18077e+':'+_0x420d98[_0x4002d3(0x124)],{'module':_0x420d98[_0x4002d3(0x157)],'passCommandAsArg':_0x420d98[_0x4002d3(0x159)]});}}registerLegacyService(a58_0x118c6e(0x13e),'Project',[{'command':a58_0x118c6e(0x149),'description':'Initialize\x20.rabetbase.json\x20config','module':initCommand},{'command':a58_0x118c6e(0x135),'description':a58_0x118c6e(0x12c),'module':createCommand},{'command':'upgrade','description':a58_0x118c6e(0x146),'module':upgradeCommand}]),registerLegacyService(a58_0x118c6e(0x118),a58_0x118c6e(0x156),[{'command':a58_0x118c6e(0x153),'description':a58_0x118c6e(0x11e),'module':appCommand,'passCommandAsArg':!![]},{'command':a58_0x118c6e(0x13c),'description':a58_0x118c6e(0x123),'module':appCommand,'passCommandAsArg':!![]},{'command':'add','description':a58_0x118c6e(0x147),'module':appCommand,'passCommandAsArg':!![]},{'command':'remove','description':a58_0x118c6e(0x150),'module':appCommand,'passCommandAsArg':!![]}],{'defaultCommand':'list'}),registerLegacyService(a58_0x118c6e(0x12b),a58_0x118c6e(0x144),[{'command':a58_0x118c6e(0x143),'description':a58_0x118c6e(0x11b),'module':runCommand}],{'wildcardModule':runCommand}),registerLegacyService(a58_0x118c6e(0x155),a58_0x118c6e(0x120),[{'command':'login','description':a58_0x118c6e(0x11c),'module':authCommand},{'command':a58_0x118c6e(0x148),'description':a58_0x118c6e(0x132),'module':logoutCommand}],{'defaultCommand':a58_0x118c6e(0x139)}),registerLegacyService(a58_0x118c6e(0x141),a58_0x118c6e(0x116),[{'command':a58_0x118c6e(0x12b),'description':a58_0x118c6e(0x14e),'module':updateCommand}],{'defaultCommand':a58_0x118c6e(0x12b)}),registerLegacyService(a58_0x118c6e(0x13f),a58_0x118c6e(0x15b),[{'command':a58_0x118c6e(0x142),'description':a58_0x118c6e(0x122),'module':doctorCommand}],{'defaultCommand':a58_0x118c6e(0x142)}),registerLegacyService('config',a58_0x118c6e(0x13b),[{'command':'set','description':a58_0x118c6e(0x14a),'module':configCommand,'passCommandAsArg':!![]},{'command':a58_0x118c6e(0x114),'description':'Get\x20config\x20value\x20(key)','module':configCommand,'passCommandAsArg':!![]},{'command':a58_0x118c6e(0x153),'description':a58_0x118c6e(0x151),'module':configCommand,'passCommandAsArg':!![]}]),registerDeclarativeService(a58_0x118c6e(0x12a),apiDefinitions),registerDeclarativeService(a58_0x118c6e(0x117),menuDefinitions),registerDeclarativeService(a58_0x118c6e(0x11a),datasetDefinitions),registerDeclarativeService('BFF\x20Scripts',bffDefinitions),registerDeclarativeService(a58_0x118c6e(0x12d),sqlDefinitions),registerDeclarativeService(a58_0x118c6e(0x14f),codegenDefinitions),registerLegacyService('skill','Skills',[{'command':'install','description':a58_0x118c6e(0x136),'module':skillCommand,'passCommandAsArg':!![]}]),registerLegacyService(a58_0x118c6e(0x131),a58_0x118c6e(0x13d),[{'command':'show','description':a58_0x118c6e(0x154),'module':logsCommand},{'command':a58_0x118c6e(0x129),'description':a58_0x118c6e(0x134),'module':logsCommand,'passCommandAsArg':!![]}],{'defaultCommand':a58_0x118c6e(0x126)});export const deprecatedAliases={'init':{'service':a58_0x118c6e(0x13e),'command':'init'},'create':{'service':'project','command':'create'},'start':{'service':'run','command':a58_0x118c6e(0x133)},'build':{'service':a58_0x118c6e(0x12b),'command':a58_0x118c6e(0x128)},'preview':{'service':a58_0x118c6e(0x12b),'command':a58_0x118c6e(0x11f)},'logout':{'service':a58_0x118c6e(0x155),'command':a58_0x118c6e(0x148)},'skills':{'service':a58_0x118c6e(0x12f),'command':a58_0x118c6e(0x15a)}};export function findDefinition(_0x3ac9c3,_0xe28c5){return definitions['get'](_0x3ac9c3+':'+_0xe28c5);}export function isKnownService(_0x1fb1db){return serviceByName['has'](_0x1fb1db);}export function isDeclarativeService(_0x417edf){const _0x401eb3=a58_0x118c6e;return serviceGroups[_0x401eb3(0x130)](_0x417edf);}export function getServiceEntry(_0x4ac57e){const _0x2b76e2=a58_0x118c6e;return serviceByName[_0x2b76e2(0x114)](_0x4ac57e);}export function getLegacyHandler(_0x1092d0,_0x35ca05){return legacyHandlers['get'](_0x1092d0+':'+_0x35ca05);}export function getAllDefinitions(){const _0x10d75e=a58_0x118c6e;return Array[_0x10d75e(0x14b)](definitions['values']());}
@@ -1 +1 @@
1
- const a61_0x1ee41e=a61_0x3c90;(function(_0x3ff7be,_0x596034){const _0x1a1b50=a61_0x3c90,_0x369eb5=_0x3ff7be();while(!![]){try{const _0x21ec93=parseInt(_0x1a1b50(0x180))/0x1*(-parseInt(_0x1a1b50(0x1a4))/0x2)+-parseInt(_0x1a1b50(0x17d))/0x3*(-parseInt(_0x1a1b50(0x198))/0x4)+-parseInt(_0x1a1b50(0x19d))/0x5+-parseInt(_0x1a1b50(0x182))/0x6+parseInt(_0x1a1b50(0x18a))/0x7+-parseInt(_0x1a1b50(0x19e))/0x8+-parseInt(_0x1a1b50(0x181))/0x9*(-parseInt(_0x1a1b50(0x18d))/0xa);if(_0x21ec93===_0x596034)break;else _0x369eb5['push'](_0x369eb5['shift']());}catch(_0x493b5d){_0x369eb5['push'](_0x369eb5['shift']());}}}(a61_0x415a,0x20006));import{readFileSync,existsSync}from'node:fs';import{resolve,delimiter,join}from'node:path';import{spawn}from'node:child_process';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';function a61_0x3c90(_0x543110,_0x1cb4ee){_0x543110=_0x543110-0x171;const _0x415a76=a61_0x415a();let _0x3c9032=_0x415a76[_0x543110];return _0x3c9032;}const VERSION_CHECK_SCRIPTS=new Set([a61_0x1ee41e(0x1a7),a61_0x1ee41e(0x17e)]);function readPackageScripts(_0x32402b){const _0x5f43f4=a61_0x1ee41e,_0x23a332=resolve(_0x32402b,_0x5f43f4(0x189));if(!existsSync(_0x23a332))return null;try{const _0x492c72=JSON[_0x5f43f4(0x196)](readFileSync(_0x23a332,'utf-8'));return _0x492c72[_0x5f43f4(0x17c)]??{};}catch{return null;}}function detectPackageManager(_0x13414f){const _0x1c47b9=a61_0x1ee41e;if(existsSync(resolve(_0x13414f,'bun.lockb'))||existsSync(resolve(_0x13414f,'bun.lock')))return _0x1c47b9(0x188);if(existsSync(resolve(_0x13414f,_0x1c47b9(0x171))))return'pnpm';if(existsSync(resolve(_0x13414f,_0x1c47b9(0x19a))))return'yarn';return _0x1c47b9(0x172);}async function versionCheck(_0x4560cf){const _0x241947=a61_0x1ee41e,_0x2fba0d=await checkCliVersion();if(_0x2fba0d['needsUpgrade'])printCliUpgradeWarning(_0x2fba0d);const _0x6782c0=await checkSdkVersion(_0x4560cf);if(_0x6782c0[_0x241947(0x1a6)])printSdkUpgradeWarning(_0x6782c0);}function spawnScript(_0x2c88d7,_0x4d6e90,_0x21f10f,_0xbe90bd){return new Promise((_0xa506c2,_0x24806e)=>{const _0x457318=a61_0x3c90,_0x59ed2f=['run',_0x4d6e90,..._0x21f10f],_0x72e61c=spawn(_0x2c88d7,_0x59ed2f,{'cwd':_0xbe90bd,'stdio':_0x457318(0x17f),'shell':!![],'env':{...process[_0x457318(0x199)],'PATH':''+join(_0xbe90bd,_0x457318(0x175),_0x457318(0x193))+delimiter+process[_0x457318(0x199)][_0x457318(0x19b)]}});_0x72e61c['on'](_0x457318(0x184),_0x3acf42=>{const _0x5e5dd8=_0x457318;if(_0x3acf42===0x0||_0x3acf42===null)_0xa506c2();else _0x24806e(new Error(_0x2c88d7+_0x5e5dd8(0x18e)+_0x4d6e90+'\x20exited\x20with\x20code\x20'+_0x3acf42));}),_0x72e61c['on']('error',_0x24806e);});}function spawnViteBuildWatch(_0x30c360){return new Promise((_0x39e6d7,_0x2ed87b)=>{const _0x19c733=a61_0x3c90,_0x132dcc=spawn(_0x19c733(0x18c),[_0x19c733(0x1a3),'--watch'],{'cwd':_0x30c360,'stdio':'inherit','shell':!![],'env':{...process[_0x19c733(0x199)],'PATH':''+join(_0x30c360,_0x19c733(0x175),_0x19c733(0x193))+delimiter+process[_0x19c733(0x199)][_0x19c733(0x19b)]}});_0x132dcc['on'](_0x19c733(0x184),_0x2830a4=>{const _0x381a8a=_0x19c733;if(_0x2830a4===0x0||_0x2830a4===null)_0x39e6d7();else _0x2ed87b(new Error(_0x381a8a(0x17b)+_0x2830a4));}),_0x132dcc['on'](_0x19c733(0x1a5),_0x2ed87b);});}function spawnVitePreview(_0x38f00e){return new Promise((_0x480ce5,_0x3c677c)=>{const _0x5cb7bb=a61_0x3c90,_0xfe2732=spawn(_0x5cb7bb(0x18c),[_0x5cb7bb(0x173)],{'cwd':_0x38f00e,'stdio':_0x5cb7bb(0x17f),'shell':!![],'env':{...process[_0x5cb7bb(0x199)],'PATH':''+join(_0x38f00e,_0x5cb7bb(0x175),'.bin')+delimiter+process[_0x5cb7bb(0x199)][_0x5cb7bb(0x19b)]}});_0xfe2732['on'](_0x5cb7bb(0x184),_0x1a4a0b=>{const _0x295a24=_0x5cb7bb;if(_0x1a4a0b===0x0||_0x1a4a0b===null)_0x480ce5();else _0x3c677c(new Error(_0x295a24(0x190)+_0x1a4a0b));}),_0xfe2732['on'](_0x5cb7bb(0x1a5),_0x3c677c);});}export const runCommand={'name':'run','description':a61_0x1ee41e(0x18f),async 'run'(_0x43b0b3,_0x9a9b6e,_0x285bc6){const _0xe5a7dd=a61_0x1ee41e,_0x44d9f2=process[_0xe5a7dd(0x186)](),_0x3a986d=_0x9a9b6e[0x0],_0x5baa0e=_0x9a9b6e[_0xe5a7dd(0x185)](0x1),_0x13553e=readPackageScripts(_0x44d9f2);!_0x13553e&&(console['error']('Error:\x20No\x20package.json\x20found\x20in\x20current\x20directory.'),process[_0xe5a7dd(0x187)](0x1));if(!_0x3a986d){const _0x2f3004=Object['keys'](_0x13553e);if(_0x2f3004[_0xe5a7dd(0x19f)]===0x0)console[_0xe5a7dd(0x1a1)](_0xe5a7dd(0x17a));else{console[_0xe5a7dd(0x1a1)](_0xe5a7dd(0x194));const _0x974539=Math[_0xe5a7dd(0x179)](..._0x2f3004['map'](_0x3fa6b0=>_0x3fa6b0['length']));for(const [_0x4a86b1,_0x5e4054]of Object['entries'](_0x13553e)){console[_0xe5a7dd(0x1a1)](_0xe5a7dd(0x174)+_0x4a86b1[_0xe5a7dd(0x177)](_0x974539+0x2)+_0x5e4054);}console['log']('\x0a\x20\x20Usage:\x20rabetbase\x20run\x20<script>\x0a');}return;}!_0x13553e[_0x3a986d]&&(console[_0xe5a7dd(0x1a5)](_0xe5a7dd(0x18b)+_0x3a986d+_0xe5a7dd(0x183)+(_0xe5a7dd(0x1a0)+(Object[_0xe5a7dd(0x191)](_0x13553e)[_0xe5a7dd(0x195)](',\x20')||_0xe5a7dd(0x19c)))),process['exit'](0x1));const _0x55796d=detectPackageManager(_0x44d9f2);VERSION_CHECK_SCRIPTS['has'](_0x3a986d)&&await versionCheck(_0x44d9f2);if(_0x3a986d==='preview'&&_0x285bc6[_0xe5a7dd(0x197)]){_0x43b0b3['logger'][_0xe5a7dd(0x1a2)](_0xe5a7dd(0x176),'preview\x20--watch\x20mode:\x20vite\x20build\x20--watch\x20+\x20vite\x20preview'),await Promise[_0xe5a7dd(0x178)]([spawnViteBuildWatch(_0x44d9f2),spawnVitePreview(_0x44d9f2)]);return;}_0x43b0b3[_0xe5a7dd(0x192)][_0xe5a7dd(0x1a2)](_0xe5a7dd(0x176),_0x55796d+'\x20run\x20'+_0x3a986d+(_0x5baa0e[_0xe5a7dd(0x19f)]?'\x20'+_0x5baa0e[_0xe5a7dd(0x195)]('\x20'):'')),await spawnScript(_0x55796d,_0x3a986d,_0x5baa0e,_0x44d9f2);}};function a61_0x415a(){const _0x24db0e=['preview','\x20\x20\x20\x20','node_modules','run','padEnd','all','max','No\x20scripts\x20defined\x20in\x20package.json.','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','scripts','66gDNKPu','dev','inherit','3197WOVnYH','1107747lEAuja','433332YxYmkH','\x22\x20not\x20found\x20in\x20package.json.\x0a','close','slice','cwd','exit','bun','package.json','1632085MbeWyD','Error:\x20Script\x20\x22','vite','20xhKAOn','\x20run\x20','Run\x20a\x20package.json\x20script','vite\x20preview\x20exited\x20with\x20code\x20','keys','logger','.bin','\x0a\x20\x20Available\x20scripts:\x0a','join','parse','watch','20012AIEXps','env','yarn.lock','PATH','(none)','1146380bPRFFF','1152184mckyNz','length','\x20\x20Available:\x20','log','info','build','8NWrLNT','error','needsUpgrade','start','pnpm-lock.yaml','npm'];a61_0x415a=function(){return _0x24db0e;};return a61_0x415a();}
1
+ const a59_0x30d91b=a59_0x5803;(function(_0x5d3494,_0x2894f4){const _0x10e6be=a59_0x5803,_0x48ead3=_0x5d3494();while(!![]){try{const _0x3bbd68=-parseInt(_0x10e6be(0x141))/0x1*(parseInt(_0x10e6be(0x111))/0x2)+parseInt(_0x10e6be(0x11f))/0x3+-parseInt(_0x10e6be(0x13d))/0x4+parseInt(_0x10e6be(0x13c))/0x5*(parseInt(_0x10e6be(0x11d))/0x6)+-parseInt(_0x10e6be(0x131))/0x7+parseInt(_0x10e6be(0x121))/0x8*(parseInt(_0x10e6be(0x113))/0x9)+-parseInt(_0x10e6be(0x130))/0xa*(parseInt(_0x10e6be(0x116))/0xb);if(_0x3bbd68===_0x2894f4)break;else _0x48ead3['push'](_0x48ead3['shift']());}catch(_0x2a170f){_0x48ead3['push'](_0x48ead3['shift']());}}}(a59_0x3192,0xc65fa));import{readFileSync,existsSync}from'node:fs';import{resolve,delimiter,join}from'node:path';function a59_0x5803(_0x89d235,_0x235ae7){_0x89d235=_0x89d235-0x10a;const _0x31927b=a59_0x3192();let _0x5803d6=_0x31927b[_0x89d235];return _0x5803d6;}import{spawn}from'node:child_process';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';function a59_0x3192(){const _0x557c02=['run','1854544McrIWo','preview','yarn.lock','package.json','all','dev','.bin','log','\x20run\x20','error','pnpm-lock.yaml','bun.lock','preview\x20--watch\x20mode:\x20vite\x20build\x20--watch\x20+\x20vite\x20preview','utf-8','\x20\x20Available:\x20','10kDcTOT','1028440NLJEEN','PATH','needsUpgrade','has','entries','slice','join','\x22\x20not\x20found\x20in\x20package.json.\x0a','padEnd','Error:\x20Script\x20\x22','vite\x20preview\x20exited\x20with\x20code\x20','700tmPqot','688144FdbSzW','\x0a\x20\x20Usage:\x20rabetbase\x20run\x20<script>\x0a','start','keys','2OUVmJj','parse','\x0a\x20\x20Available\x20scripts:\x0a','--watch','node_modules','bun.lockb','env','info','bun','451126zGrLfX','exit','36dEopPZ','pnpm','vite','8032475ueZRzd','close','(none)','build','length','yarn','\x20\x20\x20\x20','10596fbuqwi','inherit','3414999kVpCFi'];a59_0x3192=function(){return _0x557c02;};return a59_0x3192();}import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a59_0x30d91b(0x13f),a59_0x30d91b(0x126)]);function readPackageScripts(_0x220835){const _0x2601ca=a59_0x30d91b,_0x35954f=resolve(_0x220835,_0x2601ca(0x124));if(!existsSync(_0x35954f))return null;try{const _0x2254f7=JSON[_0x2601ca(0x142)](readFileSync(_0x35954f,_0x2601ca(0x12e)));return _0x2254f7['scripts']??{};}catch{return null;}}function detectPackageManager(_0x23f31a){const _0x5ca31b=a59_0x30d91b;if(existsSync(resolve(_0x23f31a,_0x5ca31b(0x10d)))||existsSync(resolve(_0x23f31a,_0x5ca31b(0x12c))))return _0x5ca31b(0x110);if(existsSync(resolve(_0x23f31a,_0x5ca31b(0x12b))))return _0x5ca31b(0x114);if(existsSync(resolve(_0x23f31a,_0x5ca31b(0x123))))return _0x5ca31b(0x11b);return'npm';}async function versionCheck(_0x1e1886){const _0x2bb4ad=a59_0x30d91b,_0x251945=await checkCliVersion();if(_0x251945[_0x2bb4ad(0x133)])printCliUpgradeWarning(_0x251945);const _0x289846=await checkSdkVersion(_0x1e1886);if(_0x289846[_0x2bb4ad(0x133)])printSdkUpgradeWarning(_0x289846);}function spawnScript(_0x558540,_0x248556,_0x337b50,_0x2016f8){return new Promise((_0x38c886,_0x51a61a)=>{const _0x5b883a=a59_0x5803,_0x4a5184=[_0x5b883a(0x120),_0x248556,..._0x337b50],_0x4b7c13=spawn(_0x558540,_0x4a5184,{'cwd':_0x2016f8,'stdio':'inherit','shell':!![],'env':{...process['env'],'PATH':''+join(_0x2016f8,_0x5b883a(0x10c),_0x5b883a(0x127))+delimiter+process[_0x5b883a(0x10e)]['PATH']}});_0x4b7c13['on'](_0x5b883a(0x117),_0x16ac8f=>{const _0x166fce=_0x5b883a;if(_0x16ac8f===0x0||_0x16ac8f===null)_0x38c886();else _0x51a61a(new Error(_0x558540+_0x166fce(0x129)+_0x248556+'\x20exited\x20with\x20code\x20'+_0x16ac8f));}),_0x4b7c13['on']('error',_0x51a61a);});}function spawnViteBuildWatch(_0x430f10){return new Promise((_0x38430f,_0x31b2cc)=>{const _0xf504d0=a59_0x5803,_0x147ad4=spawn(_0xf504d0(0x115),[_0xf504d0(0x119),_0xf504d0(0x10b)],{'cwd':_0x430f10,'stdio':_0xf504d0(0x11e),'shell':!![],'env':{...process[_0xf504d0(0x10e)],'PATH':''+join(_0x430f10,'node_modules','.bin')+delimiter+process[_0xf504d0(0x10e)]['PATH']}});_0x147ad4['on'](_0xf504d0(0x117),_0x57f356=>{if(_0x57f356===0x0||_0x57f356===null)_0x38430f();else _0x31b2cc(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x57f356));}),_0x147ad4['on']('error',_0x31b2cc);});}function spawnVitePreview(_0x2c09a4){return new Promise((_0x45e1ab,_0x4950bc)=>{const _0x23da52=a59_0x5803,_0x83968=spawn(_0x23da52(0x115),[_0x23da52(0x122)],{'cwd':_0x2c09a4,'stdio':_0x23da52(0x11e),'shell':!![],'env':{...process[_0x23da52(0x10e)],'PATH':''+join(_0x2c09a4,'node_modules',_0x23da52(0x127))+delimiter+process[_0x23da52(0x10e)][_0x23da52(0x132)]}});_0x83968['on'](_0x23da52(0x117),_0x20edd6=>{const _0x4f11cc=_0x23da52;if(_0x20edd6===0x0||_0x20edd6===null)_0x45e1ab();else _0x4950bc(new Error(_0x4f11cc(0x13b)+_0x20edd6));}),_0x83968['on']('error',_0x4950bc);});}export const runCommand={'name':'run','description':'Run\x20a\x20package.json\x20script',async 'run'(_0x3ddcc8,_0x473e7e,_0x308777){const _0x154dda=a59_0x30d91b,_0x14409f=process['cwd'](),_0x1be56e=_0x473e7e[0x0],_0x44f73a=_0x473e7e[_0x154dda(0x136)](0x1),_0x28d9ec=readPackageScripts(_0x14409f);!_0x28d9ec&&(console[_0x154dda(0x12a)]('Error:\x20No\x20package.json\x20found\x20in\x20current\x20directory.'),process[_0x154dda(0x112)](0x1));if(!_0x1be56e){const _0x2467e1=Object[_0x154dda(0x140)](_0x28d9ec);if(_0x2467e1['length']===0x0)console[_0x154dda(0x128)]('No\x20scripts\x20defined\x20in\x20package.json.');else{console[_0x154dda(0x128)](_0x154dda(0x10a));const _0x1b063a=Math['max'](..._0x2467e1['map'](_0x54da62=>_0x54da62[_0x154dda(0x11a)]));for(const [_0x577c52,_0x4625dc]of Object[_0x154dda(0x135)](_0x28d9ec)){console[_0x154dda(0x128)](_0x154dda(0x11c)+_0x577c52[_0x154dda(0x139)](_0x1b063a+0x2)+_0x4625dc);}console['log'](_0x154dda(0x13e));}return;}!_0x28d9ec[_0x1be56e]&&(console['error'](_0x154dda(0x13a)+_0x1be56e+_0x154dda(0x138)+(_0x154dda(0x12f)+(Object[_0x154dda(0x140)](_0x28d9ec)[_0x154dda(0x137)](',\x20')||_0x154dda(0x118)))),process[_0x154dda(0x112)](0x1));const _0x8e5c91=detectPackageManager(_0x14409f);VERSION_CHECK_SCRIPTS[_0x154dda(0x134)](_0x1be56e)&&await versionCheck(_0x14409f);if(_0x1be56e===_0x154dda(0x122)&&_0x308777['watch']){_0x3ddcc8['logger'][_0x154dda(0x10f)](_0x154dda(0x120),_0x154dda(0x12d)),await Promise[_0x154dda(0x125)]([spawnViteBuildWatch(_0x14409f),spawnVitePreview(_0x14409f)]);return;}_0x3ddcc8['logger'][_0x154dda(0x10f)](_0x154dda(0x120),_0x8e5c91+'\x20run\x20'+_0x1be56e+(_0x44f73a[_0x154dda(0x11a)]?'\x20'+_0x44f73a[_0x154dda(0x137)]('\x20'):'')),await spawnScript(_0x8e5c91,_0x1be56e,_0x44f73a,_0x14409f);}};
@@ -1 +1 @@
1
- function a62_0x19f7(){const _0x215a78=['nonInteractive','npx\x20skills\x20add\x20failed:\x20','log','Check\x20network\x20connectivity\x20and\x20try\x20again.','inherit','28ZcYvKG','219237eDItpB','1132750eQEkAZ','rabetbase\x20skill\x20installed','error','7026288BPScOS','29049584ITtApL','info','unknown','logger','install','cwd','3553244cNBgXy','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...','321362xQaemq','6893803NqNpqL','skill-install','lovrabet/rabetbase','pipe'];a62_0x19f7=function(){return _0x215a78;};return a62_0x19f7();}(function(_0x220a45,_0xe3897d){const _0xe53514=a62_0x4a49,_0x4a14b3=_0x220a45();while(!![]){try{const _0x4dfc3d=-parseInt(_0xe53514(0x169))/0x1+-parseInt(_0xe53514(0x173))/0x2*(parseInt(_0xe53514(0x174))/0x3)+-parseInt(_0xe53514(0x167))/0x4+-parseInt(_0xe53514(0x175))/0x5+-parseInt(_0xe53514(0x178))/0x6+parseInt(_0xe53514(0x16a))/0x7+parseInt(_0xe53514(0x179))/0x8;if(_0x4dfc3d===_0xe3897d)break;else _0x4a14b3['push'](_0x4a14b3['shift']());}catch(_0x681168){_0x4a14b3['push'](_0x4a14b3['shift']());}}}(a62_0x19f7,0xf0a32));import{skillsCommand as a62_0x5b30ae}from'../skills/main.js';function a62_0x4a49(_0x9126ae,_0xf6c95b){_0x9126ae=_0x9126ae-0x167;const _0x19f727=a62_0x19f7();let _0x4a4977=_0x19f727[_0x9126ae];return _0x4a4977;}import{CliErrors}from'../errors.js';export const skillCommand={'name':'skill','description':'Install\x20skill\x20packages',async 'run'(_0x48a4bd,_0x3cc2bc,_0x12864d){const _0x4df4d7=a62_0x4a49,_0x3b8aaf=_0x3cc2bc[0x0];if(_0x3b8aaf===_0x4df4d7(0x17d)){_0x48a4bd[_0x4df4d7(0x17c)]['setLogPath'](process[_0x4df4d7(0x17e)]()),_0x48a4bd[_0x4df4d7(0x17c)][_0x4df4d7(0x17a)](_0x4df4d7(0x16b),'执行安装技能包命令(委托给\x20npx\x20skills\x20--global)');const {runNpxSkillsAddGlobal:_0x3f4fd5}=await import('../skills/npx-skills-add.js'),_0xb1bd21=_0x48a4bd[_0x4df4d7(0x16e)]?_0x4df4d7(0x16d):_0x4df4d7(0x172);console['log'](_0x4df4d7(0x168));const _0x509408=_0x3f4fd5(process[_0x4df4d7(0x17e)](),_0x4df4d7(0x16c),{'stdio':_0xb1bd21});if(_0x509408['skipped'])console[_0x4df4d7(0x170)]('Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.');else{if(_0x509408['ok'])console[_0x4df4d7(0x170)](_0x4df4d7(0x176));else throw CliErrors['apiError'](_0x4df4d7(0x16f)+(_0x509408[_0x4df4d7(0x177)]||_0x4df4d7(0x17b)),_0x4df4d7(0x171));}}else await a62_0x5b30ae(_0x3b8aaf,[],_0x12864d);}};
1
+ const a60_0x2bbc1a=a60_0x2437;(function(_0x2348ec,_0x3b7d8f){const _0x49bacd=a60_0x2437,_0x4d11ce=_0x2348ec();while(!![]){try{const _0x1691db=-parseInt(_0x49bacd(0xe9))/0x1*(parseInt(_0x49bacd(0xf1))/0x2)+-parseInt(_0x49bacd(0xd9))/0x3+parseInt(_0x49bacd(0xf2))/0x4+parseInt(_0x49bacd(0xe6))/0x5*(parseInt(_0x49bacd(0xf7))/0x6)+parseInt(_0x49bacd(0xec))/0x7+-parseInt(_0x49bacd(0xe0))/0x8*(parseInt(_0x49bacd(0xe5))/0x9)+parseInt(_0x49bacd(0xde))/0xa;if(_0x1691db===_0x3b7d8f)break;else _0x4d11ce['push'](_0x4d11ce['shift']());}catch(_0x266664){_0x4d11ce['push'](_0x4d11ce['shift']());}}}(a60_0x2cc7,0x6f249));import{skillsCommand as a60_0x4698c1}from'../skills/main.js';function a60_0x2437(_0x423930,_0x1bbb2e){_0x423930=_0x423930-0xd9;const _0x2cc73e=a60_0x2cc7();let _0x243757=_0x2cc73e[_0x423930];return _0x243757;}function a60_0x2cc7(){const _0x32b27b=['1934690sdxErw','lovrabet/rabetbase','782184NBvqAY','pipe','rabetbase\x20skill\x20installed','Skipped\x20npx\x20(RABETBASE_SKIP_NPX_SKILLS=1);\x20assuming\x20skill\x20is\x20already\x20present.','Installing\x20official\x20skill\x20via\x20npx\x20(npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global)...','36UYEfyH','335dFzxeQ','cwd','apiError','12099wdZgtI','unknown','install','2679621Rsvwqd','nonInteractive','log','Check\x20network\x20connectivity\x20and\x20try\x20again.','执行安装技能包命令(委托给\x20npx\x20skills\x20--global)','42kJGKXp','562780pHCOOT','Install\x20skill\x20packages','inherit','skill-install','logger','79746EcPqHV','1521156LkzcZd','../skills/npx-skills-add.js','npx\x20skills\x20add\x20failed:\x20','setLogPath','info'];a60_0x2cc7=function(){return _0x32b27b;};return a60_0x2cc7();}import{CliErrors}from'../errors.js';export const skillCommand={'name':'skill','description':a60_0x2bbc1a(0xf3),async 'run'(_0x431897,_0xfdd3c1,_0x2edc08){const _0x3cdde8=a60_0x2bbc1a,_0x3923ae=_0xfdd3c1[0x0];if(_0x3923ae===_0x3cdde8(0xeb)){_0x431897[_0x3cdde8(0xf6)][_0x3cdde8(0xdc)](process[_0x3cdde8(0xe7)]()),_0x431897[_0x3cdde8(0xf6)][_0x3cdde8(0xdd)](_0x3cdde8(0xf5),_0x3cdde8(0xf0));const {runNpxSkillsAddGlobal:_0x1551d1}=await import(_0x3cdde8(0xda)),_0x595174=_0x431897[_0x3cdde8(0xed)]?_0x3cdde8(0xe1):_0x3cdde8(0xf4);console[_0x3cdde8(0xee)](_0x3cdde8(0xe4));const _0x2cfb3c=_0x1551d1(process[_0x3cdde8(0xe7)](),_0x3cdde8(0xdf),{'stdio':_0x595174});if(_0x2cfb3c['skipped'])console[_0x3cdde8(0xee)](_0x3cdde8(0xe3));else{if(_0x2cfb3c['ok'])console['log'](_0x3cdde8(0xe2));else throw CliErrors[_0x3cdde8(0xe8)](_0x3cdde8(0xdb)+(_0x2cfb3c['error']||_0x3cdde8(0xea)),_0x3cdde8(0xef));}}else await a60_0x4698c1(_0x3923ae,[],_0x2edc08);}};
@@ -1 +1 @@
1
- function a63_0x5965(_0x26ca75,_0x1c702b){_0x26ca75=_0x26ca75-0x9d;const _0x5e8816=a63_0x5e88();let _0x59657a=_0x5e8816[_0x26ca75];return _0x59657a;}const a63_0x49b3de=a63_0x5965;function a63_0x5e88(){const _0x1a5e4d=['description','sqlcode','1185JBqzCf','sql','9369830eGWpIH','31tfCEiW','detail','read','1440zdcwph','678mbJKQQ','bool','34792087vPmMGh','4107138ehsoEy','sqlContent','verbose','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','str','44802eGTUtG','dbId','90194GIFbAe','25788vFQIAn','appCode','68033CgNUhq'];a63_0x5e88=function(){return _0x1a5e4d;};return a63_0x5e88();}(function(_0x52f92e,_0xe61919){const _0x5ba253=a63_0x5965,_0x47a796=_0x52f92e();while(!![]){try{const _0x42a573=-parseInt(_0x5ba253(0xb1))/0x1*(parseInt(_0x5ba253(0xa8))/0x2)+-parseInt(_0x5ba253(0xa1))/0x3+-parseInt(_0x5ba253(0xa9))/0x4*(-parseInt(_0x5ba253(0xae))/0x5)+parseInt(_0x5ba253(0x9e))/0x6*(-parseInt(_0x5ba253(0xab))/0x7)+-parseInt(_0x5ba253(0x9d))/0x8*(-parseInt(_0x5ba253(0xa6))/0x9)+-parseInt(_0x5ba253(0xb0))/0xa+parseInt(_0x5ba253(0xa0))/0xb;if(_0x42a573===_0xe61919)break;else _0x47a796['push'](_0x47a796['shift']());}catch(_0x5293b4){_0x47a796['push'](_0x47a796['shift']());}}}(a63_0x5e88,0xbf8e5));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../common/flags.js';export const sqlDetail={'service':a63_0x49b3de(0xaf),'command':a63_0x49b3de(0xb2),'description':a63_0x49b3de(0xa4),'risk':a63_0x49b3de(0xb3),'flags':[SQLCODE_FLAG,{'name':a63_0x49b3de(0xa3),'type':'boolean','description':'Return\x20full\x20raw\x20SQL\x20query\x20object'}],async 'execute'(_0x4fbe07){const _0x3ff854=a63_0x49b3de,_0x4c6ad9=await getSqlQueryInfo(_0x4fbe07[_0x3ff854(0xaa)],_0x4fbe07[_0x3ff854(0xa5)](_0x3ff854(0xad))),_0x1c674a=_0x4fbe07[_0x3ff854(0x9f)](_0x3ff854(0xa3));if(_0x1c674a)return{'ok':!![],'data':_0x4c6ad9};const _0x52f99e=_0x4c6ad9[_0x3ff854(0xa7)]?await getDbName(_0x4fbe07[_0x3ff854(0xaa)],_0x4c6ad9[_0x3ff854(0xa7)]):undefined;return{'ok':!![],'data':{'sqlCode':_0x4c6ad9['sqlCode'],'sqlName':_0x4c6ad9['sqlName'],'db':_0x52f99e?_0x52f99e+'\x20('+_0x4c6ad9[_0x3ff854(0xa7)]+')':_0x4c6ad9[_0x3ff854(0xa7)]??'','description':_0x4c6ad9[_0x3ff854(0xac)]??'','sqlContent':_0x4c6ad9[_0x3ff854(0xa2)]??''}};}};
1
+ const a61_0x167e8b=a61_0x2110;function a61_0x4451(){const _0x2e8a74=['detail','bool','5982uQqdiu','2009qUvuMT','Get\x20custom\x20SQL\x20query\x20details\x20by\x20sqlCode','8khvCaa','read','sqlcode','1580392jorHEv','6ZXZtNo','sqlContent','5306409ebQiDQ','417633BalFeV','sqlName','sql','879915yjWLNF','verbose','dbId','str','559118SAbJxQ','3989315qcjKSr','description','boolean','60MdhJSW'];a61_0x4451=function(){return _0x2e8a74;};return a61_0x4451();}(function(_0x5c3fef,_0x6ceb13){const _0xd8d240=a61_0x2110,_0x4c6b71=_0x5c3fef();while(!![]){try{const _0x267228=-parseInt(_0xd8d240(0x6d))/0x1+parseInt(_0xd8d240(0x7b))/0x2*(-parseInt(_0xd8d240(0x7e))/0x3)+-parseInt(_0xd8d240(0x7a))/0x4+-parseInt(_0xd8d240(0x81))/0x5+-parseInt(_0xd8d240(0x74))/0x6*(-parseInt(_0xd8d240(0x75))/0x7)+parseInt(_0xd8d240(0x77))/0x8*(-parseInt(_0xd8d240(0x7d))/0x9)+parseInt(_0xd8d240(0x71))/0xa*(parseInt(_0xd8d240(0x6e))/0xb);if(_0x267228===_0x6ceb13)break;else _0x4c6b71['push'](_0x4c6b71['shift']());}catch(_0x381528){_0x4c6b71['push'](_0x4c6b71['shift']());}}}(a61_0x4451,0x4f458));import{getSqlQueryInfo}from'../../core/api-client.js';import{getDbName}from'../../core/db-resolver.js';import{SQLCODE_FLAG}from'../common/flags.js';function a61_0x2110(_0x35c31e,_0x507e27){_0x35c31e=_0x35c31e-0x6a;const _0x4451ad=a61_0x4451();let _0x21108e=_0x4451ad[_0x35c31e];return _0x21108e;}export const sqlDetail={'service':a61_0x167e8b(0x80),'command':a61_0x167e8b(0x72),'description':a61_0x167e8b(0x76),'risk':a61_0x167e8b(0x78),'flags':[SQLCODE_FLAG,{'name':'verbose','type':a61_0x167e8b(0x70),'description':'Return\x20full\x20raw\x20SQL\x20query\x20object'}],async 'execute'(_0x2032a0){const _0x52d705=a61_0x167e8b,_0x5d7d55=await getSqlQueryInfo(_0x2032a0['appCode'],_0x2032a0[_0x52d705(0x6c)](_0x52d705(0x79))),_0x2ca8bc=_0x2032a0[_0x52d705(0x73)](_0x52d705(0x6a));if(_0x2ca8bc)return{'ok':!![],'data':_0x5d7d55};const _0x953d57=_0x5d7d55[_0x52d705(0x6b)]?await getDbName(_0x2032a0['appCode'],_0x5d7d55['dbId']):undefined;return{'ok':!![],'data':{'sqlCode':_0x5d7d55['sqlCode'],'sqlName':_0x5d7d55[_0x52d705(0x7f)],'db':_0x953d57?_0x953d57+'\x20('+_0x5d7d55['dbId']+')':_0x5d7d55[_0x52d705(0x6b)]??'','description':_0x5d7d55[_0x52d705(0x6f)]??'','sqlContent':_0x5d7d55[_0x52d705(0x7c)]??''}};}};
@@ -1 +1 @@
1
- const a64_0x1aa5e0=a64_0x18d8;(function(_0xfac349,_0x3181e9){const _0x1da3bd=a64_0x18d8,_0x4021c6=_0xfac349();while(!![]){try{const _0x3c135d=parseInt(_0x1da3bd(0x1f6))/0x1+-parseInt(_0x1da3bd(0x1e9))/0x2*(-parseInt(_0x1da3bd(0x1fd))/0x3)+parseInt(_0x1da3bd(0x1f4))/0x4+parseInt(_0x1da3bd(0x1fc))/0x5*(-parseInt(_0x1da3bd(0x1f3))/0x6)+-parseInt(_0x1da3bd(0x201))/0x7+-parseInt(_0x1da3bd(0x1f1))/0x8+-parseInt(_0x1da3bd(0x1ec))/0x9;if(_0x3c135d===_0x3181e9)break;else _0x4021c6['push'](_0x4021c6['shift']());}catch(_0x15b488){_0x4021c6['push'](_0x4021c6['shift']());}}}(a64_0x2834,0x95ea6));import{executeSql}from'../../core/api-client.js';function a64_0x2834(){const _0x243f7d=['execResult','4190968DMePWa','execError','9984bTEprT','3579764eyUIMI','isArray','763477FuKCyP','validation','read','SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','str','Invalid\x20JSON\x20for\x20--params:\x20','295PYrdko','342tcZCOn','parse','sqlcode','sql','3342157LmzGDs','\x20row(s)\x20in\x20','Returned\x20','exec','string','appCode','13524lbzbtH','length','SQL\x20execution\x20failed','6441606dPyJyX','now','execSuccess','Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode'];a64_0x2834=function(){return _0x243f7d;};return a64_0x2834();}function a64_0x18d8(_0x1da504,_0x2ec43a){_0x1da504=_0x1da504-0x1e8;const _0x2834f9=a64_0x2834();let _0x18d80b=_0x2834f9[_0x1da504];return _0x18d80b;}import{CliErrors}from'../../errors.js';import{SQLCODE_FLAG}from'../common/flags.js';export const sqlExec={'service':a64_0x1aa5e0(0x200),'command':a64_0x1aa5e0(0x204),'description':a64_0x1aa5e0(0x1ef),'risk':a64_0x1aa5e0(0x1f8),'flags':[SQLCODE_FLAG,{'name':'params','type':a64_0x1aa5e0(0x205),'description':a64_0x1aa5e0(0x1f9)}],async 'execute'(_0x44af4a){const _0x2448a9=a64_0x1aa5e0;let _0x235e38;const _0x2b0663=_0x44af4a[_0x2448a9(0x1fa)]('params');if(_0x2b0663)try{_0x235e38=JSON[_0x2448a9(0x1fe)](_0x2b0663);}catch{throw CliErrors[_0x2448a9(0x1f7)](_0x2448a9(0x1fb)+_0x2b0663);}const _0x984b69=Date[_0x2448a9(0x1ed)](),_0x14da4f=await executeSql(_0x44af4a[_0x2448a9(0x1e8)],_0x44af4a[_0x2448a9(0x1fa)](_0x2448a9(0x1ff)),_0x235e38),_0x1a178d=Date[_0x2448a9(0x1ed)]()-_0x984b69,_0x4299b0=_0x14da4f?.[_0x2448a9(0x1f0)]??_0x14da4f,_0x3ef2fe=_0x14da4f?.[_0x2448a9(0x1ee)]??!![];if(!_0x3ef2fe)return{'ok':![],'data':{'error':_0x14da4f?.[_0x2448a9(0x1f2)]||'SQL\x20execution\x20failed','elapsed':_0x1a178d},'message':_0x2448a9(0x1eb)};const _0x3d9d9e=Array[_0x2448a9(0x1f5)](_0x4299b0)?_0x4299b0:[];return{'ok':!![],'data':{'rows':_0x3d9d9e,'rowCount':_0x3d9d9e[_0x2448a9(0x1ea)],'elapsed':_0x1a178d},'message':_0x2448a9(0x203)+_0x3d9d9e[_0x2448a9(0x1ea)]+_0x2448a9(0x202)+_0x1a178d+'ms'};}};
1
+ const a62_0x476324=a62_0x5d19;(function(_0x314a97,_0x305ae4){const _0x919dd1=a62_0x5d19,_0x3db792=_0x314a97();while(!![]){try{const _0x70e12f=-parseInt(_0x919dd1(0x1cc))/0x1*(-parseInt(_0x919dd1(0x1dc))/0x2)+parseInt(_0x919dd1(0x1e3))/0x3*(-parseInt(_0x919dd1(0x1e5))/0x4)+-parseInt(_0x919dd1(0x1d1))/0x5*(-parseInt(_0x919dd1(0x1e1))/0x6)+-parseInt(_0x919dd1(0x1ca))/0x7+-parseInt(_0x919dd1(0x1db))/0x8+-parseInt(_0x919dd1(0x1dd))/0x9*(parseInt(_0x919dd1(0x1d4))/0xa)+parseInt(_0x919dd1(0x1d7))/0xb;if(_0x70e12f===_0x305ae4)break;else _0x3db792['push'](_0x3db792['shift']());}catch(_0x2715a6){_0x3db792['push'](_0x3db792['shift']());}}}(a62_0x1024,0x24bad));import{executeSql}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a62_0x5d19(_0x2c9772,_0x514dbb){_0x2c9772=_0x2c9772-0x1c9;const _0x1024b7=a62_0x1024();let _0x5d1946=_0x1024b7[_0x2c9772];return _0x5d1946;}import{SQLCODE_FLAG}from'../common/flags.js';function a62_0x1024(){const _0x237901=['SQL\x20parameters\x20as\x20JSON\x20string\x20(e.g.\x20\x27{\x22key\x22:\x22value\x22}\x27)','337141eyNQGP','isArray','267055tFzcrp','now','string','sqlcode','params','5HtmEJk','execError','execSuccess','210JhxGlw','SQL\x20execution\x20failed','validation','2157485KnHFdw','appCode','Invalid\x20JSON\x20for\x20--params:\x20','read','669200IcqUkQ','2rojevZ','84645eXWTsK','exec','Returned\x20','str','1352586ILVwrp','sql','831omJQCU','length','3016oUOiin'];a62_0x1024=function(){return _0x237901;};return a62_0x1024();}export const sqlExec={'service':a62_0x476324(0x1e2),'command':a62_0x476324(0x1de),'description':'Execute\x20a\x20custom\x20SQL\x20query\x20by\x20sqlCode','risk':a62_0x476324(0x1da),'flags':[SQLCODE_FLAG,{'name':a62_0x476324(0x1d0),'type':a62_0x476324(0x1ce),'description':a62_0x476324(0x1c9)}],async 'execute'(_0x4ac33f){const _0x158620=a62_0x476324;let _0x214c90;const _0x45fc85=_0x4ac33f[_0x158620(0x1e0)](_0x158620(0x1d0));if(_0x45fc85)try{_0x214c90=JSON['parse'](_0x45fc85);}catch{throw CliErrors[_0x158620(0x1d6)](_0x158620(0x1d9)+_0x45fc85);}const _0x3e153c=Date[_0x158620(0x1cd)](),_0x246228=await executeSql(_0x4ac33f[_0x158620(0x1d8)],_0x4ac33f[_0x158620(0x1e0)](_0x158620(0x1cf)),_0x214c90),_0x25337e=Date[_0x158620(0x1cd)]()-_0x3e153c,_0xcf9528=_0x246228?.['execResult']??_0x246228,_0x7486cf=_0x246228?.[_0x158620(0x1d3)]??!![];if(!_0x7486cf)return{'ok':![],'data':{'error':_0x246228?.[_0x158620(0x1d2)]||_0x158620(0x1d5),'elapsed':_0x25337e},'message':_0x158620(0x1d5)};const _0x276977=Array[_0x158620(0x1cb)](_0xcf9528)?_0xcf9528:[];return{'ok':!![],'data':{'rows':_0x276977,'rowCount':_0x276977[_0x158620(0x1e4)],'elapsed':_0x25337e},'message':_0x158620(0x1df)+_0x276977[_0x158620(0x1e4)]+'\x20row(s)\x20in\x20'+_0x25337e+'ms'};}};
@@ -1 +1 @@
1
- function a65_0x1f6e(){const _0x5c0503=['64ySleIG','214043QzJDxC','4OnxKAC','1092AhCKWm','32892ZKkaQH','64gEIQxN','66560OWgtrZ','2987880idYsXF','60weGDuF','572517mXbGex','246TjRRfr','1382854LAwQdF','19545mZrYoT'];a65_0x1f6e=function(){return _0x5c0503;};return a65_0x1f6e();}(function(_0x1cd279,_0x1cbc9f){const _0x7180a8=a65_0x1485,_0x3b02da=_0x1cd279();while(!![]){try{const _0x28200f=-parseInt(_0x7180a8(0x9e))/0x1*(-parseInt(_0x7180a8(0x9f))/0x2)+parseInt(_0x7180a8(0x9c))/0x3*(parseInt(_0x7180a8(0xa2))/0x4)+-parseInt(_0x7180a8(0xa3))/0x5*(parseInt(_0x7180a8(0x9a))/0x6)+parseInt(_0x7180a8(0x97))/0x7+parseInt(_0x7180a8(0x9d))/0x8*(parseInt(_0x7180a8(0x99))/0x9)+-parseInt(_0x7180a8(0x98))/0xa*(parseInt(_0x7180a8(0x9b))/0xb)+parseInt(_0x7180a8(0xa1))/0xc*(parseInt(_0x7180a8(0xa0))/0xd);if(_0x28200f===_0x1cbc9f)break;else _0x3b02da['push'](_0x3b02da['shift']());}catch(_0x34672a){_0x3b02da['push'](_0x3b02da['shift']());}}}(a65_0x1f6e,0x6139e));import{sqlList}from'./list.js';import{sqlDetail}from'./detail.js';function a65_0x1485(_0x1bca59,_0x3f15f9){_0x1bca59=_0x1bca59-0x97;const _0x1f6eef=a65_0x1f6e();let _0x148526=_0x1f6eef[_0x1bca59];return _0x148526;}import{sqlValidate}from'./validate.js';import{sqlSave}from'./save.js';import{sqlExec}from'./exec.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec];
1
+ (function(_0x310f55,_0x301c93){const _0x6a53e=a63_0x40be,_0x248919=_0x310f55();while(!![]){try{const _0x52beb9=parseInt(_0x6a53e(0x107))/0x1+-parseInt(_0x6a53e(0x108))/0x2*(-parseInt(_0x6a53e(0x102))/0x3)+-parseInt(_0x6a53e(0x105))/0x4+parseInt(_0x6a53e(0x106))/0x5+parseInt(_0x6a53e(0x100))/0x6*(parseInt(_0x6a53e(0x109))/0x7)+parseInt(_0x6a53e(0x101))/0x8*(-parseInt(_0x6a53e(0x103))/0x9)+parseInt(_0x6a53e(0x104))/0xa;if(_0x52beb9===_0x301c93)break;else _0x248919['push'](_0x248919['shift']());}catch(_0x673bc2){_0x248919['push'](_0x248919['shift']());}}}(a63_0x3893,0xbfaef));import{sqlList}from'./list.js';function a63_0x40be(_0x809e11,_0x4d34b7){_0x809e11=_0x809e11-0x100;const _0x389399=a63_0x3893();let _0x40be1e=_0x389399[_0x809e11];return _0x40be1e;}function a63_0x3893(){const _0x5d6fcd=['4XTypZA','2538571VKwkBx','6MPhuhi','333368yMPsFC','333186AzeSEl','18ZbugvI','6211430bCLgpg','6088232ayerFi','645140sQPOdM','1055587vVRhGq'];a63_0x3893=function(){return _0x5d6fcd;};return a63_0x3893();}import{sqlDetail}from'./detail.js';import{sqlValidate}from'./validate.js';import{sqlSave}from'./save.js';import{sqlExec}from'./exec.js';export const sqlDefinitions=[sqlList,sqlDetail,sqlValidate,sqlSave,sqlExec];