@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
- const a0_0x5390f5=a0_0x1914;(function(_0x14cf79,_0x284f3f){const _0x41aa65=a0_0x1914,_0x687f73=_0x14cf79();while(!![]){try{const _0x50d4d0=-parseInt(_0x41aa65(0x144))/0x1+parseInt(_0x41aa65(0x150))/0x2+parseInt(_0x41aa65(0x121))/0x3+-parseInt(_0x41aa65(0x134))/0x4*(-parseInt(_0x41aa65(0x130))/0x5)+-parseInt(_0x41aa65(0x12e))/0x6+-parseInt(_0x41aa65(0x13d))/0x7*(-parseInt(_0x41aa65(0x14d))/0x8)+-parseInt(_0x41aa65(0x125))/0x9*(-parseInt(_0x41aa65(0x14c))/0xa);if(_0x50d4d0===_0x284f3f)break;else _0x687f73['push'](_0x687f73['shift']());}catch(_0x84a8b7){_0x687f73['push'](_0x687f73['shift']());}}}(a0_0x2a19,0xcee6f));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join}from'node:path';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a0_0x1914(_0x2d2737,_0x4047a2){_0x2d2737=_0x2d2737-0x118;const _0x2a19d7=a0_0x2a19();let _0x191404=_0x2a19d7[_0x2d2737];return _0x191404;}import{copyRulesToAgentsMd,copyRulesToCursor}from'../utils/rules-cdn.js';import{normalizeEnv}from'../constant/env.js';const MCP_SERVER_NAME=a0_0x5390f5(0x148),MCP_COMMAND=a0_0x5390f5(0x13e),MCP_ARGS=['@lovrabet/dataset-mcp-server@latest'];function a0_0x2a19(){const _0x5b82=['Cursor\x20MCP\x20configured\x20successfully','Claude\x20Code\x20MCP\x20command\x20generated','Please\x20run:\x20','claude\x20mcp\x20add\x20','log','mcp.json','2600457FJIGTU','Configuration\x20guide\x20displayed','\x20\x20}','.cursor','9WbpZhz','\x20-e\x20RABETBASE_ENV=','app','\x20\x20\x20\x20\x20\x20\x20\x20\x22RABETBASE_ENV\x22:\x20\x22','Other','\x20\x20\x20\x20\x22','production','join','message','4234644kWcFem','\x20\x20\x20\x20\x20\x20\x20\x20\x22RABETBASE_APP_CODE\x22:\x20\x22','4220WAhJsD','\x20-e\x20RABETBASE_APP_CODE=','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[','\x20\x20\x22mcpServers\x22:\x20{','1772qkXvEQ','Appcode\x20must\x20be\x20configured\x20first','utf-8','Configuration:','appcode','Claude\x20Code','Cursor','\x20\x20Restart\x20Claude\x20Code\x20to\x20take\x20effect\x0a','info','2513aOUFPD','npx','mcpServers','success','RABETBASE_ENV','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','cursor','1500171JMcxcD','\x22:\x20{','mcp-install','map','lovrabet-dataset','Written\x20.cursor/mcp.json','cwd','env','16800Dpkicx','32552ZfRFqc','error','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22','700508etvFND','\x20\x20AppCode:\x20','Unsupported\x20MCP\x20IDE:\x20','manual','\x20\x20\x20\x20\x20\x20}'];a0_0x2a19=function(){return _0x5b82;};return a0_0x2a19();}export function buildEnvConfig(_0x57f14,_0x1796a5){const _0x9a00a2=a0_0x5390f5,_0x1daf25={'RABETBASE_APP_CODE':String(_0x57f14)};return _0x1796a5!==_0x9a00a2(0x12b)&&(_0x1daf25[_0x9a00a2(0x141)]=String(_0x1796a5)),_0x1daf25;}export async function configureCursorMcp(_0xee40a6){const _0x399087=a0_0x5390f5,_0x55ef34=_0xee40a6||process[_0x399087(0x14a)](),_0x2bf054=readConfig(_0x55ef34),_0x4e127e=_0x2bf054[_0x399087(0x138)]||_0x2bf054['app'],_0x125d7b=normalizeEnv(_0x2bf054[_0x399087(0x14b)]||'production');if(!_0x4e127e)return{'ide':_0x399087(0x13a),'status':_0x399087(0x14e),'message':'Appcode\x20must\x20be\x20configured\x20first'};const _0x4bedc2=buildEnvConfig(_0x4e127e,_0x125d7b),_0x502327={'command':MCP_COMMAND,'args':MCP_ARGS,'env':_0x4bedc2},_0x4314a0=join(_0x55ef34,_0x399087(0x124),_0x399087(0x120)),_0x4668c9=join(_0x55ef34,'.cursor');try{!existsSync(_0x4668c9)&&mkdirSync(_0x4668c9,{'recursive':!![]});let _0x3e07b6={'mcpServers':{}};if(existsSync(_0x4314a0)){const _0xe0a7c1=readFileSync(_0x4314a0,_0x399087(0x136));_0x3e07b6=JSON['parse'](_0xe0a7c1);}return(!_0x3e07b6[_0x399087(0x13f)]||typeof _0x3e07b6['mcpServers']!=='object')&&(_0x3e07b6[_0x399087(0x13f)]={}),_0x3e07b6[_0x399087(0x13f)][MCP_SERVER_NAME]=_0x502327,writeFileSync(_0x4314a0,JSON['stringify'](_0x3e07b6,null,0x2),_0x399087(0x136)),logger[_0x399087(0x13c)](_0x399087(0x146),_0x399087(0x11b),{'appcode':_0x4e127e,'env':_0x125d7b,'path':_0x4314a0}),await copyRulesToCursor(_0x55ef34),{'ide':_0x399087(0x13a),'status':_0x399087(0x140),'message':_0x399087(0x149)};}catch(_0x39a17a){return logger[_0x399087(0x14e)](_0x399087(0x146),'Cursor\x20MCP\x20configuration\x20failed',{'error':_0x39a17a instanceof Error?_0x39a17a['message']:String(_0x39a17a)}),{'ide':_0x399087(0x13a),'status':_0x399087(0x14e),'message':_0x39a17a instanceof Error?_0x39a17a[_0x399087(0x12d)]:String(_0x39a17a)};}}export async function configureClaudeMcp(_0x31d1fa){const _0x1339d5=a0_0x5390f5,_0x145e9f=_0x31d1fa||process[_0x1339d5(0x14a)](),_0x37abe5=readConfig(_0x145e9f),_0x3fbfb4=_0x37abe5['appcode']||_0x37abe5[_0x1339d5(0x127)],_0xad94bd=normalizeEnv(_0x37abe5[_0x1339d5(0x14b)]||_0x1339d5(0x12b));if(!_0x3fbfb4)return{'ide':_0x1339d5(0x139),'status':_0x1339d5(0x14e),'message':_0x1339d5(0x135)};let _0x158dc9=_0x1339d5(0x11e)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x1339d5(0x12c)]('\x20')+_0x1339d5(0x131)+_0x3fbfb4;return _0xad94bd!==_0x1339d5(0x12b)&&(_0x158dc9+=_0x1339d5(0x126)+_0xad94bd),await copyRulesToAgentsMd(_0x145e9f),logger['info'](_0x1339d5(0x146),_0x1339d5(0x11c),{'command':_0x158dc9,'appcode':_0x3fbfb4,'env':_0xad94bd}),console[_0x1339d5(0x11f)]('\x0a📋\x20Run\x20the\x20following\x20command\x20to\x20configure\x20Claude\x20Code\x20MCP:\x0a'),console[_0x1339d5(0x11f)]('\x20\x20'+_0x158dc9+'\x0a'),console[_0x1339d5(0x11f)](_0x1339d5(0x137)),console[_0x1339d5(0x11f)](_0x1339d5(0x151)+_0x3fbfb4),_0xad94bd!==_0x1339d5(0x12b)&&console['log']('\x20\x20Environment:\x20'+_0xad94bd),console[_0x1339d5(0x11f)](_0x1339d5(0x13b)),{'ide':_0x1339d5(0x139),'status':_0x1339d5(0x119),'message':_0x1339d5(0x11d)+_0x158dc9};}export async function showOtherGuide(_0x1ae9d5){const _0x365c95=a0_0x5390f5,_0x2e8d31=_0x1ae9d5||process['cwd'](),_0x51b19c=readConfig(_0x2e8d31),_0xf64313=_0x51b19c[_0x365c95(0x138)]||_0x51b19c[_0x365c95(0x127)],_0x3b2e40=normalizeEnv(_0x51b19c[_0x365c95(0x14b)]||_0x365c95(0x12b));if(!_0xf64313)return{'ide':_0x365c95(0x129),'status':_0x365c95(0x14e),'message':'Appcode\x20must\x20be\x20configured\x20first'};return console[_0x365c95(0x11f)]('\x0a📋\x20Other\x20IDE\x20MCP\x20configuration:\x0a'),console[_0x365c95(0x11f)]('{'),console['log'](_0x365c95(0x133)),console[_0x365c95(0x11f)](_0x365c95(0x12a)+MCP_SERVER_NAME+_0x365c95(0x145)),console[_0x365c95(0x11f)](_0x365c95(0x14f)+MCP_COMMAND+'\x22,'),console[_0x365c95(0x11f)](_0x365c95(0x132)+MCP_ARGS[_0x365c95(0x147)](_0x24d579=>'\x22'+_0x24d579+'\x22')[_0x365c95(0x12c)](',\x20')+'],'),console['log'](_0x365c95(0x142)),console['log'](_0x365c95(0x12f)+_0xf64313+'\x22,'),_0x3b2e40!==_0x365c95(0x12b)&&console[_0x365c95(0x11f)](_0x365c95(0x128)+_0x3b2e40+'\x22,'),console[_0x365c95(0x11f)](_0x365c95(0x11a)),console[_0x365c95(0x11f)]('\x20\x20\x20\x20}'),console['log'](_0x365c95(0x123)),console[_0x365c95(0x11f)]('}\x0a'),logger[_0x365c95(0x13c)](_0x365c95(0x146),_0x365c95(0x122),{'appcode':_0xf64313,'env':_0x3b2e40}),{'ide':_0x365c95(0x129),'status':_0x365c95(0x119),'message':_0x365c95(0x122)};}export async function configureMcp(_0x2b8ea9,_0x1f7b90){const _0x589da8=a0_0x5390f5;switch(_0x2b8ea9){case _0x589da8(0x143):return await configureCursorMcp(_0x1f7b90);case'claude':return await configureClaudeMcp(_0x1f7b90);default:throw new Error(_0x589da8(0x118)+_0x2b8ea9);}}
1
+ function a0_0x1de0(){const _0x41e093=['lovrabet-dataset','Configuration:','info','2724wjMnpq','parse','36266725LWrZBB','error','message','utf-8','Please\x20run:\x20','\x0a📋\x20Other\x20IDE\x20MCP\x20configuration:\x0a','log','Other','env','Unsupported\x20MCP\x20IDE:\x20','@lovrabet/dataset-mcp-server@latest','RABETBASE_ENV','production','44274jxGoWR','Cursor\x20MCP\x20configuration\x20failed','Cursor\x20MCP\x20configured\x20successfully','claude\x20mcp\x20add\x20','Written\x20.cursor/mcp.json','\x20\x20\x20\x20\x22','npx','\x20\x20\x20\x20\x20\x20\x20\x20\x22RABETBASE_APP_CODE\x22:\x20\x22','cursor','Claude\x20Code','461853xObiDF','manual','92TuyeEr','mcpServers','appcode','40yzTQBW','claude','cwd','app','\x20\x20Restart\x20Claude\x20Code\x20to\x20take\x20effect\x0a','Cursor','Configuration\x20guide\x20displayed','\x20\x20\x20\x20\x20\x20\x20\x20\x22RABETBASE_ENV\x22:\x20\x22','Claude\x20Code\x20MCP\x20command\x20generated','\x20\x20AppCode:\x20','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[','mcp-install','Appcode\x20must\x20be\x20configured\x20first','.cursor','\x20-e\x20RABETBASE_ENV=','success','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22','join','9471lTrpkr','mcp.json','102440GhCHPI','\x20\x20}','stringify','73941czHGWL','\x0a📋\x20Run\x20the\x20following\x20command\x20to\x20configure\x20Claude\x20Code\x20MCP:\x0a','\x20\x20\x20\x20\x20\x20}','\x20\x20Environment:\x20','4711760jsBgJL','39qJTwyM'];a0_0x1de0=function(){return _0x41e093;};return a0_0x1de0();}const a0_0x3d791f=a0_0x4318;(function(_0x1fe1d7,_0x5e91a6){const _0x2cc95a=a0_0x4318,_0x3be439=_0x1fe1d7();while(!![]){try{const _0x11fc89=-parseInt(_0x2cc95a(0xfe))/0x1*(parseInt(_0x2cc95a(0xd3))/0x2)+parseInt(_0x2cc95a(0xf9))/0x3*(-parseInt(_0x2cc95a(0xdf))/0x4)+parseInt(_0x2cc95a(0xf6))/0x5+-parseInt(_0x2cc95a(0xc4))/0x6*(parseInt(_0x2cc95a(0xf4))/0x7)+-parseInt(_0x2cc95a(0xfd))/0x8+parseInt(_0x2cc95a(0xdd))/0x9*(parseInt(_0x2cc95a(0xe2))/0xa)+parseInt(_0x2cc95a(0xc6))/0xb;if(_0x11fc89===_0x5e91a6)break;else _0x3be439['push'](_0x3be439['shift']());}catch(_0x1f8679){_0x3be439['push'](_0x3be439['shift']());}}}(a0_0x1de0,0xd91bb));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join}from'node:path';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a0_0x4318(_0x30447b,_0x2744fa){_0x30447b=_0x30447b-0xc4;const _0x1de027=a0_0x1de0();let _0x43189d=_0x1de027[_0x30447b];return _0x43189d;}import{copyRulesToAgentsMd,copyRulesToCursor}from'../utils/rules-cdn.js';import{normalizeEnv}from'../constant/env.js';const MCP_SERVER_NAME=a0_0x3d791f(0xff),MCP_COMMAND=a0_0x3d791f(0xd9),MCP_ARGS=[a0_0x3d791f(0xd0)];export function buildEnvConfig(_0xc816d9,_0x33d2f2){const _0x200cdf=a0_0x3d791f,_0x55859d={'RABETBASE_APP_CODE':String(_0xc816d9)};return _0x33d2f2!=='production'&&(_0x55859d[_0x200cdf(0xd1)]=String(_0x33d2f2)),_0x55859d;}export async function configureCursorMcp(_0x8f6cb){const _0x58ef85=a0_0x3d791f,_0x2db061=_0x8f6cb||process[_0x58ef85(0xe4)](),_0x2168b0=readConfig(_0x2db061),_0x747a91=_0x2168b0[_0x58ef85(0xe1)]||_0x2168b0[_0x58ef85(0xe5)],_0x52349c=normalizeEnv(_0x2168b0[_0x58ef85(0xce)]||_0x58ef85(0xd2));if(!_0x747a91)return{'ide':_0x58ef85(0xe7),'status':_0x58ef85(0xc7),'message':_0x58ef85(0xee)};const _0x30827c=buildEnvConfig(_0x747a91,_0x52349c),_0x16d982={'command':MCP_COMMAND,'args':MCP_ARGS,'env':_0x30827c},_0x263846=join(_0x2db061,_0x58ef85(0xef),_0x58ef85(0xf5)),_0x45dda1=join(_0x2db061,'.cursor');try{!existsSync(_0x45dda1)&&mkdirSync(_0x45dda1,{'recursive':!![]});let _0x5d6210={'mcpServers':{}};if(existsSync(_0x263846)){const _0x5e84af=readFileSync(_0x263846,_0x58ef85(0xc9));_0x5d6210=JSON[_0x58ef85(0xc5)](_0x5e84af);}return(!_0x5d6210[_0x58ef85(0xe0)]||typeof _0x5d6210['mcpServers']!=='object')&&(_0x5d6210[_0x58ef85(0xe0)]={}),_0x5d6210[_0x58ef85(0xe0)][MCP_SERVER_NAME]=_0x16d982,writeFileSync(_0x263846,JSON[_0x58ef85(0xf8)](_0x5d6210,null,0x2),_0x58ef85(0xc9)),logger[_0x58ef85(0x101)](_0x58ef85(0xed),_0x58ef85(0xd5),{'appcode':_0x747a91,'env':_0x52349c,'path':_0x263846}),await copyRulesToCursor(_0x2db061),{'ide':_0x58ef85(0xe7),'status':_0x58ef85(0xf1),'message':_0x58ef85(0xd7)};}catch(_0x5e2432){return logger[_0x58ef85(0xc7)](_0x58ef85(0xed),_0x58ef85(0xd4),{'error':_0x5e2432 instanceof Error?_0x5e2432[_0x58ef85(0xc8)]:String(_0x5e2432)}),{'ide':_0x58ef85(0xe7),'status':_0x58ef85(0xc7),'message':_0x5e2432 instanceof Error?_0x5e2432[_0x58ef85(0xc8)]:String(_0x5e2432)};}}export async function configureClaudeMcp(_0x3475e5){const _0x45804d=a0_0x3d791f,_0x10a412=_0x3475e5||process[_0x45804d(0xe4)](),_0x340a52=readConfig(_0x10a412),_0xf328f7=_0x340a52[_0x45804d(0xe1)]||_0x340a52['app'],_0x22f98d=normalizeEnv(_0x340a52[_0x45804d(0xce)]||'production');if(!_0xf328f7)return{'ide':_0x45804d(0xdc),'status':_0x45804d(0xc7),'message':_0x45804d(0xee)};let _0x317955=_0x45804d(0xd6)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x45804d(0xf3)]('\x20')+'\x20-e\x20RABETBASE_APP_CODE='+_0xf328f7;return _0x22f98d!==_0x45804d(0xd2)&&(_0x317955+=_0x45804d(0xf0)+_0x22f98d),await copyRulesToAgentsMd(_0x10a412),logger[_0x45804d(0x101)](_0x45804d(0xed),_0x45804d(0xea),{'command':_0x317955,'appcode':_0xf328f7,'env':_0x22f98d}),console[_0x45804d(0xcc)](_0x45804d(0xfa)),console[_0x45804d(0xcc)]('\x20\x20'+_0x317955+'\x0a'),console[_0x45804d(0xcc)](_0x45804d(0x100)),console['log'](_0x45804d(0xeb)+_0xf328f7),_0x22f98d!==_0x45804d(0xd2)&&console[_0x45804d(0xcc)](_0x45804d(0xfc)+_0x22f98d),console['log'](_0x45804d(0xe6)),{'ide':_0x45804d(0xdc),'status':_0x45804d(0xde),'message':_0x45804d(0xca)+_0x317955};}export async function showOtherGuide(_0x3cad30){const _0x4c3b14=a0_0x3d791f,_0x46c0bb=_0x3cad30||process[_0x4c3b14(0xe4)](),_0x5463bc=readConfig(_0x46c0bb),_0x3ca509=_0x5463bc[_0x4c3b14(0xe1)]||_0x5463bc['app'],_0x712b8e=normalizeEnv(_0x5463bc[_0x4c3b14(0xce)]||_0x4c3b14(0xd2));if(!_0x3ca509)return{'ide':_0x4c3b14(0xcd),'status':_0x4c3b14(0xc7),'message':_0x4c3b14(0xee)};return console['log'](_0x4c3b14(0xcb)),console['log']('{'),console[_0x4c3b14(0xcc)]('\x20\x20\x22mcpServers\x22:\x20{'),console['log'](_0x4c3b14(0xd8)+MCP_SERVER_NAME+'\x22:\x20{'),console['log'](_0x4c3b14(0xf2)+MCP_COMMAND+'\x22,'),console[_0x4c3b14(0xcc)](_0x4c3b14(0xec)+MCP_ARGS['map'](_0x25a7a=>'\x22'+_0x25a7a+'\x22')[_0x4c3b14(0xf3)](',\x20')+'],'),console[_0x4c3b14(0xcc)]('\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{'),console['log'](_0x4c3b14(0xda)+_0x3ca509+'\x22,'),_0x712b8e!=='production'&&console[_0x4c3b14(0xcc)](_0x4c3b14(0xe9)+_0x712b8e+'\x22,'),console[_0x4c3b14(0xcc)](_0x4c3b14(0xfb)),console[_0x4c3b14(0xcc)]('\x20\x20\x20\x20}'),console[_0x4c3b14(0xcc)](_0x4c3b14(0xf7)),console['log']('}\x0a'),logger['info'](_0x4c3b14(0xed),_0x4c3b14(0xe8),{'appcode':_0x3ca509,'env':_0x712b8e}),{'ide':'Other','status':_0x4c3b14(0xde),'message':'Configuration\x20guide\x20displayed'};}export async function configureMcp(_0x10bf44,_0x13dca0){const _0x5f1290=a0_0x3d791f;switch(_0x10bf44){case _0x5f1290(0xdb):return await configureCursorMcp(_0x13dca0);case _0x5f1290(0xe3):return await configureClaudeMcp(_0x13dca0);default:throw new Error(_0x5f1290(0xcf)+_0x10bf44);}}
@@ -1 +1 @@
1
- function a1_0x1e06(){const _0x4f7fc9=['/api/node-toolbox/api-doc-generator','data','Failed\x20to\x20fetch\x20doc\x20(','push','2782360oMaFwe','2401910idHLic','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','text','json','40715YlmHFf','name','Waiting\x203\x20seconds...\x0a','api-doc','生成文档成功:\x20','8127610vZJIuB','9YCgQmh','✗\x20Failed:\x20','✓\x20Generated:\x20','message','length','./docs','55YmJHnq','success','markdown','6ANdxRU','382032PinxZk','.md\x20(','Invalid\x20response\x20format\x20(','.md','error','log','.md\x20-\x20','tableName','datasetCode','utf8','string','status','):\x20missing\x20data.markdown\x20field','Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','331767oVpLOy','生成文档失败:\x20','),\x20HTTP\x20status:\x20','2962152nkqtSE','stringify'];a1_0x1e06=function(){return _0x4f7fc9;};return a1_0x1e06();}const a1_0x47cb22=a1_0x1217;function a1_0x1217(_0x486a7e,_0x72d554){_0x486a7e=_0x486a7e-0x153;const _0x1e0693=a1_0x1e06();let _0x1217b6=_0x1e0693[_0x486a7e];return _0x1217b6;}(function(_0x5295d0,_0x3d4583){const _0x20b2e5=a1_0x1217,_0x2a20d6=_0x5295d0();while(!![]){try{const _0x503c55=parseInt(_0x20b2e5(0x155))/0x1*(-parseInt(_0x20b2e5(0x164))/0x2)+-parseInt(_0x20b2e5(0x173))/0x3+parseInt(_0x20b2e5(0x176))/0x4+parseInt(_0x20b2e5(0x161))/0x5*(parseInt(_0x20b2e5(0x165))/0x6)+parseInt(_0x20b2e5(0x17d))/0x7+-parseInt(_0x20b2e5(0x17c))/0x8*(parseInt(_0x20b2e5(0x15b))/0x9)+-parseInt(_0x20b2e5(0x15a))/0xa;if(_0x503c55===_0x3d4583)break;else _0x2a20d6['push'](_0x2a20d6['shift']());}catch(_0x56c8c6){_0x2a20d6['push'](_0x2a20d6['shift']());}}}(a1_0x1e06,0x5f672));import{mkdirSync,writeFileSync}from'node:fs';import a1_0x92ad29 from'node:path';import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';export async function fetchDatasetDoc(_0x18fd8d){const _0x26be0d=a1_0x1217,{appCode:_0x43ae87,cookie:_0x496786,datasetCode:_0x38a325,datasetId:_0x3dfeba,extraParams:_0x27af65}=_0x18fd8d,_0x1133c1=getApiDomain(),_0x2ab87d=_0x1133c1+_0x26be0d(0x178),_0x5a6c63={'appCode':_0x43ae87,'datasetCode':_0x38a325,'datasetId':_0x3dfeba,..._0x27af65||{}},_0x356993=await fetch(_0x2ab87d,{'method':'POST','headers':{'Content-Type':'application/json','Cookie':_0x496786},'body':JSON[_0x26be0d(0x177)](_0x5a6c63)});if(!_0x356993['ok']){if(_0x356993['status']===0x191)throw new Error(_0x26be0d(0x172));let _0x7de713='';try{_0x7de713=await _0x356993[_0x26be0d(0x153)]();}catch(_0x450579){}throw new Error(_0x26be0d(0x17a)+_0x38a325+_0x26be0d(0x175)+_0x356993[_0x26be0d(0x170)]+(_0x7de713?'\x0a'+_0x7de713:''));}const _0x38b5ee=await _0x356993[_0x26be0d(0x154)]();if(!_0x38b5ee['data']||typeof _0x38b5ee[_0x26be0d(0x179)][_0x26be0d(0x163)]!==_0x26be0d(0x16f))throw new Error(_0x26be0d(0x167)+_0x38a325+_0x26be0d(0x171));return _0x38b5ee[_0x26be0d(0x179)][_0x26be0d(0x163)];}function delay(_0x4bdb84){return new Promise(_0x159f65=>setTimeout(_0x159f65,_0x4bdb84));}export async function generateDatasetDocs(_0x1470d3,_0x1532a3,_0x5a91f0,_0x402a5a=a1_0x47cb22(0x160),_0x411d17,_0x13c746){const _0x42b90a=a1_0x47cb22;mkdirSync(_0x402a5a,{'recursive':!![]});const _0x40ffcf=[],_0x30780e=_0x1470d3[_0x42b90a(0x15f)];console[_0x42b90a(0x16a)]('\x0a'+_0x30780e+_0x42b90a(0x17e));for(let _0x350876=0x0;_0x350876<_0x1470d3['length'];_0x350876++){const _0x557e77=_0x1470d3[_0x350876],_0x4143c7=_0x350876+0x1,_0x417842=_0x557e77[_0x42b90a(0x16c)];try{console[_0x42b90a(0x16a)]('['+_0x4143c7+'/'+_0x30780e+']\x20Generating:\x20'+_0x417842+_0x42b90a(0x166)+_0x557e77[_0x42b90a(0x156)]+')');_0x411d17&&_0x411d17(_0x4143c7,_0x30780e,_0x417842);const _0x1ed1ee=await fetchDatasetDoc({'appCode':_0x1532a3,'cookie':_0x5a91f0,'datasetCode':_0x557e77[_0x42b90a(0x16d)],'datasetId':_0x557e77['id'],'enableAI':![],'extraParams':_0x13c746}),_0x284228=a1_0x92ad29['join'](_0x402a5a,_0x417842+'.md');writeFileSync(_0x284228,_0x1ed1ee,{'encoding':_0x42b90a(0x16e)}),console[_0x42b90a(0x16a)](_0x42b90a(0x15d)+_0x417842+_0x42b90a(0x168)),logger[_0x42b90a(0x162)](_0x42b90a(0x158),_0x42b90a(0x159)+_0x417842,undefined,{'datasetCode':_0x557e77['datasetCode'],'datasetName':_0x557e77[_0x42b90a(0x156)],'filePath':_0x284228,'progress':_0x4143c7+'/'+_0x30780e}),_0x40ffcf[_0x42b90a(0x17b)]({'datasetCode':_0x557e77[_0x42b90a(0x16d)],'datasetName':_0x557e77[_0x42b90a(0x156)],'filePath':_0x284228,'success':!![]}),_0x4143c7<_0x30780e&&await delay(0x1388);}catch(_0x42b7fb){const _0x17ca67=_0x42b7fb instanceof Error?_0x42b7fb[_0x42b90a(0x15e)]:String(_0x42b7fb);console[_0x42b90a(0x16a)](_0x42b90a(0x15c)+_0x417842+_0x42b90a(0x16b)+_0x17ca67),logger[_0x42b90a(0x169)](_0x42b90a(0x158),_0x42b90a(0x174)+_0x557e77[_0x42b90a(0x16d)],{'datasetCode':_0x557e77[_0x42b90a(0x16d)],'datasetName':_0x557e77['name'],'error':_0x17ca67,'progress':_0x4143c7+'/'+_0x30780e}),_0x40ffcf['push']({'datasetCode':_0x557e77[_0x42b90a(0x16d)],'datasetName':_0x557e77['name'],'filePath':'','success':![],'error':_0x17ca67}),_0x4143c7<_0x30780e&&(console[_0x42b90a(0x16a)](_0x42b90a(0x157)),await delay(0xbb8));}}return _0x40ffcf;}
1
+ (function(_0x5c4552,_0x16e60d){const _0x3ad14e=a1_0x1c0a,_0x47a17c=_0x5c4552();while(!![]){try{const _0x508750=-parseInt(_0x3ad14e(0x13c))/0x1+parseInt(_0x3ad14e(0x14f))/0x2*(-parseInt(_0x3ad14e(0x15a))/0x3)+parseInt(_0x3ad14e(0x143))/0x4+parseInt(_0x3ad14e(0x153))/0x5+-parseInt(_0x3ad14e(0x13e))/0x6+-parseInt(_0x3ad14e(0x14c))/0x7+parseInt(_0x3ad14e(0x147))/0x8;if(_0x508750===_0x16e60d)break;else _0x47a17c['push'](_0x47a17c['shift']());}catch(_0x57378c){_0x47a17c['push'](_0x47a17c['shift']());}}}(a1_0x3379,0x62af6));import{mkdirSync,writeFileSync}from'node:fs';function a1_0x3379(){const _0x37d58f=['success','message','utf8','join','Invalid\x20response\x20format\x20(','生成文档成功:\x20','push','15929zsPBfP','stringify','4371054gJDVEO','string','application/json','.md\x20-\x20','),\x20HTTP\x20status:\x20','1034180cVqZIQ','text','name','✓\x20Generated:\x20','11505152DUGHFT','.md','length','/api/node-toolbox/api-doc-generator','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','5301345JRtNuT','api-doc','datasetCode','168iZgOtZ','data','json',']\x20Generating:\x20','3398910srVmZu','log','):\x20missing\x20data.markdown\x20field','POST','Waiting\x203\x20seconds...\x0a','生成文档失败:\x20','status','16803KSivor','tableName','markdown','error'];a1_0x3379=function(){return _0x37d58f;};return a1_0x3379();}function a1_0x1c0a(_0x46fc33,_0x217470){_0x46fc33=_0x46fc33-0x139;const _0x3379cb=a1_0x3379();let _0x1c0a96=_0x3379cb[_0x46fc33];return _0x1c0a96;}import a1_0x5c173e from'node:path';import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';export async function fetchDatasetDoc(_0x3c3fef){const _0x2855eb=a1_0x1c0a,{appCode:_0x491244,cookie:_0x2017c3,datasetCode:_0x54d580,datasetId:_0x2a1bfc,extraParams:_0x230e1c}=_0x3c3fef,_0x2cf68c=getApiDomain(),_0x2a2e95=_0x2cf68c+_0x2855eb(0x14a),_0x39c29d={'appCode':_0x491244,'datasetCode':_0x54d580,'datasetId':_0x2a1bfc,..._0x230e1c||{}},_0x188b1e=await fetch(_0x2a2e95,{'method':_0x2855eb(0x156),'headers':{'Content-Type':_0x2855eb(0x140),'Cookie':_0x2017c3},'body':JSON[_0x2855eb(0x13d)](_0x39c29d)});if(!_0x188b1e['ok']){if(_0x188b1e[_0x2855eb(0x159)]===0x191)throw new Error('Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again');let _0x5aef23='';try{_0x5aef23=await _0x188b1e[_0x2855eb(0x144)]();}catch(_0x197deb){}throw new Error('Failed\x20to\x20fetch\x20doc\x20('+_0x54d580+_0x2855eb(0x142)+_0x188b1e[_0x2855eb(0x159)]+(_0x5aef23?'\x0a'+_0x5aef23:''));}const _0x2b437e=await _0x188b1e[_0x2855eb(0x151)]();if(!_0x2b437e[_0x2855eb(0x150)]||typeof _0x2b437e[_0x2855eb(0x150)]['markdown']!==_0x2855eb(0x13f))throw new Error(_0x2855eb(0x139)+_0x54d580+_0x2855eb(0x155));return _0x2b437e[_0x2855eb(0x150)][_0x2855eb(0x15c)];}function delay(_0x319e55){return new Promise(_0x53aa06=>setTimeout(_0x53aa06,_0x319e55));}export async function generateDatasetDocs(_0x1f985a,_0x2f1011,_0x32c393,_0x33f393='./docs',_0xaeda2f,_0x2bd19a){const _0x48d1bb=a1_0x1c0a;mkdirSync(_0x33f393,{'recursive':!![]});const _0x498963=[],_0x51a0ae=_0x1f985a[_0x48d1bb(0x149)];console[_0x48d1bb(0x154)]('\x0a'+_0x51a0ae+_0x48d1bb(0x14b));for(let _0xb269b4=0x0;_0xb269b4<_0x1f985a[_0x48d1bb(0x149)];_0xb269b4++){const _0x33c936=_0x1f985a[_0xb269b4],_0x47353a=_0xb269b4+0x1,_0x581cdc=_0x33c936[_0x48d1bb(0x15b)];try{console[_0x48d1bb(0x154)]('['+_0x47353a+'/'+_0x51a0ae+_0x48d1bb(0x152)+_0x581cdc+'.md\x20('+_0x33c936[_0x48d1bb(0x145)]+')');_0xaeda2f&&_0xaeda2f(_0x47353a,_0x51a0ae,_0x581cdc);const _0xf8bc26=await fetchDatasetDoc({'appCode':_0x2f1011,'cookie':_0x32c393,'datasetCode':_0x33c936[_0x48d1bb(0x14e)],'datasetId':_0x33c936['id'],'enableAI':![],'extraParams':_0x2bd19a}),_0xfdc1ac=a1_0x5c173e[_0x48d1bb(0x161)](_0x33f393,_0x581cdc+_0x48d1bb(0x148));writeFileSync(_0xfdc1ac,_0xf8bc26,{'encoding':_0x48d1bb(0x160)}),console['log'](_0x48d1bb(0x146)+_0x581cdc+'.md'),logger[_0x48d1bb(0x15e)](_0x48d1bb(0x14d),_0x48d1bb(0x13a)+_0x581cdc,undefined,{'datasetCode':_0x33c936[_0x48d1bb(0x14e)],'datasetName':_0x33c936[_0x48d1bb(0x145)],'filePath':_0xfdc1ac,'progress':_0x47353a+'/'+_0x51a0ae}),_0x498963[_0x48d1bb(0x13b)]({'datasetCode':_0x33c936['datasetCode'],'datasetName':_0x33c936[_0x48d1bb(0x145)],'filePath':_0xfdc1ac,'success':!![]}),_0x47353a<_0x51a0ae&&await delay(0x1388);}catch(_0x326a94){const _0x162963=_0x326a94 instanceof Error?_0x326a94[_0x48d1bb(0x15f)]:String(_0x326a94);console['log']('✗\x20Failed:\x20'+_0x581cdc+_0x48d1bb(0x141)+_0x162963),logger[_0x48d1bb(0x15d)](_0x48d1bb(0x14d),_0x48d1bb(0x158)+_0x33c936['datasetCode'],{'datasetCode':_0x33c936[_0x48d1bb(0x14e)],'datasetName':_0x33c936[_0x48d1bb(0x145)],'error':_0x162963,'progress':_0x47353a+'/'+_0x51a0ae}),_0x498963[_0x48d1bb(0x13b)]({'datasetCode':_0x33c936[_0x48d1bb(0x14e)],'datasetName':_0x33c936['name'],'filePath':'','success':![],'error':_0x162963}),_0x47353a<_0x51a0ae&&(console[_0x48d1bb(0x154)](_0x48d1bb(0x157)),await delay(0xbb8));}}return _0x498963;}
@@ -1 +1 @@
1
- function a2_0x472e(){const _0x5e7ea8=['error','532SqcUxH','status','fetch-model-list','includes','27sljxGH','name','errorCode','message','&otype=array','18vzXfHU','130xCqqJk','UNAUTHORIZED','replace','3526128YIDLlS','length','map','data','12bhDGrq','success','401','configArray','/api/node-toolbox/dataset/model-list?appcode=','1560797UkRZqK','trim','info','Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','1414680PXAmvx','124548KQQhWF','433DFdXfN','12141239MZNMVV','Unknown\x20error','errorMsg','7228FOsanz','code','Failed\x20to\x20fetch\x20datasets,\x20HTTP\x20status:\x20'];a2_0x472e=function(){return _0x5e7ea8;};return a2_0x472e();}(function(_0x216463,_0x5a4cae){const _0x26a981=a2_0x1eb2,_0x4db0a9=_0x216463();while(!![]){try{const _0x2394c0=parseInt(_0x26a981(0x1be))/0x1*(parseInt(_0x26a981(0x1c6))/0x2)+-parseInt(_0x26a981(0x1ca))/0x3*(parseInt(_0x26a981(0x1c2))/0x4)+parseInt(_0x26a981(0x1d0))/0x5*(-parseInt(_0x26a981(0x1bd))/0x6)+-parseInt(_0x26a981(0x1dc))/0x7+-parseInt(_0x26a981(0x1d3))/0x8+-parseInt(_0x26a981(0x1cf))/0x9*(-parseInt(_0x26a981(0x1bc))/0xa)+parseInt(_0x26a981(0x1bf))/0xb*(parseInt(_0x26a981(0x1d7))/0xc);if(_0x2394c0===_0x5a4cae)break;else _0x4db0a9['push'](_0x4db0a9['shift']());}catch(_0x2fc29b){_0x4db0a9['push'](_0x4db0a9['shift']());}}}(a2_0x472e,0x44e2b));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';function a2_0x1eb2(_0x456f8a,_0x77a269){_0x456f8a=_0x456f8a-0x1ba;const _0x472e46=a2_0x472e();let _0x1eb242=_0x472e46[_0x456f8a];return _0x1eb242;}import{getEnv}from'../constant/env.js';function cleanNewlines(_0x5c13ec){const _0x33de22=a2_0x1eb2;return _0x5c13ec[_0x33de22(0x1d2)](/[\r\n]+/g,'\x20')[_0x33de22(0x1dd)]();}function cleanDatasetName(_0xac871b){const _0x36473b=a2_0x1eb2;if(!_0xac871b['name'])return _0xac871b;return{..._0xac871b,'name':cleanNewlines(_0xac871b[_0x36473b(0x1cb)])};}function cleanDatasetNames(_0x147b07){const _0x2aacaf=a2_0x1eb2;return _0x147b07[_0x2aacaf(0x1d5)](cleanDatasetName);}export async function fetchModelList(_0x2a1b33,_0x576b07){const _0x13480c=a2_0x1eb2,_0x2efc60=getEnv(),_0x440554=getApiDomain()+_0x13480c(0x1db)+_0x2a1b33+_0x13480c(0x1ce);logger[_0x13480c(0x1ba)](_0x13480c(0x1c8),'正在从服务器拉取模型列表...\x20(环境:\x20'+_0x2efc60+')',{'apiUrl':_0x440554});const _0xa81e21=await fetch(_0x440554,{'headers':{'Cookie':_0x576b07}});if(!_0xa81e21['ok']){if(_0xa81e21[_0x13480c(0x1c7)]===0x191)throw new Error('Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again');throw new Error(_0x13480c(0x1c4)+_0xa81e21['status']);}const _0x373a10=await _0xa81e21['json']();if(!_0x373a10[_0x13480c(0x1d8)]){const _0x23950c=_0x373a10[_0x13480c(0x1c1)]||_0x373a10[_0x13480c(0x1cd)]||_0x373a10[_0x13480c(0x1d6)]?.['message']||_0x373a10['errorMessage']||_0x373a10[_0x13480c(0x1c5)]||_0x13480c(0x1c0);if(_0x23950c[_0x13480c(0x1c9)](_0x13480c(0x1d9))||_0x23950c[_0x13480c(0x1c9)]('Unauthorized')||_0x23950c['includes']('登录')||_0x23950c[_0x13480c(0x1c9)]('认证')||_0x373a10[_0x13480c(0x1cc)]===_0x13480c(0x1d1)||_0x373a10[_0x13480c(0x1c3)]===0x191||_0x373a10[_0x13480c(0x1c3)]===_0x13480c(0x1d9))throw new Error(_0x13480c(0x1bb));throw new Error('Failed\x20to\x20fetch\x20datasets:\x20'+_0x23950c);}const _0x62e416=cleanDatasetNames(_0x373a10['data'][_0x13480c(0x1da)]);return{'configArray':_0x62e416,'count':_0x62e416[_0x13480c(0x1d4)]};}
1
+ (function(_0x4e23c2,_0x4b0d3c){const _0x45acdd=a2_0x4eb5,_0x3c5d7e=_0x4e23c2();while(!![]){try{const _0x50d3b4=parseInt(_0x45acdd(0x143))/0x1+parseInt(_0x45acdd(0x148))/0x2+-parseInt(_0x45acdd(0x135))/0x3+parseInt(_0x45acdd(0x130))/0x4+parseInt(_0x45acdd(0x140))/0x5+-parseInt(_0x45acdd(0x14a))/0x6+-parseInt(_0x45acdd(0x150))/0x7*(parseInt(_0x45acdd(0x132))/0x8);if(_0x50d3b4===_0x4b0d3c)break;else _0x3c5d7e['push'](_0x3c5d7e['shift']());}catch(_0x1f42fe){_0x3c5d7e['push'](_0x3c5d7e['shift']());}}}(a2_0x5558,0x29584));import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';function cleanNewlines(_0x2bec35){const _0x63cafb=a2_0x4eb5;return _0x2bec35[_0x63cafb(0x136)](/[\r\n]+/g,'\x20')['trim']();}function cleanDatasetName(_0x45cc63){const _0x200a44=a2_0x4eb5;if(!_0x45cc63['name'])return _0x45cc63;return{..._0x45cc63,'name':cleanNewlines(_0x45cc63[_0x200a44(0x142)])};}function a2_0x5558(){const _0x1a93b8=['259938EJNbyG','500848YtoghW','json','24NFdbJb','success','Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','867273OvZfMN','replace','UNAUTHORIZED','error','code','map','data','Failed\x20to\x20fetch\x20datasets:\x20','length','info','errorMessage','1305490JXuEUY','includes','name','86601aRUWXg','/api/node-toolbox/dataset/model-list?appcode=','Unknown\x20error','401','status','237560BiuQcT','fetch-model-list','131100dqKFqB','errorMsg','&otype=array','Unauthorized','正在从服务器拉取模型列表...\x20(环境:\x20','configArray'];a2_0x5558=function(){return _0x1a93b8;};return a2_0x5558();}function a2_0x4eb5(_0x43d72d,_0x90b7b5){_0x43d72d=_0x43d72d-0x130;const _0x555861=a2_0x5558();let _0x4eb56b=_0x555861[_0x43d72d];return _0x4eb56b;}function cleanDatasetNames(_0x7c79b1){const _0x5cfb55=a2_0x4eb5;return _0x7c79b1[_0x5cfb55(0x13a)](cleanDatasetName);}export async function fetchModelList(_0x12be39,_0x25ed91){const _0x21de3c=a2_0x4eb5,_0x40eb2d=getEnv(),_0x107903=getApiDomain()+_0x21de3c(0x144)+_0x12be39+_0x21de3c(0x14c);logger[_0x21de3c(0x13e)](_0x21de3c(0x149),_0x21de3c(0x14e)+_0x40eb2d+')',{'apiUrl':_0x107903});const _0x595ab0=await fetch(_0x107903,{'headers':{'Cookie':_0x25ed91}});if(!_0x595ab0['ok']){if(_0x595ab0[_0x21de3c(0x147)]===0x191)throw new Error('Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again');throw new Error('Failed\x20to\x20fetch\x20datasets,\x20HTTP\x20status:\x20'+_0x595ab0['status']);}const _0x336679=await _0x595ab0[_0x21de3c(0x131)]();if(!_0x336679[_0x21de3c(0x133)]){const _0x5041e8=_0x336679[_0x21de3c(0x14b)]||_0x336679['message']||_0x336679[_0x21de3c(0x13b)]?.['message']||_0x336679[_0x21de3c(0x13f)]||_0x336679[_0x21de3c(0x138)]||_0x21de3c(0x145);if(_0x5041e8[_0x21de3c(0x141)](_0x21de3c(0x146))||_0x5041e8[_0x21de3c(0x141)](_0x21de3c(0x14d))||_0x5041e8[_0x21de3c(0x141)]('登录')||_0x5041e8[_0x21de3c(0x141)]('认证')||_0x336679['errorCode']===_0x21de3c(0x137)||_0x336679[_0x21de3c(0x139)]===0x191||_0x336679[_0x21de3c(0x139)]===_0x21de3c(0x146))throw new Error(_0x21de3c(0x134));throw new Error(_0x21de3c(0x13c)+_0x5041e8);}const _0x3fa5dd=cleanDatasetNames(_0x336679[_0x21de3c(0x13b)][_0x21de3c(0x14f)]);return{'configArray':_0x3fa5dd,'count':_0x3fa5dd[_0x21de3c(0x13d)]};}
@@ -1 +1 @@
1
- function a3_0xd8ff(){const _0x1cb552=['test','26CCNXit','push','toUpperCase','\x22\x20}','dirname','8754174UtJMnX','datasetCode','client','tableName','{\x20apiConfigName:\x20\x22','24PaZzwB','typescript','753860LCSPbV','API\x20文件生成成功!','slice','name','3048000uKyJKa','success','.ts','268353KqqtBT','replace','17191IkbcCd','replaceApiContent','client.ts.tpl',',\x20env:\x20\x22','LOVRABET','format','forEach','length','77EnhtgN','-client','30AxJLVz','api','utf8','init-api','1352148AaNYsX','templates/generate-api','603029OJxJUR','{\x20apiConfigName:\x20','../..','join','-api','130fkmWkR'];a3_0xd8ff=function(){return _0x1cb552;};return a3_0xd8ff();}(function(_0x46de51,_0x27e973){const _0x1d6e19=a3_0x3150,_0x37b7c9=_0x46de51();while(!![]){try{const _0x1dbaa6=parseInt(_0x1d6e19(0xdf))/0x1*(parseInt(_0x1d6e19(0xca))/0x2)+-parseInt(_0x1d6e19(0xda))/0x3+-parseInt(_0x1d6e19(0xd6))/0x4*(parseInt(_0x1d6e19(0xe9))/0x5)+parseInt(_0x1d6e19(0xcf))/0x6+parseInt(_0x1d6e19(0xc3))/0x7*(parseInt(_0x1d6e19(0xd4))/0x8)+parseInt(_0x1d6e19(0xdd))/0x9*(parseInt(_0x1d6e19(0xc8))/0xa)+-parseInt(_0x1d6e19(0xe7))/0xb*(-parseInt(_0x1d6e19(0xed))/0xc);if(_0x1dbaa6===_0x27e973)break;else _0x37b7c9['push'](_0x37b7c9['shift']());}catch(_0xb26ed6){_0x37b7c9['push'](_0x37b7c9['shift']());}}}(a3_0xd8ff,0xecf29));import a3_0x53c5da from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';function a3_0x3150(_0x3d8ce3,_0x1e2ec2){_0x3d8ce3=_0x3d8ce3-0xc3;const _0xd8ff50=a3_0xd8ff();let _0x315026=_0xd8ff50[_0x3d8ce3];return _0x315026;}import a3_0x31d52c from'node:path';import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{logger}from'../utils/logger.js';export async function generateApiFile(_0x2c2ea7,_0x4f316d,_0x18cc2c,_0x2b275c,_0x189b22,_0x13c661,_0x3e989d){const _0x30243f=a3_0x3150;if(!_0x18cc2c)throw new Error('Please\x20configure\x20app\x20code\x20first\x20via\x20`rabetbase\x20config\x20set\x20app\x20<value>`');const _0x5b8b7b=_0x2b275c&&!_0x3e989d,_0x436f5d=_0x3e989d||_0x18cc2c,_0xc8a904=_0x5b8b7b?'CONFIG_NAMES.DEFAULT':'\x22'+_0x436f5d+'\x22',_0x13186b=_0x189b22!=='production';let _0x552c8c;if(_0x5b8b7b)_0x13186b?_0x552c8c=_0x30243f(0xc4)+_0xc8a904+_0x30243f(0xe2)+_0x189b22+_0x30243f(0xcd):_0x552c8c='';else{const _0x66048b=_0x13186b?_0x30243f(0xe2)+_0x189b22+'\x22':'';_0x552c8c=_0x30243f(0xd3)+_0x436f5d+'\x22'+_0x66048b+'\x20}';}const _0x3778a1=_0x4f316d?_0x4f316d+_0x30243f(0xc7):_0x30243f(0xea),_0x23051c=_0x4f316d?_0x4f316d+_0x30243f(0xe8):_0x30243f(0xd1),_0x4921e4=_0x4f316d&&!/^app-[a-f0-9]+$/i[_0x30243f(0xc9)](_0x4f316d)?_0x4f316d[_0x30243f(0xde)](/-/g,'_')[_0x30243f(0xcc)]():_0x30243f(0xe3),_0x3a6223=[];_0x2c2ea7[_0x30243f(0xe5)](_0x42abc2=>{const _0x5ba86a=_0x30243f;_0x3a6223[_0x5ba86a(0xcb)]({'datasetCode':_0x42abc2[_0x5ba86a(0xd0)],'tableName':_0x42abc2[_0x5ba86a(0xd2)],'name':_0x42abc2[_0x5ba86a(0xd9)]||'','alias':_0x42abc2['alias']||_0x42abc2['key']});});const _0x27c131=fileURLToPath(import.meta.url),_0x379ec0=a3_0x31d52c['resolve'](a3_0x31d52c[_0x30243f(0xce)](_0x27c131),_0x30243f(0xc5)),_0x5dc58e=a3_0x31d52c[_0x30243f(0xc6)](_0x379ec0,_0x30243f(0xee)),_0x1e37be=a3_0x31d52c[_0x30243f(0xc6)](_0x5dc58e,'api.ts.tpl'),_0x173ef9=a3_0x31d52c[_0x30243f(0xc6)](_0x5dc58e,_0x30243f(0xe1)),_0x182b5c=_0x13c661['endsWith']('/')?_0x13c661[_0x30243f(0xd8)](0x0,-0x1):_0x13c661;mkdirSync(_0x182b5c,{'recursive':!![]});const _0x1924e5=_0x3a6223[0x0]?.['alias'],_0x15f447=readFileSync(_0x1e37be,_0x30243f(0xeb)),_0x2285db=TemplateReplacer[_0x30243f(0xe0)](_0x15f447,_0x18cc2c,_0x3a6223,_0x1924e5,_0x3778a1,_0xc8a904,undefined,_0x4921e4),_0x5d369a=await a3_0x53c5da['format'](_0x2285db,{'parser':_0x30243f(0xd5)}),_0x2bac1f=_0x182b5c+'/'+_0x3778a1+_0x30243f(0xdc);writeFileSync(_0x2bac1f,_0x5d369a,{'encoding':'utf8'});const _0x3609a7=readFileSync(_0x173ef9,_0x30243f(0xeb)),_0x38b643=TemplateReplacer['replaceApiContent'](_0x3609a7,_0x18cc2c,_0x3a6223,_0x1924e5,_0x3778a1,_0xc8a904,_0x552c8c,_0x4921e4),_0x15cb31=await a3_0x53c5da[_0x30243f(0xe4)](_0x38b643,{'parser':'typescript'}),_0x2e55ac=_0x182b5c+'/'+_0x23051c+_0x30243f(0xdc);writeFileSync(_0x2e55ac,_0x15cb31,{'encoding':_0x30243f(0xeb)});const _0x2bab2c=_0x3a6223[_0x30243f(0xe6)];return logger[_0x30243f(0xdb)](_0x30243f(0xec),_0x30243f(0xd7),undefined,{'apiFile':_0x2bac1f,'clientFile':_0x2e55ac,'modelCount':_0x2bab2c,'configName':_0xc8a904}),{'modelCount':_0x2bab2c,'apiFilePath':_0x2bac1f,'clientFilePath':_0x2e55ac,'configName':_0xc8a904};}
1
+ (function(_0x81e712,_0x3e0bc1){const _0x343c2b=a3_0x266b,_0x6a3ee8=_0x81e712();while(!![]){try{const _0x5e1ad5=parseInt(_0x343c2b(0x200))/0x1+-parseInt(_0x343c2b(0x1f7))/0x2+parseInt(_0x343c2b(0x1ee))/0x3*(parseInt(_0x343c2b(0x207))/0x4)+-parseInt(_0x343c2b(0x20a))/0x5*(parseInt(_0x343c2b(0x1fe))/0x6)+-parseInt(_0x343c2b(0x1ef))/0x7+parseInt(_0x343c2b(0x1f1))/0x8*(parseInt(_0x343c2b(0x201))/0x9)+-parseInt(_0x343c2b(0x1f2))/0xa*(parseInt(_0x343c2b(0x210))/0xb);if(_0x5e1ad5===_0x3e0bc1)break;else _0x6a3ee8['push'](_0x6a3ee8['shift']());}catch(_0x105370){_0x6a3ee8['push'](_0x6a3ee8['shift']());}}}(a3_0xb8c1,0x400e0));import a3_0x1aa52f from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0xad6ccb from'node:path';import{fileURLToPath}from'node:url';function a3_0x266b(_0x427dbe,_0x12a1ff){_0x427dbe=_0x427dbe-0x1e7;const _0xb8c10d=a3_0xb8c1();let _0x266b48=_0xb8c10d[_0x427dbe];return _0x266b48;}import{TemplateReplacer}from'../utils/template-replacer.js';import{logger}from'../utils/logger.js';export async function generateApiFile(_0x4ff671,_0x175a47,_0x5166e6,_0x47085f,_0x595bf9,_0x85d7ae,_0x32421a){const _0x47cfef=a3_0x266b;if(!_0x5166e6)throw new Error(_0x47cfef(0x204));const _0x2c47e2=_0x47085f&&!_0x32421a,_0xb35af5=_0x32421a||_0x5166e6,_0x5470d8=_0x2c47e2?_0x47cfef(0x20f):'\x22'+_0xb35af5+'\x22',_0x37b2c5=_0x595bf9!==_0x47cfef(0x206);let _0x4548fb;if(_0x2c47e2)_0x37b2c5?_0x4548fb='{\x20apiConfigName:\x20'+_0x5470d8+_0x47cfef(0x1ed)+_0x595bf9+_0x47cfef(0x203):_0x4548fb='';else{const _0x1f8b85=_0x37b2c5?',\x20env:\x20\x22'+_0x595bf9+'\x22':'';_0x4548fb='{\x20apiConfigName:\x20\x22'+_0xb35af5+'\x22'+_0x1f8b85+'\x20}';}const _0x3110a8=_0x175a47?_0x175a47+_0x47cfef(0x205):_0x47cfef(0x209),_0x2f7110=_0x175a47?_0x175a47+_0x47cfef(0x1e9):_0x47cfef(0x20e),_0x5c3ae9=_0x175a47&&!/^app-[a-f0-9]+$/i['test'](_0x175a47)?_0x175a47[_0x47cfef(0x202)](/-/g,'_')['toUpperCase']():_0x47cfef(0x1f9),_0x5770ca=[];_0x4ff671[_0x47cfef(0x1f0)](_0x1dca69=>{const _0x3e2f86=_0x47cfef;_0x5770ca[_0x3e2f86(0x208)]({'datasetCode':_0x1dca69[_0x3e2f86(0x20d)],'tableName':_0x1dca69[_0x3e2f86(0x211)],'name':_0x1dca69[_0x3e2f86(0x1f5)]||'','alias':_0x1dca69[_0x3e2f86(0x1fc)]||_0x1dca69[_0x3e2f86(0x1f3)]});});const _0x53a8ac=fileURLToPath(import.meta.url),_0x262489=a3_0xad6ccb[_0x47cfef(0x20b)](a3_0xad6ccb[_0x47cfef(0x213)](_0x53a8ac),'../..'),_0xc9298b=a3_0xad6ccb[_0x47cfef(0x1fb)](_0x262489,_0x47cfef(0x1f6)),_0x2abc86=a3_0xad6ccb[_0x47cfef(0x1fb)](_0xc9298b,_0x47cfef(0x1fa)),_0x14cc0b=a3_0xad6ccb[_0x47cfef(0x1fb)](_0xc9298b,_0x47cfef(0x1e8)),_0x315570=_0x85d7ae[_0x47cfef(0x1f8)]('/')?_0x85d7ae[_0x47cfef(0x1ea)](0x0,-0x1):_0x85d7ae;mkdirSync(_0x315570,{'recursive':!![]});const _0x5b2278=_0x5770ca[0x0]?.[_0x47cfef(0x1fc)],_0x285316=readFileSync(_0x2abc86,_0x47cfef(0x1ff)),_0x2fb875=TemplateReplacer[_0x47cfef(0x1eb)](_0x285316,_0x5166e6,_0x5770ca,_0x5b2278,_0x3110a8,_0x5470d8,undefined,_0x5c3ae9),_0x118f21=await a3_0x1aa52f[_0x47cfef(0x212)](_0x2fb875,{'parser':_0x47cfef(0x1ec)}),_0x456c53=_0x315570+'/'+_0x3110a8+_0x47cfef(0x1f4);writeFileSync(_0x456c53,_0x118f21,{'encoding':_0x47cfef(0x1ff)});const _0x4e4e1c=readFileSync(_0x14cc0b,'utf8'),_0xc07723=TemplateReplacer[_0x47cfef(0x1eb)](_0x4e4e1c,_0x5166e6,_0x5770ca,_0x5b2278,_0x3110a8,_0x5470d8,_0x4548fb,_0x5c3ae9),_0x124613=await a3_0x1aa52f['format'](_0xc07723,{'parser':_0x47cfef(0x1ec)}),_0x2b1846=_0x315570+'/'+_0x2f7110+_0x47cfef(0x1f4);writeFileSync(_0x2b1846,_0x124613,{'encoding':_0x47cfef(0x1ff)});const _0x5e2654=_0x5770ca[_0x47cfef(0x1e7)];return logger[_0x47cfef(0x1fd)]('init-api',_0x47cfef(0x20c),undefined,{'apiFile':_0x456c53,'clientFile':_0x2b1846,'modelCount':_0x5e2654,'configName':_0x5470d8}),{'modelCount':_0x5e2654,'apiFilePath':_0x456c53,'clientFilePath':_0x2b1846,'configName':_0x5470d8};}function a3_0xb8c1(){const _0x164ae2=['dirname','length','client.ts.tpl','-client','slice','replaceApiContent','typescript',',\x20env:\x20\x22','3zyNfuQ','2414398KyTBFe','forEach','88USOSMP','1560coXbEx','key','.ts','name','templates/generate-api','165026xvsXVg','endsWith','LOVRABET','api.ts.tpl','join','alias','success','84kDTOkV','utf8','519260lCJxOh','31077eOzzAE','replace','\x22\x20}','Please\x20configure\x20app\x20code\x20first\x20via\x20`rabetbase\x20config\x20set\x20app\x20<value>`','-api','production','958424IQMUzc','push','api','7145syXShA','resolve','API\x20文件生成成功!','datasetCode','client','CONFIG_NAMES.DEFAULT','6138wFDYEX','tableName','format'];a3_0xb8c1=function(){return _0x164ae2;};return a3_0xb8c1();}
@@ -1 +1 @@
1
- (function(_0x4f3589,_0x2044b5){const _0x172006=a4_0x21fb,_0x4c5e54=_0x4f3589();while(!![]){try{const _0x55f0ea=-parseInt(_0x172006(0xb7))/0x1+-parseInt(_0x172006(0xb8))/0x2+parseInt(_0x172006(0xc2))/0x3+parseInt(_0x172006(0xc7))/0x4*(parseInt(_0x172006(0xba))/0x5)+-parseInt(_0x172006(0xb4))/0x6+parseInt(_0x172006(0xbe))/0x7*(parseInt(_0x172006(0xc1))/0x8)+-parseInt(_0x172006(0xc6))/0x9*(-parseInt(_0x172006(0xc8))/0xa);if(_0x55f0ea===_0x2044b5)break;else _0x4c5e54['push'](_0x4c5e54['shift']());}catch(_0x20c44b){_0x4c5e54['push'](_0x4c5e54['shift']());}}}(a4_0x1226,0x73806));function a4_0x21fb(_0x531afc,_0x229e64){_0x531afc=_0x531afc-0xb4;const _0x12260e=a4_0x1226();let _0x21fbcd=_0x12260e[_0x531afc];return _0x21fbcd;}import{jsx as a4_0xdaf333,jsxs as a4_0x1e0cbe}from'react/jsx-runtime';function a4_0x1226(){const _0x387b43=['then','573075fcHRLP','671452WKmMWI','return','1227905STKBNQ','Press\x20\x22q\x22\x20to\x20exit.','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','*\x20Login\x20successful!','2065924seCxNj','green','gray','8LUWNMF','844809UHnFZV','log','Logging\x20in...\x20','column','13375062QkQfhn','4xMdQcG','10pZloaC','*\x20Press\x20Enter\x20to\x20start\x20login.','5559234oxsHpZ','Please\x20complete\x20login\x20in\x20your\x20browser.'];a4_0x1226=function(){return _0x387b43;};return a4_0x1226();}import{Text,Box,useInput,useApp}from'ink';import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a4_0x137372 from'ink-spinner';export function AuthServer(){const _0x144a87=a4_0x21fb,{exit:_0x4b262d}=useApp(),[_0x1ef700,_0x2a0c8f]=useState(![]),[_0x28e888,_0x35a4ba]=useState(!![]),[_0x10ce4b,_0x57a838]=useState(![]),[_0x25a699,_0x233d3b]=useState(![]);useEffect(()=>{const _0x2cbf07=a4_0x21fb;getIsSessionValid()[_0x2cbf07(0xb6)](_0x2a0c8f)['finally'](()=>_0x35a4ba(![]));},[]),useEffect(()=>{const _0x25b54f=a4_0x21fb;!_0x28e888&&_0x1ef700&&(console[_0x25b54f(0xc3)](_0x25b54f(0xbc)),_0x4b262d());},[_0x28e888,_0x1ef700,_0x4b262d]),useEffect(()=>{const _0x5a6980=a4_0x21fb;_0x25a699&&(console[_0x5a6980(0xc3)](_0x5a6980(0xbd)),_0x4b262d());},[_0x25a699,_0x4b262d]),useInput((_0x16ec02,_0x4d9516)=>{const _0x3fa62d=a4_0x21fb;_0x4d9516[_0x3fa62d(0xb9)]&&(_0x57a838(!![]),authServer({'silent':!![]})[_0x3fa62d(0xb6)](_0xb98712=>{_0x233d3b(_0xb98712);})),_0x16ec02==='q'&&_0x4b262d();});if(_0x28e888)return null;if(_0x1ef700||_0x25a699)return null;return a4_0xdaf333(Box,{'flexDirection':_0x144a87(0xc5),'marginTop':0x1,'marginBottom':0x1,'children':_0x10ce4b?a4_0x1e0cbe(Box,{'children':[a4_0xdaf333(Box,{'width':'1'}),a4_0x1e0cbe(Text,{'color':_0x144a87(0xbf),'children':[a4_0xdaf333(a4_0x137372,{'type':'dots'}),'\x20\x20']}),a4_0xdaf333(Text,{'children':_0x144a87(0xc4)}),a4_0xdaf333(Text,{'color':_0x144a87(0xc0),'children':_0x144a87(0xb5)})]}):a4_0x1e0cbe(Box,{'children':[a4_0xdaf333(Box,{'width':'1'}),a4_0xdaf333(Text,{'children':_0x144a87(0xc9)}),a4_0xdaf333(Text,{'color':_0x144a87(0xc0),'children':_0x144a87(0xbb)})]})});}
1
+ (function(_0x419728,_0x7b0ac8){const _0x9de0ae=a4_0x29f0,_0x3a015d=_0x419728();while(!![]){try{const _0x3a092f=-parseInt(_0x9de0ae(0x1a8))/0x1*(parseInt(_0x9de0ae(0x1a9))/0x2)+parseInt(_0x9de0ae(0x1aa))/0x3*(parseInt(_0x9de0ae(0x1b0))/0x4)+-parseInt(_0x9de0ae(0x1b4))/0x5+-parseInt(_0x9de0ae(0x1b3))/0x6*(-parseInt(_0x9de0ae(0x1b5))/0x7)+parseInt(_0x9de0ae(0x1a6))/0x8+-parseInt(_0x9de0ae(0x1b2))/0x9+parseInt(_0x9de0ae(0x1a7))/0xa;if(_0x3a092f===_0x7b0ac8)break;else _0x3a015d['push'](_0x3a015d['shift']());}catch(_0x1d3460){_0x3a015d['push'](_0x3a015d['shift']());}}}(a4_0x23af,0x9ec01));import{jsx as a4_0x52d673,jsxs as a4_0x5e0e31}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';function a4_0x29f0(_0x530214,_0x293879){_0x530214=_0x530214-0x1a5;const _0x23af4b=a4_0x23af();let _0x29f021=_0x23af4b[_0x530214];return _0x29f021;}import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';function a4_0x23af(){const _0x45d0cd=['380WkDGkz','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','8355591HFIEXH','179016LsSwCP','828200xYMfiq','133KLBMVy','finally','3032592lJzXfp','19133530FTChet','1120826atKeli','2iwkvpW','183RQZlXu','*\x20Press\x20Enter\x20to\x20start\x20login.','gray','then','Logging\x20in...\x20','log'];a4_0x23af=function(){return _0x45d0cd;};return a4_0x23af();}import a4_0xa8314a from'ink-spinner';export function AuthServer(){const _0x30d1ff=a4_0x29f0,{exit:_0x2b136a}=useApp(),[_0x2b2009,_0x51fa83]=useState(![]),[_0x237af1,_0x51bd20]=useState(!![]),[_0x330f7b,_0x8fc1ef]=useState(![]),[_0x32fc61,_0x364a4e]=useState(![]);useEffect(()=>{const _0x14d9e5=a4_0x29f0;getIsSessionValid()['then'](_0x51fa83)[_0x14d9e5(0x1a5)](()=>_0x51bd20(![]));},[]),useEffect(()=>{const _0x2b8ed6=a4_0x29f0;!_0x237af1&&_0x2b2009&&(console[_0x2b8ed6(0x1af)](_0x2b8ed6(0x1b1)),_0x2b136a());},[_0x237af1,_0x2b2009,_0x2b136a]),useEffect(()=>{const _0x2e8024=a4_0x29f0;_0x32fc61&&(console[_0x2e8024(0x1af)]('*\x20Login\x20successful!'),_0x2b136a());},[_0x32fc61,_0x2b136a]),useInput((_0x5efe14,_0x576e24)=>{const _0x4d1e07=a4_0x29f0;_0x576e24['return']&&(_0x8fc1ef(!![]),authServer({'silent':!![]})[_0x4d1e07(0x1ad)](_0x20be11=>{_0x364a4e(_0x20be11);})),_0x5efe14==='q'&&_0x2b136a();});if(_0x237af1)return null;if(_0x2b2009||_0x32fc61)return null;return a4_0x52d673(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':_0x330f7b?a4_0x5e0e31(Box,{'children':[a4_0x52d673(Box,{'width':'1'}),a4_0x5e0e31(Text,{'color':'green','children':[a4_0x52d673(a4_0xa8314a,{'type':'dots'}),'\x20\x20']}),a4_0x52d673(Text,{'children':_0x30d1ff(0x1ae)}),a4_0x52d673(Text,{'color':_0x30d1ff(0x1ac),'children':'Please\x20complete\x20login\x20in\x20your\x20browser.'})]}):a4_0x5e0e31(Box,{'children':[a4_0x52d673(Box,{'width':'1'}),a4_0x52d673(Text,{'children':_0x30d1ff(0x1ab)}),a4_0x52d673(Text,{'color':_0x30d1ff(0x1ac),'children':'Press\x20\x22q\x22\x20to\x20exit.'})]})});}
@@ -1 +1 @@
1
- function a5_0xcc87(_0x29e43e,_0x578096){_0x29e43e=_0x29e43e-0x1b3;const _0x6d05e3=a5_0x6d05();let _0xcc87=_0x6d05e3[_0x29e43e];return _0xcc87;}const a5_0x1c62a2=a5_0xcc87;function a5_0x6d05(){const _0xe2118e=['port','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','<span\x20id=\x22t\x22>5</span>','address','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>','https://g.yuntooai.com/cert/lovrabet-dev.json','1659670ViClqG','catch','user','1909269BUbsUn','6zFMluq','close','cookie','then','text/html;\x20charset=utf-8','11ccsXon','open\x20\x22','861538IFiAzE','writeHead','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','end','Auth\x20server\x20error:','https://dev.lovrabet.com:','json','platform','21936830lTLEmO','\x20seconds.','946722wXeyUB','win32','start\x20\x22\x22\x20\x22','log','Login\x20Successful','error','listen','3834971kIGLaD','xdg-open\x20\x22','/sign-in?redirect=','8uFsNSs','Login\x20successful.\x20Please\x20return\x20to\x20the\x20CLI\x20to\x20continue.\x20This\x20window\x20will\x20close\x20in\x20','session','🔐\x20Starting\x20login\x20service...','isAuth','darwin','22647bUAABr','308jWYBNY','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'];a5_0x6d05=function(){return _0xe2118e;};return a5_0x6d05();}(function(_0x16c584,_0x4c5b2e){const _0x195e6b=a5_0xcc87,_0x22ba5f=_0x16c584();while(!![]){try{const _0x16ba57=-parseInt(_0x195e6b(0x1b4))/0x1+parseInt(_0x195e6b(0x1be))/0x2+-parseInt(_0x195e6b(0x1ce))/0x3*(parseInt(_0x195e6b(0x1cf))/0x4)+parseInt(_0x195e6b(0x1d8))/0x5*(-parseInt(_0x195e6b(0x1dc))/0x6)+-parseInt(_0x195e6b(0x1c5))/0x7*(parseInt(_0x195e6b(0x1c8))/0x8)+parseInt(_0x195e6b(0x1db))/0x9+-parseInt(_0x195e6b(0x1bc))/0xa*(-parseInt(_0x195e6b(0x1e1))/0xb);if(_0x16ba57===_0x4c5b2e)break;else _0x22ba5f['push'](_0x22ba5f['shift']());}catch(_0x3e07e8){_0x22ba5f['push'](_0x22ba5f['shift']());}}}(a5_0x6d05,0x87e2b));import{writeFileSync}from'node:fs';import a5_0x2f1cc1 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';export async function authServer(_0x4694ee){const _0x1e6980=a5_0xcc87,_0xcec25f=_0x4694ee?.['silent']||![];if(await getIsSessionValid())return!![];const _0x2149ea=await(await fetch(_0x1e6980(0x1d7)))[_0x1e6980(0x1ba)]();return new Promise(async(_0x167d57,_0x2bcf8b)=>{const _0x1b6e8e=_0x1e6980;let _0x55495a=0x0;const _0x324803=a5_0x2f1cc1['createServer'](_0x2149ea,async(_0x57cdfa,_0xbeb4c0)=>{const _0x1df2dd=a5_0xcc87,_0x26cb58=getUserDomain(),_0x274fa4=_0x57cdfa['headers'][_0x1df2dd(0x1de)]||'',_0x4c1648=await fetch(_0x26cb58+'/api/auth/get-session',{'headers':{'cookie':_0x274fa4}})[_0x1df2dd(0x1df)](_0xbf5cad=>_0xbf5cad[_0x1df2dd(0x1ba)]()),_0xeee96a=_0x4c1648&&_0x4c1648[_0x1df2dd(0x1ca)]&&_0x4c1648[_0x1df2dd(0x1da)];if(_0xeee96a){writeFileSync(cookieFile,_0x274fa4,'utf-8'),_0x167d57(!![]);const _0x324a47=_0x1df2dd(0x1c2),_0x188214=_0x1df2dd(0x1c9)+_0x1df2dd(0x1d3)+_0x1df2dd(0x1bd),_0x437e38=_0x1df2dd(0x1b6),_0x27a6c0='<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>'+_0x324a47+'</title></head>\x0a<body>\x0a\x20\x20<div>'+_0x188214+_0x1df2dd(0x1d6)+_0x437e38+'</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>';_0xbeb4c0['writeHead'](0xc8,{'Content-Type':_0x1df2dd(0x1e0)}),_0xbeb4c0[_0x1df2dd(0x1b7)](_0x27a6c0),_0x324803[_0x1df2dd(0x1dd)]();}else{const _0x4c1094=''+encodeURIComponent(_0x1df2dd(0x1b9)+_0x55495a);_0xbeb4c0[_0x1df2dd(0x1b5)](0x12e,{'location':_0x26cb58+_0x1df2dd(0x1c7)+_0x4c1094}),_0xbeb4c0[_0x1df2dd(0x1b7)]();return;}});_0x324803[_0x1b6e8e(0x1c4)](0x0,'127.0.0.1',()=>{const _0x2453a7=_0x1b6e8e,_0x55c8d9=_0x324803[_0x2453a7(0x1d4)]();_0x55495a=typeof _0x55c8d9==='object'&&_0x55c8d9?_0x55c8d9[_0x2453a7(0x1d1)]:Number(_0x55c8d9);const _0xff345b=_0x2453a7(0x1b9)+_0x55495a;!_0xcec25f&&(console[_0x2453a7(0x1c1)](_0x2453a7(0x1cb)),console['log']('📍\x20Login\x20URL:',_0xff345b),console[_0x2453a7(0x1c1)](_0x2453a7(0x1d2)),console[_0x2453a7(0x1c1)](''),console[_0x2453a7(0x1c1)]('💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.'),console[_0x2453a7(0x1c1)]('')),openInBrowser(_0xff345b)[_0x2453a7(0x1df)](_0xa60351=>{const _0x332008=_0x2453a7;!_0xcec25f&&(_0xa60351?console[_0x332008(0x1c1)]('✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console[_0x332008(0x1c1)](_0x332008(0x1d0)),console[_0x332008(0x1c1)](_0x332008(0x1d5),_0xff345b)),console[_0x332008(0x1c1)](''));})[_0x2453a7(0x1d9)](()=>{const _0x519925=_0x2453a7;!_0xcec25f&&(console[_0x519925(0x1c1)](_0x519925(0x1d0)),console[_0x519925(0x1c1)](_0x519925(0x1d5),_0xff345b),console['log'](''));});}),_0x324803['on'](_0x1b6e8e(0x1c3),_0x3d9b6f=>{const _0x1d7980=_0x1b6e8e;!_0xcec25f&&console[_0x1d7980(0x1c3)](_0x1d7980(0x1b8),_0x3d9b6f),_0x2bcf8b(_0x3d9b6f);});});}function openInBrowser(_0x2ac02d){return new Promise(_0x230987=>{const _0x585a6c=a5_0xcc87,_0x57eb16=process[_0x585a6c(0x1bb)];let _0x3cdb90;if(_0x57eb16===_0x585a6c(0x1bf))_0x3cdb90=_0x585a6c(0x1c0)+_0x2ac02d+'\x22';else _0x57eb16===_0x585a6c(0x1cd)?_0x3cdb90=_0x585a6c(0x1b3)+_0x2ac02d+'\x22':_0x3cdb90=_0x585a6c(0x1c6)+_0x2ac02d+'\x22';exec(_0x3cdb90,_0x12776c=>{_0x12776c?_0x230987(![]):_0x230987(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a5_0x1c62a2(0x1c1)](a5_0x1c62a2(0x1cc),isAuth);}
1
+ const a5_0x28b44d=a5_0x5370;(function(_0x2c9bcc,_0x5d87ca){const _0x5d6d51=a5_0x5370,_0x183b64=_0x2c9bcc();while(!![]){try{const _0x4b1212=-parseInt(_0x5d6d51(0xc0))/0x1+parseInt(_0x5d6d51(0xa7))/0x2*(-parseInt(_0x5d6d51(0xae))/0x3)+-parseInt(_0x5d6d51(0xa8))/0x4*(parseInt(_0x5d6d51(0xd0))/0x5)+parseInt(_0x5d6d51(0xc4))/0x6+parseInt(_0x5d6d51(0xab))/0x7+parseInt(_0x5d6d51(0xb1))/0x8*(parseInt(_0x5d6d51(0xc9))/0x9)+parseInt(_0x5d6d51(0xb7))/0xa;if(_0x4b1212===_0x5d87ca)break;else _0x183b64['push'](_0x183b64['shift']());}catch(_0x1a906a){_0x183b64['push'](_0x183b64['shift']());}}}(a5_0x17dd,0x7672d));import{writeFileSync}from'node:fs';import a5_0x1413f4 from'node:https';import{getUserDomain}from'../constant/domain.js';import{exec}from'node:child_process';function a5_0x5370(_0x6960b5,_0x4a8860){_0x6960b5=_0x6960b5-0xa1;const _0x17dd33=a5_0x17dd();let _0x5370b6=_0x17dd33[_0x6960b5];return _0x5370b6;}import{getIsSessionValid}from'./is-session-valid.js';import{cookieFile}from'./constant.js';function a5_0x17dd(){const _0x14eee7=['headers','2035235uciyTW','listen','utf-8','error','https://g.yuntooai.com/cert/lovrabet-dev.json','text/html;\x20charset=utf-8','Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.','127.0.0.1','15958tAVQyL','4nheske','isAuth','✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.','2027662VGCsBB','user','createServer','57pZjxnx','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','session','112ndrZoX','🔐\x20Starting\x20login\x20service...','silent','Login\x20successful.\x20Please\x20return\x20to\x20the\x20CLI\x20to\x20continue.\x20This\x20window\x20will\x20close\x20in\x20','close','cookie','7665150LbhqRl','win32','address','https://dev.lovrabet.com:','\x20seconds.','json','⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically','log','/sign-in?redirect=','265153egGXDo','🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...','darwin','object','443694yMMEHJ','start\x20\x22\x22\x20\x22','then','writeHead','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','114966WloVlI','Login\x20Successful','📍\x20Login\x20URL:','</div>\x0a\x20\x20<script>\x0a\x20\x20(function(){\x0a\x20\x20\x20\x20var\x20t\x20=\x205;\x0a\x20\x20\x20\x20var\x20el\x20=\x20document.getElementById(\x27t\x27);\x0a\x20\x20\x20\x20var\x20manual\x20=\x20document.getElementById(\x27manualMsg\x27);\x0a\x20\x20\x20\x20var\x20id\x20=\x20setInterval(function(){\x0a\x20\x20\x20\x20\x20\x20t--;\x0a\x20\x20\x20\x20\x20\x20if\x20(t\x20<=\x200)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20clearInterval(id);\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20\x270\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20try\x20{\x20window.close();\x20}\x20catch(e)\x20{}\x0a\x20\x20\x20\x20\x20\x20\x20\x20//\x20如果自动关闭无效,显示文本提示让用户手动关闭\x0a\x20\x20\x20\x20\x20\x20\x20\x20setTimeout(function(){\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20if\x20(!window.closed)\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20manual.style.display\x20=\x20\x27block\x27;\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20\x20\x20\x20\x20},\x20300);\x0a\x20\x20\x20\x20\x20\x20}\x20else\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20el.textContent\x20=\x20String(t);\x0a\x20\x20\x20\x20\x20\x20}\x0a\x20\x20\x20\x20},\x201000);\x0a\x20\x20})();\x0a\x20\x20</script>\x0a</body>\x0a</html>','end','xdg-open\x20\x22'];a5_0x17dd=function(){return _0x14eee7;};return a5_0x17dd();}export async function authServer(_0x4cc0aa){const _0x2ed6be=a5_0x5370,_0x4296c4=_0x4cc0aa?.[_0x2ed6be(0xb3)]||![];if(await getIsSessionValid())return!![];const _0xb0bf79=await(await fetch(_0x2ed6be(0xa3)))[_0x2ed6be(0xbc)]();return new Promise(async(_0x53c960,_0x1ae599)=>{const _0x2b5965=_0x2ed6be;let _0x66d688=0x0;const _0x48db39=a5_0x1413f4[_0x2b5965(0xad)](_0xb0bf79,async(_0x258614,_0x31cfbd)=>{const _0x32cb71=_0x2b5965,_0x4e8e1b=getUserDomain(),_0x557fda=_0x258614[_0x32cb71(0xcf)][_0x32cb71(0xb6)]||'',_0x57b263=await fetch(_0x4e8e1b+'/api/auth/get-session',{'headers':{'cookie':_0x557fda}})[_0x32cb71(0xc6)](_0x44b4ac=>_0x44b4ac['json']()),_0x3c5d7f=_0x57b263&&_0x57b263[_0x32cb71(0xb0)]&&_0x57b263[_0x32cb71(0xac)];if(_0x3c5d7f){writeFileSync(cookieFile,_0x557fda,_0x32cb71(0xa1)),_0x53c960(!![]);const _0x393673=_0x32cb71(0xca),_0x3073d7=_0x32cb71(0xb4)+'<span\x20id=\x22t\x22>5</span>'+_0x32cb71(0xbb),_0x4d70aa=_0x32cb71(0xa5),_0x24d5bb='<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>'+_0x393673+'</title></head>\x0a<body>\x0a\x20\x20<div>'+_0x3073d7+'</div>\x0a\x20\x20<div\x20id=\x22manualMsg\x22\x20style=\x22display:none;margin-top:10px;color:#d00;\x22>'+_0x4d70aa+_0x32cb71(0xcc);_0x31cfbd[_0x32cb71(0xc7)](0xc8,{'Content-Type':_0x32cb71(0xa4)}),_0x31cfbd['end'](_0x24d5bb),_0x48db39[_0x32cb71(0xb5)]();}else{const _0xf1b010=''+encodeURIComponent(_0x32cb71(0xba)+_0x66d688);_0x31cfbd[_0x32cb71(0xc7)](0x12e,{'location':_0x4e8e1b+_0x32cb71(0xbf)+_0xf1b010}),_0x31cfbd[_0x32cb71(0xcd)]();return;}});_0x48db39[_0x2b5965(0xd1)](0x0,_0x2b5965(0xa6),()=>{const _0x2c2ce0=_0x2b5965,_0x75af83=_0x48db39[_0x2c2ce0(0xb9)]();_0x66d688=typeof _0x75af83===_0x2c2ce0(0xc3)&&_0x75af83?_0x75af83['port']:Number(_0x75af83);const _0x510aaf='https://dev.lovrabet.com:'+_0x66d688;!_0x4296c4&&(console[_0x2c2ce0(0xbe)](_0x2c2ce0(0xb2)),console['log'](_0x2c2ce0(0xcb),_0x510aaf),console[_0x2c2ce0(0xbe)](_0x2c2ce0(0xc1)),console[_0x2c2ce0(0xbe)](''),console[_0x2c2ce0(0xbe)](_0x2c2ce0(0xc8)),console['log']('')),openInBrowser(_0x510aaf)[_0x2c2ce0(0xc6)](_0x4d7456=>{const _0x11734d=_0x2c2ce0;!_0x4296c4&&(_0x4d7456?console[_0x11734d(0xbe)](_0x11734d(0xaa)):(console['log'](_0x11734d(0xbd)),console[_0x11734d(0xbe)](_0x11734d(0xaf),_0x510aaf)),console[_0x11734d(0xbe)](''));})['catch'](()=>{const _0x5966be=_0x2c2ce0;!_0x4296c4&&(console[_0x5966be(0xbe)]('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x5966be(0xbe)](_0x5966be(0xaf),_0x510aaf),console['log'](''));});}),_0x48db39['on'](_0x2b5965(0xa2),_0x91d3e8=>{const _0x132da2=_0x2b5965;!_0x4296c4&&console[_0x132da2(0xa2)]('Auth\x20server\x20error:',_0x91d3e8),_0x1ae599(_0x91d3e8);});});}function openInBrowser(_0x3b451c){return new Promise(_0x2d62c2=>{const _0x301f9c=a5_0x5370,_0x2ce227=process['platform'];let _0x41a8e3;if(_0x2ce227===_0x301f9c(0xb8))_0x41a8e3=_0x301f9c(0xc5)+_0x3b451c+'\x22';else _0x2ce227===_0x301f9c(0xc2)?_0x41a8e3='open\x20\x22'+_0x3b451c+'\x22':_0x41a8e3=_0x301f9c(0xce)+_0x3b451c+'\x22';exec(_0x41a8e3,_0x3dc2b2=>{_0x3dc2b2?_0x2d62c2(![]):_0x2d62c2(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a5_0x28b44d(0xbe)](a5_0x28b44d(0xa9),isAuth);}
@@ -1 +1 @@
1
- const a6_0x109463=a6_0x1114;(function(_0x41da1f,_0x1ff4e7){const _0x2ed82b=a6_0x1114,_0x3fb7ee=_0x41da1f();while(!![]){try{const _0x151ce4=parseInt(_0x2ed82b(0x13f))/0x1*(-parseInt(_0x2ed82b(0x140))/0x2)+-parseInt(_0x2ed82b(0x13e))/0x3+-parseInt(_0x2ed82b(0x13d))/0x4+parseInt(_0x2ed82b(0x141))/0x5+-parseInt(_0x2ed82b(0x145))/0x6*(parseInt(_0x2ed82b(0x146))/0x7)+-parseInt(_0x2ed82b(0x144))/0x8+parseInt(_0x2ed82b(0x147))/0x9;if(_0x151ce4===_0x1ff4e7)break;else _0x3fb7ee['push'](_0x3fb7ee['shift']());}catch(_0xa7acc1){_0x3fb7ee['push'](_0x3fb7ee['shift']());}}}(a6_0x552a,0x2a984));function a6_0x552a(){const _0x44bf6=['cookie','.lovrabet','383944rlpxyy','42204tXSxzU','210PraOiJ','10243557bsqHYi','1265032HyvVql','1014024Hekvai','8uFrZgR','83988ijkJtl','1427630mXxeKS'];a6_0x552a=function(){return _0x44bf6;};return a6_0x552a();}import{mkdirSync}from'node:fs';import{homedir}from'node:os';import{join}from'node:path';export const configDir=join(homedir(),a6_0x109463(0x143));export const cookieFile=join(configDir,a6_0x109463(0x142));function a6_0x1114(_0x4d3384,_0x237936){_0x4d3384=_0x4d3384-0x13d;const _0x552aa8=a6_0x552a();let _0x1114b7=_0x552aa8[_0x4d3384];return _0x1114b7;}mkdirSync(configDir,{'recursive':!![]});
1
+ const a6_0x485560=a6_0x17e6;(function(_0x35f582,_0x246866){const _0x2869a7=a6_0x17e6,_0x586f6e=_0x35f582();while(!![]){try{const _0x40eac2=parseInt(_0x2869a7(0xbb))/0x1*(parseInt(_0x2869a7(0xbd))/0x2)+parseInt(_0x2869a7(0xc0))/0x3*(-parseInt(_0x2869a7(0xc1))/0x4)+-parseInt(_0x2869a7(0xc6))/0x5*(parseInt(_0x2869a7(0xc3))/0x6)+parseInt(_0x2869a7(0xbf))/0x7+-parseInt(_0x2869a7(0xc5))/0x8+parseInt(_0x2869a7(0xbe))/0x9+parseInt(_0x2869a7(0xc4))/0xa*(parseInt(_0x2869a7(0xbc))/0xb);if(_0x40eac2===_0x246866)break;else _0x586f6e['push'](_0x586f6e['shift']());}catch(_0x29e7f5){_0x586f6e['push'](_0x586f6e['shift']());}}}(a6_0x5b55,0x91b0b));import{mkdirSync}from'node:fs';function a6_0x17e6(_0x308b8c,_0x48276b){_0x308b8c=_0x308b8c-0xbb;const _0x5b5548=a6_0x5b55();let _0x17e6e0=_0x5b5548[_0x308b8c];return _0x17e6e0;}import{homedir}from'node:os';function a6_0x5b55(){const _0x45d172=['3992428WBUWQR','6JKmShS','1538217pkpIPU','7637287QmZyHL','10899qIdfjn','28ivYCFk','cookie','1362BrMgHv','20yckyFu','4516152fLPNKH','18285KpCZil','9662dIoGxt'];a6_0x5b55=function(){return _0x45d172;};return a6_0x5b55();}import{join}from'node:path';export const configDir=join(homedir(),'.lovrabet');export const cookieFile=join(configDir,a6_0x485560(0xc2));mkdirSync(configDir,{'recursive':!![]});
@@ -1 +1 @@
1
- function a7_0x1c7d(){var _0x2a7ccd=['15adDPJY','8jiyJfF','5465251zCmNHo','1531624RajDFz','utf-8','990GWZeND','20259fuzRFo','750716ThYvWd','328710dcXFUG','14DMysgn','1463916hjtZlw','136829rAUlDI'];a7_0x1c7d=function(){return _0x2a7ccd;};return a7_0x1c7d();}(function(_0x560975,_0x3618d4){var _0x523a77=a7_0x84b1,_0x31203f=_0x560975();while(!![]){try{var _0x2f09a6=-parseInt(_0x523a77(0x176))/0x1*(parseInt(_0x523a77(0x178))/0x2)+-parseInt(_0x523a77(0x173))/0x3+parseInt(_0x523a77(0x172))/0x4*(parseInt(_0x523a77(0x177))/0x5)+-parseInt(_0x523a77(0x175))/0x6+-parseInt(_0x523a77(0x174))/0x7*(-parseInt(_0x523a77(0x17a))/0x8)+-parseInt(_0x523a77(0x171))/0x9*(parseInt(_0x523a77(0x17c))/0xa)+parseInt(_0x523a77(0x179))/0xb;if(_0x2f09a6===_0x3618d4)break;else _0x31203f['push'](_0x31203f['shift']());}catch(_0x1b77c3){_0x31203f['push'](_0x31203f['shift']());}}}(a7_0x1c7d,0x4de57));function a7_0x84b1(_0x45b7f7,_0x44d5c3){_0x45b7f7=_0x45b7f7-0x171;var _0x1c7d1d=a7_0x1c7d();var _0x84b152=_0x1c7d1d[_0x45b7f7];return _0x84b152;}import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0xb5df28=a7_0x84b1;try{return readFileSync(cookieFile,_0xb5df28(0x17b));}catch{}return'';}
1
+ (function(_0x885231,_0x801a33){var _0x537b25=a7_0x2310,_0xa3069f=_0x885231();while(!![]){try{var _0x1260da=parseInt(_0x537b25(0xff))/0x1+-parseInt(_0x537b25(0x101))/0x2+-parseInt(_0x537b25(0x100))/0x3+-parseInt(_0x537b25(0x102))/0x4*(parseInt(_0x537b25(0x109))/0x5)+parseInt(_0x537b25(0x106))/0x6*(-parseInt(_0x537b25(0x108))/0x7)+-parseInt(_0x537b25(0x107))/0x8*(-parseInt(_0x537b25(0x105))/0x9)+-parseInt(_0x537b25(0x103))/0xa*(-parseInt(_0x537b25(0x10a))/0xb);if(_0x1260da===_0x801a33)break;else _0xa3069f['push'](_0xa3069f['shift']());}catch(_0x8135eb){_0xa3069f['push'](_0xa3069f['shift']());}}}(a7_0x4130,0xf067b));function a7_0x4130(){var _0x227b08=['7702084pEvRiy','930hVZbuB','utf-8','9JtOUqz','27456VvOFTI','8516696irYiuO','1743lcrNdk','5DNktGn','508629ERTSgj','589412nEeOeW','5510229DlVenn','135678yxrOpn'];a7_0x4130=function(){return _0x227b08;};return a7_0x4130();}import{readFileSync}from'node:fs';function a7_0x2310(_0x57a8ff,_0x2b9922){_0x57a8ff=_0x57a8ff-0xff;var _0x413083=a7_0x4130();var _0x231009=_0x413083[_0x57a8ff];return _0x231009;}import{cookieFile}from'./constant.js';export function getCookie(){var _0x416836=a7_0x2310;try{return readFileSync(cookieFile,_0x416836(0x104));}catch{}return'';}
@@ -0,0 +1 @@
1
+ function a8_0x2f47(){const _0x3b288c=['utf-8','113935cOHijs','user','5668579pSRXKx','24pKcZcb','701583MMTRxl','session','11834649jVYWib','10RfndRg','631056aEQUKj','/api/auth/get-session','5668805cOYdUO','2824114tQYOCC','6LrFgsQ'];a8_0x2f47=function(){return _0x3b288c;};return a8_0x2f47();}(function(_0x4bf37f,_0x5e7519){const _0x4a2d8b=a8_0x213a,_0x530314=_0x4bf37f();while(!![]){try{const _0x20d239=parseInt(_0x4a2d8b(0x169))/0x1+-parseInt(_0x4a2d8b(0x166))/0x2+parseInt(_0x4a2d8b(0x16d))/0x3*(parseInt(_0x4a2d8b(0x16c))/0x4)+parseInt(_0x4a2d8b(0x173))/0x5+parseInt(_0x4a2d8b(0x167))/0x6*(parseInt(_0x4a2d8b(0x16b))/0x7)+parseInt(_0x4a2d8b(0x171))/0x8+-parseInt(_0x4a2d8b(0x16f))/0x9*(parseInt(_0x4a2d8b(0x170))/0xa);if(_0x20d239===_0x5e7519)break;else _0x530314['push'](_0x530314['shift']());}catch(_0x28b68d){_0x530314['push'](_0x530314['shift']());}}}(a8_0x2f47,0xc65eb));import{existsSync,readFileSync}from'node:fs';function a8_0x213a(_0x47a334,_0x5a670a){_0x47a334=_0x47a334-0x166;const _0x2f47d7=a8_0x2f47();let _0x213a4c=_0x2f47d7[_0x47a334];return _0x213a4c;}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getSessionUserInfo(){const _0x5abb0e=a8_0x213a;try{if(!existsSync(cookieFile))return null;const _0x4bb1f7=readFileSync(cookieFile,_0x5abb0e(0x168)),_0x18f2d8=await fetch(getUserDomain()+_0x5abb0e(0x172),{'headers':{'cookie':_0x4bb1f7}});if(!_0x18f2d8['ok'])return null;const _0x44c93a=await _0x18f2d8['json']();if(!_0x44c93a[_0x5abb0e(0x16e)]||!_0x44c93a[_0x5abb0e(0x16a)])return null;return _0x44c93a;}catch{return null;}}
@@ -1 +1 @@
1
- (function(_0x4be220,_0x38a582){const _0x315a82=a8_0x3d98,_0xf066b5=_0x4be220();while(!![]){try{const _0x7967c5=-parseInt(_0x315a82(0x1e3))/0x1*(parseInt(_0x315a82(0x1e9))/0x2)+-parseInt(_0x315a82(0x1db))/0x3*(-parseInt(_0x315a82(0x1e2))/0x4)+-parseInt(_0x315a82(0x1dc))/0x5*(parseInt(_0x315a82(0x1da))/0x6)+-parseInt(_0x315a82(0x1e6))/0x7*(parseInt(_0x315a82(0x1dd))/0x8)+parseInt(_0x315a82(0x1e7))/0x9*(-parseInt(_0x315a82(0x1e1))/0xa)+-parseInt(_0x315a82(0x1ea))/0xb+parseInt(_0x315a82(0x1e4))/0xc*(parseInt(_0x315a82(0x1ec))/0xd);if(_0x7967c5===_0x38a582)break;else _0xf066b5['push'](_0xf066b5['shift']());}catch(_0x34d45b){_0xf066b5['push'](_0xf066b5['shift']());}}}(a8_0x2c67,0x4f984));import{existsSync,readFileSync}from'node:fs';function a8_0x3d98(_0x1e2923,_0x1768a7){_0x1e2923=_0x1e2923-0x1da;const _0x2c6730=a8_0x2c67();let _0x3d98ad=_0x2c6730[_0x1e2923];return _0x3d98ad;}import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a8_0x2c67(){const _0x2f44ea=['23827848tEoNAl','utf-8','7QRMhZY','5363433AQCkqQ','then','562ugGMJC','5094463lNCamU','user','13LBQTZv','1032204lIHwEb','39hAfvjm','10ZoasPX','334520uxMcTf','/api/auth/get-session','json','session','10ZPKidv','9944zDHzhf','879TmACzt'];a8_0x2c67=function(){return _0x2f44ea;};return a8_0x2c67();}export async function getIsSessionValid(){const _0xfc6626=a8_0x3d98;try{if(!existsSync(cookieFile))return![];const _0x27a320=readFileSync(cookieFile,_0xfc6626(0x1e5)),_0x4feca7=await fetch(getUserDomain()+_0xfc6626(0x1de),{'headers':{'cookie':_0x27a320}})[_0xfc6626(0x1e8)](_0x1e2371=>_0x1e2371[_0xfc6626(0x1df)]());return _0x4feca7&&_0x4feca7[_0xfc6626(0x1e0)]&&_0x4feca7[_0xfc6626(0x1eb)];}catch{}return![];}
1
+ (function(_0x3b108b,_0xbd36de){const _0x16e7f3=a9_0x25a5,_0x3a135f=_0x3b108b();while(!![]){try{const _0x9b99bf=parseInt(_0x16e7f3(0x1a4))/0x1+-parseInt(_0x16e7f3(0x1a6))/0x2*(-parseInt(_0x16e7f3(0x1ab))/0x3)+-parseInt(_0x16e7f3(0x1b1))/0x4+parseInt(_0x16e7f3(0x1a8))/0x5*(-parseInt(_0x16e7f3(0x1b0))/0x6)+parseInt(_0x16e7f3(0x1a5))/0x7*(parseInt(_0x16e7f3(0x1a3))/0x8)+parseInt(_0x16e7f3(0x1a9))/0x9+parseInt(_0x16e7f3(0x1ac))/0xa*(-parseInt(_0x16e7f3(0x1a7))/0xb);if(_0x9b99bf===_0xbd36de)break;else _0x3a135f['push'](_0x3a135f['shift']());}catch(_0xdcb3ac){_0x3a135f['push'](_0x3a135f['shift']());}}}(a9_0x24c0,0xae6a3));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';function a9_0x24c0(){const _0x1ff009=['2917892RiEFhy','json','utf-8','120grdPlg','684977iKlSLl','563297zVehPK','10iCSJOu','1916959PsAZoS','20wEIHAb','9746775ziTVyX','user','48342YtYyVG','30sgpBAC','then','/api/auth/get-session','session','1633356fNhwBX'];a9_0x24c0=function(){return _0x1ff009;};return a9_0x24c0();}function a9_0x25a5(_0x567584,_0x2e65dd){_0x567584=_0x567584-0x1a2;const _0x24c030=a9_0x24c0();let _0x25a592=_0x24c030[_0x567584];return _0x25a592;}export async function getIsSessionValid(){const _0x3eaec3=a9_0x25a5;try{if(!existsSync(cookieFile))return![];const _0x4d4075=readFileSync(cookieFile,_0x3eaec3(0x1a2)),_0x175f7c=await fetch(getUserDomain()+_0x3eaec3(0x1ae),{'headers':{'cookie':_0x4d4075}})[_0x3eaec3(0x1ad)](_0x5c6146=>_0x5c6146[_0x3eaec3(0x1b2)]());return _0x175f7c&&_0x175f7c[_0x3eaec3(0x1af)]&&_0x175f7c[_0x3eaec3(0x1aa)];}catch{}return![];}
@@ -1 +1 @@
1
- (function(_0x31f935,_0x3ed9b9){var _0x1c0067=a9_0xff15,_0x4bc4c0=_0x31f935();while(!![]){try{var _0x238718=parseInt(_0x1c0067(0xd1))/0x1*(-parseInt(_0x1c0067(0xd3))/0x2)+parseInt(_0x1c0067(0xd5))/0x3*(parseInt(_0x1c0067(0xda))/0x4)+parseInt(_0x1c0067(0xdb))/0x5+-parseInt(_0x1c0067(0xd8))/0x6+parseInt(_0x1c0067(0xd4))/0x7*(parseInt(_0x1c0067(0xd6))/0x8)+-parseInt(_0x1c0067(0xd9))/0x9+-parseInt(_0x1c0067(0xd7))/0xa;if(_0x238718===_0x3ed9b9)break;else _0x4bc4c0['push'](_0x4bc4c0['shift']());}catch(_0x318538){_0x4bc4c0['push'](_0x4bc4c0['shift']());}}}(a9_0x3c15,0x49fac));function a9_0xff15(_0x236d06,_0xae738e){_0x236d06=_0x236d06-0xd1;var _0x3c1527=a9_0x3c15();var _0xff15a7=_0x3c1527[_0x236d06];return _0xff15a7;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x2134f1=a9_0xff15;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x2134f1(0xd2)]('✓\x20Logged\x20out')):console[_0x2134f1(0xd2)]('!\x20Not\x20logged\x20in');}function a9_0x3c15(){var _0x13add5=['235746sHNdnS','8LvuJmT','1376420BHpIwA','3mgdnAu','log','276852MqxApk','175EvoMCA','652119vZHQDc','163776AxGTJw','2307080tQUOTZ','1479780HcgqHb'];a9_0x3c15=function(){return _0x13add5;};return a9_0x3c15();}
1
+ function a10_0x83d9(){var _0x15ed8d=['4rbQSFs','1305JpgXnr','6310AtoyWJ','5485VgxJlI','2053150ehqkCZ','78hGaABk','log','!\x20Not\x20logged\x20in','✓\x20Logged\x20out','4EWjfDa','585771Cuxjvj','104235dnkcbr','2551437lPMLMe','3112728tYsVFI'];a10_0x83d9=function(){return _0x15ed8d;};return a10_0x83d9();}(function(_0x3eb04c,_0x10875c){var _0x417a13=a10_0x50b5,_0x113a44=_0x3eb04c();while(!![]){try{var _0x4de11a=-parseInt(_0x417a13(0x173))/0x1*(parseInt(_0x417a13(0x171))/0x2)+parseInt(_0x417a13(0x172))/0x3*(parseInt(_0x417a13(0x176))/0x4)+parseInt(_0x417a13(0x179))/0x5*(-parseInt(_0x417a13(0x17b))/0x6)+parseInt(_0x417a13(0x174))/0x7+-parseInt(_0x417a13(0x175))/0x8+-parseInt(_0x417a13(0x177))/0x9*(-parseInt(_0x417a13(0x178))/0xa)+parseInt(_0x417a13(0x17a))/0xb;if(_0x4de11a===_0x10875c)break;else _0x113a44['push'](_0x113a44['shift']());}catch(_0x5da52c){_0x113a44['push'](_0x113a44['shift']());}}}(a10_0x83d9,0x37317));function a10_0x50b5(_0x460f44,_0x37bce2){_0x460f44=_0x460f44-0x16e;var _0x83d91e=a10_0x83d9();var _0x50b5c0=_0x83d91e[_0x460f44];return _0x50b5c0;}import{unlinkSync,existsSync}from'node:fs';import{cookieFile}from'./constant.js';export function logout(){var _0x4dfaee=a10_0x50b5;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x4dfaee(0x16e)](_0x4dfaee(0x170))):console[_0x4dfaee(0x16e)](_0x4dfaee(0x16f));}
package/lib/cli-flags.js CHANGED
@@ -1 +1 @@
1
- const a10_0x9f30b5=a10_0xbdca;(function(_0xfb8782,_0x20c5c8){const _0x58313d=a10_0xbdca,_0x49f6c8=_0xfb8782();while(!![]){try{const _0x1ab706=-parseInt(_0x58313d(0x6e))/0x1+parseInt(_0x58313d(0x75))/0x2+-parseInt(_0x58313d(0x73))/0x3+parseInt(_0x58313d(0x6f))/0x4*(-parseInt(_0x58313d(0x71))/0x5)+-parseInt(_0x58313d(0x6c))/0x6*(parseInt(_0x58313d(0x6d))/0x7)+parseInt(_0x58313d(0x72))/0x8+parseInt(_0x58313d(0x76))/0x9*(parseInt(_0x58313d(0x74))/0xa);if(_0x1ab706===_0x20c5c8)break;else _0x49f6c8['push'](_0x49f6c8['shift']());}catch(_0x1ea2f6){_0x49f6c8['push'](_0x49f6c8['shift']());}}}(a10_0x4fe0,0xab272));function a10_0x4fe0(){const _0x41aabb=['164110TmIEvW','2771038ZWUIbc','117JijAeM','996DflEUn','7693DtuQSe','682782OSevkk','2044088cCDMVS','boolean','10geohGm','9582920dGSXdy','625275KPlgxz'];a10_0x4fe0=function(){return _0x41aabb;};return a10_0x4fe0();}function a10_0xbdca(_0x40f000,_0x50b205){_0x40f000=_0x40f000-0x6c;const _0x4fe05b=a10_0x4fe0();let _0xbdca47=_0x4fe05b[_0x40f000];return _0xbdca47;}export const dynamicCliFlags={'enableBffSave':{'type':a10_0x9f30b5(0x70)}};
1
+ const a11_0x1704ca=a11_0x347a;function a11_0x347a(_0xda2b8d,_0x489f8c){_0xda2b8d=_0xda2b8d-0x14d;const _0x3dcf3b=a11_0x3dcf();let _0x347abd=_0x3dcf3b[_0xda2b8d];return _0x347abd;}(function(_0x3b19ac,_0x23f088){const _0x1c42f8=a11_0x347a,_0x343328=_0x3b19ac();while(!![]){try{const _0x59d012=-parseInt(_0x1c42f8(0x14d))/0x1+parseInt(_0x1c42f8(0x14f))/0x2*(parseInt(_0x1c42f8(0x154))/0x3)+parseInt(_0x1c42f8(0x151))/0x4+-parseInt(_0x1c42f8(0x150))/0x5+parseInt(_0x1c42f8(0x158))/0x6*(parseInt(_0x1c42f8(0x156))/0x7)+parseInt(_0x1c42f8(0x153))/0x8*(parseInt(_0x1c42f8(0x157))/0x9)+-parseInt(_0x1c42f8(0x152))/0xa*(parseInt(_0x1c42f8(0x155))/0xb);if(_0x59d012===_0x23f088)break;else _0x343328['push'](_0x343328['shift']());}catch(_0x2c8e53){_0x343328['push'](_0x343328['shift']());}}}(a11_0x3dcf,0x90ea5));function a11_0x3dcf(){const _0x194a2a=['25187090ADEtVz','477664imhzce','903051yxMjpm','11PtIjwC','70YKnpxS','135KBcngD','632094YdfaBN','65749ZJrszX','boolean','4pVooeo','1238895CADqFE','3498664eqyQVf'];a11_0x3dcf=function(){return _0x194a2a;};return a11_0x3dcf();}export const dynamicCliFlags={'enableBffSave':{'type':a11_0x1704ca(0x14e)}};
package/lib/cli.js CHANGED
@@ -1,2 +1,2 @@
1
1
  #!/usr/bin/env node
2
- function a11_0x9958(){const _0x203340=['2606454RtTCzy','node:fs','true','run','node:url','passCommandAsArg','4049910aiSjrO','cookie','1325616saGnqg','command','error','module','raw','message','help','2894ZzdKgr','501852NnEOvM','string','utf-8','0.0.0','version','apiDomain','pageSize','boolean','Unexpected\x20error:','parse','runtimeDomain','defaultCommand','LOVRABET_CI','log','./constant/domain.js','stdout','userDomain','⚠\x20`','dynamicCliFlags','RABETBASE_CI','appcode','format','unknownCommand','15026WkFTNm','Hint:\x20','exitCode','slice','./cli-flags.js','exit','./constant/env.js','3370uLMSsE','apiDir','5PGFkMl','nonInteractive','8CqWucc','6701331pemVXc','RABETBASE_APPCODE','input','wildcardModule','appCode','./context.js','env','`\x20in\x20v2.0.\x0a','517cNFdgl','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','hint'];a11_0x9958=function(){return _0x203340;};return a11_0x9958();}const a11_0x1e1867=a11_0x458b;(function(_0x102fd3,_0x24808e){const _0x2bbe95=a11_0x458b,_0x489d73=_0x102fd3();while(!![]){try{const _0x18437b=parseInt(_0x2bbe95(0xd4))/0x1*(parseInt(_0x2bbe95(0xa8))/0x2)+parseInt(_0x2bbe95(0xa1))/0x3+parseInt(_0x2bbe95(0xa9))/0x4*(-parseInt(_0x2bbe95(0xc9))/0x5)+parseInt(_0x2bbe95(0xd7))/0x6+-parseInt(_0x2bbe95(0xcc))/0x7+parseInt(_0x2bbe95(0xcb))/0x8*(-parseInt(_0x2bbe95(0xdd))/0x9)+-parseInt(_0x2bbe95(0xc7))/0xa*(-parseInt(_0x2bbe95(0xc0))/0xb);if(_0x18437b===_0x24808e)break;else _0x489d73['push'](_0x489d73['shift']());}catch(_0x36e57b){_0x489d73['push'](_0x489d73['shift']());}}}(a11_0x9958,0x86c00));import{jsx as a11_0x2b63a8}from'react/jsx-runtime';import a11_0x5b6275 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{createContext}from'./context.js';import{isKnownService,isDeclarativeService,getServiceEntry,findDefinition,getLegacyHandler,deprecatedAliases}from'./commands/registry.js';import{runCommand}from'./framework/runner.js';function a11_0x458b(_0x3a1b5b,_0x2d104c){_0x3a1b5b=_0x3a1b5b-0xa1;const _0x99588b=a11_0x9958();let _0x458bce=_0x99588b[_0x3a1b5b];return _0x458bce;}import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{getCookie}from'./auth/get-cookie.js';import{getApiDomain}from'./constant/domain.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{BUILD_NUMBER}from'./generated/build-info.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a11_0x1e1867(0xc4)))[a11_0x1e1867(0xbb)];}catch{}const helpText=generateFullHelp(),pkgVersion=await((async()=>{const _0x251d48=a11_0x1e1867;try{const {readFileSync:_0x52da36}=await import(_0x251d48(0xd8)),{resolve:_0xf23785,dirname:_0x245861}=await import('node:path'),{fileURLToPath:_0xe0a4e9}=await import(_0x251d48(0xdb)),_0x38d54=_0xf23785(_0x245861(_0xe0a4e9(import.meta.url)),'..'),_0x5e212d=JSON[_0x251d48(0xb2)](_0x52da36(_0xf23785(_0x38d54,'package.json'),_0x251d48(0xab)));return _0x5e212d[_0x251d48(0xad)]||'0.0.0';}catch{return _0x251d48(0xac);}})()),cliVersion=BUILD_NUMBER?pkgVersion+'+'+BUILD_NUMBER:pkgVersion,cli=a11_0x5b6275(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{'help':{'type':a11_0x1e1867(0xb0)},'env':{'type':a11_0x1e1867(0xaa)},'appcode':{'type':a11_0x1e1867(0xaa)},'app':{'type':a11_0x1e1867(0xaa)},'nonInteractive':{'type':a11_0x1e1867(0xb0)},'ci':{'type':a11_0x1e1867(0xb0)},'format':{'type':a11_0x1e1867(0xaa)},'dryRun':{'type':'boolean'},'yes':{'type':a11_0x1e1867(0xb0)},'name':{'type':a11_0x1e1867(0xaa)},'clear':{'type':'boolean'},'watch':{'type':a11_0x1e1867(0xb0)},'output':{'type':'string'},'params':{'type':'string'},'datasetcode':{'type':'string'},'mcpCursor':{'type':a11_0x1e1867(0xb0)},'mcpClaude':{'type':'boolean'},'mcpOther':{'type':a11_0x1e1867(0xb0)},'cursor':{'type':a11_0x1e1867(0xb0)},'windsurf':{'type':'boolean'},'claude':{'type':a11_0x1e1867(0xb0)},'cline':{'type':a11_0x1e1867(0xb0)},'codex':{'type':'boolean'},'opencode':{'type':a11_0x1e1867(0xb0)},'qoder':{'type':a11_0x1e1867(0xb0)},'codebuddy':{'type':a11_0x1e1867(0xb0)},'trae':{'type':'boolean'},'agent':{'type':a11_0x1e1867(0xb0)},'antigravity':{'type':a11_0x1e1867(0xb0)},'all':{'type':a11_0x1e1867(0xb0)},'enableBffSave':{'type':a11_0x1e1867(0xb0)},'global':{'type':'boolean'},'id':{'type':a11_0x1e1867(0xaa)},'type':{'type':a11_0x1e1867(0xaa)},'file':{'type':a11_0x1e1867(0xaa)},'sqlcode':{'type':a11_0x1e1867(0xaa)},'sqlname':{'type':a11_0x1e1867(0xaa)},'dbid':{'type':a11_0x1e1867(0xaa)},'description':{'type':'string'},'page':{'type':a11_0x1e1867(0xaa)},'pagesize':{'type':a11_0x1e1867(0xaa)},'keyword':{'type':a11_0x1e1867(0xaa)},'code':{'type':a11_0x1e1867(0xaa)},'sql':{'type':a11_0x1e1867(0xaa)},'schemas':{'type':a11_0x1e1867(0xaa)},'operation':{'type':a11_0x1e1867(0xaa)},'target':{'type':a11_0x1e1867(0xaa)},'skipImports':{'type':'boolean'},'force':{'type':a11_0x1e1867(0xb0)},'remote':{'type':'boolean'},'verbose':{'type':'boolean'},'operationType':{'type':'string'},'functionNode':{'type':a11_0x1e1867(0xaa)},...dynamicCliFlags||{}}});await run();async function run(){const _0x3acc0f=a11_0x1e1867;let _0x285e4a=cli[_0x3acc0f(0xce)][0x0],_0x52da2c=cli['input'][0x1];const _0x311873=cli['flags'];if(!_0x285e4a){render(a11_0x2b63a8(Help,{}));return;}const _0x4c85a5=deprecatedAliases[_0x285e4a];if(_0x4c85a5&&!isKnownService(_0x285e4a)){const _0x51de14=_0x52da2c?CLI_BIN_NAME+'\x20'+_0x285e4a+'\x20'+_0x52da2c:CLI_BIN_NAME+'\x20'+_0x285e4a,_0x4c9e3a=CLI_BIN_NAME+'\x20'+_0x4c85a5['service']+'\x20'+_0x4c85a5[_0x3acc0f(0xa2)];console['error'](_0x3acc0f(0xba)+_0x51de14+'`\x20has\x20been\x20moved\x20to\x20`'+_0x4c9e3a+_0x3acc0f(0xd3)+_0x3acc0f(0xd5)),process[_0x3acc0f(0xc5)](0x1);}if(!isKnownService(_0x285e4a)){render(a11_0x2b63a8(Help,{}));return;}const _0x3e13b3=getServiceEntry(_0x285e4a);if(!_0x52da2c){if(_0x3e13b3[_0x3acc0f(0xb4)])_0x52da2c=_0x3e13b3[_0x3acc0f(0xb4)];else{if(_0x3e13b3[_0x3acc0f(0xcf)]){const _0x4a1174=await createContext(_0x311873);try{await _0x3e13b3['wildcardModule']['run'](_0x4a1174,[],_0x311873);}catch(_0x4fc2d8){handleError(_0x4fc2d8);}return;}else{printServiceHelp(_0x285e4a);return;}}}if(_0x311873[_0x3acc0f(0xa7)]&&!findDefinition(_0x285e4a,_0x52da2c)&&!getLegacyHandler(_0x285e4a,_0x52da2c)){printServiceHelp(_0x285e4a);return;}if(_0x311873['env']&&typeof _0x311873[_0x3acc0f(0xd2)]===_0x3acc0f(0xaa)){const {initEnv:_0x3b7d0a}=await import('./constant/env.js');_0x3b7d0a(_0x311873[_0x3acc0f(0xd2)]);}const {buildConfigFromFlags:_0x11eecc}=await import(_0x3acc0f(0xd1)),_0x47bc0c=_0x11eecc(_0x311873);if(!_0x311873[_0x3acc0f(0xd2)]&&_0x47bc0c['env']){const {initEnv:_0x562e5d}=await import(_0x3acc0f(0xc6));_0x562e5d(_0x47bc0c[_0x3acc0f(0xd2)]);}if(_0x47bc0c[_0x3acc0f(0xa5)]?.[_0x3acc0f(0xae)]||_0x47bc0c[_0x3acc0f(0xa5)]?.['userDomain']||_0x47bc0c[_0x3acc0f(0xa5)]?.[_0x3acc0f(0xb3)]){const {initDomains:_0x315a66}=await import(_0x3acc0f(0xb7));_0x315a66({'apiDomain':_0x47bc0c[_0x3acc0f(0xa5)][_0x3acc0f(0xae)]||undefined,'userDomain':_0x47bc0c['raw'][_0x3acc0f(0xb9)]||undefined,'runtimeDomain':_0x47bc0c[_0x3acc0f(0xa5)][_0x3acc0f(0xb3)]||undefined});}if(isDeclarativeService(_0x285e4a)){const _0x4b720b=findDefinition(_0x285e4a,_0x52da2c);!_0x4b720b&&(printServiceHelp(_0x285e4a),handleError(CliErrors[_0x3acc0f(0xbf)](_0x285e4a+'\x20'+_0x52da2c)));if(_0x311873[_0x3acc0f(0xa7)]){console[_0x3acc0f(0xb6)](generateCommandHelp(_0x4b720b));return;}try{await runCommand(_0x4b720b,{'rawFlags':_0x311873,'resolveAppCode':()=>_0x47bc0c[_0x3acc0f(0xd0)]||_0x311873[_0x3acc0f(0xbd)]||process[_0x3acc0f(0xd2)][_0x3acc0f(0xcd)]||process[_0x3acc0f(0xd2)]['LOVRABET_APPCODE']||undefined,'resolveCookie':()=>_0x47bc0c[_0x3acc0f(0xde)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':isNonInteractive(_0x311873),'defaultFormat':_0x47bc0c[_0x3acc0f(0xbe)],'defaultPageSize':_0x47bc0c[_0x3acc0f(0xaf)],'defaultVerbose':_0x47bc0c['verbose'],'apiDir':_0x47bc0c[_0x3acc0f(0xc8)],'riskLevel':_0x47bc0c['riskLevel'],'selectedAppName':_0x47bc0c['explicitAppName']});}catch(_0x3a6793){handleError(_0x3a6793);}return;}const _0x36a783=getLegacyHandler(_0x285e4a,_0x52da2c);if(_0x36a783){if(_0x311873[_0x3acc0f(0xa7)]){printServiceHelp(_0x285e4a);return;}const _0x555ef0=await createContext(_0x311873),_0x3a2c7f=_0x36a783[_0x3acc0f(0xdc)]?[_0x52da2c,...cli[_0x3acc0f(0xce)][_0x3acc0f(0xc3)](0x2)]:cli['input'][_0x3acc0f(0xc3)](0x2);try{await _0x36a783[_0x3acc0f(0xa4)][_0x3acc0f(0xda)](_0x555ef0,_0x3a2c7f,_0x311873);}catch(_0x49b5e1){handleError(_0x49b5e1);}return;}if(_0x3e13b3[_0x3acc0f(0xcf)]){if(_0x311873[_0x3acc0f(0xa7)]){printServiceHelp(_0x285e4a);return;}const _0x1c097d=await createContext(_0x311873),_0x3aba87=[_0x52da2c,...cli['input'][_0x3acc0f(0xc3)](0x2)];try{await _0x3e13b3['wildcardModule']['run'](_0x1c097d,_0x3aba87,_0x311873);}catch(_0x2855e8){handleError(_0x2855e8);}return;}printServiceHelp(_0x285e4a),handleError(CliErrors['unknownCommand'](_0x285e4a+'\x20'+_0x52da2c));}function printServiceHelp(_0x34f9fc){console['log'](generateServiceHelp(_0x34f9fc));}function handleError(_0x9357b3){const _0x4ae531=a11_0x1e1867;if(_0x9357b3 instanceof CliError){console[_0x4ae531(0xa3)]('Error:\x20'+_0x9357b3[_0x4ae531(0xa6)]);if(_0x9357b3[_0x4ae531(0xd6)])console[_0x4ae531(0xa3)](_0x4ae531(0xc1)+_0x9357b3[_0x4ae531(0xd6)]);process[_0x4ae531(0xc5)](_0x9357b3[_0x4ae531(0xc2)]);}console[_0x4ae531(0xa3)](_0x4ae531(0xb1),_0x9357b3),process[_0x4ae531(0xc5)](0x1);}function isNonInteractive(_0x1326ee){const _0x3246db=a11_0x1e1867;return!!(_0x1326ee[_0x3246db(0xca)]||_0x1326ee['ci']||process[_0x3246db(0xd2)][_0x3246db(0xbc)]===_0x3246db(0xd9)||process['env'][_0x3246db(0xb5)]===_0x3246db(0xd9)||process[_0x3246db(0xd2)]['CI']===_0x3246db(0xd9)||!process[_0x3246db(0xb8)]['isTTY']);}
2
+ const a12_0x4d27d2=a12_0x1727;(function(_0x29f52f,_0x5f1d31){const _0x4624a3=a12_0x1727,_0x2744ae=_0x29f52f();while(!![]){try{const _0x279805=parseInt(_0x4624a3(0x1b5))/0x1*(parseInt(_0x4624a3(0x19e))/0x2)+parseInt(_0x4624a3(0x1bd))/0x3*(parseInt(_0x4624a3(0x196))/0x4)+-parseInt(_0x4624a3(0x1be))/0x5*(parseInt(_0x4624a3(0x1af))/0x6)+-parseInt(_0x4624a3(0x19f))/0x7*(-parseInt(_0x4624a3(0x1b7))/0x8)+-parseInt(_0x4624a3(0x1cf))/0x9*(parseInt(_0x4624a3(0x1ce))/0xa)+-parseInt(_0x4624a3(0x18b))/0xb*(parseInt(_0x4624a3(0x1ab))/0xc)+-parseInt(_0x4624a3(0x1ae))/0xd*(-parseInt(_0x4624a3(0x195))/0xe);if(_0x279805===_0x5f1d31)break;else _0x2744ae['push'](_0x2744ae['shift']());}catch(_0x196a8b){_0x2744ae['push'](_0x2744ae['shift']());}}}(a12_0x41d7,0xcaefe));import{jsx as a12_0x27a429}from'react/jsx-runtime';import a12_0x48d6ce from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';import{createContext}from'./context.js';import{isKnownService,isDeclarativeService,getServiceEntry,findDefinition,getLegacyHandler,deprecatedAliases}from'./commands/registry.js';import{runCommand}from'./framework/runner.js';import{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./framework/help.js';import{getCookie}from'./auth/get-cookie.js';import{getApiDomain}from'./constant/domain.js';import{CLI_BIN_NAME}from'./constant/cli.js';import{BUILD_NUMBER}from'./generated/build-info.js';function a12_0x1727(_0x2bf8af,_0x32d041){_0x2bf8af=_0x2bf8af-0x18b;const _0x41d776=a12_0x41d7();let _0x172775=_0x41d776[_0x2bf8af];return _0x172775;}import{reportCliHelpTrace}from'./telemetry/cli-help-trace.js';import{registerOtelShutdownOnExit,exitWithOtelShutdown}from'./telemetry/register-otel-exit-shutdown.js';let dynamicCliFlags=null;try{dynamicCliFlags=(await import(a12_0x4d27d2(0x1b1)))['dynamicCliFlags'];}catch{}const helpText=generateFullHelp(),pkgVersion=await((async()=>{const _0x56237b=a12_0x4d27d2;try{const {readFileSync:_0x152b44}=await import('node:fs'),{resolve:_0x1b2dde,dirname:_0x5e23db}=await import(_0x56237b(0x1b4)),{fileURLToPath:_0x59348d}=await import(_0x56237b(0x19d)),_0x1fefe9=_0x1b2dde(_0x5e23db(_0x59348d(import.meta.url)),'..'),_0x39462d=JSON['parse'](_0x152b44(_0x1b2dde(_0x1fefe9,_0x56237b(0x1a4)),'utf-8'));return _0x39462d[_0x56237b(0x198)]||_0x56237b(0x1ad);}catch{return _0x56237b(0x1ad);}})()),cliVersion=BUILD_NUMBER?pkgVersion+'+'+BUILD_NUMBER:pkgVersion,cli=a12_0x48d6ce(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{'help':{'type':a12_0x4d27d2(0x18f)},'env':{'type':a12_0x4d27d2(0x1a1)},'appcode':{'type':a12_0x4d27d2(0x1a1)},'app':{'type':a12_0x4d27d2(0x1a1)},'nonInteractive':{'type':a12_0x4d27d2(0x18f)},'ci':{'type':a12_0x4d27d2(0x18f)},'format':{'type':a12_0x4d27d2(0x1a1)},'dryRun':{'type':a12_0x4d27d2(0x18f)},'yes':{'type':a12_0x4d27d2(0x18f)},'name':{'type':a12_0x4d27d2(0x1a1)},'clear':{'type':a12_0x4d27d2(0x18f)},'watch':{'type':'boolean'},'output':{'type':'string'},'params':{'type':a12_0x4d27d2(0x1a1)},'datasetcode':{'type':a12_0x4d27d2(0x1a1)},'mcpCursor':{'type':a12_0x4d27d2(0x18f)},'mcpClaude':{'type':a12_0x4d27d2(0x18f)},'mcpOther':{'type':'boolean'},'cursor':{'type':a12_0x4d27d2(0x18f)},'windsurf':{'type':a12_0x4d27d2(0x18f)},'claude':{'type':a12_0x4d27d2(0x18f)},'cline':{'type':a12_0x4d27d2(0x18f)},'codex':{'type':'boolean'},'opencode':{'type':a12_0x4d27d2(0x18f)},'qoder':{'type':'boolean'},'codebuddy':{'type':a12_0x4d27d2(0x18f)},'trae':{'type':a12_0x4d27d2(0x18f)},'agent':{'type':a12_0x4d27d2(0x18f)},'antigravity':{'type':a12_0x4d27d2(0x18f)},'all':{'type':'boolean'},'enableBffSave':{'type':a12_0x4d27d2(0x18f)},'global':{'type':'boolean'},'id':{'type':a12_0x4d27d2(0x1a1)},'type':{'type':a12_0x4d27d2(0x1a1)},'file':{'type':a12_0x4d27d2(0x1a1)},'sqlcode':{'type':'string'},'sqlname':{'type':a12_0x4d27d2(0x1a1)},'dbid':{'type':a12_0x4d27d2(0x1a1)},'description':{'type':a12_0x4d27d2(0x1a1)},'page':{'type':'string'},'pagesize':{'type':a12_0x4d27d2(0x1a1)},'keyword':{'type':a12_0x4d27d2(0x1a1)},'code':{'type':a12_0x4d27d2(0x1a1)},'sql':{'type':a12_0x4d27d2(0x1a1)},'schemas':{'type':a12_0x4d27d2(0x1a1)},'operation':{'type':'string'},'target':{'type':a12_0x4d27d2(0x1a1)},'skipImports':{'type':a12_0x4d27d2(0x18f)},'force':{'type':a12_0x4d27d2(0x18f)},'remote':{'type':a12_0x4d27d2(0x18f)},'verbose':{'type':a12_0x4d27d2(0x18f)},'operationType':{'type':'string'},'functionNode':{'type':a12_0x4d27d2(0x1a1)},...dynamicCliFlags||{}}});function a12_0x41d7(){const _0x8cf8fa=['./constant/env.js','LOVRABET_APPCODE','log','defaultCommand','`\x20in\x20v2.0.\x0a','flags','2006556QDRkcq','true','0.0.0','27898EFZttE','962034LQyAaz','hint','./cli-flags.js','unknownCommand','stdout','node:path','256363UBWrMJ','apiDir','24bhEzSA','userDomain','appcode','input','LOVRABET_CI','RABETBASE_APPCODE','1555893WGAiZB','35woKYEE','verbose','format','message','./context.js','⚠\x20`','command','wildcardModule','Hint:\x20','nonInteractive','env','cookie','global','run','service','slice','1460230NbMltl','45zHTYYQ','RABETBASE_CI','11gPgTjp','unknown_service','riskLevel','error','boolean','runtimeDomain','isTTY','raw','apiDomain','Error:\x20','12222kxhkpL','4hoLSIu','pageSize','version','appCode','explicitAppName','`\x20has\x20been\x20moved\x20to\x20`','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','node:url','2tfxCsJ','472451ZvUqID','help','string','./constant/domain.js','Unexpected\x20error:','package.json'];a12_0x41d7=function(){return _0x8cf8fa;};return a12_0x41d7();}registerOtelShutdownOnExit(),await run();async function run(){const _0x41558=a12_0x4d27d2;let _0x64ff9d=cli[_0x41558(0x1ba)][0x0],_0x58293a=cli[_0x41558(0x1ba)][0x1];const _0x55a9b7=cli[_0x41558(0x1aa)];if(!_0x64ff9d){await reportCliHelpTrace(_0x41558(0x1ca)),render(a12_0x27a429(Help,{}));return;}const _0x628ffd=deprecatedAliases[_0x64ff9d];if(_0x628ffd&&!isKnownService(_0x64ff9d)){const _0x5ac11d=_0x58293a?CLI_BIN_NAME+'\x20'+_0x64ff9d+'\x20'+_0x58293a:CLI_BIN_NAME+'\x20'+_0x64ff9d,_0x96d06=CLI_BIN_NAME+'\x20'+_0x628ffd[_0x41558(0x1cc)]+'\x20'+_0x628ffd[_0x41558(0x1c4)];console[_0x41558(0x18e)](_0x41558(0x1c3)+_0x5ac11d+_0x41558(0x19b)+_0x96d06+_0x41558(0x1a9)+_0x41558(0x19c)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x64ff9d)){await reportCliHelpTrace(_0x41558(0x18c),{'service':_0x64ff9d}),render(a12_0x27a429(Help,{}));return;}const _0x25da3a=getServiceEntry(_0x64ff9d);if(!_0x58293a){if(_0x25da3a['defaultCommand'])_0x58293a=_0x25da3a[_0x41558(0x1a8)];else{if(_0x25da3a[_0x41558(0x1c5)]){const _0x4472d7=await createContext(_0x55a9b7);try{await _0x25da3a['wildcardModule'][_0x41558(0x1cb)](_0x4472d7,[],_0x55a9b7);}catch(_0x2dacfd){await handleErrorAsync(_0x2dacfd);}return;}else{printServiceHelp(_0x64ff9d);return;}}}if(_0x55a9b7[_0x41558(0x1a0)]&&!findDefinition(_0x64ff9d,_0x58293a)&&!getLegacyHandler(_0x64ff9d,_0x58293a)){printServiceHelp(_0x64ff9d);return;}if(_0x55a9b7['env']&&typeof _0x55a9b7[_0x41558(0x1c8)]===_0x41558(0x1a1)){const {initEnv:_0x3802b2}=await import(_0x41558(0x1a5));_0x3802b2(_0x55a9b7[_0x41558(0x1c8)]);}const {buildConfigFromFlags:_0x1ce5ac}=await import(_0x41558(0x1c2)),_0x39448e=_0x1ce5ac(_0x55a9b7);if(!_0x55a9b7['env']&&_0x39448e[_0x41558(0x1c8)]){const {initEnv:_0x49f53b}=await import(_0x41558(0x1a5));_0x49f53b(_0x39448e['env']);}if(_0x39448e[_0x41558(0x192)]?.[_0x41558(0x193)]||_0x39448e[_0x41558(0x192)]?.[_0x41558(0x1b8)]||_0x39448e[_0x41558(0x192)]?.['runtimeDomain']){const {initDomains:_0x2c888e}=await import(_0x41558(0x1a2));_0x2c888e({'apiDomain':_0x39448e[_0x41558(0x192)][_0x41558(0x193)]||undefined,'userDomain':_0x39448e[_0x41558(0x192)][_0x41558(0x1b8)]||undefined,'runtimeDomain':_0x39448e[_0x41558(0x192)][_0x41558(0x190)]||undefined});}if(isDeclarativeService(_0x64ff9d)){const _0x259f16=findDefinition(_0x64ff9d,_0x58293a);if(!_0x259f16){printServiceHelp(_0x64ff9d),await handleErrorAsync(CliErrors[_0x41558(0x1b2)](_0x64ff9d+'\x20'+_0x58293a));return;}if(_0x55a9b7[_0x41558(0x1a0)]){console[_0x41558(0x1a7)](generateCommandHelp(_0x259f16));return;}try{await runCommand(_0x259f16,{'rawFlags':_0x55a9b7,'resolveAppCode':()=>_0x39448e[_0x41558(0x199)]||_0x55a9b7[_0x41558(0x1b9)]||process['env'][_0x41558(0x1bc)]||process[_0x41558(0x1c8)][_0x41558(0x1a6)]||undefined,'resolveCookie':()=>_0x39448e[_0x41558(0x1c9)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':isNonInteractive(_0x55a9b7),'defaultFormat':_0x39448e[_0x41558(0x1c0)],'defaultPageSize':_0x39448e[_0x41558(0x197)],'defaultVerbose':_0x39448e[_0x41558(0x1bf)],'apiDir':_0x39448e[_0x41558(0x1b6)],'riskLevel':_0x39448e[_0x41558(0x18d)],'selectedAppName':_0x39448e[_0x41558(0x19a)]});}catch(_0x5dd538){await handleErrorAsync(_0x5dd538);}return;}const _0x434524=getLegacyHandler(_0x64ff9d,_0x58293a);if(_0x434524){if(_0x55a9b7[_0x41558(0x1a0)]){printServiceHelp(_0x64ff9d);return;}const _0x4190cf=await createContext(_0x55a9b7),_0x162202=_0x434524['passCommandAsArg']?[_0x58293a,...cli[_0x41558(0x1ba)][_0x41558(0x1cd)](0x2)]:cli[_0x41558(0x1ba)][_0x41558(0x1cd)](0x2);try{await _0x434524['module']['run'](_0x4190cf,_0x162202,_0x55a9b7);}catch(_0x5af2ea){await handleErrorAsync(_0x5af2ea);}return;}if(_0x25da3a[_0x41558(0x1c5)]){if(_0x55a9b7[_0x41558(0x1a0)]){printServiceHelp(_0x64ff9d);return;}const _0x59f025=await createContext(_0x55a9b7),_0x2f384e=[_0x58293a,...cli[_0x41558(0x1ba)]['slice'](0x2)];try{await _0x25da3a[_0x41558(0x1c5)][_0x41558(0x1cb)](_0x59f025,_0x2f384e,_0x55a9b7);}catch(_0x158e50){await handleErrorAsync(_0x158e50);}return;}printServiceHelp(_0x64ff9d),await handleErrorAsync(CliErrors[_0x41558(0x1b2)](_0x64ff9d+'\x20'+_0x58293a));}function printServiceHelp(_0x3fded6){console['log'](generateServiceHelp(_0x3fded6));}async function handleErrorAsync(_0xd075d5){const _0x2c6de8=a12_0x4d27d2;if(_0xd075d5 instanceof CliError){console[_0x2c6de8(0x18e)](_0x2c6de8(0x194)+_0xd075d5[_0x2c6de8(0x1c1)]);if(_0xd075d5['hint'])console['error'](_0x2c6de8(0x1c6)+_0xd075d5[_0x2c6de8(0x1b0)]);return await exitWithOtelShutdown(_0xd075d5['exitCode']);}return console[_0x2c6de8(0x18e)](_0x2c6de8(0x1a3),_0xd075d5),await exitWithOtelShutdown(0x1);}function isNonInteractive(_0x116155){const _0xc0011b=a12_0x4d27d2;return!!(_0x116155[_0xc0011b(0x1c7)]||_0x116155['ci']||process[_0xc0011b(0x1c8)][_0xc0011b(0x1d0)]===_0xc0011b(0x1ac)||process[_0xc0011b(0x1c8)][_0xc0011b(0x1bb)]===_0xc0011b(0x1ac)||process[_0xc0011b(0x1c8)]['CI']==='true'||!process[_0xc0011b(0x1b3)][_0xc0011b(0x191)]);}
@@ -1 +1 @@
1
- const a12_0x26e3e7=a12_0xcc0a;(function(_0x101410,_0x3593c7){const _0xbfe54e=a12_0xcc0a,_0x45d746=_0x101410();while(!![]){try{const _0x3b7827=parseInt(_0xbfe54e(0x210))/0x1*(parseInt(_0xbfe54e(0x20b))/0x2)+parseInt(_0xbfe54e(0x211))/0x3+-parseInt(_0xbfe54e(0x1ea))/0x4*(parseInt(_0xbfe54e(0x1e5))/0x5)+parseInt(_0xbfe54e(0x208))/0x6*(parseInt(_0xbfe54e(0x1fd))/0x7)+parseInt(_0xbfe54e(0x20c))/0x8*(-parseInt(_0xbfe54e(0x1e9))/0x9)+parseInt(_0xbfe54e(0x1ec))/0xa*(parseInt(_0xbfe54e(0x1d8))/0xb)+-parseInt(_0xbfe54e(0x207))/0xc;if(_0x3b7827===_0x3593c7)break;else _0x45d746['push'](_0x45d746['shift']());}catch(_0xcad5c7){_0x45d746['push'](_0x45d746['shift']());}}}(a12_0x391a,0xb6637));import a12_0x44e21d from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';function a12_0xcc0a(_0x5a1c53,_0x46bdbb){_0x5a1c53=_0x5a1c53-0x1d6;const _0x391a68=a12_0x391a();let _0xcc0a4c=_0x391a68[_0x5a1c53];return _0xcc0a4c;}function a12_0x391a(){const _0x10a154=['has','length','3957751mRutow','write','\x20dataset(s)','\x20dataset(s)\x1b[0m','\x20of\x20','./docs','cookie','output','map','padStart','8695596JDXPVO','6dBeVGn','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','trim','382PkdAio','38320zScihP','...','join','stdout','1713RvhGIq','2392515SLFZgf','):\x20','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','6414529EAYHhL','filter','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','Fetching\x20dataset\x20list\x20for\x20','validation','must\x20be\x20a\x20JSON\x20object','\x0d\x20\x20[','appCode','success','datasetCode','\x1b[0m','Override\x20app\x20code','str','5510265GZtskc','\x20doc(s)\x20in\x20','\x1b[90m*\x20Filtered\x20','parse','531wUGuQE','4eFLZvI','datasetcode','20ssRTqo','log','object','error','Doc\x20generation:\x20','Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27','params','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','api','split','string','\x20failed','fail','Failed\x20to\x20fetch\x20datasets','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)'];a12_0x391a=function(){return _0x10a154;};return a12_0x391a();}import{CliErrors}from'../../errors.js';export const apiDoc={'service':a12_0x26e3e7(0x1f4),'command':'doc','description':a12_0x26e3e7(0x209),'risk':a12_0x26e3e7(0x1fe),'requiresAppCode':!![],'hasFormat':![],'flags':[{'name':'appcode','type':a12_0x26e3e7(0x1f6),'description':a12_0x26e3e7(0x1e3),'hidden':!![]},{'name':a12_0x26e3e7(0x204),'type':a12_0x26e3e7(0x1f6),'description':'Output\x20directory\x20(default:\x20./docs)'},{'name':a12_0x26e3e7(0x1eb),'type':a12_0x26e3e7(0x1f6),'description':a12_0x26e3e7(0x1f3)},{'name':'params','type':a12_0x26e3e7(0x1f6),'description':a12_0x26e3e7(0x1fa)}],async 'execute'(_0x59e25a){const _0x3d8b5f=a12_0x26e3e7,_0x84a541=_0x59e25a[_0x3d8b5f(0x1e4)](_0x3d8b5f(0x204))||_0x3d8b5f(0x202),_0x4487cb=_0x59e25a[_0x3d8b5f(0x1e4)]('datasetcode'),_0x154515=_0x59e25a['str'](_0x3d8b5f(0x1f2));let _0xd84f10;if(_0x154515)try{_0xd84f10=JSON[_0x3d8b5f(0x1e8)](_0x154515);if(typeof _0xd84f10!==_0x3d8b5f(0x1ee)||_0xd84f10===null||Array['isArray'](_0xd84f10))throw new Error(_0x3d8b5f(0x1dd));}catch(_0x2f6c1c){throw CliErrors['validation']('Invalid\x20--params:\x20'+(_0x2f6c1c instanceof Error?_0x2f6c1c['message']:String(_0x2f6c1c)),_0x3d8b5f(0x1f1));}let _0x335bd4;if(_0x4487cb){const _0x42f9eb=_0x4487cb[_0x3d8b5f(0x1f5)](',')[_0x3d8b5f(0x205)](_0xaf80f2=>_0xaf80f2[_0x3d8b5f(0x20a)]())['filter'](_0x36600d=>_0x36600d['length']>0x0);if(_0x42f9eb[_0x3d8b5f(0x1fc)]===0x0)throw CliErrors['validation']('--datasetcode\x20cannot\x20be\x20empty.');_0x335bd4=new Set(_0x42f9eb),console[_0x3d8b5f(0x1ed)]('\x1b[90m*\x20Generating\x20docs\x20for:\x20'+_0x42f9eb[_0x3d8b5f(0x20e)](',\x20')+_0x3d8b5f(0x1e2));}const _0x228189=a12_0x44e21d(_0x3d8b5f(0x1db)+_0x59e25a[_0x3d8b5f(0x1df)]+_0x3d8b5f(0x20d))['start']();let _0x1ab689;try{({configArray:_0x1ab689}=await fetchModelList(_0x59e25a[_0x3d8b5f(0x1df)],_0x59e25a[_0x3d8b5f(0x203)]),_0x228189['succeed']('Fetched\x20'+_0x1ab689[_0x3d8b5f(0x1fc)]+_0x3d8b5f(0x1ff)));}catch(_0x204da8){_0x228189[_0x3d8b5f(0x1f8)](_0x3d8b5f(0x1f9));throw _0x204da8;}if(_0x1ab689[_0x3d8b5f(0x1fc)]===0x0)return console[_0x3d8b5f(0x1ed)]('!\x20No\x20datasets\x20found.'),{'ok':!![]};let _0x2a82a5=_0x1ab689;if(_0x335bd4){_0x2a82a5=_0x1ab689[_0x3d8b5f(0x1d9)](_0x290e2e=>_0x335bd4[_0x3d8b5f(0x1fb)](_0x290e2e['datasetCode']));const _0x3185ba=[..._0x335bd4][_0x3d8b5f(0x1d9)](_0x52a7b1=>!_0x1ab689['some'](_0x1342b4=>_0x1342b4[_0x3d8b5f(0x1e1)]===_0x52a7b1));_0x3185ba[_0x3d8b5f(0x1fc)]>0x0&&console['log'](_0x3d8b5f(0x1d7)+_0x3185ba[_0x3d8b5f(0x20e)](',\x20')+_0x3d8b5f(0x1e2));if(_0x2a82a5['length']===0x0)throw CliErrors[_0x3d8b5f(0x1dc)](_0x3d8b5f(0x1da)+[..._0x335bd4][_0x3d8b5f(0x20e)](',\x20'));console['log'](_0x3d8b5f(0x1e7)+_0x2a82a5[_0x3d8b5f(0x1fc)]+_0x3d8b5f(0x201)+_0x1ab689['length']+_0x3d8b5f(0x200));}let _0x404f6a=0x0;const _0x32770e=await generateDatasetDocs(_0x2a82a5,_0x59e25a[_0x3d8b5f(0x1df)],_0x59e25a[_0x3d8b5f(0x203)],_0x84a541,(_0xc3d126,_0x5c4a41,_0x35149b)=>{const _0x53ffaf=_0x3d8b5f;_0x404f6a=_0xc3d126,process[_0x53ffaf(0x20f)][_0x53ffaf(0x1fe)](_0x53ffaf(0x1de)+String(_0xc3d126)[_0x53ffaf(0x206)](String(_0x5c4a41)[_0x53ffaf(0x1fc)])+'/'+_0x5c4a41+']\x20'+_0x35149b+'.md');},_0xd84f10);if(_0x404f6a>0x0)process[_0x3d8b5f(0x20f)][_0x3d8b5f(0x1fe)]('\x0a');const _0x1f7ab8=_0x32770e[_0x3d8b5f(0x1d9)](_0x50692b=>_0x50692b[_0x3d8b5f(0x1e0)])[_0x3d8b5f(0x1fc)],_0x37717c=_0x32770e[_0x3d8b5f(0x1d9)](_0x194482=>!_0x194482[_0x3d8b5f(0x1e0)])[_0x3d8b5f(0x1fc)];console['log'](),console[_0x3d8b5f(0x1ed)]('✓\x20Generated\x20'+_0x1f7ab8+_0x3d8b5f(0x1e6)+_0x84a541);if(_0x37717c>0x0){console['error']('!\x20'+_0x37717c+'\x20doc(s)\x20failed');for(const _0x3257e5 of _0x32770e[_0x3d8b5f(0x1d9)](_0x275ad0=>!_0x275ad0['success'])){console['error']('\x20\x20•\x20'+_0x3257e5['datasetName']+'\x20('+_0x3257e5[_0x3d8b5f(0x1e1)]+_0x3d8b5f(0x1d6)+_0x3257e5[_0x3d8b5f(0x1ef)]);}}return{'ok':_0x37717c===0x0,'message':_0x37717c>0x0?_0x3d8b5f(0x1f0)+_0x1f7ab8+'\x20succeeded,\x20'+_0x37717c+_0x3d8b5f(0x1f7):'Doc\x20generation\x20complete:\x20'+_0x1f7ab8+'\x20file(s)'};}};
1
+ const a13_0x327d78=a13_0x9127;function a13_0x1c80(){const _0x4c61c5=['join','Output\x20directory\x20(default:\x20./docs)','\x20failed','start','write','3758607xeBUUr','894060RInsgy','error','4UBCCjX','14kXldpy','\x1b[90m*\x20Filtered\x20','✓\x20Generated\x20','length','object','\x20file(s)','522272lEOCaG','10VVNOZZ','log','5281788vMexRx','\x20doc(s)\x20in\x20','.md','94YOLkTB','success','str','Doc\x20generation\x20complete:\x20','\x20of\x20','parse','\x1b[90m*\x20Generating\x20docs\x20for:\x20','padStart','output','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','78798LKWtTL','2003woJTpi','33qilBMu','\x0d\x20\x20[','Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','./docs','message','validation','stdout','appCode','succeed','params','cookie','some','Fetched\x20','string','345963TDQxun','api','\x20doc(s)\x20failed','Override\x20app\x20code','appcode','filter','):\x20','datasetcode','doc','Fetching\x20dataset\x20list\x20for\x20','Failed\x20to\x20fetch\x20datasets','datasetCode','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','isArray','Invalid\x20--params:\x20'];a13_0x1c80=function(){return _0x4c61c5;};return a13_0x1c80();}(function(_0x55f4b9,_0x304c7f){const _0x50add8=a13_0x9127,_0x47abdc=_0x55f4b9();while(!![]){try{const _0x5308cc=parseInt(_0x50add8(0x182))/0x1*(-parseInt(_0x50add8(0x177))/0x2)+-parseInt(_0x50add8(0x153))/0x3*(parseInt(_0x50add8(0x16a))/0x4)+-parseInt(_0x50add8(0x168))/0x5+-parseInt(_0x50add8(0x181))/0x6*(parseInt(_0x50add8(0x16b))/0x7)+-parseInt(_0x50add8(0x171))/0x8+-parseInt(_0x50add8(0x167))/0x9*(parseInt(_0x50add8(0x172))/0xa)+-parseInt(_0x50add8(0x183))/0xb*(-parseInt(_0x50add8(0x174))/0xc);if(_0x5308cc===_0x304c7f)break;else _0x47abdc['push'](_0x47abdc['shift']());}catch(_0x1f6d69){_0x47abdc['push'](_0x47abdc['shift']());}}}(a13_0x1c80,0x67458));import a13_0x23bf4f from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';function a13_0x9127(_0x5bbe41,_0x57ee96){_0x5bbe41=_0x5bbe41-0x14a;const _0x1c8051=a13_0x1c80();let _0x912764=_0x1c8051[_0x5bbe41];return _0x912764;}import{CliErrors}from'../../errors.js';export const apiDoc={'service':a13_0x327d78(0x154),'command':a13_0x327d78(0x15b),'description':a13_0x327d78(0x185),'risk':a13_0x327d78(0x166),'requiresAppCode':!![],'hasFormat':![],'flags':[{'name':a13_0x327d78(0x157),'type':a13_0x327d78(0x152),'description':a13_0x327d78(0x156),'hidden':!![]},{'name':a13_0x327d78(0x17f),'type':'string','description':a13_0x327d78(0x163)},{'name':'datasetcode','type':a13_0x327d78(0x152),'description':a13_0x327d78(0x15f)},{'name':a13_0x327d78(0x14e),'type':a13_0x327d78(0x152),'description':'Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)'}],async 'execute'(_0x11ee22){const _0x4aba1b=a13_0x327d78,_0x53f09d=_0x11ee22['str'](_0x4aba1b(0x17f))||_0x4aba1b(0x186),_0x5cfcb3=_0x11ee22[_0x4aba1b(0x179)](_0x4aba1b(0x15a)),_0x1f2fa4=_0x11ee22['str'](_0x4aba1b(0x14e));let _0x44c292;if(_0x1f2fa4)try{_0x44c292=JSON[_0x4aba1b(0x17c)](_0x1f2fa4);if(typeof _0x44c292!==_0x4aba1b(0x16f)||_0x44c292===null||Array[_0x4aba1b(0x160)](_0x44c292))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x54dc47){throw CliErrors[_0x4aba1b(0x14a)](_0x4aba1b(0x161)+(_0x54dc47 instanceof Error?_0x54dc47[_0x4aba1b(0x187)]:String(_0x54dc47)),'Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27');}let _0x3d7bb0;if(_0x5cfcb3){const _0x3962f4=_0x5cfcb3['split'](',')['map'](_0x10a6c1=>_0x10a6c1['trim']())[_0x4aba1b(0x158)](_0x1e0cc6=>_0x1e0cc6[_0x4aba1b(0x16e)]>0x0);if(_0x3962f4[_0x4aba1b(0x16e)]===0x0)throw CliErrors[_0x4aba1b(0x14a)]('--datasetcode\x20cannot\x20be\x20empty.');_0x3d7bb0=new Set(_0x3962f4),console['log'](_0x4aba1b(0x17d)+_0x3962f4[_0x4aba1b(0x162)](',\x20')+'\x1b[0m');}const _0xaa62e5=a13_0x23bf4f(_0x4aba1b(0x15c)+_0x11ee22['appCode']+'...')[_0x4aba1b(0x165)]();let _0x3ba309;try{({configArray:_0x3ba309}=await fetchModelList(_0x11ee22[_0x4aba1b(0x14c)],_0x11ee22[_0x4aba1b(0x14f)]),_0xaa62e5[_0x4aba1b(0x14d)](_0x4aba1b(0x151)+_0x3ba309[_0x4aba1b(0x16e)]+'\x20dataset(s)'));}catch(_0x218e7b){_0xaa62e5['fail'](_0x4aba1b(0x15d));throw _0x218e7b;}if(_0x3ba309[_0x4aba1b(0x16e)]===0x0)return console[_0x4aba1b(0x173)]('!\x20No\x20datasets\x20found.'),{'ok':!![]};let _0x576e39=_0x3ba309;if(_0x3d7bb0){_0x576e39=_0x3ba309[_0x4aba1b(0x158)](_0x249eb6=>_0x3d7bb0['has'](_0x249eb6[_0x4aba1b(0x15e)]));const _0x3d41a6=[..._0x3d7bb0][_0x4aba1b(0x158)](_0x8eb4a4=>!_0x3ba309[_0x4aba1b(0x150)](_0xbb571b=>_0xbb571b['datasetCode']===_0x8eb4a4));_0x3d41a6[_0x4aba1b(0x16e)]>0x0&&console['log']('\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20'+_0x3d41a6[_0x4aba1b(0x162)](',\x20')+'\x1b[0m');if(_0x576e39[_0x4aba1b(0x16e)]===0x0)throw CliErrors['validation'](_0x4aba1b(0x180)+[..._0x3d7bb0]['join'](',\x20'));console[_0x4aba1b(0x173)](_0x4aba1b(0x16c)+_0x576e39[_0x4aba1b(0x16e)]+_0x4aba1b(0x17b)+_0x3ba309[_0x4aba1b(0x16e)]+'\x20dataset(s)\x1b[0m');}let _0x114bbf=0x0;const _0x557b2c=await generateDatasetDocs(_0x576e39,_0x11ee22['appCode'],_0x11ee22['cookie'],_0x53f09d,(_0x162c59,_0x241606,_0x4ccad9)=>{const _0x2f9927=_0x4aba1b;_0x114bbf=_0x162c59,process[_0x2f9927(0x14b)][_0x2f9927(0x166)](_0x2f9927(0x184)+String(_0x162c59)[_0x2f9927(0x17e)](String(_0x241606)['length'])+'/'+_0x241606+']\x20'+_0x4ccad9+_0x2f9927(0x176));},_0x44c292);if(_0x114bbf>0x0)process[_0x4aba1b(0x14b)][_0x4aba1b(0x166)]('\x0a');const _0x530f35=_0x557b2c[_0x4aba1b(0x158)](_0x33ce34=>_0x33ce34[_0x4aba1b(0x178)])[_0x4aba1b(0x16e)],_0x15e110=_0x557b2c[_0x4aba1b(0x158)](_0x17ef19=>!_0x17ef19[_0x4aba1b(0x178)])[_0x4aba1b(0x16e)];console[_0x4aba1b(0x173)](),console['log'](_0x4aba1b(0x16d)+_0x530f35+_0x4aba1b(0x175)+_0x53f09d);if(_0x15e110>0x0){console[_0x4aba1b(0x169)]('!\x20'+_0x15e110+_0x4aba1b(0x155));for(const _0x59b461 of _0x557b2c[_0x4aba1b(0x158)](_0x5b636a=>!_0x5b636a[_0x4aba1b(0x178)])){console[_0x4aba1b(0x169)]('\x20\x20•\x20'+_0x59b461['datasetName']+'\x20('+_0x59b461['datasetCode']+_0x4aba1b(0x159)+_0x59b461[_0x4aba1b(0x169)]);}}return{'ok':_0x15e110===0x0,'message':_0x15e110>0x0?'Doc\x20generation:\x20'+_0x530f35+'\x20succeeded,\x20'+_0x15e110+_0x4aba1b(0x164):_0x4aba1b(0x17a)+_0x530f35+_0x4aba1b(0x170)};}};
@@ -1 +1 @@
1
- (function(_0x2649be,_0x26d03b){const _0x72e790=a13_0x1bd7,_0x190c35=_0x2649be();while(!![]){try{const _0x156cf8=parseInt(_0x72e790(0x17e))/0x1*(-parseInt(_0x72e790(0x181))/0x2)+-parseInt(_0x72e790(0x175))/0x3+-parseInt(_0x72e790(0x179))/0x4*(-parseInt(_0x72e790(0x177))/0x5)+parseInt(_0x72e790(0x176))/0x6*(-parseInt(_0x72e790(0x17c))/0x7)+parseInt(_0x72e790(0x17b))/0x8*(-parseInt(_0x72e790(0x17a))/0x9)+parseInt(_0x72e790(0x178))/0xa*(parseInt(_0x72e790(0x17d))/0xb)+parseInt(_0x72e790(0x180))/0xc*(parseInt(_0x72e790(0x17f))/0xd);if(_0x156cf8===_0x26d03b)break;else _0x190c35['push'](_0x190c35['shift']());}catch(_0x112511){_0x190c35['push'](_0x190c35['shift']());}}}(a13_0x3999,0xc5e6e));function a13_0x3999(){const _0x121db5=['35508187bNBWDY','12sCQhAH','1768JszCPb','668457rwZBvn','179934qjyQpM','7101630ipogkn','3589430IjzIVu','4rRazSc','2646990HEMJEp','40rprswE','91vmDnyI','11KlSeBs','1829wGjKVb'];a13_0x3999=function(){return _0x121db5;};return a13_0x3999();}import{apiList}from'./list.js';import{apiPull}from'./pull.js';function a13_0x1bd7(_0x2b5bce,_0x3786e8){_0x2b5bce=_0x2b5bce-0x175;const _0x399939=a13_0x3999();let _0x1bd7c5=_0x399939[_0x2b5bce];return _0x1bd7c5;}import{apiDoc}from'./doc.js';export const apiDefinitions=[apiList,apiPull,apiDoc];
1
+ function a14_0x3bff(){const _0x438409=['7xUfVcu','183gMRskH','3262gKMaPC','2999240VbBQbv','9746523TLjfQK','1445860ZYEixz','90726FmjPmN','968533xAplze','4189704KjOLGm'];a14_0x3bff=function(){return _0x438409;};return a14_0x3bff();}(function(_0x4e8b97,_0x100112){const _0xa5a8c1=a14_0x3039,_0x2cea2c=_0x4e8b97();while(!![]){try{const _0x1ad6a3=parseInt(_0xa5a8c1(0x1d7))/0x1+parseInt(_0xa5a8c1(0x1d2))/0x2*(-parseInt(_0xa5a8c1(0x1da))/0x3)+-parseInt(_0xa5a8c1(0x1d8))/0x4+parseInt(_0xa5a8c1(0x1d5))/0x5+-parseInt(_0xa5a8c1(0x1d6))/0x6*(-parseInt(_0xa5a8c1(0x1d9))/0x7)+-parseInt(_0xa5a8c1(0x1d3))/0x8+parseInt(_0xa5a8c1(0x1d4))/0x9;if(_0x1ad6a3===_0x100112)break;else _0x2cea2c['push'](_0x2cea2c['shift']());}catch(_0x508cce){_0x2cea2c['push'](_0x2cea2c['shift']());}}}(a14_0x3bff,0xcb99f));import{apiList}from'./list.js';import{apiPull}from'./pull.js';function a14_0x3039(_0x1d722c,_0x31434a){_0x1d722c=_0x1d722c-0x1d2;const _0x3bff43=a14_0x3bff();let _0x3039ea=_0x3bff43[_0x1d722c];return _0x3039ea;}import{apiDoc}from'./doc.js';export const apiDefinitions=[apiList,apiPull,apiDoc];
@@ -1 +1 @@
1
- const a14_0x5474ef=a14_0x5606;(function(_0x4f4b91,_0x345c5f){const _0x3e9f51=a14_0x5606,_0x3216ec=_0x4f4b91();while(!![]){try{const _0x2ebcb5=parseInt(_0x3e9f51(0x179))/0x1+-parseInt(_0x3e9f51(0x165))/0x2*(-parseInt(_0x3e9f51(0x169))/0x3)+parseInt(_0x3e9f51(0x184))/0x4*(-parseInt(_0x3e9f51(0x181))/0x5)+-parseInt(_0x3e9f51(0x17e))/0x6+parseInt(_0x3e9f51(0x177))/0x7+parseInt(_0x3e9f51(0x17b))/0x8*(-parseInt(_0x3e9f51(0x17c))/0x9)+-parseInt(_0x3e9f51(0x180))/0xa*(parseInt(_0x3e9f51(0x166))/0xb);if(_0x2ebcb5===_0x345c5f)break;else _0x3216ec['push'](_0x3216ec['shift']());}catch(_0x2c282c){_0x3216ec['push'](_0x3216ec['shift']());}}}(a14_0x45d4,0x4e358));import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a14_0x45d4(){const _0x7936f1=['Key','isDefault','max','4116770bQeWZE','table','119570ccZGfi','min','248rbFKhM','1809eykysv','map','269196lgFHbd','length','553570PwhyXj','35745NxNodV','cookie','\x20(default)','156VkxxyJ','\x0a\x20\x20App:\x20','repeat','name','json','Output\x20format:\x20table\x20(default)\x20|\x20json','selectedAppName','filter','appcode','env','stringify','str','Override\x20app\x20code','string','\x20\x20[','474gELowd','121SSabUg','\x20\x20|\x20\x20','read','6981DVXyWc','log','datasetCode','appCode','\x20\x20App:\x20','\x20\x20|\x20\x20No\x20models\x20found\x0a','format','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','key','list','\x20model(s)\x0a'];a14_0x45d4=function(){return _0x7936f1;};return a14_0x45d4();}import{getMultiAppConfigs}from'../../utils/config.js';async function printModelsForApp(_0xf54f5d,_0x3602a9,_0x21b292,_0x36db64='table'){const _0x1e922f=a14_0x5606,{configArray:_0x19761b,count:_0x4d105a}=await fetchModelList(_0xf54f5d,_0x3602a9);if(_0x4d105a===0x0){_0x36db64===_0x1e922f(0x188)?console[_0x1e922f(0x16a)](JSON[_0x1e922f(0x160)]({'appCode':_0xf54f5d,'models':[]})):console[_0x1e922f(0x16a)]('\x20\x20App:\x20'+_0xf54f5d+_0x1e922f(0x16e));return;}if(_0x36db64==='json'){console[_0x1e922f(0x16a)](JSON[_0x1e922f(0x160)]({'appCode':_0xf54f5d,'appName':_0x21b292,'total':_0x4d105a,'models':_0x19761b}));return;}const _0x53a684=Math[_0x1e922f(0x17a)](0x28,Math[_0x1e922f(0x176)](0x4,..._0x19761b['map'](_0x266cb9=>_0x266cb9['name'][_0x1e922f(0x17f)]))),_0x10baee=Math[_0x1e922f(0x17a)](0x24,Math[_0x1e922f(0x176)](0x3,..._0x19761b[_0x1e922f(0x17d)](_0x244ae9=>_0x244ae9['key'][_0x1e922f(0x17f)]))),_0xb3ad2b=Math['min'](0x28,Math['max'](0x4,..._0x19761b[_0x1e922f(0x17d)](_0xefffaf=>_0xefffaf[_0x1e922f(0x16b)][_0x1e922f(0x17f)]))),_0x25fab7=(_0x15b980,_0x4e919b)=>_0x15b980['slice'](0x0,_0x4e919b)['padEnd'](_0x4e919b),_0x2eaa8b=(_0x1d1c69,_0x3c23ec,_0x176f4e,_0x1724a4)=>'\x20\x20'+String(_0x1d1c69)['padStart'](0x6)+'\x20\x20'+_0x25fab7(_0x3c23ec,_0x53a684)+'\x20\x20'+_0x25fab7(_0x176f4e,_0x10baee)+'\x20\x20'+_0x25fab7(_0x1724a4,_0xb3ad2b);console['log'](_0x1e922f(0x185)+_0xf54f5d+(_0x21b292?'\x20('+_0x21b292+')':'')+_0x1e922f(0x167)+_0x4d105a+_0x1e922f(0x173)),console['log'](_0x2eaa8b('ID','Name',_0x1e922f(0x174),'DatasetCode')),console['log']('\x20\x20'+'─'[_0x1e922f(0x186)](0x6)+'\x20\x20'+'─'['repeat'](_0x53a684)+'\x20\x20'+'─'[_0x1e922f(0x186)](_0x10baee)+'\x20\x20'+'─'[_0x1e922f(0x186)](_0xb3ad2b));for(const _0x187b04 of _0x19761b){console[_0x1e922f(0x16a)](_0x2eaa8b(_0x187b04['id'],_0x187b04[_0x1e922f(0x187)],_0x187b04[_0x1e922f(0x171)],_0x187b04[_0x1e922f(0x16b)]));}console['log']();}function a14_0x5606(_0x8ea394,_0xf792dc){_0x8ea394=_0x8ea394-0x15b;const _0x45d4a7=a14_0x45d4();let _0x560636=_0x45d4a7[_0x8ea394];return _0x560636;}export const apiList={'service':'api','command':a14_0x5474ef(0x172),'description':a14_0x5474ef(0x170),'risk':a14_0x5474ef(0x168),'requiresAppCode':!![],'hasFormat':![],'flags':[{'name':a14_0x5474ef(0x15e),'type':a14_0x5474ef(0x163),'description':a14_0x5474ef(0x162),'hidden':!![]},{'name':a14_0x5474ef(0x16f),'type':'string','description':a14_0x5474ef(0x15b),'default':a14_0x5474ef(0x178)}],async 'execute'(_0xb44bca){const _0x13e87c=a14_0x5474ef,_0x1e8687=_0xb44bca[_0x13e87c(0x161)](_0x13e87c(0x15e)),_0x199c54=_0xb44bca[_0x13e87c(0x161)](_0x13e87c(0x16f))||_0x13e87c(0x178);if(!_0x1e8687){let _0x48d586=getMultiAppConfigs();if(_0x48d586&&_0x48d586[_0x13e87c(0x17f)]>0x0){if(_0xb44bca['selectedAppName']){const _0x3da9c1=_0x48d586[_0x13e87c(0x15d)](_0x35f4a9=>_0x35f4a9['name']===_0xb44bca[_0x13e87c(0x15c)]);if(_0x3da9c1[_0x13e87c(0x17f)]===0x0){const _0x15e2b0=_0x48d586['map'](_0x2693ad=>_0x2693ad[_0x13e87c(0x187)])['join'](',\x20');return{'ok':![],'message':'App\x20\x22'+_0xb44bca[_0x13e87c(0x15c)]+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0x15e2b0};}_0x48d586=_0x3da9c1;}for(const _0x135e40 of _0x48d586){const _0x3f84c3=_0x135e40[_0x13e87c(0x182)]||_0xb44bca[_0x13e87c(0x182)],_0x189cf1=_0x135e40[_0x13e87c(0x15f)]||'production';initEnv(_0x189cf1),_0x199c54!=='json'&&(console[_0x13e87c(0x16a)]('\x0a'+'='[_0x13e87c(0x186)](0x32)),console['log'](_0x13e87c(0x16d)+_0x135e40['name']+(_0x135e40[_0x13e87c(0x175)]?_0x13e87c(0x183):'')+_0x13e87c(0x164)+_0x189cf1+']'),console[_0x13e87c(0x16a)](''+'='['repeat'](0x32))),await printModelsForApp(_0x135e40[_0x13e87c(0x15e)],_0x3f84c3,_0x135e40['name'],_0x199c54);}return{'ok':!![]};}}return await printModelsForApp(_0xb44bca[_0x13e87c(0x16c)],_0xb44bca[_0x13e87c(0x182)],undefined,_0x199c54),{'ok':!![]};}};
1
+ function a15_0x1cb8(){const _0x3a2227=['log','15782xVVDQq','production','\x20model(s)\x0a','Key','format','5bsQMVM','map','length','json','6375480SkaHCM','padStart','join','str','7282836mcHklI','\x20\x20[','6093496aQJqaL','min','selectedAppName','table','padEnd','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','string','48fKsXRL','Name','\x20(default)','appCode','repeat','isDefault','read','229352xyfUTZ','7iHNqxi','63ZaLbcb','\x20\x20|\x20\x20','DatasetCode','max','stringify','slice','api','datasetCode','13820890uvQhNE','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','\x0a\x20\x20App:\x20','name','App\x20\x22','filter','\x20\x20|\x20\x20No\x20models\x20found\x0a','Output\x20format:\x20table\x20(default)\x20|\x20json','43RaqRVs','\x20\x20App:\x20','appcode','key','cookie','4742551OybZJQ'];a15_0x1cb8=function(){return _0x3a2227;};return a15_0x1cb8();}function a15_0x1c0f(_0x3da8ce,_0x48d508){_0x3da8ce=_0x3da8ce-0x19f;const _0x1cb8ee=a15_0x1cb8();let _0x1c0f42=_0x1cb8ee[_0x3da8ce];return _0x1c0f42;}const a15_0x178a1c=a15_0x1c0f;(function(_0x517f6d,_0x28c021){const _0x1f407d=a15_0x1c0f,_0x49a45e=_0x517f6d();while(!![]){try{const _0x1b2625=parseInt(_0x1f407d(0x1be))/0x1*(parseInt(_0x1f407d(0x1c5))/0x2)+-parseInt(_0x1f407d(0x1ae))/0x3*(-parseInt(_0x1f407d(0x1ac))/0x4)+-parseInt(_0x1f407d(0x1ca))/0x5*(-parseInt(_0x1f407d(0x1ce))/0x6)+-parseInt(_0x1f407d(0x1ad))/0x7*(parseInt(_0x1f407d(0x1d4))/0x8)+-parseInt(_0x1f407d(0x1d2))/0x9+parseInt(_0x1f407d(0x1b6))/0xa+parseInt(_0x1f407d(0x1c3))/0xb*(-parseInt(_0x1f407d(0x1a5))/0xc);if(_0x1b2625===_0x28c021)break;else _0x49a45e['push'](_0x49a45e['shift']());}catch(_0x379fc9){_0x49a45e['push'](_0x49a45e['shift']());}}}(a15_0x1cb8,0xa9191));import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';import{getMultiAppConfigs}from'../../utils/config.js';async function printModelsForApp(_0xc6b0d8,_0x47e6d4,_0x57691b,_0x5e4098=a15_0x178a1c(0x1a1)){const _0xd437bf=a15_0x178a1c,{configArray:_0x1a3482,count:_0x5b5356}=await fetchModelList(_0xc6b0d8,_0x47e6d4);if(_0x5b5356===0x0){_0x5e4098==='json'?console[_0xd437bf(0x1c4)](JSON[_0xd437bf(0x1b2)]({'appCode':_0xc6b0d8,'models':[]})):console[_0xd437bf(0x1c4)](_0xd437bf(0x1bf)+_0xc6b0d8+_0xd437bf(0x1bc));return;}if(_0x5e4098===_0xd437bf(0x1cd)){console[_0xd437bf(0x1c4)](JSON[_0xd437bf(0x1b2)]({'appCode':_0xc6b0d8,'appName':_0x57691b,'total':_0x5b5356,'models':_0x1a3482}));return;}const _0xdae54f=Math[_0xd437bf(0x19f)](0x28,Math['max'](0x4,..._0x1a3482[_0xd437bf(0x1cb)](_0x34fe8a=>_0x34fe8a[_0xd437bf(0x1b9)][_0xd437bf(0x1cc)]))),_0x1ec61e=Math[_0xd437bf(0x19f)](0x24,Math[_0xd437bf(0x1b1)](0x3,..._0x1a3482[_0xd437bf(0x1cb)](_0x335dc8=>_0x335dc8[_0xd437bf(0x1c1)][_0xd437bf(0x1cc)]))),_0x1b7dc0=Math[_0xd437bf(0x19f)](0x28,Math[_0xd437bf(0x1b1)](0x4,..._0x1a3482[_0xd437bf(0x1cb)](_0x508d48=>_0x508d48[_0xd437bf(0x1b5)][_0xd437bf(0x1cc)]))),_0x412ce1=(_0x5eaf93,_0x3e7422)=>_0x5eaf93[_0xd437bf(0x1b3)](0x0,_0x3e7422)[_0xd437bf(0x1a2)](_0x3e7422),_0x505531=(_0x20612f,_0x22fa00,_0x2896db,_0x2a5b23)=>'\x20\x20'+String(_0x20612f)[_0xd437bf(0x1cf)](0x6)+'\x20\x20'+_0x412ce1(_0x22fa00,_0xdae54f)+'\x20\x20'+_0x412ce1(_0x2896db,_0x1ec61e)+'\x20\x20'+_0x412ce1(_0x2a5b23,_0x1b7dc0);console[_0xd437bf(0x1c4)](_0xd437bf(0x1b8)+_0xc6b0d8+(_0x57691b?'\x20('+_0x57691b+')':'')+_0xd437bf(0x1af)+_0x5b5356+_0xd437bf(0x1c7)),console[_0xd437bf(0x1c4)](_0x505531('ID',_0xd437bf(0x1a6),_0xd437bf(0x1c8),_0xd437bf(0x1b0))),console['log']('\x20\x20'+'─'[_0xd437bf(0x1a9)](0x6)+'\x20\x20'+'─'[_0xd437bf(0x1a9)](_0xdae54f)+'\x20\x20'+'─'['repeat'](_0x1ec61e)+'\x20\x20'+'─'['repeat'](_0x1b7dc0));for(const _0x12f5fe of _0x1a3482){console[_0xd437bf(0x1c4)](_0x505531(_0x12f5fe['id'],_0x12f5fe['name'],_0x12f5fe[_0xd437bf(0x1c1)],_0x12f5fe[_0xd437bf(0x1b5)]));}console[_0xd437bf(0x1c4)]();}export const apiList={'service':a15_0x178a1c(0x1b4),'command':'list','description':a15_0x178a1c(0x1b7),'risk':a15_0x178a1c(0x1ab),'requiresAppCode':!![],'hasFormat':![],'flags':[{'name':a15_0x178a1c(0x1c0),'type':a15_0x178a1c(0x1a4),'description':'Override\x20app\x20code','hidden':!![]},{'name':a15_0x178a1c(0x1c9),'type':'string','description':a15_0x178a1c(0x1bd),'default':a15_0x178a1c(0x1a1)}],async 'execute'(_0x358449){const _0x45697e=a15_0x178a1c,_0x445d56=_0x358449[_0x45697e(0x1d1)](_0x45697e(0x1c0)),_0x37bc02=_0x358449['str'](_0x45697e(0x1c9))||_0x45697e(0x1a1);if(!_0x445d56){let _0x1516ff=getMultiAppConfigs();if(_0x1516ff&&_0x1516ff[_0x45697e(0x1cc)]>0x0){if(_0x358449[_0x45697e(0x1a0)]){const _0x4cc745=_0x1516ff[_0x45697e(0x1bb)](_0x1e392f=>_0x1e392f[_0x45697e(0x1b9)]===_0x358449[_0x45697e(0x1a0)]);if(_0x4cc745[_0x45697e(0x1cc)]===0x0){const _0x449558=_0x1516ff[_0x45697e(0x1cb)](_0x593cdc=>_0x593cdc['name'])[_0x45697e(0x1d0)](',\x20');return{'ok':![],'message':_0x45697e(0x1ba)+_0x358449['selectedAppName']+_0x45697e(0x1a3)+_0x449558};}_0x1516ff=_0x4cc745;}for(const _0x5cc751 of _0x1516ff){const _0x537cc1=_0x5cc751[_0x45697e(0x1c2)]||_0x358449[_0x45697e(0x1c2)],_0x54a7bc=_0x5cc751['env']||_0x45697e(0x1c6);initEnv(_0x54a7bc),_0x37bc02!==_0x45697e(0x1cd)&&(console['log']('\x0a'+'='['repeat'](0x32)),console['log']('\x20\x20App:\x20'+_0x5cc751[_0x45697e(0x1b9)]+(_0x5cc751[_0x45697e(0x1aa)]?_0x45697e(0x1a7):'')+_0x45697e(0x1d3)+_0x54a7bc+']'),console[_0x45697e(0x1c4)](''+'='[_0x45697e(0x1a9)](0x32))),await printModelsForApp(_0x5cc751['appcode'],_0x537cc1,_0x5cc751[_0x45697e(0x1b9)],_0x37bc02);}return{'ok':!![]};}}return await printModelsForApp(_0x358449[_0x45697e(0x1a8)],_0x358449[_0x45697e(0x1c2)],undefined,_0x37bc02),{'ok':!![]};}};
@@ -1 +1 @@
1
- function a15_0x45c2(){const _0x16679f=['9QWJsVz','\x20succeeded,\x20','23274mXttGa','\x20failed','filter','join','13415uXOHAH','name','.ts','write','76TGQjqz','-client','output','\x20dataset(s),\x20generated\x20','appcode','2370mWOMgj','1725872eWIvMa','log','Pulling\x20','map','error','string','\x20\x20•\x20','199402aiskGr','11XXfjpf','\x20dataset(s)\x20→\x20','includes',')...','client','str','slice','apiFilePath','\x20model(s)','App\x20\x22','split','497785OzAaRy','length','1452540RjOgpj','selectedAppName','apiDir','1046268hJpeRV','cookie','Done:\x20','fail','endsWith','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','message','env','appCode','\x20app(s)\x20failed','pull','7vmWzCu','clientFilePath','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(./src/api/)','start','modelCount','./src/api/','Override\x20app\x20code','Pulled\x20','api','succeed'];a15_0x45c2=function(){return _0x16679f;};return a15_0x45c2();}const a15_0x4fa886=a15_0x4742;(function(_0x860bc5,_0x348533){const _0x5ec326=a15_0x4742,_0x26a434=_0x860bc5();while(!![]){try{const _0x479b35=parseInt(_0x5ec326(0xfc))/0x1+parseInt(_0x5ec326(0xf0))/0x2*(parseInt(_0x5ec326(0x116))/0x3)+-parseInt(_0x5ec326(0xe3))/0x4*(-parseInt(_0x5ec326(0x11c))/0x5)+parseInt(_0x5ec326(0x101))/0x6+parseInt(_0x5ec326(0x10c))/0x7*(-parseInt(_0x5ec326(0xe9))/0x8)+-parseInt(_0x5ec326(0x118))/0x9*(parseInt(_0x5ec326(0xe8))/0xa)+parseInt(_0x5ec326(0xf1))/0xb*(parseInt(_0x5ec326(0xfe))/0xc);if(_0x479b35===_0x348533)break;else _0x26a434['push'](_0x26a434['shift']());}catch(_0x25d2c3){_0x26a434['push'](_0x26a434['shift']());}}}(a15_0x45c2,0x4cd30));import a15_0x281242 from'ora';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a15_0x4742(_0x305d5c,_0x12d007){_0x305d5c=_0x305d5c-0xe0;const _0x45c2ab=a15_0x45c2();let _0x47424f=_0x45c2ab[_0x305d5c];return _0x47424f;}import{generateApiFile}from'../../api/generate-api-file.js';import{getMultiAppConfigs}from'../../utils/config.js';export const apiPull={'service':a15_0x4fa886(0x114),'command':a15_0x4fa886(0x10b),'description':a15_0x4fa886(0x10e),'risk':a15_0x4fa886(0xe2),'requiresAppCode':!![],'hasFormat':![],'flags':[{'name':a15_0x4fa886(0xe7),'type':a15_0x4fa886(0xee),'description':a15_0x4fa886(0x112),'hidden':!![]},{'name':a15_0x4fa886(0xe5),'type':'string','description':'Output\x20directory\x20(default:\x20./src/api/)'}],async 'execute'(_0x567ac5){const _0x43aa43=a15_0x4fa886,_0x554188=_0x567ac5[_0x43aa43(0xf6)]('appcode'),_0x39963a=_0x567ac5[_0x43aa43(0xf6)](_0x43aa43(0xe5))||undefined;if(!_0x554188){let _0x5994cd=getMultiAppConfigs();if(_0x5994cd&&_0x5994cd[_0x43aa43(0xfd)]>0x0){if(_0x567ac5[_0x43aa43(0xff)]){const _0x18468e=_0x5994cd[_0x43aa43(0x11a)](_0x2396e6=>_0x2396e6[_0x43aa43(0xe0)]===_0x567ac5[_0x43aa43(0xff)]);if(_0x18468e['length']===0x0){const _0x2fcfc5=_0x5994cd[_0x43aa43(0xec)](_0x2b0ce8=>_0x2b0ce8[_0x43aa43(0xe0)])[_0x43aa43(0x11b)](',\x20');return{'ok':![],'message':_0x43aa43(0xfa)+_0x567ac5[_0x43aa43(0xff)]+_0x43aa43(0x106)+_0x2fcfc5};}_0x5994cd=_0x18468e;}let _0x13bbcc=0x0,_0x4fa6af=0x0;for(const _0x53492e of _0x5994cd){const _0x4bfbb9=_0x53492e[_0x43aa43(0x102)]||_0x567ac5[_0x43aa43(0x102)],_0x182399=_0x53492e[_0x43aa43(0x108)]||'production';initEnv(_0x182399);const _0x32b0e4=_0x53492e[_0x43aa43(0x100)]||_0x39963a||_0x43aa43(0x111),_0x5d4284=_0x53492e['isDefault']?'':_0x53492e[_0x43aa43(0xe0)]||_0x53492e[_0x43aa43(0xe7)],_0x1a1359=a15_0x281242(_0x43aa43(0xeb)+_0x53492e[_0x43aa43(0xe0)]+'\x20('+_0x53492e[_0x43aa43(0xe7)]+_0x43aa43(0xf4))[_0x43aa43(0x10f)]();try{const {configArray:_0x47b8f4}=await fetchModelList(_0x53492e[_0x43aa43(0xe7)],_0x4bfbb9),_0x175276=await generateApiFile(_0x47b8f4,_0x5d4284,_0x53492e[_0x43aa43(0xe7)],_0x53492e['isDefault'],_0x182399,_0x32b0e4,_0x53492e[_0x43aa43(0xe0)]);_0x1a1359['succeed'](_0x53492e[_0x43aa43(0xe0)]+':\x20'+_0x47b8f4[_0x43aa43(0xfd)]+_0x43aa43(0xf2)+_0x175276[_0x43aa43(0x110)]+_0x43aa43(0xf9)),console[_0x43aa43(0xea)](_0x43aa43(0xef)+_0x175276[_0x43aa43(0xf8)]),console[_0x43aa43(0xea)](_0x43aa43(0xef)+_0x175276[_0x43aa43(0x10d)]),_0x13bbcc++;}catch(_0x3b9662){_0x1a1359['fail'](_0x53492e[_0x43aa43(0xe0)]+':\x20'+(_0x3b9662 instanceof Error?_0x3b9662[_0x43aa43(0x107)]:String(_0x3b9662))),_0x4fa6af++;}}return console[_0x43aa43(0xea)](),_0x4fa6af>0x0&&console[_0x43aa43(0xed)]('!\x20'+_0x4fa6af+_0x43aa43(0x10a)),{'ok':_0x4fa6af===0x0,'message':_0x43aa43(0x103)+_0x13bbcc+_0x43aa43(0x117)+_0x4fa6af+_0x43aa43(0x119)};}}const _0x11e2ef=_0x554188&&_0x554188[_0x43aa43(0xf3)]('-')?_0x554188[_0x43aa43(0xfb)]('-')[_0x43aa43(0xf7)](0x1)[_0x43aa43(0x11b)]('-'):'',_0x55ac61=_0x39963a||_0x567ac5[_0x43aa43(0x100)]||_0x43aa43(0x111),_0x186d46=!_0x554188,_0x37b82c=a15_0x281242('Pulling\x20API\x20config\x20for\x20'+_0x567ac5['appCode']+'...')['start']();try{const {configArray:_0x6d5d96}=await fetchModelList(_0x567ac5[_0x43aa43(0x109)],_0x567ac5['cookie']),_0x2c15a1=await generateApiFile(_0x6d5d96,_0x11e2ef,_0x567ac5[_0x43aa43(0x109)],_0x186d46,getEnv(),_0x55ac61);_0x37b82c[_0x43aa43(0x115)](_0x43aa43(0x113)+_0x6d5d96[_0x43aa43(0xfd)]+_0x43aa43(0xe6)+_0x2c15a1[_0x43aa43(0x110)]+'\x20model(s)');const _0x390e1c=_0x11e2ef?_0x11e2ef+'-api':_0x43aa43(0x114),_0x2c5734=_0x11e2ef?_0x11e2ef+_0x43aa43(0xe4):_0x43aa43(0xf5),_0x55f5ec=_0x55ac61[_0x43aa43(0x105)]('/')?_0x55ac61:_0x55ac61+'/';return console[_0x43aa43(0xea)](_0x43aa43(0xef)+_0x55f5ec+_0x390e1c+_0x43aa43(0xe1)),console[_0x43aa43(0xea)](_0x43aa43(0xef)+_0x55f5ec+_0x2c5734+_0x43aa43(0xe1)),{'ok':!![],'data':{'datasetCount':_0x6d5d96[_0x43aa43(0xfd)],'modelCount':_0x2c15a1[_0x43aa43(0x110)]}};}catch(_0x4dc2a9){_0x37b82c[_0x43aa43(0x104)]('Failed:\x20'+(_0x4dc2a9 instanceof Error?_0x4dc2a9[_0x43aa43(0x107)]:String(_0x4dc2a9)));throw _0x4dc2a9;}}};
1
+ const a16_0x14a646=a16_0x315b;(function(_0x2ac997,_0x538410){const _0x21fc49=a16_0x315b,_0x5acbac=_0x2ac997();while(!![]){try{const _0x3cc036=-parseInt(_0x21fc49(0x145))/0x1+-parseInt(_0x21fc49(0x15c))/0x2+parseInt(_0x21fc49(0x156))/0x3+parseInt(_0x21fc49(0x138))/0x4+-parseInt(_0x21fc49(0x150))/0x5*(-parseInt(_0x21fc49(0x15a))/0x6)+-parseInt(_0x21fc49(0x15d))/0x7*(parseInt(_0x21fc49(0x149))/0x8)+parseInt(_0x21fc49(0x14d))/0x9;if(_0x3cc036===_0x538410)break;else _0x5acbac['push'](_0x5acbac['shift']());}catch(_0x5194d2){_0x5acbac['push'](_0x5acbac['shift']());}}}(a16_0x1e1f,0xe184b));function a16_0x1e1f(){const _0x1f7af6=['api','\x20failed','\x20app(s)\x20failed','filter','19140FANLdP','modelCount','Pulled\x20','apiFilePath','26502piNsVr','\x20dataset(s)\x20→\x20','3138970EMrhoB','1743whSwrJ','length','\x20\x20•\x20','Output\x20directory\x20(default:\x20./src/api/)','Done:\x20','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','.ts','Failed:\x20','Pulling\x20','Override\x20app\x20code','fail','name','2184540TcxUcV','join','appCode','\x20model(s)',')...','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(./src/api/)','appcode','log','apiDir','isDefault','includes','selectedAppName','output','946078epfaSc','map','\x20succeeded,\x20','cookie','31384SLFmbk','clientFilePath','str','split','24794379xgbgmN','App\x20\x22','string','1255FevLUj','-api'];a16_0x1e1f=function(){return _0x1f7af6;};return a16_0x1e1f();}import a16_0x40754e from'ora';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a16_0x315b(_0x22f1f2,_0x59c277){_0x22f1f2=_0x22f1f2-0x132;const _0x1e1f80=a16_0x1e1f();let _0x315b10=_0x1e1f80[_0x22f1f2];return _0x315b10;}import{generateApiFile}from'../../api/generate-api-file.js';import{getMultiAppConfigs}from'../../utils/config.js';export const apiPull={'service':a16_0x14a646(0x152),'command':'pull','description':a16_0x14a646(0x13d),'risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{'name':a16_0x14a646(0x13e),'type':a16_0x14a646(0x14f),'description':a16_0x14a646(0x135),'hidden':!![]},{'name':a16_0x14a646(0x144),'type':a16_0x14a646(0x14f),'description':a16_0x14a646(0x160)}],async 'execute'(_0xe265){const _0x3c6d6=a16_0x14a646,_0x1a0f33=_0xe265['str'](_0x3c6d6(0x13e)),_0x1ab2ba=_0xe265[_0x3c6d6(0x14b)](_0x3c6d6(0x144))||undefined;if(!_0x1a0f33){let _0x32cb41=getMultiAppConfigs();if(_0x32cb41&&_0x32cb41[_0x3c6d6(0x15e)]>0x0){if(_0xe265['selectedAppName']){const _0x2ad428=_0x32cb41[_0x3c6d6(0x155)](_0x562856=>_0x562856[_0x3c6d6(0x137)]===_0xe265[_0x3c6d6(0x143)]);if(_0x2ad428[_0x3c6d6(0x15e)]===0x0){const _0x57b830=_0x32cb41[_0x3c6d6(0x146)](_0x459cf2=>_0x459cf2['name'])[_0x3c6d6(0x139)](',\x20');return{'ok':![],'message':_0x3c6d6(0x14e)+_0xe265[_0x3c6d6(0x143)]+_0x3c6d6(0x162)+_0x57b830};}_0x32cb41=_0x2ad428;}let _0x278a5a=0x0,_0xabd5dc=0x0;for(const _0x5d1a9f of _0x32cb41){const _0x289822=_0x5d1a9f[_0x3c6d6(0x148)]||_0xe265[_0x3c6d6(0x148)],_0x3bd95a=_0x5d1a9f['env']||'production';initEnv(_0x3bd95a);const _0x4371bf=_0x5d1a9f[_0x3c6d6(0x140)]||_0x1ab2ba||'./src/api/',_0x4bd0fb=_0x5d1a9f[_0x3c6d6(0x141)]?'':_0x5d1a9f['name']||_0x5d1a9f[_0x3c6d6(0x13e)],_0x400afb=a16_0x40754e(_0x3c6d6(0x134)+_0x5d1a9f[_0x3c6d6(0x137)]+'\x20('+_0x5d1a9f[_0x3c6d6(0x13e)]+_0x3c6d6(0x13c))['start']();try{const {configArray:_0x4bdd95}=await fetchModelList(_0x5d1a9f[_0x3c6d6(0x13e)],_0x289822),_0x5275e5=await generateApiFile(_0x4bdd95,_0x4bd0fb,_0x5d1a9f[_0x3c6d6(0x13e)],_0x5d1a9f['isDefault'],_0x3bd95a,_0x4371bf,_0x5d1a9f[_0x3c6d6(0x137)]);_0x400afb['succeed'](_0x5d1a9f[_0x3c6d6(0x137)]+':\x20'+_0x4bdd95[_0x3c6d6(0x15e)]+_0x3c6d6(0x15b)+_0x5275e5['modelCount']+_0x3c6d6(0x13b)),console[_0x3c6d6(0x13f)](_0x3c6d6(0x15f)+_0x5275e5[_0x3c6d6(0x159)]),console[_0x3c6d6(0x13f)]('\x20\x20•\x20'+_0x5275e5[_0x3c6d6(0x14a)]),_0x278a5a++;}catch(_0x2e5a6a){_0x400afb['fail'](_0x5d1a9f['name']+':\x20'+(_0x2e5a6a instanceof Error?_0x2e5a6a['message']:String(_0x2e5a6a))),_0xabd5dc++;}}return console[_0x3c6d6(0x13f)](),_0xabd5dc>0x0&&console['error']('!\x20'+_0xabd5dc+_0x3c6d6(0x154)),{'ok':_0xabd5dc===0x0,'message':_0x3c6d6(0x161)+_0x278a5a+_0x3c6d6(0x147)+_0xabd5dc+_0x3c6d6(0x153)};}}const _0x3f8f84=_0x1a0f33&&_0x1a0f33[_0x3c6d6(0x142)]('-')?_0x1a0f33[_0x3c6d6(0x14c)]('-')['slice'](0x1)[_0x3c6d6(0x139)]('-'):'',_0x4ea3c5=_0x1ab2ba||_0xe265['apiDir']||'./src/api/',_0x325684=!_0x1a0f33,_0x4ddb8c=a16_0x40754e('Pulling\x20API\x20config\x20for\x20'+_0xe265[_0x3c6d6(0x13a)]+'...')['start']();try{const {configArray:_0x5c3a3c}=await fetchModelList(_0xe265['appCode'],_0xe265[_0x3c6d6(0x148)]),_0x4b14c8=await generateApiFile(_0x5c3a3c,_0x3f8f84,_0xe265['appCode'],_0x325684,getEnv(),_0x4ea3c5);_0x4ddb8c['succeed'](_0x3c6d6(0x158)+_0x5c3a3c['length']+'\x20dataset(s),\x20generated\x20'+_0x4b14c8[_0x3c6d6(0x157)]+_0x3c6d6(0x13b));const _0x510adb=_0x3f8f84?_0x3f8f84+_0x3c6d6(0x151):_0x3c6d6(0x152),_0x45b9cc=_0x3f8f84?_0x3f8f84+'-client':'client',_0x4b6e48=_0x4ea3c5['endsWith']('/')?_0x4ea3c5:_0x4ea3c5+'/';return console[_0x3c6d6(0x13f)](_0x3c6d6(0x15f)+_0x4b6e48+_0x510adb+_0x3c6d6(0x132)),console[_0x3c6d6(0x13f)](_0x3c6d6(0x15f)+_0x4b6e48+_0x45b9cc+_0x3c6d6(0x132)),{'ok':!![],'data':{'datasetCount':_0x5c3a3c[_0x3c6d6(0x15e)],'modelCount':_0x4b14c8['modelCount']}};}catch(_0x263c45){_0x4ddb8c[_0x3c6d6(0x136)](_0x3c6d6(0x133)+(_0x263c45 instanceof Error?_0x263c45['message']:String(_0x263c45)));throw _0x263c45;}}};