@lovrabet/rabetbase-cli 2.0.2-beta.6 → 2.0.2-beta.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ai-setup/config.js +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -0
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/doc.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/app.js +1 -1
- package/lib/commands/auth.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/new.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/build.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config.js +1 -1
- package/lib/commands/create.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/logout.js +1 -1
- package/lib/commands/logs.js +1 -1
- package/lib/commands/mcp.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/preview.js +1 -1
- package/lib/commands/project-upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run.js +1 -1
- package/lib/commands/skill.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/start.js +1 -1
- package/lib/config/config-help.js +1 -1
- package/lib/config/main.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/non-interactive.js +1 -1
- package/lib/create-app/task-finished.js +1 -1
- package/lib/create-app/task-loading.js +1 -1
- package/lib/create-app/task-running.js +1 -1
- package/lib/create-app/task-time.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/mcp/McpInstallUI.js +1 -1
- package/lib/mcp/claude.js +1 -1
- package/lib/mcp/cursor.js +1 -1
- package/lib/mcp/main.js +1 -1
- package/lib/mcp/mcp-install-non-interactive.js +1 -1
- package/lib/mcp/mcp-installer.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -0
- package/lib/telemetry/otel-logger-version.js +1 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -0
- package/lib/ui/IDESelector.js +1 -1
- package/lib/ui/useIDESelection.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/package.json +2 -1
package/lib/ai-setup/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a0_0x1279(_0x47f07d,_0x4c05fb){_0x47f07d=_0x47f07d-0x1a8;const _0x32321d=a0_0x3232();let _0x127945=_0x32321d[_0x47f07d];return _0x127945;}const a0_0x3a34a2=a0_0x1279;(function(_0x5a8bd7,_0x52cde4){const _0x4891cf=a0_0x1279,_0xc17103=_0x5a8bd7();while(!![]){try{const _0x5baa4c=-parseInt(_0x4891cf(0x1b9))/0x1+-parseInt(_0x4891cf(0x1aa))/0x2+parseInt(_0x4891cf(0x1de))/0x3+-parseInt(_0x4891cf(0x1c8))/0x4*(parseInt(_0x4891cf(0x1c7))/0x5)+parseInt(_0x4891cf(0x1d3))/0x6*(parseInt(_0x4891cf(0x1d8))/0x7)+parseInt(_0x4891cf(0x1ab))/0x8+parseInt(_0x4891cf(0x1bf))/0x9;if(_0x5baa4c===_0x52cde4)break;else _0xc17103['push'](_0xc17103['shift']());}catch(_0x238ff8){_0xc17103['push'](_0xc17103['shift']());}}}(a0_0x3232,0xcaa4d));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';import{copyRulesToAgentsMd,copyRulesToCursor}from'../utils/rules-cdn.js';import{normalizeEnv}from'../constant/env.js';const MCP_SERVER_NAME=a0_0x3a34a2(0x1bc),MCP_COMMAND=a0_0x3a34a2(0x1be),MCP_ARGS=[a0_0x3a34a2(0x1b3)];export function buildEnvConfig(_0xda5c3d,_0x3408e5){const _0x591c9b=a0_0x3a34a2,_0x55d055={'RABETBASE_APP_CODE':String(_0xda5c3d)};return _0x3408e5!=='production'&&(_0x55d055[_0x591c9b(0x1af)]=String(_0x3408e5)),_0x55d055;}export async function configureCursorMcp(_0x1cd5c5){const _0x2baffe=a0_0x3a34a2,_0x5e30e2=_0x1cd5c5||process[_0x2baffe(0x1cf)](),_0x4d83f2=readConfig(_0x5e30e2),_0x569cd4=_0x4d83f2['appcode']||_0x4d83f2['app'],_0x351160=normalizeEnv(_0x4d83f2['env']||'production');if(!_0x569cd4)return{'ide':_0x2baffe(0x1d7),'status':_0x2baffe(0x1bb),'message':_0x2baffe(0x1da)};const _0xe3befe=buildEnvConfig(_0x569cd4,_0x351160),_0x247b1e={'command':MCP_COMMAND,'args':MCP_ARGS,'env':_0xe3befe},_0x38fd88=join(_0x5e30e2,'.cursor',_0x2baffe(0x1bd)),_0x2d5667=join(_0x5e30e2,'.cursor');try{!existsSync(_0x2d5667)&&mkdirSync(_0x2d5667,{'recursive':!![]});let _0x514c29={'mcpServers':{}};if(existsSync(_0x38fd88)){const _0x2d9795=readFileSync(_0x38fd88,_0x2baffe(0x1b0));_0x514c29=JSON[_0x2baffe(0x1dd)](_0x2d9795);}return(!_0x514c29['mcpServers']||typeof _0x514c29[_0x2baffe(0x1cb)]!==_0x2baffe(0x1ac))&&(_0x514c29[_0x2baffe(0x1cb)]={}),_0x514c29[_0x2baffe(0x1cb)][MCP_SERVER_NAME]=_0x247b1e,writeFileSync(_0x38fd88,JSON['stringify'](_0x514c29,null,0x2),_0x2baffe(0x1b0)),logger['info']('mcp-install','Cursor\x20MCP\x20configured\x20successfully',{'appcode':_0x569cd4,'env':_0x351160,'path':_0x38fd88}),await copyRulesToCursor(_0x5e30e2),{'ide':_0x2baffe(0x1d7),'status':'success','message':_0x2baffe(0x1c1)};}catch(_0x330390){return logger[_0x2baffe(0x1bb)]('mcp-install',_0x2baffe(0x1cd),{'error':_0x330390 instanceof Error?_0x330390[_0x2baffe(0x1d2)]:String(_0x330390)}),{'ide':'Cursor','status':'error','message':_0x330390 instanceof Error?_0x330390[_0x2baffe(0x1d2)]:String(_0x330390)};}}export async function configureClaudeMcp(_0x1963d2){const _0x41ee64=a0_0x3a34a2,_0x1e66ac=_0x1963d2||process['cwd'](),_0x59c7fd=readConfig(_0x1e66ac),_0x4dce3b=_0x59c7fd[_0x41ee64(0x1a8)]||_0x59c7fd[_0x41ee64(0x1b7)],_0x293274=normalizeEnv(_0x59c7fd[_0x41ee64(0x1b8)]||_0x41ee64(0x1df));if(!_0x4dce3b)return{'ide':'Claude\x20Code','status':'error','message':_0x41ee64(0x1da)};let _0xad86c5=_0x41ee64(0x1d1)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS['join']('\x20')+'\x20-e\x20RABETBASE_APP_CODE='+_0x4dce3b;return _0x293274!=='production'&&(_0xad86c5+=_0x41ee64(0x1d9)+_0x293274),await copyRulesToAgentsMd(_0x1e66ac),logger[_0x41ee64(0x1c2)]('mcp-install',_0x41ee64(0x1a9),{'command':_0xad86c5,'appcode':_0x4dce3b,'env':_0x293274}),console['log'](_0x41ee64(0x1d6)),console['log']('\x20\x20'+_0xad86c5+'\x0a'),console[_0x41ee64(0x1b1)]('Configuration:'),console[_0x41ee64(0x1b1)](_0x41ee64(0x1b2)+_0x4dce3b),_0x293274!==_0x41ee64(0x1df)&&console[_0x41ee64(0x1b1)](_0x41ee64(0x1d5)+_0x293274),console[_0x41ee64(0x1b1)]('\x20\x20Restart\x20Claude\x20Code\x20to\x20take\x20effect\x0a'),{'ide':_0x41ee64(0x1c6),'status':_0x41ee64(0x1db),'message':_0x41ee64(0x1cc)+_0xad86c5};}export async function showOtherGuide(_0x25ee7b){const _0x571be6=a0_0x3a34a2,_0x135524=_0x25ee7b||process[_0x571be6(0x1cf)](),_0x2465f2=readConfig(_0x135524),_0x1e2963=_0x2465f2[_0x571be6(0x1a8)]||_0x2465f2[_0x571be6(0x1b7)],_0xd1289=normalizeEnv(_0x2465f2[_0x571be6(0x1b8)]||_0x571be6(0x1df));if(!_0x1e2963)return{'ide':_0x571be6(0x1ce),'status':_0x571be6(0x1bb),'message':_0x571be6(0x1da)};return console[_0x571be6(0x1b1)](_0x571be6(0x1ae)),console[_0x571be6(0x1b1)]('{'),console['log'](_0x571be6(0x1c9)),console[_0x571be6(0x1b1)](_0x571be6(0x1e0)+MCP_SERVER_NAME+_0x571be6(0x1d4)),console[_0x571be6(0x1b1)](_0x571be6(0x1b6)+MCP_COMMAND+'\x22,'),console[_0x571be6(0x1b1)](_0x571be6(0x1b4)+MCP_ARGS[_0x571be6(0x1c3)](_0x16308d=>'\x22'+_0x16308d+'\x22')[_0x571be6(0x1c4)](',\x20')+'],'),console[_0x571be6(0x1b1)]('\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{'),console[_0x571be6(0x1b1)](_0x571be6(0x1ca)+_0x1e2963+'\x22,'),_0xd1289!==_0x571be6(0x1df)&&console[_0x571be6(0x1b1)](_0x571be6(0x1dc)+_0xd1289+'\x22,'),console[_0x571be6(0x1b1)](_0x571be6(0x1c5)),console[_0x571be6(0x1b1)](_0x571be6(0x1d0)),console[_0x571be6(0x1b1)]('\x20\x20}'),console['log']('}\x0a'),logger['info'](_0x571be6(0x1ad),_0x571be6(0x1c0),{'appcode':_0x1e2963,'env':_0xd1289}),{'ide':_0x571be6(0x1ce),'status':_0x571be6(0x1db),'message':'Configuration\x20guide\x20displayed'};}export async function configureMcp(_0x4858e3,_0x584688){const _0x5c3465=a0_0x3a34a2;switch(_0x4858e3){case _0x5c3465(0x1ba):return await configureCursorMcp(_0x584688);case'claude':return await configureClaudeMcp(_0x584688);default:throw new Error(_0x5c3465(0x1b5)+_0x4858e3);}}function a0_0x3232(){const _0x16008f=['1318774fDdMXt','4840456PnHXel','object','mcp-install','\x0a📋\x20Other\x20IDE\x20MCP\x20configuration:\x0a','RABETBASE_ENV','utf-8','log','\x20\x20AppCode:\x20','@lovrabet/dataset-mcp-server@latest','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[','Unsupported\x20MCP\x20IDE:\x20','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22','app','env','714340DOsPnM','cursor','error','lovrabet-dataset','mcp.json','npx','7721730nUxQin','Configuration\x20guide\x20displayed','Written\x20.cursor/mcp.json','info','map','join','\x20\x20\x20\x20\x20\x20}','Claude\x20Code','4950Wlsdkh','6352qXVDQD','\x20\x20\x22mcpServers\x22:\x20{','\x20\x20\x20\x20\x20\x20\x20\x20\x22RABETBASE_APP_CODE\x22:\x20\x22','mcpServers','Please\x20run:\x20','Cursor\x20MCP\x20configuration\x20failed','Other','cwd','\x20\x20\x20\x20}','claude\x20mcp\x20add\x20','message','791166TuSCyO','\x22:\x20{','\x20\x20Environment:\x20','\x0a📋\x20Run\x20the\x20following\x20command\x20to\x20configure\x20Claude\x20Code\x20MCP:\x0a','Cursor','77eqpOkI','\x20-e\x20RABETBASE_ENV=','Appcode\x20must\x20be\x20configured\x20first','manual','\x20\x20\x20\x20\x20\x20\x20\x20\x22RABETBASE_ENV\x22:\x20\x22','parse','2587134XGMzrI','production','\x20\x20\x20\x20\x22','appcode','Claude\x20Code\x20MCP\x20command\x20generated'];a0_0x3232=function(){return _0x16008f;};return a0_0x3232();}
|
package/lib/api/api-doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x510fd5,_0x2a71f0){const _0x33e9a5=a1_0xba82,_0x8d5277=_0x510fd5();while(!![]){try{const _0x125497=-parseInt(_0x33e9a5(0x1fe))/0x1+-parseInt(_0x33e9a5(0x20c))/0x2+parseInt(_0x33e9a5(0x1f7))/0x3*(parseInt(_0x33e9a5(0x1ff))/0x4)+-parseInt(_0x33e9a5(0x1e5))/0x5*(-parseInt(_0x33e9a5(0x20b))/0x6)+-parseInt(_0x33e9a5(0x1e2))/0x7*(-parseInt(_0x33e9a5(0x1ea))/0x8)+parseInt(_0x33e9a5(0x1f9))/0x9*(-parseInt(_0x33e9a5(0x1ec))/0xa)+-parseInt(_0x33e9a5(0x205))/0xb;if(_0x125497===_0x2a71f0)break;else _0x8d5277['push'](_0x8d5277['shift']());}catch(_0x25f93a){_0x8d5277['push'](_0x8d5277['shift']());}}}(a1_0x262f,0x7d634));function a1_0xba82(_0x534571,_0x4457a9){_0x534571=_0x534571-0x1e1;const _0x262f01=a1_0x262f();let _0xba82fe=_0x262f01[_0x534571];return _0xba82fe;}import{mkdirSync,writeFileSync}from'node:fs';import a1_0x391a22 from'node:path';import{getApiDomain}from'../constant/domain.js';import{logger}from'../utils/logger.js';export async function fetchDatasetDoc(_0x2cab23){const _0x154055=a1_0xba82,{appCode:_0x97e5fc,cookie:_0x4c1b4d,datasetCode:_0x13ec9d,datasetId:_0x33eae2,extraParams:_0x1da037}=_0x2cab23,_0x32d01e=getApiDomain(),_0x518a55=_0x32d01e+_0x154055(0x208),_0x2978ac={'appCode':_0x97e5fc,'datasetCode':_0x13ec9d,'datasetId':_0x33eae2,..._0x1da037||{}},_0xa4510b=await fetch(_0x518a55,{'method':_0x154055(0x1f6),'headers':{'Content-Type':_0x154055(0x1e6),'Cookie':_0x4c1b4d},'body':JSON['stringify'](_0x2978ac)});if(!_0xa4510b['ok']){if(_0xa4510b[_0x154055(0x1f8)]===0x191)throw new Error(_0x154055(0x1ed));let _0x2cd2d3='';try{_0x2cd2d3=await _0xa4510b[_0x154055(0x1fc)]();}catch(_0x504b7b){}throw new Error(_0x154055(0x1f3)+_0x13ec9d+_0x154055(0x1e8)+_0xa4510b['status']+(_0x2cd2d3?'\x0a'+_0x2cd2d3:''));}const _0x3b2457=await _0xa4510b[_0x154055(0x1fd)]();if(!_0x3b2457[_0x154055(0x20a)]||typeof _0x3b2457[_0x154055(0x20a)]['markdown']!==_0x154055(0x1f1))throw new Error(_0x154055(0x1ef)+_0x13ec9d+_0x154055(0x1eb));return _0x3b2457[_0x154055(0x20a)][_0x154055(0x1fa)];}function delay(_0x48f82c){return new Promise(_0x35a785=>setTimeout(_0x35a785,_0x48f82c));}export async function generateDatasetDocs(_0x2ef98b,_0x2d64fd,_0x3ca590,_0x4ece18='./docs',_0x2c4198,_0x5072bb){const _0x48638d=a1_0xba82;mkdirSync(_0x4ece18,{'recursive':!![]});const _0x4ed385=[],_0x469a24=_0x2ef98b[_0x48638d(0x203)];console[_0x48638d(0x1fb)]('\x0a'+_0x469a24+_0x48638d(0x1f0));for(let _0x25660e=0x0;_0x25660e<_0x2ef98b[_0x48638d(0x203)];_0x25660e++){const _0x478428=_0x2ef98b[_0x25660e],_0x432b19=_0x25660e+0x1,_0x25660b=_0x478428[_0x48638d(0x1e9)];try{console['log']('['+_0x432b19+'/'+_0x469a24+_0x48638d(0x209)+_0x25660b+_0x48638d(0x1f2)+_0x478428[_0x48638d(0x1f5)]+')');_0x2c4198&&_0x2c4198(_0x432b19,_0x469a24,_0x25660b);const _0x4f9095=await fetchDatasetDoc({'appCode':_0x2d64fd,'cookie':_0x3ca590,'datasetCode':_0x478428[_0x48638d(0x1e3)],'datasetId':_0x478428['id'],'enableAI':![],'extraParams':_0x5072bb}),_0x3cea09=a1_0x391a22[_0x48638d(0x207)](_0x4ece18,_0x25660b+_0x48638d(0x200));writeFileSync(_0x3cea09,_0x4f9095,{'encoding':_0x48638d(0x202)}),console[_0x48638d(0x1fb)](_0x48638d(0x20d)+_0x25660b+'.md'),logger[_0x48638d(0x1e7)](_0x48638d(0x201),'生成文档成功:\x20'+_0x25660b,undefined,{'datasetCode':_0x478428['datasetCode'],'datasetName':_0x478428[_0x48638d(0x1f5)],'filePath':_0x3cea09,'progress':_0x432b19+'/'+_0x469a24}),_0x4ed385[_0x48638d(0x1f4)]({'datasetCode':_0x478428[_0x48638d(0x1e3)],'datasetName':_0x478428[_0x48638d(0x1f5)],'filePath':_0x3cea09,'success':!![]}),_0x432b19<_0x469a24&&await delay(0x1388);}catch(_0xfefe15){const _0xf12889=_0xfefe15 instanceof Error?_0xfefe15[_0x48638d(0x1ee)]:String(_0xfefe15);console[_0x48638d(0x1fb)](_0x48638d(0x206)+_0x25660b+_0x48638d(0x1e4)+_0xf12889),logger[_0x48638d(0x1e1)]('api-doc','生成文档失败:\x20'+_0x478428[_0x48638d(0x1e3)],{'datasetCode':_0x478428[_0x48638d(0x1e3)],'datasetName':_0x478428[_0x48638d(0x1f5)],'error':_0xf12889,'progress':_0x432b19+'/'+_0x469a24}),_0x4ed385[_0x48638d(0x1f4)]({'datasetCode':_0x478428[_0x48638d(0x1e3)],'datasetName':_0x478428[_0x48638d(0x1f5)],'filePath':'','success':![],'error':_0xf12889}),_0x432b19<_0x469a24&&(console[_0x48638d(0x1fb)](_0x48638d(0x204)),await delay(0xbb8));}}return _0x4ed385;}function a1_0x262f(){const _0x5d2fa7=['name','POST','3gUHzPR','status','9ZCpaPf','markdown','log','text','json','124272OQjQYB','2318852TAsEnh','.md','api-doc','utf8','length','Waiting\x203\x20seconds...\x0a','4602950BDlLrq','✗\x20Failed:\x20','join','/api/node-toolbox/api-doc-generator',']\x20Generating:\x20','data','276qJEeSu','1294060QLgpqd','✓\x20Generated:\x20','error','26859mkjffe','datasetCode','.md\x20-\x20','85295ukcsqe','application/json','success','),\x20HTTP\x20status:\x20','tableName','928cYspbX','):\x20missing\x20data.markdown\x20field','1061790UhYQud','Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','message','Invalid\x20response\x20format\x20(','\x20datasets\x20to\x20generate\x20docs\x20for\x0a','string','.md\x20(','Failed\x20to\x20fetch\x20doc\x20(','push'];a1_0x262f=function(){return _0x5d2fa7;};return a1_0x262f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xef21ba,_0xd863ab){const _0x4e13bc=a2_0x6d5d,_0x47075e=_0xef21ba();while(!![]){try{const _0x347748=-parseInt(_0x4e13bc(0x7e))/0x1+-parseInt(_0x4e13bc(0x79))/0x2*(-parseInt(_0x4e13bc(0x87))/0x3)+parseInt(_0x4e13bc(0x82))/0x4+parseInt(_0x4e13bc(0x77))/0x5*(parseInt(_0x4e13bc(0x78))/0x6)+parseInt(_0x4e13bc(0x74))/0x7*(parseInt(_0x4e13bc(0x73))/0x8)+-parseInt(_0x4e13bc(0x8d))/0x9*(-parseInt(_0x4e13bc(0x7f))/0xa)+-parseInt(_0x4e13bc(0x8e))/0xb;if(_0x347748===_0xd863ab)break;else _0x47075e['push'](_0x47075e['shift']());}catch(_0x1ac71b){_0x47075e['push'](_0x47075e['shift']());}}}(a2_0x50de,0x34666));import{getApiDomain}from'../constant/domain.js';function a2_0x6d5d(_0x2e902f,_0x4d70bc){_0x2e902f=_0x2e902f-0x6f;const _0x50de83=a2_0x50de();let _0x6d5d3=_0x50de83[_0x2e902f];return _0x6d5d3;}import{logger}from'../utils/logger.js';import{getEnv}from'../constant/env.js';function cleanNewlines(_0x2ceee9){const _0x530464=a2_0x6d5d;return _0x2ceee9[_0x530464(0x7c)](/[\r\n]+/g,'\x20')[_0x530464(0x92)]();}function cleanDatasetName(_0x448b35){const _0x41b1fe=a2_0x6d5d;if(!_0x448b35[_0x41b1fe(0x76)])return _0x448b35;return{..._0x448b35,'name':cleanNewlines(_0x448b35[_0x41b1fe(0x76)])};}function a2_0x50de(){const _0x581387=['replace','errorMsg','368238ZDCYOV','42730PGKkzS','fetch-model-list','/api/node-toolbox/dataset/model-list?appcode=','54104GQCtfk','map','error','Failed\x20to\x20fetch\x20datasets,\x20HTTP\x20status:\x20','configArray','111VIjKuV','errorCode','errorMessage','length','正在从服务器拉取模型列表...\x20(环境:\x20','Failed\x20to\x20fetch\x20datasets:\x20','639Qczgwe','3798531bUjHCH','Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again','success','data','trim','Unauthorized','message','401','Unknown\x20error','includes','16ukUBrx','1211707UBMZLB','status','name','94795CwSEII','78YgsOLc','1006OHmfYg','&otype=array','code'];a2_0x50de=function(){return _0x581387;};return a2_0x50de();}function cleanDatasetNames(_0x251d2c){const _0x5d2e61=a2_0x6d5d;return _0x251d2c[_0x5d2e61(0x83)](cleanDatasetName);}export async function fetchModelList(_0x4c2f3a,_0x434709){const _0x53e184=a2_0x6d5d,_0x1790eb=getEnv(),_0x4879f5=getApiDomain()+_0x53e184(0x81)+_0x4c2f3a+_0x53e184(0x7a);logger['info'](_0x53e184(0x80),_0x53e184(0x8b)+_0x1790eb+')',{'apiUrl':_0x4879f5});const _0x43c49b=await fetch(_0x4879f5,{'headers':{'Cookie':_0x434709}});if(!_0x43c49b['ok']){if(_0x43c49b[_0x53e184(0x75)]===0x191)throw new Error(_0x53e184(0x8f));throw new Error(_0x53e184(0x85)+_0x43c49b['status']);}const _0x893e65=await _0x43c49b['json']();if(!_0x893e65[_0x53e184(0x90)]){const _0xa151cd=_0x893e65[_0x53e184(0x7d)]||_0x893e65[_0x53e184(0x6f)]||_0x893e65[_0x53e184(0x91)]?.[_0x53e184(0x6f)]||_0x893e65[_0x53e184(0x89)]||_0x893e65[_0x53e184(0x84)]||_0x53e184(0x71);if(_0xa151cd[_0x53e184(0x72)](_0x53e184(0x70))||_0xa151cd[_0x53e184(0x72)](_0x53e184(0x93))||_0xa151cd[_0x53e184(0x72)]('登录')||_0xa151cd[_0x53e184(0x72)]('认证')||_0x893e65[_0x53e184(0x88)]==='UNAUTHORIZED'||_0x893e65[_0x53e184(0x7b)]===0x191||_0x893e65[_0x53e184(0x7b)]===_0x53e184(0x70))throw new Error('Authentication\x20failed,\x20session\x20expired.\x20Please\x20use\x20rabetbase\x20auth\x20to\x20login\x20again');throw new Error(_0x53e184(0x8c)+_0xa151cd);}const _0x48be5d=cleanDatasetNames(_0x893e65[_0x53e184(0x91)][_0x53e184(0x86)]);return{'configArray':_0x48be5d,'count':_0x48be5d[_0x53e184(0x8a)]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
(function(_0x1a328e,_0x157c34){const _0x2fb3f5=a3_0x13ec,_0x352577=_0x1a328e();while(!![]){try{const _0x46afe5=parseInt(_0x2fb3f5(0x1f5))/0x1+parseInt(_0x2fb3f5(0x1f2))/0x2+parseInt(_0x2fb3f5(0x1e2))/0x3+parseInt(_0x2fb3f5(0x1ff))/0x4+parseInt(_0x2fb3f5(0x1df))/0x5+-parseInt(_0x2fb3f5(0x1fb))/0x6+-parseInt(_0x2fb3f5(0x1fc))/0x7;if(_0x46afe5===_0x157c34)break;else _0x352577['push'](_0x352577['shift']());}catch(_0xc17197){_0x352577['push'](_0x352577['shift']());}}}(a3_0x45ef,0x1b32b));import a3_0x5a4b71 from'prettier';import{mkdirSync,writeFileSync,readFileSync}from'node:fs';import a3_0x224483 from'node:path';function a3_0x45ef(){const _0x16bc3d=['LOVRABET','typescript','templates/generate-api','CONFIG_NAMES.DEFAULT','434826ltZWAR','2626820sgubtS','dirname','API\x20文件生成成功!','391808bZVtQS','format','replace','forEach','slice','datasetCode','494975VYAQbw','toUpperCase','push','404706SWQLVM','utf8','alias','test','tableName','client','length','.ts','resolve','{\x20apiConfigName:\x20','name','../..','Please\x20configure\x20app\x20code\x20first\x20via\x20`rabetbase\x20config\x20set\x20app\x20<value>`','-client','replaceApiContent','key','64534jQuTvT',',\x20env:\x20\x22','join','195018bdeZHD','api.ts.tpl'];a3_0x45ef=function(){return _0x16bc3d;};return a3_0x45ef();}function a3_0x13ec(_0x39029a,_0xc9ab44){_0x39029a=_0x39029a-0x1de;const _0x45ef23=a3_0x45ef();let _0x13ec8d=_0x45ef23[_0x39029a];return _0x13ec8d;}import{fileURLToPath}from'node:url';import{TemplateReplacer}from'../utils/template-replacer.js';import{logger}from'../utils/logger.js';export async function generateApiFile(_0x53b7e3,_0x1a179f,_0x5c1117,_0x402d12,_0xbe1b4c,_0x3f9fcc,_0x458b0a){const _0x95ff4d=a3_0x13ec;if(!_0x5c1117)throw new Error(_0x95ff4d(0x1ee));const _0x5e6aeb=_0x402d12&&!_0x458b0a,_0xf9a9a9=_0x458b0a||_0x5c1117,_0x26a4fd=_0x5e6aeb?_0x95ff4d(0x1fa):'\x22'+_0xf9a9a9+'\x22',_0x3afe83=_0xbe1b4c!=='production';let _0x5b119b;if(_0x5e6aeb)_0x3afe83?_0x5b119b=_0x95ff4d(0x1eb)+_0x26a4fd+_0x95ff4d(0x1f3)+_0xbe1b4c+'\x22\x20}':_0x5b119b='';else{const _0x4685df=_0x3afe83?',\x20env:\x20\x22'+_0xbe1b4c+'\x22':'';_0x5b119b='{\x20apiConfigName:\x20\x22'+_0xf9a9a9+'\x22'+_0x4685df+'\x20}';}const _0x222e34=_0x1a179f?_0x1a179f+'-api':'api',_0x5630c8=_0x1a179f?_0x1a179f+_0x95ff4d(0x1ef):_0x95ff4d(0x1e7),_0x128f07=_0x1a179f&&!/^app-[a-f0-9]+$/i[_0x95ff4d(0x1e5)](_0x1a179f)?_0x1a179f[_0x95ff4d(0x201)](/-/g,'_')[_0x95ff4d(0x1e0)]():_0x95ff4d(0x1f7),_0x4e0614=[];_0x53b7e3[_0x95ff4d(0x202)](_0x3f6756=>{const _0x155837=_0x95ff4d;_0x4e0614[_0x155837(0x1e1)]({'datasetCode':_0x3f6756[_0x155837(0x1de)],'tableName':_0x3f6756[_0x155837(0x1e6)],'name':_0x3f6756[_0x155837(0x1ec)]||'','alias':_0x3f6756[_0x155837(0x1e4)]||_0x3f6756[_0x155837(0x1f1)]});});const _0x443df5=fileURLToPath(import.meta.url),_0x38fed1=a3_0x224483[_0x95ff4d(0x1ea)](a3_0x224483[_0x95ff4d(0x1fd)](_0x443df5),_0x95ff4d(0x1ed)),_0x4db052=a3_0x224483['join'](_0x38fed1,_0x95ff4d(0x1f9)),_0x18d57a=a3_0x224483[_0x95ff4d(0x1f4)](_0x4db052,_0x95ff4d(0x1f6)),_0x1cf065=a3_0x224483[_0x95ff4d(0x1f4)](_0x4db052,'client.ts.tpl'),_0x1587fb=_0x3f9fcc['endsWith']('/')?_0x3f9fcc[_0x95ff4d(0x203)](0x0,-0x1):_0x3f9fcc;mkdirSync(_0x1587fb,{'recursive':!![]});const _0x34f25a=_0x4e0614[0x0]?.[_0x95ff4d(0x1e4)],_0x5076b4=readFileSync(_0x18d57a,_0x95ff4d(0x1e3)),_0x346635=TemplateReplacer[_0x95ff4d(0x1f0)](_0x5076b4,_0x5c1117,_0x4e0614,_0x34f25a,_0x222e34,_0x26a4fd,undefined,_0x128f07),_0x35be4f=await a3_0x5a4b71[_0x95ff4d(0x200)](_0x346635,{'parser':_0x95ff4d(0x1f8)}),_0x4c22d7=_0x1587fb+'/'+_0x222e34+_0x95ff4d(0x1e9);writeFileSync(_0x4c22d7,_0x35be4f,{'encoding':'utf8'});const _0x255ab6=readFileSync(_0x1cf065,_0x95ff4d(0x1e3)),_0x564cad=TemplateReplacer[_0x95ff4d(0x1f0)](_0x255ab6,_0x5c1117,_0x4e0614,_0x34f25a,_0x222e34,_0x26a4fd,_0x5b119b,_0x128f07),_0x1dee2f=await a3_0x5a4b71[_0x95ff4d(0x200)](_0x564cad,{'parser':'typescript'}),_0x1d1960=_0x1587fb+'/'+_0x5630c8+_0x95ff4d(0x1e9);writeFileSync(_0x1d1960,_0x1dee2f,{'encoding':_0x95ff4d(0x1e3)});const _0x4abd2c=_0x4e0614[_0x95ff4d(0x1e8)];return logger['success']('init-api',_0x95ff4d(0x1fe),undefined,{'apiFile':_0x4c22d7,'clientFile':_0x1d1960,'modelCount':_0x4abd2c,'configName':_0x26a4fd}),{'modelCount':_0x4abd2c,'apiFilePath':_0x4c22d7,'clientFilePath':_0x1d1960,'configName':_0x26a4fd};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x70d0f3,_0x298bdf){const _0x15e596=a4_0x428e,_0x1fc1c6=_0x70d0f3();while(!![]){try{const _0x9a0ac8=-parseInt(_0x15e596(0x19e))/0x1*(-parseInt(_0x15e596(0x19c))/0x2)+-parseInt(_0x15e596(0x19a))/0x3+-parseInt(_0x15e596(0x195))/0x4*(-parseInt(_0x15e596(0x18e))/0x5)+parseInt(_0x15e596(0x18f))/0x6*(parseInt(_0x15e596(0x188))/0x7)+parseInt(_0x15e596(0x199))/0x8+-parseInt(_0x15e596(0x194))/0x9*(-parseInt(_0x15e596(0x189))/0xa)+parseInt(_0x15e596(0x191))/0xb*(-parseInt(_0x15e596(0x197))/0xc);if(_0x9a0ac8===_0x298bdf)break;else _0x1fc1c6['push'](_0x1fc1c6['shift']());}catch(_0x3e0b57){_0x1fc1c6['push'](_0x1fc1c6['shift']());}}}(a4_0x5089,0x4aa56));import{jsx as a4_0x1ae7ad,jsxs as a4_0x3036bc}from'react/jsx-runtime';import{Text,Box,useInput,useApp}from'ink';function a4_0x5089(){const _0x38ea62=['721642zQjBKH','Logging\x20in...\x20','1zetfFh','column','504LmSlgs','130pDHwRZ','Please\x20complete\x20login\x20in\x20your\x20browser.','Press\x20\x22q\x22\x20to\x20exit.','*\x20Login\x20successful!','green','5JVDEGr','6714tfftJb','then','1216567yQEeTP','finally','gray','348147Ctcwzn','1481700ussuBA','return','156wDhEyz','√\x20Valid\x20session\x20detected,\x20no\x20login\x20required.','3444744KpKWnI','5325jawleT','log'];a4_0x5089=function(){return _0x38ea62;};return a4_0x5089();}import{useEffect,useState}from'react';import{getIsSessionValid}from'./is-session-valid.js';import{authServer}from'./auth-server.js';import a4_0x24581d from'ink-spinner';function a4_0x428e(_0xcabae9,_0x178100){_0xcabae9=_0xcabae9-0x188;const _0x508992=a4_0x5089();let _0x428ef3=_0x508992[_0xcabae9];return _0x428ef3;}export function AuthServer(){const _0x44e6f0=a4_0x428e,{exit:_0x3b1cc7}=useApp(),[_0x22fff9,_0x36660f]=useState(![]),[_0x35ddfa,_0x27beae]=useState(!![]),[_0x52e495,_0x498a05]=useState(![]),[_0x370fdf,_0x2ef202]=useState(![]);useEffect(()=>{const _0x44f088=a4_0x428e;getIsSessionValid()['then'](_0x36660f)[_0x44f088(0x192)](()=>_0x27beae(![]));},[]),useEffect(()=>{const _0x471f8f=a4_0x428e;!_0x35ddfa&&_0x22fff9&&(console['log'](_0x471f8f(0x198)),_0x3b1cc7());},[_0x35ddfa,_0x22fff9,_0x3b1cc7]),useEffect(()=>{const _0x3c864a=a4_0x428e;_0x370fdf&&(console[_0x3c864a(0x19b)](_0x3c864a(0x18c)),_0x3b1cc7());},[_0x370fdf,_0x3b1cc7]),useInput((_0x5377aa,_0x14ddad)=>{const _0x118d21=a4_0x428e;_0x14ddad[_0x118d21(0x196)]&&(_0x498a05(!![]),authServer({'silent':!![]})[_0x118d21(0x190)](_0x3d22ef=>{_0x2ef202(_0x3d22ef);})),_0x5377aa==='q'&&_0x3b1cc7();});if(_0x35ddfa)return null;if(_0x22fff9||_0x370fdf)return null;return a4_0x1ae7ad(Box,{'flexDirection':_0x44e6f0(0x19f),'marginTop':0x1,'marginBottom':0x1,'children':_0x52e495?a4_0x3036bc(Box,{'children':[a4_0x1ae7ad(Box,{'width':'1'}),a4_0x3036bc(Text,{'color':_0x44e6f0(0x18d),'children':[a4_0x1ae7ad(a4_0x24581d,{'type':'dots'}),'\x20\x20']}),a4_0x1ae7ad(Text,{'children':_0x44e6f0(0x19d)}),a4_0x1ae7ad(Text,{'color':_0x44e6f0(0x193),'children':_0x44e6f0(0x18a)})]}):a4_0x3036bc(Box,{'children':[a4_0x1ae7ad(Box,{'width':'1'}),a4_0x1ae7ad(Text,{'children':'*\x20Press\x20Enter\x20to\x20start\x20login.'}),a4_0x1ae7ad(Text,{'color':_0x44e6f0(0x193),'children':_0x44e6f0(0x18b)})]})});}
|
package/lib/auth/auth-server.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a5_0x2a549d=a5_0x1e5f;(function(_0x4bc2cc,_0x5955cf){const _0x19bd05=a5_0x1e5f,_0xd73cb8=_0x4bc2cc();while(!![]){try{const _0x3d4445=parseInt(_0x19bd05(0x16b))/0x1*(-parseInt(_0x19bd05(0x18f))/0x2)+-parseInt(_0x19bd05(0x183))/0x3+-parseInt(_0x19bd05(0x169))/0x4*(parseInt(_0x19bd05(0x16e))/0x5)+-parseInt(_0x19bd05(0x187))/0x6+parseInt(_0x19bd05(0x16a))/0x7+-parseInt(_0x19bd05(0x18b))/0x8*(-parseInt(_0x19bd05(0x18c))/0x9)+parseInt(_0x19bd05(0x17d))/0xa;if(_0x3d4445===_0x5955cf)break;else _0xd73cb8['push'](_0xd73cb8['shift']());}catch(_0x42468f){_0xd73cb8['push'](_0xd73cb8['shift']());}}}(a5_0x1348,0x51d94));import{writeFileSync}from'node:fs';import a5_0x5c7448 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(_0x5196bd){const _0x1b3784=a5_0x1e5f,_0x57e999=_0x5196bd?.[_0x1b3784(0x181)]||![];if(await getIsSessionValid())return!![];const _0x1abab2=await(await fetch(_0x1b3784(0x168)))[_0x1b3784(0x16f)]();return new Promise(async(_0x26ebf6,_0x2bc762)=>{const _0x36a812=_0x1b3784;let _0xef9ebd=0x0;const _0x7f2fa2=a5_0x5c7448[_0x36a812(0x17e)](_0x1abab2,async(_0x48d3ba,_0x40cec3)=>{const _0x36437e=_0x36a812,_0x45889c=getUserDomain(),_0x3fe5bd=_0x48d3ba[_0x36437e(0x165)][_0x36437e(0x170)]||'',_0x3ed55e=await fetch(_0x45889c+_0x36437e(0x182),{'headers':{'cookie':_0x3fe5bd}})[_0x36437e(0x180)](_0x2adf80=>_0x2adf80[_0x36437e(0x16f)]()),_0x5bf289=_0x3ed55e&&_0x3ed55e[_0x36437e(0x186)]&&_0x3ed55e[_0x36437e(0x192)];if(_0x5bf289){writeFileSync(cookieFile,_0x3fe5bd,_0x36437e(0x178)),_0x26ebf6(!![]);const _0x3aecb0=_0x36437e(0x17a),_0x490971=_0x36437e(0x194)+'<span\x20id=\x22t\x22>5</span>'+_0x36437e(0x16c),_0x5df788='Unable\x20to\x20close\x20automatically.\x20Please\x20close\x20this\x20tab\x20or\x20window\x20manually.',_0x2f753e=_0x36437e(0x179)+_0x3aecb0+_0x36437e(0x17b)+_0x490971+_0x36437e(0x167)+_0x5df788+'</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>';_0x40cec3[_0x36437e(0x164)](0xc8,{'Content-Type':_0x36437e(0x18d)}),_0x40cec3[_0x36437e(0x18e)](_0x2f753e),_0x7f2fa2['close']();}else{const _0x3f2308=''+encodeURIComponent(_0x36437e(0x190)+_0xef9ebd);_0x40cec3[_0x36437e(0x164)](0x12e,{'location':_0x45889c+_0x36437e(0x17f)+_0x3f2308}),_0x40cec3['end']();return;}});_0x7f2fa2[_0x36a812(0x174)](0x0,_0x36a812(0x18a),()=>{const _0x23020b=_0x36a812,_0xca174=_0x7f2fa2[_0x23020b(0x191)]();_0xef9ebd=typeof _0xca174===_0x23020b(0x16d)&&_0xca174?_0xca174[_0x23020b(0x172)]:Number(_0xca174);const _0xdd41a=_0x23020b(0x190)+_0xef9ebd;!_0x57e999&&(console[_0x23020b(0x176)](_0x23020b(0x166)),console[_0x23020b(0x176)](_0x23020b(0x171),_0xdd41a),console['log']('🌐\x20Attempting\x20to\x20open\x20browser\x20automatically...'),console[_0x23020b(0x176)](''),console[_0x23020b(0x176)](_0x23020b(0x173)),console[_0x23020b(0x176)]('')),openInBrowser(_0xdd41a)[_0x23020b(0x180)](_0x36d22a=>{const _0x32828f=_0x23020b;!_0x57e999&&(_0x36d22a?console[_0x32828f(0x176)]('✅\x20Browser\x20opened.\x20Please\x20complete\x20login\x20in\x20the\x20browser.'):(console['log']('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x32828f(0x176)]('🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:',_0xdd41a)),console[_0x32828f(0x176)](''));})[_0x23020b(0x175)](()=>{const _0x2b3c7a=_0x23020b;!_0x57e999&&(console['log']('⚠️\x20\x20Failed\x20to\x20open\x20browser\x20automatically'),console[_0x2b3c7a(0x176)](_0x2b3c7a(0x17c),_0xdd41a),console[_0x2b3c7a(0x176)](''));});}),_0x7f2fa2['on'](_0x36a812(0x188),_0x9551cd=>{const _0x457f83=_0x36a812;!_0x57e999&&console[_0x457f83(0x188)]('Auth\x20server\x20error:',_0x9551cd),_0x2bc762(_0x9551cd);});});}function a5_0x1348(){const _0x38d9e8=['isAuth','win32','session','2089032zfZvwZ','error','xdg-open\x20\x22','127.0.0.1','238064DWuGDK','81PHRnaN','text/html;\x20charset=utf-8','end','34NytCtd','https://dev.lovrabet.com:','address','user','darwin','Login\x20successful.\x20Please\x20return\x20to\x20the\x20CLI\x20to\x20continue.\x20This\x20window\x20will\x20close\x20in\x20','writeHead','headers','🔐\x20Starting\x20login\x20service...','</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','8KTLnqx','410900QARQEH','12886LNrOWT','\x20seconds.','object','1663525chlAkR','json','cookie','📍\x20Login\x20URL:','port','💡\x20If\x20the\x20browser\x20does\x20not\x20open\x20automatically,\x20copy\x20the\x20login\x20URL\x20above\x20into\x20your\x20browser.','listen','catch','log','start\x20\x22\x22\x20\x22','utf-8','<!doctype\x20html>\x0a<html>\x0a<head><meta\x20charset=\x22utf-8\x22><title>','Login\x20Successful','</title></head>\x0a<body>\x0a\x20\x20<div>','🔗\x20Please\x20copy\x20the\x20login\x20URL\x20into\x20your\x20browser:','17310360HQdGpg','createServer','/sign-in?redirect=','then','silent','/api/auth/get-session','1468986HdvChS'];a5_0x1348=function(){return _0x38d9e8;};return a5_0x1348();}function a5_0x1e5f(_0x573115,_0x16ef9a){_0x573115=_0x573115-0x164;const _0x134829=a5_0x1348();let _0x1e5f99=_0x134829[_0x573115];return _0x1e5f99;}function openInBrowser(_0x84c853){return new Promise(_0x2b1b13=>{const _0x112bb2=a5_0x1e5f,_0x4028c6=process['platform'];let _0x2824e8;if(_0x4028c6===_0x112bb2(0x185))_0x2824e8=_0x112bb2(0x177)+_0x84c853+'\x22';else _0x4028c6===_0x112bb2(0x193)?_0x2824e8='open\x20\x22'+_0x84c853+'\x22':_0x2824e8=_0x112bb2(0x189)+_0x84c853+'\x22';exec(_0x2824e8,_0x4bc5f1=>{_0x4bc5f1?_0x2b1b13(![]):_0x2b1b13(!![]);});});}if(import.meta.main){const isAuth=await authServer();console[a5_0x2a549d(0x176)](a5_0x2a549d(0x184),isAuth);}
|
package/lib/auth/constant.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a6_0x4a22ed=a6_0x224c;(function(_0x5d119d,_0x33da0c){const _0x2ec33a=a6_0x224c,_0xd6a614=_0x5d119d();while(!![]){try{const _0x35c488=parseInt(_0x2ec33a(0xb5))/0x1*(-parseInt(_0x2ec33a(0xb0))/0x2)+parseInt(_0x2ec33a(0xb1))/0x3*(-parseInt(_0x2ec33a(0xb3))/0x4)+parseInt(_0x2ec33a(0xac))/0x5*(parseInt(_0x2ec33a(0xa8))/0x6)+parseInt(_0x2ec33a(0xb4))/0x7*(parseInt(_0x2ec33a(0xae))/0x8)+-parseInt(_0x2ec33a(0xa9))/0x9*(-parseInt(_0x2ec33a(0xb6))/0xa)+-parseInt(_0x2ec33a(0xab))/0xb*(parseInt(_0x2ec33a(0xaf))/0xc)+-parseInt(_0x2ec33a(0xb2))/0xd*(-parseInt(_0x2ec33a(0xad))/0xe);if(_0x35c488===_0x33da0c)break;else _0xd6a614['push'](_0xd6a614['shift']());}catch(_0x3bf54b){_0xd6a614['push'](_0xd6a614['shift']());}}}(a6_0x5f17,0x6a890));import{mkdirSync}from'node:fs';function a6_0x5f17(){const _0x479652=['23022XlCbTh','cookie','3154987mzCgdM','10jPnqhm','406RwaiBb','24QROyhK','12hSRiAA','302074TJSJlW','3auQUuz','169689EpBXef','387904WAVQSD','760984zUbOqZ','2SwRwyx','750ASrpNa','677136nGpiWw'];a6_0x5f17=function(){return _0x479652;};return a6_0x5f17();}import{homedir}from'node:os';function a6_0x224c(_0x112c2b,_0x4127e2){_0x112c2b=_0x112c2b-0xa8;const _0x5f17e9=a6_0x5f17();let _0x224ce3=_0x5f17e9[_0x112c2b];return _0x224ce3;}import{join}from'node:path';export const configDir=join(homedir(),'.lovrabet');export const cookieFile=join(configDir,a6_0x4a22ed(0xaa));mkdirSync(configDir,{'recursive':!![]});
|
package/lib/auth/get-cookie.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5c03e5,_0x55007d){var _0x371ee8=a7_0x5701,_0x224a7f=_0x5c03e5();while(!![]){try{var _0x153a34=parseInt(_0x371ee8(0x128))/0x1*(-parseInt(_0x371ee8(0x126))/0x2)+-parseInt(_0x371ee8(0x125))/0x3*(-parseInt(_0x371ee8(0x124))/0x4)+parseInt(_0x371ee8(0x129))/0x5+parseInt(_0x371ee8(0x12e))/0x6+-parseInt(_0x371ee8(0x127))/0x7+-parseInt(_0x371ee8(0x12b))/0x8+parseInt(_0x371ee8(0x12d))/0x9*(parseInt(_0x371ee8(0x12c))/0xa);if(_0x153a34===_0x55007d)break;else _0x224a7f['push'](_0x224a7f['shift']());}catch(_0x1c9c45){_0x224a7f['push'](_0x224a7f['shift']());}}}(a7_0x1acf,0xcc474));import{readFileSync}from'node:fs';import{cookieFile}from'./constant.js';export function getCookie(){var _0x5b82c4=a7_0x5701;try{return readFileSync(cookieFile,_0x5b82c4(0x12a));}catch{}return'';}function a7_0x5701(_0x59d43b,_0x81d7ef){_0x59d43b=_0x59d43b-0x124;var _0x1acfa3=a7_0x1acf();var _0x570154=_0x1acfa3[_0x59d43b];return _0x570154;}function a7_0x1acf(){var _0x634b4a=['2574408HioZiS','10ITJtji','9201645zbPGBs','2935092ncriOK','1725220KYwsRD','6ZFtidW','958qNEyqN','9203600wnpKQl','2236juCfMf','5850860LpMGdf','utf-8'];a7_0x1acf=function(){return _0x634b4a;};return a7_0x1acf();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x199124,_0x1f6b72){const _0x25e838=a8_0x5609,_0x4890dc=_0x199124();while(!![]){try{const _0x514abf=parseInt(_0x25e838(0x122))/0x1*(parseInt(_0x25e838(0x12a))/0x2)+-parseInt(_0x25e838(0x12c))/0x3+parseInt(_0x25e838(0x125))/0x4+-parseInt(_0x25e838(0x129))/0x5+-parseInt(_0x25e838(0x123))/0x6*(parseInt(_0x25e838(0x126))/0x7)+parseInt(_0x25e838(0x124))/0x8+parseInt(_0x25e838(0x127))/0x9;if(_0x514abf===_0x1f6b72)break;else _0x4890dc['push'](_0x4890dc['shift']());}catch(_0x4260e4){_0x4890dc['push'](_0x4890dc['shift']());}}}(a8_0xbe60,0x63f46));function a8_0xbe60(){const _0x421a2f=['user','15636xqnshN','/api/auth/get-session','6WrIBWw','1266ZkpqKn','2084448YBEbSI','2885600cxjhXu','23555kIMvNa','2351889GWktTL','utf-8','1409990MYmXxB','54454egETEP'];a8_0xbe60=function(){return _0x421a2f;};return a8_0xbe60();}function a8_0x5609(_0x15202c,_0x579802){_0x15202c=_0x15202c-0x121;const _0xbe605d=a8_0xbe60();let _0x560943=_0xbe605d[_0x15202c];return _0x560943;}import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';import{cookieFile}from'./constant.js';export async function getSessionUserInfo(){const _0x1609f4=a8_0x5609;try{if(!existsSync(cookieFile))return null;const _0x2fc07e=readFileSync(cookieFile,_0x1609f4(0x128)),_0x580371=await fetch(getUserDomain()+_0x1609f4(0x121),{'headers':{'cookie':_0x2fc07e}});if(!_0x580371['ok'])return null;const _0x469610=await _0x580371['json']();if(!_0x469610['session']||!_0x469610[_0x1609f4(0x12b)])return null;return _0x469610;}catch{return null;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a9_0x40c7(_0x2b0d4f,_0x36ed6b){_0x2b0d4f=_0x2b0d4f-0x81;const _0x1a8dc9=a9_0x1a8d();let _0x40c77a=_0x1a8dc9[_0x2b0d4f];return _0x40c77a;}(function(_0xdbcfb4,_0x366bf1){const _0x5d057b=a9_0x40c7,_0x382d9b=_0xdbcfb4();while(!![]){try{const _0x117231=parseInt(_0x5d057b(0x8f))/0x1+parseInt(_0x5d057b(0x81))/0x2*(parseInt(_0x5d057b(0x84))/0x3)+-parseInt(_0x5d057b(0x83))/0x4*(parseInt(_0x5d057b(0x82))/0x5)+-parseInt(_0x5d057b(0x85))/0x6+-parseInt(_0x5d057b(0x86))/0x7+-parseInt(_0x5d057b(0x87))/0x8*(-parseInt(_0x5d057b(0x8e))/0x9)+-parseInt(_0x5d057b(0x88))/0xa;if(_0x117231===_0x366bf1)break;else _0x382d9b['push'](_0x382d9b['shift']());}catch(_0x26cb53){_0x382d9b['push'](_0x382d9b['shift']());}}}(a9_0x1a8d,0x75b1c));import{existsSync,readFileSync}from'node:fs';import{getUserDomain}from'../constant/domain.js';function a9_0x1a8d(){const _0x196712=['session','9oImlYw','843659hXVGrU','60402MmSrSj','80HVraOZ','54976GSfyRF','42jdrxfl','3365388eYsvHf','3934546QmXDPq','6055352Abxzqu','1984360FTPbGx','user','/api/auth/get-session','json','utf-8'];a9_0x1a8d=function(){return _0x196712;};return a9_0x1a8d();}import{cookieFile}from'./constant.js';export async function getIsSessionValid(){const _0x93f397=a9_0x40c7;try{if(!existsSync(cookieFile))return![];const _0x4fe6c8=readFileSync(cookieFile,_0x93f397(0x8c)),_0x1f4ec0=await fetch(getUserDomain()+_0x93f397(0x8a),{'headers':{'cookie':_0x4fe6c8}})['then'](_0x1f9be0=>_0x1f9be0[_0x93f397(0x8b)]());return _0x1f4ec0&&_0x1f4ec0[_0x93f397(0x8d)]&&_0x1f4ec0[_0x93f397(0x89)];}catch{}return![];}
|
package/lib/auth/logout.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1127a6,_0x5c872e){var _0x3e1252=a10_0x31d5,_0x487767=_0x1127a6();while(!![]){try{var _0x1176af=-parseInt(_0x3e1252(0x91))/0x1*(parseInt(_0x3e1252(0x8a))/0x2)+-parseInt(_0x3e1252(0x8f))/0x3+-parseInt(_0x3e1252(0x92))/0x4+-parseInt(_0x3e1252(0x8b))/0x5+parseInt(_0x3e1252(0x8c))/0x6*(-parseInt(_0x3e1252(0x90))/0x7)+parseInt(_0x3e1252(0x88))/0x8*(-parseInt(_0x3e1252(0x86))/0x9)+parseInt(_0x3e1252(0x8d))/0xa;if(_0x1176af===_0x5c872e)break;else _0x487767['push'](_0x487767['shift']());}catch(_0x495714){_0x487767['push'](_0x487767['shift']());}}}(a10_0x4b36,0xe53a4));function a10_0x31d5(_0x53b346,_0x3e8824){_0x53b346=_0x53b346-0x86;var _0x4b36e6=a10_0x4b36();var _0x31d52e=_0x4b36e6[_0x53b346];return _0x31d52e;}import{unlinkSync,existsSync}from'node:fs';function a10_0x4b36(){var _0x3ad983=['59001520gwyjJI','!\x20Not\x20logged\x20in','1465140tEjqTU','7bVCoAL','1035802JhZqmN','1034580ubgLgq','367299beIfPE','✓\x20Logged\x20out','200OFbXlp','log','2sWKTno','2726375kesNXX','9677154phVbkK'];a10_0x4b36=function(){return _0x3ad983;};return a10_0x4b36();}import{cookieFile}from'./constant.js';export function logout(){var _0x358332=a10_0x31d5;existsSync(cookieFile)?(unlinkSync(cookieFile),console[_0x358332(0x89)](_0x358332(0x87))):console['log'](_0x358332(0x8e));}
|
package/lib/cli-flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a11_0x2f474f=a11_0x3d3b;function a11_0x3d3b(_0x5e394a,_0x33f088){_0x5e394a=_0x5e394a-0x14a;const _0xe9a9dc=a11_0xe9a9();let _0x3d3bdb=_0xe9a9dc[_0x5e394a];return _0x3d3bdb;}(function(_0x368a5f,_0x2ed2cf){const _0x3f80cb=a11_0x3d3b,_0xca233a=_0x368a5f();while(!![]){try{const _0x3340ad=-parseInt(_0x3f80cb(0x151))/0x1+parseInt(_0x3f80cb(0x152))/0x2+parseInt(_0x3f80cb(0x14d))/0x3+parseInt(_0x3f80cb(0x14a))/0x4+-parseInt(_0x3f80cb(0x14b))/0x5*(parseInt(_0x3f80cb(0x14f))/0x6)+-parseInt(_0x3f80cb(0x14c))/0x7+-parseInt(_0x3f80cb(0x14e))/0x8;if(_0x3340ad===_0x2ed2cf)break;else _0xca233a['push'](_0xca233a['shift']());}catch(_0x48e6ec){_0xca233a['push'](_0xca233a['shift']());}}}(a11_0xe9a9,0xe195c));function a11_0xe9a9(){const _0x347855=['4373616LaaZnv','282IIStvK','boolean','628473PVXzNn','3400306XzsBYL','7149692LYvEIl','161295StTmGu','5453049spJTOT','2720325KEmyBu'];a11_0xe9a9=function(){return _0x347855;};return a11_0xe9a9();}export const dynamicCliFlags={'enableBffSave':{'type':a11_0x2f474f(0x150)}};
|
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_0x45a96d=a12_0x194a;(function(_0x210d6c,_0x227ac6){const _0xb4755e=a12_0x194a,_0x561409=_0x210d6c();while(!![]){try{const _0x598eb5=-parseInt(_0xb4755e(0x1ae))/0x1+parseInt(_0xb4755e(0x17f))/0x2+-parseInt(_0xb4755e(0x1a7))/0x3+parseInt(_0xb4755e(0x19f))/0x4*(parseInt(_0xb4755e(0x185))/0x5)+-parseInt(_0xb4755e(0x1ac))/0x6+-parseInt(_0xb4755e(0x181))/0x7*(-parseInt(_0xb4755e(0x183))/0x8)+parseInt(_0xb4755e(0x173))/0x9*(parseInt(_0xb4755e(0x189))/0xa);if(_0x598eb5===_0x227ac6)break;else _0x561409['push'](_0x561409['shift']());}catch(_0x5bce11){_0x561409['push'](_0x561409['shift']());}}}(a12_0x22cb,0x682b0));import{jsx as a12_0x5d9f96}from'react/jsx-runtime';import a12_0x518f51 from'meow';import{render}from'ink';import{Help}from'./help.js';import{CliError,CliErrors}from'./errors.js';function a12_0x194a(_0x26eaab,_0x260f09){_0x26eaab=_0x26eaab-0x173;const _0x22cb22=a12_0x22cb();let _0x194aab=_0x22cb22[_0x26eaab];return _0x194aab;}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';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_0x45a96d(0x193)))[a12_0x45a96d(0x184)];}catch{}function a12_0x22cb(){const _0x401354=['riskLevel','parse','global','unknown_service','RABETBASE_APPCODE','cookie','input','240KKZbCj','wildcardModule','version','appcode','exitCode','`\x20has\x20been\x20moved\x20to\x20`','log','LOVRABET_APPCODE','588840vwmWjN','runtimeDomain','nonInteractive','Unexpected\x20error:','hint','4313052fbBFqW','apiDomain','126620PrfmzI','flags','string','stdout','utf-8','isTTY','message','50877gugneY','help','defaultCommand','passCommandAsArg','userDomain','module','./constant/env.js','env','boolean','error','unknownCommand','slice','1592572deZrOM','0.0.0','6601zJtiVP','RABETBASE_CI','1416gMCbjI','dynamicCliFlags','175tIoFsP','raw','./context.js','explicitAppName','890ghjoVc','pageSize','command','node:fs','appCode','package.json','Hint:\x20','true','node:url','`\x20in\x20v2.0.\x0a','./cli-flags.js','format','\x20\x20Please\x20update\x20your\x20command\x20and\x20try\x20again.\x0a','run','service'];a12_0x22cb=function(){return _0x401354;};return a12_0x22cb();}const helpText=generateFullHelp(),pkgVersion=await((async()=>{const _0x350f50=a12_0x45a96d;try{const {readFileSync:_0x55d757}=await import(_0x350f50(0x18c)),{resolve:_0xf72d5,dirname:_0x22101c}=await import('node:path'),{fileURLToPath:_0x61bec6}=await import(_0x350f50(0x191)),_0x9781ce=_0xf72d5(_0x22101c(_0x61bec6(import.meta.url)),'..'),_0x54622b=JSON[_0x350f50(0x199)](_0x55d757(_0xf72d5(_0x9781ce,_0x350f50(0x18e)),_0x350f50(0x1b2)));return _0x54622b[_0x350f50(0x1a1)]||_0x350f50(0x180);}catch{return'0.0.0';}})()),cliVersion=BUILD_NUMBER?pkgVersion+'+'+BUILD_NUMBER:pkgVersion,cli=a12_0x518f51(helpText,{'importMeta':import.meta,'version':cliVersion,'flags':{'help':{'type':'boolean'},'env':{'type':a12_0x45a96d(0x1b0)},'appcode':{'type':'string'},'app':{'type':a12_0x45a96d(0x1b0)},'nonInteractive':{'type':'boolean'},'ci':{'type':'boolean'},'format':{'type':a12_0x45a96d(0x1b0)},'dryRun':{'type':a12_0x45a96d(0x17b)},'yes':{'type':a12_0x45a96d(0x17b)},'name':{'type':'string'},'clear':{'type':'boolean'},'watch':{'type':'boolean'},'output':{'type':a12_0x45a96d(0x1b0)},'params':{'type':'string'},'datasetcode':{'type':a12_0x45a96d(0x1b0)},'mcpCursor':{'type':'boolean'},'mcpClaude':{'type':'boolean'},'mcpOther':{'type':a12_0x45a96d(0x17b)},'cursor':{'type':a12_0x45a96d(0x17b)},'windsurf':{'type':a12_0x45a96d(0x17b)},'claude':{'type':a12_0x45a96d(0x17b)},'cline':{'type':a12_0x45a96d(0x17b)},'codex':{'type':a12_0x45a96d(0x17b)},'opencode':{'type':a12_0x45a96d(0x17b)},'qoder':{'type':'boolean'},'codebuddy':{'type':'boolean'},'trae':{'type':a12_0x45a96d(0x17b)},'agent':{'type':a12_0x45a96d(0x17b)},'antigravity':{'type':'boolean'},'all':{'type':a12_0x45a96d(0x17b)},'enableBffSave':{'type':a12_0x45a96d(0x17b)},'global':{'type':'boolean'},'id':{'type':a12_0x45a96d(0x1b0)},'type':{'type':a12_0x45a96d(0x1b0)},'file':{'type':a12_0x45a96d(0x1b0)},'sqlcode':{'type':a12_0x45a96d(0x1b0)},'sqlname':{'type':a12_0x45a96d(0x1b0)},'dbid':{'type':a12_0x45a96d(0x1b0)},'description':{'type':a12_0x45a96d(0x1b0)},'page':{'type':a12_0x45a96d(0x1b0)},'pagesize':{'type':'string'},'keyword':{'type':a12_0x45a96d(0x1b0)},'code':{'type':'string'},'sql':{'type':a12_0x45a96d(0x1b0)},'schemas':{'type':a12_0x45a96d(0x1b0)},'operation':{'type':'string'},'target':{'type':a12_0x45a96d(0x1b0)},'skipImports':{'type':a12_0x45a96d(0x17b)},'force':{'type':'boolean'},'remote':{'type':'boolean'},'verbose':{'type':a12_0x45a96d(0x17b)},'operationType':{'type':a12_0x45a96d(0x1b0)},'functionNode':{'type':a12_0x45a96d(0x1b0)},...dynamicCliFlags||{}}});registerOtelShutdownOnExit(),await run();async function run(){const _0x301377=a12_0x45a96d;let _0x61e7d2=cli[_0x301377(0x19e)][0x0],_0x2d3186=cli['input'][0x1];const _0x282418=cli[_0x301377(0x1af)];if(!_0x61e7d2){await reportCliHelpTrace(_0x301377(0x19a)),render(a12_0x5d9f96(Help,{}));return;}const _0x577f19=deprecatedAliases[_0x61e7d2];if(_0x577f19&&!isKnownService(_0x61e7d2)){const _0x6bc173=_0x2d3186?CLI_BIN_NAME+'\x20'+_0x61e7d2+'\x20'+_0x2d3186:CLI_BIN_NAME+'\x20'+_0x61e7d2,_0x2e2b97=CLI_BIN_NAME+'\x20'+_0x577f19[_0x301377(0x197)]+'\x20'+_0x577f19[_0x301377(0x18b)];console[_0x301377(0x17c)]('⚠\x20`'+_0x6bc173+_0x301377(0x1a4)+_0x2e2b97+_0x301377(0x192)+_0x301377(0x195)),await exitWithOtelShutdown(0x1);}if(!isKnownService(_0x61e7d2)){await reportCliHelpTrace(_0x301377(0x19b),{'service':_0x61e7d2}),render(a12_0x5d9f96(Help,{}));return;}const _0x21b556=getServiceEntry(_0x61e7d2);if(!_0x2d3186){if(_0x21b556['defaultCommand'])_0x2d3186=_0x21b556[_0x301377(0x175)];else{if(_0x21b556[_0x301377(0x1a0)]){const _0x5c9408=await createContext(_0x282418);try{await _0x21b556[_0x301377(0x1a0)][_0x301377(0x196)](_0x5c9408,[],_0x282418);}catch(_0x38f5c4){await handleErrorAsync(_0x38f5c4);}return;}else{printServiceHelp(_0x61e7d2);return;}}}if(_0x282418[_0x301377(0x174)]&&!findDefinition(_0x61e7d2,_0x2d3186)&&!getLegacyHandler(_0x61e7d2,_0x2d3186)){printServiceHelp(_0x61e7d2);return;}if(_0x282418['env']&&typeof _0x282418[_0x301377(0x17a)]===_0x301377(0x1b0)){const {initEnv:_0x58b1f0}=await import(_0x301377(0x179));_0x58b1f0(_0x282418['env']);}const {buildConfigFromFlags:_0x3005fe}=await import(_0x301377(0x187)),_0x25ec38=_0x3005fe(_0x282418);if(!_0x282418[_0x301377(0x17a)]&&_0x25ec38[_0x301377(0x17a)]){const {initEnv:_0x1ddff1}=await import(_0x301377(0x179));_0x1ddff1(_0x25ec38['env']);}if(_0x25ec38['raw']?.[_0x301377(0x1ad)]||_0x25ec38[_0x301377(0x186)]?.[_0x301377(0x177)]||_0x25ec38[_0x301377(0x186)]?.[_0x301377(0x1a8)]){const {initDomains:_0x5ed7ec}=await import('./constant/domain.js');_0x5ed7ec({'apiDomain':_0x25ec38[_0x301377(0x186)][_0x301377(0x1ad)]||undefined,'userDomain':_0x25ec38['raw'][_0x301377(0x177)]||undefined,'runtimeDomain':_0x25ec38[_0x301377(0x186)][_0x301377(0x1a8)]||undefined});}if(isDeclarativeService(_0x61e7d2)){const _0x517a97=findDefinition(_0x61e7d2,_0x2d3186);if(!_0x517a97){printServiceHelp(_0x61e7d2),await handleErrorAsync(CliErrors['unknownCommand'](_0x61e7d2+'\x20'+_0x2d3186));return;}if(_0x282418[_0x301377(0x174)]){console[_0x301377(0x1a5)](generateCommandHelp(_0x517a97));return;}try{await runCommand(_0x517a97,{'rawFlags':_0x282418,'resolveAppCode':()=>_0x25ec38[_0x301377(0x18d)]||_0x282418[_0x301377(0x1a2)]||process[_0x301377(0x17a)][_0x301377(0x19c)]||process[_0x301377(0x17a)][_0x301377(0x1a6)]||undefined,'resolveCookie':()=>_0x25ec38[_0x301377(0x19d)]||getCookie(),'resolveApiDomain':()=>getApiDomain(),'isNonInteractive':isNonInteractive(_0x282418),'defaultFormat':_0x25ec38[_0x301377(0x194)],'defaultPageSize':_0x25ec38[_0x301377(0x18a)],'defaultVerbose':_0x25ec38['verbose'],'apiDir':_0x25ec38['apiDir'],'riskLevel':_0x25ec38[_0x301377(0x198)],'selectedAppName':_0x25ec38[_0x301377(0x188)]});}catch(_0x4f115a){await handleErrorAsync(_0x4f115a);}return;}const _0x5ea75f=getLegacyHandler(_0x61e7d2,_0x2d3186);if(_0x5ea75f){if(_0x282418[_0x301377(0x174)]){printServiceHelp(_0x61e7d2);return;}const _0x814582=await createContext(_0x282418),_0x333321=_0x5ea75f[_0x301377(0x176)]?[_0x2d3186,...cli[_0x301377(0x19e)][_0x301377(0x17e)](0x2)]:cli[_0x301377(0x19e)]['slice'](0x2);try{await _0x5ea75f[_0x301377(0x178)][_0x301377(0x196)](_0x814582,_0x333321,_0x282418);}catch(_0x5c855a){await handleErrorAsync(_0x5c855a);}return;}if(_0x21b556['wildcardModule']){if(_0x282418['help']){printServiceHelp(_0x61e7d2);return;}const _0x21ebdd=await createContext(_0x282418),_0x1ed31a=[_0x2d3186,...cli['input'][_0x301377(0x17e)](0x2)];try{await _0x21b556[_0x301377(0x1a0)][_0x301377(0x196)](_0x21ebdd,_0x1ed31a,_0x282418);}catch(_0xcc2d66){await handleErrorAsync(_0xcc2d66);}return;}printServiceHelp(_0x61e7d2),await handleErrorAsync(CliErrors[_0x301377(0x17d)](_0x61e7d2+'\x20'+_0x2d3186));}function printServiceHelp(_0x4bfe84){const _0x79ca74=a12_0x45a96d;console[_0x79ca74(0x1a5)](generateServiceHelp(_0x4bfe84));}async function handleErrorAsync(_0x26366a){const _0x70d77=a12_0x45a96d;if(_0x26366a instanceof CliError){console[_0x70d77(0x17c)]('Error:\x20'+_0x26366a[_0x70d77(0x1b4)]);if(_0x26366a[_0x70d77(0x1ab)])console[_0x70d77(0x17c)](_0x70d77(0x18f)+_0x26366a[_0x70d77(0x1ab)]);return await exitWithOtelShutdown(_0x26366a[_0x70d77(0x1a3)]);}return console['error'](_0x70d77(0x1aa),_0x26366a),await exitWithOtelShutdown(0x1);}function isNonInteractive(_0x31dc95){const _0x4102c2=a12_0x45a96d;return!!(_0x31dc95[_0x4102c2(0x1a9)]||_0x31dc95['ci']||process[_0x4102c2(0x17a)][_0x4102c2(0x182)]===_0x4102c2(0x190)||process['env']['LOVRABET_CI']===_0x4102c2(0x190)||process[_0x4102c2(0x17a)]['CI']===_0x4102c2(0x190)||!process[_0x4102c2(0x1b1)][_0x4102c2(0x1b3)]);}
|
package/lib/commands/api/doc.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a13_0x29c094=a13_0x4344;(function(_0x4438f0,_0x272c95){const _0x5abd03=a13_0x4344,_0x4c5a2b=_0x4438f0();while(!![]){try{const _0x296034=parseInt(_0x5abd03(0x21f))/0x1+parseInt(_0x5abd03(0x215))/0x2*(-parseInt(_0x5abd03(0x1e8))/0x3)+-parseInt(_0x5abd03(0x201))/0x4*(-parseInt(_0x5abd03(0x1ea))/0x5)+parseInt(_0x5abd03(0x207))/0x6*(parseInt(_0x5abd03(0x200))/0x7)+-parseInt(_0x5abd03(0x21d))/0x8+parseInt(_0x5abd03(0x1f6))/0x9*(-parseInt(_0x5abd03(0x1f5))/0xa)+parseInt(_0x5abd03(0x20d))/0xb;if(_0x296034===_0x272c95)break;else _0x4c5a2b['push'](_0x4c5a2b['shift']());}catch(_0x20dbf4){_0x4c5a2b['push'](_0x4c5a2b['shift']());}}}(a13_0x44f5,0xbb633));function a13_0x4344(_0x4e0ace,_0x1b8a50){_0x4e0ace=_0x4e0ace-0x1e6;const _0x44f5ab=a13_0x44f5();let _0x434403=_0x44f5ab[_0x4e0ace];return _0x434403;}function a13_0x44f5(){const _0x3706db=['Generate\x20markdown\x20documentation\x20for\x20all\x20datasets','2933HxjjwW','3281932FoZwMk','\x1b[0m','validation','join','\x20failed','log','7062burbNl','!\x20No\x20datasets\x20found.','str','object','...','Doc\x20generation:\x20','5934280KfDpqc','\x1b[90m*\x20Filtered\x20','split','filter','Doc\x20generation\x20complete:\x20','start','output','error','295138qfhFUF','None\x20of\x20the\x20specified\x20dataset\x20codes\x20exist:\x20','\x0d\x20\x20[','\x20file(s)','write','✓\x20Generated\x20','stdout','./docs','7010728kiOLeX','success','521783cVywsC','doc','length','fail','some','trim','Extra\x20params\x20passed\x20to\x20the\x20doc\x20generator\x20(JSON\x20object)','\x1b[33m!\x20The\x20following\x20dataset\x20codes\x20do\x20not\x20exist:\x20','\x20of\x20','Fetching\x20dataset\x20list\x20for\x20','\x1b[90m*\x20Generating\x20docs\x20for:\x20','message','\x20doc(s)\x20failed','12qeQgjg','cookie','5OmyHhj','datasetcode','\x20\x20•\x20','Output\x20directory\x20(default:\x20./docs)','appCode','parse','api','params','string','\x20dataset(s)','isArray','10ufBknl','1266777JDBOMH','datasetName','):\x20','--datasetcode\x20cannot\x20be\x20empty.','\x20succeeded,\x20','Filter:\x20comma-separated\x20dataset\x20codes\x20to\x20generate\x20docs\x20for','\x20doc(s)\x20in\x20','datasetCode','padStart'];a13_0x44f5=function(){return _0x3706db;};return a13_0x44f5();}import a13_0x229a57 from'ora';import{fetchModelList}from'../../api/fetch-model-list.js';import{generateDatasetDocs}from'../../api/api-doc.js';import{CliErrors}from'../../errors.js';export const apiDoc={'service':a13_0x29c094(0x1f0),'command':a13_0x29c094(0x220),'description':a13_0x29c094(0x1ff),'risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{'name':'appcode','type':'string','description':'Override\x20app\x20code','hidden':!![]},{'name':a13_0x29c094(0x213),'type':a13_0x29c094(0x1f2),'description':a13_0x29c094(0x1ed)},{'name':a13_0x29c094(0x1eb),'type':a13_0x29c094(0x1f2),'description':a13_0x29c094(0x1fb)},{'name':a13_0x29c094(0x1f1),'type':a13_0x29c094(0x1f2),'description':a13_0x29c094(0x225)}],async 'execute'(_0x2f8e6a){const _0x761666=a13_0x29c094,_0xc0e520=_0x2f8e6a['str'](_0x761666(0x213))||_0x761666(0x21c),_0x20ebd5=_0x2f8e6a[_0x761666(0x209)](_0x761666(0x1eb)),_0xbe6285=_0x2f8e6a[_0x761666(0x209)](_0x761666(0x1f1));let _0x48f0c4;if(_0xbe6285)try{_0x48f0c4=JSON[_0x761666(0x1ef)](_0xbe6285);if(typeof _0x48f0c4!==_0x761666(0x20a)||_0x48f0c4===null||Array[_0x761666(0x1f4)](_0x48f0c4))throw new Error('must\x20be\x20a\x20JSON\x20object');}catch(_0x3eb607){throw CliErrors[_0x761666(0x203)]('Invalid\x20--params:\x20'+(_0x3eb607 instanceof Error?_0x3eb607[_0x761666(0x1e6)]:String(_0x3eb607)),'Provide\x20a\x20valid\x20JSON\x20object,\x20e.g.\x20--params\x20\x27{\x22key\x22:\x22value\x22}\x27');}let _0x58cb00;if(_0x20ebd5){const _0x3729ab=_0x20ebd5[_0x761666(0x20f)](',')['map'](_0x2953d4=>_0x2953d4[_0x761666(0x224)]())[_0x761666(0x210)](_0x5a0e11=>_0x5a0e11[_0x761666(0x221)]>0x0);if(_0x3729ab[_0x761666(0x221)]===0x0)throw CliErrors[_0x761666(0x203)](_0x761666(0x1f9));_0x58cb00=new Set(_0x3729ab),console[_0x761666(0x206)](_0x761666(0x229)+_0x3729ab[_0x761666(0x204)](',\x20')+_0x761666(0x202));}const _0x31670b=a13_0x229a57(_0x761666(0x228)+_0x2f8e6a[_0x761666(0x1ee)]+_0x761666(0x20b))[_0x761666(0x212)]();let _0x923b71;try{({configArray:_0x923b71}=await fetchModelList(_0x2f8e6a[_0x761666(0x1ee)],_0x2f8e6a[_0x761666(0x1e9)]),_0x31670b['succeed']('Fetched\x20'+_0x923b71[_0x761666(0x221)]+_0x761666(0x1f3)));}catch(_0x3a63b8){_0x31670b[_0x761666(0x222)]('Failed\x20to\x20fetch\x20datasets');throw _0x3a63b8;}if(_0x923b71[_0x761666(0x221)]===0x0)return console[_0x761666(0x206)](_0x761666(0x208)),{'ok':!![]};let _0x3ac59b=_0x923b71;if(_0x58cb00){_0x3ac59b=_0x923b71['filter'](_0x32806f=>_0x58cb00['has'](_0x32806f[_0x761666(0x1fd)]));const _0x2b35ff=[..._0x58cb00][_0x761666(0x210)](_0x5c160b=>!_0x923b71[_0x761666(0x223)](_0x5eb6a7=>_0x5eb6a7['datasetCode']===_0x5c160b));_0x2b35ff[_0x761666(0x221)]>0x0&&console[_0x761666(0x206)](_0x761666(0x226)+_0x2b35ff[_0x761666(0x204)](',\x20')+_0x761666(0x202));if(_0x3ac59b[_0x761666(0x221)]===0x0)throw CliErrors['validation'](_0x761666(0x216)+[..._0x58cb00]['join'](',\x20'));console[_0x761666(0x206)](_0x761666(0x20e)+_0x3ac59b['length']+_0x761666(0x227)+_0x923b71[_0x761666(0x221)]+'\x20dataset(s)\x1b[0m');}let _0x4a3c8f=0x0;const _0x1c92d6=await generateDatasetDocs(_0x3ac59b,_0x2f8e6a['appCode'],_0x2f8e6a['cookie'],_0xc0e520,(_0x5abfeb,_0x50e858,_0x3e320e)=>{const _0x585f83=_0x761666;_0x4a3c8f=_0x5abfeb,process[_0x585f83(0x21b)][_0x585f83(0x219)](_0x585f83(0x217)+String(_0x5abfeb)[_0x585f83(0x1fe)](String(_0x50e858)[_0x585f83(0x221)])+'/'+_0x50e858+']\x20'+_0x3e320e+'.md');},_0x48f0c4);if(_0x4a3c8f>0x0)process[_0x761666(0x21b)]['write']('\x0a');const _0x4d7855=_0x1c92d6['filter'](_0x444ed6=>_0x444ed6[_0x761666(0x21e)])[_0x761666(0x221)],_0x4551aa=_0x1c92d6[_0x761666(0x210)](_0x4bbb97=>!_0x4bbb97[_0x761666(0x21e)])[_0x761666(0x221)];console[_0x761666(0x206)](),console[_0x761666(0x206)](_0x761666(0x21a)+_0x4d7855+_0x761666(0x1fc)+_0xc0e520);if(_0x4551aa>0x0){console[_0x761666(0x214)]('!\x20'+_0x4551aa+_0x761666(0x1e7));for(const _0xe61095 of _0x1c92d6['filter'](_0x78be4b=>!_0x78be4b[_0x761666(0x21e)])){console['error'](_0x761666(0x1ec)+_0xe61095[_0x761666(0x1f7)]+'\x20('+_0xe61095[_0x761666(0x1fd)]+_0x761666(0x1f8)+_0xe61095[_0x761666(0x214)]);}}return{'ok':_0x4551aa===0x0,'message':_0x4551aa>0x0?_0x761666(0x20c)+_0x4d7855+_0x761666(0x1fa)+_0x4551aa+_0x761666(0x205):_0x761666(0x211)+_0x4d7855+_0x761666(0x218)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a14_0x5826(){const _0x342f99=['2048UyKIwI','26096HCumRV','23364720PyBgHW','11RgFPBo','63vmePPf','22ZrwnxT','883236WKzsjI','28619hEEvdo','246YHkCAN','1543340TQChrr','3182176uiHhIk','83645DLZUTh'];a14_0x5826=function(){return _0x342f99;};return a14_0x5826();}(function(_0x66ec21,_0x5b5b1a){const _0x29079b=a14_0x2f2c,_0x55616f=_0x66ec21();while(!![]){try{const _0x563d81=parseInt(_0x29079b(0x1e0))/0x1*(parseInt(_0x29079b(0x1de))/0x2)+parseInt(_0x29079b(0x1df))/0x3+-parseInt(_0x29079b(0x1e3))/0x4+parseInt(_0x29079b(0x1e4))/0x5*(parseInt(_0x29079b(0x1e1))/0x6)+parseInt(_0x29079b(0x1e6))/0x7*(parseInt(_0x29079b(0x1e5))/0x8)+-parseInt(_0x29079b(0x1dd))/0x9*(-parseInt(_0x29079b(0x1e2))/0xa)+parseInt(_0x29079b(0x1dc))/0xb*(-parseInt(_0x29079b(0x1e7))/0xc);if(_0x563d81===_0x5b5b1a)break;else _0x55616f['push'](_0x55616f['shift']());}catch(_0x141510){_0x55616f['push'](_0x55616f['shift']());}}}(a14_0x5826,0x8f5cc));import{apiList}from'./list.js';import{apiPull}from'./pull.js';function a14_0x2f2c(_0x59d735,_0x57ec00){_0x59d735=_0x59d735-0x1dc;const _0x58264e=a14_0x5826();let _0x2f2c62=_0x58264e[_0x59d735];return _0x2f2c62;}import{apiDoc}from'./doc.js';export const apiDefinitions=[apiList,apiPull,apiDoc];
|
package/lib/commands/api/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a15_0x5398b4=a15_0x4f78;(function(_0x385749,_0x30028e){const _0x45fa90=a15_0x4f78,_0x27dd62=_0x385749();while(!![]){try{const _0x423332=-parseInt(_0x45fa90(0x1e1))/0x1*(parseInt(_0x45fa90(0x1e3))/0x2)+-parseInt(_0x45fa90(0x1ec))/0x3*(-parseInt(_0x45fa90(0x20b))/0x4)+-parseInt(_0x45fa90(0x20c))/0x5+parseInt(_0x45fa90(0x1e7))/0x6*(-parseInt(_0x45fa90(0x1f0))/0x7)+-parseInt(_0x45fa90(0x1f9))/0x8*(parseInt(_0x45fa90(0x205))/0x9)+parseInt(_0x45fa90(0x1e5))/0xa+-parseInt(_0x45fa90(0x1fc))/0xb*(-parseInt(_0x45fa90(0x1f7))/0xc);if(_0x423332===_0x30028e)break;else _0x27dd62['push'](_0x27dd62['shift']());}catch(_0x3fadf6){_0x27dd62['push'](_0x27dd62['shift']());}}}(a15_0x2fc0,0xf0069));function a15_0x2fc0(){const _0x321ef6=['11aYqFmX','filter','selectedAppName','repeat','\x20(default)','join','Key','length','appcode','9AzsbWB','json','isDefault','table','env','\x20\x20|\x20\x20No\x20models\x20found\x0a','198136RxBHXt','7220715rtRiMm','slice','Output\x20format:\x20table\x20(default)\x20|\x20json','str','\x20\x20|\x20\x20','appCode','list','\x20\x20[','DatasetCode','1SkeATR','key','2643510rlNzXQ','production','5818060LMVKss','\x20\x20App:\x20','102LniiYP','List\x20all\x20datasets/models\x20for\x20the\x20configured\x20app(s)','string','max','\x0a\x20\x20App:\x20','15SzLoYE','App\x20\x22','padStart','Override\x20app\x20code','252567gFwCDf','map','Name','datasetCode','log','cookie','padEnd','65178996xbYoeL','min','15189112OzHipm','name','read'];a15_0x2fc0=function(){return _0x321ef6;};return a15_0x2fc0();}import{initEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a15_0x4f78(_0x1a8512,_0x1b41e1){_0x1a8512=_0x1a8512-0x1e0;const _0x2fc03c=a15_0x2fc0();let _0x4f782d=_0x2fc03c[_0x1a8512];return _0x4f782d;}import{getMultiAppConfigs}from'../../utils/config.js';async function printModelsForApp(_0x3a372c,_0xde1d74,_0x30ece4,_0x3ef11d=a15_0x5398b4(0x208)){const _0x3468e2=a15_0x5398b4,{configArray:_0x4cb791,count:_0x287157}=await fetchModelList(_0x3a372c,_0xde1d74);if(_0x287157===0x0){_0x3ef11d===_0x3468e2(0x206)?console[_0x3468e2(0x1f4)](JSON['stringify']({'appCode':_0x3a372c,'models':[]})):console['log'](_0x3468e2(0x1e6)+_0x3a372c+_0x3468e2(0x20a));return;}if(_0x3ef11d==='json'){console['log'](JSON['stringify']({'appCode':_0x3a372c,'appName':_0x30ece4,'total':_0x287157,'models':_0x4cb791}));return;}const _0x51b2b6=Math[_0x3468e2(0x1f8)](0x28,Math[_0x3468e2(0x1ea)](0x4,..._0x4cb791[_0x3468e2(0x1f1)](_0x251ca7=>_0x251ca7[_0x3468e2(0x1fa)][_0x3468e2(0x203)]))),_0x596924=Math['min'](0x24,Math[_0x3468e2(0x1ea)](0x3,..._0x4cb791['map'](_0x2515e0=>_0x2515e0[_0x3468e2(0x1e2)][_0x3468e2(0x203)]))),_0x147cea=Math[_0x3468e2(0x1f8)](0x28,Math[_0x3468e2(0x1ea)](0x4,..._0x4cb791[_0x3468e2(0x1f1)](_0x709140=>_0x709140[_0x3468e2(0x1f3)][_0x3468e2(0x203)]))),_0x4a4fba=(_0x3ebc9e,_0x5a36c8)=>_0x3ebc9e[_0x3468e2(0x20d)](0x0,_0x5a36c8)[_0x3468e2(0x1f6)](_0x5a36c8),_0x30df5b=(_0x46ac65,_0x448cee,_0x4a19c7,_0x38a24c)=>'\x20\x20'+String(_0x46ac65)[_0x3468e2(0x1ee)](0x6)+'\x20\x20'+_0x4a4fba(_0x448cee,_0x51b2b6)+'\x20\x20'+_0x4a4fba(_0x4a19c7,_0x596924)+'\x20\x20'+_0x4a4fba(_0x38a24c,_0x147cea);console[_0x3468e2(0x1f4)](_0x3468e2(0x1eb)+_0x3a372c+(_0x30ece4?'\x20('+_0x30ece4+')':'')+_0x3468e2(0x210)+_0x287157+'\x20model(s)\x0a'),console['log'](_0x30df5b('ID',_0x3468e2(0x1f2),_0x3468e2(0x202),_0x3468e2(0x1e0))),console[_0x3468e2(0x1f4)]('\x20\x20'+'─'[_0x3468e2(0x1ff)](0x6)+'\x20\x20'+'─'['repeat'](_0x51b2b6)+'\x20\x20'+'─'[_0x3468e2(0x1ff)](_0x596924)+'\x20\x20'+'─'[_0x3468e2(0x1ff)](_0x147cea));for(const _0x52cf79 of _0x4cb791){console[_0x3468e2(0x1f4)](_0x30df5b(_0x52cf79['id'],_0x52cf79[_0x3468e2(0x1fa)],_0x52cf79[_0x3468e2(0x1e2)],_0x52cf79[_0x3468e2(0x1f3)]));}console[_0x3468e2(0x1f4)]();}export const apiList={'service':'api','command':a15_0x5398b4(0x212),'description':a15_0x5398b4(0x1e8),'risk':a15_0x5398b4(0x1fb),'requiresAppCode':!![],'hasFormat':![],'flags':[{'name':a15_0x5398b4(0x204),'type':a15_0x5398b4(0x1e9),'description':a15_0x5398b4(0x1ef),'hidden':!![]},{'name':'format','type':'string','description':a15_0x5398b4(0x20e),'default':a15_0x5398b4(0x208)}],async 'execute'(_0x4e68f3){const _0x50e11d=a15_0x5398b4,_0x3ca062=_0x4e68f3[_0x50e11d(0x20f)](_0x50e11d(0x204)),_0x403cfa=_0x4e68f3['str']('format')||_0x50e11d(0x208);if(!_0x3ca062){let _0x1fa6a0=getMultiAppConfigs();if(_0x1fa6a0&&_0x1fa6a0['length']>0x0){if(_0x4e68f3[_0x50e11d(0x1fe)]){const _0x5bf1ab=_0x1fa6a0[_0x50e11d(0x1fd)](_0xe4e763=>_0xe4e763[_0x50e11d(0x1fa)]===_0x4e68f3[_0x50e11d(0x1fe)]);if(_0x5bf1ab[_0x50e11d(0x203)]===0x0){const _0x4a146a=_0x1fa6a0[_0x50e11d(0x1f1)](_0x9ec6d6=>_0x9ec6d6[_0x50e11d(0x1fa)])[_0x50e11d(0x201)](',\x20');return{'ok':![],'message':_0x50e11d(0x1ed)+_0x4e68f3['selectedAppName']+'\x22\x20not\x20found\x20in\x20config.\x20Available:\x20'+_0x4a146a};}_0x1fa6a0=_0x5bf1ab;}for(const _0xc73b1b of _0x1fa6a0){const _0x5d311b=_0xc73b1b[_0x50e11d(0x1f5)]||_0x4e68f3[_0x50e11d(0x1f5)],_0x4fbf99=_0xc73b1b[_0x50e11d(0x209)]||_0x50e11d(0x1e4);initEnv(_0x4fbf99),_0x403cfa!==_0x50e11d(0x206)&&(console[_0x50e11d(0x1f4)]('\x0a'+'='[_0x50e11d(0x1ff)](0x32)),console[_0x50e11d(0x1f4)](_0x50e11d(0x1e6)+_0xc73b1b[_0x50e11d(0x1fa)]+(_0xc73b1b[_0x50e11d(0x207)]?_0x50e11d(0x200):'')+_0x50e11d(0x213)+_0x4fbf99+']'),console[_0x50e11d(0x1f4)](''+'='[_0x50e11d(0x1ff)](0x32))),await printModelsForApp(_0xc73b1b[_0x50e11d(0x204)],_0x5d311b,_0xc73b1b[_0x50e11d(0x1fa)],_0x403cfa);}return{'ok':!![]};}}return await printModelsForApp(_0x4e68f3[_0x50e11d(0x211)],_0x4e68f3[_0x50e11d(0x1f5)],undefined,_0x403cfa),{'ok':!![]};}};
|
package/lib/commands/api/pull.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a16_0x5215df=a16_0x2ac8;(function(_0x2accf3,_0x3d1ad2){const _0x2c3f06=a16_0x2ac8,_0x47c2e4=_0x2accf3();while(!![]){try{const _0x3ff01d=parseInt(_0x2c3f06(0x159))/0x1+parseInt(_0x2c3f06(0x155))/0x2*(-parseInt(_0x2c3f06(0x146))/0x3)+parseInt(_0x2c3f06(0x135))/0x4*(-parseInt(_0x2c3f06(0x142))/0x5)+-parseInt(_0x2c3f06(0x152))/0x6+parseInt(_0x2c3f06(0x140))/0x7+parseInt(_0x2c3f06(0x15e))/0x8*(parseInt(_0x2c3f06(0x15f))/0x9)+-parseInt(_0x2c3f06(0x15d))/0xa*(-parseInt(_0x2c3f06(0x12d))/0xb);if(_0x3ff01d===_0x3d1ad2)break;else _0x47c2e4['push'](_0x47c2e4['shift']());}catch(_0x5578af){_0x47c2e4['push'](_0x47c2e4['shift']());}}}(a16_0x14a1,0xdec78));import a16_0x5314fd from'ora';import{initEnv,getEnv}from'../../constant/env.js';import{fetchModelList}from'../../api/fetch-model-list.js';function a16_0x14a1(){const _0x3bb6c7=['api','includes','\x20app(s)\x20failed','fail','cookie','string','log','str','Pull\x20datasets\x20and\x20generate\x20API\x20config\x20files\x20(./src/api/)','slice','production','6765444ZwIpkK','Override\x20app\x20code','name','10HajLNb','appCode','clientFilePath','\x20\x20•\x20','1685672fuvFvY','apiFilePath','error','map','145190kUXpeU','8632gmWlXl','14607LpIoVw','./src/api/','split','Done:\x20','App\x20\x22','pull','Pulling\x20','759wEXuop','endsWith','Pulling\x20API\x20config\x20for\x20','\x20model(s)','Output\x20directory\x20(default:\x20./src/api/)','appcode','modelCount','length','4WeAcaG','apiDir','isDefault','\x22\x20not\x20found\x20in\x20config.\x20Available:\x20','filter','join','client','output','message','env','\x20succeeded,\x20','92582XQBoVu','-client','3249265aTtEGS','start','succeed','selectedAppName','1057197MwAfAh'];a16_0x14a1=function(){return _0x3bb6c7;};return a16_0x14a1();}import{generateApiFile}from'../../api/generate-api-file.js';function a16_0x2ac8(_0x45d136,_0x2dee2c){_0x45d136=_0x45d136-0x12b;const _0x14a151=a16_0x14a1();let _0x2ac8b9=_0x14a151[_0x45d136];return _0x2ac8b9;}import{getMultiAppConfigs}from'../../utils/config.js';export const apiPull={'service':a16_0x5215df(0x147),'command':a16_0x5215df(0x12b),'description':a16_0x5215df(0x14f),'risk':'write','requiresAppCode':!![],'hasFormat':![],'flags':[{'name':'appcode','type':a16_0x5215df(0x14c),'description':a16_0x5215df(0x153),'hidden':!![]},{'name':a16_0x5215df(0x13c),'type':a16_0x5215df(0x14c),'description':a16_0x5215df(0x131)}],async 'execute'(_0x45e9f0){const _0x40f57c=a16_0x5215df,_0x4cb3cf=_0x45e9f0['str'](_0x40f57c(0x132)),_0x12e1f1=_0x45e9f0[_0x40f57c(0x14e)](_0x40f57c(0x13c))||undefined;if(!_0x4cb3cf){let _0x4730d8=getMultiAppConfigs();if(_0x4730d8&&_0x4730d8[_0x40f57c(0x134)]>0x0){if(_0x45e9f0[_0x40f57c(0x145)]){const _0x1f6e85=_0x4730d8[_0x40f57c(0x139)](_0x4a4f68=>_0x4a4f68['name']===_0x45e9f0[_0x40f57c(0x145)]);if(_0x1f6e85[_0x40f57c(0x134)]===0x0){const _0x157b66=_0x4730d8[_0x40f57c(0x15c)](_0x507ca0=>_0x507ca0[_0x40f57c(0x154)])[_0x40f57c(0x13a)](',\x20');return{'ok':![],'message':_0x40f57c(0x163)+_0x45e9f0[_0x40f57c(0x145)]+_0x40f57c(0x138)+_0x157b66};}_0x4730d8=_0x1f6e85;}let _0x2aa23a=0x0,_0x1fe59=0x0;for(const _0x4648a2 of _0x4730d8){const _0x382edd=_0x4648a2[_0x40f57c(0x14b)]||_0x45e9f0['cookie'],_0x1bc7c6=_0x4648a2[_0x40f57c(0x13e)]||_0x40f57c(0x151);initEnv(_0x1bc7c6);const _0x308162=_0x4648a2[_0x40f57c(0x136)]||_0x12e1f1||_0x40f57c(0x160),_0x504288=_0x4648a2[_0x40f57c(0x137)]?'':_0x4648a2['name']||_0x4648a2[_0x40f57c(0x132)],_0x4b21e0=a16_0x5314fd(_0x40f57c(0x12c)+_0x4648a2['name']+'\x20('+_0x4648a2[_0x40f57c(0x132)]+')...')[_0x40f57c(0x143)]();try{const {configArray:_0x2896cf}=await fetchModelList(_0x4648a2[_0x40f57c(0x132)],_0x382edd),_0x37fd55=await generateApiFile(_0x2896cf,_0x504288,_0x4648a2['appcode'],_0x4648a2[_0x40f57c(0x137)],_0x1bc7c6,_0x308162,_0x4648a2['name']);_0x4b21e0[_0x40f57c(0x144)](_0x4648a2[_0x40f57c(0x154)]+':\x20'+_0x2896cf[_0x40f57c(0x134)]+'\x20dataset(s)\x20→\x20'+_0x37fd55[_0x40f57c(0x133)]+'\x20model(s)'),console[_0x40f57c(0x14d)](_0x40f57c(0x158)+_0x37fd55[_0x40f57c(0x15a)]),console[_0x40f57c(0x14d)]('\x20\x20•\x20'+_0x37fd55[_0x40f57c(0x157)]),_0x2aa23a++;}catch(_0x45e214){_0x4b21e0[_0x40f57c(0x14a)](_0x4648a2['name']+':\x20'+(_0x45e214 instanceof Error?_0x45e214[_0x40f57c(0x13d)]:String(_0x45e214))),_0x1fe59++;}}return console[_0x40f57c(0x14d)](),_0x1fe59>0x0&&console[_0x40f57c(0x15b)]('!\x20'+_0x1fe59+_0x40f57c(0x149)),{'ok':_0x1fe59===0x0,'message':_0x40f57c(0x162)+_0x2aa23a+_0x40f57c(0x13f)+_0x1fe59+'\x20failed'};}}const _0x4dce5d=_0x4cb3cf&&_0x4cb3cf[_0x40f57c(0x148)]('-')?_0x4cb3cf[_0x40f57c(0x161)]('-')[_0x40f57c(0x150)](0x1)[_0x40f57c(0x13a)]('-'):'',_0x2ce300=_0x12e1f1||_0x45e9f0[_0x40f57c(0x136)]||_0x40f57c(0x160),_0x2d2ed5=!_0x4cb3cf,_0x4cf595=a16_0x5314fd(_0x40f57c(0x12f)+_0x45e9f0[_0x40f57c(0x156)]+'...')[_0x40f57c(0x143)]();try{const {configArray:_0x23dcde}=await fetchModelList(_0x45e9f0[_0x40f57c(0x156)],_0x45e9f0[_0x40f57c(0x14b)]),_0x175b65=await generateApiFile(_0x23dcde,_0x4dce5d,_0x45e9f0[_0x40f57c(0x156)],_0x2d2ed5,getEnv(),_0x2ce300);_0x4cf595['succeed']('Pulled\x20'+_0x23dcde['length']+'\x20dataset(s),\x20generated\x20'+_0x175b65[_0x40f57c(0x133)]+_0x40f57c(0x130));const _0x59b440=_0x4dce5d?_0x4dce5d+'-api':'api',_0x148b8e=_0x4dce5d?_0x4dce5d+_0x40f57c(0x141):_0x40f57c(0x13b),_0x145ab1=_0x2ce300[_0x40f57c(0x12e)]('/')?_0x2ce300:_0x2ce300+'/';return console[_0x40f57c(0x14d)]('\x20\x20•\x20'+_0x145ab1+_0x59b440+'.ts'),console[_0x40f57c(0x14d)](_0x40f57c(0x158)+_0x145ab1+_0x148b8e+'.ts'),{'ok':!![],'data':{'datasetCount':_0x23dcde[_0x40f57c(0x134)],'modelCount':_0x175b65[_0x40f57c(0x133)]}};}catch(_0x117d52){_0x4cf595[_0x40f57c(0x14a)]('Failed:\x20'+(_0x117d52 instanceof Error?_0x117d52['message']:String(_0x117d52)));throw _0x117d52;}}};
|