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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/lib/ai-setup/config.js +1 -1
  2. package/lib/api/api-doc.js +1 -1
  3. package/lib/api/fetch-model-list.js +1 -1
  4. package/lib/api/generate-api-file.js +1 -1
  5. package/lib/auth/auth-server-ui.js +1 -1
  6. package/lib/auth/auth-server.js +1 -1
  7. package/lib/auth/constant.js +1 -1
  8. package/lib/auth/get-cookie.js +1 -1
  9. package/lib/auth/get-session-user.js +1 -0
  10. package/lib/auth/is-session-valid.js +1 -1
  11. package/lib/auth/logout.js +1 -1
  12. package/lib/cli-flags.js +1 -1
  13. package/lib/cli.js +1 -1
  14. package/lib/commands/api/doc.js +1 -1
  15. package/lib/commands/api/index.js +1 -1
  16. package/lib/commands/api/list.js +1 -1
  17. package/lib/commands/api/pull.js +1 -1
  18. package/lib/commands/app.js +1 -1
  19. package/lib/commands/auth.js +1 -1
  20. package/lib/commands/bff/delete.js +1 -1
  21. package/lib/commands/bff/detail.js +1 -1
  22. package/lib/commands/bff/index.js +1 -1
  23. package/lib/commands/bff/list.js +1 -1
  24. package/lib/commands/bff/new.js +1 -1
  25. package/lib/commands/bff/pull.js +1 -1
  26. package/lib/commands/bff/push.js +1 -1
  27. package/lib/commands/bff/status.js +1 -1
  28. package/lib/commands/build.js +1 -1
  29. package/lib/commands/cli-update.js +1 -1
  30. package/lib/commands/codegen/index.js +1 -1
  31. package/lib/commands/codegen/sdk.js +1 -1
  32. package/lib/commands/codegen/sql.js +1 -1
  33. package/lib/commands/common/flags.js +1 -1
  34. package/lib/commands/config.js +1 -1
  35. package/lib/commands/create.js +1 -1
  36. package/lib/commands/dataset/detail.js +1 -1
  37. package/lib/commands/dataset/index.js +1 -1
  38. package/lib/commands/dataset/links.js +1 -1
  39. package/lib/commands/dataset/list.js +1 -1
  40. package/lib/commands/dataset/operations.js +1 -1
  41. package/lib/commands/doctor.js +1 -1
  42. package/lib/commands/init.js +1 -1
  43. package/lib/commands/logout.js +1 -1
  44. package/lib/commands/logs.js +1 -1
  45. package/lib/commands/mcp.js +1 -1
  46. package/lib/commands/menu/index.js +1 -1
  47. package/lib/commands/menu/shared/compare-table.js +1 -1
  48. package/lib/commands/menu/shared/index.js +1 -1
  49. package/lib/commands/menu/shared/inquirer.js +1 -1
  50. package/lib/commands/menu/shared/local-pages.js +1 -1
  51. package/lib/commands/menu/shared/logic.js +1 -1
  52. package/lib/commands/menu/shared/service.js +1 -1
  53. package/lib/commands/menu/shared/sync-core.js +1 -1
  54. package/lib/commands/menu/shared/update-core.js +1 -1
  55. package/lib/commands/menu/shared/valid-url.js +1 -1
  56. package/lib/commands/menu/sync.js +1 -1
  57. package/lib/commands/menu/update.js +1 -1
  58. package/lib/commands/preview.js +1 -1
  59. package/lib/commands/project-upgrade.js +1 -1
  60. package/lib/commands/registry.js +1 -1
  61. package/lib/commands/run.js +1 -1
  62. package/lib/commands/skill.js +1 -1
  63. package/lib/commands/sql/detail.js +1 -1
  64. package/lib/commands/sql/exec.js +1 -1
  65. package/lib/commands/sql/index.js +1 -1
  66. package/lib/commands/sql/list.js +1 -1
  67. package/lib/commands/sql/save.js +1 -1
  68. package/lib/commands/sql/validate.js +1 -1
  69. package/lib/commands/start.js +1 -1
  70. package/lib/config/config-help.js +1 -1
  71. package/lib/config/main.js +1 -1
  72. package/lib/constant/cli.js +1 -1
  73. package/lib/constant/domain.js +1 -1
  74. package/lib/constant/env.js +1 -1
  75. package/lib/context.js +1 -1
  76. package/lib/core/alias-resolver.js +1 -1
  77. package/lib/core/api-client.js +1 -1
  78. package/lib/core/bff/config.js +1 -1
  79. package/lib/core/bff/file-system.js +1 -1
  80. package/lib/core/bff/hash.js +1 -1
  81. package/lib/core/bff/lock.js +1 -1
  82. package/lib/core/bff/utils.js +1 -1
  83. package/lib/core/db-resolver.js +1 -1
  84. package/lib/core/sql-validator.js +1 -1
  85. package/lib/create-app/enhanced-guided-create.js +1 -1
  86. package/lib/create-app/format-elapsed.js +1 -1
  87. package/lib/create-app/main.js +1 -1
  88. package/lib/create-app/non-interactive.js +1 -1
  89. package/lib/create-app/task-finished.js +1 -1
  90. package/lib/create-app/task-loading.js +1 -1
  91. package/lib/create-app/task-running.js +1 -1
  92. package/lib/create-app/task-time.js +1 -1
  93. package/lib/create-app/use-copy-project-template.js +1 -1
  94. package/lib/create-app/use-format-code.js +1 -1
  95. package/lib/create-app/use-install-dependencies.js +1 -1
  96. package/lib/errors.js +1 -1
  97. package/lib/framework/flags.js +1 -1
  98. package/lib/framework/help.js +1 -1
  99. package/lib/framework/index.js +1 -1
  100. package/lib/framework/output.js +1 -1
  101. package/lib/framework/response.js +1 -1
  102. package/lib/framework/runner.js +1 -1
  103. package/lib/generated/build-info.js +1 -1
  104. package/lib/help.js +1 -1
  105. package/lib/init/main.js +1 -1
  106. package/lib/mcp/McpInstallUI.js +1 -1
  107. package/lib/mcp/claude.js +1 -1
  108. package/lib/mcp/cursor.js +1 -1
  109. package/lib/mcp/main.js +1 -1
  110. package/lib/mcp/mcp-install-non-interactive.js +1 -1
  111. package/lib/mcp/mcp-installer.js +1 -1
  112. package/lib/skills/main.js +1 -1
  113. package/lib/skills/npx-skills-add.js +1 -1
  114. package/lib/telemetry/cli-help-trace.js +1 -0
  115. package/lib/telemetry/otel-logger-version.js +1 -0
  116. package/lib/telemetry/register-otel-exit-shutdown.js +1 -0
  117. package/lib/ui/IDESelector.js +1 -1
  118. package/lib/ui/useIDESelection.js +1 -1
  119. package/lib/utils/ai_config.js +1 -1
  120. package/lib/utils/cdn-config.js +1 -1
  121. package/lib/utils/check-sdk-version.js +1 -1
  122. package/lib/utils/cli-version-check.js +1 -1
  123. package/lib/utils/config.js +1 -1
  124. package/lib/utils/copy-directory.js +1 -1
  125. package/lib/utils/file-utils.js +1 -1
  126. package/lib/utils/guides-cdn.js +1 -1
  127. package/lib/utils/http-client.js +1 -1
  128. package/lib/utils/logger.js +1 -1
  129. package/lib/utils/rules-cdn.js +1 -1
  130. package/lib/utils/sleep.js +1 -1
  131. package/lib/utils/template-replacer.js +1 -1
  132. package/package.json +2 -1
@@ -1 +1 @@
1
- function a50_0x2431(){const _0x372e25=['216564ratwSa','online','464048PRRquN','/smartapi/menu/find?appCode=','get-online-menu-list','Failed\x20to\x20update\x20menu\x20assets:\x20','import','errorCode','json','label','resources','/smartapi/menu/create','application/json','all','update-menu-cdn-url','Server\x20returned\x20empty\x20menu\x20list','155624yBQdUP','2lJhhWn','Auth\x20validation\x20failed.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','1846617rszQht','path','5683950thiqih','312697zecJRE','Creating\x20menu:\x20','success','stringify','info','Failed\x20to\x20fetch\x20menu\x20list:\x20','map','isArray','Updating\x20menu\x20asset\x20links:\x20','errorMsg','Failed\x20to\x20create\x20menu,\x20HTTP\x20status:\x20','extend','error','Fetching\x20online\x20menu\x20list...\x20(appCode:\x20','children','create-menu','length','flat','Menu\x20created\x20successfully:\x20','Failed\x20to\x20create\x20menu:\x20','procode','/smartapi/menu/update','6oHqoII','11210080vxYYEw','Menu\x20assets\x20synced:\x20','status','Error','includes','create-menus','POST','Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','data','parse','40nnocRJ','Failed\x20to\x20fetch\x20menu\x20list,\x20HTTP\x20status:\x20','Start\x20batch\x20menu\x20creation,\x20total\x20'];a50_0x2431=function(){return _0x372e25;};return a50_0x2431();}(function(_0x2d4d98,_0x3147a7){const _0x5e5816=a50_0x1885,_0x294f68=_0x2d4d98();while(!![]){try{const _0x580b89=-parseInt(_0x5e5816(0x66))/0x1+-parseInt(_0x5e5816(0x9b))/0x2*(-parseInt(_0x5e5816(0x9d))/0x3)+-parseInt(_0x5e5816(0x8a))/0x4*(parseInt(_0x5e5816(0x87))/0x5)+parseInt(_0x5e5816(0x7c))/0x6*(parseInt(_0x5e5816(0x9a))/0x7)+-parseInt(_0x5e5816(0x8c))/0x8+-parseInt(_0x5e5816(0x9f))/0x9+parseInt(_0x5e5816(0x7d))/0xa;if(_0x580b89===_0x3147a7)break;else _0x294f68['push'](_0x294f68['shift']());}catch(_0x2b2643){_0x294f68['push'](_0x294f68['shift']());}}}(a50_0x2431,0x4ef46));import{getApiDomain}from'../../../constant/domain.js';import{getEnv}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';export async function getOnlineMenuList(_0x5dd140,_0xa6249b){const _0x5a2b23=a50_0x1885,_0x5f1656=getEnv();logger['info'](_0x5a2b23(0x8e),_0x5f1656===_0x5a2b23(0x8b)?_0x5a2b23(0x73)+_0x5dd140+')':'Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20'+_0x5dd140+')');const _0x15474f=await fetch(getApiDomain()+_0x5a2b23(0x8d)+_0x5dd140,{'method':'GET','headers':{'Content-Type':_0x5a2b23(0x96),'Cookie':_0xa6249b}});if(!_0x15474f['ok']){if(_0x15474f[_0x5a2b23(0x7f)]===0x191){const _0x23995a='Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again';logger[_0x5a2b23(0x72)](_0x5a2b23(0x8e),_0x23995a,{'status':_0x15474f[_0x5a2b23(0x7f)]});throw new Error(_0x23995a);}const _0x4bec7f=_0x5a2b23(0x88)+_0x15474f['status'];logger['error'](_0x5a2b23(0x8e),_0x4bec7f);throw new Error(_0x4bec7f);}const _0x79afd8=await _0x15474f[_0x5a2b23(0x92)]();if(!_0x79afd8[_0x5a2b23(0x68)]){const _0x311d24=_0x5a2b23(0x6b)+(_0x79afd8[_0x5a2b23(0x6f)]||'Error');logger['error'](_0x5a2b23(0x8e),_0x311d24,{'errorCode':_0x79afd8[_0x5a2b23(0x91)],'errorMsg':_0x79afd8[_0x5a2b23(0x6f)]});throw new Error(_0x311d24);}if(!_0x79afd8[_0x5a2b23(0x85)])return logger[_0x5a2b23(0x6a)](_0x5a2b23(0x8e),_0x5a2b23(0x99)),[];return logger[_0x5a2b23(0x6a)](_0x5a2b23(0x8e),'Fetched\x20'+_0x79afd8[_0x5a2b23(0x85)]['length']+'\x20online\x20menus\x20successfully'),_0x79afd8['data']['map'](flattenMenuItem)[_0x5a2b23(0x77)]();}function flattenMenuItem(_0x165202){const _0x332d3e=a50_0x1885;let _0x1d07ff=[];try{if(_0x165202[_0x332d3e(0x71)]?.[_0x332d3e(0x94)]){const _0x44c13d=JSON[_0x332d3e(0x86)](_0x165202[_0x332d3e(0x71)][_0x332d3e(0x94)]);Array[_0x332d3e(0x6d)](_0x44c13d)&&(_0x1d07ff=_0x44c13d);}}catch(_0x3e3fe0){}const _0x517b6b=[{'id':_0x165202['id'],'path':_0x165202[_0x332d3e(0x9e)],'label':_0x165202[_0x332d3e(0x93)],'resources':_0x1d07ff}];if(_0x165202[_0x332d3e(0x74)]&&_0x165202[_0x332d3e(0x74)][_0x332d3e(0x76)]>0x0)for(const _0xec12a1 of _0x165202[_0x332d3e(0x74)]){_0x517b6b['push'](...flattenMenuItem(_0xec12a1));}return _0x517b6b;}function a50_0x1885(_0x3ef7f3,_0x11aedb){_0x3ef7f3=_0x3ef7f3-0x66;const _0x243142=a50_0x2431();let _0x18859d=_0x243142[_0x3ef7f3];return _0x18859d;}export async function createMenu(_0x51e54d,_0x27d4df,_0x1a6f4b){const _0x491ce2=a50_0x1885;logger[_0x491ce2(0x6a)](_0x491ce2(0x75),_0x491ce2(0x67)+_0x1a6f4b[_0x491ce2(0x93)]+'\x20('+_0x1a6f4b[_0x491ce2(0x9e)]+')');const _0x25a542={'appCode':_0x51e54d,'type':'procode','sort':0x0,'extend':{'loadScriptMode':_0x491ce2(0x90),'resources':_0x1a6f4b[_0x491ce2(0x94)]?JSON[_0x491ce2(0x69)](_0x1a6f4b[_0x491ce2(0x94)]):undefined},..._0x1a6f4b},_0x1348e2=await fetch(getApiDomain()+_0x491ce2(0x95),{'method':_0x491ce2(0x83),'body':JSON[_0x491ce2(0x69)](_0x25a542),'headers':{'Content-Type':_0x491ce2(0x96),'Cookie':_0x27d4df}});if(!_0x1348e2['ok']){if(_0x1348e2[_0x491ce2(0x7f)]===0x191){const _0x16a710=_0x491ce2(0x84);logger[_0x491ce2(0x72)](_0x491ce2(0x75),_0x16a710,{'status':_0x1348e2[_0x491ce2(0x7f)],'menu':_0x1a6f4b['label']});throw new Error(_0x16a710);}const _0x4d3b85=_0x491ce2(0x70)+_0x1348e2[_0x491ce2(0x7f)];logger[_0x491ce2(0x72)](_0x491ce2(0x75),_0x4d3b85,{'menu':_0x1a6f4b[_0x491ce2(0x93)]});throw new Error(_0x4d3b85);}const _0x219701=await _0x1348e2[_0x491ce2(0x92)]();if(!_0x219701[_0x491ce2(0x68)]){const _0x534102=_0x491ce2(0x79)+(_0x219701[_0x491ce2(0x6f)]||_0x491ce2(0x80));logger[_0x491ce2(0x72)](_0x491ce2(0x75),_0x534102,{'errorCode':_0x219701[_0x491ce2(0x91)],'errorMsg':_0x219701['errorMsg'],'menu':_0x1a6f4b['label']});throw new Error(_0x534102);}logger['info'](_0x491ce2(0x75),_0x491ce2(0x78)+_0x1a6f4b[_0x491ce2(0x93)],_0x219701[_0x491ce2(0x85)]);}async function createSingleMenu(_0x2dd143,_0x1ec6fe,_0x1d6e84,_0x3a538c){const _0x7ea1cb=a50_0x1885,_0x3eca3c={'appCode':_0x2dd143,'type':_0x7ea1cb(0x7a),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x3a538c?JSON[_0x7ea1cb(0x69)](_0x3a538c):undefined},'label':_0x1d6e84['label'],'path':_0x1d6e84[_0x7ea1cb(0x9e)]},_0x21315f=await fetch(getApiDomain()+_0x7ea1cb(0x95),{'method':_0x7ea1cb(0x83),'body':JSON[_0x7ea1cb(0x69)](_0x3eca3c),'headers':{'Content-Type':_0x7ea1cb(0x96),'Cookie':_0x1ec6fe}});if(!_0x21315f['ok']){if(_0x21315f[_0x7ea1cb(0x7f)]===0x191){const _0xa806ab=_0x7ea1cb(0x84);logger['error'](_0x7ea1cb(0x75),_0xa806ab,{'status':_0x21315f['status'],'menu':_0x1d6e84[_0x7ea1cb(0x93)]});throw new Error(_0xa806ab);}const _0x50fdab=_0x7ea1cb(0x70)+_0x21315f[_0x7ea1cb(0x7f)];logger[_0x7ea1cb(0x72)](_0x7ea1cb(0x75),_0x50fdab,{'menu':_0x1d6e84['label']});throw new Error(_0x50fdab);}const _0x19d9a4=await _0x21315f[_0x7ea1cb(0x92)]();if(!_0x19d9a4['success']){if(_0x19d9a4[_0x7ea1cb(0x91)]==='0011'||_0x19d9a4[_0x7ea1cb(0x6f)]?.[_0x7ea1cb(0x81)]('登录')){const _0x56b3f1=_0x7ea1cb(0x9c);logger[_0x7ea1cb(0x72)](_0x7ea1cb(0x75),_0x56b3f1,{'errorCode':_0x19d9a4['errorCode'],'errorMsg':_0x19d9a4[_0x7ea1cb(0x6f)],'menu':_0x1d6e84[_0x7ea1cb(0x93)]});throw new Error(_0x56b3f1);}const _0x439cac='Failed\x20to\x20create\x20menu:\x20'+(_0x19d9a4[_0x7ea1cb(0x6f)]||_0x7ea1cb(0x80));logger['error'](_0x7ea1cb(0x75),_0x439cac,{'errorCode':_0x19d9a4[_0x7ea1cb(0x91)],'errorMsg':_0x19d9a4['errorMsg'],'menu':_0x1d6e84['label']});throw new Error(_0x439cac);}logger[_0x7ea1cb(0x6a)]('create-menu',_0x7ea1cb(0x78)+_0x1d6e84['label']);}export async function createMenus(_0x656bb9,_0x26d763,_0x14a9e8,_0x346b4b){const _0x3f2dd6=a50_0x1885;logger[_0x3f2dd6(0x6a)](_0x3f2dd6(0x82),_0x3f2dd6(0x89)+_0x14a9e8[_0x3f2dd6(0x76)]),await Promise[_0x3f2dd6(0x97)](_0x14a9e8[_0x3f2dd6(0x6c)](async _0x35b28f=>{await createSingleMenu(_0x656bb9,_0x26d763,_0x35b28f,_0x346b4b);})),logger[_0x3f2dd6(0x6a)](_0x3f2dd6(0x82),'Batch\x20menu\x20creation\x20completed,\x20total\x20'+_0x14a9e8['length']);}export async function updateMenuCdnUrl(_0x530d74,_0x1e87fd,_0x44e5bf){const _0x422a9c=a50_0x1885;logger['info'](_0x422a9c(0x98),_0x422a9c(0x6e)+_0x44e5bf[_0x422a9c(0x93)]+'\x20('+_0x44e5bf[_0x422a9c(0x9e)]+')');const _0x1efcb2={'id':_0x44e5bf['id'],'appCode':_0x530d74,'extend':{'loadScriptMode':_0x422a9c(0x90),'resources':_0x44e5bf[_0x422a9c(0x94)]?JSON['stringify'](_0x44e5bf[_0x422a9c(0x94)]):undefined}},_0x2cf522=await fetch(getApiDomain()+_0x422a9c(0x7b),{'method':_0x422a9c(0x83),'body':JSON[_0x422a9c(0x69)](_0x1efcb2),'headers':{'Content-Type':_0x422a9c(0x96),'Cookie':_0x1e87fd}});if(!_0x2cf522['ok']){if(_0x2cf522['status']===0x191){const _0x12e3ee=_0x422a9c(0x84);logger[_0x422a9c(0x72)](_0x422a9c(0x98),_0x12e3ee,{'status':_0x2cf522['status'],'menu':_0x44e5bf[_0x422a9c(0x93)]});throw new Error(_0x12e3ee);}const _0x457f2e=_0x422a9c(0x8f)+_0x2cf522[_0x422a9c(0x7f)];logger[_0x422a9c(0x72)](_0x422a9c(0x98),_0x457f2e,{'menu':_0x44e5bf['label']});throw new Error(_0x457f2e);}const _0x54c914=await _0x2cf522[_0x422a9c(0x92)]();if(!_0x54c914[_0x422a9c(0x68)]){const _0x598ffd=_0x422a9c(0x8f)+(_0x54c914[_0x422a9c(0x6f)]||_0x422a9c(0x80));logger[_0x422a9c(0x72)]('update-menu-cdn-url',_0x598ffd,{'errorCode':_0x54c914[_0x422a9c(0x91)],'errorMsg':_0x54c914[_0x422a9c(0x6f)],'menu':_0x44e5bf[_0x422a9c(0x93)]});throw new Error(_0x598ffd);}logger[_0x422a9c(0x6a)](_0x422a9c(0x98),_0x422a9c(0x7e)+_0x44e5bf[_0x422a9c(0x93)],_0x54c914[_0x422a9c(0x85)]);}
1
+ (function(_0xbfd956,_0x10a42e){const _0x4eec72=a51_0x632c,_0x459203=_0xbfd956();while(!![]){try{const _0x1acd4d=parseInt(_0x4eec72(0x20a))/0x1*(-parseInt(_0x4eec72(0x209))/0x2)+-parseInt(_0x4eec72(0x210))/0x3*(-parseInt(_0x4eec72(0x1f6))/0x4)+-parseInt(_0x4eec72(0x20b))/0x5*(-parseInt(_0x4eec72(0x206))/0x6)+parseInt(_0x4eec72(0x1fc))/0x7*(-parseInt(_0x4eec72(0x20f))/0x8)+-parseInt(_0x4eec72(0x200))/0x9*(-parseInt(_0x4eec72(0x21f))/0xa)+-parseInt(_0x4eec72(0x20d))/0xb+parseInt(_0x4eec72(0x204))/0xc*(parseInt(_0x4eec72(0x1eb))/0xd);if(_0x1acd4d===_0x10a42e)break;else _0x459203['push'](_0x459203['shift']());}catch(_0x13e16e){_0x459203['push'](_0x459203['shift']());}}}(a51_0x46bc,0xc0cda));import{getApiDomain}from'../../../constant/domain.js';import{getEnv}from'../../../constant/env.js';import{logger}from'../../../utils/logger.js';export async function getOnlineMenuList(_0x519d0a,_0x3b0bde){const _0x45bc48=a51_0x632c,_0x57c85b=getEnv();logger[_0x45bc48(0x215)](_0x45bc48(0x1fe),_0x57c85b===_0x45bc48(0x224)?'Fetching\x20online\x20menu\x20list...\x20(appCode:\x20'+_0x519d0a+')':_0x45bc48(0x208)+_0x519d0a+')');const _0x4822ee=await fetch(getApiDomain()+_0x45bc48(0x20c)+_0x519d0a,{'method':'GET','headers':{'Content-Type':'application/json','Cookie':_0x3b0bde}});if(!_0x4822ee['ok']){if(_0x4822ee['status']===0x191){const _0x537d78=_0x45bc48(0x217);logger[_0x45bc48(0x221)]('get-online-menu-list',_0x537d78,{'status':_0x4822ee[_0x45bc48(0x1f0)]});throw new Error(_0x537d78);}const _0x42b13b=_0x45bc48(0x1f7)+_0x4822ee[_0x45bc48(0x1f0)];logger['error'](_0x45bc48(0x1fe),_0x42b13b);throw new Error(_0x42b13b);}const _0x431508=await _0x4822ee['json']();if(!_0x431508[_0x45bc48(0x202)]){const _0x3e0e31=_0x45bc48(0x1ff)+(_0x431508['errorMsg']||'Error');logger[_0x45bc48(0x221)](_0x45bc48(0x1fe),_0x3e0e31,{'errorCode':_0x431508[_0x45bc48(0x1ec)],'errorMsg':_0x431508[_0x45bc48(0x1ef)]});throw new Error(_0x3e0e31);}if(!_0x431508[_0x45bc48(0x1fb)])return logger[_0x45bc48(0x215)]('get-online-menu-list','Server\x20returned\x20empty\x20menu\x20list'),[];return logger[_0x45bc48(0x215)](_0x45bc48(0x1fe),_0x45bc48(0x21c)+_0x431508[_0x45bc48(0x1fb)][_0x45bc48(0x203)]+_0x45bc48(0x21b)),_0x431508['data'][_0x45bc48(0x1f3)](flattenMenuItem)[_0x45bc48(0x205)]();}function flattenMenuItem(_0x3baee0){const _0x3758ac=a51_0x632c;let _0x302ebf=[];try{if(_0x3baee0['extend']?.['resources']){const _0x5a5a55=JSON[_0x3758ac(0x225)](_0x3baee0['extend'][_0x3758ac(0x219)]);Array['isArray'](_0x5a5a55)&&(_0x302ebf=_0x5a5a55);}}catch(_0x44b014){}const _0x5edc85=[{'id':_0x3baee0['id'],'path':_0x3baee0[_0x3758ac(0x223)],'label':_0x3baee0[_0x3758ac(0x1fd)],'resources':_0x302ebf}];if(_0x3baee0[_0x3758ac(0x20e)]&&_0x3baee0[_0x3758ac(0x20e)][_0x3758ac(0x203)]>0x0)for(const _0x2bf112 of _0x3baee0[_0x3758ac(0x20e)]){_0x5edc85[_0x3758ac(0x1ee)](...flattenMenuItem(_0x2bf112));}return _0x5edc85;}export async function createMenu(_0x31f729,_0x216bf9,_0x4ce557){const _0x181f39=a51_0x632c;logger[_0x181f39(0x215)](_0x181f39(0x1f2),_0x181f39(0x213)+_0x4ce557['label']+'\x20('+_0x4ce557[_0x181f39(0x223)]+')');const _0x479d43={'appCode':_0x31f729,'type':_0x181f39(0x21d),'sort':0x0,'extend':{'loadScriptMode':_0x181f39(0x1ed),'resources':_0x4ce557['resources']?JSON[_0x181f39(0x21e)](_0x4ce557[_0x181f39(0x219)]):undefined},..._0x4ce557},_0x515122=await fetch(getApiDomain()+_0x181f39(0x226),{'method':_0x181f39(0x1f9),'body':JSON[_0x181f39(0x21e)](_0x479d43),'headers':{'Content-Type':_0x181f39(0x214),'Cookie':_0x216bf9}});if(!_0x515122['ok']){if(_0x515122[_0x181f39(0x1f0)]===0x191){const _0xce165c=_0x181f39(0x217);logger['error'](_0x181f39(0x1f2),_0xce165c,{'status':_0x515122['status'],'menu':_0x4ce557[_0x181f39(0x1fd)]});throw new Error(_0xce165c);}const _0x30e410=_0x181f39(0x1f8)+_0x515122[_0x181f39(0x1f0)];logger[_0x181f39(0x221)](_0x181f39(0x1f2),_0x30e410,{'menu':_0x4ce557[_0x181f39(0x1fd)]});throw new Error(_0x30e410);}const _0x1076de=await _0x515122[_0x181f39(0x1f1)]();if(!_0x1076de['success']){const _0x45e4de=_0x181f39(0x207)+(_0x1076de[_0x181f39(0x1ef)]||_0x181f39(0x218));logger[_0x181f39(0x221)]('create-menu',_0x45e4de,{'errorCode':_0x1076de['errorCode'],'errorMsg':_0x1076de[_0x181f39(0x1ef)],'menu':_0x4ce557[_0x181f39(0x1fd)]});throw new Error(_0x45e4de);}logger['info'](_0x181f39(0x1f2),_0x181f39(0x1fa)+_0x4ce557[_0x181f39(0x1fd)],_0x1076de[_0x181f39(0x1fb)]);}async function createSingleMenu(_0x86ac32,_0x5be213,_0x287c0c,_0x4aeea8){const _0x2ae819=a51_0x632c,_0x2b8bf7={'appCode':_0x86ac32,'type':_0x2ae819(0x21d),'sort':0x0,'extend':{'loadScriptMode':'import','resources':_0x4aeea8?JSON[_0x2ae819(0x21e)](_0x4aeea8):undefined},'label':_0x287c0c[_0x2ae819(0x1fd)],'path':_0x287c0c[_0x2ae819(0x223)]},_0x10e5ef=await fetch(getApiDomain()+_0x2ae819(0x226),{'method':_0x2ae819(0x1f9),'body':JSON[_0x2ae819(0x21e)](_0x2b8bf7),'headers':{'Content-Type':_0x2ae819(0x214),'Cookie':_0x5be213}});if(!_0x10e5ef['ok']){if(_0x10e5ef[_0x2ae819(0x1f0)]===0x191){const _0x5b05d6='Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again';logger[_0x2ae819(0x221)]('create-menu',_0x5b05d6,{'status':_0x10e5ef[_0x2ae819(0x1f0)],'menu':_0x287c0c[_0x2ae819(0x1fd)]});throw new Error(_0x5b05d6);}const _0x1e4d9f=_0x2ae819(0x1f8)+_0x10e5ef['status'];logger[_0x2ae819(0x221)](_0x2ae819(0x1f2),_0x1e4d9f,{'menu':_0x287c0c[_0x2ae819(0x1fd)]});throw new Error(_0x1e4d9f);}const _0x3364ac=await _0x10e5ef['json']();if(!_0x3364ac[_0x2ae819(0x202)]){if(_0x3364ac[_0x2ae819(0x1ec)]==='0011'||_0x3364ac[_0x2ae819(0x1ef)]?.[_0x2ae819(0x1f5)]('登录')){const _0x2c43b4=_0x2ae819(0x21a);logger[_0x2ae819(0x221)](_0x2ae819(0x1f2),_0x2c43b4,{'errorCode':_0x3364ac[_0x2ae819(0x1ec)],'errorMsg':_0x3364ac[_0x2ae819(0x1ef)],'menu':_0x287c0c[_0x2ae819(0x1fd)]});throw new Error(_0x2c43b4);}const _0x183086=_0x2ae819(0x207)+(_0x3364ac[_0x2ae819(0x1ef)]||'Error');logger[_0x2ae819(0x221)](_0x2ae819(0x1f2),_0x183086,{'errorCode':_0x3364ac[_0x2ae819(0x1ec)],'errorMsg':_0x3364ac['errorMsg'],'menu':_0x287c0c[_0x2ae819(0x1fd)]});throw new Error(_0x183086);}logger[_0x2ae819(0x215)]('create-menu',_0x2ae819(0x1fa)+_0x287c0c[_0x2ae819(0x1fd)]);}function a51_0x46bc(){const _0x4fd2da=['Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','Error','resources','Auth\x20validation\x20failed.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','\x20online\x20menus\x20successfully','Fetched\x20','procode','stringify','9168190gJnpMA','update-menu-cdn-url','error','Batch\x20menu\x20creation\x20completed,\x20total\x20','path','online','parse','/smartapi/menu/create','117ZyGlYh','errorCode','import','push','errorMsg','status','json','create-menu','map','Failed\x20to\x20update\x20menu\x20assets:\x20','includes','12EjuDEI','Failed\x20to\x20fetch\x20menu\x20list,\x20HTTP\x20status:\x20','Failed\x20to\x20create\x20menu,\x20HTTP\x20status:\x20','POST','Menu\x20created\x20successfully:\x20','data','99414dgiHOk','label','get-online-menu-list','Failed\x20to\x20fetch\x20menu\x20list:\x20','9dCSRhl','Menu\x20assets\x20synced:\x20','success','length','532524sLJArh','flat','1050114uLjOYa','Failed\x20to\x20create\x20menu:\x20','Fetching\x20daily\x20menu\x20list...\x20(appCode:\x20','172TGfvbE','13375cDCZoS','5FuNobH','/smartapi/menu/find?appCode=','7095451IGnWBm','children','80mvtaVa','1235802greryJ','all','/smartapi/menu/update','Creating\x20menu:\x20','application/json','info','create-menus'];a51_0x46bc=function(){return _0x4fd2da;};return a51_0x46bc();}function a51_0x632c(_0x383e7a,_0x92cd22){_0x383e7a=_0x383e7a-0x1eb;const _0x46bcc3=a51_0x46bc();let _0x632ceb=_0x46bcc3[_0x383e7a];return _0x632ceb;}export async function createMenus(_0x1a80ae,_0x2f4da1,_0x359ac8,_0x3941b7){const _0x5536b4=a51_0x632c;logger[_0x5536b4(0x215)](_0x5536b4(0x216),'Start\x20batch\x20menu\x20creation,\x20total\x20'+_0x359ac8[_0x5536b4(0x203)]),await Promise[_0x5536b4(0x211)](_0x359ac8[_0x5536b4(0x1f3)](async _0x45c6b1=>{await createSingleMenu(_0x1a80ae,_0x2f4da1,_0x45c6b1,_0x3941b7);})),logger[_0x5536b4(0x215)]('create-menus',_0x5536b4(0x222)+_0x359ac8[_0x5536b4(0x203)]);}export async function updateMenuCdnUrl(_0x1f3630,_0x1ddd77,_0x40bb33){const _0x200596=a51_0x632c;logger[_0x200596(0x215)](_0x200596(0x220),'Updating\x20menu\x20asset\x20links:\x20'+_0x40bb33[_0x200596(0x1fd)]+'\x20('+_0x40bb33[_0x200596(0x223)]+')');const _0xc07e86={'id':_0x40bb33['id'],'appCode':_0x1f3630,'extend':{'loadScriptMode':_0x200596(0x1ed),'resources':_0x40bb33[_0x200596(0x219)]?JSON[_0x200596(0x21e)](_0x40bb33[_0x200596(0x219)]):undefined}},_0x23db16=await fetch(getApiDomain()+_0x200596(0x212),{'method':_0x200596(0x1f9),'body':JSON[_0x200596(0x21e)](_0xc07e86),'headers':{'Content-Type':_0x200596(0x214),'Cookie':_0x1ddd77}});if(!_0x23db16['ok']){if(_0x23db16[_0x200596(0x1f0)]===0x191){const _0x75342c=_0x200596(0x217);logger['error']('update-menu-cdn-url',_0x75342c,{'status':_0x23db16[_0x200596(0x1f0)],'menu':_0x40bb33[_0x200596(0x1fd)]});throw new Error(_0x75342c);}const _0xbe26ff=_0x200596(0x1f4)+_0x23db16[_0x200596(0x1f0)];logger[_0x200596(0x221)](_0x200596(0x220),_0xbe26ff,{'menu':_0x40bb33[_0x200596(0x1fd)]});throw new Error(_0xbe26ff);}const _0x385099=await _0x23db16[_0x200596(0x1f1)]();if(!_0x385099[_0x200596(0x202)]){const _0x1b463c=_0x200596(0x1f4)+(_0x385099[_0x200596(0x1ef)]||_0x200596(0x218));logger['error'](_0x200596(0x220),_0x1b463c,{'errorCode':_0x385099[_0x200596(0x1ec)],'errorMsg':_0x385099[_0x200596(0x1ef)],'menu':_0x40bb33[_0x200596(0x1fd)]});throw new Error(_0x1b463c);}logger[_0x200596(0x215)](_0x200596(0x220),_0x200596(0x201)+_0x40bb33['label'],_0x385099[_0x200596(0x1fb)]);}
@@ -1 +1 @@
1
- (function(_0x4333aa,_0x573570){const _0x1e54d4=a51_0x5bde,_0xf1f609=_0x4333aa();while(!![]){try{const _0x3d212b=-parseInt(_0x1e54d4(0x169))/0x1*(-parseInt(_0x1e54d4(0x17b))/0x2)+-parseInt(_0x1e54d4(0x193))/0x3*(-parseInt(_0x1e54d4(0x177))/0x4)+parseInt(_0x1e54d4(0x179))/0x5*(parseInt(_0x1e54d4(0x180))/0x6)+-parseInt(_0x1e54d4(0x16b))/0x7+-parseInt(_0x1e54d4(0x190))/0x8+parseInt(_0x1e54d4(0x17a))/0x9*(parseInt(_0x1e54d4(0x187))/0xa)+-parseInt(_0x1e54d4(0x184))/0xb;if(_0x3d212b===_0x573570)break;else _0xf1f609['push'](_0xf1f609['shift']());}catch(_0x326b3f){_0xf1f609['push'](_0xf1f609['shift']());}}}(a51_0x1abf,0x1b2d5));import{getLocalPages}from'./local-pages.js';import{getOnlineMenuList,createMenus}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';import{logger}from'../../../utils/logger.js';function validateParams(_0xf26687){const _0x315116=a51_0x5bde,_0x43ff92=[];return _0xf26687[_0x315116(0x17d)]&&!isValidJsHttpsUrl(_0xf26687[_0x315116(0x17d)])&&_0x43ff92[_0x315116(0x18f)]({'field':_0x315116(0x17d),'message':_0x315116(0x176)}),_0xf26687['cssUrl']&&!isValidCssHttpsUrl(_0xf26687[_0x315116(0x173)])&&_0x43ff92[_0x315116(0x18f)]({'field':'cssUrl','message':_0x315116(0x175)}),_0x43ff92;}function a51_0x1abf(){const _0x489648=['100MXYQsb','trim','isArray','field','map','\x0a\x20\x20Available\x20local\x20pages:\x20','length','toString','push','422080oFOYVY','readableEnded','setLogPath','151587LJSpvP','parse','startsWith','concat','message','split','stdin','pages','menu-sync','2616AsggVu','Invalid\x20--params:\x20','837186NUXPJz','string','Start\x20non-interactive\x20menu\x20sync','isTTY','join','object','data','No\x20local\x20pages\x20matched\x20labels:\x20','cssUrl','label','CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','12mNjXVn','--params.','260745OKxWTH','137817ZoGvhz','170InWLRP','filter','jsUrl','Menu\x20sync\x20completed','JS\x20URL\x20is\x20unreachable:\x20','18fEVtPv','info','selectedLabels','end','4398339oBimaC','has','CSS\x20URL\x20is\x20unreachable:\x20'];a51_0x1abf=function(){return _0x489648;};return a51_0x1abf();}export async function runMenuSyncCore(_0x4ff5f4,_0x1ed24a,_0x115711=[],_0x58aef8){const _0x1d52cb=a51_0x5bde,_0x456111=parseParamsFlag(_0x58aef8),_0x40164c=_0x115711[_0x1d52cb(0x18d)]>0x0?_0x115711:_0x456111[_0x1d52cb(0x182)],_0x2a3994=_0x456111[_0x1d52cb(0x17d)],_0x1c2f66=_0x456111['cssUrl'],_0x46d7c2=[];if(_0x2a3994)_0x46d7c2[_0x1d52cb(0x18f)](_0x2a3994);if(_0x1c2f66)_0x46d7c2[_0x1d52cb(0x18f)](_0x1c2f66);const _0x140f27=validateParams(_0x456111);if(_0x140f27[_0x1d52cb(0x18d)]>0x0){const _0x4141a2=_0x140f27[_0x1d52cb(0x18b)](_0x3f4bc3=>_0x1d52cb(0x178)+_0x3f4bc3[_0x1d52cb(0x18a)]+':\x20'+_0x3f4bc3[_0x1d52cb(0x164)])['join'](';\x20');throw new Error(_0x1d52cb(0x16a)+_0x4141a2);}logger[_0x1d52cb(0x192)](process['cwd']()),logger[_0x1d52cb(0x181)](_0x1d52cb(0x168),_0x1d52cb(0x16d),{'appCode':_0x4ff5f4,'selectedCount':_0x40164c?.[_0x1d52cb(0x18d)],'jsUrl':_0x2a3994,'cssUrl':_0x1c2f66});if(_0x2a3994){const _0x36217a=await isUrlReachable(_0x2a3994);if(!_0x36217a)throw new Error(_0x1d52cb(0x17f)+_0x2a3994);}if(_0x1c2f66){const _0x48f4cd=await isUrlReachable(_0x1c2f66);if(!_0x48f4cd)throw new Error(_0x1d52cb(0x186)+_0x1c2f66);}const _0x379689=getLocalPages();if(_0x379689[_0x1d52cb(0x18d)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};const _0x4e3d7d=await getOnlineMenuList(_0x4ff5f4,_0x1ed24a),_0x716025=new Set(_0x4e3d7d['map'](_0x49a1b8=>_0x49a1b8['path']));let _0x253865;if(_0x40164c&&_0x40164c[_0x1d52cb(0x18d)]>0x0){const _0x4bd48f=new Set(_0x40164c[_0x1d52cb(0x18b)](_0x24c809=>_0x24c809[_0x1d52cb(0x188)]()));_0x253865=_0x379689[_0x1d52cb(0x17c)](_0x4c7571=>_0x4bd48f[_0x1d52cb(0x185)](_0x4c7571[_0x1d52cb(0x174)]));if(_0x253865[_0x1d52cb(0x18d)]===0x0){const _0x3ccd8a=_0x379689[_0x1d52cb(0x18b)](_0x280262=>_0x280262[_0x1d52cb(0x174)])[_0x1d52cb(0x16f)](',\x20');throw new Error(_0x1d52cb(0x172)+[..._0x4bd48f][_0x1d52cb(0x16f)](',\x20')+_0x1d52cb(0x18c)+_0x3ccd8a);}}else _0x253865=_0x379689[_0x1d52cb(0x17c)](_0x5f20ca=>!_0x716025['has'](_0x5f20ca['path']));if(_0x253865[_0x1d52cb(0x18d)]===0x0)return{'created':0x0,'skipped':!![],'targetPages':[]};return await createMenus(_0x4ff5f4,_0x1ed24a,_0x253865,_0x46d7c2[_0x1d52cb(0x18d)]>0x0?_0x46d7c2:undefined),logger[_0x1d52cb(0x181)]('menu-sync',_0x1d52cb(0x17e),{'count':_0x253865[_0x1d52cb(0x18d)],'resources':_0x46d7c2}),{'created':_0x253865[_0x1d52cb(0x18d)],'skipped':![],'targetPages':_0x253865};}function a51_0x5bde(_0x419d71,_0x103617){_0x419d71=_0x419d71-0x162;const _0x1abfd8=a51_0x1abf();let _0x5bdecd=_0x1abfd8[_0x419d71];return _0x5bdecd;}export async function readPageLabelsFromStdin(){const _0x384ce0=a51_0x5bde;if(!process[_0x384ce0(0x166)][_0x384ce0(0x16e)]&&!process[_0x384ce0(0x166)][_0x384ce0(0x191)])return new Promise(_0xed5a5c=>{const _0x18a28e=_0x384ce0,_0x45c824=[];process[_0x18a28e(0x166)]['on'](_0x18a28e(0x171),_0x4128dd=>_0x45c824[_0x18a28e(0x18f)](_0x4128dd)),process[_0x18a28e(0x166)]['on'](_0x18a28e(0x183),()=>{const _0x5afa1d=_0x18a28e,_0x675e35=Buffer[_0x5afa1d(0x163)](_0x45c824)[_0x5afa1d(0x18e)]('utf8'),_0x217154=_0x675e35[_0x5afa1d(0x165)]('\x0a')[_0x5afa1d(0x18b)](_0x37709d=>_0x37709d['trim']())[_0x5afa1d(0x17c)](_0x1931ed=>_0x1931ed[_0x5afa1d(0x18d)]>0x0&&!_0x1931ed[_0x5afa1d(0x162)]('#'));_0xed5a5c(_0x217154);}),setTimeout(()=>_0xed5a5c([]),0x1f4);});return[];}function parseParamsFlag(_0x51ab56){const _0x5c6c97=a51_0x5bde;if(!_0x51ab56||typeof _0x51ab56!=='string')return{};try{const _0x59cbbb=JSON[_0x5c6c97(0x194)](_0x51ab56);if(typeof _0x59cbbb!==_0x5c6c97(0x170)||_0x59cbbb===null||Array['isArray'](_0x59cbbb))return{};return{'selectedLabels':Array[_0x5c6c97(0x189)](_0x59cbbb[_0x5c6c97(0x167)])?_0x59cbbb['pages'][_0x5c6c97(0x18b)](String):undefined,'jsUrl':typeof _0x59cbbb['jsUrl']===_0x5c6c97(0x16c)?_0x59cbbb[_0x5c6c97(0x17d)][_0x5c6c97(0x188)]():undefined,'cssUrl':typeof _0x59cbbb[_0x5c6c97(0x173)]===_0x5c6c97(0x16c)?_0x59cbbb[_0x5c6c97(0x173)]['trim']():undefined};}catch{return{};}}
1
+ (function(_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 +1 @@
1
- (function(_0x4cc8a3,_0x8b8c06){const _0xd78553=a53_0x4758,_0x26df60=_0x4cc8a3();while(!![]){try{const _0x380376=parseInt(_0xd78553(0xc8))/0x1*(-parseInt(_0xd78553(0xbc))/0x2)+-parseInt(_0xd78553(0xc5))/0x3*(parseInt(_0xd78553(0xad))/0x4)+parseInt(_0xd78553(0xb7))/0x5*(-parseInt(_0xd78553(0xc4))/0x6)+-parseInt(_0xd78553(0xc6))/0x7*(-parseInt(_0xd78553(0xc9))/0x8)+parseInt(_0xd78553(0xbd))/0x9*(parseInt(_0xd78553(0xb9))/0xa)+parseInt(_0xd78553(0xd0))/0xb*(parseInt(_0xd78553(0xd1))/0xc)+parseInt(_0xd78553(0xb6))/0xd;if(_0x380376===_0x8b8c06)break;else _0x26df60['push'](_0x26df60['shift']());}catch(_0x4c36ac){_0x26df60['push'](_0x26df60['shift']());}}}(a53_0x3c32,0x69065));function a53_0x4758(_0x1d0c49,_0xbe94c7){_0x1d0c49=_0x1d0c49-0xac;const _0x3c329b=a53_0x3c32();let _0x475862=_0x3c329b[_0x1d0c49];return _0x475862;}import{updateMenuCdnUrl,getOnlineMenuList}from'./service.js';import{isUrlReachable,isValidCssHttpsUrl,isValidJsHttpsUrl}from'./valid-url.js';function a53_0x3c32(){const _0x1f5dee=['6gMwLgN','143274TWpPDA','40964YXJilJ','push','27buivzL','80Raecbd','parse','allSettled','CSS\x20URL\x20is\x20unreachable:\x20','Start\x20non-interactive\x20menu\x20update','JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','trim','11462qPNCoW','1956HlsCki','info','filter','64pcOYxL','rejected','Invalid\x20--params:\x20','--params.','jsUrl','object','map','cssUrl','string','16020056ebIQAy','2813155VPfPUp','menu-update','601010FdAaGT','isArray','resources','18122CzEKyl','81rgwLaa','Menu\x20update\x20completed','join','length','cwd','message','path'];a53_0x3c32=function(){return _0x1f5dee;};return a53_0x3c32();}import{logger}from'../../../utils/logger.js';function validateParams(_0x3c7d47){const _0x3d9fb9=a53_0x4758,_0x2fd54d=[];return _0x3c7d47[_0x3d9fb9(0xb1)]&&!isValidJsHttpsUrl(_0x3c7d47['jsUrl'])&&_0x2fd54d['push']({'field':_0x3d9fb9(0xb1),'message':_0x3d9fb9(0xce)}),_0x3c7d47[_0x3d9fb9(0xb4)]&&!isValidCssHttpsUrl(_0x3c7d47[_0x3d9fb9(0xb4)])&&_0x2fd54d['push']({'field':'cssUrl','message':'CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'}),_0x2fd54d;}export async function runMenuUpdateCore(_0x43ada7,_0x36a14d,_0x5ca92d){const _0x51e40a=a53_0x4758,_0x5a31e2=parseUpdateParamsFlag(_0x5ca92d),_0x861ab6=[];if(_0x5a31e2[_0x51e40a(0xb1)])_0x861ab6[_0x51e40a(0xc7)](_0x5a31e2[_0x51e40a(0xb1)]);if(_0x5a31e2[_0x51e40a(0xb4)])_0x861ab6['push'](_0x5a31e2['cssUrl']);const _0x4ff407=validateParams(_0x5a31e2);if(_0x4ff407[_0x51e40a(0xc0)]>0x0){const _0x5b62f3=_0x4ff407[_0x51e40a(0xb3)](_0xe35a80=>_0x51e40a(0xb0)+_0xe35a80['field']+':\x20'+_0xe35a80[_0x51e40a(0xc2)])[_0x51e40a(0xbf)](';\x20');throw new Error(_0x51e40a(0xaf)+_0x5b62f3);}logger['setLogPath'](process[_0x51e40a(0xc1)]()),logger[_0x51e40a(0xd2)](_0x51e40a(0xb8),_0x51e40a(0xcd),{'appCode':_0x43ada7,'jsUrl':_0x5a31e2[_0x51e40a(0xb1)],'cssUrl':_0x5a31e2[_0x51e40a(0xb4)]});if(_0x5a31e2[_0x51e40a(0xb1)]){const _0x2786bf=await isUrlReachable(_0x5a31e2['jsUrl']);if(!_0x2786bf)throw new Error('JS\x20URL\x20is\x20unreachable:\x20'+_0x5a31e2[_0x51e40a(0xb1)]);}if(_0x5a31e2[_0x51e40a(0xb4)]){const _0xe34dba=await isUrlReachable(_0x5a31e2['cssUrl']);if(!_0xe34dba)throw new Error(_0x51e40a(0xcc)+_0x5a31e2[_0x51e40a(0xb4)]);}const _0x4250b9=await getOnlineMenuList(_0x43ada7,_0x36a14d),_0x5e3917=_0x4250b9[_0x51e40a(0xac)](_0x337028=>_0x337028[_0x51e40a(0xbb)][_0x51e40a(0xc0)]>0x0);if(_0x5e3917[_0x51e40a(0xc0)]===0x0)return{'updated':0x0,'failed':0x0,'skipped':!![]};const _0x570e5e=await Promise[_0x51e40a(0xcb)](_0x5e3917['map'](_0x1c8b2c=>updateMenuCdnUrl(_0x43ada7,_0x36a14d,{'id':_0x1c8b2c['id'],'label':_0x1c8b2c['label'],'path':_0x1c8b2c[_0x51e40a(0xc3)],'resources':_0x861ab6}))),_0x216322=_0x570e5e['filter'](_0x4a1462=>_0x4a1462['status']===_0x51e40a(0xae))[_0x51e40a(0xc0)];return logger[_0x51e40a(0xd2)](_0x51e40a(0xb8),_0x51e40a(0xbe),{'count':_0x5e3917[_0x51e40a(0xc0)],'resources':_0x861ab6}),{'updated':_0x5e3917[_0x51e40a(0xc0)]-_0x216322,'failed':_0x216322,'skipped':![]};}function parseUpdateParamsFlag(_0x44ba38){const _0x13ce28=a53_0x4758;if(!_0x44ba38||typeof _0x44ba38!=='string')return{};try{const _0x4fd6ac=JSON[_0x13ce28(0xca)](_0x44ba38);if(typeof _0x4fd6ac!==_0x13ce28(0xb2)||_0x4fd6ac===null||Array[_0x13ce28(0xba)](_0x4fd6ac))return{};return{'jsUrl':typeof _0x4fd6ac[_0x13ce28(0xb1)]===_0x13ce28(0xb5)?_0x4fd6ac['jsUrl'][_0x13ce28(0xcf)]():undefined,'cssUrl':typeof _0x4fd6ac[_0x13ce28(0xb4)]===_0x13ce28(0xb5)?_0x4fd6ac['cssUrl'][_0x13ce28(0xcf)]():undefined};}catch{return{};}}
1
+ (function(_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 +1 @@
1
- (function(_0x3ed3ff,_0x18667f){const _0x242727=a54_0x56c7,_0x36fee9=_0x3ed3ff();while(!![]){try{const _0x232f70=-parseInt(_0x242727(0xe5))/0x1+-parseInt(_0x242727(0xe9))/0x2+parseInt(_0x242727(0xe3))/0x3+-parseInt(_0x242727(0xea))/0x4*(-parseInt(_0x242727(0xe7))/0x5)+-parseInt(_0x242727(0xe4))/0x6+parseInt(_0x242727(0xe1))/0x7*(-parseInt(_0x242727(0xe6))/0x8)+parseInt(_0x242727(0xe2))/0x9;if(_0x232f70===_0x18667f)break;else _0x36fee9['push'](_0x36fee9['shift']());}catch(_0xcc5de9){_0x36fee9['push'](_0x36fee9['shift']());}}}(a54_0x4dd0,0xca1af));function a54_0x56c7(_0x4f3c12,_0x4fb7ff){_0x4f3c12=_0x4f3c12-0xdf;const _0x4dd003=a54_0x4dd0();let _0x56c71f=_0x4dd003[_0x4f3c12];return _0x56c71f;}export function isValidJsHttpsUrl(_0x4c63b3){const _0x2a21c0=a54_0x56c7;return/^https:\/\/.+\.js(\?.*)?$/[_0x2a21c0(0xe8)](_0x4c63b3['trim']());}export function isValidCssHttpsUrl(_0x223dce){const _0x50c235=a54_0x56c7;return/^https:\/\/.+\.css(\?.*)?$/[_0x50c235(0xe8)](_0x223dce[_0x50c235(0xdf)]());}function a54_0x4dd0(){const _0x4e614f=['HEAD','7kJvscK','43892721AgZAkZ','430701vjFtSL','9132840jBzKUw','719857dGDsdg','3986072CaRrho','565UwtjzS','test','3301092POpzSH','7012IYQnAB','trim'];a54_0x4dd0=function(){return _0x4e614f;};return a54_0x4dd0();}export async function isUrlReachable(_0x977fec){const _0x4e80f1=a54_0x56c7;try{const _0x2b241b=await fetch(_0x977fec,{'method':_0x4e80f1(0xe0)});return _0x2b241b['ok'];}catch{return![];}}
1
+ (function(_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 +1 @@
1
- const a55_0x3c0514=a55_0x4d4c;function a55_0x4d4c(_0x3d377f,_0xd5f2e8){_0x3d377f=_0x3d377f-0x11f;const _0x20acf8=a55_0x20ac();let _0x4d4c7e=_0x20acf8[_0x3d377f];return _0x4d4c7e;}(function(_0x4d17ea,_0x5e5136){const _0x4aef66=a55_0x4d4c,_0x574989=_0x4d17ea();while(!![]){try{const _0x460333=-parseInt(_0x4aef66(0x127))/0x1+-parseInt(_0x4aef66(0x138))/0x2+parseInt(_0x4aef66(0x121))/0x3+-parseInt(_0x4aef66(0x142))/0x4*(-parseInt(_0x4aef66(0x14d))/0x5)+-parseInt(_0x4aef66(0x13e))/0x6+parseInt(_0x4aef66(0x123))/0x7*(-parseInt(_0x4aef66(0x124))/0x8)+parseInt(_0x4aef66(0x120))/0x9*(parseInt(_0x4aef66(0x149))/0xa);if(_0x460333===_0x5e5136)break;else _0x574989['push'](_0x574989['shift']());}catch(_0x23af1b){_0x574989['push'](_0x574989['shift']());}}}(a55_0x20ac,0x1c532));import a55_0x2062b5 from'chalk';import{buildCompareRows,doCreateMenus,fetchMenuData}from'./shared/logic.js';import{renderCompareTable,renderSyncSummary}from'./shared/compare-table.js';import{selectPages,askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'./shared/inquirer.js';import{CliErrors}from'../../errors.js';import{runMenuSyncCore,readPageLabelsFromStdin}from'./shared/sync-core.js';import{getLocalPages}from'./shared/local-pages.js';export const menuSync={'service':a55_0x3c0514(0x153),'command':a55_0x3c0514(0x157),'description':'Sync\x20local\x20pages\x20as\x20platform\x20menus','risk':a55_0x3c0514(0x12c),'flags':[{'name':a55_0x3c0514(0x150),'type':'string','description':a55_0x3c0514(0x13b)+a55_0x3c0514(0x159)},{'name':a55_0x3c0514(0x14c),'type':a55_0x3c0514(0x11f),'description':'Non-interactive:\x20auto-create\x20all\x20local\x20pages\x20not\x20yet\x20on\x20platform'}],async 'execute'(_0x7fa201){const _0x292995=a55_0x3c0514,_0x486b3c=_0x7fa201['flag'](_0x292995(0x14c)),_0x5b1541=_0x7fa201['str'](_0x292995(0x150)),_0x24a4a8=parseParams(_0x5b1541),_0x98b0d2=!!(_0x24a4a8['jsUrl']||_0x24a4a8[_0x292995(0x155)]||_0x24a4a8[_0x292995(0x12e)]&&_0x24a4a8['pages'][_0x292995(0x134)]>0x0);if(_0x486b3c||_0x98b0d2){let _0xc362c0=[];!isInteractive()&&!_0x24a4a8[_0x292995(0x12e)]?.[_0x292995(0x134)]&&(_0xc362c0=await readPageLabelsFromStdin());const _0x35affa=await runMenuSyncCore(_0x7fa201[_0x292995(0x158)],_0x7fa201[_0x292995(0x147)],_0xc362c0['length']>0x0?_0xc362c0:_0x24a4a8['pages']??[],_0x5b1541);if(_0x35affa[_0x292995(0x13a)]){const _0x24d1cb=getLocalPages();_0x24d1cb[_0x292995(0x134)]===0x0?console[_0x292995(0x151)](_0x292995(0x139)):console[_0x292995(0x151)](_0x292995(0x13d));}else console[_0x292995(0x151)]('✓\x20Menu\x20sync\x20completed:\x20'+_0x35affa['created']+_0x292995(0x13f));return{'ok':!![]};}requireInteractive();const _0x18c55b=startSpinner(_0x292995(0x13c));let _0x359808,_0x69189a,_0x2dd27c;try{const _0x212e94=await fetchMenuData(_0x7fa201['appCode'],_0x7fa201['cookie']);_0x359808=_0x212e94['localPages'],_0x69189a=_0x212e94[_0x292995(0x12d)],_0x2dd27c=_0x212e94[_0x292995(0x126)],stopSpinner(_0x18c55b,'Online\x20menu\x20list\x20fetched',!![]);}catch(_0x77859a){stopSpinner(_0x18c55b,'Failed\x20to\x20fetch\x20online\x20menu\x20list',![]);throw CliErrors[_0x292995(0x12a)](_0x77859a instanceof Error?_0x77859a[_0x292995(0x12f)]:_0x292995(0x141));}if(_0x359808[_0x292995(0x134)]===0x0)return console[_0x292995(0x151)](a55_0x2062b5[_0x292995(0x14f)]('\x20\x20!\x20No\x20local\x20pages\x20found,\x20please\x20create\x20pages\x20first')),{'ok':!![]};const _0x3e6536=buildCompareRows(_0x359808,_0x69189a);console[_0x292995(0x151)](renderCompareTable(_0x3e6536)),console['log']();const _0x2861d7=_0x24a4a8[_0x292995(0x12e)],_0x4fa596=await selectPages(_0x359808,_0x69189a,_0x2861d7);console['log'](),console['log'](a55_0x2062b5[_0x292995(0x144)](_0x292995(0x125)+_0x4fa596[_0x292995(0x134)]+'\x20page(s)'));const _0x23ade3=_0x24a4a8[_0x292995(0x131)]&&_0x24a4a8['cssUrl'];if(!_0x23ade3){console['log'](renderSyncSummary(_0x4fa596,_0x69189a[_0x292995(0x137)]>0x0));const _0x3ac275=await askConfirm(_0x292995(0x129));if(!_0x3ac275)return console['log'](a55_0x2062b5[_0x292995(0x135)](_0x292995(0x143))),{'ok':!![]};}let _0x35d303=_0x24a4a8[_0x292995(0x131)],_0x5682c6=_0x24a4a8[_0x292995(0x155)];if(!_0x35d303)try{_0x35d303=await askJsUrl();}catch(_0x5a413d){if(_0x5a413d['message']===_0x292995(0x128))return console['log'](a55_0x2062b5[_0x292995(0x135)](_0x292995(0x143))),{'ok':!![]};throw _0x5a413d;}if(!_0x5682c6)try{_0x5682c6=await askCssUrl();}catch(_0xc0f0f4){if(_0xc0f0f4[_0x292995(0x12f)]===_0x292995(0x128))return console[_0x292995(0x151)](a55_0x2062b5[_0x292995(0x135)](_0x292995(0x143))),{'ok':!![]};throw _0xc0f0f4;}const _0x24e261=await askConfirm(_0x292995(0x133)+_0x4fa596[_0x292995(0x134)]+_0x292995(0x148)+_0x35d303+_0x292995(0x146)+_0x5682c6+'?');if(!_0x24e261)return console[_0x292995(0x151)](a55_0x2062b5['gray'](_0x292995(0x143))),{'ok':!![]};const _0x360cb5=[_0x35d303,_0x5682c6],_0x2dd350=startSpinner('Creating\x20'+_0x4fa596['length']+_0x292995(0x140));try{const _0x5538ce=await doCreateMenus(_0x7fa201[_0x292995(0x158)],_0x7fa201['cookie'],_0x4fa596,_0x360cb5);return stopSpinner(_0x2dd350,_0x292995(0x14a)+_0x5538ce[_0x292995(0x132)]+_0x292995(0x145),!![]),{'ok':!![],'data':_0x5538ce,'message':_0x292995(0x130)+_0x5538ce[_0x292995(0x132)]+_0x292995(0x122)+_0x5538ce['failed']+_0x292995(0x152)};}catch(_0x36f2ec){stopSpinner(_0x2dd350,'Menu\x20creation\x20failed',![]);throw CliErrors[_0x292995(0x12a)](_0x36f2ec instanceof Error?_0x36f2ec['message']:_0x292995(0x136));}}};function a55_0x20ac(){const _0x37d2f7=['CANCEL','\x20\x20Continue\x20with\x20creation?','validation','string','write','onlinePaths','pages','message','Menu\x20sync\x20completed:\x20','jsUrl','created','\x20\x20Create\x20','length','gray','Menu\x20creation\x20failed','size','37746EioWLA','!\x20No\x20local\x20pages\x20found\x20in\x20src/pages','skipped','Pre-fill\x20JS/CSS\x20URLs\x20and/or\x20select\x20specific\x20pages.\x20','Fetching\x20online\x20menu\x20list...','✓\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform','1337028SQagiM','\x20menu(s)\x20created','\x20menu(s)...','Failed\x20to\x20fetch\x20online\x20menu\x20list','4gjDVSy','\x20\x20Cancelled.','cyan','\x20menu(s)','\x20and\x20CSS:\x20','cookie','\x20menu(s)\x20with\x20JS:\x20','29370LFjgRI','Created\x20','map','yes','666065ydgfus','trim','yellow','params','log','\x20failed.','menu','parse','cssUrl','isArray','sync','appCode','JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22,\x22pages\x22:[\x22Page1\x22]}','boolean','657mpTswW','561345GCpjks','\x20created,\x20','380233eYhyTB','8nlCwnt','\x20\x20✓\x20Selected:\x20','onlineMenuList','122681ZaXenA'];a55_0x20ac=function(){return _0x37d2f7;};return a55_0x20ac();}function parseParams(_0x5c7551){const _0x5f5565=a55_0x3c0514;if(!_0x5c7551)return{};try{const _0x2be117=JSON[_0x5f5565(0x154)](_0x5c7551);if(typeof _0x2be117!=='object'||_0x2be117===null||Array[_0x5f5565(0x156)](_0x2be117))return{};return{'jsUrl':typeof _0x2be117['jsUrl']===_0x5f5565(0x12b)?_0x2be117[_0x5f5565(0x131)][_0x5f5565(0x14e)]():undefined,'cssUrl':typeof _0x2be117[_0x5f5565(0x155)]===_0x5f5565(0x12b)?_0x2be117['cssUrl']['trim']():undefined,'pages':Array[_0x5f5565(0x156)](_0x2be117[_0x5f5565(0x12e)])?_0x2be117['pages'][_0x5f5565(0x14b)](String):undefined};}catch{return{};}}
1
+ const a56_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 +1 @@
1
- const a56_0x2f6fdf=a56_0x2234;function a56_0x2e3f(){const _0x29af7c=['skipped','1241976zbolHF','trim','label','cookie','\x20\x20!\x20No\x20menus\x20with\x20existing\x20resources\x20found','Online\x20menu\x20list\x20fetched','9TKFIZo','Non-interactive:\x20update\x20all\x20menus\x20without\x20confirmation','CANCEL','\x20menu(s)\x20updated','string','Pre-fill\x20JS/CSS\x20URLs\x20to\x20update.\x20','1364482gJaJNo','Menu\x20update\x20failed','log','yes','params','\x20updated.','\x20failed.','gray','cyan','1021815ANkwfh','flag','parse','yellow','\x20\x20Found\x20','jsUrl','!\x20No\x20menus\x20with\x20existing\x20resources\x20found','boolean','Menu\x20update\x20completed:\x20','error','6nFRaeF','cssUrl','Update\x20CDN\x20asset\x20URLs\x20for\x20all\x20online\x20menus\x20with\x20existing\x20resources','message','\x20updated,\x20','✓\x20Menu\x20update\x20completed:\x20','failed','477326aWYirT','\x20menu(s)\x20failed','1639045uCrEaJ','write','2308648naLRNg','str','validation','Failed\x20to\x20fetch\x20online\x20menu\x20list','\x20menu(s)...','updated','\x20\x20Update\x20','Updated\x20','menu','appCode','Updating\x20','map','length','9275088lDxpnr','\x20\x20Cancelled.'];a56_0x2e3f=function(){return _0x29af7c;};return a56_0x2e3f();}(function(_0x1a2214,_0x5f1a84){const _0x3e92a1=a56_0x2234,_0x4c603a=_0x1a2214();while(!![]){try{const _0x4b53e4=parseInt(_0x3e92a1(0x90))/0x1+parseInt(_0x3e92a1(0xa4))/0x2+parseInt(_0x3e92a1(0xb9))/0x3+parseInt(_0x3e92a1(0x94))/0x4+-parseInt(_0x3e92a1(0x92))/0x5+-parseInt(_0x3e92a1(0x89))/0x6*(parseInt(_0x3e92a1(0xb0))/0x7)+-parseInt(_0x3e92a1(0xa1))/0x8*(parseInt(_0x3e92a1(0xaa))/0x9);if(_0x4b53e4===_0x5f1a84)break;else _0x4c603a['push'](_0x4c603a['shift']());}catch(_0x41483b){_0x4c603a['push'](_0x4c603a['shift']());}}}(a56_0x2e3f,0x51888));import a56_0x359cd7 from'chalk';import{filterMenusWithResources,doUpdateCdnUrls,fetchOnlineMenuList}from'./shared/logic.js';import{renderUpdateSummary}from'./shared/compare-table.js';import{askJsUrl,askCssUrl,askConfirm,startSpinner,stopSpinner,isInteractive,requireInteractive}from'./shared/inquirer.js';import{CliErrors}from'../../errors.js';import{runMenuUpdateCore}from'./shared/update-core.js';function a56_0x2234(_0x126ce4,_0x5d4679){_0x126ce4=_0x126ce4-0x84;const _0x2e3f50=a56_0x2e3f();let _0x2234e0=_0x2e3f50[_0x126ce4];return _0x2234e0;}export const menuUpdate={'service':a56_0x2f6fdf(0x9c),'command':'update','description':a56_0x2f6fdf(0x8b),'risk':a56_0x2f6fdf(0x93),'flags':[{'name':a56_0x2f6fdf(0xb4),'type':'string','description':a56_0x2f6fdf(0xaf)+'JSON:\x20{\x22jsUrl\x22:\x22https://...js\x22,\x22cssUrl\x22:\x22https://...css\x22}'},{'name':a56_0x2f6fdf(0xb3),'type':a56_0x2f6fdf(0x86),'description':a56_0x2f6fdf(0xab)}],async 'execute'(_0x99eb1d){const _0x1979d3=a56_0x2f6fdf,_0x3c88f9=_0x99eb1d[_0x1979d3(0xba)](_0x1979d3(0xb3)),_0x52fbad=_0x99eb1d[_0x1979d3(0x95)]('params'),_0x28e01c=parseParams(_0x52fbad),_0x42c766=!!(_0x28e01c['jsUrl']||_0x28e01c[_0x1979d3(0x8a)]);if(_0x3c88f9||_0x42c766&&!isInteractive()){const _0x382508=await runMenuUpdateCore(_0x99eb1d[_0x1979d3(0x9d)],_0x99eb1d[_0x1979d3(0xa7)],_0x52fbad);return _0x382508[_0x1979d3(0xa3)]?console[_0x1979d3(0xb2)](_0x1979d3(0x85)):(console[_0x1979d3(0xb2)](_0x1979d3(0x8e)+_0x382508[_0x1979d3(0x99)]+_0x1979d3(0xad)),_0x382508[_0x1979d3(0x8f)]>0x0&&console[_0x1979d3(0x88)]('!\x20'+_0x382508[_0x1979d3(0x8f)]+_0x1979d3(0x91))),{'ok':_0x382508[_0x1979d3(0x8f)]===0x0};}requireInteractive();const _0x10fdf4=startSpinner('Fetching\x20online\x20menu\x20list...');let _0x2def1c;try{_0x2def1c=await fetchOnlineMenuList(_0x99eb1d['appCode'],_0x99eb1d[_0x1979d3(0xa7)]),stopSpinner(_0x10fdf4,_0x1979d3(0xa9),!![]);}catch(_0x1dadb5){stopSpinner(_0x10fdf4,_0x1979d3(0x97),![]);throw CliErrors[_0x1979d3(0x96)](_0x1dadb5 instanceof Error?_0x1dadb5[_0x1979d3(0x8c)]:_0x1979d3(0x97));}const _0x120736=filterMenusWithResources(_0x2def1c);if(_0x120736['length']===0x0)return console[_0x1979d3(0xb2)](a56_0x359cd7[_0x1979d3(0xbc)](_0x1979d3(0xa8))),{'ok':!![]};console[_0x1979d3(0xb2)](),console[_0x1979d3(0xb2)](a56_0x359cd7[_0x1979d3(0xb8)](_0x1979d3(0xbd)+_0x120736[_0x1979d3(0xa0)]+'\x20menu(s)\x20with\x20existing\x20resources')),console[_0x1979d3(0xb2)](renderUpdateSummary(_0x120736[_0x1979d3(0x9f)](_0x38cc77=>_0x38cc77[_0x1979d3(0xa6)]),[_0x28e01c[_0x1979d3(0x84)],_0x28e01c[_0x1979d3(0x8a)]])),console['log']();let _0x27cf8b=_0x28e01c['jsUrl'],_0x372b8f=_0x28e01c['cssUrl'];if(!_0x27cf8b)try{_0x27cf8b=await askJsUrl();}catch(_0x16a30a){if(_0x16a30a[_0x1979d3(0x8c)]===_0x1979d3(0xac))return console[_0x1979d3(0xb2)](a56_0x359cd7[_0x1979d3(0xb7)](_0x1979d3(0xa2))),{'ok':!![]};throw _0x16a30a;}if(!_0x372b8f)try{_0x372b8f=await askCssUrl();}catch(_0x4298c0){if(_0x4298c0[_0x1979d3(0x8c)]===_0x1979d3(0xac))return console[_0x1979d3(0xb2)](a56_0x359cd7[_0x1979d3(0xb7)](_0x1979d3(0xa2))),{'ok':!![]};throw _0x4298c0;}const _0x2df52f=await askConfirm(_0x1979d3(0x9a)+_0x120736[_0x1979d3(0xa0)]+'\x20menu(s)\x20with\x20JS:\x20'+_0x27cf8b+'\x20and\x20CSS:\x20'+_0x372b8f+'?');if(!_0x2df52f)return console[_0x1979d3(0xb2)](a56_0x359cd7[_0x1979d3(0xb7)](_0x1979d3(0xa2))),{'ok':!![]};const _0x56085a=[_0x27cf8b,_0x372b8f],_0x28610c=startSpinner(_0x1979d3(0x9e)+_0x120736['length']+_0x1979d3(0x98));try{const _0x1ff958=await doUpdateCdnUrls(_0x99eb1d[_0x1979d3(0x9d)],_0x99eb1d[_0x1979d3(0xa7)],_0x120736,_0x56085a);return stopSpinner(_0x28610c,_0x1979d3(0x9b)+_0x1ff958[_0x1979d3(0x99)]+'\x20menu(s)',_0x1ff958['failed']===0x0),{'ok':_0x1ff958[_0x1979d3(0x8f)]===0x0,'data':_0x1ff958,'message':_0x1ff958[_0x1979d3(0x8f)]>0x0?_0x1979d3(0x87)+_0x1ff958[_0x1979d3(0x99)]+_0x1979d3(0x8d)+_0x1ff958[_0x1979d3(0x8f)]+_0x1979d3(0xb6):_0x1979d3(0x87)+_0x1ff958[_0x1979d3(0x99)]+_0x1979d3(0xb5)};}catch(_0x3aa67a){stopSpinner(_0x28610c,_0x1979d3(0xb1),![]);throw CliErrors['validation'](_0x3aa67a instanceof Error?_0x3aa67a[_0x1979d3(0x8c)]:_0x1979d3(0xb1));}}};function parseParams(_0x3c6b47){const _0x33b309=a56_0x2f6fdf;if(!_0x3c6b47)return{};try{const _0x4e7c23=JSON[_0x33b309(0xbb)](_0x3c6b47);if(typeof _0x4e7c23!=='object'||_0x4e7c23===null||Array['isArray'](_0x4e7c23))return{};return{'jsUrl':typeof _0x4e7c23[_0x33b309(0x84)]===_0x33b309(0xae)?_0x4e7c23[_0x33b309(0x84)][_0x33b309(0xa5)]():undefined,'cssUrl':typeof _0x4e7c23['cssUrl']===_0x33b309(0xae)?_0x4e7c23[_0x33b309(0x8a)][_0x33b309(0xa5)]():undefined};}catch{return{};}}
1
+ 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 +1 @@
1
- function a57_0x5a41(){const _0x56f224=['424566YazsnI','node_modules','toString','3RdszcM','216042sACGiV','cwd','预览服务器启动失败','Preview\x20project','537890lCBEAa','预览服务器启动出错','env','now','preview','执行预览命令','912112sfrrSq','stderr','vite\x20preview','logger','140FVtEvf','all','close','success','40OrZXwn','build','error','PATH','vite\x20preview\x20exited\x20with\x20code\x20','58590FSMovQ','info','1122443VWAspA','inherit','--watch','预览服务器启动成功','pipe','vite','trim','6iuLPiJ','143gwFoye','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','12YTvtwk','1179932xucjbB'];a57_0x5a41=function(){return _0x56f224;};return a57_0x5a41();}const a57_0x58ebd7=a57_0x134b;function a57_0x134b(_0x82b4b5,_0x4f6906){_0x82b4b5=_0x82b4b5-0x11f;const _0x5a41da=a57_0x5a41();let _0x134b1d=_0x5a41da[_0x82b4b5];return _0x134b1d;}(function(_0x1c6598,_0x1da516){const _0x4e3c01=a57_0x134b,_0x4e52d4=_0x1c6598();while(!![]){try{const _0x1e3605=-parseInt(_0x4e3c01(0x13c))/0x1*(-parseInt(_0x4e3c01(0x13d))/0x2)+-parseInt(_0x4e3c01(0x134))/0x3*(-parseInt(_0x4e3c01(0x147))/0x4)+parseInt(_0x4e3c01(0x122))/0x5*(-parseInt(_0x4e3c01(0x12b))/0x6)+parseInt(_0x4e3c01(0x12d))/0x7*(parseInt(_0x4e3c01(0x126))/0x8)+-parseInt(_0x4e3c01(0x139))/0x9+parseInt(_0x4e3c01(0x141))/0xa*(-parseInt(_0x4e3c01(0x135))/0xb)+-parseInt(_0x4e3c01(0x137))/0xc*(parseInt(_0x4e3c01(0x138))/0xd);if(_0x1e3605===_0x1da516)break;else _0x4e52d4['push'](_0x4e52d4['shift']());}catch(_0x2af060){_0x4e52d4['push'](_0x4e52d4['shift']());}}}(a57_0x5a41,0x730d1));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function runPreview(_0x52968f){return new Promise((_0x1b4f9e,_0x712e92)=>{const _0x1de99c=a57_0x134b,_0x4e21cd=Date[_0x1de99c(0x144)]();_0x52968f[_0x1de99c(0x121)][_0x1de99c(0x12c)](_0x1de99c(0x145),'启动预览服务器',{'command':_0x1de99c(0x120)});let _0x27ef38='';const _0x56395d=spawn('vite',[_0x1de99c(0x145)],{'stdio':[_0x1de99c(0x12e),_0x1de99c(0x12e),_0x1de99c(0x131)],'shell':!![],'env':{...process[_0x1de99c(0x143)],'PATH':''+join(process[_0x1de99c(0x13e)](),'node_modules','.bin')+delimiter+process[_0x1de99c(0x143)]['PATH']}});_0x56395d[_0x1de99c(0x11f)]?.['on']('data',_0x2863d3=>{const _0x4d676c=_0x1de99c;_0x27ef38+=_0x2863d3[_0x4d676c(0x13b)]();}),_0x56395d['on'](_0x1de99c(0x124),_0x14aaf5=>{const _0x480f90=_0x1de99c,_0xf91b36=Date[_0x480f90(0x144)]()-_0x4e21cd;if(_0x14aaf5===0x0||_0x14aaf5===null)_0x52968f[_0x480f90(0x121)][_0x480f90(0x125)]('preview',_0x480f90(0x130),_0xf91b36),_0x1b4f9e();else{const _0x28b99a={'exitCode':_0x14aaf5,'duration':_0xf91b36,'command':_0x480f90(0x120),'cwd':process[_0x480f90(0x13e)]()};_0x27ef38[_0x480f90(0x133)]()&&(_0x28b99a[_0x480f90(0x11f)]=_0x27ef38[_0x480f90(0x133)]()),_0x52968f[_0x480f90(0x121)][_0x480f90(0x128)](_0x480f90(0x145),_0x480f90(0x13f),_0x28b99a),_0x712e92(new Error(_0x480f90(0x12a)+_0x14aaf5));}}),_0x56395d['on'](_0x1de99c(0x128),_0x1ec981=>{const _0x43a94a=_0x1de99c,_0x194301=Date[_0x43a94a(0x144)]()-_0x4e21cd;_0x52968f[_0x43a94a(0x121)][_0x43a94a(0x128)](_0x43a94a(0x145),_0x43a94a(0x142),{'error':_0x1ec981['message'],'duration':_0x194301,'stderr':_0x27ef38[_0x43a94a(0x133)]()||undefined}),_0x712e92(_0x1ec981);});});}function runBuildWatch(){return new Promise((_0x1f1d67,_0x4d0f6b)=>{const _0x18de49=a57_0x134b,_0x337d8e=spawn(_0x18de49(0x132),[_0x18de49(0x127),_0x18de49(0x12f)],{'stdio':_0x18de49(0x12e),'shell':!![],'env':{...process['env'],'PATH':''+join(process['cwd'](),_0x18de49(0x13a),'.bin')+delimiter+process[_0x18de49(0x143)][_0x18de49(0x129)]}});_0x337d8e['on'](_0x18de49(0x124),_0x3f5c2d=>{const _0x36216d=_0x18de49;if(_0x3f5c2d===0x0||_0x3f5c2d===null)_0x1f1d67();else _0x4d0f6b(new Error(_0x36216d(0x136)+_0x3f5c2d));}),_0x337d8e['on']('error',_0x4d0f6b);});}export const previewCommand={'name':a57_0x58ebd7(0x145),'description':a57_0x58ebd7(0x140),async 'run'(_0x3dbc71,_0x5ec434,_0x3f2692){const _0x485c3b=a57_0x58ebd7,_0x349756=_0x3f2692['watch'];_0x3dbc71[_0x485c3b(0x121)][_0x485c3b(0x12c)](_0x485c3b(0x145),_0x485c3b(0x146)+(_0x349756?'\x20(监听模式)':'')),_0x349756?await Promise[_0x485c3b(0x123)]([runBuildWatch(),runPreview(_0x3dbc71)]):await runPreview(_0x3dbc71);}};
1
+ const a58_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 +1 @@
1
- function a58_0xb598(){const _0x3c4f53=['Step\x206/6:\x20Installing\x20new\x20skill...','upgrade','info','removed\x20','object','log','join','already\x20exists\x20(will\x20merge)','.lovrabet','Step\x202/6:\x20.lovrabet/\x20removal\x20failed\x20—\x20','\x20removed','path','Step\x202/6:\x20Removing\x20.lovrabet/\x20directory...','\x20→\x20','includes','\x20\x20Action:\x20delete','done','\x20\x20Fields\x20to\x20migrate:\x20','needed','isArray','534716aXzsHo','Step\x205/6:\x20Remove\x20old\x20skill\x20—\x20','filter','3676692kyQZvP','step','mcpServers','files','72027fPoVYr','message','skipped','Config\x20file:','inherit','Remove\x20old\x20skill','Step\x204/6:\x20Cleaning\x20MCP\x20config...','Step\x204/6:\x20MCP\x20config\x20—\x20','utf8','\x20\x20New\x20config\x20(.rabetbase.json):\x20','Step\x202/6:\x20.lovrabet/\x20directory\x20removed','skipped\x20(no\x20legacy\x20config)','Clean\x20MCP\x20config','Step\x203/6:\x20Legacy\x20artifacts\x20—\x20','FAIL','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','entries','gray','no\x20legacy\x20entry','CANCEL','yellow','red','Legacy\x20artifacts:','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global','error','===\x20Upgrade\x20Analysis\x20===','not\x20found\x20(will\x20create)','.cursor/rules/lovrabet_rules.mdc','status','green','label','keys','fail','1423910EaVtrJ','exit\x20','push','Skill\x20swap:','952eqtYiU','oldPath','length','Step\x202/6:\x20.lovrabet/\x20not\x20found,\x20skipped','succeed','Upgrade\x20completed\x20successfully!','start','Step\x206/6:\x20Install\x20new\x20skill\x20—\x20','values','\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak','.cursor/mcp.json','lovrabet/rabetbase','.bak','No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.','17154XJWhDA','5655805KGnqkL','139fUMIDI','\x20\x20\x20\x20\x20\x20\x20','yes','string','oldMcpConfig','@lovrabet/dataset-mcp-server','configMigration','FOUND','lovrabet/rabetbase\x20installed\x20globally','cwd','args','Upgrade\x20cancelled.','.claude/skills/lovrabet','nonInteractive','oldArtifacts','cyan','Config\x20migration','3836481GSxjWl','detail','Remove\x20.lovrabet/','hasNewConfig','Remove\x20legacy\x20artifacts','\x20removed\x20(','none\x20found','failed','some','not\x20needed','60VoANXt','===\x20Upgrade\x20Summary\x20===','Step\x205/6:\x20Removing\x20old\x20skill...','385AxuXsY','\x20\x20Step\x20','Proceed\x20with\x20upgrade?'];a58_0xb598=function(){return _0x3c4f53;};return a58_0xb598();}const a58_0x4a89a=a58_0x45ed;(function(_0x230055,_0x8443eb){const _0x5ef50b=a58_0x45ed,_0x12930a=_0x230055();while(!![]){try{const _0x52eed3=-parseInt(_0x5ef50b(0x203))/0x1*(parseInt(_0x5ef50b(0x201))/0x2)+-parseInt(_0x5ef50b(0x1a3))/0x3+-parseInt(_0x5ef50b(0x1ca))/0x4+-parseInt(_0x5ef50b(0x202))/0x5+parseInt(_0x5ef50b(0x1ad))/0x6*(-parseInt(_0x5ef50b(0x1c7))/0x7)+-parseInt(_0x5ef50b(0x1f3))/0x8*(-parseInt(_0x5ef50b(0x1ce))/0x9)+-parseInt(_0x5ef50b(0x1ef))/0xa*(-parseInt(_0x5ef50b(0x1b0))/0xb);if(_0x52eed3===_0x8443eb)break;else _0x12930a['push'](_0x12930a['shift']());}catch(_0x498b7c){_0x12930a['push'](_0x12930a['shift']());}}}(a58_0xb598,0x9ee2e));import a58_0x4e1702 from'chalk';import a58_0x41fa84 from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../context.js';import{CORE_IDE_CONFIGS}from'../utils/ai_config.js';import{runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../skills/npx-skills-add.js';import{askConfirm}from'./menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES['filter'](_0x17087b=>_0x17087b!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x59abf4){const _0x41e6bb=a58_0x45ed,_0x27da4e=[];for(const _0xbcea0e of Object[_0x41e6bb(0x1fb)](CORE_IDE_CONFIGS)){if(_0xbcea0e['files'])for(const _0x1c3018 of _0xbcea0e[_0x41e6bb(0x1cd)]){_0x27da4e[_0x41e6bb(0x1f1)](resolve(_0x59abf4,_0x1c3018[_0x41e6bb(0x1be)]));}}return _0x27da4e;}function analyse(_0xee107c){const _0x27de80=a58_0x45ed;let _0x3ed059=null;const _0x445234=resolve(_0xee107c,NEW_CONFIG_NAME),_0x3235c8=existsSync(_0x445234);for(const _0x4dcfbd of LEGACY_CONFIG_NAMES){const _0xe1e152=resolve(_0xee107c,_0x4dcfbd);if(existsSync(_0xe1e152)){const _0x3f2d4a=readConfigFile(_0xe1e152),_0x22dee3=Object[_0x27de80(0x1ed)](_0x3f2d4a)[_0x27de80(0x1c9)](_0x1c68f8=>typeof _0x3f2d4a[_0x1c68f8]!=='undefined');_0x3ed059={'oldPath':_0xe1e152,'hasNewConfig':_0x3235c8,'fields':_0x22dee3};break;}}const _0x220363=[],_0x272179=resolve(_0xee107c,_0x27de80(0x1bb));if(existsSync(_0x272179))_0x220363[_0x27de80(0x1f1)](_0x272179);const _0x15231b=resolve(_0xee107c,_0x27de80(0x1e9));if(existsSync(_0x15231b))_0x220363[_0x27de80(0x1f1)](_0x15231b);const _0x11b690=resolve(_0xee107c,_0x27de80(0x19e));if(existsSync(_0x11b690))_0x220363[_0x27de80(0x1f1)](_0x11b690);for(const _0x4a0fc0 of collectIdeSkillFiles(_0xee107c)){if(existsSync(_0x4a0fc0))_0x220363['push'](_0x4a0fc0);}let _0x1db631=null;const _0xc689d0=resolve(_0xee107c,_0x27de80(0x1fd));if(existsSync(_0xc689d0))try{const _0x273a2a=JSON['parse'](readFileSync(_0xc689d0,_0x27de80(0x1d6)));if(_0x273a2a?.[_0x27de80(0x1cc)]&&typeof _0x273a2a[_0x27de80(0x1cc)]===_0x27de80(0x1b7)){const _0x522927=[];for(const [_0x43c771,_0x4852ae]of Object[_0x27de80(0x1de)](_0x273a2a['mcpServers'])){const _0x1147b8=_0x4852ae;_0x1147b8?.['args']&&Array[_0x27de80(0x1c6)](_0x1147b8[_0x27de80(0x19c)])&&_0x1147b8[_0x27de80(0x19c)][_0x27de80(0x1ab)](_0x450f78=>typeof _0x450f78==='string'&&_0x450f78['includes']('@lovrabet/dataset-mcp-server'))&&_0x522927[_0x27de80(0x1f1)](_0x43c771);}_0x522927[_0x27de80(0x1f5)]>0x0&&(_0x1db631={'path':_0xc689d0,'keys':_0x522927});}}catch{}const _0x857b71=_0x220363['length']>0x0||_0x3ed059!==null;return{'configMigration':_0x3ed059,'oldArtifacts':_0x220363,'oldMcpConfig':_0x1db631,'needsSkillSwap':_0x857b71};}function printReport(_0x34e5fc){const _0x5ad0bb=a58_0x45ed,{configMigration:_0x56a70e,oldArtifacts:_0x203288,oldMcpConfig:_0x4dc8b5,needsSkillSwap:_0x4ea741}=_0x34e5fc;console[_0x5ad0bb(0x1b8)](''),console[_0x5ad0bb(0x1b8)](a58_0x4e1702['bold'](_0x5ad0bb(0x1e7))),console[_0x5ad0bb(0x1b8)]('');_0x56a70e?(console[_0x5ad0bb(0x1b8)](a58_0x4e1702[_0x5ad0bb(0x1a1)](_0x5ad0bb(0x1d1))+('\x20\x20'+a58_0x4e1702['yellow'](_0x56a70e[_0x5ad0bb(0x1f4)]))),console['log'](_0x5ad0bb(0x1d7)+(_0x56a70e[_0x5ad0bb(0x1a6)]?a58_0x4e1702[_0x5ad0bb(0x1eb)](_0x5ad0bb(0x1ba)):a58_0x4e1702['gray'](_0x5ad0bb(0x1e8)))),console[_0x5ad0bb(0x1b8)](_0x5ad0bb(0x1c4)+_0x56a70e['fields']['join'](',\x20')),console[_0x5ad0bb(0x1b8)](_0x5ad0bb(0x1fc))):console[_0x5ad0bb(0x1b8)](a58_0x4e1702['cyan']('Config\x20file:')+'\x20\x20'+a58_0x4e1702[_0x5ad0bb(0x1df)]('no\x20legacy\x20config\x20found'));console['log']('');if(_0x203288[_0x5ad0bb(0x1f5)]>0x0){console[_0x5ad0bb(0x1b8)](a58_0x4e1702[_0x5ad0bb(0x1a1)](_0x5ad0bb(0x1e4)));for(const _0x4f00fe of _0x203288){console[_0x5ad0bb(0x1b8)]('\x20\x20'+a58_0x4e1702['red'](_0x5ad0bb(0x199))+'\x20\x20'+_0x4f00fe);}console['log'](_0x5ad0bb(0x1c2));}else console[_0x5ad0bb(0x1b8)](a58_0x4e1702['cyan'](_0x5ad0bb(0x1e4))+'\x20\x20'+a58_0x4e1702[_0x5ad0bb(0x1df)](_0x5ad0bb(0x1a9)));console[_0x5ad0bb(0x1b8)](''),_0x4dc8b5?(console['log'](a58_0x4e1702[_0x5ad0bb(0x1a1)]('MCP\x20config:')+('\x20\x20'+a58_0x4e1702['yellow'](_0x4dc8b5['path'])+'\x20→\x20keys:\x20'+_0x4dc8b5[_0x5ad0bb(0x1ed)][_0x5ad0bb(0x1b9)](',\x20'))),console['log']('\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server')):console[_0x5ad0bb(0x1b8)](a58_0x4e1702[_0x5ad0bb(0x1a1)]('MCP\x20config:')+'\x20\x20'+a58_0x4e1702[_0x5ad0bb(0x1df)](_0x5ad0bb(0x1e0))),console[_0x5ad0bb(0x1b8)](''),console['log'](a58_0x4e1702[_0x5ad0bb(0x1a1)](_0x5ad0bb(0x1f2))+('\x20\x20'+(_0x4ea741?a58_0x4e1702['yellow'](_0x5ad0bb(0x1c5)):a58_0x4e1702['green'](_0x5ad0bb(0x1ac))))),_0x4ea741&&console[_0x5ad0bb(0x1b8)](_0x5ad0bb(0x1e5)),console[_0x5ad0bb(0x1b8)]('');}function execConfigMigration(_0x444292,_0x4b78f9){const _0x5a902e=a58_0x45ed,{configMigration:_0x21d7eb}=_0x444292;if(!_0x21d7eb?.['oldPath'])return{'step':0x1,'label':_0x5a902e(0x1a2),'ok':!![],'detail':_0x5a902e(0x1d9)};const _0x400bfc=readConfigFile(_0x21d7eb[_0x5a902e(0x1f4)]),_0x52f88e=resolve(_0x4b78f9,NEW_CONFIG_NAME),_0x5b1bda=_0x21d7eb['hasNewConfig']?readConfigFile(_0x52f88e):{};for(const [_0x8c19b9,_0x4d6d3b]of Object[_0x5a902e(0x1de)](_0x400bfc)){!(_0x8c19b9 in _0x5b1bda)&&(_0x5b1bda[_0x8c19b9]=_0x4d6d3b);}writeConfigFile(_0x52f88e,_0x5b1bda);const _0x2afbca=_0x21d7eb[_0x5a902e(0x1f4)]+_0x5a902e(0x1ff);return renameSync(_0x21d7eb['oldPath'],_0x2afbca),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x21d7eb[_0x5a902e(0x1f4)]+_0x5a902e(0x1c0)+_0x52f88e+'\x20(backup:\x20'+_0x2afbca+')'};}function execRemoveOldArtifacts(_0x115bf3){const _0x58dbb1=a58_0x45ed,_0x5dd45f=[];for(const _0xdc9fcc of _0x115bf3){try{if(!existsSync(_0xdc9fcc))continue;const _0x2929f1=tryStat(_0xdc9fcc);_0x2929f1?.['isDirectory']()?rmSync(_0xdc9fcc,{'recursive':!![],'force':!![]}):unlinkSync(_0xdc9fcc);}catch(_0xc7ff9b){_0x5dd45f[_0x58dbb1(0x1f1)](_0xdc9fcc+':\x20'+_0xc7ff9b[_0x58dbb1(0x1cf)]);}}return{'step':0x3,'label':_0x58dbb1(0x1a7),'ok':_0x5dd45f[_0x58dbb1(0x1f5)]===0x0,'detail':_0x5dd45f[_0x58dbb1(0x1f5)]>0x0?_0x115bf3[_0x58dbb1(0x1f5)]-_0x5dd45f['length']+'/'+_0x115bf3['length']+_0x58dbb1(0x1a8)+_0x5dd45f[_0x58dbb1(0x1b9)](';\x20')+')':_0x115bf3[_0x58dbb1(0x1f5)]+_0x58dbb1(0x1bd)};}function execCleanMcp(_0x5768c8){const _0xb16f4c=a58_0x45ed;if(!_0x5768c8[_0xb16f4c(0x196)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0xb16f4c(0x1d0)};try{const _0x1b8fbf=readFileSync(_0x5768c8['oldMcpConfig'][_0xb16f4c(0x1be)],_0xb16f4c(0x1d6)),_0x86b54a=JSON['parse'](_0x1b8fbf);if(_0x86b54a?.[_0xb16f4c(0x1cc)]&&typeof _0x86b54a[_0xb16f4c(0x1cc)]===_0xb16f4c(0x1b7)){const _0xbf5c3a=[];for(const [_0x20d3f8,_0xc39e5d]of Object['entries'](_0x86b54a[_0xb16f4c(0x1cc)])){_0xc39e5d?.['args']&&Array[_0xb16f4c(0x1c6)](_0xc39e5d[_0xb16f4c(0x19c)])&&_0xc39e5d[_0xb16f4c(0x19c)][_0xb16f4c(0x1ab)](_0x19dda6=>typeof _0x19dda6===_0xb16f4c(0x195)&&_0x19dda6[_0xb16f4c(0x1c1)](_0xb16f4c(0x197)))&&_0xbf5c3a['push'](_0x20d3f8);}for(const _0x51d157 of _0xbf5c3a){delete _0x86b54a[_0xb16f4c(0x1cc)][_0x51d157];}return _0xbf5c3a[_0xb16f4c(0x1f5)]>0x0&&writeFileSync(_0x5768c8[_0xb16f4c(0x196)][_0xb16f4c(0x1be)],JSON['stringify'](_0x86b54a,null,0x2)+'\x0a',_0xb16f4c(0x1d6)),{'step':0x4,'label':_0xb16f4c(0x1da),'ok':!![],'detail':_0xb16f4c(0x1b6)+_0xbf5c3a[_0xb16f4c(0x1b9)](',\x20')+'\x20from\x20'+_0x5768c8[_0xb16f4c(0x196)][_0xb16f4c(0x1be)]};}return{'step':0x4,'label':_0xb16f4c(0x1da),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x3320d4){return{'step':0x4,'label':_0xb16f4c(0x1da),'ok':![],'detail':_0x3320d4[_0xb16f4c(0x1cf)]};}}function execSkillsRemove(_0x3a977f){const _0x506d96=a58_0x45ed,_0x1d3f77=runNpxSkillsRemove(_0x3a977f,{'stdio':_0x506d96(0x1d2)});return{'step':0x5,'label':_0x506d96(0x1d3),'ok':_0x1d3f77['ok'],'detail':_0x1d3f77['ok']?'lovrabet/lovrabet-skill\x20removed':_0x1d3f77[_0x506d96(0x1e6)]??_0x506d96(0x1f0)+_0x1d3f77[_0x506d96(0x1ea)]};}function execSkillsAdd(_0xcaffc9){const _0x261e60=a58_0x45ed,_0x26c1bc=runNpxSkillsAddGlobal(_0xcaffc9,_0x261e60(0x1fe),{'stdio':'inherit'});return{'step':0x6,'label':'Install\x20new\x20skill','ok':_0x26c1bc['ok'],'detail':_0x26c1bc['ok']?_0x261e60(0x19a):_0x26c1bc[_0x261e60(0x1e6)]??'exit\x20'+_0x26c1bc[_0x261e60(0x1ea)]};}function a58_0x45ed(_0x1a5c92,_0x1dfecd){_0x1a5c92=_0x1a5c92-0x194;const _0xb598c4=a58_0xb598();let _0x45eddf=_0xb598c4[_0x1a5c92];return _0x45eddf;}function tryStat(_0x2bd71d){try{return statSync(_0x2bd71d);}catch{return undefined;}}function printSummary(_0x1aa95c){const _0x569fa5=a58_0x45ed;console['log'](''),console['log'](a58_0x4e1702['bold'](_0x569fa5(0x1ae))),console[_0x569fa5(0x1b8)]('');for(const _0x36a51b of _0x1aa95c){const _0x3f57e1=_0x36a51b['ok']?a58_0x4e1702['green']('OK'):a58_0x4e1702[_0x569fa5(0x1e3)](_0x569fa5(0x1dc));console[_0x569fa5(0x1b8)]('\x20\x20'+_0x3f57e1+_0x569fa5(0x1b1)+_0x36a51b[_0x569fa5(0x1cb)]+':\x20'+_0x36a51b[_0x569fa5(0x1ec)]);if(_0x36a51b[_0x569fa5(0x1a4)])console[_0x569fa5(0x1b8)](_0x569fa5(0x204)+a58_0x4e1702['gray'](_0x36a51b[_0x569fa5(0x1a4)]));}console[_0x569fa5(0x1b8)]('');}export async function upgradeApp(_0x348e5d,_0x249cd5){const _0x225455=a58_0x45ed,_0x12e6c5=process[_0x225455(0x19b)](),_0x13d6bb=analyse(_0x12e6c5),_0x25719a=!_0x13d6bb[_0x225455(0x198)]&&_0x13d6bb['oldArtifacts'][_0x225455(0x1f5)]===0x0&&!_0x13d6bb['oldMcpConfig']&&!_0x13d6bb['needsSkillSwap'];if(_0x25719a){console['log'](a58_0x4e1702[_0x225455(0x1eb)](_0x225455(0x200)));return;}printReport(_0x13d6bb);const _0x47b61a=_0x249cd5[_0x225455(0x194)]||_0x249cd5['Y']||_0x348e5d[_0x225455(0x19f)];if(!_0x47b61a)try{const _0x5e11f1=await askConfirm(_0x225455(0x1b2));if(!_0x5e11f1){console[_0x225455(0x1b8)](a58_0x4e1702['gray']('Upgrade\x20cancelled.'));return;}}catch(_0x1f4a05){if(_0x1f4a05?.['message']===_0x225455(0x1e1)){console[_0x225455(0x1b8)](a58_0x4e1702[_0x225455(0x1df)](_0x225455(0x19d)));return;}throw _0x1f4a05;}const _0x4fb8be=[],_0x5b9975=a58_0x41fa84({'text':'Step\x201/6:\x20Migrating\x20config...','color':_0x225455(0x1a1)})[_0x225455(0x1f9)](),_0x591fdd=execConfigMigration(_0x13d6bb,_0x12e6c5);_0x4fb8be[_0x225455(0x1f1)](_0x591fdd),_0x5b9975[_0x591fdd['ok']?_0x225455(0x1f7):_0x225455(0x1ee)]('Step\x201/6:\x20Config\x20migration\x20—\x20'+(_0x591fdd[_0x225455(0x1a4)]??(_0x591fdd['ok']?_0x225455(0x1c3):_0x225455(0x1aa))));const _0x12c522=resolve(_0x12e6c5,_0x225455(0x1bb)),_0x5f09a8=a58_0x41fa84({'text':_0x225455(0x1bf),'color':'cyan'})[_0x225455(0x1f9)]();if(existsSync(_0x12c522))try{rmSync(_0x12c522,{'recursive':!![],'force':!![]}),_0x5f09a8[_0x225455(0x1f7)](_0x225455(0x1d8)),_0x4fb8be[_0x225455(0x1f1)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![]});}catch(_0x4af1e1){_0x5f09a8['fail'](_0x225455(0x1bc)+_0x4af1e1[_0x225455(0x1cf)]),_0x4fb8be[_0x225455(0x1f1)]({'step':0x2,'label':_0x225455(0x1a5),'ok':![],'detail':_0x4af1e1['message']});}else _0x5f09a8[_0x225455(0x1b5)](_0x225455(0x1f6)),_0x4fb8be[_0x225455(0x1f1)]({'step':0x2,'label':_0x225455(0x1a5),'ok':!![],'detail':_0x225455(0x1d0)});const _0x3038f3=a58_0x41fa84({'text':'Step\x203/6:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':'cyan'})[_0x225455(0x1f9)](),_0x272924=execRemoveOldArtifacts(_0x13d6bb[_0x225455(0x1a0)]);_0x4fb8be[_0x225455(0x1f1)](_0x272924),_0x3038f3[_0x272924['ok']?_0x225455(0x1f7):_0x225455(0x1ee)](_0x225455(0x1db)+(_0x272924[_0x225455(0x1a4)]??(_0x272924['ok']?_0x225455(0x1c3):_0x225455(0x1aa))));const _0x186eaa=a58_0x41fa84({'text':_0x225455(0x1d4),'color':_0x225455(0x1a1)})['start'](),_0x451429=execCleanMcp(_0x13d6bb);_0x4fb8be[_0x225455(0x1f1)](_0x451429),_0x186eaa[_0x451429['ok']?_0x225455(0x1f7):_0x225455(0x1ee)](_0x225455(0x1d5)+(_0x451429[_0x225455(0x1a4)]??(_0x451429['ok']?_0x225455(0x1c3):_0x225455(0x1aa))));const _0x10be82=a58_0x41fa84({'text':_0x225455(0x1af),'color':_0x225455(0x1a1)})['start'](),_0x212e9a=execSkillsRemove(_0x12e6c5);_0x4fb8be[_0x225455(0x1f1)](_0x212e9a),_0x10be82[_0x212e9a['ok']?_0x225455(0x1f7):_0x225455(0x1ee)](_0x225455(0x1c8)+(_0x212e9a[_0x225455(0x1a4)]??(_0x212e9a['ok']?_0x225455(0x1c3):'failed')));const _0x11e3f8=a58_0x41fa84({'text':_0x225455(0x1b3),'color':_0x225455(0x1a1)})['start'](),_0x2f313e=execSkillsAdd(_0x12e6c5);_0x4fb8be[_0x225455(0x1f1)](_0x2f313e),_0x11e3f8[_0x2f313e['ok']?_0x225455(0x1f7):_0x225455(0x1ee)](_0x225455(0x1fa)+(_0x2f313e['detail']??(_0x2f313e['ok']?_0x225455(0x1c3):_0x225455(0x1aa)))),printSummary(_0x4fb8be);const _0x2038ef=_0x4fb8be['some'](_0x15b4f0=>!_0x15b4f0['ok']);_0x2038ef?console[_0x225455(0x1b8)](a58_0x4e1702[_0x225455(0x1e2)]('Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.')):console[_0x225455(0x1b8)](a58_0x4e1702[_0x225455(0x1eb)](_0x225455(0x1f8)));}export const upgradeCommand={'name':a58_0x4a89a(0x1b4),'description':a58_0x4a89a(0x1dd),async 'run'(_0x1bc744,_0x3070a1,_0x2347be){await upgradeApp(_0x1bc744,_0x2347be);}};
1
+ const a59_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 +1 @@
1
- const a59_0x74bd7f=a59_0x19d2;(function(_0x5f51ba,_0x3f22f3){const _0x243912=a59_0x19d2,_0xabee1f=_0x5f51ba();while(!![]){try{const _0x271cc7=-parseInt(_0x243912(0x1d1))/0x1+parseInt(_0x243912(0x20f))/0x2+-parseInt(_0x243912(0x20e))/0x3+-parseInt(_0x243912(0x1f8))/0x4+-parseInt(_0x243912(0x1e8))/0x5+-parseInt(_0x243912(0x204))/0x6+parseInt(_0x243912(0x20c))/0x7*(parseInt(_0x243912(0x1f3))/0x8);if(_0x271cc7===_0x3f22f3)break;else _0xabee1f['push'](_0xabee1f['shift']());}catch(_0x39c837){_0xabee1f['push'](_0xabee1f['shift']());}}}(a59_0x1221,0xd00c2));import{initCommand}from'./init.js';import{createCommand}from'./create.js';import{upgradeCommand}from'./project-upgrade.js';import{runCommand}from'./run.js';import{authCommand}from'./auth.js';import{logoutCommand}from'./logout.js';import{configCommand}from'./config.js';function a59_0x1221(){const _0x38475b=['Set\x20config\x20value\x20(key\x20value)','Clear\x20command\x20history\x20logs','risk','install','Get\x20config\x20value\x20(key)','Menu','upgrade','remove','run','project','SQL\x20Queries','Switch\x20the\x20default\x20app','list','Update\x20rabetbase\x20CLI\x20to\x20the\x20latest\x20version','use','Run\x20Scripts','Project','6028310wALoeh','set','Clear\x20login\x20session','has','Initialize\x20.rabetbase.json\x20config','start','config','push','Upgrade\x20from\x20lovrabet-cli\x20to\x20rabetbase-cli','doctor','map','53132328OnbPvR','App\x20Management','View\x20command\x20history\x20logs','app','preview','6467232uKoBEn','Configure\x20MCP\x20server\x20for\x20AI\x20tools','Authentication','service','add','Add\x20an\x20app\x20to\x20config','from','logout','Logs','skill','auth','Diagnostics','1237686jTPdRD','build','check','clear','Install\x20developer\x20skill\x20package','Remove\x20an\x20app\x20from\x20config','defaultCommand','Dataset\x20&\x20Operations','7lgrVWF','\x20\x20[write]','4436133ScpINP','680352LXhraC','<script>','description','Self\x20Update','Run\x20any\x20package.json\x20script','BFF\x20Scripts','command','passCommandAsArg','wildcardModule','mcp','create','get','module','1622093YyqeFt','Skills','MCP\x20(AI\x20Tools)','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','Login\x20via\x20browser','show'];a59_0x1221=function(){return _0x38475b;};return a59_0x1221();}import{mcpCommand}from'./mcp.js';import{skillCommand}from'./skill.js';function a59_0x19d2(_0x524aaf,_0x1e11cc){_0x524aaf=_0x524aaf-0x1c7;const _0x1221bc=a59_0x1221();let _0x19d254=_0x1221bc[_0x524aaf];return _0x19d254;}import{logsCommand}from'./logs.js';import{appCommand}from'./app.js';import{updateCommand}from'./cli-update.js';import{doctorCommand}from'./doctor.js';import{apiDefinitions}from'./api/index.js';import{bffDefinitions}from'./bff/index.js';import{sqlDefinitions}from'./sql/index.js';import{datasetDefinitions}from'./dataset/index.js';import{codegenDefinitions}from'./codegen/index.js';import{menuDefinitions}from'./menu/index.js';export const serviceRegistry=[];const serviceByName=new Map(),legacyHandlers=new Map();export const definitions=new Map();export const serviceGroups=new Map();function registerDefinitions(_0x351805){const _0x13b52f=a59_0x19d2;for(const _0x442625 of _0x351805){definitions['set'](_0x442625[_0x13b52f(0x1fb)]+':'+_0x442625[_0x13b52f(0x1ca)],_0x442625);let _0x7c4522=serviceGroups[_0x13b52f(0x1cf)](_0x442625[_0x13b52f(0x1fb)]);!_0x7c4522&&(_0x7c4522=[],serviceGroups[_0x13b52f(0x1e9)](_0x442625[_0x13b52f(0x1fb)],_0x7c4522)),_0x7c4522[_0x13b52f(0x1ef)](_0x442625);}}function registerDeclarativeService(_0x50e4f2,_0x3de652){const _0xcf223d=a59_0x19d2;registerDefinitions(_0x3de652);const _0x28e2ce=_0x2c6d1d=>_0x2c6d1d==='read'?'':_0x2c6d1d==='write'?_0xcf223d(0x20d):'\x20\x20[high-risk-write]',_0x307a43={'service':_0x3de652[0x0][_0xcf223d(0x1fb)],'label':_0x50e4f2,'commands':_0x3de652[_0xcf223d(0x1f2)](_0x4d18e3=>({'command':_0x4d18e3[_0xcf223d(0x1ca)],'description':_0x4d18e3['description'],'tag':_0x28e2ce(_0x4d18e3[_0xcf223d(0x1d9)])})),'declarative':!![]};serviceRegistry[_0xcf223d(0x1ef)](_0x307a43),serviceByName['set'](_0x307a43[_0xcf223d(0x1fb)],_0x307a43);}function registerLegacyService(_0xdc5e45,_0x5ef118,_0xcb9c34,_0x273161){const _0x35d680=a59_0x19d2,_0x33fdd6={'service':_0xdc5e45,'label':_0x5ef118,'commands':_0xcb9c34[_0x35d680(0x1f2)](_0x5a7ee0=>({'command':_0x5a7ee0[_0x35d680(0x1ca)],'description':_0x5a7ee0[_0x35d680(0x211)],'tag':''})),'declarative':![],'defaultCommand':_0x273161?.[_0x35d680(0x20a)],'wildcardModule':_0x273161?.[_0x35d680(0x1cc)]};serviceRegistry[_0x35d680(0x1ef)](_0x33fdd6),serviceByName[_0x35d680(0x1e9)](_0xdc5e45,_0x33fdd6);for(const _0x368c8c of _0xcb9c34){legacyHandlers['set'](_0xdc5e45+':'+_0x368c8c['command'],{'module':_0x368c8c[_0x35d680(0x1d0)],'passCommandAsArg':_0x368c8c[_0x35d680(0x1cb)]});}}registerLegacyService('project',a59_0x74bd7f(0x1e7),[{'command':'init','description':a59_0x74bd7f(0x1ec),'module':initCommand},{'command':'create','description':'Create\x20a\x20new\x20project','module':createCommand},{'command':a59_0x74bd7f(0x1dd),'description':a59_0x74bd7f(0x1f0),'module':upgradeCommand}]),registerLegacyService(a59_0x74bd7f(0x1f6),a59_0x74bd7f(0x1f4),[{'command':'list','description':'List\x20all\x20configured\x20apps','module':appCommand,'passCommandAsArg':!![]},{'command':a59_0x74bd7f(0x1e5),'description':a59_0x74bd7f(0x1e2),'module':appCommand,'passCommandAsArg':!![]},{'command':a59_0x74bd7f(0x1fc),'description':a59_0x74bd7f(0x1fd),'module':appCommand,'passCommandAsArg':!![]},{'command':a59_0x74bd7f(0x1de),'description':a59_0x74bd7f(0x209),'module':appCommand,'passCommandAsArg':!![]}],{'defaultCommand':a59_0x74bd7f(0x1e3)}),registerLegacyService(a59_0x74bd7f(0x1df),a59_0x74bd7f(0x1e6),[{'command':a59_0x74bd7f(0x210),'description':a59_0x74bd7f(0x1c8),'module':runCommand}],{'wildcardModule':runCommand}),registerLegacyService('auth',a59_0x74bd7f(0x1fa),[{'command':'login','description':a59_0x74bd7f(0x1d5),'module':authCommand},{'command':a59_0x74bd7f(0x1ff),'description':a59_0x74bd7f(0x1ea),'module':logoutCommand}],{'defaultCommand':'login'}),registerLegacyService('update',a59_0x74bd7f(0x1c7),[{'command':a59_0x74bd7f(0x1df),'description':a59_0x74bd7f(0x1e4),'module':updateCommand}],{'defaultCommand':a59_0x74bd7f(0x1df)}),registerLegacyService(a59_0x74bd7f(0x1f1),a59_0x74bd7f(0x203),[{'command':a59_0x74bd7f(0x206),'description':a59_0x74bd7f(0x1d4),'module':doctorCommand}],{'defaultCommand':a59_0x74bd7f(0x206)}),registerLegacyService(a59_0x74bd7f(0x1ee),'Configuration',[{'command':a59_0x74bd7f(0x1e9),'description':a59_0x74bd7f(0x1d7),'module':configCommand,'passCommandAsArg':!![]},{'command':'get','description':a59_0x74bd7f(0x1db),'module':configCommand,'passCommandAsArg':!![]},{'command':a59_0x74bd7f(0x1e3),'description':'List\x20all\x20config\x20values','module':configCommand,'passCommandAsArg':!![]}]),registerDeclarativeService('API',apiDefinitions),registerDeclarativeService(a59_0x74bd7f(0x1dc),menuDefinitions),registerDeclarativeService(a59_0x74bd7f(0x20b),datasetDefinitions),registerDeclarativeService(a59_0x74bd7f(0x1c9),bffDefinitions),registerDeclarativeService(a59_0x74bd7f(0x1e1),sqlDefinitions),registerDeclarativeService('Code\x20Generation',codegenDefinitions),registerLegacyService(a59_0x74bd7f(0x1cd),a59_0x74bd7f(0x1d3),[{'command':'install','description':a59_0x74bd7f(0x1f9),'module':mcpCommand,'passCommandAsArg':!![]}]),registerLegacyService(a59_0x74bd7f(0x201),a59_0x74bd7f(0x1d2),[{'command':a59_0x74bd7f(0x1da),'description':a59_0x74bd7f(0x208),'module':skillCommand,'passCommandAsArg':!![]}]),registerLegacyService('logs',a59_0x74bd7f(0x200),[{'command':a59_0x74bd7f(0x1d6),'description':a59_0x74bd7f(0x1f5),'module':logsCommand},{'command':a59_0x74bd7f(0x207),'description':a59_0x74bd7f(0x1d8),'module':logsCommand,'passCommandAsArg':!![]}],{'defaultCommand':a59_0x74bd7f(0x1d6)});export const deprecatedAliases={'init':{'service':a59_0x74bd7f(0x1e0),'command':'init'},'create':{'service':a59_0x74bd7f(0x1e0),'command':a59_0x74bd7f(0x1ce)},'start':{'service':a59_0x74bd7f(0x1df),'command':a59_0x74bd7f(0x1ed)},'build':{'service':a59_0x74bd7f(0x1df),'command':a59_0x74bd7f(0x205)},'preview':{'service':a59_0x74bd7f(0x1df),'command':a59_0x74bd7f(0x1f7)},'logout':{'service':a59_0x74bd7f(0x202),'command':'logout'},'skills':{'service':'skill','command':a59_0x74bd7f(0x1da)}};export function findDefinition(_0x701a42,_0x3610af){const _0x4389ba=a59_0x74bd7f;return definitions[_0x4389ba(0x1cf)](_0x701a42+':'+_0x3610af);}export function isKnownService(_0x314d5c){const _0x4f4718=a59_0x74bd7f;return serviceByName[_0x4f4718(0x1eb)](_0x314d5c);}export function isDeclarativeService(_0x33a021){return serviceGroups['has'](_0x33a021);}export function getServiceEntry(_0x16af51){return serviceByName['get'](_0x16af51);}export function getLegacyHandler(_0x3c3b8a,_0x2896c2){const _0x4cae22=a59_0x74bd7f;return legacyHandlers[_0x4cae22(0x1cf)](_0x3c3b8a+':'+_0x2896c2);}export function getAllDefinitions(){const _0x145829=a59_0x74bd7f;return Array[_0x145829(0x1fe)](definitions['values']());}
1
+ 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 +1 @@
1
- function a60_0x521f(){const _0x24c952=['.bin','(none)','pnpm','yarn.lock','--watch','bun','bun.lock','33eHLxgp','dev','3288XtaJLP','\x0a\x20\x20Available\x20scripts:\x0a','916095mfQKpH','parse','Run\x20a\x20package.json\x20script','package.json','inherit','env','preview\x20--watch\x20mode:\x20vite\x20build\x20--watch\x20+\x20vite\x20preview','6562yHZUZD','run','has','logger','preview','slice','vite','Error:\x20No\x20package.json\x20found\x20in\x20current\x20directory.','entries','needsUpgrade','pnpm-lock.yaml','build','No\x20scripts\x20defined\x20in\x20package.json.','node_modules','704200IzOvzJ','scripts','start','\x20exited\x20with\x20code\x20','log','keys','cwd','\x20\x20Available:\x20','PATH','9481887tAossU','3388NKOgLp','length','error','\x22\x20not\x20found\x20in\x20package.json.\x0a','\x20run\x20','info','vite\x20build\x20--watch\x20exited\x20with\x20code\x20','1845940LmTMRv','utf-8','2892568rIesyt','npm','padEnd','all','exit','close','join'];a60_0x521f=function(){return _0x24c952;};return a60_0x521f();}const a60_0x793158=a60_0x5507;(function(_0x51a2d7,_0x1f8b55){const _0x3588ec=a60_0x5507,_0x47d1da=_0x51a2d7();while(!![]){try{const _0x5bf588=parseInt(_0x3588ec(0x1d4))/0x1*(-parseInt(_0x3588ec(0x1df))/0x2)+-parseInt(_0x3588ec(0x1d8))/0x3+-parseInt(_0x3588ec(0x1b3))/0x4+parseInt(_0x3588ec(0x1c4))/0x5+parseInt(_0x3588ec(0x1d6))/0x6*(-parseInt(_0x3588ec(0x1bd))/0x7)+-parseInt(_0x3588ec(0x1c6))/0x8+parseInt(_0x3588ec(0x1bc))/0x9;if(_0x5bf588===_0x1f8b55)break;else _0x47d1da['push'](_0x47d1da['shift']());}catch(_0x348cc0){_0x47d1da['push'](_0x47d1da['shift']());}}}(a60_0x521f,0x325a0));import{readFileSync,existsSync}from'node:fs';import{resolve,delimiter,join}from'node:path';function a60_0x5507(_0x2ee634,_0x3c1a34){_0x2ee634=_0x2ee634-0x1a7;const _0x521fc6=a60_0x521f();let _0x5507bc=_0x521fc6[_0x2ee634];return _0x5507bc;}import{spawn}from'node:child_process';import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';const VERSION_CHECK_SCRIPTS=new Set([a60_0x793158(0x1b5),a60_0x793158(0x1d5)]);function readPackageScripts(_0x58c385){const _0x29ebc6=a60_0x793158,_0x4bf79c=resolve(_0x58c385,_0x29ebc6(0x1db));if(!existsSync(_0x4bf79c))return null;try{const _0x35fe56=JSON[_0x29ebc6(0x1d9)](readFileSync(_0x4bf79c,_0x29ebc6(0x1c5)));return _0x35fe56[_0x29ebc6(0x1b4)]??{};}catch{return null;}}function detectPackageManager(_0x24786a){const _0x1a82bf=a60_0x793158;if(existsSync(resolve(_0x24786a,'bun.lockb'))||existsSync(resolve(_0x24786a,_0x1a82bf(0x1d3))))return _0x1a82bf(0x1d2);if(existsSync(resolve(_0x24786a,_0x1a82bf(0x1af))))return _0x1a82bf(0x1cf);if(existsSync(resolve(_0x24786a,_0x1a82bf(0x1d0))))return'yarn';return _0x1a82bf(0x1c7);}async function versionCheck(_0x36814d){const _0x5d7c8c=a60_0x793158,_0x277580=await checkCliVersion();if(_0x277580[_0x5d7c8c(0x1ae)])printCliUpgradeWarning(_0x277580);const _0x7a6476=await checkSdkVersion(_0x36814d);if(_0x7a6476[_0x5d7c8c(0x1ae)])printSdkUpgradeWarning(_0x7a6476);}function spawnScript(_0x43a696,_0x228435,_0x15a6a9,_0x23e4a4){return new Promise((_0x1db5a1,_0x1d05af)=>{const _0x244efa=a60_0x5507,_0x46cf30=[_0x244efa(0x1e0),_0x228435,..._0x15a6a9],_0x7b0871=spawn(_0x43a696,_0x46cf30,{'cwd':_0x23e4a4,'stdio':_0x244efa(0x1dc),'shell':!![],'env':{...process[_0x244efa(0x1dd)],'PATH':''+join(_0x23e4a4,_0x244efa(0x1b2),_0x244efa(0x1cd))+delimiter+process['env'][_0x244efa(0x1bb)]}});_0x7b0871['on'](_0x244efa(0x1cb),_0x55f2b6=>{const _0x42a49e=_0x244efa;if(_0x55f2b6===0x0||_0x55f2b6===null)_0x1db5a1();else _0x1d05af(new Error(_0x43a696+_0x42a49e(0x1c1)+_0x228435+_0x42a49e(0x1b6)+_0x55f2b6));}),_0x7b0871['on'](_0x244efa(0x1bf),_0x1d05af);});}function spawnViteBuildWatch(_0x533ac4){return new Promise((_0xafda8d,_0x40b60b)=>{const _0x59facb=a60_0x5507,_0xeefb5d=spawn(_0x59facb(0x1ab),[_0x59facb(0x1b0),_0x59facb(0x1d1)],{'cwd':_0x533ac4,'stdio':_0x59facb(0x1dc),'shell':!![],'env':{...process['env'],'PATH':''+join(_0x533ac4,'node_modules',_0x59facb(0x1cd))+delimiter+process[_0x59facb(0x1dd)][_0x59facb(0x1bb)]}});_0xeefb5d['on'](_0x59facb(0x1cb),_0x54a7fb=>{const _0x978020=_0x59facb;if(_0x54a7fb===0x0||_0x54a7fb===null)_0xafda8d();else _0x40b60b(new Error(_0x978020(0x1c3)+_0x54a7fb));}),_0xeefb5d['on'](_0x59facb(0x1bf),_0x40b60b);});}function spawnVitePreview(_0x54d2e6){return new Promise((_0x555efc,_0x4eb6c4)=>{const _0x5f3256=a60_0x5507,_0x55f376=spawn(_0x5f3256(0x1ab),[_0x5f3256(0x1a9)],{'cwd':_0x54d2e6,'stdio':_0x5f3256(0x1dc),'shell':!![],'env':{...process[_0x5f3256(0x1dd)],'PATH':''+join(_0x54d2e6,_0x5f3256(0x1b2),_0x5f3256(0x1cd))+delimiter+process[_0x5f3256(0x1dd)][_0x5f3256(0x1bb)]}});_0x55f376['on']('close',_0x9df147=>{if(_0x9df147===0x0||_0x9df147===null)_0x555efc();else _0x4eb6c4(new Error('vite\x20preview\x20exited\x20with\x20code\x20'+_0x9df147));}),_0x55f376['on'](_0x5f3256(0x1bf),_0x4eb6c4);});}export const runCommand={'name':a60_0x793158(0x1e0),'description':a60_0x793158(0x1da),async 'run'(_0x231c77,_0x4378e4,_0x572bd9){const _0x60c0b3=a60_0x793158,_0x23e286=process[_0x60c0b3(0x1b9)](),_0x4714c2=_0x4378e4[0x0],_0x3dacbc=_0x4378e4[_0x60c0b3(0x1aa)](0x1),_0x65a820=readPackageScripts(_0x23e286);!_0x65a820&&(console['error'](_0x60c0b3(0x1ac)),process[_0x60c0b3(0x1ca)](0x1));if(!_0x4714c2){const _0x384f2c=Object[_0x60c0b3(0x1b8)](_0x65a820);if(_0x384f2c[_0x60c0b3(0x1be)]===0x0)console[_0x60c0b3(0x1b7)](_0x60c0b3(0x1b1));else{console[_0x60c0b3(0x1b7)](_0x60c0b3(0x1d7));const _0x3cb8b7=Math['max'](..._0x384f2c['map'](_0x201c24=>_0x201c24[_0x60c0b3(0x1be)]));for(const [_0x1ca4da,_0x39e5e1]of Object[_0x60c0b3(0x1ad)](_0x65a820)){console['log']('\x20\x20\x20\x20'+_0x1ca4da[_0x60c0b3(0x1c8)](_0x3cb8b7+0x2)+_0x39e5e1);}console[_0x60c0b3(0x1b7)]('\x0a\x20\x20Usage:\x20rabetbase\x20run\x20<script>\x0a');}return;}!_0x65a820[_0x4714c2]&&(console['error']('Error:\x20Script\x20\x22'+_0x4714c2+_0x60c0b3(0x1c0)+(_0x60c0b3(0x1ba)+(Object[_0x60c0b3(0x1b8)](_0x65a820)[_0x60c0b3(0x1cc)](',\x20')||_0x60c0b3(0x1ce)))),process[_0x60c0b3(0x1ca)](0x1));const _0x21b5a7=detectPackageManager(_0x23e286);VERSION_CHECK_SCRIPTS[_0x60c0b3(0x1a7)](_0x4714c2)&&await versionCheck(_0x23e286);if(_0x4714c2==='preview'&&_0x572bd9['watch']){_0x231c77[_0x60c0b3(0x1a8)][_0x60c0b3(0x1c2)]('run',_0x60c0b3(0x1de)),await Promise[_0x60c0b3(0x1c9)]([spawnViteBuildWatch(_0x23e286),spawnVitePreview(_0x23e286)]);return;}_0x231c77[_0x60c0b3(0x1a8)]['info'](_0x60c0b3(0x1e0),_0x21b5a7+_0x60c0b3(0x1c1)+_0x4714c2+(_0x3dacbc[_0x60c0b3(0x1be)]?'\x20'+_0x3dacbc['join']('\x20'):'')),await spawnScript(_0x21b5a7,_0x4714c2,_0x3dacbc,_0x23e286);}};
1
+ const a61_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();}