@lovrabet/rabetbase-cli 2.0.2-beta.6 → 2.0.2-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ai-setup/config.js +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -0
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/doc.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/app.js +1 -1
- package/lib/commands/auth.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/new.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/build.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config.js +1 -1
- package/lib/commands/create.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/logout.js +1 -1
- package/lib/commands/logs.js +1 -1
- package/lib/commands/mcp.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/preview.js +1 -1
- package/lib/commands/project-upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run.js +1 -1
- package/lib/commands/skill.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/start.js +1 -1
- package/lib/config/config-help.js +1 -1
- package/lib/config/main.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/non-interactive.js +1 -1
- package/lib/create-app/task-finished.js +1 -1
- package/lib/create-app/task-loading.js +1 -1
- package/lib/create-app/task-running.js +1 -1
- package/lib/create-app/task-time.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/mcp/McpInstallUI.js +1 -1
- package/lib/mcp/claude.js +1 -1
- package/lib/mcp/cursor.js +1 -1
- package/lib/mcp/main.js +1 -1
- package/lib/mcp/mcp-install-non-interactive.js +1 -1
- package/lib/mcp/mcp-installer.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -0
- package/lib/telemetry/otel-logger-version.js +1 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -0
- package/lib/ui/IDESelector.js +1 -1
- package/lib/ui/useIDESelection.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/package.json +2 -1
package/lib/errors.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a97_0x56c2(_0xe4983d,_0x1b1ea0){_0xe4983d=_0xe4983d-0x86;const _0x3a48a1=a97_0x3a48();let _0x56c2ca=_0x3a48a1[_0xe4983d];return _0x56c2ca;}const a97_0xb21fac=a97_0x56c2;(function(_0x4f1deb,_0x15caa4){const _0x1aefd3=a97_0x56c2,_0x115848=_0x4f1deb();while(!![]){try{const _0x45c2cd=parseInt(_0x1aefd3(0xa0))/0x1+-parseInt(_0x1aefd3(0x98))/0x2+-parseInt(_0x1aefd3(0x9c))/0x3+parseInt(_0x1aefd3(0x9d))/0x4*(parseInt(_0x1aefd3(0x8a))/0x5)+-parseInt(_0x1aefd3(0x97))/0x6+-parseInt(_0x1aefd3(0x86))/0x7+parseInt(_0x1aefd3(0x8f))/0x8;if(_0x45c2cd===_0x15caa4)break;else _0x115848['push'](_0x115848['shift']());}catch(_0x4c708e){_0x115848['push'](_0x115848['shift']());}}}(a97_0x3a48,0x8d2fa));import{CLI_BIN_NAME}from'./constant/cli.js';export class CliError extends Error{[a97_0xb21fac(0x99)];[a97_0xb21fac(0x8e)];[a97_0xb21fac(0x8c)];constructor(_0xd7b486,_0x35f018,_0xa3701a,_0x13aab6){const _0x178a8=a97_0xb21fac;super(_0xa3701a),this[_0x178a8(0x88)]=_0x178a8(0x96),this[_0x178a8(0x99)]=_0xd7b486,this[_0x178a8(0x8e)]=_0x35f018,this['hint']=_0x13aab6;}}export const CliErrors={'authRequired':_0x1a0ea5=>new CliError(a97_0xb21fac(0x89),0x1,'Authentication\x20required',_0x1a0ea5??a97_0xb21fac(0x94)+CLI_BIN_NAME+'\x20auth`\x20to\x20login\x20first.'),'configMissing':_0xc471e2=>new CliError(a97_0xb21fac(0x9f),0x1,a97_0xb21fac(0x87),_0xc471e2??a97_0xb21fac(0x94)+CLI_BIN_NAME+a97_0xb21fac(0x92)),'notInProject':()=>new CliError(a97_0xb21fac(0xa1),0x1,'Not\x20in\x20a\x20'+CLI_BIN_NAME+'\x20project\x20directory',a97_0xb21fac(0x93)),'apiError':(_0x4b23fa,_0x50befa)=>new CliError(a97_0xb21fac(0x8d),0x2,_0x4b23fa,_0x50befa),'networkError':_0xe0eab3=>new CliError(a97_0xb21fac(0x90),0x2,'Network\x20error:\x20'+_0xe0eab3,a97_0xb21fac(0x95)),'unknownCommand':_0x70e912=>new CliError(a97_0xb21fac(0x91),0x1,'Unknown\x20command:\x20'+_0x70e912,'Run\x20`'+CLI_BIN_NAME+a97_0xb21fac(0x8b)),'flagMissing':(_0xe8bda,_0x5683a1)=>new CliError(a97_0xb21fac(0x9b),0x1,a97_0xb21fac(0x9e)+_0xe8bda,_0x5683a1),'validation':(_0xfc71f0,_0xce9ea)=>new CliError('validation_error',0x1,_0xfc71f0,_0xce9ea),'cancelled':_0x551d3c=>new CliError(a97_0xb21fac(0x9a),0x0,_0x551d3c??'Operation\x20cancelled.',undefined)};function a97_0x3a48(){const _0x1e0f71=['5327400TXuFcE','1016240UOGmNu','code','cancelled','flag_missing','1526757XKqlDH','1160AqyJGB','Missing\x20required\x20flag:\x20--','config_missing','94482CRKuEt','not_in_project','4742955zQxaLg','Configuration\x20file\x20not\x20found','name','auth_required','13215ASjIoy','\x20--help`\x20to\x20see\x20available\x20commands.','hint','api_error','exitCode','18398800SNYiwS','network_error','unknown_command','\x20init`\x20to\x20create\x20a\x20config\x20file.','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','Run\x20`','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','CliError'];a97_0x3a48=function(){return _0x1e0f71;};return a97_0x3a48();}
|
package/lib/framework/flags.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x513ff2,_0x30a245){const _0x183224=a98_0x4c37,_0x18c14c=_0x513ff2();while(!![]){try{const _0x31515a=parseInt(_0x183224(0x1f1))/0x1*(parseInt(_0x183224(0x1db))/0x2)+parseInt(_0x183224(0x1e8))/0x3*(parseInt(_0x183224(0x1de))/0x4)+-parseInt(_0x183224(0x1d0))/0x5*(parseInt(_0x183224(0x1e4))/0x6)+parseInt(_0x183224(0x1d2))/0x7+parseInt(_0x183224(0x1d6))/0x8*(parseInt(_0x183224(0x1e7))/0x9)+parseInt(_0x183224(0x1e1))/0xa*(parseInt(_0x183224(0x1ef))/0xb)+-parseInt(_0x183224(0x1dd))/0xc*(parseInt(_0x183224(0x1df))/0xd);if(_0x31515a===_0x30a245)break;else _0x18c14c['push'](_0x18c14c['shift']());}catch(_0x32f9da){_0x18c14c['push'](_0x18c14c['shift']());}}}(a98_0x44e7,0xace3a));function a98_0x4c37(_0x327a56,_0x7345f3){_0x327a56=_0x327a56-0x1ce;const _0x44e79f=a98_0x44e7();let _0x4c374d=_0x44e79f[_0x327a56];return _0x4c374d;}import{CliErrors}from'../errors.js';function a98_0x44e7(){const _0x452438=['220XJPcRC','includes','3927441mDLFUA','toUpperCase','flagMissing','enum','64bXQhwR','test','true','boolean','dry-run','2fyXWiU','\x20is\x20required\x20for\x20`','5832492BBkBFp','25396ZNteWl','26EbYhmU','name','9979610kVLdHn','validation','\x20expects\x20a\x20number,\x20got\x20\x22','22398TFIkal','replace','dryRun','41661shkBWN','33GSOFWu','default','required','number','pattern','type','\x22\x20for\x20--','11GnAfgv','yes','178593icfbxL','Invalid\x20--',',\x20got\x20\x22','format'];a98_0x44e7=function(){return _0x452438;};return a98_0x44e7();}export function parseFlags(_0x255c2a,_0x2957d1){const _0x3ef88d=a98_0x4c37,_0xcb2b26={};for(const _0x1329c8 of _0x255c2a){const _0x13827c=_0x2957d1[_0x1329c8['name']]??_0x2957d1[toCamelCase(_0x1329c8[_0x3ef88d(0x1e0)])];if(_0x13827c===undefined||_0x13827c===null){_0x1329c8['default']!==undefined&&(_0xcb2b26[_0x1329c8[_0x3ef88d(0x1e0)]]=_0x1329c8[_0x3ef88d(0x1e9)]);continue;}_0xcb2b26[_0x1329c8[_0x3ef88d(0x1e0)]]=coerce(_0x1329c8,_0x13827c);}for(const _0x2221a4 of[_0x3ef88d(0x1da),_0x3ef88d(0x1e6),_0x3ef88d(0x1f0),_0x3ef88d(0x1cf)]){const _0x17fac7=_0x2957d1[_0x2221a4];if(_0x17fac7!==undefined){const _0x2b7ffe=_0x2221a4===_0x3ef88d(0x1e6)?_0x3ef88d(0x1da):_0x2221a4;_0xcb2b26[_0x2b7ffe]=_0x17fac7;}}return _0xcb2b26;}export function validateFlags(_0x32d918,_0x44b701,_0x66526c){const _0x23caa8=a98_0x4c37;for(const _0x187e47 of _0x32d918){const _0x498e03=_0x44b701[_0x187e47['name']];if(_0x187e47[_0x23caa8(0x1ea)]&&(_0x498e03===undefined||_0x498e03===''))throw CliErrors[_0x23caa8(0x1d4)](_0x187e47['name'],'--'+_0x187e47[_0x23caa8(0x1e0)]+_0x23caa8(0x1dc)+_0x66526c+'`.');if(_0x187e47[_0x23caa8(0x1d5)]&&_0x187e47[_0x23caa8(0x1d5)]['length']>0x0&&_0x498e03!==undefined&&_0x498e03!==''){if(!_0x187e47[_0x23caa8(0x1d5)][_0x23caa8(0x1d1)](String(_0x498e03)))throw CliErrors['validation']('Invalid\x20value\x20\x22'+_0x498e03+_0x23caa8(0x1ee)+_0x187e47[_0x23caa8(0x1e0)]+'.\x20Allowed:\x20'+_0x187e47[_0x23caa8(0x1d5)]['join'](',\x20'));}if(_0x187e47[_0x23caa8(0x1ec)]&&_0x498e03!==undefined&&_0x498e03!==''){if(!_0x187e47['pattern']['regex'][_0x23caa8(0x1d7)](String(_0x498e03)))throw CliErrors[_0x23caa8(0x1e2)](_0x23caa8(0x1f2)+_0x187e47[_0x23caa8(0x1e0)]+':\x20expected\x20'+_0x187e47['pattern']['description']+_0x23caa8(0x1ce)+_0x498e03+'\x22.');}}}function coerce(_0x5a173e,_0x267449){const _0x7b9513=a98_0x4c37;switch(_0x5a173e[_0x7b9513(0x1ed)]){case _0x7b9513(0x1d9):return _0x267449===!![]||_0x267449===_0x7b9513(0x1d8);case _0x7b9513(0x1eb):{const _0x449f34=Number(_0x267449);if(isNaN(_0x449f34))throw CliErrors['validation']('--'+_0x5a173e[_0x7b9513(0x1e0)]+_0x7b9513(0x1e3)+_0x267449+'\x22');return _0x449f34;}default:return String(_0x267449);}}function toCamelCase(_0x19ba20){const _0x13db70=a98_0x4c37;return _0x19ba20[_0x13db70(0x1e5)](/-([a-z])/g,(_0x51372a,_0x386adf)=>_0x386adf[_0x13db70(0x1d3)]());}
|
package/lib/framework/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a99_0x195c(_0x3e0506,_0x5ce494){_0x3e0506=_0x3e0506-0x109;const _0x562e07=a99_0x562e();let _0x195c10=_0x562e07[_0x3e0506];return _0x195c10;}const a99_0x48000d=a99_0x195c;(function(_0x1c8f11,_0x43cdb5){const _0x486a9f=a99_0x195c,_0x4d20cd=_0x1c8f11();while(!![]){try{const _0x46b3c3=parseInt(_0x486a9f(0x144))/0x1+-parseInt(_0x486a9f(0x136))/0x2*(parseInt(_0x486a9f(0x14d))/0x3)+parseInt(_0x486a9f(0x13c))/0x4*(-parseInt(_0x486a9f(0x114))/0x5)+-parseInt(_0x486a9f(0x143))/0x6*(parseInt(_0x486a9f(0x134))/0x7)+-parseInt(_0x486a9f(0x118))/0x8*(-parseInt(_0x486a9f(0x11b))/0x9)+parseInt(_0x486a9f(0x13b))/0xa*(parseInt(_0x486a9f(0x150))/0xb)+parseInt(_0x486a9f(0x124))/0xc*(parseInt(_0x486a9f(0x147))/0xd);if(_0x46b3c3===_0x43cdb5)break;else _0x4d20cd['push'](_0x4d20cd['shift']());}catch(_0x4767c2){_0x4d20cd['push'](_0x4d20cd['shift']());}}}(a99_0x562e,0x30562));import{serviceRegistry,getServiceEntry}from'../commands/registry.js';function a99_0x562e(){const _0x4353fc=['\x20\x20\x20\x20$\x20','string','9kcowmK','\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','\x20[flags]','join','\x20\x20Run\x20`','flags','\x20\x20\x20\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20version','length','number','1697940BdjUPT','\x20\x20Rabetbase\x20CLI','description','\x20<command>\x20--help`\x20for\x20flag\x20details.','\x20\x20\x20\x20--format\x20<fmt>\x20\x20\x20\x20\x20\x20\x20\x20\x20Output\x20format:\x20json\x20|\x20pretty\x20|\x20table','max','requiresAuth','\x20\x20\x20\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Preview\x20operation\x20without\x20executing','boolean','\x20\x20\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20Override\x20appcode','type','\x20\x20Unknown\x20service:\x20','\x20\x20[high-risk-write]','push','padEnd','name','7otCGdh','service','32960fKfqBi','command','label','\x20[global-options]\x20<service>\x20<command>\x20[flags]','pretty','2225210auWMfI','111652PVzDKG','\x20\x20\x20\x20Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.','Preview\x20the\x20operation\x20without\x20executing','Requires\x20appcode\x20(set\x20via\x20`','Output\x20format','hasFormat','\x20\x20\x20\x20','2228718sZQcWc','124747BdmTvb','\x20\x20\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20help','\x20\x20\x20\x20--non-interactive\x20\x20\x20\x20\x20\x20Force\x20non-interactive\x20mode\x20(CI)','13ZYTGnZ','commands','Requires\x20authentication\x20(run\x20`','table','\x20project\x20init`\x20or\x20--appcode).','\x20auth`\x20first).','12doEQBp','format','\x20\x20COMMANDS','11dghCUQ','required','\x20\x20\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Environment:\x20production\x20|\x20daily','\x20\x20[write]','json','\x20\x20FLAGS','default','\x20<value>','requiresAppCode','enum','dryRun','tag','\x20\x20PREREQUISITES','map','5udlIlI','\x20|\x20','\x20\x20USAGE','risk','1396072XzAvQD'];a99_0x562e=function(){return _0x4353fc;};return a99_0x562e();}import{CLI_BIN_NAME}from'../constant/cli.js';const RISK_LABELS={'read':'','write':a99_0x48000d(0x109),'high-risk-write':a99_0x48000d(0x130)};export function generateCommandHelp(_0x6d3ff8){const _0x507d74=a99_0x48000d,_0x4652a2=[],_0x403021=CLI_BIN_NAME+'\x20'+_0x6d3ff8[_0x507d74(0x135)]+'\x20'+_0x6d3ff8[_0x507d74(0x137)];_0x4652a2['push'](''),_0x4652a2['push']('\x20\x20'+_0x6d3ff8[_0x507d74(0x126)]),_0x4652a2['push'](''),_0x4652a2[_0x507d74(0x131)](_0x507d74(0x116)),_0x4652a2['push']('\x20\x20\x20\x20'+_0x403021+_0x507d74(0x11d)),_0x4652a2['push'](''),_0x4652a2[_0x507d74(0x131)]('\x20\x20RISK:\x20'+_0x6d3ff8['risk']);_0x6d3ff8[_0x507d74(0x117)]==='high-risk-write'&&_0x4652a2[_0x507d74(0x131)](_0x507d74(0x13d));_0x4652a2[_0x507d74(0x131)]('');if(_0x6d3ff8[_0x507d74(0x120)][_0x507d74(0x122)]>0x0||_0x6d3ff8[_0x507d74(0x110)]||_0x6d3ff8[_0x507d74(0x141)]!==![]){_0x4652a2[_0x507d74(0x131)](_0x507d74(0x10b));const _0x33ff43=buildAllFlags(_0x6d3ff8),_0x3e73c2=Math['max'](..._0x33ff43[_0x507d74(0x113)](_0x42a26e=>formatFlagName(_0x42a26e)[_0x507d74(0x122)]));for(const _0x2e219a of _0x33ff43){const _0xec2e4c=formatFlagName(_0x2e219a)[_0x507d74(0x132)](_0x3e73c2+0x2);let _0x196cfa=_0x2e219a[_0x507d74(0x126)];_0x2e219a[_0x507d74(0x10f)]&&_0x2e219a[_0x507d74(0x10f)]['length']>0x0&&(_0x196cfa+='\x20('+_0x2e219a[_0x507d74(0x10f)][_0x507d74(0x11e)](_0x507d74(0x115))+')'),_0x2e219a['default']!==undefined&&_0x2e219a[_0x507d74(0x10c)]!==''&&(_0x196cfa+='\x20[default:\x20'+_0x2e219a[_0x507d74(0x10c)]+']'),_0x2e219a[_0x507d74(0x151)]&&(_0x196cfa+='\x20(required)'),_0x4652a2[_0x507d74(0x131)](_0x507d74(0x142)+_0xec2e4c+_0x196cfa);}_0x4652a2['push']('');}const _0x1a756b=[];_0x6d3ff8[_0x507d74(0x12a)]!==![]&&_0x1a756b[_0x507d74(0x131)](_0x507d74(0x149)+CLI_BIN_NAME+_0x507d74(0x14c));_0x6d3ff8[_0x507d74(0x10e)]!==![]&&_0x1a756b[_0x507d74(0x131)](_0x507d74(0x13f)+CLI_BIN_NAME+_0x507d74(0x14b));if(_0x1a756b['length']>0x0){_0x4652a2[_0x507d74(0x131)](_0x507d74(0x112));for(const _0x1c1bcd of _0x1a756b){_0x4652a2['push']('\x20\x20\x20\x20•\x20'+_0x1c1bcd);}_0x4652a2[_0x507d74(0x131)]('');}return _0x4652a2[_0x507d74(0x11e)]('\x0a');}export function generateServiceHelp(_0x3693e3){const _0x4630f9=a99_0x48000d,_0x98dbc4=getServiceEntry(_0x3693e3);if(!_0x98dbc4)return _0x4630f9(0x12f)+_0x3693e3+'\x0a';const _0x815038=[];_0x815038['push'](''),_0x815038[_0x4630f9(0x131)]('\x20\x20'+_0x98dbc4[_0x4630f9(0x138)]),_0x815038[_0x4630f9(0x131)](''),_0x815038[_0x4630f9(0x131)]('\x20\x20USAGE'),_0x815038['push']('\x20\x20\x20\x20'+CLI_BIN_NAME+'\x20'+_0x3693e3+'\x20<command>\x20[flags]'),_0x815038[_0x4630f9(0x131)](''),_0x815038[_0x4630f9(0x131)](_0x4630f9(0x14f));const _0x9eb87=Math['max'](..._0x98dbc4['commands']['map'](_0x5320c1=>_0x5320c1[_0x4630f9(0x137)][_0x4630f9(0x122)]));for(const _0x762bf6 of _0x98dbc4[_0x4630f9(0x148)]){const _0x1af845=_0x762bf6[_0x4630f9(0x111)]??'';_0x815038[_0x4630f9(0x131)](_0x4630f9(0x142)+_0x762bf6[_0x4630f9(0x137)][_0x4630f9(0x132)](_0x9eb87+0x2)+_0x762bf6[_0x4630f9(0x126)]+_0x1af845);}return _0x815038[_0x4630f9(0x131)](''),_0x815038[_0x4630f9(0x131)](_0x4630f9(0x11f)+CLI_BIN_NAME+'\x20'+_0x3693e3+_0x4630f9(0x127)),_0x815038[_0x4630f9(0x131)](''),_0x815038['join']('\x0a');}export function generateFullHelp(){const _0x542ef3=a99_0x48000d,_0x272b2c=[];_0x272b2c[_0x542ef3(0x131)](''),_0x272b2c[_0x542ef3(0x131)](_0x542ef3(0x125)),_0x272b2c['push'](''),_0x272b2c[_0x542ef3(0x131)](_0x542ef3(0x116)),_0x272b2c['push'](_0x542ef3(0x119)+CLI_BIN_NAME+_0x542ef3(0x139)),_0x272b2c[_0x542ef3(0x131)](''),_0x272b2c[_0x542ef3(0x131)]('\x20\x20GLOBAL\x20OPTIONS'),_0x272b2c['push'](_0x542ef3(0x12d)),_0x272b2c['push'](_0x542ef3(0x152)),_0x272b2c[_0x542ef3(0x131)](_0x542ef3(0x128)),_0x272b2c[_0x542ef3(0x131)](_0x542ef3(0x12b)),_0x272b2c[_0x542ef3(0x131)](_0x542ef3(0x11c)),_0x272b2c[_0x542ef3(0x131)](_0x542ef3(0x146)),_0x272b2c['push'](_0x542ef3(0x145)),_0x272b2c['push'](_0x542ef3(0x121)),_0x272b2c[_0x542ef3(0x131)](''),_0x272b2c['push']('\x20\x20COMMANDS'),_0x272b2c[_0x542ef3(0x131)]('');for(const _0x772706 of serviceRegistry){_0x272b2c[_0x542ef3(0x131)]('\x20\x20'+_0x772706[_0x542ef3(0x138)]);const _0x3ef22d=_0x772706[_0x542ef3(0x148)][_0x542ef3(0x113)](_0x3e5091=>_0x772706['service']+'\x20'+_0x3e5091[_0x542ef3(0x137)]),_0x573bc3=Math[_0x542ef3(0x129)](..._0x3ef22d[_0x542ef3(0x113)](_0x3ed321=>_0x3ed321[_0x542ef3(0x122)]));for(let _0x32553a=0x0;_0x32553a<_0x772706[_0x542ef3(0x148)][_0x542ef3(0x122)];_0x32553a++){const _0x3d41bc=_0x772706[_0x542ef3(0x148)][_0x32553a],_0x29a958=_0x3d41bc['tag']??'';_0x272b2c[_0x542ef3(0x131)](_0x542ef3(0x142)+_0x3ef22d[_0x32553a][_0x542ef3(0x132)](_0x573bc3+0x2)+_0x3d41bc[_0x542ef3(0x126)]+_0x29a958);}_0x272b2c['push']('');}return _0x272b2c[_0x542ef3(0x131)](_0x542ef3(0x11f)+CLI_BIN_NAME+'\x20<service>\x20<command>\x20--help`\x20for\x20command-level\x20flags.'),_0x272b2c[_0x542ef3(0x131)](''),_0x272b2c[_0x542ef3(0x11e)]('\x0a');}function buildAllFlags(_0x1fa3f2){const _0x34f7c8=a99_0x48000d,_0x4af937=[..._0x1fa3f2[_0x34f7c8(0x120)]];return _0x1fa3f2[_0x34f7c8(0x110)]&&_0x4af937['push']({'name':'dry-run','type':_0x34f7c8(0x12c),'description':_0x34f7c8(0x13e)}),_0x1fa3f2[_0x34f7c8(0x141)]!==![]&&_0x4af937[_0x34f7c8(0x131)]({'name':_0x34f7c8(0x14e),'type':_0x34f7c8(0x11a),'default':'pretty','enum':[_0x34f7c8(0x10a),_0x34f7c8(0x13a),_0x34f7c8(0x14a)],'description':_0x34f7c8(0x140)}),_0x1fa3f2[_0x34f7c8(0x117)]==='high-risk-write'&&_0x4af937[_0x34f7c8(0x131)]({'name':'yes','type':_0x34f7c8(0x12c),'description':'Skip\x20confirmation\x20prompt'}),_0x4af937;}function formatFlagName(_0x4c1243){const _0xd9896d=a99_0x48000d,_0x2ffc11=_0x4c1243['type']==='boolean'?'':_0x4c1243[_0xd9896d(0x12e)]===_0xd9896d(0x123)?'\x20<n>':_0xd9896d(0x10d);return'--'+_0x4c1243[_0xd9896d(0x133)]+_0x2ffc11;}
|
package/lib/framework/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x6d67ef,_0x2774cd){var _0x55578b=a100_0x39cf,_0x137934=_0x6d67ef();while(!![]){try{var _0x339e0e=parseInt(_0x55578b(0x6d))/0x1+-parseInt(_0x55578b(0x68))/0x2+-parseInt(_0x55578b(0x6b))/0x3*(parseInt(_0x55578b(0x6e))/0x4)+-parseInt(_0x55578b(0x6a))/0x5+-parseInt(_0x55578b(0x67))/0x6*(-parseInt(_0x55578b(0x69))/0x7)+-parseInt(_0x55578b(0x66))/0x8+parseInt(_0x55578b(0x6c))/0x9*(parseInt(_0x55578b(0x6f))/0xa);if(_0x339e0e===_0x2774cd)break;else _0x137934['push'](_0x137934['shift']());}catch(_0x49509b){_0x137934['push'](_0x137934['shift']());}}}(a100_0x2990,0x96c98));export{runCommand}from'./runner.js';export{parseFlags,validateFlags}from'./flags.js';export{formatOutput}from'./output.js';function a100_0x2990(){var _0x2780aa=['1634752bnEyYN','623oJMzPb','411030EuWazy','3483615kXaFuv','9Iyrqjb','117409USDMBb','4vlFhpp','28213480hSpKjJ','9568024jewQFq','63078itijnF'];a100_0x2990=function(){return _0x2780aa;};return a100_0x2990();}function a100_0x39cf(_0x1b5dff,_0x419d68){_0x1b5dff=_0x1b5dff-0x66;var _0x299032=a100_0x2990();var _0x39cff7=_0x299032[_0x1b5dff];return _0x39cff7;}export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./help.js';export{extractList,extractPaging}from'./response.js';
|
package/lib/framework/output.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x286b0c,_0x1695a5){const _0x362341=a101_0x5262,_0x1000ea=_0x286b0c();while(!![]){try{const _0x1b5a97=-parseInt(_0x362341(0x1c0))/0x1+parseInt(_0x362341(0x1c1))/0x2*(-parseInt(_0x362341(0x1bd))/0x3)+-parseInt(_0x362341(0x1c3))/0x4+parseInt(_0x362341(0x1d2))/0x5+-parseInt(_0x362341(0x1dd))/0x6*(parseInt(_0x362341(0x1bf))/0x7)+parseInt(_0x362341(0x1df))/0x8*(-parseInt(_0x362341(0x1ca))/0x9)+-parseInt(_0x362341(0x1c2))/0xa*(-parseInt(_0x362341(0x1d3))/0xb);if(_0x1b5a97===_0x1695a5)break;else _0x1000ea['push'](_0x1000ea['shift']());}catch(_0xe4b84e){_0x1000ea['push'](_0x1000ea['shift']());}}}(a101_0x7ed9,0x38a51));export function formatOutput(_0xc21cdb,_0x5a8b4c){const _0x1f282d=a101_0x5262,{format:_0x1a3d93}=_0x5a8b4c;switch(_0x1a3d93){case _0x1f282d(0x1d9):printJson(_0xc21cdb,_0x5a8b4c);break;case _0x1f282d(0x1da):printTable(_0xc21cdb,_0x5a8b4c);break;case _0x1f282d(0x1d5):default:printPretty(_0xc21cdb,_0x5a8b4c);break;}}function printJson(_0x554977,_0x2748d2){const _0x44be7d=a101_0x5262,_0x4a4a7a={'ok':_0x554977['ok'],'command':_0x2748d2[_0x44be7d(0x1d6)],'risk':_0x2748d2[_0x44be7d(0x1cd)]};if(_0x2748d2[_0x44be7d(0x1c7)])_0x4a4a7a[_0x44be7d(0x1c7)]=!![];if(_0x554977[_0x44be7d(0x1d7)]!==undefined)_0x4a4a7a[_0x44be7d(0x1d7)]=_0x554977[_0x44be7d(0x1d7)];!_0x554977['ok']&&_0x554977[_0x44be7d(0x1bb)]&&(_0x4a4a7a['error']={'code':_0x44be7d(0x1e1),'message':_0x554977[_0x44be7d(0x1bb)]}),process[_0x44be7d(0x1bc)][_0x44be7d(0x1d8)](JSON[_0x44be7d(0x1be)](_0x4a4a7a,null,0x2)+'\x0a');}function a101_0x7ed9(){const _0x59adb9=['command','data','write','json','table','log','Found\x20','12SZBicp','object','24CwNUsT','Unknown\x20error','command_error','keys','message','stdout','1284cGYVAe','stringify','720167DiVvWd','12622oYrNER','138SspJTf','1670zfWqru','452552lVUQCu','map','max','isArray','dryRun','values','error','270198McnDjF','repeat','join','risk','length','[dry-run]\x20Would\x20execute:','slice','(empty)','324515rqxzVE','40722xDrDdu','entries','pretty'];a101_0x7ed9=function(){return _0x59adb9;};return a101_0x7ed9();}function printPretty(_0x4304ef,_0x4c66c1){const _0x2639e1=a101_0x5262;if(_0x4c66c1[_0x2639e1(0x1c7)]){console[_0x2639e1(0x1db)](_0x2639e1(0x1cf)),console[_0x2639e1(0x1db)](JSON[_0x2639e1(0x1be)](_0x4304ef[_0x2639e1(0x1d7)],null,0x2));return;}if(!_0x4304ef['ok']){console[_0x2639e1(0x1c9)]('Error:\x20'+(_0x4304ef['message']??_0x2639e1(0x1e0)));return;}const _0x4d27f3=_0x4304ef[_0x2639e1(0x1d7)];if(_0x4d27f3===undefined||_0x4d27f3===null){if(_0x4304ef[_0x2639e1(0x1bb)])console[_0x2639e1(0x1db)](_0x4304ef[_0x2639e1(0x1bb)]);return;}if(Array[_0x2639e1(0x1c6)](_0x4d27f3)){printArrayPretty(_0x4d27f3);return;}if(typeof _0x4d27f3===_0x2639e1(0x1de)){printObjectPretty(_0x4d27f3);return;}console['log'](String(_0x4d27f3));}function a101_0x5262(_0x27a5b8,_0x335e88){_0x27a5b8=_0x27a5b8-0x1bb;const _0x7ed9e8=a101_0x7ed9();let _0x526252=_0x7ed9e8[_0x27a5b8];return _0x526252;}function printObjectPretty(_0x1a64b8){const _0x50a583=a101_0x5262,_0x4e6f1a=Math[_0x50a583(0x1c5)](...Object['keys'](_0x1a64b8)[_0x50a583(0x1c4)](_0x3752d3=>_0x3752d3[_0x50a583(0x1ce)]),0x0);for(const [_0x1a9cf7,_0x1e32b9]of Object[_0x50a583(0x1d4)](_0x1a64b8)){if(_0x1e32b9===undefined||_0x1e32b9===null)continue;const _0x3bd3a7=_0x1a9cf7['padEnd'](_0x4e6f1a);typeof _0x1e32b9==='object'?console[_0x50a583(0x1db)](_0x3bd3a7+'\x20\x20'+JSON[_0x50a583(0x1be)](_0x1e32b9)):console[_0x50a583(0x1db)](_0x3bd3a7+'\x20\x20'+_0x1e32b9);}}function printArrayPretty(_0x1fdaf6){const _0x25ae69=a101_0x5262;if(_0x1fdaf6['length']===0x0){console[_0x25ae69(0x1db)](_0x25ae69(0x1d1));return;}console['log'](_0x25ae69(0x1dc)+_0x1fdaf6[_0x25ae69(0x1ce)]+'\x20items:\x0a');for(const _0x2d8eba of _0x1fdaf6){if(typeof _0x2d8eba===_0x25ae69(0x1de)&&_0x2d8eba!==null){const _0x2e1216=Object[_0x25ae69(0x1c8)](_0x2d8eba)[_0x25ae69(0x1d0)](0x0,0x4)[_0x25ae69(0x1cc)]('\x20\x20');console[_0x25ae69(0x1db)]('\x20\x20'+_0x2e1216);}else console[_0x25ae69(0x1db)]('\x20\x20'+_0x2d8eba);}}function printTable(_0x4987b1,_0x4d5ea6){const _0x3d99f4=a101_0x5262,_0x7b41a5=_0x4987b1[_0x3d99f4(0x1d7)];if(!_0x4987b1['ok']){console[_0x3d99f4(0x1c9)]('Error:\x20'+(_0x4987b1[_0x3d99f4(0x1bb)]??_0x3d99f4(0x1e0)));return;}const _0x198b8e=Array[_0x3d99f4(0x1c6)](_0x7b41a5)?_0x7b41a5:_0x7b41a5?[_0x7b41a5]:[];if(_0x198b8e[_0x3d99f4(0x1ce)]===0x0){console[_0x3d99f4(0x1db)](_0x3d99f4(0x1d1));return;}const _0x10f7c7=Object[_0x3d99f4(0x1e2)](_0x198b8e[0x0]),_0x998671=_0x10f7c7['map'](_0x37a934=>Math[_0x3d99f4(0x1c5)](_0x37a934[_0x3d99f4(0x1ce)],..._0x198b8e[_0x3d99f4(0x1c4)](_0x4384f6=>String(_0x4384f6[_0x37a934]??'')[_0x3d99f4(0x1ce)]))),_0x19ecc5=_0x10f7c7[_0x3d99f4(0x1c4)]((_0x55c1d7,_0x28dd7c)=>_0x55c1d7['padEnd'](_0x998671[_0x28dd7c]))[_0x3d99f4(0x1cc)]('\x20\x20'),_0x3d07f6=_0x998671[_0x3d99f4(0x1c4)](_0x1f1e85=>'-'[_0x3d99f4(0x1cb)](_0x1f1e85))[_0x3d99f4(0x1cc)]('\x20\x20');console[_0x3d99f4(0x1db)](_0x19ecc5),console['log'](_0x3d07f6);for(const _0x252993 of _0x198b8e){const _0xe8e3e=_0x10f7c7[_0x3d99f4(0x1c4)]((_0x4a27e2,_0x4f6515)=>String(_0x252993[_0x4a27e2]??'')['padEnd'](_0x998671[_0x4f6515]))[_0x3d99f4(0x1cc)]('\x20\x20');console['log'](_0xe8e3e);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x747de,_0x2e3e41){var _0x50349b=a102_0x5423,_0x3b268d=_0x747de();while(!![]){try{var _0x456741=parseInt(_0x50349b(0x1e6))/0x1*(-parseInt(_0x50349b(0x1f1))/0x2)+-parseInt(_0x50349b(0x1e8))/0x3*(-parseInt(_0x50349b(0x1ed))/0x4)+-parseInt(_0x50349b(0x1ee))/0x5*(-parseInt(_0x50349b(0x1ea))/0x6)+parseInt(_0x50349b(0x1ec))/0x7+parseInt(_0x50349b(0x1e5))/0x8*(-parseInt(_0x50349b(0x1e1))/0x9)+parseInt(_0x50349b(0x1e3))/0xa*(-parseInt(_0x50349b(0x1e9))/0xb)+-parseInt(_0x50349b(0x1e2))/0xc*(-parseInt(_0x50349b(0x1e4))/0xd);if(_0x456741===_0x2e3e41)break;else _0x3b268d['push'](_0x3b268d['shift']());}catch(_0x7ce13c){_0x3b268d['push'](_0x3b268d['shift']());}}}(a102_0x3061,0x33475));function a102_0x3061(){var _0x40268e=['1702645WZctlp','8coxbnf','5AmjpZX','isArray','tableData','88VHToTS','34641qhaDzB','24jactWx','3250FrcPRZ','2505373sEDTpK','848vbmTEz','7223itCARF','object','194658dLcvTC','132iOyjpE','1087764tZzGHQ','paging'];a102_0x3061=function(){return _0x40268e;};return a102_0x3061();}function a102_0x5423(_0x19cddd,_0xe8100f){_0x19cddd=_0x19cddd-0x1e1;var _0x3061d5=a102_0x3061();var _0x542372=_0x3061d5[_0x19cddd];return _0x542372;}export function extractList(_0x18c5ef){var _0x579dde=a102_0x5423;if(Array[_0x579dde(0x1ef)](_0x18c5ef))return _0x18c5ef;if(_0x18c5ef&&typeof _0x18c5ef===_0x579dde(0x1e7))return _0x18c5ef[_0x579dde(0x1f0)]??[];return[];}export function extractPaging(_0x3af4a9){var _0x43cf9d=a102_0x5423;if(_0x3af4a9&&typeof _0x3af4a9===_0x43cf9d(0x1e7)&&!Array[_0x43cf9d(0x1ef)](_0x3af4a9))return _0x3af4a9[_0x43cf9d(0x1eb)];return undefined;}
|
package/lib/framework/runner.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2ad9f2,_0x284420){const _0x5e4950=a103_0x24a6,_0x1719e6=_0x2ad9f2();while(!![]){try{const _0x24cefe=parseInt(_0x5e4950(0x1cd))/0x1+parseInt(_0x5e4950(0x1fa))/0x2+-parseInt(_0x5e4950(0x1ee))/0x3+-parseInt(_0x5e4950(0x1e2))/0x4+parseInt(_0x5e4950(0x1fb))/0x5*(-parseInt(_0x5e4950(0x1d6))/0x6)+-parseInt(_0x5e4950(0x1f6))/0x7+-parseInt(_0x5e4950(0x1c6))/0x8*(-parseInt(_0x5e4950(0x1f7))/0x9);if(_0x24cefe===_0x284420)break;else _0x1719e6['push'](_0x1719e6['shift']());}catch(_0x704152){_0x1719e6['push'](_0x1719e6['shift']());}}}(a103_0x3135,0xbdf4a));import{parseFlags,validateFlags}from'./flags.js';function a103_0x24a6(_0x58ecb7,_0x486a52){_0x58ecb7=_0x58ecb7-0x1b7;const _0x31359c=a103_0x3135();let _0x24a6cb=_0x31359c[_0x58ecb7];return _0x24a6cb;}import{formatOutput}from'./output.js';import{CliErrors}from'../errors.js';function a103_0x3135(){const _0x145561=['map','defaultVerbose','cookie','command','\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.','Set\x20appcode\x20via\x20`','rawFlags','length','question','14344496YiPxDj','format','node:readline','`\x20has\x20risk\x20level\x20\x22','defaultPageSize','yes','apiDir','570809aZsiQu','cancelled','number','defaultFormat','name','read','authRequired','alias','risk','234ThegXt','resolveAppCode','nonInteractive','selectedAppName','No\x20api.ts\x20found\x20in\x20','code','dry-run','requiresAppCode','pretty','\x20\x20Set\x20riskLevel\x20in\x20.rabetbase.json\x20or\x20RABETBASE_RISK_LEVEL\x20to\x20allow\x20this\x20operation.','some','--dry-run\x20is\x20not\x20supported\x20for\x20`','370228eIPiuY','⚠\x20\x20High-risk\x20operation:\x20','\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22','requiresAuth','stderr','configMissing','dryRun','flags','isNonInteractive','toLowerCase','hasFormat','type','869250qHPsoO','riskLevel','createInterface','Command\x20`','service','execute','Unknown\x20alias\x20\x22','resolveApiDomain','8897714zZjCkW','9IDwzJr','table','resolveCookie','754044FUaQrB','39670qvvfyN','pagesize','string','json','validation','\x22.\x20','apiDomain','\x20api\x20pull`\x20first.','validate'];a103_0x3135=function(){return _0x145561;};return a103_0x3135();}import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';export async function runCommand(_0x233aa7,_0x239c80){const _0x50029e=a103_0x24a6,_0x5977f4=CLI_BIN_NAME+'\x20'+_0x233aa7[_0x50029e(0x1f2)]+'\x20'+_0x233aa7[_0x50029e(0x1c0)],_0x23cfbe=parseFlags(_0x233aa7['flags'],_0x239c80[_0x50029e(0x1c3)]);validateFlags(_0x233aa7['flags'],_0x23cfbe,_0x5977f4);if(!_0x23cfbe[_0x50029e(0x1dc)]&&_0x239c80['riskLevel']&&riskLevelOrder(_0x233aa7[_0x50029e(0x1d5)])>riskLevelOrder(_0x239c80['riskLevel']))throw CliErrors[_0x50029e(0x1b8)](_0x50029e(0x1f1)+_0x5977f4+_0x50029e(0x1c9)+_0x233aa7[_0x50029e(0x1d5)]+_0x50029e(0x1e4)+_0x239c80[_0x50029e(0x1ef)]+'\x22.\x0a'+_0x50029e(0x1df));const _0x1e73e3=_0x239c80['apiDir']||'./src/api';resolveAliasToCode(_0x233aa7,_0x23cfbe,_0x1e73e3,_0x5977f4);let _0x359d5b='';if(_0x233aa7[_0x50029e(0x1e5)]!==![]){_0x359d5b=_0x239c80[_0x50029e(0x1f9)]();if(!_0x359d5b)throw CliErrors[_0x50029e(0x1d3)]();const {setActiveCookie:_0x22e30d}=await import('../core/api-client.js');_0x22e30d(_0x359d5b);}let _0x210db8='';if(_0x233aa7[_0x50029e(0x1dd)]!==![]){_0x210db8=_0x239c80[_0x50029e(0x1d7)]()??'';if(!_0x210db8)throw CliErrors[_0x50029e(0x1e7)](_0x50029e(0x1c2)+CLI_BIN_NAME+_0x50029e(0x1c1));}const _0x3ed302=resolveFormat(_0x23cfbe,_0x233aa7,_0x239c80[_0x50029e(0x1d0)]),_0x1b14fc=buildRuntimeContext({'appCode':_0x210db8,'cookie':_0x359d5b,'apiDomain':_0x239c80[_0x50029e(0x1f5)](),'format':_0x3ed302,'flags':_0x23cfbe,'def':_0x233aa7,'nonInteractive':_0x239c80['isNonInteractive'],'defaultPageSize':_0x239c80[_0x50029e(0x1ca)],'defaultVerbose':_0x239c80[_0x50029e(0x1be)],'apiDir':_0x1e73e3,'selectedAppName':_0x239c80['selectedAppName']});_0x233aa7[_0x50029e(0x1bc)]&&await _0x233aa7[_0x50029e(0x1bc)](_0x1b14fc);if(_0x23cfbe[_0x50029e(0x1dc)]){if(!_0x233aa7['dryRun'])throw CliErrors[_0x50029e(0x1b8)](_0x50029e(0x1e1)+_0x5977f4+'`.');const _0x701607=await _0x233aa7[_0x50029e(0x1e8)](_0x1b14fc);formatOutput({'ok':!![],'data':_0x701607},{'command':_0x5977f4,'risk':_0x233aa7['risk'],'format':_0x3ed302,'dryRun':!![]});return;}if(_0x233aa7['risk']==='high-risk-write'&&!_0x23cfbe['yes']){if(_0x239c80[_0x50029e(0x1ea)])throw CliErrors[_0x50029e(0x1b8)]('High-risk\x20operation\x20`'+_0x5977f4+'`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.');await requireConfirmation(_0x5977f4);}const _0x510407=await _0x233aa7[_0x50029e(0x1f3)](_0x1b14fc);formatOutput(_0x510407,{'command':_0x5977f4,'risk':_0x233aa7[_0x50029e(0x1d5)],'format':_0x3ed302});}function buildRuntimeContext(_0x2fe6d2){const _0x4c0d87=a103_0x24a6,{flags:_0x19d3d8,def:_0x20586b}=_0x2fe6d2,_0x1824db=CLI_BIN_NAME+'\x20'+_0x20586b[_0x4c0d87(0x1f2)]+'\x20'+_0x20586b[_0x4c0d87(0x1c0)];return{'appCode':_0x2fe6d2['appCode'],'cookie':_0x2fe6d2[_0x4c0d87(0x1bf)],'apiDomain':_0x2fe6d2[_0x4c0d87(0x1ba)],'format':_0x2fe6d2[_0x4c0d87(0x1c7)],'nonInteractive':_0x2fe6d2[_0x4c0d87(0x1d8)],'apiDir':_0x2fe6d2[_0x4c0d87(0x1cc)],'selectedAppName':_0x2fe6d2[_0x4c0d87(0x1d9)],'str'(_0x5d7ec3){return String(_0x19d3d8[_0x5d7ec3]??'');},'bool'(_0x566dd8){const _0xde4e31=_0x4c0d87;if(_0x19d3d8[_0x566dd8]===!![])return!![];if(_0x566dd8==='verbose'&&_0x2fe6d2[_0xde4e31(0x1be)])return!![];return![];},'num'(_0x4ad959,_0x2bae7e){const _0x403c98=_0x4c0d87,_0xb069fc=_0x19d3d8[_0x4ad959];if(typeof _0xb069fc===_0x403c98(0x1cf))return _0xb069fc;if(_0x4ad959===_0x403c98(0x1fc)&&_0x2fe6d2[_0x403c98(0x1ca)]!=null)return _0x2fe6d2[_0x403c98(0x1ca)];return _0x2bae7e??0x0;},'flag'(_0x21e1a5){return _0x19d3d8[_0x21e1a5];},'output'(_0x20f0d4){const _0x328ff8=_0x4c0d87;formatOutput(_0x20f0d4,{'command':_0x1824db,'risk':_0x20586b[_0x328ff8(0x1d5)],'format':_0x2fe6d2['format']});}};}function resolveFormat(_0x479b88,_0x2b67f3,_0x4ef4f7){const _0x33f0aa=a103_0x24a6;if(_0x2b67f3[_0x33f0aa(0x1ec)]===![])return _0x33f0aa(0x1de);const _0x343a5c=_0x479b88[_0x33f0aa(0x1c7)];if(_0x343a5c===_0x33f0aa(0x1b7)||_0x343a5c===_0x33f0aa(0x1de)||_0x343a5c===_0x33f0aa(0x1f8))return _0x343a5c;if(_0x4ef4f7)return _0x4ef4f7;return _0x33f0aa(0x1de);}async function requireConfirmation(_0x3a94fb){const _0x750987=a103_0x24a6,_0x148902=await import(_0x750987(0x1c8)),_0x2ed4e3=_0x148902[_0x750987(0x1f0)]({'input':process['stdin'],'output':process[_0x750987(0x1e6)]});return new Promise((_0x3c5f67,_0x5f1e07)=>{const _0xbfdfdd=_0x750987;_0x2ed4e3[_0xbfdfdd(0x1c5)](_0xbfdfdd(0x1e3)+_0x3a94fb+'\x0a\x20\x20\x20Continue?\x20[y/N]\x20',_0x15033a=>{const _0x3528ff=_0xbfdfdd;_0x2ed4e3['close'](),_0x15033a[_0x3528ff(0x1eb)]()==='y'||_0x15033a[_0x3528ff(0x1eb)]()===_0x3528ff(0x1cb)?_0x3c5f67():_0x5f1e07(CliErrors[_0x3528ff(0x1ce)]('Operation\x20cancelled\x20by\x20user.'));});});}const RISK_ORDER={'read':0x0,'write':0x1,'high-risk-write':0x2};function riskLevelOrder(_0x1df2ae){const _0x2f2953=a103_0x24a6;return RISK_ORDER[_0x1df2ae??_0x2f2953(0x1d2)]??0x0;}function resolveAliasToCode(_0x180c12,_0x2e3756,_0x235361,_0xe3ea85){const _0x68c078=a103_0x24a6,_0x2dfc99=_0x180c12['flags'][_0x68c078(0x1e0)](_0x30b6b0=>_0x30b6b0[_0x68c078(0x1d1)]==='code'&&_0x30b6b0[_0x68c078(0x1ed)]===_0x68c078(0x1fd)),_0x220ebc=_0x180c12[_0x68c078(0x1e9)]['some'](_0x492c3b=>_0x492c3b['name']==='alias'&&_0x492c3b[_0x68c078(0x1ed)]==='string');if(!_0x2dfc99||!_0x220ebc)return;const _0x474aed=_0x2e3756['code']?String(_0x2e3756['code']):'',_0x3017cf=_0x2e3756[_0x68c078(0x1d4)]?String(_0x2e3756[_0x68c078(0x1d4)]):'';if(!_0x474aed&&!_0x3017cf)throw CliErrors['validation']('`'+_0xe3ea85+'`\x20requires\x20either\x20--code\x20or\x20--alias.');if(_0x3017cf&&!_0x474aed){const _0x3e6fa6=resolveAlias(_0x235361,_0x3017cf);if(!_0x3e6fa6){const _0x227f8e=listAliases(_0x235361)[_0x68c078(0x1bd)](_0x22bf4b=>_0x22bf4b[_0x68c078(0x1d4)]),_0x1cd7f4=_0x227f8e[_0x68c078(0x1c4)]?'Available\x20aliases:\x20'+_0x227f8e['join'](',\x20'):_0x68c078(0x1da)+_0x235361+'.\x20Run\x20`'+CLI_BIN_NAME+_0x68c078(0x1bb);throw CliErrors['validation'](_0x68c078(0x1f4)+_0x3017cf+_0x68c078(0x1b9)+_0x1cd7f4);}_0x2e3756[_0x68c078(0x1db)]=_0x3e6fa6;}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export const BUILD_NUMBER=
|
|
1
|
+
export const BUILD_NUMBER=0x36;
|
package/lib/help.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2080c6,_0xd51ee){var _0x898e6c=a106_0x4485,_0x10945d=_0x2080c6();while(!![]){try{var _0x32f51f=-parseInt(_0x898e6c(0x87))/0x1+-parseInt(_0x898e6c(0x91))/0x2*(-parseInt(_0x898e6c(0x88))/0x3)+parseInt(_0x898e6c(0x8f))/0x4+parseInt(_0x898e6c(0x93))/0x5*(-parseInt(_0x898e6c(0x90))/0x6)+parseInt(_0x898e6c(0x8a))/0x7*(-parseInt(_0x898e6c(0x8d))/0x8)+parseInt(_0x898e6c(0x8c))/0x9*(parseInt(_0x898e6c(0x86))/0xa)+parseInt(_0x898e6c(0x92))/0xb*(parseInt(_0x898e6c(0x89))/0xc);if(_0x32f51f===_0xd51ee)break;else _0x10945d['push'](_0x10945d['shift']());}catch(_0x4aad1d){_0x10945d['push'](_0x10945d['shift']());}}}(a106_0x5d12,0x4dd59));function a106_0x4485(_0x3c7c7b,_0x447433){_0x3c7c7b=_0x3c7c7b-0x86;var _0x5d1284=a106_0x5d12();var _0x44852c=_0x5d1284[_0x3c7c7b];return _0x44852c;}function a106_0x5d12(){var _0x328e43=['138352NPXLbY','18DxUwfD','552472MyRdyM','11143GhBajy','754340EYfZro','green','\x20\x20Use\x20','\x20to\x20view\x20available\x20commands.','470MGSdee','111324gKefRh','3SSvJxg','8496KgchLS','84MHZTLB','\x20--help','69723EfQbTO','339600slDtLr','\x20\x20Rabetbase\x20CLI'];a106_0x5d12=function(){return _0x328e43;};return a106_0x5d12();}import{jsx as a106_0x679fe0,jsxs as a106_0x1f0dc4}from'react/jsx-runtime';import{Box,Text}from'ink';import{CLI_BIN_NAME}from'./constant/cli.js';export function Help(){var _0x54e763=a106_0x4485;return a106_0x1f0dc4(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a106_0x679fe0(Box,{'children':a106_0x679fe0(Text,{'bold':!![],'color':_0x54e763(0x94),'children':_0x54e763(0x8e)})}),a106_0x1f0dc4(Box,{'marginTop':0x1,'children':[a106_0x679fe0(Text,{'dimColor':!![],'children':_0x54e763(0x95)}),a106_0x679fe0(Text,{'bold':!![],'color':_0x54e763(0x94),'children':CLI_BIN_NAME+_0x54e763(0x8b)}),a106_0x679fe0(Text,{'dimColor':!![],'children':_0x54e763(0x96)})]})]});}
|
package/lib/init/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a106_0x51a78b=a106_0x56ee;(function(_0x134ac2,_0x146c55){const _0x3dfaec=a106_0x56ee,_0x83e53e=_0x134ac2();while(!![]){try{const _0x48b826=parseInt(_0x3dfaec(0x15c))/0x1+parseInt(_0x3dfaec(0x157))/0x2*(parseInt(_0x3dfaec(0x132))/0x3)+parseInt(_0x3dfaec(0x15a))/0x4*(-parseInt(_0x3dfaec(0x15f))/0x5)+-parseInt(_0x3dfaec(0x13f))/0x6*(parseInt(_0x3dfaec(0x153))/0x7)+parseInt(_0x3dfaec(0x148))/0x8*(-parseInt(_0x3dfaec(0x123))/0x9)+parseInt(_0x3dfaec(0x147))/0xa*(parseInt(_0x3dfaec(0x166))/0xb)+-parseInt(_0x3dfaec(0x15e))/0xc*(-parseInt(_0x3dfaec(0x134))/0xd);if(_0x48b826===_0x146c55)break;else _0x83e53e['push'](_0x83e53e['shift']());}catch(_0x3f3b4a){_0x83e53e['push'](_0x83e53e['shift']());}}}(a106_0x380c,0xbd60d));function a106_0x56ee(_0x3f0616,_0x178c1e){_0x3f0616=_0x3f0616-0x11e;const _0x380cb6=a106_0x380c();let _0x56ee99=_0x380cb6[_0x3f0616];return _0x56ee99;}import{jsxs as a106_0x187a2b,jsx as a106_0x2981e5}from'react/jsx-runtime';import{useState,useEffect}from'react';function a106_0x380c(){const _0x10b38e=['utf8','cyan','gray','.lovrabet.json','legacy\x20config','yellow','checking','version','App\x20Code\x20cannot\x20be\x20empty','escape','error','return','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','20565MEoMeE','appcode','2405LhkiZG','exit','\x20→\x20.rabetbase.json','app','migrating-input','\x20\x20The\x20old\x20file\x20will\x20be\x20renamed\x20to\x20*.bak','string','Invalid\x20App\x20Code','创建配置文件失败','parse','1.0.0','30dZOrut','Error:\x20','split','success','production','slice','pop','message','2060hCaCwq','1464mGyqyp','AppCode','.bak','[Y/n]','初始化项目配置文件成功','cwd','Upgrade\x20it\x20to\x20','../..','red','You\x20can\x20now\x20use\x20commands\x20like\x20\x27rabetbase\x20api\x20doc\x27\x20and\x20\x27rabetbase\x20api\x20pull\x27','package.json','641795tzFidN','init','Initializing\x20configuration\x20file...','setLogPath','90QVHnUz','log','Old\x20file\x20backed\x20up\x20as\x20','3731132OeKQyr','migrating','328260ayElAP','delete','149484JMnHVL','5WIaKay','length','createdAt','green','trim','column','keys','8789RVpvuo','.lovrabetrc','init-input','✓\x20Upgraded\x20','.rabetbase.json','env','升级配置文件失败','\x20←\x20','46179hhKRQq','info'];a106_0x380c=function(){return _0x10b38e;};return a106_0x380c();}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';import{logger}from'../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME}from'../context.js';const LEGACY_CONFIG_NAMES=[a106_0x51a78b(0x128),a106_0x51a78b(0x167)];export function Init({appcode:_0x33c740,env:_0x400e60,autoYes:_0x100aa9}){const _0x3934cb=a106_0x51a78b,[_0x2645f2,_0x1f6e3a]=useState(_0x3934cb(0x12b)),[_0x27c2db,_0x83a497]=useState(null),[_0x3f9564,_0x35f99f]=useState(![]),[_0x3e55e4,_0x5b0c2a]=useState(!_0x33c740),[_0x5086a3,_0x2de824]=useState(''),[_0x3cca8b,_0xac74ee]=useState(''),[_0x45c5cd,_0x1f58c5]=useState(_0x33c740||''),[_0x37365b]=useState(_0x400e60),[_0x1b1cb0,_0xa61409]=useState(),[_0x13ad49,_0x236607]=useState({});function _0x2b251f(_0x1a9121){const _0x5af1b9=_0x3934cb;if(_0x1a9121[_0x5af1b9(0x160)]===0x0)return{'valid':![],'message':''};if(_0x1a9121[_0x5af1b9(0x160)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};const _0x24ecb9=/^[A-Za-z0-9_-]+$/;if(!_0x24ecb9['test'](_0x1a9121))return{'valid':![],'message':'App\x20Code\x20can\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_'};return{'valid':!![]};}useInput((_0x67d844,_0x4ff4fe)=>{const _0x19f57d=_0x3934cb;if(_0x2645f2===_0x19f57d(0x138)){if(_0x4ff4fe[_0x19f57d(0x130)]||_0x67d844==='y'||_0x67d844==='Y')_0x1f6e3a(_0x19f57d(0x15b));else{if(_0x67d844==='n'||_0x67d844==='N'||_0x4ff4fe[_0x19f57d(0x12e)])console[_0x19f57d(0x158)]('\x0aMigration\x20cancelled.\x20Run\x20`rabetbase\x20project\x20init`\x20to\x20start\x20fresh.'),process['exit'](0x0);else _0x4ff4fe['ctrl']&&_0x67d844==='c'&&process['exit'](0x0);}return;}if(!_0x3e55e4)return;if(_0x4ff4fe[_0x19f57d(0x130)]){if(_0x3cca8b||!_0x5086a3[_0x19f57d(0x163)]()){_0xac74ee(_0x19f57d(0x12d));return;}const _0x2df6da=_0x5086a3[_0x19f57d(0x163)](),{valid:_0x1867c4,message:_0x4c0510}=_0x2b251f(_0x2df6da);if(!_0x1867c4){_0xac74ee(_0x4c0510||_0x19f57d(0x13b));return;}_0x1f58c5(_0x2df6da),_0x5b0c2a(![]);}else{if(_0x4ff4fe['backspace']||_0x4ff4fe[_0x19f57d(0x15d)])_0x2de824(_0x3ea0d1=>{const _0x1d2079=_0x19f57d,_0x83cc55=_0x3ea0d1[_0x1d2079(0x144)](0x0,-0x1);return _0xac74ee(_0x83cc55[_0x1d2079(0x160)]===0x0?'':_0x2b251f(_0x83cc55)['message']||''),_0x83cc55;});else _0x4ff4fe['ctrl']&&_0x67d844==='c'?process[_0x19f57d(0x135)](0x0):_0x2de824(_0x362ddb=>{const _0x377338=_0x19f57d,_0x41bed3=_0x362ddb+_0x67d844;return _0xac74ee(_0x2b251f(_0x41bed3)[_0x377338(0x146)]||''),_0x41bed3;});}},{'isActive':_0x2645f2===_0x3934cb(0x138)||_0x2645f2===_0x3934cb(0x168)}),useEffect(()=>{const _0x312422=_0x3934cb;if(_0x2645f2!==_0x312422(0x12b))return;const _0x32bcf4=process['cwd']();if(getProjectConfigPath()){_0x83a497('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.'),_0x1f6e3a(_0x312422(0x12f)),setTimeout(()=>process[_0x312422(0x135)](0x1),0x64);return;}let _0x105c64;for(const _0x50d3c2 of LEGACY_CONFIG_NAMES){const _0x5c045c=resolve(_0x32bcf4,_0x50d3c2);if(existsSync(_0x5c045c)){_0x105c64=_0x5c045c;break;}}if(_0x105c64){_0xa61409(_0x105c64);try{const _0x3c6cfc=readFileSync(_0x105c64,_0x312422(0x125));_0x236607(JSON[_0x312422(0x13d)](_0x3c6cfc));}catch{_0x236607({});}_0x100aa9?_0x1f6e3a(_0x312422(0x15b)):_0x1f6e3a(_0x312422(0x138));return;}_0x1f6e3a('init-input'),!_0x33c740?_0x5b0c2a(!![]):_0x5b0c2a(![]);},[_0x2645f2,_0x100aa9,_0x33c740]),useEffect(()=>{const _0x4c83f3=_0x3934cb;if(_0x2645f2!==_0x4c83f3(0x15b))return;const _0x366e85=process[_0x4c83f3(0x14d)](),_0x1d406f=resolve(_0x366e85,NEW_CONFIG_NAME);try{const _0x10e160=fileURLToPath(import.meta.url),_0x27cd0e=resolve(dirname(_0x10e160),'../..'),_0x1b7503=join(_0x27cd0e,_0x4c83f3(0x152));let _0xa5a570=_0x4c83f3(0x13e);try{const _0x302964=JSON[_0x4c83f3(0x13d)](readFileSync(_0x1b7503,_0x4c83f3(0x125)));_0xa5a570=_0x302964[_0x4c83f3(0x12c)]||_0x4c83f3(0x13e);}catch{}const _0x1e243a=readRawConfig(),_0x43d987={..._0x1e243a,..._0x13ad49,'version':_0xa5a570,'migratedAt':new Date()['toLocaleString'](),'migratedFrom':_0x1b1cb0};if(!_0x43d987[_0x4c83f3(0x133)]&&!_0x43d987[_0x4c83f3(0x137)]){if(!_0x33c740){_0x236607(_0x43d987),_0x1f6e3a(_0x4c83f3(0x168)),_0x5b0c2a(!![]);return;}_0x43d987[_0x4c83f3(0x133)]=_0x33c740;}if(_0x43d987[_0x4c83f3(0x120)]&&typeof _0x43d987['env']!==_0x4c83f3(0x13a))delete _0x43d987[_0x4c83f3(0x120)];else!_0x43d987[_0x4c83f3(0x120)]&&(_0x43d987[_0x4c83f3(0x120)]=_0x1e243a[_0x4c83f3(0x120)]||'production');writeConfigFile(_0x1d406f,_0x43d987);if(_0x1b1cb0){const _0x45d055=_0x1b1cb0+_0x4c83f3(0x14a);renameSync(_0x1b1cb0,_0x45d055);}logger[_0x4c83f3(0x156)](_0x366e85),logger[_0x4c83f3(0x124)](_0x4c83f3(0x154),'从旧配置文件升级成功',{'from':_0x1b1cb0,'to':_0x1d406f,'appcode':_0x43d987[_0x4c83f3(0x133)]||_0x43d987['app'],'env':_0x43d987[_0x4c83f3(0x120)]}),_0x35f99f(!![]),_0x1f6e3a(_0x4c83f3(0x142)),setTimeout(()=>process['exit'](0x0),0x64);}catch(_0x15e29d){logger[_0x4c83f3(0x12f)](_0x4c83f3(0x154),_0x4c83f3(0x121),{'error':_0x15e29d instanceof Error?_0x15e29d['message']:String(_0x15e29d)}),_0x83a497(_0x4c83f3(0x140)+(_0x15e29d instanceof Error?_0x15e29d[_0x4c83f3(0x146)]:String(_0x15e29d))),_0x1f6e3a(_0x4c83f3(0x12f)),setTimeout(()=>process['exit'](0x1),0x64);}},[_0x2645f2]),useEffect(()=>{const _0x56906e=_0x3934cb;if(_0x2645f2!==_0x56906e(0x154))return;const _0x322b1d=process[_0x56906e(0x14d)](),_0x4e073=resolve(_0x322b1d,NEW_CONFIG_NAME);try{const _0x4379a8=fileURLToPath(import.meta.url),_0x5ca69f=resolve(dirname(_0x4379a8),_0x56906e(0x14f)),_0x5dc4bb=join(_0x5ca69f,_0x56906e(0x152));let _0x232fdb=_0x56906e(0x13e);try{const _0x58106e=JSON['parse'](readFileSync(_0x5dc4bb,_0x56906e(0x125)));_0x232fdb=_0x58106e[_0x56906e(0x12c)]||'1.0.0';}catch{}const _0x1aa231=readRawConfig(),_0x155f41=typeof _0x1aa231[_0x56906e(0x120)]===_0x56906e(0x13a)?_0x1aa231['env']:undefined,_0x41cbd7={};_0x13ad49&&Object[_0x56906e(0x165)](_0x13ad49)[_0x56906e(0x160)]>0x0&&Object['assign'](_0x41cbd7,_0x13ad49),!_0x41cbd7[_0x56906e(0x12c)]&&(_0x41cbd7['version']=_0x232fdb),!_0x41cbd7[_0x56906e(0x161)]&&(_0x41cbd7[_0x56906e(0x161)]=new Date()['toLocaleString']()),!_0x41cbd7[_0x56906e(0x133)]&&!_0x41cbd7[_0x56906e(0x137)]&&(_0x41cbd7[_0x56906e(0x133)]=_0x45c5cd),!_0x41cbd7['env']&&(_0x41cbd7[_0x56906e(0x120)]=_0x37365b||_0x155f41||_0x56906e(0x143)),writeConfigFile(_0x4e073,_0x41cbd7),logger['setLogPath'](_0x322b1d),logger[_0x56906e(0x124)](_0x56906e(0x154),_0x56906e(0x14c),{'appcode':_0x41cbd7[_0x56906e(0x133)]||_0x41cbd7['app'],'env':_0x41cbd7[_0x56906e(0x120)],'version':_0x41cbd7[_0x56906e(0x12c)],'configPath':_0x4e073}),_0x35f99f(!![]),_0x1f6e3a(_0x56906e(0x142)),setTimeout(()=>process[_0x56906e(0x135)](0x0),0x64);}catch(_0x12f9b5){logger[_0x56906e(0x12f)](_0x56906e(0x154),_0x56906e(0x13c),{'error':_0x12f9b5 instanceof Error?_0x12f9b5[_0x56906e(0x146)]:String(_0x12f9b5)}),_0x83a497(_0x56906e(0x140)+(_0x12f9b5 instanceof Error?_0x12f9b5[_0x56906e(0x146)]:String(_0x12f9b5))),_0x1f6e3a('error'),setTimeout(()=>process['exit'](0x1),0x64);}},[_0x2645f2,_0x45c5cd,_0x37365b]),useEffect(()=>{const _0x497e7a=_0x3934cb;_0x2645f2===_0x497e7a(0x168)&&!_0x3e55e4&&(_0x45c5cd||_0x13ad49&&Object['keys'](_0x13ad49)[_0x497e7a(0x160)]>0x0)&&_0x1f6e3a(_0x497e7a(0x154));},[_0x2645f2,_0x3e55e4,_0x45c5cd]);if(_0x27c2db)return a106_0x2981e5(Box,{'flexDirection':'column','children':a106_0x187a2b(Text,{'color':_0x3934cb(0x150),'children':['✗\x20',_0x27c2db]})});if(_0x2645f2===_0x3934cb(0x138)){const _0xd38695=_0x1b1cb0?_0x1b1cb0['split']('/')[_0x3934cb(0x145)]():_0x3934cb(0x129),_0x15414b=_0x13ad49?.['appcode']||_0x13ad49?.[_0x3934cb(0x137)];return a106_0x187a2b(Box,{'flexDirection':'column','children':[a106_0x187a2b(Text,{'color':_0x3934cb(0x12a),'children':[_0x3934cb(0x131),a106_0x2981e5(Text,{'bold':!![],'children':_0xd38695})]}),_0x15414b&&a106_0x187a2b(Text,{'color':_0x3934cb(0x126),'children':['\x20\x20appcode:\x20',_0x15414b]}),a106_0x187a2b(Text,{'children':['\x0a',_0x3934cb(0x14e),a106_0x2981e5(Text,{'bold':!![],'children':_0x3934cb(0x11f)}),'?','\x20',a106_0x2981e5(Text,{'color':_0x3934cb(0x162),'children':_0x3934cb(0x14b)})]}),a106_0x2981e5(Text,{'color':_0x3934cb(0x127),'children':_0x3934cb(0x139)})]});}if(_0x2645f2==='init-input'&&_0x3e55e4)return a106_0x187a2b(Box,{'flexDirection':_0x3934cb(0x164),'children':[a106_0x187a2b(Box,{'children':[a106_0x187a2b(Text,{'color':_0x3934cb(0x126),'children':['Please\x20enter\x20App\x20Code:','\x20']}),_0x5086a3?a106_0x2981e5(Text,{'color':_0x3934cb(0x162),'children':_0x5086a3}):a106_0x2981e5(Text,{'color':'gray','children':'_'}),_0x3cca8b&&a106_0x187a2b(Text,{'color':_0x3934cb(0x150),'children':[_0x3934cb(0x122),_0x3cca8b]})]}),!_0x3cca8b&&!_0x5086a3&&a106_0x2981e5(Box,{'children':a106_0x2981e5(Text,{'color':_0x3934cb(0x127),'children':'App\x20Code\x20identifies\x20your\x20project.\x20Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed'})})]});if(_0x2645f2===_0x3934cb(0x15b))return a106_0x2981e5(Box,{'children':a106_0x2981e5(Text,{'children':'Migrating\x20legacy\x20config...'})});if(_0x2645f2===_0x3934cb(0x154))return a106_0x2981e5(Box,{'children':a106_0x2981e5(Text,{'children':_0x3934cb(0x155)})});if(_0x3f9564||_0x2645f2==='success'){const _0x183780=_0x1b1cb0?_0x1b1cb0[_0x3934cb(0x141)]('/')['pop']():undefined;if(_0x183780)return a106_0x187a2b(Box,{'flexDirection':_0x3934cb(0x164),'children':[a106_0x187a2b(Text,{'color':_0x3934cb(0x162),'children':[_0x3934cb(0x11e),_0x183780,_0x3934cb(0x136)]}),a106_0x187a2b(Text,{'color':_0x3934cb(0x126),'children':[_0x3934cb(0x149),':\x20',_0x13ad49?.['appcode']||_0x13ad49?.[_0x3934cb(0x137)]]}),a106_0x187a2b(Text,{'color':_0x3934cb(0x127),'children':[_0x3934cb(0x159),_0x183780,_0x3934cb(0x14a)]})]});return a106_0x187a2b(Box,{'flexDirection':_0x3934cb(0x164),'children':[a106_0x187a2b(Text,{'color':_0x3934cb(0x162),'children':['✓\x20','Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory']}),a106_0x187a2b(Text,{'color':_0x3934cb(0x126),'children':[_0x3934cb(0x149),':\x20',_0x45c5cd]}),a106_0x2981e5(Text,{'children':_0x3934cb(0x151)})]});}return a106_0x2981e5(Box,{'children':a106_0x2981e5(Text,{'children':'Checking\x20existing\x20configuration...'})});}
|
|
1
|
+
function a107_0x47b2(_0x568695,_0x591548){_0x568695=_0x568695-0x1c3;const _0x3655b0=a107_0x3655();let _0x47b26c=_0x3655b0[_0x568695];return _0x47b26c;}const a107_0x4952c7=a107_0x47b2;(function(_0x474133,_0x96e12e){const _0x485ea6=a107_0x47b2,_0x22c6a3=_0x474133();while(!![]){try{const _0x25a08e=parseInt(_0x485ea6(0x206))/0x1+-parseInt(_0x485ea6(0x1c8))/0x2+-parseInt(_0x485ea6(0x1d9))/0x3+-parseInt(_0x485ea6(0x1fd))/0x4*(parseInt(_0x485ea6(0x1e7))/0x5)+parseInt(_0x485ea6(0x1db))/0x6*(parseInt(_0x485ea6(0x201))/0x7)+-parseInt(_0x485ea6(0x1cb))/0x8+-parseInt(_0x485ea6(0x1e9))/0x9*(-parseInt(_0x485ea6(0x1e8))/0xa);if(_0x25a08e===_0x96e12e)break;else _0x22c6a3['push'](_0x22c6a3['shift']());}catch(_0x3ed124){_0x22c6a3['push'](_0x22c6a3['shift']());}}}(a107_0x3655,0x30ce3));import{jsxs as a107_0x148b10,jsx as a107_0x526d39}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';import{logger}from'../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME}from'../context.js';const LEGACY_CONFIG_NAMES=[a107_0x4952c7(0x1e0),a107_0x4952c7(0x1c9)];function a107_0x3655(){const _0x231edf=['Initializing\x20configuration\x20file...','\x0aMigration\x20cancelled.\x20Run\x20`rabetbase\x20project\x20init`\x20to\x20start\x20fresh.','production','155060ZLDLTW','backspace','env','trim','91NfQBDU','keys','升级配置文件失败','gray','Migrating\x20legacy\x20config...','200624mKmWbJ','You\x20can\x20now\x20use\x20commands\x20like\x20\x27rabetbase\x20api\x20doc\x27\x20and\x20\x27rabetbase\x20api\x20pull\x27','version','\x20←\x20','utf8','Old\x20file\x20backed\x20up\x20as\x20','Invalid\x20App\x20Code','createdAt','green','App\x20Code\x20identifies\x20your\x20project.\x20Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','746648qCOvKF','.lovrabetrc','column','2651240SZRRgE','success','Upgrade\x20it\x20to\x20','✓\x20Upgraded\x20','checking','return','migrating','App\x20Code\x20cannot\x20be\x20empty','从旧配置文件升级成功','init-input','escape','error','migrating-input','init','509685UsOAjn','Error:\x20','137988Xkljgp','app','log','初始化项目配置文件成功','ctrl','.lovrabet.json','toLocaleString','appcode','string','.rabetbase.json','length','message','10WKfHli','10trtyax','5872167yBZnQa','创建配置文件失败','.bak','\x20\x20The\x20old\x20file\x20will\x20be\x20renamed\x20to\x20*.bak','split','exit','info','parse','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','package.json','yellow','cyan','setLogPath','cwd','../..','1.0.0','\x20\x20appcode:\x20'];a107_0x3655=function(){return _0x231edf;};return a107_0x3655();}export function Init({appcode:_0x1b528f,env:_0x1709e0,autoYes:_0x3d6b08}){const _0x11232e=a107_0x4952c7,[_0x10cfa2,_0x2be6f9]=useState(_0x11232e(0x1cf)),[_0x19eb85,_0x4453ba]=useState(null),[_0x4096dc,_0x299661]=useState(![]),[_0x9ec03c,_0x28127e]=useState(!_0x1b528f),[_0x3a57f3,_0x5a3b5c]=useState(''),[_0x47326d,_0x2f2d49]=useState(''),[_0x335991,_0x130b11]=useState(_0x1b528f||''),[_0x47df8e]=useState(_0x1709e0),[_0x16b513,_0x5c6a68]=useState(),[_0x201d28,_0x554519]=useState({});function _0x46fc1c(_0x40a350){const _0x1371a4=_0x11232e;if(_0x40a350[_0x1371a4(0x1e5)]===0x0)return{'valid':![],'message':''};if(_0x40a350[_0x1371a4(0x1e5)]>0x64)return{'valid':![],'message':'App\x20Code\x20cannot\x20exceed\x20100\x20characters'};const _0x2b53d7=/^[A-Za-z0-9_-]+$/;if(!_0x2b53d7['test'](_0x40a350))return{'valid':![],'message':'App\x20Code\x20can\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_'};return{'valid':!![]};}useInput((_0x18f817,_0x5921ac)=>{const _0x416fe4=_0x11232e;if(_0x10cfa2===_0x416fe4(0x1d7)){if(_0x5921ac['return']||_0x18f817==='y'||_0x18f817==='Y')_0x2be6f9(_0x416fe4(0x1d1));else{if(_0x18f817==='n'||_0x18f817==='N'||_0x5921ac[_0x416fe4(0x1d5)])console[_0x416fe4(0x1dd)](_0x416fe4(0x1fb)),process[_0x416fe4(0x1ee)](0x0);else _0x5921ac['ctrl']&&_0x18f817==='c'&&process['exit'](0x0);}return;}if(!_0x9ec03c)return;if(_0x5921ac[_0x416fe4(0x1d0)]){if(_0x47326d||!_0x3a57f3[_0x416fe4(0x200)]()){_0x2f2d49(_0x416fe4(0x1d2));return;}const _0x2de475=_0x3a57f3[_0x416fe4(0x200)](),{valid:_0x1f5e68,message:_0x425985}=_0x46fc1c(_0x2de475);if(!_0x1f5e68){_0x2f2d49(_0x425985||_0x416fe4(0x1c4));return;}_0x130b11(_0x2de475),_0x28127e(![]);}else{if(_0x5921ac[_0x416fe4(0x1fe)]||_0x5921ac['delete'])_0x5a3b5c(_0x1a554e=>{const _0xc47e7f=_0x416fe4,_0x13b8e9=_0x1a554e['slice'](0x0,-0x1);return _0x2f2d49(_0x13b8e9[_0xc47e7f(0x1e5)]===0x0?'':_0x46fc1c(_0x13b8e9)[_0xc47e7f(0x1e6)]||''),_0x13b8e9;});else _0x5921ac[_0x416fe4(0x1df)]&&_0x18f817==='c'?process[_0x416fe4(0x1ee)](0x0):_0x5a3b5c(_0x3690c2=>{const _0x32b768=_0x416fe4,_0x49fcf3=_0x3690c2+_0x18f817;return _0x2f2d49(_0x46fc1c(_0x49fcf3)[_0x32b768(0x1e6)]||''),_0x49fcf3;});}},{'isActive':_0x10cfa2===_0x11232e(0x1d7)||_0x10cfa2==='init-input'}),useEffect(()=>{const _0x26a0c8=_0x11232e;if(_0x10cfa2!==_0x26a0c8(0x1cf))return;const _0x151560=process[_0x26a0c8(0x1f6)]();if(getProjectConfigPath()){_0x4453ba('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.'),_0x2be6f9(_0x26a0c8(0x1d6)),setTimeout(()=>process[_0x26a0c8(0x1ee)](0x1),0x64);return;}let _0x314944;for(const _0x3c7d4f of LEGACY_CONFIG_NAMES){const _0x4bb102=resolve(_0x151560,_0x3c7d4f);if(existsSync(_0x4bb102)){_0x314944=_0x4bb102;break;}}if(_0x314944){_0x5c6a68(_0x314944);try{const _0x362240=readFileSync(_0x314944,_0x26a0c8(0x20a));_0x554519(JSON[_0x26a0c8(0x1f0)](_0x362240));}catch{_0x554519({});}_0x3d6b08?_0x2be6f9(_0x26a0c8(0x1d1)):_0x2be6f9(_0x26a0c8(0x1d7));return;}_0x2be6f9(_0x26a0c8(0x1d4)),!_0x1b528f?_0x28127e(!![]):_0x28127e(![]);},[_0x10cfa2,_0x3d6b08,_0x1b528f]),useEffect(()=>{const _0x55a525=_0x11232e;if(_0x10cfa2!==_0x55a525(0x1d1))return;const _0x1aeeed=process[_0x55a525(0x1f6)](),_0x44835c=resolve(_0x1aeeed,NEW_CONFIG_NAME);try{const _0x4f2956=fileURLToPath(import.meta.url),_0x1046b4=resolve(dirname(_0x4f2956),'../..'),_0x37580a=join(_0x1046b4,'package.json');let _0x33d874=_0x55a525(0x1f8);try{const _0x45139c=JSON[_0x55a525(0x1f0)](readFileSync(_0x37580a,_0x55a525(0x20a)));_0x33d874=_0x45139c[_0x55a525(0x208)]||_0x55a525(0x1f8);}catch{}const _0x3e1cdd=readRawConfig(),_0x4f2ee3={..._0x3e1cdd,..._0x201d28,'version':_0x33d874,'migratedAt':new Date()[_0x55a525(0x1e1)](),'migratedFrom':_0x16b513};if(!_0x4f2ee3[_0x55a525(0x1e2)]&&!_0x4f2ee3['app']){if(!_0x1b528f){_0x554519(_0x4f2ee3),_0x2be6f9('init-input'),_0x28127e(!![]);return;}_0x4f2ee3['appcode']=_0x1b528f;}if(_0x4f2ee3[_0x55a525(0x1ff)]&&typeof _0x4f2ee3[_0x55a525(0x1ff)]!==_0x55a525(0x1e3))delete _0x4f2ee3[_0x55a525(0x1ff)];else!_0x4f2ee3[_0x55a525(0x1ff)]&&(_0x4f2ee3['env']=_0x3e1cdd['env']||'production');writeConfigFile(_0x44835c,_0x4f2ee3);if(_0x16b513){const _0x54f245=_0x16b513+_0x55a525(0x1eb);renameSync(_0x16b513,_0x54f245);}logger['setLogPath'](_0x1aeeed),logger[_0x55a525(0x1ef)]('init',_0x55a525(0x1d3),{'from':_0x16b513,'to':_0x44835c,'appcode':_0x4f2ee3[_0x55a525(0x1e2)]||_0x4f2ee3['app'],'env':_0x4f2ee3[_0x55a525(0x1ff)]}),_0x299661(!![]),_0x2be6f9(_0x55a525(0x1cc)),setTimeout(()=>process[_0x55a525(0x1ee)](0x0),0x64);}catch(_0x5d7658){logger[_0x55a525(0x1d6)](_0x55a525(0x1d8),_0x55a525(0x203),{'error':_0x5d7658 instanceof Error?_0x5d7658[_0x55a525(0x1e6)]:String(_0x5d7658)}),_0x4453ba(_0x55a525(0x1da)+(_0x5d7658 instanceof Error?_0x5d7658['message']:String(_0x5d7658))),_0x2be6f9(_0x55a525(0x1d6)),setTimeout(()=>process[_0x55a525(0x1ee)](0x1),0x64);}},[_0x10cfa2]),useEffect(()=>{const _0x362516=_0x11232e;if(_0x10cfa2!==_0x362516(0x1d8))return;const _0x5ae5d7=process[_0x362516(0x1f6)](),_0x596a95=resolve(_0x5ae5d7,NEW_CONFIG_NAME);try{const _0x2ec9ed=fileURLToPath(import.meta.url),_0x4bc122=resolve(dirname(_0x2ec9ed),_0x362516(0x1f7)),_0x876518=join(_0x4bc122,_0x362516(0x1f2));let _0x4e1520='1.0.0';try{const _0x20fa39=JSON[_0x362516(0x1f0)](readFileSync(_0x876518,_0x362516(0x20a)));_0x4e1520=_0x20fa39['version']||'1.0.0';}catch{}const _0x4ac65e=readRawConfig(),_0x357539=typeof _0x4ac65e[_0x362516(0x1ff)]===_0x362516(0x1e3)?_0x4ac65e[_0x362516(0x1ff)]:undefined,_0x49cd80={};_0x201d28&&Object[_0x362516(0x202)](_0x201d28)['length']>0x0&&Object['assign'](_0x49cd80,_0x201d28),!_0x49cd80['version']&&(_0x49cd80[_0x362516(0x208)]=_0x4e1520),!_0x49cd80['createdAt']&&(_0x49cd80[_0x362516(0x1c5)]=new Date()[_0x362516(0x1e1)]()),!_0x49cd80[_0x362516(0x1e2)]&&!_0x49cd80[_0x362516(0x1dc)]&&(_0x49cd80['appcode']=_0x335991),!_0x49cd80['env']&&(_0x49cd80[_0x362516(0x1ff)]=_0x47df8e||_0x357539||_0x362516(0x1fc)),writeConfigFile(_0x596a95,_0x49cd80),logger[_0x362516(0x1f5)](_0x5ae5d7),logger[_0x362516(0x1ef)]('init',_0x362516(0x1de),{'appcode':_0x49cd80[_0x362516(0x1e2)]||_0x49cd80[_0x362516(0x1dc)],'env':_0x49cd80[_0x362516(0x1ff)],'version':_0x49cd80[_0x362516(0x208)],'configPath':_0x596a95}),_0x299661(!![]),_0x2be6f9(_0x362516(0x1cc)),setTimeout(()=>process[_0x362516(0x1ee)](0x0),0x64);}catch(_0x1ccd03){logger['error'](_0x362516(0x1d8),_0x362516(0x1ea),{'error':_0x1ccd03 instanceof Error?_0x1ccd03['message']:String(_0x1ccd03)}),_0x4453ba(_0x362516(0x1da)+(_0x1ccd03 instanceof Error?_0x1ccd03[_0x362516(0x1e6)]:String(_0x1ccd03))),_0x2be6f9(_0x362516(0x1d6)),setTimeout(()=>process[_0x362516(0x1ee)](0x1),0x64);}},[_0x10cfa2,_0x335991,_0x47df8e]),useEffect(()=>{const _0x27e38a=_0x11232e;_0x10cfa2==='init-input'&&!_0x9ec03c&&(_0x335991||_0x201d28&&Object[_0x27e38a(0x202)](_0x201d28)[_0x27e38a(0x1e5)]>0x0)&&_0x2be6f9(_0x27e38a(0x1d8));},[_0x10cfa2,_0x9ec03c,_0x335991]);if(_0x19eb85)return a107_0x526d39(Box,{'flexDirection':_0x11232e(0x1ca),'children':a107_0x148b10(Text,{'color':'red','children':['✗\x20',_0x19eb85]})});if(_0x10cfa2===_0x11232e(0x1d7)){const _0x32048c=_0x16b513?_0x16b513[_0x11232e(0x1ed)]('/')['pop']():'legacy\x20config',_0x25aa96=_0x201d28?.[_0x11232e(0x1e2)]||_0x201d28?.[_0x11232e(0x1dc)];return a107_0x148b10(Box,{'flexDirection':_0x11232e(0x1ca),'children':[a107_0x148b10(Text,{'color':_0x11232e(0x1f3),'children':[_0x11232e(0x1f1),a107_0x526d39(Text,{'bold':!![],'children':_0x32048c})]}),_0x25aa96&&a107_0x148b10(Text,{'color':'cyan','children':[_0x11232e(0x1f9),_0x25aa96]}),a107_0x148b10(Text,{'children':['\x0a',_0x11232e(0x1cd),a107_0x526d39(Text,{'bold':!![],'children':_0x11232e(0x1e4)}),'?','\x20',a107_0x526d39(Text,{'color':'green','children':'[Y/n]'})]}),a107_0x526d39(Text,{'color':_0x11232e(0x204),'children':_0x11232e(0x1ec)})]});}if(_0x10cfa2===_0x11232e(0x1d4)&&_0x9ec03c)return a107_0x148b10(Box,{'flexDirection':_0x11232e(0x1ca),'children':[a107_0x148b10(Box,{'children':[a107_0x148b10(Text,{'color':_0x11232e(0x1f4),'children':['Please\x20enter\x20App\x20Code:','\x20']}),_0x3a57f3?a107_0x526d39(Text,{'color':_0x11232e(0x1c6),'children':_0x3a57f3}):a107_0x526d39(Text,{'color':_0x11232e(0x204),'children':'_'}),_0x47326d&&a107_0x148b10(Text,{'color':'red','children':[_0x11232e(0x209),_0x47326d]})]}),!_0x47326d&&!_0x3a57f3&&a107_0x526d39(Box,{'children':a107_0x526d39(Text,{'color':_0x11232e(0x204),'children':_0x11232e(0x1c7)})})]});if(_0x10cfa2===_0x11232e(0x1d1))return a107_0x526d39(Box,{'children':a107_0x526d39(Text,{'children':_0x11232e(0x205)})});if(_0x10cfa2===_0x11232e(0x1d8))return a107_0x526d39(Box,{'children':a107_0x526d39(Text,{'children':_0x11232e(0x1fa)})});if(_0x4096dc||_0x10cfa2===_0x11232e(0x1cc)){const _0x3c81f0=_0x16b513?_0x16b513['split']('/')['pop']():undefined;if(_0x3c81f0)return a107_0x148b10(Box,{'flexDirection':_0x11232e(0x1ca),'children':[a107_0x148b10(Text,{'color':_0x11232e(0x1c6),'children':[_0x11232e(0x1ce),_0x3c81f0,'\x20→\x20.rabetbase.json']}),a107_0x148b10(Text,{'color':_0x11232e(0x1f4),'children':['AppCode',':\x20',_0x201d28?.['appcode']||_0x201d28?.['app']]}),a107_0x148b10(Text,{'color':_0x11232e(0x204),'children':[_0x11232e(0x1c3),_0x3c81f0,'.bak']})]});return a107_0x148b10(Box,{'flexDirection':_0x11232e(0x1ca),'children':[a107_0x148b10(Text,{'color':_0x11232e(0x1c6),'children':['✓\x20','Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory']}),a107_0x148b10(Text,{'color':_0x11232e(0x1f4),'children':['AppCode',':\x20',_0x335991]}),a107_0x526d39(Text,{'children':_0x11232e(0x207)})]});}return a107_0x526d39(Box,{'children':a107_0x526d39(Text,{'children':'Checking\x20existing\x20configuration...'})});}
|
package/lib/mcp/McpInstallUI.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a108_0x46cc(_0x5e9c46,_0x747e53){_0x5e9c46=_0x5e9c46-0x161;const _0x5e18ed=a108_0x5e18();let _0x46ccc0=_0x5e18ed[_0x5e9c46];return _0x46ccc0;}(function(_0x1332e5,_0x369793){const _0x4099ba=a108_0x46cc,_0x2575e8=_0x1332e5();while(!![]){try{const _0x4541c4=-parseInt(_0x4099ba(0x18e))/0x1*(parseInt(_0x4099ba(0x187))/0x2)+parseInt(_0x4099ba(0x188))/0x3*(parseInt(_0x4099ba(0x180))/0x4)+-parseInt(_0x4099ba(0x169))/0x5+-parseInt(_0x4099ba(0x167))/0x6*(-parseInt(_0x4099ba(0x18b))/0x7)+-parseInt(_0x4099ba(0x17b))/0x8*(-parseInt(_0x4099ba(0x164))/0x9)+parseInt(_0x4099ba(0x171))/0xa*(-parseInt(_0x4099ba(0x166))/0xb)+-parseInt(_0x4099ba(0x18d))/0xc*(-parseInt(_0x4099ba(0x181))/0xd);if(_0x4541c4===_0x369793)break;else _0x2575e8['push'](_0x2575e8['shift']());}catch(_0x1fe8bf){_0x2575e8['push'](_0x2575e8['shift']());}}}(a108_0x5e18,0x9ae44));import{jsx as a108_0x20f8cc,jsxs as a108_0x5c034f,Fragment as a108_0x4c1fed}from'react/jsx-runtime';import{useState,useEffect,useMemo}from'react';function a108_0x5e18(){const _0x4c577f=['find','done','getSelectedIDEs','configuring','green','818080sWtOLN','map','from','ide','every','name','selecting','key','manual','success','1297248cSpOIN','Selected\x20IDEs','red','cyan','error','73236nINChu','1571921MksCwP','✗\x20Configuration\x20failed','description','status','handleKeyDown','white','2HPecKF','165BORnkM','selectedIndexes','message','3676778clgVKN','Configure\x20Lovrabet\x20MCP\x20Server','12YPJIDC','398479PzqYfh','yellow','label','setErrorMsg','some','Other\x20IDE\x20configuration\x20guide','gray','⚠️\x20','45bzyorc','size','121JIjvcL','12mYPHtG','column','5281985pzeWZu','Please\x20select\x20at\x20least\x20one\x20IDE','needsManualAction'];a108_0x5e18=function(){return _0x4c577f;};return a108_0x5e18();}import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{installMcp}from'./mcp-installer.js';export function McpInstallUI({preselectedIDEs:preselectedIDEs=[],enableBffSave:_0x54fd8a}){const _0x1c6a99=a108_0x46cc,{exit:_0x23dec}=useApp(),[_0x3398d4,_0x581cb5]=useState('selecting'),[_0x378c71,_0x4299e9]=useState([]),[_0x1d8247,_0x10b727]=useState([]),_0x2e0e58=useMemo(()=>[...Array[_0x1c6a99(0x173)](MCP_IDES)[_0x1c6a99(0x172)](_0x3537e4=>({'key':_0x3537e4,'name':IDE_CONFIGS[_0x3537e4][_0x1c6a99(0x176)],'description':IDE_CONFIGS[_0x3537e4][_0x1c6a99(0x183)]})),{'key':'other','name':'Other\x20IDE','description':_0x1c6a99(0x161)}],[]),_0x537629=useIDESelection({'ideList':_0x2e0e58,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0x37921e=_0x1c6a99;preselectedIDEs['length']>0x0&&_0x537629[_0x37921e(0x189)][_0x37921e(0x165)]>0x0&&_0x30fd9c();},[]),useInput((_0x5b98c5,_0x2c6665)=>{const _0x58bf0a=_0x1c6a99;if(_0x3398d4===_0x58bf0a(0x177)){if(_0x5b98c5==='q'||_0x5b98c5==='Q'){_0x23dec();return;}if(_0x2c6665['return']){if(_0x537629[_0x58bf0a(0x189)][_0x58bf0a(0x165)]===0x0){_0x537629[_0x58bf0a(0x191)](_0x58bf0a(0x16a));return;}_0x30fd9c();return;}_0x537629[_0x58bf0a(0x185)](_0x5b98c5,_0x2c6665);}_0x3398d4===_0x58bf0a(0x16d)&&_0x23dec();});async function _0x30fd9c(){const _0x51bfe6=_0x1c6a99,_0x3d3122=_0x537629[_0x51bfe6(0x16e)]();_0x4299e9([{'label':_0x51bfe6(0x17c),'value':''+_0x537629[_0x51bfe6(0x189)][_0x51bfe6(0x165)]}]),_0x581cb5('configuring');const _0x2548e2=await installMcp(_0x3d3122,_0x54fd8a),_0x163e46=_0x2548e2[_0x51bfe6(0x172)](_0x56dfdb=>({'ide':_0x2e0e58[_0x51bfe6(0x16c)](_0x4ba4b8=>_0x4ba4b8[_0x51bfe6(0x178)]===_0x56dfdb[_0x51bfe6(0x174)])?.[_0x51bfe6(0x176)]||_0x56dfdb['ide'],'status':_0x56dfdb[_0x51bfe6(0x16b)]?'manual':_0x56dfdb[_0x51bfe6(0x17a)]?'success':'error','message':_0x56dfdb[_0x51bfe6(0x18a)]}));_0x10b727(_0x163e46),_0x581cb5(_0x51bfe6(0x16d)),setTimeout(()=>{_0x23dec();},0x1388);}return a108_0x5c034f(Box,{'flexDirection':_0x1c6a99(0x168),'marginTop':0x1,'children':[_0x3398d4==='selecting'&&a108_0x20f8cc(IDESelector,{'ideList':_0x2e0e58,'title':_0x1c6a99(0x18c),'selection':_0x537629}),_0x3398d4===_0x1c6a99(0x16f)&&a108_0x5c034f(a108_0x4c1fed,{'children':[_0x378c71[_0x1c6a99(0x172)]((_0x2f843e,_0x267024)=>a108_0x5c034f(Box,{'children':[a108_0x5c034f(Text,{'color':_0x1c6a99(0x170),'children':['√\x20',_0x2f843e[_0x1c6a99(0x190)],':\x20']}),a108_0x20f8cc(Text,{'color':_0x1c6a99(0x17e),'children':_0x2f843e['value']})]},_0x267024)),a108_0x20f8cc(Box,{'marginTop':0x1,'children':a108_0x20f8cc(Text,{'children':'Configuring\x20MCP\x20server...'})})]}),_0x3398d4===_0x1c6a99(0x16d)&&a108_0x20f8cc(DoneStep,{'configResults':_0x1d8247})]});}function DoneStep({configResults:_0x11a81f}){const _0x45ab06=a108_0x46cc,_0x1029da=_0x11a81f[_0x45ab06(0x175)](_0x49fd15=>_0x49fd15[_0x45ab06(0x184)]===_0x45ab06(0x17a)),_0x52edd9=_0x11a81f['some'](_0x480883=>_0x480883[_0x45ab06(0x184)]===_0x45ab06(0x179)),_0x2836af=_0x11a81f[_0x45ab06(0x192)](_0x4b74c2=>_0x4b74c2[_0x45ab06(0x184)]===_0x45ab06(0x17f));return a108_0x5c034f(Box,{'flexDirection':_0x45ab06(0x168),'children':[a108_0x20f8cc(Box,{'marginTop':0x1,'marginBottom':0x1,'children':_0x1029da?a108_0x20f8cc(Text,{'color':_0x45ab06(0x170),'bold':!![],'children':'✓\x20MCP\x20configuration\x20completed!'}):_0x52edd9?a108_0x20f8cc(Text,{'color':_0x45ab06(0x18f),'bold':!![],'children':'⚠️\x20Some\x20configurations\x20require\x20manual\x20steps'}):_0x2836af?a108_0x20f8cc(Text,{'color':_0x45ab06(0x17d),'bold':!![],'children':_0x45ab06(0x182)}):a108_0x20f8cc(Text,{'color':'yellow','bold':!![],'children':'⚠️\x20Configuration\x20requires\x20manual\x20steps'})}),_0x11a81f[_0x45ab06(0x172)]((_0x1d5731,_0x31f966)=>{const _0x3c178b=_0x45ab06,_0x54006b=_0x1d5731[_0x3c178b(0x184)]==='success',_0x5ba1f1=_0x1d5731[_0x3c178b(0x184)]===_0x3c178b(0x179);return a108_0x5c034f(Box,{'flexDirection':_0x3c178b(0x168),'marginBottom':0x1,'children':[a108_0x20f8cc(Box,{'children':a108_0x5c034f(Text,{'bold':!![],'color':_0x54006b?_0x3c178b(0x170):_0x5ba1f1?_0x3c178b(0x18f):'red','children':[_0x54006b?'✓\x20':_0x5ba1f1?_0x3c178b(0x163):'✗\x20',_0x1d5731[_0x3c178b(0x174)],':']})}),a108_0x20f8cc(Box,{'paddingLeft':0x3,'flexDirection':_0x3c178b(0x168),'children':a108_0x20f8cc(Text,{'color':_0x3c178b(0x186),'children':_0x1d5731[_0x3c178b(0x18a)]})})]},_0x31f966);}),a108_0x20f8cc(Box,{'marginTop':0x1,'children':a108_0x20f8cc(Text,{'color':_0x45ab06(0x162),'children':'Press\x20any\x20key\x20to\x20exit...'})})]});}
|
package/lib/mcp/claude.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1f1ea8,_0x214979){const _0x5126e0=a109_0x4d4e,_0x247f59=_0x1f1ea8();while(!![]){try{const _0x4cf629=parseInt(_0x5126e0(0x10f))/0x1+-parseInt(_0x5126e0(0x10d))/0x2*(-parseInt(_0x5126e0(0x117))/0x3)+-parseInt(_0x5126e0(0x10e))/0x4*(parseInt(_0x5126e0(0x111))/0x5)+parseInt(_0x5126e0(0x116))/0x6+-parseInt(_0x5126e0(0x10c))/0x7+parseInt(_0x5126e0(0x110))/0x8+-parseInt(_0x5126e0(0x114))/0x9;if(_0x4cf629===_0x214979)break;else _0x247f59['push'](_0x247f59['shift']());}catch(_0x20ee48){_0x247f59['push'](_0x247f59['shift']());}}}(a109_0x504c,0x83701));function a109_0x504c(){const _0x5eb3fc=['\x0aError:\x20Configuration\x20failed\x20-\x20','5549082oCLOzI','2274jWLfvZ','exit','\x0a📋\x20','311150NdpPPN','530bUiJuW','1029844BESvOn','626733swLeJd','8337904RvnQeX','15HMeiif','success','message','12955374bfbEqh'];a109_0x504c=function(){return _0x5eb3fc;};return a109_0x504c();}function a109_0x4d4e(_0x21cdc8,_0x1e7400){_0x21cdc8=_0x21cdc8-0x10a;const _0x504cc3=a109_0x504c();let _0x4d4e11=_0x504cc3[_0x21cdc8];return _0x4d4e11;}import{configureClaudeMcp as a109_0x24c916}from'./mcp-installer.js';export async function configureClaudeMcp(){const _0x4c0301=a109_0x4d4e,_0x4ba615=process['cwd'](),_0x4f1e6d=a109_0x24c916(_0x4ba615);_0x4f1e6d[_0x4c0301(0x112)]?(console['log'](_0x4c0301(0x10b)+_0x4f1e6d[_0x4c0301(0x113)]+'\x0a'),process[_0x4c0301(0x10a)](0x0)):(console['error'](_0x4c0301(0x115)+_0x4f1e6d['message']+'\x0a'),process[_0x4c0301(0x10a)](0x1));}
|
package/lib/mcp/cursor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x372308,_0xbd1771){const _0x4d18b3=a110_0x106f,_0xab1cb7=_0x372308();while(!![]){try{const _0x4cbf99=-parseInt(_0x4d18b3(0x1d9))/0x1+-parseInt(_0x4d18b3(0x1de))/0x2+-parseInt(_0x4d18b3(0x1d0))/0x3+parseInt(_0x4d18b3(0x1df))/0x4*(-parseInt(_0x4d18b3(0x1d6))/0x5)+parseInt(_0x4d18b3(0x1e2))/0x6+-parseInt(_0x4d18b3(0x1db))/0x7*(parseInt(_0x4d18b3(0x1d8))/0x8)+parseInt(_0x4d18b3(0x1dd))/0x9*(parseInt(_0x4d18b3(0x1d2))/0xa);if(_0x4cbf99===_0xbd1771)break;else _0xab1cb7['push'](_0xab1cb7['shift']());}catch(_0x476928){_0xab1cb7['push'](_0xab1cb7['shift']());}}}(a110_0x478a,0x56be9));import{configureCursorMcp as a110_0x56e729}from'./mcp-installer.js';function a110_0x478a(){const _0xfbefcd=['57678UQzoWk','1488441pYCyBl','Please\x20restart\x20Cursor\x20to\x20load\x20the\x20new\x20MCP\x20config.','603530PXMFQs','log','You\x20can\x20now\x20use\x20Lovrabet\x20dataset\x20MCP\x20tools\x20in\x20Cursor.','\x0a✓\x20Cursor\x20MCP\x20configured\x20successfully!\x0a','835wShOHP','success','3496ttBskv','143220GsRMgK','error','9436cHeYIT','Configuration:','369sujJCy','1096938ThgLLp','8428xgXtlE','message','cwd'];a110_0x478a=function(){return _0xfbefcd;};return a110_0x478a();}function a110_0x106f(_0x25098e,_0x7df480){_0x25098e=_0x25098e-0x1d0;const _0x478ae1=a110_0x478a();let _0x106fb7=_0x478ae1[_0x25098e];return _0x106fb7;}export async function configureCursorMcp(){const _0x21f005=a110_0x106f,_0x378ab0=process[_0x21f005(0x1e1)](),_0x49c5f2=await a110_0x56e729(_0x378ab0);_0x49c5f2[_0x21f005(0x1d7)]?(console[_0x21f005(0x1d3)](_0x21f005(0x1d5)),console[_0x21f005(0x1d3)](_0x21f005(0x1dc)),console[_0x21f005(0x1d3)]('\x20\x20'+_0x49c5f2['message']+'\x0a'),console['log'](_0x21f005(0x1d4)),console['log'](_0x21f005(0x1d1)),process['exit'](0x0)):(console[_0x21f005(0x1da)]('\x0aError:\x20Configuration\x20failed\x20-\x20'+_0x49c5f2[_0x21f005(0x1e0)]+'\x0a'),process['exit'](0x1));}
|
package/lib/mcp/main.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
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']('');}
|