@lovrabet/rabetbase-cli 2.0.2-beta.7 → 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.
- 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 -1
- 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 -1
- package/lib/telemetry/otel-logger-version.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- 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 +1 -1
package/lib/mcp/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a111_0x4d40(){const _0x3d21da=['log','287192Xwnuli','9667fuciYv','success','10ixerEJ','20122490MOqjtI','cursor','name','needsManualAction','from','map','\x0aLovrabet\x20MCP\x20-\x20MCP\x20Server\x20Configuration\x20Tool\x0a\x0a\x20\x20rabetbase\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20help\x0a\x20\x20rabetbase\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Interactive\x20MCP\x20configuration\x0a\x20\x20rabetbase\x20mcp\x20install\x20--cursor\x20\x20\x20\x20Configure\x20Cursor\x20MCP\x20directly\x0a\x20\x20rabetbase\x20mcp\x20install\x20--claude\x20\x20\x20\x20Configure\x20Claude\x20Code\x20MCP\x20directly\x0a\x0aConfiguration\x20methods:\x0a\x20\x20\x20Interactive\x20selection\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Show\x20IDE\x20list\x20for\x20selection\x0a\x20\x20\x20\x20→\x20Enter\x20number\x20to\x20select\x20IDE\x0a\x20\x20Direct\x20IDE\x20config\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20-\x20Use\x20--ide\x20flags\x0a\x20\x20\x20\x20$\x20rabetbase\x20mcp\x20install\x20--cursor\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Configure\x20Cursor\x0a\x20\x20\x20\x20$\x20rabetbase\x20mcp\x20install\x20--claude\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Configure\x20Claude\x20Code\x0a\x0aSupported\x20IDEs:\x0a','claude','error','\x0aAvailable\x20commands:','split','21BOTaXq','ide','has','install','\x20\x20rabetbase\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','join','description','message','Error:\x20Unsupported\x20command:\x20','31412mCxwab','toLowerCase','22bEmSMy','10245330LbGAWk','exit','2512JcBRYe','help','3940830RuNdff','\x20\x20rabetbase\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20MCP\x20configuration','2274558mrJRgL','\x20-\x20','mcpClaude'];a111_0x4d40=function(){return _0x3d21da;};return a111_0x4d40();}(function(_0x4aaaff,_0x4f269b){const _0x28afeb=a111_0x1f74,_0x1f5b74=_0x4aaaff();while(!![]){try{const _0x4aad3d=-parseInt(_0x28afeb(0x147))/0x1*(parseInt(_0x28afeb(0x137))/0x2)+parseInt(_0x28afeb(0x12e))/0x3*(-parseInt(_0x28afeb(0x144))/0x4)+-parseInt(_0x28afeb(0x13e))/0x5+-parseInt(_0x28afeb(0x140))/0x6+-parseInt(_0x28afeb(0x145))/0x7*(parseInt(_0x28afeb(0x13c))/0x8)+-parseInt(_0x28afeb(0x13a))/0x9+parseInt(_0x28afeb(0x148))/0xa*(parseInt(_0x28afeb(0x139))/0xb);if(_0x4aad3d===_0x4f269b)break;else _0x1f5b74['push'](_0x1f5b74['shift']());}catch(_0x5605a4){_0x1f5b74['push'](_0x1f5b74['shift']());}}}(a111_0x4d40,0x98bb5));import{installMcp}from'./mcp-installer.js';import{logger}from'../utils/logger.js';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';export async function mcpCommand(_0x3794fb,_0x53db5c,_0x1960ae){const _0x168b9f=a111_0x1f74;logger['setLogPath'](process['cwd']());if(_0x1960ae?.[_0x168b9f(0x13d)]||_0x3794fb==='--help'){showHelp();return;}_0x3794fb!==_0x168b9f(0x131)&&(console[_0x168b9f(0x12b)](_0x168b9f(0x136)+(_0x3794fb||'-')),console[_0x168b9f(0x143)](_0x168b9f(0x12c)),console[_0x168b9f(0x143)](_0x168b9f(0x13f)),console[_0x168b9f(0x143)](_0x168b9f(0x132)),logger[_0x168b9f(0x12b)]('mcp','Error:\x20Unsupported\x20command:\x20'+(_0x3794fb||'-')),process[_0x168b9f(0x13b)](0x1));let _0x41cb87;if(_0x1960ae?.['mcpCursor'])_0x41cb87=_0x168b9f(0x149);else{if(_0x1960ae?.[_0x168b9f(0x142)])_0x41cb87=_0x168b9f(0x12a);else{if(_0x53db5c?.[0x0]){const _0xf74ac6=_0x53db5c[0x0][_0x168b9f(0x138)]();MCP_IDES[_0x168b9f(0x130)](_0xf74ac6)&&(_0x41cb87=_0xf74ac6);}}}const _0x1fd571=_0x41cb87?[_0x41cb87]:[],_0x1b442e=await installMcp(_0x1fd571,_0x1960ae?.['enableBffSave']);for(const _0x28de75 of _0x1b442e){const _0x2e4044=IDE_CONFIGS[_0x28de75[_0x168b9f(0x12f)]]?.[_0x168b9f(0x14a)]||_0x28de75[_0x168b9f(0x12f)],_0xa82073=_0x28de75[_0x168b9f(0x126)]?'⚠️':_0x28de75[_0x168b9f(0x146)]?'✓':'✗',_0x512a9c=_0x28de75[_0x168b9f(0x146)]?console['log']:console['error'];_0x512a9c(_0xa82073+'\x20'+_0x2e4044+':');const _0x17c1c5=_0x28de75[_0x168b9f(0x135)][_0x168b9f(0x12d)]('\x0a');for(const _0x46519d of _0x17c1c5){_0x512a9c('\x20\x20'+_0x46519d);}console['log']('');}}function a111_0x1f74(_0x220beb,_0x2260bc){_0x220beb=_0x220beb-0x126;const _0x4d400a=a111_0x4d40();let _0x1f74ab=_0x4d400a[_0x220beb];return _0x1f74ab;}function showHelp(){const _0x5ce127=a111_0x1f74;console[_0x5ce127(0x143)](_0x5ce127(0x129)+Array[_0x5ce127(0x127)](MCP_IDES)[_0x5ce127(0x128)]((_0x4ea532,_0x2ff9fa)=>'\x20\x20'+(_0x2ff9fa+0x1)+'.\x20'+IDE_CONFIGS[_0x4ea532]['name']+_0x5ce127(0x141)+IDE_CONFIGS[_0x4ea532][_0x5ce127(0x134)])[_0x5ce127(0x133)]('\x0a')+'\x0a\x0aExamples:\x0a\x20\x20$\x20rabetbase\x20mcp\x20install\x0a\x20\x20\x20\x20→\x20Interactive\x20IDE\x20selection\x0a\x0a\x20\x20$\x20rabetbase\x20mcp\x20install\x20--cursor\x0a\x20\x20\x20\x20→\x20Configure\x20Cursor\x20MCP\x20(writes\x20.cursor/mcp.json)\x0a\x0aConfiguration\x20guide:\x0a\x20\x20https://open.lovrabet.com/en/docs/mcp/config-guide\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a112_0x49d418=a112_0x56ff;function a112_0x2ceb(){const _0xe67556=['28qJUQor','ide','1073454rAJbkk','Other\x20IDE','987556Hsppml','10pTBQuj','success','mcp-install-non-interactive','length','split','\x20succeeded)','151427dPjLDV','10001646rbGgjX','setLogPath','some','Cursor','cwd','log','needsManualAction','Start\x20configuring\x20MCP','92475wNcwcM','cursor','message','747328YOCYBp','64396fSBtZH','info'];a112_0x2ceb=function(){return _0xe67556;};return a112_0x2ceb();}(function(_0x4a2dd9,_0x4dea51){const _0x1a488d=a112_0x56ff,_0x38a63e=_0x4a2dd9();while(!![]){try{const _0x4e3fb6=parseInt(_0x1a488d(0x1ba))/0x1+parseInt(_0x1a488d(0x1b3))/0x2+-parseInt(_0x1a488d(0x1a9))/0x3+parseInt(_0x1a488d(0x1ad))/0x4+parseInt(_0x1a488d(0x1b4))/0x5*(parseInt(_0x1a488d(0x1b1))/0x6)+-parseInt(_0x1a488d(0x1af))/0x7*(-parseInt(_0x1a488d(0x1ac))/0x8)+-parseInt(_0x1a488d(0x1bb))/0x9;if(_0x4e3fb6===_0x4dea51)break;else _0x38a63e['push'](_0x38a63e['shift']());}catch(_0x535842){_0x38a63e['push'](_0x38a63e['shift']());}}}(a112_0x2ceb,0x3d32b));function a112_0x56ff(_0x1ed248,_0x3148ab){_0x1ed248=_0x1ed248-0x1a2;const _0x2ceb9d=a112_0x2ceb();let _0x56ff34=_0x2ceb9d[_0x1ed248];return _0x56ff34;}import{installMcp}from'./mcp-installer.js';import{logger}from'../utils/logger.js';export async function installMcpNonInteractive(_0x2e71fc,_0x2ad4ef,_0x27ee5e=process[a112_0x49d418(0x1a5)]()){const _0x3d0b00=a112_0x49d418;logger[_0x3d0b00(0x1a2)](_0x27ee5e),logger[_0x3d0b00(0x1ae)](_0x3d0b00(0x1b6),_0x3d0b00(0x1a8),{'ides':_0x2e71fc,'enableBffSave':_0x2ad4ef});const _0x21c46b=await installMcp(_0x2e71fc,_0x2ad4ef,_0x27ee5e);for(const _0x38c009 of _0x21c46b){const _0x12f3a5=_0x38c009[_0x3d0b00(0x1b0)]===_0x3d0b00(0x1aa)?_0x3d0b00(0x1a4):_0x38c009['ide']==='claude'?'Claude\x20Code':_0x3d0b00(0x1b2),_0x4b90e7=_0x38c009['needsManualAction']?'⚠️':_0x38c009[_0x3d0b00(0x1b5)]?'✓':'✗',_0x36f5f5=_0x38c009[_0x3d0b00(0x1b5)]?console[_0x3d0b00(0x1a6)]:console['error'];_0x36f5f5(_0x4b90e7+'\x20'+_0x12f3a5+':');const _0x1f4373=_0x38c009[_0x3d0b00(0x1ab)][_0x3d0b00(0x1b8)]('\x0a');for(const _0x548927 of _0x1f4373){_0x36f5f5('\x20\x20'+_0x548927);}console[_0x3d0b00(0x1a6)]('');}const _0x204d32=_0x21c46b['filter'](_0x1cba14=>_0x1cba14['success'])[_0x3d0b00(0x1b7)];console['log']('\x0a✓\x20MCP\x20configuration\x20completed\x20('+_0x204d32+'/'+_0x21c46b[_0x3d0b00(0x1b7)]+_0x3d0b00(0x1b9)),_0x21c46b[_0x3d0b00(0x1a3)](_0x1e722b=>_0x1e722b[_0x3d0b00(0x1a7)])?(console[_0x3d0b00(0x1a6)](''),console[_0x3d0b00(0x1a6)]('⚠️\x20\x20Note:\x20Some\x20configurations\x20require\x20manual\x20commands,\x20please\x20follow\x20the\x20instructions\x20above')):console['log']('');}
|
package/lib/mcp/mcp-installer.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x413e8c,_0x366bda){const _0x5db109=a113_0x3f0b,_0x261cd9=_0x413e8c();while(!![]){try{const _0x5643e0=-parseInt(_0x5db109(0x9e))/0x1+-parseInt(_0x5db109(0x84))/0x2*(parseInt(_0x5db109(0x8d))/0x3)+-parseInt(_0x5db109(0x7e))/0x4+-parseInt(_0x5db109(0x78))/0x5+parseInt(_0x5db109(0xa2))/0x6+-parseInt(_0x5db109(0x87))/0x7*(-parseInt(_0x5db109(0x9a))/0x8)+parseInt(_0x5db109(0x92))/0x9;if(_0x5643e0===_0x366bda)break;else _0x261cd9['push'](_0x261cd9['shift']());}catch(_0x2d116a){_0x261cd9['push'](_0x261cd9['shift']());}}}(a113_0x43d5,0x541d7));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{normalizeEnv}from'../constant/env.js';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';function a113_0x43d5(){const _0x142325=['agents.md','1531014znnWDS','message','agents.md\x20already\x20exists,\x20skipping','\x20-e\x20RABETBASE_APP_CODE=','Create\x20Cursor\x20Rules\x20file','No\x20appcode\x20found.\x20Run\x20\x27rabetbase\x20init\x27\x20to\x20initialize\x20project\x20config','RABETBASE_ENV','\x0aError:\x20Configuration\x20failed\x20-\x20','\x20\x20\x20\x20\x20\x20}','Configuration:\x20appcode=','error','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','claude\x20mcp\x20add\x20','push','\x0a✓\x20Cursor\x20MCP\x20configured\x20successfully!\x0a','utf-8','mcp-install','\x20\x20}','Restart\x20Claude\x20Code\x20to\x20take\x20effect','.cursor','Unknown\x20IDE:\x20','Configuration\x20command\x20generated','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{','Create\x20agents.md\x20file','success','other','1299320aEbdsH','Update\x20existing\x20mcp.json\x20config','Failed\x20to\x20copy\x20agents.md\x20file','mcp-claude','info','Configuration:','152788KwxIRv','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','Environment:\x20','mcp-cursor','env',',\x20env=','5180kdTtFp','Other\x20IDE\x20configuration\x20guide\x20displayed','\x20-e\x20RABETBASE_ENV=','3557659NASNqr','mcpServers','production','mcp.json','map','join','186NtteDF','stringify','\x20\x20\x20\x20\x20\x20\x20\x20','lovrabet_rules.mdc','rules','1388052bsZMQb','Run\x20the\x20following\x20command\x20to\x20configure\x20Claude\x20Code\x20MCP:','needsManualAction','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20','\x22RABETBASE_ENV\x22:\x20\x22','Please\x20restart\x20Cursor\x20to\x20load\x20the\x20new\x20MCP\x20config.','AppCode:\x20','Written\x20.cursor/mcp.json','8TSdVaD','\x22RABETBASE_APP_CODE\x22:\x20\x22','\x20\x20\x22mcpServers\x22:\x20{','@lovrabet/dataset-mcp-server@latest','114458YVpOFl','utf8','--enable-bff-save'];a113_0x43d5=function(){return _0x142325;};return a113_0x43d5();}import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getRulesContent}from'../utils/rules-cdn.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME='lovrabet-dataset';export const MCP_COMMAND='npx';export const MCP_ARGS=['@lovrabet/dataset-mcp-server@latest'];export function getAppConfig(){const _0x272f57=a113_0x3f0b,_0x46fe28=readConfig(),_0x10c2bf=_0x46fe28['appcode']||_0x46fe28['app'],_0x4f94b0=normalizeEnv(_0x46fe28[_0x272f57(0x82)]||_0x272f57(0x89));if(!_0x10c2bf)throw new Error(_0x272f57(0xa7));return{'appcode':String(_0x10c2bf),'env':_0x4f94b0};}export function buildMcpEnv(_0x292de6,_0xc7ddbf){const _0x56a2fc=a113_0x3f0b,_0x2a97e1={'RABETBASE_APP_CODE':_0x292de6};return _0xc7ddbf!=='production'&&(_0x2a97e1[_0x56a2fc(0xa8)]=_0xc7ddbf),_0x2a97e1;}export function buildMcpArgs(_0x3a70cd){const _0xec3a6c=a113_0x3f0b,_0x44279d=[_0xec3a6c(0x9d)];return _0x3a70cd&&_0x44279d['push'](_0xec3a6c(0xa0)),_0x44279d;}export function buildMcpServerConfig(_0xee9bed,_0xd60bde,_0x730215){return{'command':MCP_COMMAND,'args':buildMcpArgs(_0x730215),'env':buildMcpEnv(_0xee9bed,_0xd60bde)};}function a113_0x3f0b(_0x2c57e7,_0x51152a){_0x2c57e7=_0x2c57e7-0x66;const _0x43d5cd=a113_0x43d5();let _0x3f0bee=_0x43d5cd[_0x2c57e7];return _0x3f0bee;}export function buildClaudeMcpCommand(_0x109735,_0x16490a,_0x249a19){const _0xcf75c5=a113_0x3f0b,_0x33e78d=buildMcpArgs(_0x249a19),_0x5f48bc=_0xcf75c5(0x6a)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+_0x33e78d['join']('\x20')+'\x20-e\x20RABETBASE_APP_CODE='+_0x109735,_0x194be5=_0x16490a!==_0xcf75c5(0x89)?_0xcf75c5(0x86)+_0x16490a:'';return''+_0x5f48bc+_0x194be5;}export async function copyCursorRules(_0xc3cc6){const _0xe1df4=a113_0x3f0b,_0x3d1fb9=join(_0xc3cc6,_0xe1df4(0x71)),_0x811f4c=join(_0x3d1fb9,_0xe1df4(0x91)),_0x171d8f=join(_0x811f4c,_0xe1df4(0x90));if(existsSync(_0x171d8f))return logger[_0xe1df4(0x7c)](_0xe1df4(0x6e),'Cursor\x20Rules\x20file\x20already\x20exists,\x20skipping',{'path':_0x171d8f}),![];try{ensureDir(_0x811f4c);const _0x2d47e2=await getRulesContent();return writeFileSync(_0x171d8f,_0x2d47e2,_0xe1df4(0x6d)),logger['info'](_0xe1df4(0x6e),'Create\x20Cursor\x20Rules\x20file',{'to':_0x171d8f}),!![];}catch(_0x48c38f){return logger['error']('mcp-install','Failed\x20to\x20copy\x20Cursor\x20Rules\x20file',{'error':_0x48c38f instanceof Error?_0x48c38f[_0xe1df4(0xa3)]:String(_0x48c38f)}),![];}}export async function copyAgentsMd(_0x729124){const _0x35f9c8=a113_0x3f0b,_0x2f4b2a=join(_0x729124,_0x35f9c8(0xa1));if(existsSync(_0x2f4b2a))return logger[_0x35f9c8(0x7c)](_0x35f9c8(0x6e),_0x35f9c8(0xa4),{'path':_0x2f4b2a}),![];try{const _0x2464e8=await getRulesContent();return writeFileSync(_0x2f4b2a,_0x2464e8,_0x35f9c8(0x6d)),logger[_0x35f9c8(0x7c)](_0x35f9c8(0x6e),_0x35f9c8(0x75),{'to':_0x2f4b2a}),!![];}catch(_0x453b20){return logger['error'](_0x35f9c8(0x6e),_0x35f9c8(0x7a),{'error':_0x453b20 instanceof Error?_0x453b20[_0x35f9c8(0xa3)]:String(_0x453b20)}),![];}}export async function configureCursorMcp(_0x45c8a0,_0x32e210){const _0x2deb32=a113_0x3f0b;try{const {appcode:_0x3e4f0f,env:_0x2730a0}=getAppConfig(),_0x2bf7a6=join(_0x45c8a0,_0x2deb32(0x71)),_0xc77112=join(_0x2bf7a6,_0x2deb32(0x8a));ensureDir(_0x2bf7a6);const _0x3e058f=buildMcpServerConfig(_0x3e4f0f,_0x2730a0,_0x32e210);let _0x59a171;if(existsSync(_0xc77112)){const _0x20b6b9=readFileSync(_0xc77112,_0x2deb32(0x9f));_0x59a171=JSON['parse'](_0x20b6b9),!_0x59a171['mcpServers']&&(_0x59a171[_0x2deb32(0x88)]={}),logger[_0x2deb32(0x7c)](_0x2deb32(0x81),_0x2deb32(0x79),{'path':_0xc77112,'appcode':_0x3e4f0f,'env':_0x2730a0});}else _0x59a171={'mcpServers':{}},logger[_0x2deb32(0x7c)]('mcp-cursor','Create\x20new\x20mcp.json\x20config',{'path':_0xc77112,'appcode':_0x3e4f0f,'env':_0x2730a0});_0x59a171[_0x2deb32(0x88)][MCP_SERVER_NAME]=_0x3e058f,writeFileSync(_0xc77112,JSON['stringify'](_0x59a171,null,0x2),{'encoding':_0x2deb32(0x9f)});const _0x43b222=await copyCursorRules(_0x45c8a0),_0x3d7403=[_0x2deb32(0x99),_0x2deb32(0x98)+_0x3e4f0f];return _0x2730a0!==_0x2deb32(0x89)&&_0x3d7403[_0x2deb32(0x6b)](_0x2deb32(0x80)+_0x2730a0),_0x3d7403[_0x2deb32(0x6b)](_0x2deb32(0x97)),_0x43b222&&_0x3d7403[_0x2deb32(0x6b)](_0x2deb32(0xa6)),logger[_0x2deb32(0x7c)](_0x2deb32(0x81),_0x2deb32(0x6c),{'appcode':_0x3e4f0f,'env':_0x2730a0,'configPath':_0xc77112}),{'success':!![],'message':_0x3d7403[_0x2deb32(0x8c)]('\x0a')};}catch(_0x44c867){return logger[_0x2deb32(0x68)]('mcp-cursor',_0x2deb32(0xa9)+(_0x44c867 instanceof Error?_0x44c867[_0x2deb32(0xa3)]:String(_0x44c867))+'\x0a',{'error':_0x44c867 instanceof Error?_0x44c867[_0x2deb32(0xa3)]:String(_0x44c867)}),{'success':![],'message':_0x44c867 instanceof Error?_0x44c867[_0x2deb32(0xa3)]:String(_0x44c867)};}}export function configureClaudeMcp(_0x366fca,_0x45265f){const _0x2ecaf4=a113_0x3f0b;try{const {appcode:_0x1074a6,env:_0x1f674f}=getAppConfig();copyAgentsMd(_0x366fca);const _0x346674=buildMcpArgs(_0x45265f),_0x485b4c=_0x2ecaf4(0x6a)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+_0x346674[_0x2ecaf4(0x8c)]('\x20')+_0x2ecaf4(0xa5)+_0x1074a6,_0x509e48=_0x1f674f!==_0x2ecaf4(0x89)?'\x20-e\x20RABETBASE_ENV='+_0x1f674f:'',_0x3b5cf3=''+_0x485b4c+_0x509e48,_0x2a03f8=[_0x2ecaf4(0x93),'--------------------------------',''+_0x3b5cf3,'--------------------------------',_0x2ecaf4(0x7d),'AppCode:\x20'+_0x1074a6];return _0x1f674f!==_0x2ecaf4(0x89)&&_0x2a03f8[_0x2ecaf4(0x6b)]('Environment:\x20'+_0x1f674f),_0x2a03f8['push'](_0x2ecaf4(0x70)),logger['info'](_0x2ecaf4(0x7b),_0x2ecaf4(0x73),{'appcode':_0x1074a6,'env':_0x1f674f,'command':_0x3b5cf3}),{'success':!![],'message':_0x2a03f8[_0x2ecaf4(0x8c)]('\x0a'),'needsManualAction':!![]};}catch(_0x4fa01c){return logger[_0x2ecaf4(0x68)](_0x2ecaf4(0x7b),_0x2ecaf4(0xa9)+(_0x4fa01c instanceof Error?_0x4fa01c['message']:String(_0x4fa01c))+'\x0a',{'error':_0x4fa01c instanceof Error?_0x4fa01c[_0x2ecaf4(0xa3)]:String(_0x4fa01c)}),{'success':![],'message':_0x4fa01c instanceof Error?_0x4fa01c[_0x2ecaf4(0xa3)]:String(_0x4fa01c)};}}export function showOtherMcpGuide(_0x1dc252,_0x18c82d){const _0x4af197=a113_0x3f0b;try{const {appcode:_0x7ace4,env:_0x57b06a}=getAppConfig(),_0x5c3ed7=buildMcpServerConfig(_0x7ace4,_0x57b06a,_0x18c82d),_0x1df7f3=buildMcpArgs(_0x18c82d),_0xc03d81=[_0x4af197(0x9b)+_0x7ace4+'\x22'];_0x57b06a!==_0x4af197(0x89)&&_0xc03d81[_0x4af197(0x6b)](_0x4af197(0x96)+_0x57b06a+'\x22');const _0x1c75ab=_0x57b06a!==_0x4af197(0x89)?_0x4af197(0x83)+_0x57b06a:'',_0x1de0d8=[_0x4af197(0x67)+_0x7ace4+_0x1c75ab,'{',_0x4af197(0x9c),_0x4af197(0x74),_0x4af197(0x69),_0x4af197(0x95)+JSON[_0x4af197(0x8e)](_0x1df7f3)+',',_0x4af197(0x7f),..._0xc03d81[_0x4af197(0x8b)](_0x286e8d=>_0x4af197(0x8f)+_0x286e8d+','),_0x4af197(0x66),'\x20\x20\x20\x20}',_0x4af197(0x6f),'}','Detailed\x20guide:\x20https://open.lovrabet.com/en/docs/mcp/config-guide'];return logger['info']('mcp-install',_0x4af197(0x85),{'appcode':_0x7ace4,'env':_0x57b06a}),{'success':!![],'message':_0x1de0d8['join']('\x0a'),'needsManualAction':!![]};}catch(_0x1a1cf1){return{'success':![],'message':_0x1a1cf1 instanceof Error?_0x1a1cf1[_0x4af197(0xa3)]:String(_0x1a1cf1)};}}function ensureDir(_0x1e5296){!existsSync(_0x1e5296)&&mkdirSync(_0x1e5296,{'recursive':!![]});}export async function installMcp(_0x387648,_0x562e42,_0x5d598b=process['cwd']()){const _0x3f65e7=a113_0x3f0b,_0x74e268=[];for(const _0xd1b198 of _0x387648){try{let _0x4dd7ca;switch(_0xd1b198){case'cursor':_0x4dd7ca=await configureCursorMcp(_0x5d598b,_0x562e42);break;case'claude':_0x4dd7ca=configureClaudeMcp(_0x5d598b,_0x562e42);break;case _0x3f65e7(0x77):_0x4dd7ca=showOtherMcpGuide(_0x5d598b,_0x562e42);break;default:_0x4dd7ca={'success':![],'message':_0x3f65e7(0x72)+_0xd1b198};}_0x74e268[_0x3f65e7(0x6b)]({'ide':_0xd1b198,'success':_0x4dd7ca[_0x3f65e7(0x76)],'message':_0x4dd7ca['message'],'needsManualAction':_0x4dd7ca[_0x3f65e7(0x94)]});}catch(_0x324a88){_0x74e268[_0x3f65e7(0x6b)]({'ide':_0xd1b198,'success':![],'message':_0x324a88 instanceof Error?_0x324a88[_0x3f65e7(0xa3)]:String(_0x324a88)});}}return _0x74e268;}
|
|
1
|
+
const a113_0x54a209=a113_0x3d1d;(function(_0x917e4f,_0x5dd975){const _0x3c0edb=a113_0x3d1d,_0x461243=_0x917e4f();while(!![]){try{const _0x3b8454=-parseInt(_0x3c0edb(0x1e6))/0x1+parseInt(_0x3c0edb(0x1f6))/0x2*(-parseInt(_0x3c0edb(0x1eb))/0x3)+parseInt(_0x3c0edb(0x21c))/0x4*(-parseInt(_0x3c0edb(0x1f4))/0x5)+parseInt(_0x3c0edb(0x220))/0x6+parseInt(_0x3c0edb(0x1dc))/0x7*(parseInt(_0x3c0edb(0x20e))/0x8)+parseInt(_0x3c0edb(0x212))/0x9*(parseInt(_0x3c0edb(0x1f2))/0xa)+parseInt(_0x3c0edb(0x1e9))/0xb*(parseInt(_0x3c0edb(0x204))/0xc);if(_0x3b8454===_0x5dd975)break;else _0x461243['push'](_0x461243['shift']());}catch(_0x535d9e){_0x461243['push'](_0x461243['shift']());}}}(a113_0x27d9,0xa2f7d));function a113_0x3d1d(_0x446b16,_0x142fed){_0x446b16=_0x446b16-0x1dc;const _0x27d927=a113_0x27d9();let _0x3d1df0=_0x27d927[_0x446b16];return _0x3d1df0;}import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{normalizeEnv}from'../constant/env.js';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getRulesContent}from'../utils/rules-cdn.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME=a113_0x54a209(0x203);export const MCP_COMMAND=a113_0x54a209(0x214);export const MCP_ARGS=[a113_0x54a209(0x1e5)];export function getAppConfig(){const _0x422c1b=a113_0x54a209,_0x409d47=readConfig(),_0x592a60=_0x409d47['appcode']||_0x409d47[_0x422c1b(0x1f3)],_0x719135=normalizeEnv(_0x409d47[_0x422c1b(0x1df)]||_0x422c1b(0x1f7));if(!_0x592a60)throw new Error('No\x20appcode\x20found.\x20Run\x20\x27rabetbase\x20init\x27\x20to\x20initialize\x20project\x20config');return{'appcode':String(_0x592a60),'env':_0x719135};}export function buildMcpEnv(_0x5b52f9,_0x22736d){const _0x5f4047=a113_0x54a209,_0x3563d2={'RABETBASE_APP_CODE':_0x5b52f9};return _0x22736d!==_0x5f4047(0x1f7)&&(_0x3563d2[_0x5f4047(0x1ea)]=_0x22736d),_0x3563d2;}export function buildMcpArgs(_0xb075d5){const _0xcbb784=a113_0x54a209,_0x1b57bc=['@lovrabet/dataset-mcp-server@latest'];return _0xb075d5&&_0x1b57bc['push'](_0xcbb784(0x211)),_0x1b57bc;}export function buildMcpServerConfig(_0x57557f,_0x4c2009,_0x5b236c){return{'command':MCP_COMMAND,'args':buildMcpArgs(_0x5b236c),'env':buildMcpEnv(_0x57557f,_0x4c2009)};}function a113_0x27d9(){const _0x3464c5=['mcp-claude','parse','\x20\x20\x20\x20\x20\x20}','lovrabet_rules.mdc','agents.md','info','utf8','Unknown\x20IDE:\x20','lovrabet-dataset','732pHzGxN','cursor','claude','Run\x20the\x20following\x20command\x20to\x20configure\x20Claude\x20Code\x20MCP:','\x20\x20\x22mcpServers\x22:\x20{','needsManualAction','mcp-cursor','\x22RABETBASE_APP_CODE\x22:\x20\x22','rules','Create\x20agents.md\x20file','16DMjMNT','\x0a✓\x20Cursor\x20MCP\x20configured\x20successfully!\x0a','mcpServers','--enable-bff-save','7137blFsBv','Update\x20existing\x20mcp.json\x20config','npx','Please\x20restart\x20Cursor\x20to\x20load\x20the\x20new\x20MCP\x20config.','mcp-install','map','success','cwd','claude\x20mcp\x20add\x20','Create\x20Cursor\x20Rules\x20file','44PJNIKR','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','\x20\x20\x20\x20\x20\x20\x20\x20','error','4648968QeEAzp','Other\x20IDE\x20configuration\x20guide\x20displayed','2819376YADiCP','Restart\x20Claude\x20Code\x20to\x20take\x20effect','\x22RABETBASE_ENV\x22:\x20\x22','env','Configuration:','--------------------------------','utf-8','message','stringify','@lovrabet/dataset-mcp-server@latest','655620pEWrUS','Configuration\x20command\x20generated',',\x20env=','55363XYSeoL','RABETBASE_ENV','3RsonQi','.cursor','join','mcp.json','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','\x20-e\x20RABETBASE_ENV=','\x0aError:\x20Configuration\x20failed\x20-\x20','9100lgxamG','app','377145nXGFTu','Environment:\x20','912302UYJVGa','production','AppCode:\x20','push','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{'];a113_0x27d9=function(){return _0x3464c5;};return a113_0x27d9();}export function buildClaudeMcpCommand(_0x54518b,_0x3b724f,_0x58b094){const _0x29b577=a113_0x54a209,_0x3498d2=buildMcpArgs(_0x58b094),_0x1d337c=_0x29b577(0x21a)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+_0x3498d2[_0x29b577(0x1ed)]('\x20')+'\x20-e\x20RABETBASE_APP_CODE='+_0x54518b,_0x81d671=_0x3b724f!==_0x29b577(0x1f7)?_0x29b577(0x1f0)+_0x3b724f:'';return''+_0x1d337c+_0x81d671;}export async function copyCursorRules(_0x329ef1){const _0x366340=a113_0x54a209,_0x187364=join(_0x329ef1,_0x366340(0x1ec)),_0x175af8=join(_0x187364,_0x366340(0x20c)),_0x37c423=join(_0x175af8,_0x366340(0x1fe));if(existsSync(_0x37c423))return logger['info'](_0x366340(0x216),'Cursor\x20Rules\x20file\x20already\x20exists,\x20skipping',{'path':_0x37c423}),![];try{ensureDir(_0x175af8);const _0xfdf98b=await getRulesContent();return writeFileSync(_0x37c423,_0xfdf98b,_0x366340(0x1e2)),logger[_0x366340(0x200)](_0x366340(0x216),_0x366340(0x21b),{'to':_0x37c423}),!![];}catch(_0x456797){return logger[_0x366340(0x21f)]('mcp-install','Failed\x20to\x20copy\x20Cursor\x20Rules\x20file',{'error':_0x456797 instanceof Error?_0x456797[_0x366340(0x1e3)]:String(_0x456797)}),![];}}export async function copyAgentsMd(_0x278a98){const _0x8ca6a9=a113_0x54a209,_0x56093d=join(_0x278a98,_0x8ca6a9(0x1ff));if(existsSync(_0x56093d))return logger[_0x8ca6a9(0x200)](_0x8ca6a9(0x216),'agents.md\x20already\x20exists,\x20skipping',{'path':_0x56093d}),![];try{const _0x5e0590=await getRulesContent();return writeFileSync(_0x56093d,_0x5e0590,'utf-8'),logger[_0x8ca6a9(0x200)]('mcp-install',_0x8ca6a9(0x20d),{'to':_0x56093d}),!![];}catch(_0xf052f6){return logger['error'](_0x8ca6a9(0x216),'Failed\x20to\x20copy\x20agents.md\x20file',{'error':_0xf052f6 instanceof Error?_0xf052f6[_0x8ca6a9(0x1e3)]:String(_0xf052f6)}),![];}}export async function configureCursorMcp(_0x5886df,_0x3ee472){const _0x55598a=a113_0x54a209;try{const {appcode:_0x416b5d,env:_0x5b3f9a}=getAppConfig(),_0x37941e=join(_0x5886df,_0x55598a(0x1ec)),_0x2853bb=join(_0x37941e,_0x55598a(0x1ee));ensureDir(_0x37941e);const _0x5900e8=buildMcpServerConfig(_0x416b5d,_0x5b3f9a,_0x3ee472);let _0x146e2b;if(existsSync(_0x2853bb)){const _0x187d4d=readFileSync(_0x2853bb,_0x55598a(0x201));_0x146e2b=JSON[_0x55598a(0x1fc)](_0x187d4d),!_0x146e2b[_0x55598a(0x210)]&&(_0x146e2b[_0x55598a(0x210)]={}),logger[_0x55598a(0x200)](_0x55598a(0x20a),_0x55598a(0x213),{'path':_0x2853bb,'appcode':_0x416b5d,'env':_0x5b3f9a});}else _0x146e2b={'mcpServers':{}},logger[_0x55598a(0x200)](_0x55598a(0x20a),'Create\x20new\x20mcp.json\x20config',{'path':_0x2853bb,'appcode':_0x416b5d,'env':_0x5b3f9a});_0x146e2b[_0x55598a(0x210)][MCP_SERVER_NAME]=_0x5900e8,writeFileSync(_0x2853bb,JSON[_0x55598a(0x1e4)](_0x146e2b,null,0x2),{'encoding':_0x55598a(0x201)});const _0x58b3c9=await copyCursorRules(_0x5886df),_0x1d51c9=['Written\x20.cursor/mcp.json',_0x55598a(0x1f8)+_0x416b5d];return _0x5b3f9a!==_0x55598a(0x1f7)&&_0x1d51c9[_0x55598a(0x1f9)](_0x55598a(0x1f5)+_0x5b3f9a),_0x1d51c9[_0x55598a(0x1f9)](_0x55598a(0x215)),_0x58b3c9&&_0x1d51c9[_0x55598a(0x1f9)](_0x55598a(0x21b)),logger[_0x55598a(0x200)]('mcp-cursor',_0x55598a(0x20f),{'appcode':_0x416b5d,'env':_0x5b3f9a,'configPath':_0x2853bb}),{'success':!![],'message':_0x1d51c9['join']('\x0a')};}catch(_0x21b2f1){return logger[_0x55598a(0x21f)]('mcp-cursor',_0x55598a(0x1f1)+(_0x21b2f1 instanceof Error?_0x21b2f1[_0x55598a(0x1e3)]:String(_0x21b2f1))+'\x0a',{'error':_0x21b2f1 instanceof Error?_0x21b2f1['message']:String(_0x21b2f1)}),{'success':![],'message':_0x21b2f1 instanceof Error?_0x21b2f1[_0x55598a(0x1e3)]:String(_0x21b2f1)};}}export function configureClaudeMcp(_0x45f77f,_0x19e7f6){const _0x119d64=a113_0x54a209;try{const {appcode:_0x420c3d,env:_0x2ad70e}=getAppConfig();copyAgentsMd(_0x45f77f);const _0x47f23f=buildMcpArgs(_0x19e7f6),_0x23c520=_0x119d64(0x21a)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+_0x47f23f[_0x119d64(0x1ed)]('\x20')+'\x20-e\x20RABETBASE_APP_CODE='+_0x420c3d,_0x1bb725=_0x2ad70e!==_0x119d64(0x1f7)?'\x20-e\x20RABETBASE_ENV='+_0x2ad70e:'',_0x429a96=''+_0x23c520+_0x1bb725,_0x31dc53=[_0x119d64(0x207),'--------------------------------',''+_0x429a96,_0x119d64(0x1e1),_0x119d64(0x1e0),_0x119d64(0x1f8)+_0x420c3d];return _0x2ad70e!=='production'&&_0x31dc53['push'](_0x119d64(0x1f5)+_0x2ad70e),_0x31dc53[_0x119d64(0x1f9)](_0x119d64(0x1dd)),logger['info'](_0x119d64(0x1fb),_0x119d64(0x1e7),{'appcode':_0x420c3d,'env':_0x2ad70e,'command':_0x429a96}),{'success':!![],'message':_0x31dc53[_0x119d64(0x1ed)]('\x0a'),'needsManualAction':!![]};}catch(_0x5b07a0){return logger[_0x119d64(0x21f)](_0x119d64(0x1fb),_0x119d64(0x1f1)+(_0x5b07a0 instanceof Error?_0x5b07a0[_0x119d64(0x1e3)]:String(_0x5b07a0))+'\x0a',{'error':_0x5b07a0 instanceof Error?_0x5b07a0[_0x119d64(0x1e3)]:String(_0x5b07a0)}),{'success':![],'message':_0x5b07a0 instanceof Error?_0x5b07a0[_0x119d64(0x1e3)]:String(_0x5b07a0)};}}export function showOtherMcpGuide(_0x4ff3fc,_0x42e662){const _0x48ff42=a113_0x54a209;try{const {appcode:_0x1b247c,env:_0x22e894}=getAppConfig(),_0x4ea782=buildMcpServerConfig(_0x1b247c,_0x22e894,_0x42e662),_0x432679=buildMcpArgs(_0x42e662),_0x4a7470=[_0x48ff42(0x20b)+_0x1b247c+'\x22'];_0x22e894!==_0x48ff42(0x1f7)&&_0x4a7470[_0x48ff42(0x1f9)](_0x48ff42(0x1de)+_0x22e894+'\x22');const _0x47944e=_0x22e894!=='production'?_0x48ff42(0x1e8)+_0x22e894:'',_0x1d16fd=['Configuration:\x20appcode='+_0x1b247c+_0x47944e,'{',_0x48ff42(0x208),_0x48ff42(0x1fa),_0x48ff42(0x21d),'\x20\x20\x20\x20\x20\x20\x22args\x22:\x20'+JSON[_0x48ff42(0x1e4)](_0x432679)+',',_0x48ff42(0x1ef),..._0x4a7470[_0x48ff42(0x217)](_0x5becc4=>_0x48ff42(0x21e)+_0x5becc4+','),_0x48ff42(0x1fd),'\x20\x20\x20\x20}','\x20\x20}','}','Detailed\x20guide:\x20https://open.lovrabet.com/en/docs/mcp/config-guide'];return logger[_0x48ff42(0x200)]('mcp-install',_0x48ff42(0x221),{'appcode':_0x1b247c,'env':_0x22e894}),{'success':!![],'message':_0x1d16fd[_0x48ff42(0x1ed)]('\x0a'),'needsManualAction':!![]};}catch(_0x204696){return{'success':![],'message':_0x204696 instanceof Error?_0x204696[_0x48ff42(0x1e3)]:String(_0x204696)};}}function ensureDir(_0x42feef){!existsSync(_0x42feef)&&mkdirSync(_0x42feef,{'recursive':!![]});}export async function installMcp(_0x308d52,_0x57878f,_0x450109=process[a113_0x54a209(0x219)]()){const _0x4adea0=a113_0x54a209,_0x47cbff=[];for(const _0x532b59 of _0x308d52){try{let _0x2262be;switch(_0x532b59){case _0x4adea0(0x205):_0x2262be=await configureCursorMcp(_0x450109,_0x57878f);break;case _0x4adea0(0x206):_0x2262be=configureClaudeMcp(_0x450109,_0x57878f);break;case'other':_0x2262be=showOtherMcpGuide(_0x450109,_0x57878f);break;default:_0x2262be={'success':![],'message':_0x4adea0(0x202)+_0x532b59};}_0x47cbff['push']({'ide':_0x532b59,'success':_0x2262be[_0x4adea0(0x218)],'message':_0x2262be[_0x4adea0(0x1e3)],'needsManualAction':_0x2262be[_0x4adea0(0x209)]});}catch(_0x2544fb){_0x47cbff['push']({'ide':_0x532b59,'success':![],'message':_0x2544fb instanceof Error?_0x2544fb[_0x4adea0(0x1e3)]:String(_0x2544fb)});}}return _0x47cbff;}
|
package/lib/skills/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a114_0x20504e=a114_0x15c5;(function(_0x491ff3,_0x4a6971){const _0x43e50d=a114_0x15c5,_0x299897=_0x491ff3();while(!![]){try{const _0x59f5d2=-parseInt(_0x43e50d(0x1f0))/0x1+-parseInt(_0x43e50d(0x1f2))/0x2+-parseInt(_0x43e50d(0x1e2))/0x3*(-parseInt(_0x43e50d(0x1eb))/0x4)+parseInt(_0x43e50d(0x1f8))/0x5+parseInt(_0x43e50d(0x1ec))/0x6+parseInt(_0x43e50d(0x1e7))/0x7+-parseInt(_0x43e50d(0x1dd))/0x8;if(_0x59f5d2===_0x4a6971)break;else _0x299897['push'](_0x299897['shift']());}catch(_0x119bab){_0x299897['push'](_0x299897['shift']());}}}(a114_0x53a3,0x38516));import{logger}from'../utils/logger.js';export function camelCaseFlagsToKebab(_0x4c82b8){const _0x1d5790=a114_0x15c5,_0x7ea520=[];for(const [_0x401234,_0x19f6b5]of Object[_0x1d5790(0x1e4)](_0x4c82b8)){if(_0x19f6b5===!![]){const _0x421788=_0x401234[_0x1d5790(0x1e6)](/([A-Z])/g,_0x1d5790(0x1ef))[_0x1d5790(0x1f7)]();_0x7ea520[_0x1d5790(0x1e1)](_0x421788);}}return _0x7ea520;}function a114_0x15c5(_0x5f0441,_0x219cc6){_0x5f0441=_0x5f0441-0x1d8;const _0x53a30b=a114_0x53a3();let _0x15c58e=_0x53a30b[_0x5f0441];return _0x15c58e;}export function parseDynamicFlags(){const _0x669e2f=a114_0x15c5,_0x4118b0=[];for(let _0xabf6ee=0x3;_0xabf6ee<process[_0x669e2f(0x1f1)]['length'];_0xabf6ee++){const _0x282cda=process['argv'][_0xabf6ee];if(_0x282cda&&_0x282cda['startsWith']('--')){const _0x3c1109=_0x282cda[_0x669e2f(0x1f4)](0x2);_0x3c1109&&!_0x3c1109[_0x669e2f(0x1dc)]('=')&&_0x4118b0[_0x669e2f(0x1e1)](_0x3c1109);}}return _0x4118b0;}export function getAllProvidedFlags(_0x5a6c02){const _0xa36da=a114_0x15c5,_0x2b4cf8=camelCaseFlagsToKebab(_0x5a6c02),_0x32ac26=parseDynamicFlags(),_0x39a0a3=new Set([..._0x2b4cf8,..._0x32ac26]);return Array[_0xa36da(0x1d9)](_0x39a0a3);}export function normalizeLegacyBffSaveFlags(_0x32910e){const _0x981877=a114_0x15c5,_0x14bacf=new Set(_0x32910e);return _0x14bacf['has'](_0x981877(0x1e3))&&_0x14bacf['add'](_0x981877(0x1e0)),Array['from'](_0x14bacf);}const SKILLS_INSTALL_COMMAND_LINE=a114_0x20504e(0x1db);function a114_0x53a3(){const _0x13822e=['-$1','386920IWEQbG','argv','660256IOqdMe','\x20\x20rabetbase\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','slice','Equivalent\x20command:\x20','cwd','toLowerCase','1124250EbbJZJ','\x0aLovrabet\x20Skill\x20-\x20Developer\x20Skill\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20rabetbase\x20skill\x20--help\x0a\x20\x20rabetbase\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','setLogPath','from','Error:\x20Unsupported\x20command:\x20','npx\x20-y\x20skills\x20add\x20lovrabet/rabetbase\x20--global','includes','354512hZFBJd','不支持的命令:\x20','error','enable-bff-save','push','396921oUXwAC','dangerously-bff-save','entries','\x20\x20rabetbase\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','replace','2480394LfBFRT','--help','help','\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/lovrabet/guides/.\x0a','12GhGAWo','95562AjJNvx','log','(empty)'];a114_0x53a3=function(){return _0x13822e;};return a114_0x53a3();}export async function skillsCommand(_0x563653,_0x59ed02,_0x5ceff8){const _0x229e3e=a114_0x20504e;logger[_0x229e3e(0x1d8)](process[_0x229e3e(0x1f6)]());if(_0x5ceff8?.[_0x229e3e(0x1e9)]||_0x563653===_0x229e3e(0x1e8)){showHelp();return;}console[_0x229e3e(0x1df)](_0x229e3e(0x1da)+(_0x563653||_0x229e3e(0x1ee))),console['log']('\x0aAvailable\x20commands:'),console['log'](_0x229e3e(0x1e5)),console[_0x229e3e(0x1ed)](_0x229e3e(0x1f3)),console[_0x229e3e(0x1ed)](''),console[_0x229e3e(0x1ed)](_0x229e3e(0x1f5)+SKILLS_INSTALL_COMMAND_LINE),logger[_0x229e3e(0x1df)]('skill',_0x229e3e(0x1de)+_0x563653),process['exit'](0x1);}function showHelp(){const _0x4ca96b=a114_0x20504e;console[_0x4ca96b(0x1ed)](_0x4ca96b(0x1f9)+SKILLS_INSTALL_COMMAND_LINE+_0x4ca96b(0x1ea));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a115_0x1dad5a=a115_0x474a;(function(_0x14e3cf,_0xab2739){const _0x43f2f7=a115_0x474a,_0x163f31=_0x14e3cf();while(!![]){try{const _0x1f7429=parseInt(_0x43f2f7(0x80))/0x1*(parseInt(_0x43f2f7(0x69))/0x2)+parseInt(_0x43f2f7(0x7f))/0x3*(parseInt(_0x43f2f7(0x7e))/0x4)+parseInt(_0x43f2f7(0x66))/0x5+-parseInt(_0x43f2f7(0x65))/0x6*(-parseInt(_0x43f2f7(0x7b))/0x7)+parseInt(_0x43f2f7(0x83))/0x8*(parseInt(_0x43f2f7(0x77))/0x9)+-parseInt(_0x43f2f7(0x6a))/0xa+-parseInt(_0x43f2f7(0x75))/0xb;if(_0x1f7429===_0xab2739)break;else _0x163f31['push'](_0x163f31['shift']());}catch(_0x54e0af){_0x163f31['push'](_0x163f31['shift']());}}}(a115_0x5542,0xa3ba1));import{spawnSync}from'node:child_process';export const NPX_FLAG_YES='-y';function a115_0x474a(_0x578e5d,_0x1a079c){_0x578e5d=_0x578e5d-0x65;const _0x554295=a115_0x5542();let _0x474a6a=_0x554295[_0x578e5d];return _0x474a6a;}export const NPX_SKILLS_CLI=a115_0x1dad5a(0x6e);export const NPX_SKILLS_SUBCOMMAND_ADD='add';export const NPX_SKILLS_FLAG_SKILL='--skill';export const RABETBASE_SKILL_SOURCE='lovrabet/lovrabet-skill';function a115_0x5542(){const _0x586cef=['platform','join','178HdylIu','4049110qZhnJq','inherit','log','remove','skills','win32','env','unknown','exit\x20','stderr','RABETBASE_SKIP_NPX_SKILLS','31403515wELQjB','Lovrabet','9LdfKGo','stdio','pipe','--global','12026EhqoCI','toString','npx','4omWnGj','2867445vAJpQE','11503NOcDnn','npx.cmd','skill','2803624ikgcqr','status','trim','stdout','4206WCsxiR','1980240IAjYno'];a115_0x5542=function(){return _0x586cef;};return a115_0x5542();}export const DEFAULT_RABETBASE_SKILL_NAME=a115_0x1dad5a(0x76);export function buildNpxSkillsAddArgv(_0x406dcf=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x406dcf];}export const NPX_SKILLS_ADD_COMMAND_LINE=[a115_0x1dad5a(0x7d),...buildNpxSkillsAddArgv()]['join']('\x20');export function shouldSkipNpxSkillsAdd(){const _0x499ffd=a115_0x1dad5a;return process[_0x499ffd(0x70)][_0x499ffd(0x74)]==='1';}export function runNpxSkillsAdd(_0x36d04b,_0x438505){const _0x4ea366=a115_0x1dad5a;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0xf83c1c=_0x438505?.[_0x4ea366(0x78)]??_0x4ea366(0x6b),_0x11b4a3=process['platform']===_0x4ea366(0x6f)?_0x4ea366(0x81):'npx',_0x1284eb=buildNpxSkillsAddArgv(_0x438505?.['skill']??DEFAULT_RABETBASE_SKILL_NAME),_0x3cb8b5=[_0x11b4a3,..._0x1284eb]['join']('\x20');console['log']('*\x20'+_0x3cb8b5);const _0xa3922a=spawnSync(_0x11b4a3,_0x1284eb,{'cwd':_0x36d04b,'stdio':_0xf83c1c,'env':process[_0x4ea366(0x70)],'shell':![]}),_0x1c165a=_0xa3922a[_0x4ea366(0x84)];if(_0x1c165a===0x0)return{'ok':!![],'status':0x0};let _0x42243e=_0x4ea366(0x72)+(_0x1c165a??'unknown');if(_0xf83c1c===_0x4ea366(0x79)){const _0x38dc56=_0xa3922a[_0x4ea366(0x73)]?_0xa3922a['stderr'][_0x4ea366(0x7c)]()[_0x4ea366(0x85)]():'',_0x2dc371=_0xa3922a[_0x4ea366(0x86)]?_0xa3922a[_0x4ea366(0x86)]['toString']()['trim']():'';if(_0x38dc56)_0x42243e=_0x38dc56;else{if(_0x2dc371)_0x42243e=_0x2dc371;}}return{'ok':![],'status':_0x1c165a??null,'error':_0x42243e};}export function runNpxSkillsRemove(_0x23df6c,_0x218baf){const _0xf17ec7=a115_0x1dad5a,_0x5be00f=_0x218baf?.[_0xf17ec7(0x78)]??_0xf17ec7(0x6b),_0x524ce4=process[_0xf17ec7(0x67)]===_0xf17ec7(0x6f)?'npx.cmd':_0xf17ec7(0x7d),_0xf968e9=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0xf17ec7(0x6d),RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x218baf?.[_0xf17ec7(0x82)]??DEFAULT_RABETBASE_SKILL_NAME],_0x12b0e3=[_0x524ce4,..._0xf968e9][_0xf17ec7(0x68)]('\x20');console['log']('*\x20'+_0x12b0e3);const _0x174659=spawnSync(_0x524ce4,_0xf968e9,{'cwd':_0x23df6c,'stdio':_0x5be00f,'env':process['env'],'shell':![]}),_0x4638c1=_0x174659[_0xf17ec7(0x84)];if(_0x4638c1===0x0)return{'ok':!![],'status':0x0};let _0xd7d440=_0xf17ec7(0x72)+(_0x4638c1??_0xf17ec7(0x71));if(_0x5be00f==='pipe'){const _0x27c9c6=_0x174659[_0xf17ec7(0x73)]?_0x174659['stderr'][_0xf17ec7(0x7c)]()[_0xf17ec7(0x85)]():'',_0x31ddc3=_0x174659[_0xf17ec7(0x86)]?_0x174659['stdout'][_0xf17ec7(0x7c)]()[_0xf17ec7(0x85)]():'';if(_0x27c9c6)_0xd7d440=_0x27c9c6;else{if(_0x31ddc3)_0xd7d440=_0x31ddc3;}}return{'ok':![],'status':_0x4638c1??null,'error':_0xd7d440};}export function runNpxSkillsAddGlobal(_0xa59143,_0x14f5f5,_0x5e9f66){const _0x5226ab=a115_0x1dad5a,_0x1df570=_0x5e9f66?.[_0x5226ab(0x78)]??'inherit',_0x172cb4=process['platform']===_0x5226ab(0x6f)?_0x5226ab(0x81):_0x5226ab(0x7d),_0x2cf2b7=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x14f5f5,_0x5226ab(0x7a)],_0x3a914e=[_0x172cb4,..._0x2cf2b7][_0x5226ab(0x68)]('\x20');console[_0x5226ab(0x6c)]('*\x20'+_0x3a914e);const _0x5c5624=spawnSync(_0x172cb4,_0x2cf2b7,{'cwd':_0xa59143,'stdio':_0x1df570,'env':process[_0x5226ab(0x70)],'shell':![]}),_0x318835=_0x5c5624[_0x5226ab(0x84)];if(_0x318835===0x0)return{'ok':!![],'status':0x0};let _0x57bbc8='exit\x20'+(_0x318835??_0x5226ab(0x71));if(_0x1df570===_0x5226ab(0x79)){const _0x52dbc3=_0x5c5624['stderr']?_0x5c5624[_0x5226ab(0x73)][_0x5226ab(0x7c)]()['trim']():'',_0x42947e=_0x5c5624['stdout']?_0x5c5624[_0x5226ab(0x86)]['toString']()[_0x5226ab(0x85)]():'';if(_0x52dbc3)_0x57bbc8=_0x52dbc3;else{if(_0x42947e)_0x57bbc8=_0x42947e;}}return{'ok':![],'status':_0x318835??null,'error':_0x57bbc8};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x246ba5,_0x21167f){const _0x5361d2=a116_0x4698,_0xacffb3=_0x246ba5();while(!![]){try{const _0x398f65=parseInt(_0x5361d2(0x13a))/0x1+parseInt(_0x5361d2(0x129))/0x2+-parseInt(_0x5361d2(0x11f))/0x3*(parseInt(_0x5361d2(0x124))/0x4)+parseInt(_0x5361d2(0x127))/0x5*(parseInt(_0x5361d2(0x121))/0x6)+-parseInt(_0x5361d2(0x130))/0x7*(parseInt(_0x5361d2(0x134))/0x8)+-parseInt(_0x5361d2(0x135))/0x9+parseInt(_0x5361d2(0x12d))/0xa;if(_0x398f65===_0x21167f)break;else _0xacffb3['push'](_0xacffb3['shift']());}catch(_0x496f34){_0xacffb3['push'](_0xacffb3['shift']());}}}(a116_0x4af3,0x40161));import{createRequire}from'node:module';import a116_0x3ccb2f from'node:os';function a116_0x4698(_0x989c1c,_0x5b5323){_0x989c1c=_0x989c1c-0x11f;const _0x4af3e4=a116_0x4af3();let _0x4698a7=_0x4af3e4[_0x989c1c];return _0x4698a7;}import{BUILD_NUMBER}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{getOtelLoggerPackageVersion}from'./otel-logger-version.js';const require=createRequire(import.meta.url),pkg=require('../../package.json');export async function reportCliHelpTrace(_0xbeaf4d,_0x43838a){const _0x4046f8=a116_0x4698;try{const {setTraceConfig:_0x36644c,sendNodeTraceLog:_0x28b467}=await import(_0x4046f8(0x123)),_0xbb7f08=getOtelLoggerPackageVersion(),_0x170595=await getSessionUserInfo(),_0x9e7199=_0x170595?.[_0x4046f8(0x12e)];_0x36644c({'otelLoggerVersion':_0xbb7f08,'serviceName':pkg[_0x4046f8(0x126)],'serviceVersion':BUILD_NUMBER?pkg[_0x4046f8(0x125)]+_0x4046f8(0x138)+BUILD_NUMBER:pkg[_0x4046f8(0x125)],'serviceEnv':process[_0x4046f8(0x12c)][_0x4046f8(0x133)]??(process[_0x4046f8(0x12c)][_0x4046f8(0x137)]==='1'?_0x4046f8(0x120):_0x4046f8(0x132)),'username':_0x9e7199?.[_0x4046f8(0x131)]??a116_0x3ccb2f[_0x4046f8(0x128)]()[_0x4046f8(0x131)]??'rabetbase-cli',..._0x9e7199&&{'nickname':_0x9e7199[_0x4046f8(0x139)]},..._0x9e7199?.['id']!=null&&_0x9e7199['id']!==''&&{'userId':String(_0x9e7199['id'])}}),_0x28b467({'traceName':'rabetbase-cli','version':pkg[_0x4046f8(0x125)],'spanName':_0x4046f8(0x136),'eventType':_0x4046f8(0x12f),'logData':{'rabetbase.help.kind':_0xbeaf4d,..._0x43838a?.[_0x4046f8(0x12a)]&&{'rabetbase.help.service':_0x43838a[_0x4046f8(0x12a)]}}});}catch(_0xf4fe0d){console[_0x4046f8(0x12b)](_0x4046f8(0x122),_0xf4fe0d);}}function a116_0x4af3(){const _0x1a7f4c=['4560380lJhlNK','user','manual','7Izirog','username','production','RABETBASE_ENV','3203848ltKsdt','2402199GLXUmq','cli.help','RABETBASE_E2E_DAILY','+build.','nickname','160177AYGBRO','1296111JFvdmo','daily','6MTBmBT','Failed\x20to\x20report\x20CLI\x20help\x20trace:','@yuntoo/otel-logger/node','4qCwdcS','version','name','2198705PsjENQ','userInfo','611940CraseR','service','error','env'];a116_0x4af3=function(){return _0x1a7f4c;};return a116_0x4af3();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1f5d09,_0x1a4838){const _0x616240=a117_0x1a09,_0x4189ee=_0x1f5d09();while(!![]){try{const _0x4d90fe=-parseInt(_0x616240(0xb2))/0x1*(parseInt(_0x616240(0xaf))/0x2)+parseInt(_0x616240(0xab))/0x3*(-parseInt(_0x616240(0xb7))/0x4)+parseInt(_0x616240(0xb5))/0x5+parseInt(_0x616240(0xb4))/0x6*(-parseInt(_0x616240(0xaa))/0x7)+-parseInt(_0x616240(0xa6))/0x8+-parseInt(_0x616240(0xb6))/0x9*(-parseInt(_0x616240(0xac))/0xa)+parseInt(_0x616240(0xb1))/0xb*(parseInt(_0x616240(0xa8))/0xc);if(_0x4d90fe===_0x1a4838)break;else _0x4189ee['push'](_0x4189ee['shift']());}catch(_0x204ce8){_0x4189ee['push'](_0x4189ee['shift']());}}}(a117_0x53b1,0x8c4d3));import{readFileSync}from'node:fs';function a117_0x53b1(){const _0x46506b=['parse','9746NVkDCP','8811GJhpRg','package.json','6zLZhzr','5215260RLVgXC','16389kmjPdd','76zsrdDV','utf-8','8816504RUWcep','0.0.0','28632SBluXe','version','2299171QQtnpC','93540TmHSxq','460AiNpDQ','resolve','@yuntoo/otel-logger/node','146uqznPW'];a117_0x53b1=function(){return _0x46506b;};return a117_0x53b1();}import{dirname,join}from'node:path';import{createRequire}from'node:module';function a117_0x1a09(_0x232b53,_0x2a7b25){_0x232b53=_0x232b53-0xa5;const _0x53b1d5=a117_0x53b1();let _0x1a09fc=_0x53b1d5[_0x232b53];return _0x1a09fc;}const require=createRequire(import.meta.url);export function getOtelLoggerPackageVersion(){const _0x31121c=a117_0x1a09;try{const _0x296fd9=require[_0x31121c(0xad)](_0x31121c(0xae)),_0x543a13=join(dirname(_0x296fd9),'..',_0x31121c(0xb3)),_0x151e08=JSON[_0x31121c(0xb0)](readFileSync(_0x543a13,_0x31121c(0xa5)));return _0x151e08[_0x31121c(0xa9)];}catch{return _0x31121c(0xa7);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2a8fc7,_0x42ff5a){const _0x1c26ee=a118_0x4feb,_0xb834e3=_0x2a8fc7();while(!![]){try{const _0x2c279f=-parseInt(_0x1c26ee(0x1de))/0x1+-parseInt(_0x1c26ee(0x1d7))/0x2*(parseInt(_0x1c26ee(0x1dc))/0x3)+parseInt(_0x1c26ee(0x1d5))/0x4+-parseInt(_0x1c26ee(0x1e2))/0x5*(-parseInt(_0x1c26ee(0x1d6))/0x6)+-parseInt(_0x1c26ee(0x1d4))/0x7*(-parseInt(_0x1c26ee(0x1d3))/0x8)+-parseInt(_0x1c26ee(0x1e1))/0x9*(parseInt(_0x1c26ee(0x1e0))/0xa)+parseInt(_0x1c26ee(0x1dd))/0xb;if(_0x2c279f===_0x42ff5a)break;else _0xb834e3['push'](_0xb834e3['shift']());}catch(_0x2bb079){_0xb834e3['push'](_0xb834e3['shift']());}}}(a118_0x371c,0x21e0f));let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{const _0x5c285a=a118_0x4feb;try{const {shutdownNodeTraces:_0x28c88f}=await import(_0x5c285a(0x1df));await _0x28c88f();}catch{}})()),shutdownPromise;}function a118_0x4feb(_0x3fbcdf,_0x5dcd4c){_0x3fbcdf=_0x3fbcdf-0x1d2;const _0x371c1b=a118_0x371c();let _0x4feb11=_0x371c1b[_0x3fbcdf];return _0x4feb11;}function a118_0x371c(){const _0x1672e5=['215cbvkvJ','SIGINT','64YUacCw','150108RQJYvB','741836CGIoyA','28554UwRLYV','14918PCohnx','once','then','SIGTERM','exit','57pmHOtT','1267288JXUPXI','248458qyGIQQ','@yuntoo/otel-logger/node','42260DLfRYB','315OcVzzZ'];a118_0x371c=function(){return _0x1672e5;};return a118_0x371c();}export function registerOtelShutdownOnExit(){const _0x22a959=a118_0x4feb;process[_0x22a959(0x1d8)]('beforeExit',()=>{void flushOtelNodeIfUsed();});const _0x5617f8=()=>{const _0xb713ac=_0x22a959;void flushOtelNodeIfUsed()[_0xb713ac(0x1d9)](()=>process[_0xb713ac(0x1db)](0x0));};process[_0x22a959(0x1d8)](_0x22a959(0x1d2),_0x5617f8),process[_0x22a959(0x1d8)](_0x22a959(0x1da),_0x5617f8);}export async function exitWithOtelShutdown(_0x53acc3){const _0xd56ff2=a118_0x4feb;await flushOtelNodeIfUsed(),process[_0xd56ff2(0x1db)](_0x53acc3);}
|
package/lib/ui/IDESelector.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a120_0x59ec(){const _0x15f616=['2944458yLDgoS','gray','white','\x20↑/↓:\x20Move\x20\x20Space:\x20Toggle\x20\x20a:\x20All\x20\x20i/r:\x20Invert\x20\x20q:\x20Quit\x20\x20Enter:\x20Confirm','7guBmvk','blue','*\x20Select\x20IDEs\x20to\x20configure:','46802GPrXIG','3072812WlKNoO','4562208AYXJgE','592VXXXRU','[\x20]','22705101rmUfoz','has','cyan','[✓]','3675065ZSfRIW','red','column','181822sdBuik','map'];a120_0x59ec=function(){return _0x15f616;};return a120_0x59ec();}(function(_0x1b68ee,_0x17cd12){const _0x41ba72=a120_0x55a7,_0x452a15=_0x1b68ee();while(!![]){try{const _0x29d3b5=parseInt(_0x41ba72(0xce))/0x1*(parseInt(_0x41ba72(0xdd))/0x2)+-parseInt(_0x41ba72(0xca))/0x3+-parseInt(_0x41ba72(0xd2))/0x4+parseInt(_0x41ba72(0xda))/0x5+-parseInt(_0x41ba72(0xd3))/0x6+-parseInt(_0x41ba72(0xd1))/0x7*(parseInt(_0x41ba72(0xd4))/0x8)+parseInt(_0x41ba72(0xd6))/0x9;if(_0x29d3b5===_0x17cd12)break;else _0x452a15['push'](_0x452a15['shift']());}catch(_0x555b5c){_0x452a15['push'](_0x452a15['shift']());}}}(a120_0x59ec,0xd920e));import{jsxs as a120_0x557719,jsx as a120_0x252cc1}from'react/jsx-runtime';import{Text,Box}from'ink';function a120_0x55a7(_0x339e9c,_0x5a0845){_0x339e9c=_0x339e9c-0xc9;const _0x59ec2f=a120_0x59ec();let _0x55a786=_0x59ec2f[_0x339e9c];return _0x55a786;}export function IDESelector({ideList:_0x306a16,title:_0x116ced,selection:_0x16c148}){const _0x40ebcb=a120_0x55a7,{selectedIndexes:_0x5a1275,highlightIndex:_0x4811ed,errorMsg:_0x49e760}=_0x16c148;return a120_0x557719(Box,{'flexDirection':_0x40ebcb(0xdc),'marginTop':0x1,'children':[a120_0x252cc1(Box,{'children':a120_0x557719(Text,{'color':_0x40ebcb(0xd8),'children':['*\x20',_0x116ced]})}),_0x49e760&&a120_0x252cc1(Box,{'marginTop':0x1,'children':a120_0x557719(Text,{'color':_0x40ebcb(0xdb),'children':['✗\x20',_0x49e760]})}),a120_0x557719(Box,{'marginTop':0x1,'flexDirection':_0x40ebcb(0xdc),'children':[a120_0x252cc1(Text,{'bold':!![],'children':_0x40ebcb(0xd0)}),_0x306a16[_0x40ebcb(0xc9)]((_0x3b3abd,_0x1f3149)=>{const _0xc28120=_0x40ebcb,_0x4d5b05=_0x4811ed===_0x1f3149,_0x38af5f=_0x5a1275[_0xc28120(0xd7)](_0x1f3149);return a120_0x252cc1(Box,{'children':a120_0x557719(Text,{'backgroundColor':_0x4d5b05?_0xc28120(0xcf):undefined,'color':_0x4d5b05?_0xc28120(0xcc):undefined,'children':['\x20\x20',_0x38af5f?_0xc28120(0xd9):_0xc28120(0xd5),'\x20',_0x3b3abd['name'],'\x20',a120_0x557719(Text,{'color':_0x4d5b05?'white':_0xc28120(0xcb),'dimColor':!_0x4d5b05,'children':['-\x20',_0x3b3abd['description']]})]})},_0x3b3abd['key']);}),a120_0x252cc1(Box,{'marginTop':0x1,'children':a120_0x252cc1(Text,{'color':'gray','children':_0x40ebcb(0xcd)})})]})]});}export{useIDESelection}from'./useIDESelection.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x283917,_0xd625d7){const _0x3bfb04=a121_0x3c13,_0x137902=_0x283917();while(!![]){try{const _0x36bc34=-parseInt(_0x3bfb04(0x18a))/0x1*(parseInt(_0x3bfb04(0x194))/0x2)+-parseInt(_0x3bfb04(0x18d))/0x3*(parseInt(_0x3bfb04(0x18b))/0x4)+parseInt(_0x3bfb04(0x19b))/0x5*(parseInt(_0x3bfb04(0x195))/0x6)+-parseInt(_0x3bfb04(0x189))/0x7*(parseInt(_0x3bfb04(0x190))/0x8)+parseInt(_0x3bfb04(0x192))/0x9*(-parseInt(_0x3bfb04(0x199))/0xa)+-parseInt(_0x3bfb04(0x19c))/0xb+parseInt(_0x3bfb04(0x196))/0xc;if(_0x36bc34===_0xd625d7)break;else _0x137902['push'](_0x137902['shift']());}catch(_0x8060e4){_0x137902['push'](_0x137902['shift']());}}}(a121_0x5e1d,0x379b1));import{useState,useCallback}from'react';function a121_0x3c13(_0x4fcde5,_0x437a96){_0x4fcde5=_0x4fcde5-0x188;const _0x5e1d98=a121_0x5e1d();let _0x3c13f4=_0x5e1d98[_0x4fcde5];return _0x3c13f4;}function a121_0x5e1d(){const _0x52f564=['110oUUKbL','key','627055VleDlC','143407hvooqP','filter','add','28854yYniIC','13nEbAqw','534968mWeXeb','delete','9DsSKue','length','upArrow','256tTteOe','downArrow','179919GceSxZ','map','66644EWYBNz','6Yxwhay','15619248FKzZaN','has','size'];a121_0x5e1d=function(){return _0x52f564;};return a121_0x5e1d();}export function useIDESelection({ideList:_0x295e10,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0xb27bb6=a121_0x3c13,[_0x55fc0e,_0x20e7be]=useState(new Set(preselectedIDEs[_0xb27bb6(0x193)](_0x5effd8=>_0x295e10['findIndex'](_0x4625fd=>_0x4625fd[_0xb27bb6(0x19a)]===_0x5effd8))['filter'](_0x575846=>_0x575846>=0x0))),[_0x141619,_0x375213]=useState(0x0),[_0x22cb49,_0x329fdf]=useState(''),_0x53d46f=useCallback(()=>{_0x375213(_0x5da6bb=>_0x5da6bb>0x0?_0x5da6bb-0x1:_0x295e10['length']-0x1);},[_0x295e10[_0xb27bb6(0x18e)]]),_0x1219f5=useCallback(()=>{const _0x3d9927=_0xb27bb6;_0x375213(_0x5727c7=>_0x5727c7<_0x295e10[_0x3d9927(0x18e)]-0x1?_0x5727c7+0x1:0x0);},[_0x295e10[_0xb27bb6(0x18e)]]),_0x4ba36b=useCallback(()=>{if(!multiSelect){_0x20e7be(new Set([_0x141619]));return;}_0x20e7be(_0x4356ec=>{const _0x501193=a121_0x3c13,_0x46ab24=new Set(_0x4356ec);return _0x46ab24[_0x501193(0x197)](_0x141619)?_0x46ab24[_0x501193(0x18c)](_0x141619):_0x46ab24[_0x501193(0x188)](_0x141619),_0x46ab24;});},[_0x141619,multiSelect]),_0x4d0bf8=useCallback(()=>{const _0x22501e=_0xb27bb6;_0x20e7be(new Set(_0x295e10[_0x22501e(0x193)]((_0x4f51cc,_0x422944)=>_0x422944)));},[_0x295e10]),_0x2bb46e=useCallback(()=>{_0x20e7be(_0x597e88=>{const _0x443ac4=a121_0x3c13,_0x2467ee=new Set();for(let _0x31904b=0x0;_0x31904b<_0x295e10[_0x443ac4(0x18e)];_0x31904b++){!_0x597e88[_0x443ac4(0x197)](_0x31904b)&&_0x2467ee['add'](_0x31904b);}return _0x2467ee;});},[_0x295e10]),_0x55d7b1=useCallback(()=>{const _0x38963a=_0xb27bb6;return Array['from'](_0x55fc0e)['map'](_0x1e7214=>_0x295e10[_0x1e7214]?.[_0x38963a(0x19a)])[_0x38963a(0x19d)](_0x3dde95=>_0x3dde95!==undefined);},[_0x55fc0e,_0x295e10]),_0x3e27f5=useCallback(()=>{const _0x27706b=_0xb27bb6;return _0x55fc0e[_0x27706b(0x198)]===_0x295e10[_0x27706b(0x18e)];},[_0x55fc0e,_0x295e10]),_0x1ea34b=useCallback((_0x24e364,_0x7703ec)=>{const _0xa0d775=_0xb27bb6;if(_0x7703ec[_0xa0d775(0x18f)])return _0x53d46f(),!![];if(_0x7703ec[_0xa0d775(0x191)])return _0x1219f5(),!![];if(_0x24e364==='\x20')return _0x4ba36b(),!![];if(_0x24e364==='a'||_0x24e364==='A')return _0x4d0bf8(),!![];if(_0x24e364==='i'||_0x24e364==='I'||_0x24e364==='r'||_0x24e364==='R')return _0x2bb46e(),!![];return![];},[_0x53d46f,_0x1219f5,_0x4ba36b,_0x4d0bf8,_0x2bb46e]);return{'selectedIndexes':_0x55fc0e,'highlightIndex':_0x141619,'errorMsg':_0x22cb49,'setErrorMsg':_0x329fdf,'handleKeyDown':_0x1ea34b,'getSelectedIDEs':_0x55d7b1,'isAllSelected':_0x3e27f5,'toggleSelection':_0x4ba36b,'selectAll':_0x4d0bf8,'invertSelection':_0x2bb46e,'moveHighlightUp':_0x53d46f,'moveHighlightDown':_0x1219f5};}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a122_0x13ee0f=a122_0x2e28;(function(_0x2fb530,_0x883885){const _0xb7c462=a122_0x2e28,_0xd40f55=_0x2fb530();while(!![]){try{const _0x181314=-parseInt(_0xb7c462(0x1ea))/0x1*(parseInt(_0xb7c462(0x1e3))/0x2)+parseInt(_0xb7c462(0x1d2))/0x3+parseInt(_0xb7c462(0x1e7))/0x4*(-parseInt(_0xb7c462(0x1c1))/0x5)+-parseInt(_0xb7c462(0x1c6))/0x6+parseInt(_0xb7c462(0x1c0))/0x7*(parseInt(_0xb7c462(0x1e4))/0x8)+-parseInt(_0xb7c462(0x1f2))/0x9*(-parseInt(_0xb7c462(0x1eb))/0xa)+parseInt(_0xb7c462(0x1d1))/0xb;if(_0x181314===_0x883885)break;else _0xd40f55['push'](_0xd40f55['shift']());}catch(_0x5b5a98){_0xd40f55['push'](_0xd40f55['shift']());}}}(a122_0x39a2,0xbb8de));export const CORE_IDE_CONFIGS={'cursor':{'name':a122_0x13ee0f(0x1c8),'description':a122_0x13ee0f(0x1dd),'folders':[a122_0x13ee0f(0x1e9),'.cursor'],'files':[{'type':a122_0x13ee0f(0x1ce),'path':'.cursor/skills/rabetbase.md','template':a122_0x13ee0f(0x1c4)}]},'windsurf':{'name':a122_0x13ee0f(0x1d4),'description':'Windsurf\x20IDE','folders':[a122_0x13ee0f(0x1c5)],'files':[{'type':'file','path':a122_0x13ee0f(0x1ca),'template':a122_0x13ee0f(0x1c4)}]},'claude':{'name':a122_0x13ee0f(0x1de),'description':'Claude\x20Code','folders':['.claude'],'files':[{'type':a122_0x13ee0f(0x1ce),'path':a122_0x13ee0f(0x1cb),'template':'SKILL.md.tpl'}]},'cline':{'name':a122_0x13ee0f(0x1d8),'description':a122_0x13ee0f(0x1dc),'folders':[a122_0x13ee0f(0x1ec)],'files':[{'type':a122_0x13ee0f(0x1ce),'path':'.cline/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]},'codex':{'name':a122_0x13ee0f(0x1ee),'description':a122_0x13ee0f(0x1e2),'folders':[a122_0x13ee0f(0x1e0)],'files':[{'type':'file','path':a122_0x13ee0f(0x1e6),'template':a122_0x13ee0f(0x1c4)}]},'opencode':{'name':a122_0x13ee0f(0x1f5),'description':'OpenCode\x20IDE','folders':[a122_0x13ee0f(0x1d0)],'files':[{'type':'file','path':a122_0x13ee0f(0x1c2),'template':a122_0x13ee0f(0x1c4)}]},'qoder':{'name':a122_0x13ee0f(0x1c9),'description':a122_0x13ee0f(0x1f1),'folders':['.qoder'],'files':[{'type':'file','path':a122_0x13ee0f(0x1e1),'template':a122_0x13ee0f(0x1c4)},{'type':a122_0x13ee0f(0x1ce),'path':'.qoder/skills/lovrabet/SKILL.md','template':a122_0x13ee0f(0x1c4)}]},'codebuddy':{'name':'CodeBuddy','description':a122_0x13ee0f(0x1df),'folders':['.codebuddy'],'files':[{'type':a122_0x13ee0f(0x1ce),'path':a122_0x13ee0f(0x1bf),'template':a122_0x13ee0f(0x1c4)}]},'trae':{'name':a122_0x13ee0f(0x1d6),'description':a122_0x13ee0f(0x1d9),'folders':[a122_0x13ee0f(0x1cd)],'files':[{'type':a122_0x13ee0f(0x1ce),'path':'.trae/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]}};function a122_0x39a2(){const _0x5ecbe3=['CodeBuddy\x20IDE','.codex','.qoder/rules/rabetbase.md','Codex\x20IDE','1526GQQDbz','8mFzLOv','.agent','.codex/skills/lovrabet/SKILL.md','1688FszMAM','cursor','.cursorrules','280fLNipC','50PLFltr','.cline','.agent/skills/lovrabet/SKILL.md','Codex','windsurf','codebuddy','Qoder\x20IDE','2372355JUUYer','claude','cline','OpenCode','.codebuddy/skills/lovrabet/SKILL.md','1202369SLjAZV','16420cGckKO','.opencode/skills/lovrabet/SKILL.md','codex','SKILL.md.tpl','.windsurf','2126250IcsvBk','Antigravity','Cursor','Qoder','.windsurf/workflows/rabetbase.md','.claude/skills/lovrabet/SKILL.md','agent','.trae','file','trae','.opencode','5955136MVTzFp','2072901tQGkOk','antigravity','Windsurf','opencode','Trae','qoder','Cline','Trae\x20IDE','其他\x20(通用模板)','Antigravity\x20IDE','Cline\x20IDE','Cursor\x20IDE','Claude\x20Code'];a122_0x39a2=function(){return _0x5ecbe3;};return a122_0x39a2();}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a122_0x13ee0f(0x1da),'description':'通用模板\x20-\x20兜底方案','folders':['.agent'],'files':[{'type':a122_0x13ee0f(0x1ce),'path':a122_0x13ee0f(0x1ed),'template':a122_0x13ee0f(0x1c4)}]},'antigravity':{'name':a122_0x13ee0f(0x1c7),'description':a122_0x13ee0f(0x1db),'folders':[a122_0x13ee0f(0x1e5)],'files':[{'type':a122_0x13ee0f(0x1ce),'path':'.agent/skills/lovrabet/SKILL.md','template':a122_0x13ee0f(0x1c4)}]}};export const CORE_IDE_LIST=[a122_0x13ee0f(0x1f3),'cline',a122_0x13ee0f(0x1f0),a122_0x13ee0f(0x1c3),'cursor','opencode',a122_0x13ee0f(0x1d7),'trae',a122_0x13ee0f(0x1ef)];export const IDE_LIST=[a122_0x13ee0f(0x1d3),a122_0x13ee0f(0x1f3),a122_0x13ee0f(0x1f4),a122_0x13ee0f(0x1f0),a122_0x13ee0f(0x1c3),'cursor',a122_0x13ee0f(0x1d5),a122_0x13ee0f(0x1d7),a122_0x13ee0f(0x1cf),a122_0x13ee0f(0x1ef),a122_0x13ee0f(0x1cc)];function a122_0x2e28(_0x562200,_0x576c7e){_0x562200=_0x562200-0x1bf;const _0x39a2c3=a122_0x39a2();let _0x2e2820=_0x39a2c3[_0x562200];return _0x2e2820;}export const ALL_CORE_IDES=['cursor',a122_0x13ee0f(0x1ef),a122_0x13ee0f(0x1f3),'cline',a122_0x13ee0f(0x1c3),a122_0x13ee0f(0x1d5),a122_0x13ee0f(0x1d7),'codebuddy',a122_0x13ee0f(0x1cf)];export const MCP_IDES=new Set([a122_0x13ee0f(0x1e8),a122_0x13ee0f(0x1f3)]);
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x40ccbd,_0x3aa8f5){const _0x1b8803=a123_0x467f,_0x1fc4a5=_0x40ccbd();while(!![]){try{const _0x37c4b7=-parseInt(_0x1b8803(0xa0))/0x1+-parseInt(_0x1b8803(0x9d))/0x2+-parseInt(_0x1b8803(0x97))/0x3+-parseInt(_0x1b8803(0x94))/0x4+parseInt(_0x1b8803(0xa1))/0x5*(-parseInt(_0x1b8803(0x9f))/0x6)+-parseInt(_0x1b8803(0x95))/0x7*(-parseInt(_0x1b8803(0x99))/0x8)+parseInt(_0x1b8803(0x9b))/0x9;if(_0x37c4b7===_0x3aa8f5)break;else _0x1fc4a5['push'](_0x1fc4a5['shift']());}catch(_0x6f2042){_0x1fc4a5['push'](_0x1fc4a5['shift']());}}}(a123_0x3ff8,0xddddc));import{getTemplateBaseUrl}from'./config.js';export async function fetchCdnConfig(){const _0x2e1263=a123_0x467f;try{const _0x2a857d=getTemplateBaseUrl(),_0x3cc475=_0x2a857d+'/config.json',_0x3d1fd4=await fetch(_0x3cc475,{'headers':{'Accept':'application/json'}});if(!_0x3d1fd4['ok'])return null;const _0x3bcf2d=await _0x3d1fd4[_0x2e1263(0x9e)]();if(!_0x3bcf2d[_0x2e1263(0x96)]?.['stableVersion']||!_0x3bcf2d['sdk']?.[_0x2e1263(0x9c)]?.[_0x2e1263(0x9a)])return null;return _0x3bcf2d;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;function a123_0x467f(_0x1da21a,_0x36d371){_0x1da21a=_0x1da21a-0x94;const _0x3ff8c7=a123_0x3ff8();let _0x467f27=_0x3ff8c7[_0x1da21a];return _0x467f27;}const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0x5c96a9=a123_0x467f,_0x2ca9b8=Date[_0x5c96a9(0x98)]();if(cachedConfig&&_0x2ca9b8-cacheTime<CACHE_TTL)return cachedConfig;const _0x386db0=await fetchCdnConfig();return _0x386db0&&(cachedConfig=_0x386db0,cacheTime=_0x2ca9b8),_0x386db0;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}function a123_0x3ff8(){const _0x5209ae=['27149724DsKrKo','node','1631710jRgROx','json','7826022GCIHHS','5722FcwmYv','5hoNBhe','1381144jabYLT','21grkZod','cli','3934743XkOnsq','now','4466424KBWFsS','stableVersion'];a123_0x3ff8=function(){return _0x5209ae;};return a123_0x3ff8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a124_0x2b468d=a124_0x5d7c;(function(_0x13f9d9,_0x51938b){const _0x5bc95f=a124_0x5d7c,_0x331626=_0x13f9d9();while(!![]){try{const _0x2a47df=-parseInt(_0x5bc95f(0xb2))/0x1*(parseInt(_0x5bc95f(0xc7))/0x2)+parseInt(_0x5bc95f(0xc2))/0x3+parseInt(_0x5bc95f(0xae))/0x4+-parseInt(_0x5bc95f(0xb1))/0x5+parseInt(_0x5bc95f(0xb3))/0x6+parseInt(_0x5bc95f(0xbf))/0x7*(-parseInt(_0x5bc95f(0xb0))/0x8)+parseInt(_0x5bc95f(0xa9))/0x9*(parseInt(_0x5bc95f(0xa7))/0xa);if(_0x2a47df===_0x51938b)break;else _0x331626['push'](_0x331626['shift']());}catch(_0x2dc79a){_0x331626['push'](_0x331626['shift']());}}}(a124_0x3086,0xea9ce));import a124_0x29ce16 from'node:fs';import a124_0x4572fb from'node:path';import a124_0x32ced0 from'semver';import{getCdnConfig}from'./cdn-config.js';function a124_0x3086(){const _0x1248c5=['stableVersion','2653809uQcXGV','package.json','1.2.0','packageName','\x20\x20\x20Upgrade\x20command:\x20','3204858NvVkrr','@lovrabet/sdk','dependencies','utf8','\x20\x20\x20Stable\x20version:\x20','existsSync','version','\x1b[1m','log','14707430xFuVQv','minVersion','9gVCMMS','node','all','node_modules','utf-8','7488180kkkpHh','readFileSync','2711320budIFH','8829180gRRcrq','1kqOWhv','2644578mrTzfB','needsUpgrade','\x1b[33m','coerce','some','sdk','join','\x1b[0m','parse','latest','↪\x20SDK\x20update\x20available','test','7rvEyZH','npm\x20install\x20'];a124_0x3086=function(){return _0x1248c5;};return a124_0x3086();}const FALLBACK_MIN_SDK_VERSION=a124_0x2b468d(0xc4);function a124_0x5d7c(_0x5687bb,_0x479f4c){_0x5687bb=_0x5687bb-0xa2;const _0x308646=a124_0x3086();let _0x5d7c32=_0x308646[_0x5687bb];return _0x5d7c32;}function isNonNumericVersion(_0x4523f8){const _0x16feda=a124_0x2b468d,_0x519712=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x519712[_0x16feda(0xb7)](_0x1bb5e1=>_0x1bb5e1[_0x16feda(0xbe)](_0x4523f8));}function getInstalledVersion(_0xeadd20,_0x29b7d9){const _0x5ad3e3=a124_0x2b468d;try{const _0x1defeb=a124_0x4572fb[_0x5ad3e3(0xb9)](_0xeadd20,_0x5ad3e3(0xac),_0x29b7d9,_0x5ad3e3(0xc3));if(a124_0x29ce16[_0x5ad3e3(0xa3)](_0x1defeb)){const _0x24ea4a=JSON[_0x5ad3e3(0xbb)](a124_0x29ce16[_0x5ad3e3(0xaf)](_0x1defeb,_0x5ad3e3(0xad)));return _0x24ea4a['version']||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x5acc84=a124_0x2b468d;try{const _0x266e1a=await getCdnConfig();return _0x266e1a?.['sdk']?.[_0x5acc84(0xaa)]?.[_0x5acc84(0xc1)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x305864=a124_0x2b468d;try{const _0x1e159c=await getCdnConfig();return _0x1e159c?.[_0x305864(0xb8)]?.[_0x305864(0xaa)]?.['packageName']||_0x305864(0xc8);}catch{return'@lovrabet/sdk';}}export async function checkSdkVersion(_0x15d2cf){const _0x83fe14=a124_0x2b468d,_0x101d72=a124_0x4572fb['join'](_0x15d2cf,_0x83fe14(0xc3)),[_0x271345,_0x548320]=await Promise[_0x83fe14(0xab)]([getSdkStableVersion(),getSdkPackageName()]),_0x5c4c47=_0x271345||FALLBACK_MIN_SDK_VERSION;if(!a124_0x29ce16[_0x83fe14(0xa3)](_0x101d72))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5c4c47,'packageName':_0x548320,'stableVersion':_0x271345};try{const _0x5283ba=JSON[_0x83fe14(0xbb)](a124_0x29ce16[_0x83fe14(0xaf)](_0x101d72,'utf8')),_0x23649e=_0x5283ba[_0x83fe14(0xc9)]||{},_0x196d3c=_0x5283ba['devDependencies']||{},_0x5aee66=_0x23649e[_0x548320]||_0x196d3c[_0x548320];if(!_0x5aee66)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5c4c47,'packageName':_0x548320,'stableVersion':_0x271345};let _0xefbef4=getInstalledVersion(_0x15d2cf,_0x548320);!_0xefbef4&&(_0xefbef4=_0x5aee66);if(isNonNumericVersion(_0x5aee66))return{'installed':!![],'version':_0xefbef4,'needsUpgrade':![],'minVersion':_0x5c4c47,'packageName':_0x548320,'stableVersion':_0x271345};const _0x19b3ab=a124_0x32ced0[_0x83fe14(0xb6)](_0xefbef4),_0x49a3e2=a124_0x32ced0[_0x83fe14(0xb6)](_0x5c4c47),_0x195146=_0x19b3ab&&_0x49a3e2?a124_0x32ced0['lt'](_0x19b3ab,_0x49a3e2):![];return{'installed':!![],'version':_0xefbef4,'needsUpgrade':_0x195146,'minVersion':_0x5c4c47,'packageName':_0x548320,'stableVersion':_0x271345};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x5c4c47,'packageName':_0x548320,'stableVersion':_0x271345};}}export function checkSdkVersionSync(_0x109c5b){const _0x220836=a124_0x2b468d,_0x3b218e=a124_0x4572fb['join'](_0x109c5b,_0x220836(0xc3)),_0x4642d5=_0x220836(0xc8);if(!a124_0x29ce16['existsSync'](_0x3b218e))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4642d5,'stableVersion':null};try{const _0x24d3bf=JSON[_0x220836(0xbb)](a124_0x29ce16[_0x220836(0xaf)](_0x3b218e,_0x220836(0xca))),_0x460d96=_0x24d3bf[_0x220836(0xc9)]||{},_0x360bda=_0x24d3bf['devDependencies']||{},_0x10d47a=_0x460d96[_0x4642d5]||_0x360bda[_0x4642d5];if(!_0x10d47a)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4642d5,'stableVersion':null};let _0x3edfcc=getInstalledVersion(_0x109c5b,_0x4642d5);!_0x3edfcc&&(_0x3edfcc=_0x10d47a);if(isNonNumericVersion(_0x10d47a))return{'installed':!![],'version':_0x3edfcc,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4642d5,'stableVersion':null};const _0x2ecd55=a124_0x32ced0[_0x220836(0xb6)](_0x3edfcc),_0x5c1c73=_0x2ecd55?a124_0x32ced0['lt'](_0x2ecd55,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x3edfcc,'needsUpgrade':_0x5c1c73,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4642d5,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x4642d5,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x5e9a72){const _0x3211c5=a124_0x2b468d;if(!_0x5e9a72[_0x3211c5(0xb4)])return;const _0x13d776=_0x3211c5(0xb5),_0x977de1=_0x3211c5(0xba),_0x43820f=_0x3211c5(0xa5),_0x5b2097=_0x5e9a72[_0x3211c5(0xc5)]||_0x3211c5(0xc8),_0x3fd1fc=_0x5e9a72['stableVersion']||_0x5e9a72[_0x3211c5(0xa8)],_0x14fe04=_0x3211c5(0xc0)+_0x5b2097+'@'+(_0x3fd1fc||_0x3211c5(0xbc));console['log'](),console['log'](''+_0x13d776+_0x43820f+_0x3211c5(0xbd)+_0x977de1),console[_0x3211c5(0xa6)](_0x13d776+'\x20\x20\x20Current\x20version:\x20'+_0x5b2097+'@'+_0x5e9a72[_0x3211c5(0xa4)]+_0x977de1),console[_0x3211c5(0xa6)](_0x13d776+_0x3211c5(0xa2)+_0x3fd1fc+_0x977de1),console[_0x3211c5(0xa6)](_0x13d776+_0x3211c5(0xc6)+_0x14fe04+_0x977de1),console[_0x3211c5(0xa6)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4297b8,_0x31d3d4){const _0x332fad=a125_0x4074,_0x3d2a45=_0x4297b8();while(!![]){try{const _0x286635=-parseInt(_0x332fad(0xa4))/0x1+-parseInt(_0x332fad(0x8e))/0x2*(-parseInt(_0x332fad(0x91))/0x3)+-parseInt(_0x332fad(0x9b))/0x4+-parseInt(_0x332fad(0x8f))/0x5+-parseInt(_0x332fad(0x9c))/0x6*(parseInt(_0x332fad(0xa7))/0x7)+-parseInt(_0x332fad(0x96))/0x8+parseInt(_0x332fad(0x9f))/0x9;if(_0x286635===_0x31d3d4)break;else _0x3d2a45['push'](_0x3d2a45['shift']());}catch(_0x5c56ba){_0x3d2a45['push'](_0x3d2a45['shift']());}}}(a125_0xf207,0xd8387));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a125_0x345b13 from'semver';function a125_0xf207(){const _0x55103a=['\x20\x20\x20Stable\x20version:\x20','npm\x20install\x20-g\x20','1427990LGvzdO','../..','\x1b[0m','999852kVJXfn','↪\x20New\x20version\x20available','1.0.0','7354LoTqFT','699965rxLwkR','needsUpgrade','957qcFaRC','log','utf-8','stableVersion','\x1b[33m','11639400CDcRfh','coerce','version','\x1b[1m','package.json','5387868WsRpCs','54OGFGEp','\x20\x20\x20Upgrade\x20command:\x20','some','48312675mTWAdD','parse','currentVersion'];a125_0xf207=function(){return _0x55103a;};return a125_0xf207();}function a125_0x4074(_0xa00155,_0x2b2077){_0xa00155=_0xa00155-0x8d;const _0xf2077f=a125_0xf207();let _0x407420=_0xf2077f[_0xa00155];return _0x407420;}import{getCdnConfig}from'./cdn-config.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function getCurrentCliVersion(){const _0x3892eb=a125_0x4074;try{const _0x19df54=fileURLToPath(import.meta.url),_0x3420b2=resolve(dirname(_0x19df54),_0x3892eb(0xa5)),_0x1943ad=resolve(_0x3420b2,_0x3892eb(0x9a)),_0x4c7b39=JSON[_0x3892eb(0xa0)](readFileSync(_0x1943ad,_0x3892eb(0x93)));return _0x4c7b39[_0x3892eb(0x98)]||_0x3892eb(0x8d);}catch{return _0x3892eb(0x8d);}}function isNonNumericVersion(_0xab5611){const _0x855b42=a125_0x4074,_0x16cd66=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x16cd66[_0x855b42(0x9e)](_0x199198=>_0x199198['test'](_0xab5611));}export async function checkCliVersion(){const _0x13f4ec=a125_0x4074,_0x549689=getCurrentCliVersion(),_0x5d73f3=await getCdnConfig(),_0x75500e=_0x5d73f3?.['cli']?.[_0x13f4ec(0x94)]||null;let _0x449475=![];if(_0x75500e)try{const _0x5b5825=a125_0x345b13['coerce'](_0x549689),_0x5a5711=a125_0x345b13[_0x13f4ec(0x97)](_0x75500e);_0x5b5825&&_0x5a5711&&(_0x449475=a125_0x345b13['lt'](_0x5b5825,_0x5a5711));}catch{_0x449475=![];}return{'currentVersion':_0x549689,'stableVersion':_0x75500e,'needsUpgrade':_0x449475,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x5e3fe1){const _0x4ac528=a125_0x4074;if(!_0x5e3fe1[_0x4ac528(0x90)])return;const _0x32a13c=_0x4ac528(0x95),_0x2401a1=_0x4ac528(0xa6),_0x25ecec=_0x4ac528(0x99),_0x365b2e=_0x4ac528(0xa3)+NPM_PACKAGE_NAME+'@latest';console['log'](),console['log'](''+_0x32a13c+_0x25ecec+_0x4ac528(0xa8)+_0x2401a1),console['log'](_0x32a13c+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x5e3fe1[_0x4ac528(0xa1)]+_0x2401a1),console['log'](_0x32a13c+_0x4ac528(0xa2)+_0x5e3fe1[_0x4ac528(0x94)]+_0x2401a1),console[_0x4ac528(0x92)](_0x32a13c+_0x4ac528(0x9d)+_0x365b2e+_0x2401a1),console[_0x4ac528(0x92)]();}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29b207,_0xa17948){const _0x5f4061=a126_0x100d,_0x410c3b=_0x29b207();while(!![]){try{const _0x1d5fe7=-parseInt(_0x5f4061(0xfa))/0x1*(parseInt(_0x5f4061(0xf7))/0x2)+-parseInt(_0x5f4061(0xe5))/0x3+parseInt(_0x5f4061(0xee))/0x4*(parseInt(_0x5f4061(0xe6))/0x5)+-parseInt(_0x5f4061(0xf9))/0x6+-parseInt(_0x5f4061(0xe4))/0x7+parseInt(_0x5f4061(0xf0))/0x8+-parseInt(_0x5f4061(0xf2))/0x9*(-parseInt(_0x5f4061(0xf5))/0xa);if(_0x1d5fe7===_0xa17948)break;else _0x410c3b['push'](_0x410c3b['shift']());}catch(_0xeda62e){_0x410c3b['push'](_0x410c3b['shift']());}}}(a126_0x5f72,0xca5fe));import{initEnv}from'../constant/env.js';import{readRawConfig}from'../context.js';function a126_0x5f72(){const _0x412040=['app','50xmthyg','values','20qJQLFU','object','7710138ARLqGg','111347RYuEzs','length','apiDir','6133890PIIosy','3512517aQFdeh','12505TbMAok','template_base_url','filter','https://g.lovrabet.com/dist/lovrabet-skill','env','appcode','entries','apps','1604qBpMaM','string','9199016XcgmOI','map','5619150CDdhMi','trim'];a126_0x5f72=function(){return _0x412040;};return a126_0x5f72();}export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x297642){const _0x20f8d1=a126_0x100d,_0xd8c1bf=readRawConfig(_0x297642);return _0xd8c1bf[_0x20f8d1(0xea)]&&typeof _0xd8c1bf['env']===_0x20f8d1(0xef)&&initEnv(_0xd8c1bf[_0x20f8d1(0xea)]),_0xd8c1bf;}export function getConfigAppCode(){const _0x50262a=a126_0x100d,_0x88e7b3=readRawConfig();if(_0x88e7b3[_0x50262a(0xed)]&&typeof _0x88e7b3[_0x50262a(0xed)]===_0x50262a(0xf8)){const _0x1ce241=_0x88e7b3['defaultApp'];if(_0x1ce241&&_0x88e7b3['apps'][_0x1ce241]?.[_0x50262a(0xeb)])return String(_0x88e7b3[_0x50262a(0xed)][_0x1ce241][_0x50262a(0xeb)])['trim']();const _0x5ba719=Object[_0x50262a(0xf6)](_0x88e7b3[_0x50262a(0xed)])[0x0];if(_0x5ba719?.['appcode'])return String(_0x5ba719['appcode'])['trim']();}const _0x4c0bdf=_0x88e7b3[_0x50262a(0xeb)]||_0x88e7b3[_0x50262a(0xf4)];if(typeof _0x4c0bdf!=='string'||_0x4c0bdf[_0x50262a(0xf3)]()==='')return undefined;return _0x4c0bdf['trim']();}export function getMultiAppConfigs(){const _0x35abf4=a126_0x100d,_0x94b300=readRawConfig(),_0x5d798a=_0x94b300['apps'];if(!_0x5d798a||typeof _0x5d798a!==_0x35abf4(0xf8)||Object['keys'](_0x5d798a)[_0x35abf4(0xe2)]===0x0)return null;const _0x46c2d6=_0x94b300['defaultApp'];return Object[_0x35abf4(0xec)](_0x5d798a)[_0x35abf4(0xf1)](([_0x39af97,_0xe31e13])=>({'name':_0x39af97,'appcode':_0xe31e13?.[_0x35abf4(0xeb)]||'','isDefault':_0x39af97===_0x46c2d6,'env':_0xe31e13?.[_0x35abf4(0xea)],'apiDir':_0xe31e13?.[_0x35abf4(0xe3)],'cookie':_0xe31e13?.['cookie']||undefined}))[_0x35abf4(0xe8)](_0x5042f2=>_0x5042f2[_0x35abf4(0xeb)]);}function a126_0x100d(_0x518803,_0x5bde86){_0x518803=_0x518803-0xe2;const _0x5f72a3=a126_0x5f72();let _0x100db0=_0x5f72a3[_0x518803];return _0x100db0;}export function getTemplateBaseUrl(){const _0x21ff96=a126_0x100d,_0x4207b0=readRawConfig();if(_0x4207b0[_0x21ff96(0xe7)]&&typeof _0x4207b0[_0x21ff96(0xe7)]===_0x21ff96(0xef))return _0x4207b0[_0x21ff96(0xe7)]['replace'](/\/$/,'');return _0x21ff96(0xe9);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a127_0x4f13(){const _0x3d2d3a=['name','170MbaRBg','1579430ADVUFC','488QpRwlB','2679084fEVlfN','error','复制目录时出错:','60963iABdSC','3537855yJpzBy','78TGBoli','isDirectory','readdirSync','749001rPKFnZ','380945FrwHIq','copyFileSync','34924PjcyNY','2HSlChP'];a127_0x4f13=function(){return _0x3d2d3a;};return a127_0x4f13();}(function(_0x1dc965,_0x39cf61){const _0x303731=a127_0x3af8,_0x29341c=_0x1dc965();while(!![]){try{const _0x5cf1a0=-parseInt(_0x303731(0x15f))/0x1*(parseInt(_0x303731(0x162))/0x2)+-parseInt(_0x303731(0x15b))/0x3*(parseInt(_0x303731(0x161))/0x4)+parseInt(_0x303731(0x165))/0x5+-parseInt(_0x303731(0x167))/0x6+-parseInt(_0x303731(0x16a))/0x7*(parseInt(_0x303731(0x166))/0x8)+parseInt(_0x303731(0x15a))/0x9+-parseInt(_0x303731(0x164))/0xa*(-parseInt(_0x303731(0x15e))/0xb);if(_0x5cf1a0===_0x39cf61)break;else _0x29341c['push'](_0x29341c['shift']());}catch(_0x66c7c4){_0x29341c['push'](_0x29341c['shift']());}}}(a127_0x4f13,0x448ee));import a127_0x15a597 from'node:path';function a127_0x3af8(_0x2234bc,_0x3bd339){_0x2234bc=_0x2234bc-0x15a;const _0x4f138e=a127_0x4f13();let _0x3af83e=_0x4f138e[_0x2234bc];return _0x3af83e;}import a127_0x490365 from'node:fs';export async function copyDirectory(_0x2a4afc,_0x233f50){const _0x7ab70e=a127_0x3af8;try{const _0x38edd2=a127_0x490365[_0x7ab70e(0x15d)](_0x2a4afc,{'withFileTypes':!![]});a127_0x490365['mkdirSync'](_0x233f50,{'recursive':!![]});for(const _0x36f7cc of _0x38edd2){const _0x26efad=a127_0x15a597['join'](_0x2a4afc,_0x36f7cc['name']),_0x5bf610=a127_0x15a597['join'](_0x233f50,_0x36f7cc[_0x7ab70e(0x163)]);_0x36f7cc[_0x7ab70e(0x15c)]()?await copyDirectory(_0x26efad,_0x5bf610):a127_0x490365[_0x7ab70e(0x160)](_0x26efad,_0x5bf610);}}catch(_0x254123){console[_0x7ab70e(0x168)](_0x7ab70e(0x169),_0x254123);}}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x23c626,_0x3722f5){const _0x1b506b=a128_0x55d3,_0x4b5be1=_0x23c626();while(!![]){try{const _0x5b7d41=parseInt(_0x1b506b(0xcf))/0x1*(parseInt(_0x1b506b(0xcd))/0x2)+parseInt(_0x1b506b(0xc9))/0x3*(-parseInt(_0x1b506b(0xcb))/0x4)+parseInt(_0x1b506b(0xd2))/0x5+-parseInt(_0x1b506b(0xd4))/0x6*(parseInt(_0x1b506b(0xca))/0x7)+-parseInt(_0x1b506b(0xce))/0x8*(parseInt(_0x1b506b(0xd1))/0x9)+parseInt(_0x1b506b(0xd0))/0xa*(-parseInt(_0x1b506b(0xcc))/0xb)+-parseInt(_0x1b506b(0xd3))/0xc*(-parseInt(_0x1b506b(0xd5))/0xd);if(_0x5b7d41===_0x3722f5)break;else _0x4b5be1['push'](_0x4b5be1['shift']());}catch(_0x5baf52){_0x4b5be1['push'](_0x4b5be1['shift']());}}}(a128_0x2cc9,0xe6357));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x3449b5,_0x85952b){const _0x1029db=a128_0x55d3,_0x3f7349=statSync(_0x3449b5);if(_0x3f7349[_0x1029db(0xc8)]()){!existsSync(_0x85952b)&&mkdirSync(_0x85952b,{'recursive':!![]});const _0x111fcb=readdirSync(_0x3449b5);for(const _0xcb6b99 of _0x111fcb){await copyDir(join(_0x3449b5,_0xcb6b99),join(_0x85952b,_0xcb6b99));}}else copyFileSync(_0x3449b5,_0x85952b);}function a128_0x2cc9(){const _0x545256=['3GnKWHy','343LPPSbM','5746980JeuJXY','858TagYhl','10iXhjzs','227960YHcPZJ','265513cZAfLv','69700Uvijip','477pxYqGO','5452165cMJtdp','12KwnTbu','46164eCGiNq','31103579MYTiBe','isDirectory'];a128_0x2cc9=function(){return _0x545256;};return a128_0x2cc9();}export function ensureDir(_0x5cffe4){!existsSync(_0x5cffe4)&&mkdirSync(_0x5cffe4,{'recursive':!![]});}function a128_0x55d3(_0xec0b5f,_0x37fcb2){_0xec0b5f=_0xec0b5f-0xc8;const _0x2cc999=a128_0x2cc9();let _0x55d3c2=_0x2cc999[_0xec0b5f];return _0x55d3c2;}export function pathExists(_0x18668a){return existsSync(_0x18668a);}
|