@lovrabet/rabetbase-cli 2.0.2-beta.2 → 2.0.2-beta.3
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/api/pull-silent.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/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 -0
- package/lib/commands/api/index.js +1 -0
- package/lib/commands/api/list.js +1 -0
- package/lib/commands/api/pull.js +1 -0
- 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/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 -0
- 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/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 -0
- package/lib/commands/menu/shared/compare-table.js +1 -0
- package/lib/commands/menu/shared/index.js +1 -0
- package/lib/commands/menu/shared/inquirer.js +1 -0
- package/lib/commands/menu/shared/local-pages.js +1 -0
- package/lib/commands/menu/shared/logic.js +1 -0
- package/lib/commands/menu/shared/service.js +1 -0
- package/lib/commands/menu/shared/sync-core.js +1 -0
- package/lib/commands/menu/shared/update-core.js +1 -0
- package/lib/commands/menu/shared/valid-url.js +1 -0
- package/lib/commands/menu/sync.js +1 -0
- package/lib/commands/menu/update.js +1 -0
- package/lib/commands/preview.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/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 +5 -2
- package/templates/generate-api/api.ts.tpl +4 -4
- package/templates/generate-api/client.ts.tpl +2 -2
- package/lib/api/api-doc-ui.js +0 -1
- package/lib/api/api-pull-ui.js +0 -1
- package/lib/api/main.js +0 -1
- package/lib/app-menu/app-menu-sync-ui.js +0 -1
- package/lib/app-menu/create-menu.js +0 -1
- package/lib/app-menu/get-local-pages.js +0 -1
- package/lib/app-menu/get-online-menu-list.js +0 -1
- package/lib/app-menu/types.js +0 -1
- package/lib/app-menu/use-get-online-menu-list.js +0 -1
- package/lib/app-menu/utils.js +0 -1
- package/lib/app-menu/valid-url.js +0 -1
- package/lib/app-menu-update-cdn/current-content.js +0 -1
- package/lib/app-menu-update-cdn/input-cdn-asset.js +0 -1
- package/lib/app-menu-update-cdn/main.js +0 -1
- package/lib/app-menu-update-cdn/update-menu-cdn-url.js +0 -1
- package/lib/commands/api.js +0 -1
- package/lib/commands/menu.js +0 -1
- /package/lib/{app-menu-update-cdn → commands/menu/shared}/types.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a93_0x5c90(_0x2e9c54,_0x3ed798){_0x2e9c54=_0x2e9c54-0x106;const _0x35340a=a93_0x3534();let _0x5c9014=_0x35340a[_0x2e9c54];return _0x5c9014;}(function(_0x27ca9a,_0x12afa3){const _0x4af685=a93_0x5c90,_0x2e7c1f=_0x27ca9a();while(!![]){try{const _0x1eac4e=-parseInt(_0x4af685(0x111))/0x1*(-parseInt(_0x4af685(0x10f))/0x2)+parseInt(_0x4af685(0x11d))/0x3*(parseInt(_0x4af685(0x113))/0x4)+parseInt(_0x4af685(0x11b))/0x5+parseInt(_0x4af685(0x10c))/0x6+-parseInt(_0x4af685(0x11c))/0x7*(parseInt(_0x4af685(0x108))/0x8)+parseInt(_0x4af685(0x10b))/0x9*(-parseInt(_0x4af685(0x112))/0xa)+-parseInt(_0x4af685(0x114))/0xb;if(_0x1eac4e===_0x12afa3)break;else _0x2e7c1f['push'](_0x2e7c1f['shift']());}catch(_0x51f7d9){_0x2e7c1f['push'](_0x2e7c1f['shift']());}}}(a93_0x3534,0x8a998));import a93_0x3136d0 from'node:path';function a93_0x3534(){const _0x35d8e4=['20VSplhr','431964tQlPZK','20971302HTOAOO','开始安装依赖','info','install','message','--registry','now','4075050RwpfoF','7dYUlPz','27lWckIV','https://registry.npmmirror.com','npm','success','1582352cEbrup','error','cwd','1484469ODqQoG','5803662iAKuzm','Install\x20dependencies','resolve','9712gKyCJA','依赖安装完成','51ibNSZD'];a93_0x3534=function(){return _0x35d8e4;};return a93_0x3534();}import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const _0x21a04c=a93_0x5c90,[_0x5bf061,_0x19471d]=useState(![]),[_0x87205,_0x201bf4]=useState(![]),[_0x255a2a,_0x1070e2]=useState(''),_0x2ce2ce=useCallback(async _0x389554=>{const _0x3c288c=a93_0x5c90,_0x5bcae0=Date[_0x3c288c(0x11a)](),_0x32d205=a93_0x3136d0[_0x3c288c(0x10e)](process[_0x3c288c(0x10a)](),_0x389554);_0x19471d(!![]),_0x201bf4(![]);const _0xec89b3=async(_0x3c5cd6,_0x49fa6f)=>{await execa(_0x3c5cd6,_0x49fa6f,{'cwd':_0x32d205});};try{logger[_0x3c288c(0x116)](_0x3c288c(0x117),_0x3c288c(0x115),{'projectCode':_0x389554,'registry':_0x3c288c(0x11e)}),await _0xec89b3(_0x3c288c(0x106),['install',_0x3c288c(0x119),'https://registry.npmmirror.com']);const _0x3c9ba1=Date[_0x3c288c(0x11a)]()-_0x5bcae0;logger[_0x3c288c(0x107)]('install',_0x3c288c(0x110),_0x3c9ba1,{'projectCode':_0x389554});}catch(_0x4a09bd){const _0x259718=Date[_0x3c288c(0x11a)]()-_0x5bcae0;logger[_0x3c288c(0x109)](_0x3c288c(0x117),'依赖安装失败',{'projectCode':_0x389554,'error':_0x4a09bd instanceof Error?_0x4a09bd[_0x3c288c(0x118)]:String(_0x4a09bd),'duration':_0x259718});throw _0x4a09bd;}finally{_0x19471d(![]),_0x201bf4(!![]),_0x1070e2(formatElapsed(_0x5bcae0));}},[]);return{'taskName':_0x21a04c(0x10d),'finished':_0x87205,'loading':_0x5bf061,'elapsed':_0x255a2a,'doTask':_0x2ce2ce};}
|
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a94_0x2c77d1=a94_0x51bb;function a94_0x51bb(_0x370556,_0x34f355){_0x370556=_0x370556-0xe1;const _0x4c4640=a94_0x4c46();let _0x51bbb1=_0x4c4640[_0x370556];return _0x51bbb1;}function a94_0x4c46(){const _0x294333=['config_missing','api_error','1891568QjBarO','9YVwRdW','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','validation_error','CliError','Unknown\x20command:\x20','flag_missing','5943858ffvmyn','60yaZmVJ','70HhMFIN','\x20project\x20directory','exitCode','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','45CdwpIV','1231520WpMeJN','code','Run\x20`','\x20--help`\x20to\x20see\x20available\x20commands.','name','Network\x20error:\x20','hint','2859109QaZBJA','Missing\x20required\x20flag:\x20--','auth_required','Not\x20in\x20a\x20','Operation\x20cancelled.','\x20init`\x20to\x20create\x20a\x20config\x20file.','6418748VMmGhP','not_in_project','Configuration\x20file\x20not\x20found','6641gHxkjk','Authentication\x20required','unknown_command','6382755dpMJya'];a94_0x4c46=function(){return _0x294333;};return a94_0x4c46();}(function(_0x223b87,_0x2d30e6){const _0x3de83b=a94_0x51bb,_0x4ff795=_0x223b87();while(!![]){try{const _0x450868=-parseInt(_0x3de83b(0xef))/0x1*(-parseInt(_0x3de83b(0xfe))/0x2)+parseInt(_0x3de83b(0xf6))/0x3*(parseInt(_0x3de83b(0xf5))/0x4)+-parseInt(_0x3de83b(0xf2))/0x5+-parseInt(_0x3de83b(0xfc))/0x6+-parseInt(_0x3de83b(0xec))/0x7+parseInt(_0x3de83b(0x103))/0x8*(parseInt(_0x3de83b(0x102))/0x9)+parseInt(_0x3de83b(0xfd))/0xa*(parseInt(_0x3de83b(0xe6))/0xb);if(_0x450868===_0x2d30e6)break;else _0x4ff795['push'](_0x4ff795['shift']());}catch(_0x3cb61c){_0x4ff795['push'](_0x4ff795['shift']());}}}(a94_0x4c46,0xc2607));import{CLI_BIN_NAME}from'./constant/cli.js';export class CliError extends Error{['code'];[a94_0x2c77d1(0x100)];[a94_0x2c77d1(0xe5)];constructor(_0x52af74,_0xcede0f,_0x857507,_0x51ead0){const _0x19a2e3=a94_0x2c77d1;super(_0x857507),this[_0x19a2e3(0xe3)]=_0x19a2e3(0xf9),this[_0x19a2e3(0x104)]=_0x52af74,this[_0x19a2e3(0x100)]=_0xcede0f,this[_0x19a2e3(0xe5)]=_0x51ead0;}}export const CliErrors={'authRequired':_0x2ede70=>new CliError(a94_0x2c77d1(0xe8),0x1,a94_0x2c77d1(0xf0),_0x2ede70??'Run\x20`'+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.'),'configMissing':_0x1ddcbf=>new CliError(a94_0x2c77d1(0xf3),0x1,a94_0x2c77d1(0xee),_0x1ddcbf??a94_0x2c77d1(0xe1)+CLI_BIN_NAME+a94_0x2c77d1(0xeb)),'notInProject':()=>new CliError(a94_0x2c77d1(0xed),0x1,a94_0x2c77d1(0xe9)+CLI_BIN_NAME+a94_0x2c77d1(0xff),a94_0x2c77d1(0x101)),'apiError':(_0x1d2317,_0x5e1e42)=>new CliError(a94_0x2c77d1(0xf4),0x2,_0x1d2317,_0x5e1e42),'networkError':_0x4ed34a=>new CliError('network_error',0x2,a94_0x2c77d1(0xe4)+_0x4ed34a,a94_0x2c77d1(0xf7)),'unknownCommand':_0x3950c7=>new CliError(a94_0x2c77d1(0xf1),0x1,a94_0x2c77d1(0xfa)+_0x3950c7,'Run\x20`'+CLI_BIN_NAME+a94_0x2c77d1(0xe2)),'flagMissing':(_0x34f857,_0x5ec61d)=>new CliError(a94_0x2c77d1(0xfb),0x1,a94_0x2c77d1(0xe7)+_0x34f857,_0x5ec61d),'validation':(_0xce4d7f,_0x3fe7ec)=>new CliError(a94_0x2c77d1(0xf8),0x1,_0xce4d7f,_0x3fe7ec),'cancelled':_0x22e06e=>new CliError('cancelled',0x0,_0x22e06e??a94_0x2c77d1(0xea),undefined)};
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a95_0x346c(){const _0x104f5a=['boolean','275RMUdND','2587130zGzLVr','\x22\x20for\x20--','true','validation',':\x20expected\x20','485124RgomjG','name','dryRun','flagMissing','required','1UXmhIL',',\x20got\x20\x22','type','format','.\x20Allowed:\x20','3054nrPsBe','length','default','18056cyCWWX','pattern','5059840ZNZAan','number','10954053PpCJzl','Invalid\x20--','8uxplxh','237ZsrRVq','\x20is\x20required\x20for\x20`','4476744LnAyxP','enum','regex','replace'];a95_0x346c=function(){return _0x104f5a;};return a95_0x346c();}(function(_0x38077a,_0x38c6fa){const _0x5d34b0=a95_0x1da2,_0x5748f5=_0x38077a();while(!![]){try{const _0x118be6=-parseInt(_0x5d34b0(0xfd))/0x1*(-parseInt(_0x5d34b0(0xf8))/0x2)+-parseInt(_0x5d34b0(0xeb))/0x3*(-parseInt(_0x5d34b0(0x105))/0x4)+parseInt(_0x5d34b0(0xf2))/0x5*(parseInt(_0x5d34b0(0x102))/0x6)+-parseInt(_0x5d34b0(0xf3))/0x7*(parseInt(_0x5d34b0(0x10b))/0x8)+parseInt(_0x5d34b0(0xed))/0x9+parseInt(_0x5d34b0(0x107))/0xa+-parseInt(_0x5d34b0(0x109))/0xb;if(_0x118be6===_0x38c6fa)break;else _0x5748f5['push'](_0x5748f5['shift']());}catch(_0x3a6b14){_0x5748f5['push'](_0x5748f5['shift']());}}}(a95_0x346c,0x40bbe));import{CliErrors}from'../errors.js';export function parseFlags(_0x2e0b68,_0x10bd6f){const _0x46ae01=a95_0x1da2,_0x2f9496={};for(const _0x527e8a of _0x2e0b68){const _0x552e38=_0x10bd6f[_0x527e8a[_0x46ae01(0xf9)]]??_0x10bd6f[toCamelCase(_0x527e8a[_0x46ae01(0xf9)])];if(_0x552e38===undefined||_0x552e38===null){_0x527e8a['default']!==undefined&&(_0x2f9496[_0x527e8a[_0x46ae01(0xf9)]]=_0x527e8a[_0x46ae01(0x104)]);continue;}_0x2f9496[_0x527e8a['name']]=coerce(_0x527e8a,_0x552e38);}for(const _0x50b688 of['dry-run',_0x46ae01(0xfa),'yes',_0x46ae01(0x100)]){const _0x29baff=_0x10bd6f[_0x50b688];if(_0x29baff!==undefined){const _0x49b007=_0x50b688==='dryRun'?'dry-run':_0x50b688;_0x2f9496[_0x49b007]=_0x29baff;}}return _0x2f9496;}function a95_0x1da2(_0x18fb92,_0x1d440d){_0x18fb92=_0x18fb92-0xeb;const _0x346c85=a95_0x346c();let _0x1da21b=_0x346c85[_0x18fb92];return _0x1da21b;}export function validateFlags(_0x1d796b,_0x32c2f7,_0xfb0ac2){const _0x547555=a95_0x1da2;for(const _0x41be11 of _0x1d796b){const _0x105b24=_0x32c2f7[_0x41be11[_0x547555(0xf9)]];if(_0x41be11[_0x547555(0xfc)]&&(_0x105b24===undefined||_0x105b24===''))throw CliErrors[_0x547555(0xfb)](_0x41be11[_0x547555(0xf9)],'--'+_0x41be11[_0x547555(0xf9)]+_0x547555(0xec)+_0xfb0ac2+'`.');if(_0x41be11[_0x547555(0xee)]&&_0x41be11['enum'][_0x547555(0x103)]>0x0&&_0x105b24!==undefined&&_0x105b24!==''){if(!_0x41be11[_0x547555(0xee)]['includes'](String(_0x105b24)))throw CliErrors[_0x547555(0xf6)]('Invalid\x20value\x20\x22'+_0x105b24+_0x547555(0xf4)+_0x41be11[_0x547555(0xf9)]+_0x547555(0x101)+_0x41be11[_0x547555(0xee)]['join'](',\x20'));}if(_0x41be11['pattern']&&_0x105b24!==undefined&&_0x105b24!==''){if(!_0x41be11['pattern'][_0x547555(0xef)]['test'](String(_0x105b24)))throw CliErrors[_0x547555(0xf6)](_0x547555(0x10a)+_0x41be11[_0x547555(0xf9)]+_0x547555(0xf7)+_0x41be11[_0x547555(0x106)]['description']+_0x547555(0xfe)+_0x105b24+'\x22.');}}}function coerce(_0x2fd3e7,_0x32d809){const _0x3ee75b=a95_0x1da2;switch(_0x2fd3e7[_0x3ee75b(0xff)]){case _0x3ee75b(0xf1):return _0x32d809===!![]||_0x32d809===_0x3ee75b(0xf5);case _0x3ee75b(0x108):{const _0x179b82=Number(_0x32d809);if(isNaN(_0x179b82))throw CliErrors[_0x3ee75b(0xf6)]('--'+_0x2fd3e7[_0x3ee75b(0xf9)]+'\x20expects\x20a\x20number,\x20got\x20\x22'+_0x32d809+'\x22');return _0x179b82;}default:return String(_0x32d809);}}function toCamelCase(_0x301a56){const _0x29102f=a95_0x1da2;return _0x301a56[_0x29102f(0xf0)](/-([a-z])/g,(_0x51bf27,_0x1e8204)=>_0x1e8204['toUpperCase']());}
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x4fc19d=a96_0x17e8;(function(_0x59b414,_0x51fdf1){const _0x4808b0=a96_0x17e8,_0x331e20=_0x59b414();while(!![]){try{const _0x97027e=parseInt(_0x4808b0(0xd0))/0x1*(-parseInt(_0x4808b0(0xde))/0x2)+parseInt(_0x4808b0(0x109))/0x3*(parseInt(_0x4808b0(0xee))/0x4)+-parseInt(_0x4808b0(0xed))/0x5*(parseInt(_0x4808b0(0xd3))/0x6)+parseInt(_0x4808b0(0xef))/0x7*(-parseInt(_0x4808b0(0x100))/0x8)+parseInt(_0x4808b0(0xf6))/0x9*(parseInt(_0x4808b0(0x108))/0xa)+-parseInt(_0x4808b0(0xf2))/0xb*(parseInt(_0x4808b0(0xe6))/0xc)+parseInt(_0x4808b0(0xce))/0xd;if(_0x97027e===_0x51fdf1)break;else _0x331e20['push'](_0x331e20['shift']());}catch(_0x5b2e6c){_0x331e20['push'](_0x331e20['shift']());}}}(a96_0x5226,0x5082f));import{serviceRegistry,getServiceEntry}from'../commands/registry.js';function a96_0x17e8(_0x17ed32,_0x532994){_0x17ed32=_0x17ed32-0xc9;const _0x52261a=a96_0x5226();let _0x17e855=_0x52261a[_0x17ed32];return _0x17e855;}import{CLI_BIN_NAME}from'../constant/cli.js';const RISK_LABELS={'read':'','write':a96_0x4fc19d(0xcd),'high-risk-write':a96_0x4fc19d(0xca)};export function generateCommandHelp(_0x407bc8){const _0x4b895c=a96_0x4fc19d,_0x2d2dc3=[],_0x5da1d9=CLI_BIN_NAME+'\x20'+_0x407bc8[_0x4b895c(0xeb)]+'\x20'+_0x407bc8['command'];_0x2d2dc3['push'](''),_0x2d2dc3[_0x4b895c(0xe2)]('\x20\x20'+_0x407bc8[_0x4b895c(0xcc)]),_0x2d2dc3[_0x4b895c(0xe2)](''),_0x2d2dc3[_0x4b895c(0xe2)](_0x4b895c(0x105)),_0x2d2dc3[_0x4b895c(0xe2)](_0x4b895c(0xd1)+_0x5da1d9+_0x4b895c(0xfc)),_0x2d2dc3[_0x4b895c(0xe2)](''),_0x2d2dc3[_0x4b895c(0xe2)]('\x20\x20RISK:\x20'+_0x407bc8['risk']);_0x407bc8[_0x4b895c(0xe8)]===_0x4b895c(0xd8)&&_0x2d2dc3[_0x4b895c(0xe2)](_0x4b895c(0xe1));_0x2d2dc3[_0x4b895c(0xe2)]('');if(_0x407bc8[_0x4b895c(0x102)]['length']>0x0||_0x407bc8[_0x4b895c(0xd5)]||_0x407bc8['hasFormat']!==![]){_0x2d2dc3[_0x4b895c(0xe2)](_0x4b895c(0x10d));const _0x2917f8=buildAllFlags(_0x407bc8),_0x4371a8=Math[_0x4b895c(0x10b)](..._0x2917f8[_0x4b895c(0xdb)](_0x4b3f6e=>formatFlagName(_0x4b3f6e)['length']));for(const _0x21381c of _0x2917f8){const _0x351266=formatFlagName(_0x21381c)[_0x4b895c(0xe0)](_0x4371a8+0x2);let _0x2f67fa=_0x21381c['description'];_0x21381c['enum']&&_0x21381c[_0x4b895c(0xcf)][_0x4b895c(0xdd)]>0x0&&(_0x2f67fa+='\x20('+_0x21381c[_0x4b895c(0xcf)][_0x4b895c(0xf9)](_0x4b895c(0xcb))+')'),_0x21381c[_0x4b895c(0x10a)]!==undefined&&_0x21381c[_0x4b895c(0x10a)]!==''&&(_0x2f67fa+=_0x4b895c(0x103)+_0x21381c[_0x4b895c(0x10a)]+']'),_0x21381c['required']&&(_0x2f67fa+=_0x4b895c(0xd7)),_0x2d2dc3[_0x4b895c(0xe2)](_0x4b895c(0xd1)+_0x351266+_0x2f67fa);}_0x2d2dc3[_0x4b895c(0xe2)]('');}const _0x1f5517=[];_0x407bc8['requiresAuth']!==![]&&_0x1f5517[_0x4b895c(0xe2)](_0x4b895c(0x107)+CLI_BIN_NAME+_0x4b895c(0xfa));_0x407bc8[_0x4b895c(0xfe)]!==![]&&_0x1f5517['push'](_0x4b895c(0x10e)+CLI_BIN_NAME+'\x20project\x20init`\x20or\x20--appcode).');if(_0x1f5517['length']>0x0){_0x2d2dc3[_0x4b895c(0xe2)](_0x4b895c(0x10f));for(const _0x2a0ffd of _0x1f5517){_0x2d2dc3['push'](_0x4b895c(0xdf)+_0x2a0ffd);}_0x2d2dc3['push']('');}return _0x2d2dc3[_0x4b895c(0xf9)]('\x0a');}export function generateServiceHelp(_0x609d8d){const _0x4bad3e=a96_0x4fc19d,_0x440d15=getServiceEntry(_0x609d8d);if(!_0x440d15)return _0x4bad3e(0xfd)+_0x609d8d+'\x0a';const _0x5387fc=[];_0x5387fc[_0x4bad3e(0xe2)](''),_0x5387fc[_0x4bad3e(0xe2)]('\x20\x20'+_0x440d15['label']),_0x5387fc[_0x4bad3e(0xe2)](''),_0x5387fc['push'](_0x4bad3e(0x105)),_0x5387fc[_0x4bad3e(0xe2)](_0x4bad3e(0xd1)+CLI_BIN_NAME+'\x20'+_0x609d8d+'\x20<command>\x20[flags]'),_0x5387fc[_0x4bad3e(0xe2)](''),_0x5387fc['push'](_0x4bad3e(0xf1));const _0x5b8093=Math[_0x4bad3e(0x10b)](..._0x440d15[_0x4bad3e(0xda)][_0x4bad3e(0xdb)](_0x248914=>_0x248914[_0x4bad3e(0x101)][_0x4bad3e(0xdd)]));for(const _0x21cbfb of _0x440d15[_0x4bad3e(0xda)]){const _0xfd9b58=_0x21cbfb[_0x4bad3e(0xf0)]??'';_0x5387fc['push'](_0x4bad3e(0xd1)+_0x21cbfb['command'][_0x4bad3e(0xe0)](_0x5b8093+0x2)+_0x21cbfb[_0x4bad3e(0xcc)]+_0xfd9b58);}return _0x5387fc['push'](''),_0x5387fc[_0x4bad3e(0xe2)]('\x20\x20Run\x20`'+CLI_BIN_NAME+'\x20'+_0x609d8d+'\x20<command>\x20--help`\x20for\x20flag\x20details.'),_0x5387fc['push'](''),_0x5387fc[_0x4bad3e(0xf9)]('\x0a');}function a96_0x5226(){const _0x1dc80b=['flags','\x20[default:\x20','\x20\x20Rabetbase\x20CLI','\x20\x20USAGE','\x20<service>\x20<command>\x20--help`\x20for\x20command-level\x20flags.','Requires\x20authentication\x20(run\x20`','669970pjOmpq','313134aJPorK','default','max','\x20\x20\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20Override\x20appcode','\x20\x20FLAGS','Requires\x20appcode\x20(set\x20via\x20`','\x20\x20PREREQUISITES','boolean','\x20\x20[high-risk-write]','\x20|\x20','description','\x20\x20[write]','7853729IACisZ','enum','52482FsGAlU','\x20\x20\x20\x20','\x20\x20\x20\x20--format\x20<fmt>\x20\x20\x20\x20\x20\x20\x20\x20\x20Output\x20format:\x20json\x20|\x20pretty\x20|\x20table','204SzLXuM','format','dryRun','\x20\x20\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20help','\x20(required)','high-risk-write','name','commands','map','Preview\x20the\x20operation\x20without\x20executing','length','6KZquLW','\x20\x20\x20\x20•\x20','padEnd','\x20\x20\x20\x20Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','push','\x20<n>','\x20\x20\x20\x20$\x20','\x20\x20\x20\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Preview\x20operation\x20without\x20executing','108Zjnvig','\x20\x20\x20\x20--yes\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Skip\x20confirmation\x20for\x20high-risk\x20writes','risk','Skip\x20confirmation\x20prompt','\x20\x20\x20\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20version','service','pretty','31225dcAWKr','20vIfAvG','14ufpBOR','tag','\x20\x20COMMANDS','393503KXhFfM','number','label','table','63QzYUBp','\x20\x20\x20\x20--non-interactive\x20\x20\x20\x20\x20\x20Force\x20non-interactive\x20mode\x20(CI)','Output\x20format','join','\x20auth`\x20first).','type','\x20[flags]','\x20\x20Unknown\x20service:\x20','requiresAppCode','\x20\x20\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Environment:\x20production\x20|\x20daily','2293976JQfseY','command'];a96_0x5226=function(){return _0x1dc80b;};return a96_0x5226();}export function generateFullHelp(){const _0x202b1e=a96_0x4fc19d,_0x52eb09=[];_0x52eb09[_0x202b1e(0xe2)](''),_0x52eb09[_0x202b1e(0xe2)](_0x202b1e(0x104)),_0x52eb09[_0x202b1e(0xe2)](''),_0x52eb09[_0x202b1e(0xe2)](_0x202b1e(0x105)),_0x52eb09[_0x202b1e(0xe2)](_0x202b1e(0xe4)+CLI_BIN_NAME+'\x20[global-options]\x20<service>\x20<command>\x20[flags]'),_0x52eb09[_0x202b1e(0xe2)](''),_0x52eb09[_0x202b1e(0xe2)]('\x20\x20GLOBAL\x20OPTIONS'),_0x52eb09[_0x202b1e(0xe2)](_0x202b1e(0x10c)),_0x52eb09[_0x202b1e(0xe2)](_0x202b1e(0xff)),_0x52eb09[_0x202b1e(0xe2)](_0x202b1e(0xd2)),_0x52eb09[_0x202b1e(0xe2)](_0x202b1e(0xe5)),_0x52eb09[_0x202b1e(0xe2)](_0x202b1e(0xe7)),_0x52eb09['push'](_0x202b1e(0xf7)),_0x52eb09['push'](_0x202b1e(0xd6)),_0x52eb09[_0x202b1e(0xe2)](_0x202b1e(0xea)),_0x52eb09[_0x202b1e(0xe2)](''),_0x52eb09[_0x202b1e(0xe2)](_0x202b1e(0xf1)),_0x52eb09[_0x202b1e(0xe2)]('');for(const _0x3abaf1 of serviceRegistry){_0x52eb09['push']('\x20\x20'+_0x3abaf1[_0x202b1e(0xf4)]);const _0x42c569=_0x3abaf1['commands']['map'](_0x37f9b3=>_0x3abaf1[_0x202b1e(0xeb)]+'\x20'+_0x37f9b3[_0x202b1e(0x101)]),_0xf6a22=Math['max'](..._0x42c569[_0x202b1e(0xdb)](_0x2ec9da=>_0x2ec9da[_0x202b1e(0xdd)]));for(let _0xea67ee=0x0;_0xea67ee<_0x3abaf1['commands'][_0x202b1e(0xdd)];_0xea67ee++){const _0x2246e4=_0x3abaf1[_0x202b1e(0xda)][_0xea67ee],_0x4564d7=_0x2246e4[_0x202b1e(0xf0)]??'';_0x52eb09[_0x202b1e(0xe2)](_0x202b1e(0xd1)+_0x42c569[_0xea67ee][_0x202b1e(0xe0)](_0xf6a22+0x2)+_0x2246e4[_0x202b1e(0xcc)]+_0x4564d7);}_0x52eb09['push']('');}return _0x52eb09[_0x202b1e(0xe2)]('\x20\x20Run\x20`'+CLI_BIN_NAME+_0x202b1e(0x106)),_0x52eb09[_0x202b1e(0xe2)](''),_0x52eb09[_0x202b1e(0xf9)]('\x0a');}function buildAllFlags(_0x2d6ee1){const _0x5606b8=a96_0x4fc19d,_0x9e486f=[..._0x2d6ee1[_0x5606b8(0x102)]];return _0x2d6ee1[_0x5606b8(0xd5)]&&_0x9e486f[_0x5606b8(0xe2)]({'name':'dry-run','type':_0x5606b8(0xc9),'description':_0x5606b8(0xdc)}),_0x2d6ee1['hasFormat']!==![]&&_0x9e486f[_0x5606b8(0xe2)]({'name':_0x5606b8(0xd4),'type':'string','default':'pretty','enum':['json',_0x5606b8(0xec),_0x5606b8(0xf5)],'description':_0x5606b8(0xf8)}),_0x2d6ee1[_0x5606b8(0xe8)]===_0x5606b8(0xd8)&&_0x9e486f[_0x5606b8(0xe2)]({'name':'yes','type':'boolean','description':_0x5606b8(0xe9)}),_0x9e486f;}function formatFlagName(_0x18d24f){const _0x415ec1=a96_0x4fc19d,_0x3e38c0=_0x18d24f[_0x415ec1(0xfb)]===_0x415ec1(0xc9)?'':_0x18d24f[_0x415ec1(0xfb)]===_0x415ec1(0xf3)?_0x415ec1(0xe3):'\x20<value>';return'--'+_0x18d24f[_0x415ec1(0xd9)]+_0x3e38c0;}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3238e8,_0x4f2619){var _0x1ca149=a97_0x2da1,_0x267b1e=_0x3238e8();while(!![]){try{var _0x13ea16=-parseInt(_0x1ca149(0x157))/0x1*(-parseInt(_0x1ca149(0x159))/0x2)+parseInt(_0x1ca149(0x158))/0x3+parseInt(_0x1ca149(0x156))/0x4*(-parseInt(_0x1ca149(0x153))/0x5)+parseInt(_0x1ca149(0x154))/0x6+parseInt(_0x1ca149(0x152))/0x7*(-parseInt(_0x1ca149(0x14e))/0x8)+-parseInt(_0x1ca149(0x150))/0x9*(-parseInt(_0x1ca149(0x151))/0xa)+-parseInt(_0x1ca149(0x155))/0xb*(parseInt(_0x1ca149(0x14f))/0xc);if(_0x13ea16===_0x4f2619)break;else _0x267b1e['push'](_0x267b1e['shift']());}catch(_0x20519a){_0x267b1e['push'](_0x267b1e['shift']());}}}(a97_0x2a21,0xed7b6));export{runCommand}from'./runner.js';export{parseFlags,validateFlags}from'./flags.js';function a97_0x2da1(_0x11c075,_0x5798a1){_0x11c075=_0x11c075-0x14e;var _0x2a2153=a97_0x2a21();var _0x2da102=_0x2a2153[_0x11c075];return _0x2da102;}function a97_0x2a21(){var _0x3082cc=['18cvTyyG','3175896RizdKy','789168atVCbx','81801oetEVz','1730OlmfiU','7dhkARy','377525UJrqHn','11404086mjmiJU','649qnjqbH','20pYtyFD','143354fgCGJC','2592150jiHsvi'];a97_0x2a21=function(){return _0x3082cc;};return a97_0x2a21();}export{formatOutput}from'./output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./help.js';export{extractList,extractPaging}from'./response.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a98_0x3668(_0x42b6a1,_0x61ec0b){_0x42b6a1=_0x42b6a1-0x8b;const _0x575811=a98_0x5758();let _0x366834=_0x575811[_0x42b6a1];return _0x366834;}function a98_0x5758(){const _0x583dd1=['message','join','values','object','map','stdout','Found\x20','291320ddXGET','[dry-run]\x20Would\x20execute:','152lBerLa','Error:\x20','stringify','(empty)','174144KVFeAu','626950OHksqP','isArray','1118166UjKVam','562548vYDQIW','79209SobuVk','risk','data','log','table','entries','max','padEnd','41049CuGEZj','4mLPlre','Unknown\x20error','error','repeat','pretty','command','keys','dryRun','length','4pDgeJz'];a98_0x5758=function(){return _0x583dd1;};return a98_0x5758();}(function(_0x2b1463,_0x340224){const _0x5f15fd=a98_0x3668,_0x5f0342=_0x2b1463();while(!![]){try{const _0x5866a1=parseInt(_0x5f15fd(0x9e))/0x1+-parseInt(_0x5f15fd(0x8b))/0x2*(parseInt(_0x5f15fd(0x99))/0x3)+parseInt(_0x5f15fd(0xa7))/0x4*(-parseInt(_0x5f15fd(0x9a))/0x5)+parseInt(_0x5f15fd(0x9d))/0x6+parseInt(_0x5f15fd(0x9c))/0x7+parseInt(_0x5f15fd(0x95))/0x8*(parseInt(_0x5f15fd(0xa6))/0x9)+-parseInt(_0x5f15fd(0x93))/0xa;if(_0x5866a1===_0x340224)break;else _0x5f0342['push'](_0x5f0342['shift']());}catch(_0x32f406){_0x5f0342['push'](_0x5f0342['shift']());}}}(a98_0x5758,0x2450a));export function formatOutput(_0x1a2055,_0x3acbd9){const _0x3c43b7=a98_0x3668,{format:_0x480be0}=_0x3acbd9;switch(_0x480be0){case'json':printJson(_0x1a2055,_0x3acbd9);break;case _0x3c43b7(0xa2):printTable(_0x1a2055,_0x3acbd9);break;case _0x3c43b7(0xab):default:printPretty(_0x1a2055,_0x3acbd9);break;}}function printJson(_0x37d2bf,_0x3a9666){const _0x1dad68=a98_0x3668,_0x48806a={'ok':_0x37d2bf['ok'],'command':_0x3a9666[_0x1dad68(0xac)],'risk':_0x3a9666[_0x1dad68(0x9f)]};if(_0x3a9666[_0x1dad68(0xae)])_0x48806a['dryRun']=!![];if(_0x37d2bf[_0x1dad68(0xa0)]!==undefined)_0x48806a[_0x1dad68(0xa0)]=_0x37d2bf[_0x1dad68(0xa0)];!_0x37d2bf['ok']&&_0x37d2bf[_0x1dad68(0x8c)]&&(_0x48806a[_0x1dad68(0xa9)]={'code':'command_error','message':_0x37d2bf[_0x1dad68(0x8c)]}),process[_0x1dad68(0x91)]['write'](JSON[_0x1dad68(0x97)](_0x48806a,null,0x2)+'\x0a');}function printPretty(_0x144f53,_0x3b690c){const _0x5e11b9=a98_0x3668;if(_0x3b690c[_0x5e11b9(0xae)]){console[_0x5e11b9(0xa1)](_0x5e11b9(0x94)),console[_0x5e11b9(0xa1)](JSON[_0x5e11b9(0x97)](_0x144f53[_0x5e11b9(0xa0)],null,0x2));return;}if(!_0x144f53['ok']){console[_0x5e11b9(0xa9)](_0x5e11b9(0x96)+(_0x144f53[_0x5e11b9(0x8c)]??_0x5e11b9(0xa8)));return;}const _0x6709f6=_0x144f53[_0x5e11b9(0xa0)];if(_0x6709f6===undefined||_0x6709f6===null){if(_0x144f53[_0x5e11b9(0x8c)])console[_0x5e11b9(0xa1)](_0x144f53[_0x5e11b9(0x8c)]);return;}if(Array[_0x5e11b9(0x9b)](_0x6709f6)){printArrayPretty(_0x6709f6);return;}if(typeof _0x6709f6===_0x5e11b9(0x8f)){printObjectPretty(_0x6709f6);return;}console[_0x5e11b9(0xa1)](String(_0x6709f6));}function printObjectPretty(_0x2a777a){const _0xa5e10c=a98_0x3668,_0x1268bd=Math['max'](...Object[_0xa5e10c(0xad)](_0x2a777a)['map'](_0x69b262=>_0x69b262['length']),0x0);for(const [_0x398639,_0x10cc79]of Object[_0xa5e10c(0xa3)](_0x2a777a)){if(_0x10cc79===undefined||_0x10cc79===null)continue;const _0x4268ca=_0x398639['padEnd'](_0x1268bd);typeof _0x10cc79===_0xa5e10c(0x8f)?console['log'](_0x4268ca+'\x20\x20'+JSON[_0xa5e10c(0x97)](_0x10cc79)):console[_0xa5e10c(0xa1)](_0x4268ca+'\x20\x20'+_0x10cc79);}}function printArrayPretty(_0x2b1fd5){const _0x4301d9=a98_0x3668;if(_0x2b1fd5[_0x4301d9(0xaf)]===0x0){console['log']('(empty)');return;}console[_0x4301d9(0xa1)](_0x4301d9(0x92)+_0x2b1fd5['length']+'\x20items:\x0a');for(const _0x41bafd of _0x2b1fd5){if(typeof _0x41bafd===_0x4301d9(0x8f)&&_0x41bafd!==null){const _0x51a07c=Object[_0x4301d9(0x8e)](_0x41bafd)['slice'](0x0,0x4)['join']('\x20\x20');console[_0x4301d9(0xa1)]('\x20\x20'+_0x51a07c);}else console[_0x4301d9(0xa1)]('\x20\x20'+_0x41bafd);}}function printTable(_0x5b1c8a,_0x12be00){const _0x3563be=a98_0x3668,_0xe9e9f=_0x5b1c8a[_0x3563be(0xa0)];if(!_0x5b1c8a['ok']){console[_0x3563be(0xa9)](_0x3563be(0x96)+(_0x5b1c8a[_0x3563be(0x8c)]??'Unknown\x20error'));return;}const _0x37fdf1=Array[_0x3563be(0x9b)](_0xe9e9f)?_0xe9e9f:_0xe9e9f?[_0xe9e9f]:[];if(_0x37fdf1[_0x3563be(0xaf)]===0x0){console[_0x3563be(0xa1)](_0x3563be(0x98));return;}const _0x4f9d02=Object[_0x3563be(0xad)](_0x37fdf1[0x0]),_0x2d2ba5=_0x4f9d02[_0x3563be(0x90)](_0x16a260=>Math[_0x3563be(0xa4)](_0x16a260[_0x3563be(0xaf)],..._0x37fdf1[_0x3563be(0x90)](_0x1eaaa8=>String(_0x1eaaa8[_0x16a260]??'')[_0x3563be(0xaf)]))),_0x27201c=_0x4f9d02[_0x3563be(0x90)]((_0x51acf5,_0x2fd6a0)=>_0x51acf5['padEnd'](_0x2d2ba5[_0x2fd6a0]))['join']('\x20\x20'),_0x2359f3=_0x2d2ba5[_0x3563be(0x90)](_0x2c3b96=>'-'[_0x3563be(0xaa)](_0x2c3b96))[_0x3563be(0x8d)]('\x20\x20');console[_0x3563be(0xa1)](_0x27201c),console[_0x3563be(0xa1)](_0x2359f3);for(const _0x1eee56 of _0x37fdf1){const _0x5aef39=_0x4f9d02[_0x3563be(0x90)]((_0x2b07de,_0x3c19ba)=>String(_0x1eee56[_0x2b07de]??'')[_0x3563be(0xa5)](_0x2d2ba5[_0x3c19ba]))['join']('\x20\x20');console[_0x3563be(0xa1)](_0x5aef39);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a99_0x46b0(_0x5c915b,_0xc17c55){_0x5c915b=_0x5c915b-0xd1;var _0x227979=a99_0x2279();var _0x46b0ea=_0x227979[_0x5c915b];return _0x46b0ea;}(function(_0x1a9ded,_0x1a5174){var _0x1238fc=a99_0x46b0,_0x228303=_0x1a9ded();while(!![]){try{var _0x3b54eb=parseInt(_0x1238fc(0xd8))/0x1*(parseInt(_0x1238fc(0xd4))/0x2)+-parseInt(_0x1238fc(0xd5))/0x3+parseInt(_0x1238fc(0xd6))/0x4+parseInt(_0x1238fc(0xde))/0x5*(parseInt(_0x1238fc(0xd7))/0x6)+parseInt(_0x1238fc(0xd9))/0x7*(-parseInt(_0x1238fc(0xd1))/0x8)+parseInt(_0x1238fc(0xdc))/0x9*(-parseInt(_0x1238fc(0xd3))/0xa)+-parseInt(_0x1238fc(0xdb))/0xb;if(_0x3b54eb===_0x1a5174)break;else _0x228303['push'](_0x228303['shift']());}catch(_0x2edaf7){_0x228303['push'](_0x228303['shift']());}}}(a99_0x2279,0xe59e6));export function extractList(_0x334879){var _0x1f0cde=a99_0x46b0;if(Array['isArray'](_0x334879))return _0x334879;if(_0x334879&&typeof _0x334879==='object')return _0x334879[_0x1f0cde(0xdd)]??[];return[];}export function extractPaging(_0x2dee79){var _0x5e3b19=a99_0x46b0;if(_0x2dee79&&typeof _0x2dee79===_0x5e3b19(0xdf)&&!Array[_0x5e3b19(0xda)](_0x2dee79))return _0x2dee79[_0x5e3b19(0xd2)];return undefined;}function a99_0x2279(){var _0x2a69fb=['6tWHRxq','3171306VOhBLW','7283240BnLqYs','39270QFIqXw','89506ZJNqqp','1043294dWnCfj','isArray','4003384QORqNw','3978801cmyZdK','tableData','1115GwRpoU','object','40udlAeo','paging','10kNBiAt'];a99_0x2279=function(){return _0x2a69fb;};return a99_0x2279();}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3634ca,_0x34ee63){const _0x3e03db=a100_0x5ea7,_0x10449c=_0x3634ca();while(!![]){try{const _0x35d664=-parseInt(_0x3e03db(0x212))/0x1+parseInt(_0x3e03db(0x208))/0x2*(-parseInt(_0x3e03db(0x1e5))/0x3)+parseInt(_0x3e03db(0x1e4))/0x4+-parseInt(_0x3e03db(0x224))/0x5+-parseInt(_0x3e03db(0x1f0))/0x6+-parseInt(_0x3e03db(0x21b))/0x7+parseInt(_0x3e03db(0x214))/0x8;if(_0x35d664===_0x34ee63)break;else _0x10449c['push'](_0x10449c['shift']());}catch(_0x2730c7){_0x10449c['push'](_0x10449c['shift']());}}}(a100_0x3187,0x46ab8));import{parseFlags,validateFlags}from'./flags.js';import{formatOutput}from'./output.js';import{CliErrors}from'../errors.js';import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a100_0x3187(){const _0x10d98e=['../core/api-client.js','map','./src/api','resolveApiDomain','close','high-risk-write','resolveAppCode','cancelled','Unknown\x20alias\x20\x22','alias','nonInteractive','code','\x22.\x0a','name','some','string','defaultPageSize','cookie','Set\x20appcode\x20via\x20`','riskLevel','2knExCA','verbose','join','Available\x20aliases:\x20','flags','`\x20has\x20risk\x20level\x20\x22','appCode','\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22','stderr','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','375799gwYKAs','.\x20Run\x20`','13850856bKipct','dryRun','High-risk\x20operation\x20`','apiDomain','pagesize','Operation\x20cancelled\x20by\x20user.','\x22.\x20','3525781acTXSD','yes','toLowerCase','isNonInteractive','stdin','format','rawFlags','`\x20requires\x20either\x20--code\x20or\x20--alias.','validate','1986620cIMcEQ','json','\x20api\x20pull`\x20first.','dry-run','No\x20api.ts\x20found\x20in\x20','apiDir','question','Command\x20`','service','defaultVerbose','pretty','1626956mtnTbQ','413997DEMrRP','\x0a\x20\x20\x20Continue?\x20[y/N]\x20','command','table','defaultFormat','authRequired','execute','requiresAppCode','type','validation','risk','2602962BIwMJf','hasFormat','node:readline','number'];a100_0x3187=function(){return _0x10d98e;};return a100_0x3187();}export async function runCommand(_0x44cae2,_0x32cb39){const _0x44d814=a100_0x5ea7,_0xdde772=CLI_BIN_NAME+'\x20'+_0x44cae2[_0x44d814(0x1e1)]+'\x20'+_0x44cae2[_0x44d814(0x1e7)],_0x3ec831=parseFlags(_0x44cae2['flags'],_0x32cb39[_0x44d814(0x221)]);validateFlags(_0x44cae2[_0x44d814(0x20c)],_0x3ec831,_0xdde772);if(!_0x3ec831['dry-run']&&_0x32cb39[_0x44d814(0x207)]&&riskLevelOrder(_0x44cae2[_0x44d814(0x1ef)])>riskLevelOrder(_0x32cb39[_0x44d814(0x207)]))throw CliErrors[_0x44d814(0x1ee)](_0x44d814(0x1e0)+_0xdde772+_0x44d814(0x20d)+_0x44cae2['risk']+_0x44d814(0x20f)+_0x32cb39[_0x44d814(0x207)]+_0x44d814(0x200)+'\x20\x20Set\x20riskLevel\x20in\x20.rabetbase.json\x20or\x20RABETBASE_RISK_LEVEL\x20to\x20allow\x20this\x20operation.');const _0x538c6e=_0x32cb39[_0x44d814(0x1de)]||_0x44d814(0x1f6);resolveAliasToCode(_0x44cae2,_0x3ec831,_0x538c6e,_0xdde772);let _0x320139='';if(_0x44cae2['requiresAuth']!==![]){_0x320139=_0x32cb39['resolveCookie']();if(!_0x320139)throw CliErrors[_0x44d814(0x1ea)]();const {setActiveCookie:_0x4f5b84}=await import(_0x44d814(0x1f4));_0x4f5b84(_0x320139);}let _0x2c18ae='';if(_0x44cae2[_0x44d814(0x1ec)]!==![]){_0x2c18ae=_0x32cb39[_0x44d814(0x1fa)]()??'';if(!_0x2c18ae)throw CliErrors['configMissing'](_0x44d814(0x206)+CLI_BIN_NAME+_0x44d814(0x211));}const _0x2f0dc3=resolveFormat(_0x3ec831,_0x44cae2,_0x32cb39[_0x44d814(0x1e9)]),_0x4ed3b6=buildRuntimeContext({'appCode':_0x2c18ae,'cookie':_0x320139,'apiDomain':_0x32cb39[_0x44d814(0x1f7)](),'format':_0x2f0dc3,'flags':_0x3ec831,'def':_0x44cae2,'nonInteractive':_0x32cb39[_0x44d814(0x21e)],'defaultPageSize':_0x32cb39[_0x44d814(0x204)],'defaultVerbose':_0x32cb39[_0x44d814(0x1e2)],'apiDir':_0x538c6e});_0x44cae2[_0x44d814(0x223)]&&await _0x44cae2['validate'](_0x4ed3b6);if(_0x3ec831[_0x44d814(0x227)]){if(!_0x44cae2[_0x44d814(0x215)])throw CliErrors[_0x44d814(0x1ee)]('--dry-run\x20is\x20not\x20supported\x20for\x20`'+_0xdde772+'`.');const _0x314762=await _0x44cae2[_0x44d814(0x215)](_0x4ed3b6);formatOutput({'ok':!![],'data':_0x314762},{'command':_0xdde772,'risk':_0x44cae2[_0x44d814(0x1ef)],'format':_0x2f0dc3,'dryRun':!![]});return;}if(_0x44cae2[_0x44d814(0x1ef)]===_0x44d814(0x1f9)&&!_0x3ec831[_0x44d814(0x21c)]){if(_0x32cb39[_0x44d814(0x21e)])throw CliErrors[_0x44d814(0x1ee)](_0x44d814(0x216)+_0xdde772+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.');await requireConfirmation(_0xdde772);}const _0xbe1149=await _0x44cae2[_0x44d814(0x1eb)](_0x4ed3b6);formatOutput(_0xbe1149,{'command':_0xdde772,'risk':_0x44cae2[_0x44d814(0x1ef)],'format':_0x2f0dc3});}function buildRuntimeContext(_0x41be1c){const _0x20107f=a100_0x5ea7,{flags:_0x325378,def:_0x2159b2}=_0x41be1c,_0x51417a=CLI_BIN_NAME+'\x20'+_0x2159b2[_0x20107f(0x1e1)]+'\x20'+_0x2159b2[_0x20107f(0x1e7)];return{'appCode':_0x41be1c[_0x20107f(0x20e)],'cookie':_0x41be1c[_0x20107f(0x205)],'apiDomain':_0x41be1c[_0x20107f(0x217)],'format':_0x41be1c[_0x20107f(0x220)],'nonInteractive':_0x41be1c[_0x20107f(0x1fe)],'apiDir':_0x41be1c['apiDir'],'str'(_0x36dd2a){return String(_0x325378[_0x36dd2a]??'');},'bool'(_0x3e577a){const _0x5979eb=_0x20107f;if(_0x325378[_0x3e577a]===!![])return!![];if(_0x3e577a===_0x5979eb(0x209)&&_0x41be1c[_0x5979eb(0x1e2)])return!![];return![];},'num'(_0x4f3a9b,_0x23df0a){const _0x17e7c4=_0x20107f,_0x55a2f0=_0x325378[_0x4f3a9b];if(typeof _0x55a2f0===_0x17e7c4(0x1f3))return _0x55a2f0;if(_0x4f3a9b===_0x17e7c4(0x218)&&_0x41be1c[_0x17e7c4(0x204)]!=null)return _0x41be1c['defaultPageSize'];return _0x23df0a??0x0;},'flag'(_0x54af48){return _0x325378[_0x54af48];},'output'(_0x589fa7){const _0x4d3ff5=_0x20107f;formatOutput(_0x589fa7,{'command':_0x51417a,'risk':_0x2159b2[_0x4d3ff5(0x1ef)],'format':_0x41be1c[_0x4d3ff5(0x220)]});}};}function resolveFormat(_0x320e4b,_0x4c394d,_0x53c61b){const _0x9196=a100_0x5ea7;if(_0x4c394d[_0x9196(0x1f1)]===![])return _0x9196(0x1e3);const _0x15fb36=_0x320e4b['format'];if(_0x15fb36===_0x9196(0x225)||_0x15fb36===_0x9196(0x1e3)||_0x15fb36===_0x9196(0x1e8))return _0x15fb36;if(_0x53c61b)return _0x53c61b;return _0x9196(0x1e3);}async function requireConfirmation(_0x39f600){const _0xa52ae1=a100_0x5ea7,_0x3636ed=await import(_0xa52ae1(0x1f2)),_0x252ce0=_0x3636ed['createInterface']({'input':process[_0xa52ae1(0x21f)],'output':process[_0xa52ae1(0x210)]});return new Promise((_0x37451a,_0x472b81)=>{const _0x5b6f09=_0xa52ae1;_0x252ce0[_0x5b6f09(0x1df)]('⚠\x20\x20High-risk\x20operation:\x20'+_0x39f600+_0x5b6f09(0x1e6),_0xf79682=>{const _0x54a70e=_0x5b6f09;_0x252ce0[_0x54a70e(0x1f8)](),_0xf79682[_0x54a70e(0x21d)]()==='y'||_0xf79682['toLowerCase']()==='yes'?_0x37451a():_0x472b81(CliErrors[_0x54a70e(0x1fb)](_0x54a70e(0x219)));});});}const RISK_ORDER={'read':0x0,'write':0x1,'high-risk-write':0x2};function riskLevelOrder(_0x195145){return RISK_ORDER[_0x195145??'read']??0x0;}function a100_0x5ea7(_0x14de9e,_0x1cf154){_0x14de9e=_0x14de9e-0x1dd;const _0x318742=a100_0x3187();let _0x5ea782=_0x318742[_0x14de9e];return _0x5ea782;}function resolveAliasToCode(_0x1c736f,_0x37907a,_0x1fd53a,_0x2ed18b){const _0x2efa1c=a100_0x5ea7,_0x53821e=_0x1c736f[_0x2efa1c(0x20c)][_0x2efa1c(0x202)](_0x29f94c=>_0x29f94c['name']===_0x2efa1c(0x1ff)&&_0x29f94c[_0x2efa1c(0x1ed)]===_0x2efa1c(0x203)),_0x29c052=_0x1c736f[_0x2efa1c(0x20c)][_0x2efa1c(0x202)](_0x4c8c47=>_0x4c8c47[_0x2efa1c(0x201)]===_0x2efa1c(0x1fd)&&_0x4c8c47[_0x2efa1c(0x1ed)]===_0x2efa1c(0x203));if(!_0x53821e||!_0x29c052)return;const _0x5560e6=_0x37907a[_0x2efa1c(0x1ff)]?String(_0x37907a[_0x2efa1c(0x1ff)]):'',_0x2d0f3e=_0x37907a['alias']?String(_0x37907a['alias']):'';if(!_0x5560e6&&!_0x2d0f3e)throw CliErrors[_0x2efa1c(0x1ee)]('`'+_0x2ed18b+_0x2efa1c(0x222));if(_0x2d0f3e&&!_0x5560e6){const _0x4a6bbb=resolveAlias(_0x1fd53a,_0x2d0f3e);if(!_0x4a6bbb){const _0x15ff65=listAliases(_0x1fd53a)[_0x2efa1c(0x1f5)](_0x1e762b=>_0x1e762b[_0x2efa1c(0x1fd)]),_0x45c9cb=_0x15ff65['length']?_0x2efa1c(0x20b)+_0x15ff65[_0x2efa1c(0x20a)](',\x20'):_0x2efa1c(0x1dd)+_0x1fd53a+_0x2efa1c(0x213)+CLI_BIN_NAME+_0x2efa1c(0x226);throw CliErrors['validation'](_0x2efa1c(0x1fc)+_0x2d0f3e+_0x2efa1c(0x21a)+_0x45c9cb);}_0x37907a['code']=_0x4a6bbb;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const BUILD_NUMBER=
|
|
1
|
+
export const BUILD_NUMBER=0x31;
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a103_0x2b2f(){var _0x2d96c1=['200rHoxCK','green','\x20to\x20view\x20available\x20commands.','9204720dPJvlm','79317vVQAto','11UFJzDx','7842261lNxOxz','39230XClrfk','4877283utkoIP','1777WFkMfW','\x20\x20Rabetbase\x20CLI','228iJkzrf','1146QjKgCP','1850044CwVNPU','\x20\x20Use\x20'];a103_0x2b2f=function(){return _0x2d96c1;};return a103_0x2b2f();}function a103_0x2027(_0x49c389,_0x41913f){_0x49c389=_0x49c389-0x1ec;var _0x2b2f9c=a103_0x2b2f();var _0x202753=_0x2b2f9c[_0x49c389];return _0x202753;}(function(_0x3b46d3,_0x20860e){var _0x57ef6c=a103_0x2027,_0x32da78=_0x3b46d3();while(!![]){try{var _0x29fd7e=parseInt(_0x57ef6c(0x1f6))/0x1*(parseInt(_0x57ef6c(0x1f9))/0x2)+-parseInt(_0x57ef6c(0x1f5))/0x3+-parseInt(_0x57ef6c(0x1fa))/0x4+parseInt(_0x57ef6c(0x1f4))/0x5*(-parseInt(_0x57ef6c(0x1f8))/0x6)+parseInt(_0x57ef6c(0x1f3))/0x7+parseInt(_0x57ef6c(0x1ed))/0x8*(parseInt(_0x57ef6c(0x1f1))/0x9)+parseInt(_0x57ef6c(0x1f0))/0xa*(parseInt(_0x57ef6c(0x1f2))/0xb);if(_0x29fd7e===_0x20860e)break;else _0x32da78['push'](_0x32da78['shift']());}catch(_0x50901a){_0x32da78['push'](_0x32da78['shift']());}}}(a103_0x2b2f,0xd9ff9));import{jsx as a103_0x43855e,jsxs as a103_0x5e7aa5}from'react/jsx-runtime';import{Box,Text}from'ink';import{CLI_BIN_NAME}from'./constant/cli.js';export function Help(){var _0x23ac50=a103_0x2027;return a103_0x5e7aa5(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a103_0x43855e(Box,{'children':a103_0x43855e(Text,{'bold':!![],'color':_0x23ac50(0x1ee),'children':_0x23ac50(0x1f7)})}),a103_0x5e7aa5(Box,{'marginTop':0x1,'children':[a103_0x43855e(Text,{'dimColor':!![],'children':_0x23ac50(0x1ec)}),a103_0x43855e(Text,{'bold':!![],'color':_0x23ac50(0x1ee),'children':CLI_BIN_NAME+'\x20--help'}),a103_0x43855e(Text,{'dimColor':!![],'children':_0x23ac50(0x1ef)})]})]});}
|
package/lib/init/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(_0x5c80d0,_0x3a90e8){const _0x373db1=a104_0x290a,_0x143a3c=_0x5c80d0();while(!![]){try{const _0x53c8c4=-parseInt(_0x373db1(0xd7))/0x1+parseInt(_0x373db1(0xc3))/0x2+-parseInt(_0x373db1(0xc4))/0x3+parseInt(_0x373db1(0xe2))/0x4+parseInt(_0x373db1(0xc7))/0x5+parseInt(_0x373db1(0xbf))/0x6*(parseInt(_0x373db1(0xe3))/0x7)+parseInt(_0x373db1(0xda))/0x8*(-parseInt(_0x373db1(0xd4))/0x9);if(_0x53c8c4===_0x3a90e8)break;else _0x143a3c['push'](_0x143a3c['shift']());}catch(_0x46f130){_0x143a3c['push'](_0x143a3c['shift']());}}}(a104_0x2b1b,0xe783e));import{jsxs as a104_0x428c48,jsx as a104_0x5e5f1f}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';function a104_0x2b1b(){const _0x139e6c=['4717800BVoSpV','trim','初始化项目配置文件成功','red','App\x20Code\x20can\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','gray','App\x20Code\x20cannot\x20exceed\x20100\x20characters','init','length','toLocaleString','delete','utf8','cwd','522GpUaGi','parse','backspace','109633pEdTfr','App\x20Code\x20identifies\x20your\x20project.\x20Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','App\x20Code\x20cannot\x20be\x20empty','67064RHmyls','Please\x20enter\x20App\x20Code:','green','slice','setLogPath','version','column','创建配置文件失败','1418084pjSGDq','14hLRHtO','return','env','You\x20can\x20now\x20use\x20commands\x20like\x20\x27rabetbase\x20api\x20doc\x27\x20and\x20\x27rabetbase\x20api\x20pull\x27','cyan','string','Invalid\x20App\x20Code','\x20←\x20','package.json','exit','3775230umSjSz','1.0.0','error','test','1599378jkxntG','5436141FLEogJ','Initializing\x20configuration\x20file...','Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory'];a104_0x2b1b=function(){return _0x139e6c;};return a104_0x2b1b();}import{readFileSync}from'node:fs';import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';function a104_0x290a(_0x22bd74,_0x52a2e4){_0x22bd74=_0x22bd74-0xb7;const _0x2b1bec=a104_0x2b1b();let _0x290a75=_0x2b1bec[_0x22bd74];return _0x290a75;}import{logger}from'../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME}from'../context.js';export function Init({appcode:_0x34d3df,env:_0x4b616f}){const _0x2e7671=a104_0x290a,[_0x7df439,_0x45c632]=useState(null),[_0x42c8b2,_0x272af0]=useState(![]),[_0x651899,_0x30a059]=useState(!_0x34d3df),[_0x1c2038,_0x146e2d]=useState(''),[_0x46c55f,_0x4cad8a]=useState(''),[_0x18710d,_0x519112]=useState(_0x34d3df||''),[_0x34e940]=useState(_0x4b616f);function _0x32b9fd(_0x189b52){const _0x7504c7=a104_0x290a;if(_0x189b52[_0x7504c7(0xcf)]===0x0)return{'valid':![],'message':''};if(_0x189b52[_0x7504c7(0xcf)]>0x64)return{'valid':![],'message':_0x7504c7(0xcd)};const _0x2005a6=/^[A-Za-z0-9_-]+$/;if(!_0x2005a6[_0x7504c7(0xc2)](_0x189b52))return{'valid':![],'message':_0x7504c7(0xcb)};return{'valid':!![]};}useInput((_0x4b2067,_0x687365)=>{const _0x592378=a104_0x290a;if(!_0x651899)return;if(_0x687365[_0x592378(0xe4)]){if(_0x46c55f||!_0x1c2038[_0x592378(0xc8)]()){_0x4cad8a(_0x592378(0xd9));return;}const _0x26f50d=_0x1c2038[_0x592378(0xc8)](),{valid:_0x27d644,message:_0x50d10f}=_0x32b9fd(_0x26f50d);if(!_0x27d644){_0x4cad8a(_0x50d10f||'Invalid\x20App\x20Code');return;}_0x519112(_0x26f50d),_0x30a059(![]);}else{if(_0x687365[_0x592378(0xd6)]||_0x687365[_0x592378(0xd1)])_0x146e2d(_0x251201=>{const _0x547a3e=_0x592378,_0x149510=_0x251201[_0x547a3e(0xdd)](0x0,-0x1);if(_0x149510[_0x547a3e(0xcf)]===0x0)_0x4cad8a('');else{const {valid:_0xdb4e45,message:_0x1f456f}=_0x32b9fd(_0x149510);_0x4cad8a(_0xdb4e45?'':_0x1f456f||_0x547a3e(0xbb));}return _0x149510;});else _0x687365['ctrl']&&_0x4b2067==='c'?process['exit'](0x0):_0x146e2d(_0x49e917=>{const _0xed5959=_0x592378,_0x42bdd9=_0x49e917+_0x4b2067,{valid:_0x47ef0d,message:_0x215439}=_0x32b9fd(_0x42bdd9);return _0x4cad8a(_0x47ef0d?'':_0x215439||_0xed5959(0xbb)),_0x42bdd9;});}},{'isActive':_0x651899}),useEffect(()=>{const _0x31145b=a104_0x290a;if(!_0x18710d||_0x651899)return;if(getProjectConfigPath()){_0x45c632('Config\x20file\x20already\x20exists\x20in\x20current\x20directory'),setTimeout(()=>process[_0x31145b(0xbe)](0x1),0x64);return;}const _0x5c117b=resolve(process[_0x31145b(0xd3)](),NEW_CONFIG_NAME);try{const _0x5b5ce1=fileURLToPath(import.meta.url),_0x12c648=resolve(dirname(_0x5b5ce1),'../..'),_0xa77bcc=join(_0x12c648,_0x31145b(0xbd));let _0x5d9f90=_0x31145b(0xc0);try{const _0x310341=JSON[_0x31145b(0xd5)](readFileSync(_0xa77bcc,_0x31145b(0xd2)));_0x5d9f90=_0x310341['version']||_0x31145b(0xc0);}catch{}const _0x58dcd3=readRawConfig(),_0x4b6db1=typeof _0x58dcd3['env']===_0x31145b(0xba)?_0x58dcd3['env']:undefined,{app:_0x2ff7fd,appcode:_0x216341,..._0xfa1494}=_0x58dcd3,_0x15fffa={..._0xfa1494,'appcode':_0x18710d,'env':_0x34e940||_0x4b6db1||'production','createdAt':new Date()[_0x31145b(0xd0)](),'version':_0x5d9f90};writeConfigFile(_0x5c117b,_0x15fffa),logger[_0x31145b(0xde)](process[_0x31145b(0xd3)]()),logger['info']('init',_0x31145b(0xc9),{'appcode':_0x18710d,'env':_0x15fffa[_0x31145b(0xb7)],'version':_0x15fffa[_0x31145b(0xdf)],'configPath':_0x5c117b}),_0x272af0(!![]),setTimeout(()=>process[_0x31145b(0xbe)](0x0),0x64);}catch(_0x5c5171){logger[_0x31145b(0xc1)](_0x31145b(0xce),_0x31145b(0xe1),{'error':_0x5c5171 instanceof Error?_0x5c5171['message']:String(_0x5c5171)}),_0x45c632('Error:\x20'+(_0x5c5171 instanceof Error?_0x5c5171['message']:String(_0x5c5171))),setTimeout(()=>process[_0x31145b(0xbe)](0x1),0x64);}},[_0x18710d,_0x651899,_0x34e940]);if(_0x7df439)return a104_0x5e5f1f(Box,{'flexDirection':_0x2e7671(0xe0),'children':a104_0x428c48(Text,{'color':_0x2e7671(0xca),'children':['✗\x20',_0x7df439]})});if(_0x651899)return a104_0x428c48(Box,{'flexDirection':_0x2e7671(0xe0),'children':[a104_0x428c48(Box,{'children':[a104_0x428c48(Text,{'color':'cyan','children':[_0x2e7671(0xdb),'\x20']}),_0x1c2038?a104_0x5e5f1f(Text,{'color':'green','children':_0x1c2038}):a104_0x5e5f1f(Text,{'color':_0x2e7671(0xcc),'children':'_'}),_0x46c55f&&a104_0x428c48(Text,{'color':_0x2e7671(0xca),'children':[_0x2e7671(0xbc),_0x46c55f]})]}),!_0x46c55f&&!_0x1c2038&&a104_0x5e5f1f(Box,{'children':a104_0x5e5f1f(Text,{'color':_0x2e7671(0xcc),'children':_0x2e7671(0xd8)})})]});if(_0x42c8b2)return a104_0x428c48(Box,{'flexDirection':_0x2e7671(0xe0),'children':[a104_0x428c48(Text,{'color':_0x2e7671(0xdc),'children':['✓\x20',_0x2e7671(0xc6)]}),a104_0x428c48(Text,{'color':_0x2e7671(0xb9),'children':['AppCode',':\x20',_0x18710d]}),a104_0x5e5f1f(Text,{'children':_0x2e7671(0xb8)})]});return a104_0x5e5f1f(Box,{'children':a104_0x5e5f1f(Text,{'children':_0x2e7671(0xc5)})});}
|
|
1
|
+
function a104_0x2093(_0x238c78,_0x4230f4){_0x238c78=_0x238c78-0x197;const _0x48e34e=a104_0x48e3();let _0x209379=_0x48e34e[_0x238c78];return _0x209379;}const a104_0x1665e6=a104_0x2093;(function(_0x53cee6,_0x204689){const _0x25661c=a104_0x2093,_0x311ae3=_0x53cee6();while(!![]){try{const _0x3f8c02=parseInt(_0x25661c(0x1cf))/0x1*(-parseInt(_0x25661c(0x1c9))/0x2)+-parseInt(_0x25661c(0x19a))/0x3*(-parseInt(_0x25661c(0x1d2))/0x4)+parseInt(_0x25661c(0x1bf))/0x5+-parseInt(_0x25661c(0x1d1))/0x6+-parseInt(_0x25661c(0x1d4))/0x7*(-parseInt(_0x25661c(0x1c4))/0x8)+parseInt(_0x25661c(0x1b7))/0x9*(parseInt(_0x25661c(0x1c2))/0xa)+-parseInt(_0x25661c(0x1d3))/0xb*(-parseInt(_0x25661c(0x1ac))/0xc);if(_0x3f8c02===_0x204689)break;else _0x311ae3['push'](_0x311ae3['shift']());}catch(_0x3d83a6){_0x311ae3['push'](_0x311ae3['shift']());}}}(a104_0x48e3,0x689a7));import{jsxs as a104_0x36ab90,jsx as a104_0x3683b5}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,join,dirname}from'node:path';import{fileURLToPath}from'node:url';function a104_0x48e3(){const _0x1be198=['Checking\x20existing\x20configuration...','column','length','utf8','cwd','../..','red','\x20\x20The\x20old\x20file\x20will\x20be\x20renamed\x20to\x20*.bak','checking','string','Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','3072564NFMJjT','1.0.0','env','toLocaleString','log','production','message','\x20←\x20','从旧配置文件升级成功','App\x20Code\x20cannot\x20exceed\x20100\x20characters','error','10683baSOlx','parse','pop','trim','ctrl','info','cyan','\x0aMigration\x20cancelled.\x20Run\x20`rabetbase\x20project\x20init`\x20to\x20start\x20fresh.','1050760CmBFdj','migrating-input','Error:\x20','530jKKVqT','assign','23336qdFImJ','yellow','appcode','Please\x20enter\x20App\x20Code:','exit','2SGJJcx','\x20\x20appcode:\x20','.lovrabetrc','backspace','.lovrabet.json','split','353590yXdCaR','createdAt','2142942NpIiJs','20lIgfUG','11wYeZVj','1197AZjnGm','keys','migrating','version','package.json','App\x20Code\x20cannot\x20be\x20empty','green','AppCode','You\x20can\x20now\x20use\x20commands\x20like\x20\x27rabetbase\x20api\x20doc\x27\x20and\x20\x27rabetbase\x20api\x20pull\x27','init-input','Upgrade\x20it\x20to\x20','setLogPath','Old\x20file\x20backed\x20up\x20as\x20','Migrating\x20legacy\x20config...','.bak','App\x20Code\x20identifies\x20your\x20project.\x20Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','✓\x20Upgraded\x20','66771xULwjz','return','app','创建配置文件失败','gray','init','success'];a104_0x48e3=function(){return _0x1be198;};return a104_0x48e3();}import{logger}from'../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME}from'../context.js';const LEGACY_CONFIG_NAMES=[a104_0x1665e6(0x1cd),a104_0x1665e6(0x1cb)];export function Init({appcode:_0x1f0c35,env:_0x5f3bf0,autoYes:_0x882dfa}){const _0x917876=a104_0x1665e6,[_0x7c50a8,_0x306442]=useState(_0x917876(0x1a9)),[_0x2dbf56,_0x44388e]=useState(null),[_0x3219c8,_0x25cb29]=useState(![]),[_0x5a161e,_0xbc6685]=useState(!_0x1f0c35),[_0x2fb085,_0x2d5b29]=useState(''),[_0x21eb6a,_0x1f3855]=useState(''),[_0x3410e3,_0x5c02f9]=useState(_0x1f0c35||''),[_0x9124e2]=useState(_0x5f3bf0),[_0x189188,_0x48e5d1]=useState(),[_0x39ec6a,_0x6f7044]=useState({});function _0x472e2f(_0x1e5a31){const _0xfc8bd7=_0x917876;if(_0x1e5a31['length']===0x0)return{'valid':![],'message':''};if(_0x1e5a31['length']>0x64)return{'valid':![],'message':_0xfc8bd7(0x1b5)};const _0x55dfe5=/^[A-Za-z0-9_-]+$/;if(!_0x55dfe5['test'](_0x1e5a31))return{'valid':![],'message':'App\x20Code\x20can\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_'};return{'valid':!![]};}useInput((_0x2ca05c,_0x4d0ca7)=>{const _0x5410b9=_0x917876;if(_0x7c50a8===_0x5410b9(0x1c0)){if(_0x4d0ca7[_0x5410b9(0x19b)]||_0x2ca05c==='y'||_0x2ca05c==='Y')_0x306442('migrating');else{if(_0x2ca05c==='n'||_0x2ca05c==='N'||_0x4d0ca7['escape'])console[_0x5410b9(0x1b0)](_0x5410b9(0x1be)),process[_0x5410b9(0x1c8)](0x0);else _0x4d0ca7[_0x5410b9(0x1bb)]&&_0x2ca05c==='c'&&process[_0x5410b9(0x1c8)](0x0);}return;}if(!_0x5a161e)return;if(_0x4d0ca7[_0x5410b9(0x19b)]){if(_0x21eb6a||!_0x2fb085[_0x5410b9(0x1ba)]()){_0x1f3855(_0x5410b9(0x1d9));return;}const _0x2b5525=_0x2fb085[_0x5410b9(0x1ba)](),{valid:_0x50de29,message:_0x254bee}=_0x472e2f(_0x2b5525);if(!_0x50de29){_0x1f3855(_0x254bee||'Invalid\x20App\x20Code');return;}_0x5c02f9(_0x2b5525),_0xbc6685(![]);}else{if(_0x4d0ca7[_0x5410b9(0x1cc)]||_0x4d0ca7['delete'])_0x2d5b29(_0x37b1c4=>{const _0x20a5df=_0x5410b9,_0x38afbe=_0x37b1c4['slice'](0x0,-0x1);return _0x1f3855(_0x38afbe['length']===0x0?'':_0x472e2f(_0x38afbe)[_0x20a5df(0x1b2)]||''),_0x38afbe;});else _0x4d0ca7[_0x5410b9(0x1bb)]&&_0x2ca05c==='c'?process[_0x5410b9(0x1c8)](0x0):_0x2d5b29(_0x5c9786=>{const _0x3b8e29=_0x5410b9,_0x830760=_0x5c9786+_0x2ca05c;return _0x1f3855(_0x472e2f(_0x830760)[_0x3b8e29(0x1b2)]||''),_0x830760;});}},{'isActive':_0x7c50a8===_0x917876(0x1c0)||_0x7c50a8===_0x917876(0x1dd)}),useEffect(()=>{const _0x1506ab=_0x917876;if(_0x7c50a8!==_0x1506ab(0x1a9))return;const _0x807925=process[_0x1506ab(0x1a5)]();if(getProjectConfigPath()){_0x44388e('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.'),_0x306442(_0x1506ab(0x1b6)),setTimeout(()=>process[_0x1506ab(0x1c8)](0x1),0x64);return;}let _0x4de27b;for(const _0x24bd79 of LEGACY_CONFIG_NAMES){const _0x75779=resolve(_0x807925,_0x24bd79);if(existsSync(_0x75779)){_0x4de27b=_0x75779;break;}}if(_0x4de27b){_0x48e5d1(_0x4de27b);try{const _0x5e8679=readFileSync(_0x4de27b,_0x1506ab(0x1a4));_0x6f7044(JSON['parse'](_0x5e8679));}catch{_0x6f7044({});}_0x882dfa?_0x306442(_0x1506ab(0x1d6)):_0x306442(_0x1506ab(0x1c0));return;}_0x306442('init-input'),!_0x1f0c35?_0xbc6685(!![]):_0xbc6685(![]);},[_0x7c50a8,_0x882dfa,_0x1f0c35]),useEffect(()=>{const _0x4ea392=_0x917876;if(_0x7c50a8!=='migrating')return;const _0x459572=process['cwd'](),_0x44b01f=resolve(_0x459572,NEW_CONFIG_NAME);try{const _0x4505da=fileURLToPath(import.meta.url),_0x5d96d4=resolve(dirname(_0x4505da),_0x4ea392(0x1a6)),_0x301028=join(_0x5d96d4,_0x4ea392(0x1d8));let _0x2dd2b2=_0x4ea392(0x1ad);try{const _0x12c450=JSON[_0x4ea392(0x1b8)](readFileSync(_0x301028,_0x4ea392(0x1a4)));_0x2dd2b2=_0x12c450[_0x4ea392(0x1d7)]||_0x4ea392(0x1ad);}catch{}const _0x4497d8=readRawConfig(),_0x57dfd1={..._0x4497d8,..._0x39ec6a,'version':_0x2dd2b2,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0x189188};if(!_0x57dfd1[_0x4ea392(0x1c6)]&&!_0x57dfd1['app']){if(!_0x1f0c35){_0x6f7044(_0x57dfd1),_0x306442(_0x4ea392(0x1dd)),_0xbc6685(!![]);return;}_0x57dfd1['appcode']=_0x1f0c35;}if(_0x57dfd1[_0x4ea392(0x1ae)]&&typeof _0x57dfd1['env']!==_0x4ea392(0x1aa))delete _0x57dfd1[_0x4ea392(0x1ae)];else!_0x57dfd1['env']&&(_0x57dfd1[_0x4ea392(0x1ae)]=_0x4497d8[_0x4ea392(0x1ae)]||_0x4ea392(0x1b1));writeConfigFile(_0x44b01f,_0x57dfd1);if(_0x189188){const _0x2954b4=_0x189188+_0x4ea392(0x197);renameSync(_0x189188,_0x2954b4);}logger[_0x4ea392(0x1df)](_0x459572),logger[_0x4ea392(0x1bc)](_0x4ea392(0x19f),_0x4ea392(0x1b4),{'from':_0x189188,'to':_0x44b01f,'appcode':_0x57dfd1[_0x4ea392(0x1c6)]||_0x57dfd1[_0x4ea392(0x19c)],'env':_0x57dfd1['env']}),_0x25cb29(!![]),_0x306442('success'),setTimeout(()=>process['exit'](0x0),0x64);}catch(_0x1cba2d){logger[_0x4ea392(0x1b6)](_0x4ea392(0x19f),'升级配置文件失败',{'error':_0x1cba2d instanceof Error?_0x1cba2d[_0x4ea392(0x1b2)]:String(_0x1cba2d)}),_0x44388e(_0x4ea392(0x1c1)+(_0x1cba2d instanceof Error?_0x1cba2d[_0x4ea392(0x1b2)]:String(_0x1cba2d))),_0x306442('error'),setTimeout(()=>process[_0x4ea392(0x1c8)](0x1),0x64);}},[_0x7c50a8]),useEffect(()=>{const _0x5605cf=_0x917876;if(_0x7c50a8!=='init')return;const _0x2519b7=process[_0x5605cf(0x1a5)](),_0x1ea11d=resolve(_0x2519b7,NEW_CONFIG_NAME);try{const _0x5c7f23=fileURLToPath(import.meta.url),_0x9b6c1c=resolve(dirname(_0x5c7f23),_0x5605cf(0x1a6)),_0x2ef121=join(_0x9b6c1c,_0x5605cf(0x1d8));let _0x4dad25=_0x5605cf(0x1ad);try{const _0x5472fe=JSON[_0x5605cf(0x1b8)](readFileSync(_0x2ef121,_0x5605cf(0x1a4)));_0x4dad25=_0x5472fe[_0x5605cf(0x1d7)]||_0x5605cf(0x1ad);}catch{}const _0x344974=readRawConfig(),_0x1e86be=typeof _0x344974['env']===_0x5605cf(0x1aa)?_0x344974[_0x5605cf(0x1ae)]:undefined,_0x37b002={};_0x39ec6a&&Object[_0x5605cf(0x1d5)](_0x39ec6a)[_0x5605cf(0x1a3)]>0x0&&Object[_0x5605cf(0x1c3)](_0x37b002,_0x39ec6a),!_0x37b002['version']&&(_0x37b002[_0x5605cf(0x1d7)]=_0x4dad25),!_0x37b002[_0x5605cf(0x1d0)]&&(_0x37b002['createdAt']=new Date()[_0x5605cf(0x1af)]()),!_0x37b002[_0x5605cf(0x1c6)]&&!_0x37b002['app']&&(_0x37b002['appcode']=_0x3410e3),!_0x37b002[_0x5605cf(0x1ae)]&&(_0x37b002[_0x5605cf(0x1ae)]=_0x9124e2||_0x1e86be||_0x5605cf(0x1b1)),writeConfigFile(_0x1ea11d,_0x37b002),logger['setLogPath'](_0x2519b7),logger[_0x5605cf(0x1bc)](_0x5605cf(0x19f),'初始化项目配置文件成功',{'appcode':_0x37b002[_0x5605cf(0x1c6)]||_0x37b002[_0x5605cf(0x19c)],'env':_0x37b002[_0x5605cf(0x1ae)],'version':_0x37b002[_0x5605cf(0x1d7)],'configPath':_0x1ea11d}),_0x25cb29(!![]),_0x306442('success'),setTimeout(()=>process[_0x5605cf(0x1c8)](0x0),0x64);}catch(_0x2c224b){logger[_0x5605cf(0x1b6)](_0x5605cf(0x19f),_0x5605cf(0x19d),{'error':_0x2c224b instanceof Error?_0x2c224b[_0x5605cf(0x1b2)]:String(_0x2c224b)}),_0x44388e(_0x5605cf(0x1c1)+(_0x2c224b instanceof Error?_0x2c224b[_0x5605cf(0x1b2)]:String(_0x2c224b))),_0x306442(_0x5605cf(0x1b6)),setTimeout(()=>process[_0x5605cf(0x1c8)](0x1),0x64);}},[_0x7c50a8,_0x3410e3,_0x9124e2]),useEffect(()=>{const _0x446617=_0x917876;_0x7c50a8===_0x446617(0x1dd)&&!_0x5a161e&&(_0x3410e3||_0x39ec6a&&Object['keys'](_0x39ec6a)[_0x446617(0x1a3)]>0x0)&&_0x306442('init');},[_0x7c50a8,_0x5a161e,_0x3410e3]);if(_0x2dbf56)return a104_0x3683b5(Box,{'flexDirection':_0x917876(0x1a2),'children':a104_0x36ab90(Text,{'color':_0x917876(0x1a7),'children':['✗\x20',_0x2dbf56]})});if(_0x7c50a8===_0x917876(0x1c0)){const _0xdb717c=_0x189188?_0x189188[_0x917876(0x1ce)]('/')[_0x917876(0x1b9)]():'legacy\x20config',_0x23a3b7=_0x39ec6a?.[_0x917876(0x1c6)]||_0x39ec6a?.['app'];return a104_0x36ab90(Box,{'flexDirection':'column','children':[a104_0x36ab90(Text,{'color':_0x917876(0x1c5),'children':['⚠\x20Found\x20legacy\x20configuration\x20file:\x20',a104_0x3683b5(Text,{'bold':!![],'children':_0xdb717c})]}),_0x23a3b7&&a104_0x36ab90(Text,{'color':_0x917876(0x1bd),'children':[_0x917876(0x1ca),_0x23a3b7]}),a104_0x36ab90(Text,{'children':['\x0a',_0x917876(0x1de),a104_0x3683b5(Text,{'bold':!![],'children':'.rabetbase.json'}),'?','\x20',a104_0x3683b5(Text,{'color':_0x917876(0x1da),'children':'[Y/n]'})]}),a104_0x3683b5(Text,{'color':'gray','children':_0x917876(0x1a8)})]});}if(_0x7c50a8==='init-input'&&_0x5a161e)return a104_0x36ab90(Box,{'flexDirection':_0x917876(0x1a2),'children':[a104_0x36ab90(Box,{'children':[a104_0x36ab90(Text,{'color':'cyan','children':[_0x917876(0x1c7),'\x20']}),_0x2fb085?a104_0x3683b5(Text,{'color':'green','children':_0x2fb085}):a104_0x3683b5(Text,{'color':_0x917876(0x19e),'children':'_'}),_0x21eb6a&&a104_0x36ab90(Text,{'color':_0x917876(0x1a7),'children':[_0x917876(0x1b3),_0x21eb6a]})]}),!_0x21eb6a&&!_0x2fb085&&a104_0x3683b5(Box,{'children':a104_0x3683b5(Text,{'color':_0x917876(0x19e),'children':_0x917876(0x198)})})]});if(_0x7c50a8===_0x917876(0x1d6))return a104_0x3683b5(Box,{'children':a104_0x3683b5(Text,{'children':_0x917876(0x1e1)})});if(_0x7c50a8==='init')return a104_0x3683b5(Box,{'children':a104_0x3683b5(Text,{'children':'Initializing\x20configuration\x20file...'})});if(_0x3219c8||_0x7c50a8===_0x917876(0x1a0)){const _0x148670=_0x189188?_0x189188[_0x917876(0x1ce)]('/')[_0x917876(0x1b9)]():undefined;if(_0x148670)return a104_0x36ab90(Box,{'flexDirection':_0x917876(0x1a2),'children':[a104_0x36ab90(Text,{'color':_0x917876(0x1da),'children':[_0x917876(0x199),_0x148670,'\x20→\x20.rabetbase.json']}),a104_0x36ab90(Text,{'color':_0x917876(0x1bd),'children':[_0x917876(0x1db),':\x20',_0x39ec6a?.[_0x917876(0x1c6)]||_0x39ec6a?.[_0x917876(0x19c)]]}),a104_0x36ab90(Text,{'color':_0x917876(0x19e),'children':[_0x917876(0x1e0),_0x148670,_0x917876(0x197)]})]});return a104_0x36ab90(Box,{'flexDirection':_0x917876(0x1a2),'children':[a104_0x36ab90(Text,{'color':_0x917876(0x1da),'children':['✓\x20',_0x917876(0x1ab)]}),a104_0x36ab90(Text,{'color':_0x917876(0x1bd),'children':[_0x917876(0x1db),':\x20',_0x3410e3]}),a104_0x3683b5(Text,{'children':_0x917876(0x1dc)})]});}return a104_0x3683b5(Box,{'children':a104_0x3683b5(Text,{'children':_0x917876(0x1a1)})});}
|
package/lib/mcp/McpInstallUI.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x47f2b2,_0x59365){const _0x5cc653=a105_0x3eb3,_0x45f0a7=_0x47f2b2();while(!![]){try{const _0x5f1021=-parseInt(_0x5cc653(0x153))/0x1*(parseInt(_0x5cc653(0x13e))/0x2)+parseInt(_0x5cc653(0x12e))/0x3+-parseInt(_0x5cc653(0x12d))/0x4+parseInt(_0x5cc653(0x146))/0x5*(-parseInt(_0x5cc653(0x137))/0x6)+-parseInt(_0x5cc653(0x129))/0x7+parseInt(_0x5cc653(0x13c))/0x8*(-parseInt(_0x5cc653(0x14b))/0x9)+parseInt(_0x5cc653(0x127))/0xa*(parseInt(_0x5cc653(0x14d))/0xb);if(_0x5f1021===_0x59365)break;else _0x45f0a7['push'](_0x45f0a7['shift']());}catch(_0x229afe){_0x45f0a7['push'](_0x45f0a7['shift']());}}}(a105_0x3351,0xa570a));import{jsx as a105_0x2a27bf,jsxs as a105_0x55f8d8,Fragment as a105_0x1af7c2}from'react/jsx-runtime';import{useState,useEffect,useMemo}from'react';import{Text,Box,useInput,useApp}from'ink';function a105_0x3eb3(_0x14e238,_0x39250d){_0x14e238=_0x14e238-0x126;const _0x335179=a105_0x3351();let _0x3eb37e=_0x335179[_0x14e238];return _0x3eb37e;}import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{installMcp}from'./mcp-installer.js';function a105_0x3351(){const _0x38e112=['return','map','✓\x20MCP\x20configuration\x20completed!','find','3422556Itgfgr','⚠️\x20Configuration\x20requires\x20manual\x20steps','7384993GNTmck','Press\x20any\x20key\x20to\x20exit...','column','name','cyan','selecting','191458xRbNqb','yellow','success','selectedIndexes','50KqiPGh','green','6386849GXrYFu','Other\x20IDE','error','ide','3732096oimnGb','2559513zgtJAE','handleKeyDown','message','size','done','description','⚠️\x20','other','white','4409322rWUuNa','setErrorMsg','manual','Selected\x20IDEs','some','16JzQwXq','status','2UfYPuN','from','red','every','key','needsManualAction','length','Configuring\x20MCP\x20server...','5svxFyq'];a105_0x3351=function(){return _0x38e112;};return a105_0x3351();}export function McpInstallUI({preselectedIDEs:preselectedIDEs=[],enableBffSave:_0x4c2fe8}){const _0x5ee9bc=a105_0x3eb3,{exit:_0x332039}=useApp(),[_0x4e1f1d,_0x2f3117]=useState(_0x5ee9bc(0x152)),[_0x114610,_0x4028e3]=useState([]),[_0x7dd21c,_0x484c2b]=useState([]),_0x4ed90d=useMemo(()=>[...Array[_0x5ee9bc(0x13f)](MCP_IDES)[_0x5ee9bc(0x148)](_0xb10d56=>({'key':_0xb10d56,'name':IDE_CONFIGS[_0xb10d56]['name'],'description':IDE_CONFIGS[_0xb10d56][_0x5ee9bc(0x133)]})),{'key':_0x5ee9bc(0x135),'name':_0x5ee9bc(0x12a),'description':'Other\x20IDE\x20configuration\x20guide'}],[]),_0x1bc7bd=useIDESelection({'ideList':_0x4ed90d,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x96260b=_0x5ee9bc;preselectedIDEs[_0x96260b(0x144)]>0x0&&_0x1bc7bd[_0x96260b(0x126)]['size']>0x0&&_0x59ae00();},[]),useInput((_0x5974eb,_0xe79ccd)=>{const _0x10efc8=_0x5ee9bc;if(_0x4e1f1d===_0x10efc8(0x152)){if(_0x5974eb==='q'||_0x5974eb==='Q'){_0x332039();return;}if(_0xe79ccd[_0x10efc8(0x147)]){if(_0x1bc7bd[_0x10efc8(0x126)]['size']===0x0){_0x1bc7bd[_0x10efc8(0x138)]('Please\x20select\x20at\x20least\x20one\x20IDE');return;}_0x59ae00();return;}_0x1bc7bd[_0x10efc8(0x12f)](_0x5974eb,_0xe79ccd);}_0x4e1f1d===_0x10efc8(0x132)&&_0x332039();});async function _0x59ae00(){const _0x2e068e=_0x5ee9bc,_0x533717=_0x1bc7bd['getSelectedIDEs']();_0x4028e3([{'label':_0x2e068e(0x13a),'value':''+_0x1bc7bd[_0x2e068e(0x126)][_0x2e068e(0x131)]}]),_0x2f3117('configuring');const _0x40d3cf=await installMcp(_0x533717,_0x4c2fe8),_0x2d76f1=_0x40d3cf['map'](_0x21b557=>({'ide':_0x4ed90d[_0x2e068e(0x14a)](_0x456d93=>_0x456d93[_0x2e068e(0x142)]===_0x21b557[_0x2e068e(0x12c)])?.[_0x2e068e(0x150)]||_0x21b557[_0x2e068e(0x12c)],'status':_0x21b557[_0x2e068e(0x143)]?'manual':_0x21b557['success']?_0x2e068e(0x155):_0x2e068e(0x12b),'message':_0x21b557[_0x2e068e(0x130)]}));_0x484c2b(_0x2d76f1),_0x2f3117('done'),setTimeout(()=>{_0x332039();},0x1388);}return a105_0x55f8d8(Box,{'flexDirection':_0x5ee9bc(0x14f),'marginTop':0x1,'children':[_0x4e1f1d===_0x5ee9bc(0x152)&&a105_0x2a27bf(IDESelector,{'ideList':_0x4ed90d,'title':'Configure\x20Lovrabet\x20MCP\x20Server','selection':_0x1bc7bd}),_0x4e1f1d==='configuring'&&a105_0x55f8d8(a105_0x1af7c2,{'children':[_0x114610[_0x5ee9bc(0x148)]((_0x2a23df,_0x465c39)=>a105_0x55f8d8(Box,{'children':[a105_0x55f8d8(Text,{'color':'green','children':['√\x20',_0x2a23df['label'],':\x20']}),a105_0x2a27bf(Text,{'color':_0x5ee9bc(0x151),'children':_0x2a23df['value']})]},_0x465c39)),a105_0x2a27bf(Box,{'marginTop':0x1,'children':a105_0x2a27bf(Text,{'children':_0x5ee9bc(0x145)})})]}),_0x4e1f1d==='done'&&a105_0x2a27bf(DoneStep,{'configResults':_0x7dd21c})]});}function DoneStep({configResults:_0x249691}){const _0x3fb454=a105_0x3eb3,_0x4bd0fd=_0x249691[_0x3fb454(0x141)](_0x1ad0ef=>_0x1ad0ef[_0x3fb454(0x13d)]===_0x3fb454(0x155)),_0x1731c5=_0x249691[_0x3fb454(0x13b)](_0x2759d1=>_0x2759d1[_0x3fb454(0x13d)]===_0x3fb454(0x139)),_0x28509e=_0x249691['some'](_0x1a8077=>_0x1a8077[_0x3fb454(0x13d)]===_0x3fb454(0x12b));return a105_0x55f8d8(Box,{'flexDirection':_0x3fb454(0x14f),'children':[a105_0x2a27bf(Box,{'marginTop':0x1,'marginBottom':0x1,'children':_0x4bd0fd?a105_0x2a27bf(Text,{'color':'green','bold':!![],'children':_0x3fb454(0x149)}):_0x1731c5?a105_0x2a27bf(Text,{'color':_0x3fb454(0x154),'bold':!![],'children':'⚠️\x20Some\x20configurations\x20require\x20manual\x20steps'}):_0x28509e?a105_0x2a27bf(Text,{'color':_0x3fb454(0x140),'bold':!![],'children':'✗\x20Configuration\x20failed'}):a105_0x2a27bf(Text,{'color':_0x3fb454(0x154),'bold':!![],'children':_0x3fb454(0x14c)})}),_0x249691['map']((_0x35d5d7,_0x2faec6)=>{const _0x5d407c=_0x3fb454,_0x2b10ed=_0x35d5d7[_0x5d407c(0x13d)]===_0x5d407c(0x155),_0x1a4159=_0x35d5d7['status']===_0x5d407c(0x139);return a105_0x55f8d8(Box,{'flexDirection':'column','marginBottom':0x1,'children':[a105_0x2a27bf(Box,{'children':a105_0x55f8d8(Text,{'bold':!![],'color':_0x2b10ed?_0x5d407c(0x128):_0x1a4159?_0x5d407c(0x154):_0x5d407c(0x140),'children':[_0x2b10ed?'✓\x20':_0x1a4159?_0x5d407c(0x134):'✗\x20',_0x35d5d7[_0x5d407c(0x12c)],':']})}),a105_0x2a27bf(Box,{'paddingLeft':0x3,'flexDirection':'column','children':a105_0x2a27bf(Text,{'color':_0x5d407c(0x136),'children':_0x35d5d7[_0x5d407c(0x130)]})})]},_0x2faec6);}),a105_0x2a27bf(Box,{'marginTop':0x1,'children':a105_0x2a27bf(Text,{'color':'gray','children':_0x3fb454(0x14e)})})]});}
|
package/lib/mcp/claude.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a106_0x47ce(_0x2d8d03,_0x345a11){_0x2d8d03=_0x2d8d03-0x9b;const _0x4d33f2=a106_0x4d33();let _0x47ce80=_0x4d33f2[_0x2d8d03];return _0x47ce80;}(function(_0x342199,_0x5bf68d){const _0xa48f7b=a106_0x47ce,_0x4abbab=_0x342199();while(!![]){try{const _0x42a598=-parseInt(_0xa48f7b(0x9e))/0x1*(parseInt(_0xa48f7b(0xa6))/0x2)+-parseInt(_0xa48f7b(0xac))/0x3*(parseInt(_0xa48f7b(0xa5))/0x4)+-parseInt(_0xa48f7b(0xa2))/0x5*(-parseInt(_0xa48f7b(0x9c))/0x6)+parseInt(_0xa48f7b(0xa4))/0x7*(parseInt(_0xa48f7b(0xa7))/0x8)+parseInt(_0xa48f7b(0xa8))/0x9*(-parseInt(_0xa48f7b(0xa0))/0xa)+-parseInt(_0xa48f7b(0xaa))/0xb*(-parseInt(_0xa48f7b(0xa9))/0xc)+parseInt(_0xa48f7b(0xa3))/0xd;if(_0x42a598===_0x5bf68d)break;else _0x4abbab['push'](_0x4abbab['shift']());}catch(_0xc678a4){_0x4abbab['push'](_0x4abbab['shift']());}}}(a106_0x4d33,0x4e2c9));import{configureClaudeMcp as a106_0x36c6c9}from'./mcp-installer.js';function a106_0x4d33(){const _0x42cb65=['2sRmQyb','\x0aError:\x20Configuration\x20failed\x20-\x20','2941990OtRPaa','\x0a📋\x20','6630lzCilj','1911754EFywMY','24297MpvXDp','5248hUNhmr','470870bmtgUZ','8qWmsjn','9TdPRKn','12zJGOyz','6124525duiDYJ','cwd','12htTplp','error','success','message','1734OLVnEw','log'];a106_0x4d33=function(){return _0x42cb65;};return a106_0x4d33();}export async function configureClaudeMcp(){const _0x942281=a106_0x47ce,_0x56c7ca=process[_0x942281(0xab)](),_0x4d87e3=a106_0x36c6c9(_0x56c7ca);_0x4d87e3[_0x942281(0xae)]?(console[_0x942281(0x9d)](_0x942281(0xa1)+_0x4d87e3[_0x942281(0x9b)]+'\x0a'),process['exit'](0x0)):(console[_0x942281(0xad)](_0x942281(0x9f)+_0x4d87e3[_0x942281(0x9b)]+'\x0a'),process['exit'](0x1));}
|
package/lib/mcp/cursor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a107_0x1248(_0x1ca9c1,_0xe2d461){_0x1ca9c1=_0x1ca9c1-0x1f4;const _0x500f97=a107_0x500f();let _0x12480b=_0x500f97[_0x1ca9c1];return _0x12480b;}(function(_0x24adee,_0x2e395f){const _0x2cacf2=a107_0x1248,_0x1554d2=_0x24adee();while(!![]){try{const _0xf96d27=-parseInt(_0x2cacf2(0x1fc))/0x1*(parseInt(_0x2cacf2(0x1f6))/0x2)+parseInt(_0x2cacf2(0x1f4))/0x3*(-parseInt(_0x2cacf2(0x201))/0x4)+parseInt(_0x2cacf2(0x1fb))/0x5*(-parseInt(_0x2cacf2(0x202))/0x6)+parseInt(_0x2cacf2(0x1ff))/0x7*(parseInt(_0x2cacf2(0x1fa))/0x8)+-parseInt(_0x2cacf2(0x1f5))/0x9*(parseInt(_0x2cacf2(0x1fe))/0xa)+parseInt(_0x2cacf2(0x1f9))/0xb*(-parseInt(_0x2cacf2(0x207))/0xc)+-parseInt(_0x2cacf2(0x1fd))/0xd*(-parseInt(_0x2cacf2(0x20b))/0xe);if(_0xf96d27===_0x2e395f)break;else _0x1554d2['push'](_0x1554d2['shift']());}catch(_0x563d05){_0x1554d2['push'](_0x1554d2['shift']());}}}(a107_0x500f,0x3d838));import{configureCursorMcp as a107_0x324555}from'./mcp-installer.js';function a107_0x500f(){const _0x2bbe3e=['20489JiCSxa','\x0aError:\x20Configuration\x20failed\x20-\x20','1964GBNXOv','1495662iwLExf','You\x20can\x20now\x20use\x20Lovrabet\x20dataset\x20MCP\x20tools\x20in\x20Cursor.','\x0a✓\x20Cursor\x20MCP\x20configured\x20successfully!\x0a','exit','Please\x20restart\x20Cursor\x20to\x20load\x20the\x20new\x20MCP\x20config.','12RlFvdU','Configuration:','cwd','message','10864WvUlfH','582eGjxOx','9abrcSa','189026RGgPjH','success','log','900911ektuJE','24PaXxxy','10OYOfwB','5nhEoXW','25688RwOWwU','1419230nztyIh'];a107_0x500f=function(){return _0x2bbe3e;};return a107_0x500f();}export async function configureCursorMcp(){const _0x5d9116=a107_0x1248,_0x1e585f=process[_0x5d9116(0x209)](),_0x905dac=await a107_0x324555(_0x1e585f);_0x905dac[_0x5d9116(0x1f7)]?(console['log'](_0x5d9116(0x204)),console['log'](_0x5d9116(0x208)),console[_0x5d9116(0x1f8)]('\x20\x20'+_0x905dac[_0x5d9116(0x20a)]+'\x0a'),console[_0x5d9116(0x1f8)](_0x5d9116(0x203)),console[_0x5d9116(0x1f8)](_0x5d9116(0x206)),process[_0x5d9116(0x205)](0x0)):(console['error'](_0x5d9116(0x200)+_0x905dac[_0x5d9116(0x20a)]+'\x0a'),process[_0x5d9116(0x205)](0x1));}
|
package/lib/mcp/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x416b93,_0x50225b){const _0x4a95d8=a108_0x2da4,_0x56e41d=_0x416b93();while(!![]){try{const _0x4fa7e3=-parseInt(_0x4a95d8(0xc4))/0x1+parseInt(_0x4a95d8(0xc3))/0x2+-parseInt(_0x4a95d8(0xab))/0x3+-parseInt(_0x4a95d8(0xc1))/0x4+-parseInt(_0x4a95d8(0xbd))/0x5*(-parseInt(_0x4a95d8(0xbe))/0x6)+-parseInt(_0x4a95d8(0xa6))/0x7+parseInt(_0x4a95d8(0xc6))/0x8*(-parseInt(_0x4a95d8(0xb7))/0x9);if(_0x4fa7e3===_0x50225b)break;else _0x56e41d['push'](_0x56e41d['shift']());}catch(_0x4ea159){_0x56e41d['push'](_0x56e41d['shift']());}}}(a108_0x42f3,0xb2319));import{installMcp}from'./mcp-installer.js';function a108_0x42f3(){const _0x51abba=['1250585JGauBh','description','join','\x20\x20rabetbase\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20MCP\x20configuration','\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','1057485EmqYfq','needsManualAction','claude','has','setLogPath','\x20\x20rabetbase\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','ide','\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','message','split','mcp','install','167859AkkqpV','toLowerCase','--help','enableBffSave','help','Error:\x20Unsupported\x20command:\x20','115170hvdOKR','294gnVBsC','exit','error','1278580ZlnmRt','name','2905036VefXqi','702092tkGdNo','mcpCursor','128QHhOZa','log','map','cwd','\x20-\x20'];a108_0x42f3=function(){return _0x51abba;};return a108_0x42f3();}import{logger}from'../utils/logger.js';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';export async function mcpCommand(_0x2409db,_0x6a6f61,_0x1e9341){const _0x15fba9=a108_0x2da4;logger[_0x15fba9(0xaf)](process[_0x15fba9(0xa4)]());if(_0x1e9341?.[_0x15fba9(0xbb)]||_0x2409db===_0x15fba9(0xb9)){showHelp();return;}_0x2409db!==_0x15fba9(0xb6)&&(console[_0x15fba9(0xc0)](_0x15fba9(0xbc)+(_0x2409db||'-')),console[_0x15fba9(0xa2)]('\x0aAvailable\x20commands:'),console[_0x15fba9(0xa2)](_0x15fba9(0xa9)),console['log'](_0x15fba9(0xb0)),logger[_0x15fba9(0xc0)](_0x15fba9(0xb5),_0x15fba9(0xbc)+(_0x2409db||'-')),process[_0x15fba9(0xbf)](0x1));let _0x52bb95;if(_0x1e9341?.[_0x15fba9(0xc5)])_0x52bb95='cursor';else{if(_0x1e9341?.['mcpClaude'])_0x52bb95=_0x15fba9(0xad);else{if(_0x6a6f61?.[0x0]){const _0x182521=_0x6a6f61[0x0][_0x15fba9(0xb8)]();MCP_IDES[_0x15fba9(0xae)](_0x182521)&&(_0x52bb95=_0x182521);}}}const _0x2c3e63=_0x52bb95?[_0x52bb95]:[],_0x5f03cd=await installMcp(_0x2c3e63,_0x1e9341?.[_0x15fba9(0xba)]);for(const _0x17a634 of _0x5f03cd){const _0x5d74e6=IDE_CONFIGS[_0x17a634[_0x15fba9(0xb1)]]?.['name']||_0x17a634[_0x15fba9(0xb1)],_0x191c1f=_0x17a634[_0x15fba9(0xac)]?'⚠️':_0x17a634['success']?'✓':'✗',_0x4afcad=_0x17a634['success']?console[_0x15fba9(0xa2)]:console[_0x15fba9(0xc0)];_0x4afcad(_0x191c1f+'\x20'+_0x5d74e6+':');const _0x48bb5f=_0x17a634[_0x15fba9(0xb3)][_0x15fba9(0xb4)]('\x0a');for(const _0xdc3654 of _0x48bb5f){_0x4afcad('\x20\x20'+_0xdc3654);}console[_0x15fba9(0xa2)]('');}}function a108_0x2da4(_0x44c571,_0x109356){_0x44c571=_0x44c571-0xa2;const _0x42f387=a108_0x42f3();let _0x2da455=_0x42f387[_0x44c571];return _0x2da455;}function showHelp(){const _0x578dbe=a108_0x2da4;console[_0x578dbe(0xa2)](_0x578dbe(0xb2)+Array['from'](MCP_IDES)[_0x578dbe(0xa3)]((_0x48247c,_0x5c62ca)=>'\x20\x20'+(_0x5c62ca+0x1)+'.\x20'+IDE_CONFIGS[_0x48247c][_0x578dbe(0xc2)]+_0x578dbe(0xa5)+IDE_CONFIGS[_0x48247c][_0x578dbe(0xa7)])[_0x578dbe(0xa8)]('\x0a')+_0x578dbe(0xaa));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a109_0x54f979=a109_0x3b44;function a109_0x3b94(){const _0x5127d6=['995646pgUnBl','claude','success','Cursor','cursor','needsManualAction','5330169QNlnEg','error','25564kvMkLX','1251526gfHhuM','length','cwd','log','Claude\x20Code','\x20succeeded)','6bJtEZR','1175525TYSJEG','904sXCkRH','setLogPath','Start\x20configuring\x20MCP','split','\x0a✓\x20MCP\x20configuration\x20completed\x20(','some','7194jbBZTu','5050YFnxNs','mcp-install-non-interactive','501983YYnXwe','message','4iIigHh'];a109_0x3b94=function(){return _0x5127d6;};return a109_0x3b94();}(function(_0x15ba74,_0x255407){const _0x2469d9=a109_0x3b44,_0x38e7df=_0x15ba74();while(!![]){try{const _0x1482ce=parseInt(_0x2469d9(0x167))/0x1+parseInt(_0x2469d9(0x156))/0x2+-parseInt(_0x2469d9(0x16a))/0x3*(parseInt(_0x2469d9(0x169))/0x4)+parseInt(_0x2469d9(0x15d))/0x5*(parseInt(_0x2469d9(0x15c))/0x6)+parseInt(_0x2469d9(0x155))/0x7*(-parseInt(_0x2469d9(0x15e))/0x8)+-parseInt(_0x2469d9(0x170))/0x9+parseInt(_0x2469d9(0x165))/0xa*(parseInt(_0x2469d9(0x164))/0xb);if(_0x1482ce===_0x255407)break;else _0x38e7df['push'](_0x38e7df['shift']());}catch(_0x550c8f){_0x38e7df['push'](_0x38e7df['shift']());}}}(a109_0x3b94,0x56fe2));import{installMcp}from'./mcp-installer.js';import{logger}from'../utils/logger.js';function a109_0x3b44(_0x290012,_0x3879f3){_0x290012=_0x290012-0x154;const _0x3b9408=a109_0x3b94();let _0x3b44ce=_0x3b9408[_0x290012];return _0x3b44ce;}export async function installMcpNonInteractive(_0x47c766,_0x210a14,_0x39fd43=process[a109_0x54f979(0x158)]()){const _0x1738c8=a109_0x54f979;logger[_0x1738c8(0x15f)](_0x39fd43),logger['info'](_0x1738c8(0x166),_0x1738c8(0x160),{'ides':_0x47c766,'enableBffSave':_0x210a14});const _0x3945f5=await installMcp(_0x47c766,_0x210a14,_0x39fd43);for(const _0x2c41e0 of _0x3945f5){const _0x5a7500=_0x2c41e0['ide']===_0x1738c8(0x16e)?_0x1738c8(0x16d):_0x2c41e0['ide']===_0x1738c8(0x16b)?_0x1738c8(0x15a):'Other\x20IDE',_0x84f50e=_0x2c41e0['needsManualAction']?'⚠️':_0x2c41e0[_0x1738c8(0x16c)]?'✓':'✗',_0x49c0cc=_0x2c41e0[_0x1738c8(0x16c)]?console[_0x1738c8(0x159)]:console[_0x1738c8(0x154)];_0x49c0cc(_0x84f50e+'\x20'+_0x5a7500+':');const _0x1e8c01=_0x2c41e0[_0x1738c8(0x168)][_0x1738c8(0x161)]('\x0a');for(const _0x25efde of _0x1e8c01){_0x49c0cc('\x20\x20'+_0x25efde);}console[_0x1738c8(0x159)]('');}const _0x16050b=_0x3945f5['filter'](_0x536836=>_0x536836['success'])[_0x1738c8(0x157)];console[_0x1738c8(0x159)](_0x1738c8(0x162)+_0x16050b+'/'+_0x3945f5[_0x1738c8(0x157)]+_0x1738c8(0x15b)),_0x3945f5[_0x1738c8(0x163)](_0x110d3c=>_0x110d3c[_0x1738c8(0x16f)])?(console['log'](''),console[_0x1738c8(0x159)]('⚠️\x20\x20Note:\x20Some\x20configurations\x20require\x20manual\x20commands,\x20please\x20follow\x20the\x20instructions\x20above')):console['log']('');}
|