@lovrabet/rabetbase-cli 2.0.2-beta.8 → 2.0.2-beta.9
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/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/doc.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/app.js +1 -1
- package/lib/commands/auth.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/new.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/build.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/config.js +1 -1
- package/lib/commands/create.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init.js +1 -1
- package/lib/commands/logout.js +1 -1
- package/lib/commands/logs.js +1 -1
- package/lib/commands/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/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.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/platform.js +1 -0
- 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 -2
- package/lib/ai-setup/config.js +0 -1
- package/lib/commands/mcp.js +0 -1
- package/lib/mcp/McpInstallUI.js +0 -1
- package/lib/mcp/claude.js +0 -1
- package/lib/mcp/cursor.js +0 -1
- package/lib/mcp/main.js +0 -1
- package/lib/mcp/mcp-install-non-interactive.js +0 -1
- package/lib/mcp/mcp-installer.js +0 -1
- package/lib/telemetry/otel-logger-version.js +0 -1
- package/lib/ui/IDESelector.js +0 -1
- package/lib/ui/useIDESelection.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x307e5b,_0x1f7172){const _0xe98aa3=a114_0x56d5,_0x206d06=_0x307e5b();while(!![]){try{const _0x40e5e3=-parseInt(_0xe98aa3(0x104))/0x1+parseInt(_0xe98aa3(0x10a))/0x2+-parseInt(_0xe98aa3(0xfe))/0x3*(parseInt(_0xe98aa3(0x10e))/0x4)+-parseInt(_0xe98aa3(0x105))/0x5*(-parseInt(_0xe98aa3(0xfc))/0x6)+-parseInt(_0xe98aa3(0x109))/0x7+parseInt(_0xe98aa3(0x100))/0x8+parseInt(_0xe98aa3(0x102))/0x9;if(_0x40e5e3===_0x1f7172)break;else _0x206d06['push'](_0x206d06['shift']());}catch(_0x20f2aa){_0x206d06['push'](_0x206d06['shift']());}}}(a114_0x1e91,0x90afb));function a114_0x56d5(_0x2e589f,_0x5ab25e){_0x2e589f=_0x2e589f-0xfc;const _0x1e9196=a114_0x1e91();let _0x56d50c=_0x1e9196[_0x2e589f];return _0x56d50c;}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a114_0x1a6701 from'semver';import{getCdnConfig}from'./cdn-config.js';function a114_0x1e91(){const _0x329b85=['6292480OkYDLv','\x1b[1m','9935883HtYlFG','../..','678324rCwTiC','5uiGiLh','some','stableVersion','coerce','1402079Qwnawn','10066OnEyHb','\x20\x20\x20Current\x20CLI\x20version:\x20','npm\x20install\x20-g\x20','@latest','4oVloVt','needsUpgrade','cli','\x1b[33m','log','1.0.0','utf-8','3782508ruXVBf','\x20\x20\x20Upgrade\x20command:\x20','3164226jposEY','\x1b[0m'];a114_0x1e91=function(){return _0x329b85;};return a114_0x1e91();}import{NPM_PACKAGE_NAME}from'../constant/cli.js';function getCurrentCliVersion(){const _0x42f85d=a114_0x56d5;try{const _0x41c89e=fileURLToPath(import.meta.url),_0x44231a=resolve(dirname(_0x41c89e),_0x42f85d(0x103)),_0x47aa40=resolve(_0x44231a,'package.json'),_0x5c7f2d=JSON['parse'](readFileSync(_0x47aa40,_0x42f85d(0x114)));return _0x5c7f2d['version']||_0x42f85d(0x113);}catch{return _0x42f85d(0x113);}}function isNonNumericVersion(_0x77eec4){const _0x580c8d=a114_0x56d5,_0x311c5f=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x311c5f[_0x580c8d(0x106)](_0xb684b7=>_0xb684b7['test'](_0x77eec4));}export async function checkCliVersion(){const _0x5359f0=a114_0x56d5,_0x344c14=getCurrentCliVersion(),_0xd432d0=await getCdnConfig(),_0x297199=_0xd432d0?.[_0x5359f0(0x110)]?.[_0x5359f0(0x107)]||null;let _0x2ab4b0=![];if(_0x297199)try{const _0x45e4d2=a114_0x1a6701[_0x5359f0(0x108)](_0x344c14),_0x5020fe=a114_0x1a6701[_0x5359f0(0x108)](_0x297199);_0x45e4d2&&_0x5020fe&&(_0x2ab4b0=a114_0x1a6701['lt'](_0x45e4d2,_0x5020fe));}catch{_0x2ab4b0=![];}return{'currentVersion':_0x344c14,'stableVersion':_0x297199,'needsUpgrade':_0x2ab4b0,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x138de9){const _0x503bce=a114_0x56d5;if(!_0x138de9[_0x503bce(0x10f)])return;const _0x118baf=_0x503bce(0x111),_0x49260d=_0x503bce(0xff),_0x3e4f0a=_0x503bce(0x101),_0x3c705e=_0x503bce(0x10c)+NPM_PACKAGE_NAME+_0x503bce(0x10d);console[_0x503bce(0x112)](),console[_0x503bce(0x112)](''+_0x118baf+_0x3e4f0a+'↪\x20New\x20version\x20available'+_0x49260d),console[_0x503bce(0x112)](_0x118baf+_0x503bce(0x10b)+_0x138de9['currentVersion']+_0x49260d),console[_0x503bce(0x112)](_0x118baf+'\x20\x20\x20Stable\x20version:\x20'+_0x138de9[_0x503bce(0x107)]+_0x49260d),console[_0x503bce(0x112)](_0x118baf+_0x503bce(0xfd)+_0x3c705e+_0x49260d),console[_0x503bce(0x112)]();}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4ec589,_0x429eda){const _0x51ce43=a115_0x4d83,_0x40c44=_0x4ec589();while(!![]){try{const _0x3414c1=-parseInt(_0x51ce43(0xe0))/0x1+parseInt(_0x51ce43(0xe3))/0x2+-parseInt(_0x51ce43(0xd6))/0x3+parseInt(_0x51ce43(0xd0))/0x4*(-parseInt(_0x51ce43(0xe4))/0x5)+parseInt(_0x51ce43(0xe5))/0x6*(-parseInt(_0x51ce43(0xe6))/0x7)+-parseInt(_0x51ce43(0xd7))/0x8*(parseInt(_0x51ce43(0xd3))/0x9)+parseInt(_0x51ce43(0xce))/0xa*(parseInt(_0x51ce43(0xdb))/0xb);if(_0x3414c1===_0x429eda)break;else _0x40c44['push'](_0x40c44['shift']());}catch(_0x442402){_0x40c44['push'](_0x40c44['shift']());}}}(a115_0x3e5d,0xe854a));import{initEnv}from'../constant/env.js';import{readRawConfig}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x3aa6bf){const _0x492199=a115_0x4d83,_0x191557=readRawConfig(_0x3aa6bf);return _0x191557[_0x492199(0xdf)]&&typeof _0x191557[_0x492199(0xdf)]===_0x492199(0xd2)&&initEnv(_0x191557[_0x492199(0xdf)]),_0x191557;}export function getConfigAppCode(){const _0x5cf0fc=a115_0x4d83,_0xda8854=readRawConfig();if(_0xda8854[_0x5cf0fc(0xe2)]&&typeof _0xda8854['apps']===_0x5cf0fc(0xe1)){const _0x4f8c3d=_0xda8854[_0x5cf0fc(0xd4)];if(_0x4f8c3d&&_0xda8854[_0x5cf0fc(0xe2)][_0x4f8c3d]?.[_0x5cf0fc(0xda)])return String(_0xda8854[_0x5cf0fc(0xe2)][_0x4f8c3d][_0x5cf0fc(0xda)])[_0x5cf0fc(0xde)]();const _0x1e4649=Object[_0x5cf0fc(0xd5)](_0xda8854['apps'])[0x0];if(_0x1e4649?.['appcode'])return String(_0x1e4649[_0x5cf0fc(0xda)])['trim']();}const _0x2edd31=_0xda8854['appcode']||_0xda8854[_0x5cf0fc(0xdd)];if(typeof _0x2edd31!==_0x5cf0fc(0xd2)||_0x2edd31[_0x5cf0fc(0xde)]()==='')return undefined;return _0x2edd31['trim']();}export function getMultiAppConfigs(){const _0x54c42a=a115_0x4d83,_0x20b8d5=readRawConfig(),_0x1e834a=_0x20b8d5[_0x54c42a(0xe2)];if(!_0x1e834a||typeof _0x1e834a!==_0x54c42a(0xe1)||Object[_0x54c42a(0xd1)](_0x1e834a)[_0x54c42a(0xd9)]===0x0)return null;const _0xa0178f=_0x20b8d5['defaultApp'];return Object[_0x54c42a(0xe7)](_0x1e834a)[_0x54c42a(0xd8)](([_0x2e82de,_0x29226d])=>({'name':_0x2e82de,'appcode':_0x29226d?.[_0x54c42a(0xda)]||'','isDefault':_0x2e82de===_0xa0178f,'env':_0x29226d?.[_0x54c42a(0xdf)],'apiDir':_0x29226d?.['apiDir'],'cookie':_0x29226d?.['cookie']||undefined}))[_0x54c42a(0xdc)](_0x5719b1=>_0x5719b1[_0x54c42a(0xda)]);}function a115_0x4d83(_0x2831be,_0x3911e5){_0x2831be=_0x2831be-0xce;const _0x3e5d13=a115_0x3e5d();let _0x4d83b7=_0x3e5d13[_0x2831be];return _0x4d83b7;}function a115_0x3e5d(){const _0x5328ea=['38598050HvfsOV','template_base_url','4qtZbUY','keys','string','1332YKyuVf','defaultApp','values','1227237rgblbi','40168muZTKE','map','length','appcode','11swQYbY','filter','app','trim','env','1736997HksOUJ','object','apps','1279536ZDAKQu','454135DPCKNS','768GRmTmN','31059mUPlXP','entries'];a115_0x3e5d=function(){return _0x5328ea;};return a115_0x3e5d();}export function getTemplateBaseUrl(){const _0x27685a=a115_0x4d83,_0x4db656=readRawConfig();if(_0x4db656[_0x27685a(0xcf)]&&typeof _0x4db656[_0x27685a(0xcf)]===_0x27685a(0xd2))return _0x4db656[_0x27685a(0xcf)]['replace'](/\/$/,'');return'https://g.lovrabet.com/dist/lovrabet-skill';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a116_0x5c28(_0x43f56f,_0x420afa){_0x43f56f=_0x43f56f-0x77;const _0x29b6a4=a116_0x29b6();let _0x5c2859=_0x29b6a4[_0x43f56f];return _0x5c2859;}(function(_0x56cb01,_0x3f1476){const _0x377be4=a116_0x5c28,_0x44cc93=_0x56cb01();while(!![]){try{const _0x31acac=parseInt(_0x377be4(0x87))/0x1*(parseInt(_0x377be4(0x85))/0x2)+parseInt(_0x377be4(0x7c))/0x3*(parseInt(_0x377be4(0x7d))/0x4)+-parseInt(_0x377be4(0x79))/0x5+-parseInt(_0x377be4(0x7b))/0x6+parseInt(_0x377be4(0x86))/0x7*(parseInt(_0x377be4(0x7a))/0x8)+-parseInt(_0x377be4(0x7f))/0x9*(-parseInt(_0x377be4(0x7e))/0xa)+-parseInt(_0x377be4(0x84))/0xb*(parseInt(_0x377be4(0x77))/0xc);if(_0x31acac===_0x3f1476)break;else _0x44cc93['push'](_0x44cc93['shift']());}catch(_0x4b8efd){_0x44cc93['push'](_0x44cc93['shift']());}}}(a116_0x29b6,0xc06f4));import a116_0x405cef from'node:path';import a116_0xd9f8b7 from'node:fs';export async function copyDirectory(_0x5127b7,_0x20f1bf){const _0x5da9f2=a116_0x5c28;try{const _0x4b1cad=a116_0xd9f8b7['readdirSync'](_0x5127b7,{'withFileTypes':!![]});a116_0xd9f8b7[_0x5da9f2(0x80)](_0x20f1bf,{'recursive':!![]});for(const _0x310710 of _0x4b1cad){const _0x99d240=a116_0x405cef[_0x5da9f2(0x78)](_0x5127b7,_0x310710[_0x5da9f2(0x88)]),_0xbfda52=a116_0x405cef[_0x5da9f2(0x78)](_0x20f1bf,_0x310710['name']);_0x310710[_0x5da9f2(0x89)]()?await copyDirectory(_0x99d240,_0xbfda52):a116_0xd9f8b7[_0x5da9f2(0x83)](_0x99d240,_0xbfda52);}}catch(_0x268d59){console[_0x5da9f2(0x82)](_0x5da9f2(0x81),_0x268d59);}}function a116_0x29b6(){const _0x2452ae=['copyFileSync','869NUxDFQ','138JTtSAT','1167397AjcOXr','12412rhkqEw','name','isDirectory','99492YJXmpp','join','6622585HpItLv','24Lrzusv','2209254WMBiYg','294171NNfIXu','40PAyINF','80ibfKoq','898443paBCVz','mkdirSync','复制目录时出错:','error'];a116_0x29b6=function(){return _0x2452ae;};return a116_0x29b6();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x29cabd,_0x3130ba){const _0x27ec01=a117_0x9464,_0x53bd8f=_0x29cabd();while(!![]){try{const _0x122957=-parseInt(_0x27ec01(0x128))/0x1+parseInt(_0x27ec01(0x126))/0x2*(parseInt(_0x27ec01(0x11d))/0x3)+parseInt(_0x27ec01(0x121))/0x4*(parseInt(_0x27ec01(0x11e))/0x5)+-parseInt(_0x27ec01(0x127))/0x6*(-parseInt(_0x27ec01(0x120))/0x7)+-parseInt(_0x27ec01(0x125))/0x8*(parseInt(_0x27ec01(0x11f))/0x9)+parseInt(_0x27ec01(0x124))/0xa*(parseInt(_0x27ec01(0x122))/0xb)+-parseInt(_0x27ec01(0x123))/0xc;if(_0x122957===_0x3130ba)break;else _0x53bd8f['push'](_0x53bd8f['shift']());}catch(_0x481e7c){_0x53bd8f['push'](_0x53bd8f['shift']());}}}(a117_0x9227,0x48d3f));function a117_0x9464(_0x90ed97,_0x297c92){_0x90ed97=_0x90ed97-0x11d;const _0x9227af=a117_0x9227();let _0x94649e=_0x9227af[_0x90ed97];return _0x94649e;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';function a117_0x9227(){const _0x52ac19=['105052mtLrvN','isDirectory','171357dbvWVg','1318995oDCAJL','9bqovDe','70UDpGRk','4lozceb','11RnjeMH','3176736AOmRAr','480210mqVFoW','625120OxUDdY','14ujoToC','20742cEWWoF'];a117_0x9227=function(){return _0x52ac19;};return a117_0x9227();}import{join}from'node:path';export async function copyDir(_0x5d65a3,_0x8ff0ad){const _0x51085f=a117_0x9464,_0x20b5ff=statSync(_0x5d65a3);if(_0x20b5ff[_0x51085f(0x129)]()){!existsSync(_0x8ff0ad)&&mkdirSync(_0x8ff0ad,{'recursive':!![]});const _0x32f629=readdirSync(_0x5d65a3);for(const _0x5419a9 of _0x32f629){await copyDir(join(_0x5d65a3,_0x5419a9),join(_0x8ff0ad,_0x5419a9));}}else copyFileSync(_0x5d65a3,_0x8ff0ad);}export function ensureDir(_0x3f6ff9){!existsSync(_0x3f6ff9)&&mkdirSync(_0x3f6ff9,{'recursive':!![]});}export function pathExists(_0x762d12){return existsSync(_0x762d12);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a118_0x216d4e=a118_0x40ff;(function(_0x2db45a,_0x237ced){const _0x2e40ee=a118_0x40ff,_0x4cd560=_0x2db45a();while(!![]){try{const _0x257b97=parseInt(_0x2e40ee(0x99))/0x1+-parseInt(_0x2e40ee(0x9d))/0x2+parseInt(_0x2e40ee(0x9b))/0x3+-parseInt(_0x2e40ee(0xa0))/0x4*(-parseInt(_0x2e40ee(0x92))/0x5)+-parseInt(_0x2e40ee(0x93))/0x6*(parseInt(_0x2e40ee(0xa5))/0x7)+-parseInt(_0x2e40ee(0xaa))/0x8+parseInt(_0x2e40ee(0xa2))/0x9*(-parseInt(_0x2e40ee(0xb0))/0xa);if(_0x257b97===_0x237ced)break;else _0x4cd560['push'](_0x4cd560['shift']());}catch(_0x286d3d){_0x4cd560['push'](_0x4cd560['shift']());}}}(a118_0xc17d,0x1892a));function a118_0xc17d(){const _0x1a59b7=['48619FHdQor','replace','598299MevzAl','.lovrabet/skill/guides','327928SpyCwT','keys','map','70636ZYbPnc','status','9izkRzD','entries','length','63686mHNbtF','utf-8','extendContent','.md','CDN\x20数据中缺少\x20skillTemplate','392416arDhwK','content','path','/skills/guides.json','skillTemplate','object','558510tTUGoc','json','.lovrabet','application/json','\x0a\x0a>更新时间:','CDN\x20返回数据格式错误','55odXVbm','48tImuUt','lastUpdated','trimEnd','statusText','guides','push'];a118_0xc17d=function(){return _0x1a59b7;};return a118_0xc17d();}import{mkdirSync,writeFileSync}from'node:fs';function a118_0x40ff(_0x2702cd,_0x3256ed){_0x2702cd=_0x2702cd-0x8f;const _0xc17dea=a118_0xc17d();let _0x40ffb9=_0xc17dea[_0x2702cd];return _0x40ffb9;}import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0x3a133d=a118_0x40ff,_0x246a64=getTemplateBaseUrl();return _0x246a64+_0x3a133d(0xad);}const CACHE_DIR=join(homedir(),a118_0x216d4e(0xb2),'cache');export async function fetchGuidesFromCDN(){const _0x5811c6=a118_0x216d4e,_0x24c883=getGuidesCdnUrl(),_0x34d252=await fetch(_0x24c883,{'headers':{'Accept':_0x5811c6(0x8f)}});if(!_0x34d252['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x34d252[_0x5811c6(0xa1)]+'\x20'+_0x34d252[_0x5811c6(0x96)]);const _0x49098e=await _0x34d252[_0x5811c6(0xb1)]();if(!_0x49098e['guides']||typeof _0x49098e[_0x5811c6(0x97)]!==_0x5811c6(0xaf))throw new Error(_0x5811c6(0x91));return _0x49098e;}export function writeGuidesToProject(_0x113b61,_0x2f7122,_0xc151ea=a118_0x216d4e(0x9c),_0x4d0fe9){const _0x3fa737=a118_0x216d4e,_0x305361=join(_0x2f7122,_0xc151ea);mkdirSync(_0x305361,{'recursive':!![]});for(const [_0x2923a0,_0x53c5bd]of Object[_0x3fa737(0xa3)](_0x113b61['guides'])){let _0x11f800=_0x53c5bd['content'];_0x53c5bd['lastUpdated']&&(_0x11f800=appendUpdateTime(_0x11f800,_0x53c5bd[_0x3fa737(0x94)])),writeFileSync(join(_0x305361,_0x2923a0+_0x3fa737(0xa8)),_0x11f800,_0x3fa737(0xa6));}}export function appendUpdateTime(_0x5da4dc,_0x444109){const _0x1bbc83=a118_0x216d4e;return _0x5da4dc=_0x5da4dc['replace'](/\n*>更新时间:.*$/m,''),_0x5da4dc[_0x1bbc83(0x95)]()+(_0x1bbc83(0x90)+_0x444109);}export function getSkillTemplate(_0x30ef7a){const _0x1c729b=a118_0x216d4e;return _0x30ef7a[_0x1c729b(0xae)]?.[_0x1c729b(0xab)]||'';}export function appendExtendContents(_0x3ba8ef,_0xbc08b,_0x426e0b){const _0x1ab217=a118_0x216d4e,_0x56ff67=[];for(const [,_0x22fc97]of Object['entries'](_0xbc08b[_0x1ab217(0x97)])){_0x22fc97[_0x1ab217(0xa7)]&&_0x56ff67[_0x1ab217(0x98)](_0x22fc97[_0x1ab217(0xa7)][_0x1ab217(0x95)]());}if(_0x56ff67[_0x1ab217(0xa4)]===0x0)return _0x3ba8ef;return _0x3ba8ef[_0x1ab217(0x95)]()+'\x0a\x0a'+_0x56ff67['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x49fc36,_0x622d61,_0x1b39e1){const _0x24460d=a118_0x216d4e,_0xca17e0=getSkillTemplate(_0x49fc36);if(!_0xca17e0)throw new Error(_0x24460d(0xa9));const _0x1c73f1=dirname(_0x622d61);mkdirSync(_0x1c73f1,{'recursive':!![]});let _0xdab76c=_0xca17e0[_0x24460d(0x9a)](/\{\{IDE_NAME\}\}/g,_0x1b39e1);_0xdab76c=appendExtendContents(_0xdab76c,_0x49fc36),_0x49fc36[_0x24460d(0xae)]['lastUpdated']&&(_0xdab76c=appendUpdateTime(_0xdab76c,_0x49fc36[_0x24460d(0xae)]['lastUpdated'])),writeFileSync(_0x622d61,_0xdab76c,_0x24460d(0xa6));}export async function installGuides(_0x57b6c7){const _0xbd4828=a118_0x216d4e,_0x5546d9=await fetchGuidesFromCDN();return writeGuidesToProject(_0x5546d9,_0x57b6c7),Object[_0xbd4828(0x9e)](_0x5546d9[_0xbd4828(0x97)])['length'];}export function getGuidesSummary(_0x1f393c){const _0x28459b=a118_0x216d4e;return Object['entries'](_0x1f393c[_0x28459b(0x97)])[_0x28459b(0x9f)](([_0x4f9d58,_0x1c0551])=>({'key':_0x4f9d58,'title':_0x1c0551['title'],'path':_0x1c0551[_0x28459b(0xac)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x6499cf,_0x51d805){const _0x167a1b=a119_0x1507,_0x32a7a2=_0x6499cf();while(!![]){try{const _0x5d842e=-parseInt(_0x167a1b(0x16f))/0x1*(parseInt(_0x167a1b(0x17e))/0x2)+parseInt(_0x167a1b(0x184))/0x3+-parseInt(_0x167a1b(0x170))/0x4+-parseInt(_0x167a1b(0x176))/0x5*(-parseInt(_0x167a1b(0x16b))/0x6)+parseInt(_0x167a1b(0x181))/0x7*(-parseInt(_0x167a1b(0x173))/0x8)+parseInt(_0x167a1b(0x182))/0x9+-parseInt(_0x167a1b(0x175))/0xa*(parseInt(_0x167a1b(0x185))/0xb);if(_0x5d842e===_0x51d805)break;else _0x32a7a2['push'](_0x32a7a2['shift']());}catch(_0x42c8a8){_0x32a7a2['push'](_0x32a7a2['shift']());}}}(a119_0x480a,0x9a8fc));export async function httpRequest(_0x18eb7b,_0x321085={}){const _0x13509c=a119_0x1507,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x321085;let _0x2d3965=null;for(let _0x1c7608=0x0;_0x1c7608<=retries;_0x1c7608++){try{const _0x9fc267=new AbortController(),_0x246d97=setTimeout(()=>_0x9fc267['abort'](),timeout),_0x4bb7e2=await fetch(_0x18eb7b,{'headers':headers,'signal':_0x9fc267['signal']});clearTimeout(_0x246d97);let _0x5d1b04;const _0x4a9ab7=_0x4bb7e2['headers'][_0x13509c(0x17a)](_0x13509c(0x179));return _0x4a9ab7?.[_0x13509c(0x17b)]('application/json')?_0x5d1b04=await _0x4bb7e2['json']():_0x5d1b04=await _0x4bb7e2[_0x13509c(0x183)](),{'ok':_0x4bb7e2['ok'],'status':_0x4bb7e2[_0x13509c(0x172)],'statusText':_0x4bb7e2[_0x13509c(0x177)],'data':_0x5d1b04,'headers':_0x4bb7e2['headers'],'url':_0x4bb7e2[_0x13509c(0x17f)],'text':()=>_0x4bb7e2['text']()};}catch(_0x39a29f){_0x2d3965=_0x39a29f instanceof Error?_0x39a29f:new Error(String(_0x39a29f));if(_0x1c7608===retries)break;if(shouldRetry(_0x39a29f)){console[_0x13509c(0x180)](_0x13509c(0x17c)+retryDelay+'ms\x20后进行第\x20'+(_0x1c7608+0x1)+_0x13509c(0x174)),await sleep(retryDelay);continue;}else break;}}throw _0x2d3965||new Error(_0x13509c(0x16d));}function a119_0x1507(_0x500f0e,_0x2ee45b){_0x500f0e=_0x500f0e-0x16b;const _0x480abb=a119_0x480a();let _0x1507f0=_0x480abb[_0x500f0e];return _0x1507f0;}function shouldRetry(_0x1b333c){const _0x3a9b0d=a119_0x1507;if(_0x1b333c instanceof Error){if(_0x1b333c[_0x3a9b0d(0x171)]==='AbortError')return![];if(_0x1b333c['name']===_0x3a9b0d(0x17d)&&_0x1b333c[_0x3a9b0d(0x178)][_0x3a9b0d(0x17b)]('fetch'))return!![];if(_0x1b333c['message'][_0x3a9b0d(0x17b)](_0x3a9b0d(0x16c)))return!![];if(_0x1b333c['message'][_0x3a9b0d(0x17b)](_0x3a9b0d(0x16e)))return![];}return![];}function sleep(_0x115857){return new Promise(_0x263a4b=>setTimeout(_0x263a4b,_0x115857));}export function validateUrl(_0x2706c2){try{return new URL(_0x2706c2),!![];}catch{return![];}}function a119_0x480a(){const _0x5cba1a=['7zwlxvK','9829116bMbXuB','text','2689689lMMMZz','65747UegeRF','46242RenGhY','ECONNRESET','Request\x20failed','ENOTFOUND','3QeQAIE','1514476hdEBXy','name','status','252808LcDYhk','\x20次重试...','1310BjBhBc','205AhlbWl','statusText','message','content-type','get','includes','*\x20请求失败,','TypeError','318922mQXArd','url','log'];a119_0x480a=function(){return _0x5cba1a;};return a119_0x480a();}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a120_0x28a024=a120_0x3c65;(function(_0x529f69,_0xac9e6){const _0x17c95c=a120_0x3c65,_0x527347=_0x529f69();while(!![]){try{const _0x30e4e5=parseInt(_0x17c95c(0x20e))/0x1*(parseInt(_0x17c95c(0x1fd))/0x2)+parseInt(_0x17c95c(0x224))/0x3*(-parseInt(_0x17c95c(0x1fa))/0x4)+parseInt(_0x17c95c(0x1f8))/0x5*(parseInt(_0x17c95c(0x215))/0x6)+parseInt(_0x17c95c(0x221))/0x7*(parseInt(_0x17c95c(0x202))/0x8)+parseInt(_0x17c95c(0x20a))/0x9+-parseInt(_0x17c95c(0x200))/0xa+-parseInt(_0x17c95c(0x1ff))/0xb*(parseInt(_0x17c95c(0x222))/0xc);if(_0x30e4e5===_0xac9e6)break;else _0x527347['push'](_0x527347['shift']());}catch(_0x99c263){_0x527347['push'](_0x527347['shift']());}}}(a120_0x4c07,0x322da));import a120_0x43ca8d from'winston';function a120_0x3c65(_0xa2fe35,_0x48a967){_0xa2fe35=_0xa2fe35-0x1f3;const _0x4c0707=a120_0x4c07();let _0x3c6543=_0x4c0707[_0xa2fe35];return _0x3c6543;}import a120_0x5493db from'node:fs';function a120_0x4c07(){const _0x320002=['146468NBaYBv','132YNPkLV','error','239232oaosiG','winstonLogger','log','warn','getWinstonInstance','readLogs','addColors','map','95pYgzMk','writeFileSync','20WZluwX','Failed\x20to\x20clear\x20logs:','initWinstonLogger','155062PXOIXW','command','273493nXYUWM','2339470RhtPYI','timestamp','64XWpLrO','format','clearLogs','printf','red','utf8','Failed\x20to\x20read\x20logs:','join','3491163jTuDQz','success','trim','now','3ektJES','green','toISOString','currentRawCommand','yellow','info','transports','102252RlXvbO','失败:\x20','logFilePath','rawCommand','split','.lovrabet.log','existsSync','duration','combine','logTask','message','dirname'];a120_0x4c07=function(){return _0x320002;};return a120_0x4c07();}import a120_0x4f17dd from'node:path';class Logger{[a120_0x28a024(0x225)];[a120_0x28a024(0x217)];[a120_0x28a024(0x211)]='';constructor(){const _0x684b60=a120_0x28a024;this[_0x684b60(0x217)]='';}['setRawCommand'](_0x501a7f){this['currentRawCommand']=_0x501a7f;}[a120_0x28a024(0x1fc)](){const _0x132afa=a120_0x28a024,_0x27d1dc=a120_0x4f17dd[_0x132afa(0x220)](this[_0x132afa(0x217)]);!a120_0x5493db[_0x132afa(0x21b)](_0x27d1dc)&&a120_0x5493db['mkdirSync'](_0x27d1dc,{'recursive':!![]});const _0x341192=a120_0x43ca8d[_0x132afa(0x203)][_0x132afa(0x21d)](a120_0x43ca8d[_0x132afa(0x203)][_0x132afa(0x201)](),a120_0x43ca8d[_0x132afa(0x203)]['errors']({'stack':!![]}),a120_0x43ca8d['format'][_0x132afa(0x205)](_0x21b3d7=>{const _0x26e2e3=_0x132afa,_0x4dd439={'timestamp':_0x21b3d7[_0x26e2e3(0x201)]||new Date()[_0x26e2e3(0x210)](),'level':_0x21b3d7['level']||_0x26e2e3(0x213),'command':_0x21b3d7[_0x26e2e3(0x1fe)]||'unknown','rawCommand':_0x21b3d7[_0x26e2e3(0x218)]||this[_0x26e2e3(0x211)]||undefined,'message':_0x21b3d7['message']||'','duration':_0x21b3d7[_0x26e2e3(0x21c)]||undefined,'details':_0x21b3d7['details']||undefined};return JSON['stringify'](_0x4dd439);}));this[_0x132afa(0x225)]=a120_0x43ca8d['createLogger']({'level':'info','format':_0x341192,'transports':[new a120_0x43ca8d[(_0x132afa(0x214))]['File']({'filename':this[_0x132afa(0x217)],'level':_0x132afa(0x213)})],'silent':![]}),a120_0x43ca8d[_0x132afa(0x1f6)]({'success':_0x132afa(0x20f),'error':_0x132afa(0x206),'warn':_0x132afa(0x212),'info':'blue'});}['setLogPath'](_0x3c344f){const _0x9b0e38=a120_0x28a024;this['logFilePath']=a120_0x4f17dd[_0x9b0e38(0x209)](_0x3c344f,_0x9b0e38(0x21a)),this[_0x9b0e38(0x225)]&&this[_0x9b0e38(0x225)]['clear'](),this[_0x9b0e38(0x1fc)]();}[a120_0x28a024(0x213)](_0x573665,_0x256450,_0x2ab76d){const _0x54e95f=a120_0x28a024;if(!this[_0x54e95f(0x217)]||!this[_0x54e95f(0x225)])return;this[_0x54e95f(0x225)][_0x54e95f(0x213)](_0x256450,{'command':_0x573665,'details':_0x2ab76d});}[a120_0x28a024(0x20b)](_0x3b4883,_0x359ff1,_0x21fbc8,_0x110b36){const _0x8110b7=a120_0x28a024;if(!this[_0x8110b7(0x217)]||!this[_0x8110b7(0x225)])return;this['winstonLogger'][_0x8110b7(0x226)]('info',_0x359ff1,{'level':_0x8110b7(0x20b),'command':_0x3b4883,'duration':_0x21fbc8,'details':_0x110b36});}['error'](_0x4e5335,_0x139052,_0x5c308e){const _0x1edfd4=a120_0x28a024;if(!this['logFilePath']||!this[_0x1edfd4(0x225)])return;this[_0x1edfd4(0x225)][_0x1edfd4(0x223)](_0x139052,{'command':_0x4e5335,'details':_0x5c308e});}[a120_0x28a024(0x1f3)](_0x16dead,_0x82288e,_0x2b8017){const _0x3aa723=a120_0x28a024;if(!this[_0x3aa723(0x217)]||!this['winstonLogger'])return;this['winstonLogger'][_0x3aa723(0x1f3)](_0x82288e,{'command':_0x16dead,'details':_0x2b8017});}async[a120_0x28a024(0x21e)](_0xee7b2a,_0x57d0d9,_0x4a2bb1){const _0x1a55a8=a120_0x28a024,_0x1f9081=Date[_0x1a55a8(0x20d)]();this[_0x1a55a8(0x213)](_0xee7b2a,'开始执行:\x20'+_0x57d0d9);try{const _0x5c3bf2=await _0x4a2bb1(),_0x294d94=Date[_0x1a55a8(0x20d)]()-_0x1f9081;return this[_0x1a55a8(0x20b)](_0xee7b2a,'完成:\x20'+_0x57d0d9,_0x294d94),_0x5c3bf2;}catch(_0x1e67be){const _0x11d0a5=Date['now']()-_0x1f9081;this['error'](_0xee7b2a,_0x1a55a8(0x216)+_0x57d0d9,{'error':_0x1e67be instanceof Error?_0x1e67be[_0x1a55a8(0x21f)]:String(_0x1e67be),'duration':_0x11d0a5});throw _0x1e67be;}}[a120_0x28a024(0x1f5)](){const _0x22c783=a120_0x28a024;try{if(!a120_0x5493db['existsSync'](this[_0x22c783(0x217)]))return[];const _0x5e29e0=a120_0x5493db['readFileSync'](this[_0x22c783(0x217)],_0x22c783(0x207));return _0x5e29e0[_0x22c783(0x219)]('\x0a')['filter'](_0x1a9036=>_0x1a9036[_0x22c783(0x20c)]())[_0x22c783(0x1f7)](_0x33b5d3=>JSON['parse'](_0x33b5d3));}catch(_0x55adf2){return console[_0x22c783(0x1f3)](_0x22c783(0x208),_0x55adf2),[];}}[a120_0x28a024(0x204)](){const _0x1ee8f0=a120_0x28a024;try{a120_0x5493db['existsSync'](this[_0x1ee8f0(0x217)])&&a120_0x5493db[_0x1ee8f0(0x1f9)](this['logFilePath'],'','utf8');}catch(_0x1c4f8b){console[_0x1ee8f0(0x1f3)](_0x1ee8f0(0x1fb),_0x1c4f8b);}}[a120_0x28a024(0x1f4)](){const _0x31501c=a120_0x28a024;return this[_0x31501c(0x225)];}}export const logger=new Logger();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a121_0x5eae9c=a121_0x599f;(function(_0x2b9973,_0xe7a82a){const _0x24c686=a121_0x599f,_0x5e7eee=_0x2b9973();while(!![]){try{const _0x3d3d4a=parseInt(_0x24c686(0xd0))/0x1*(parseInt(_0x24c686(0xd3))/0x2)+parseInt(_0x24c686(0xd1))/0x3*(parseInt(_0x24c686(0xcc))/0x4)+-parseInt(_0x24c686(0xcb))/0x5+-parseInt(_0x24c686(0xd5))/0x6*(parseInt(_0x24c686(0xcf))/0x7)+-parseInt(_0x24c686(0xc9))/0x8*(-parseInt(_0x24c686(0xc8))/0x9)+-parseInt(_0x24c686(0xce))/0xa*(parseInt(_0x24c686(0xd2))/0xb)+parseInt(_0x24c686(0xca))/0xc;if(_0x3d3d4a===_0xe7a82a)break;else _0x5e7eee['push'](_0x5e7eee['shift']());}catch(_0x472948){_0x5e7eee['push'](_0x5e7eee['shift']());}}}(a121_0x1a51,0xe4edc));export const isWindows=process['platform']===a121_0x5eae9c(0xd4);function a121_0x599f(_0x169f9e,_0x2b07e5){_0x169f9e=_0x169f9e-0xc8;const _0x1a5123=a121_0x1a51();let _0x599fc2=_0x1a5123[_0x169f9e];return _0x599fc2;}export function resolveNpmBin(_0x4f87f6){const _0x52750f=a121_0x5eae9c;return isWindows?_0x4f87f6+_0x52750f(0xcd):_0x4f87f6;}function a121_0x1a51(){const _0x4a7e97=['9403020HSPEaI','27yEmVmt','2523496fmKMqP','19152300CTFAak','4359775Hrtzbm','4Rosdks','.cmd','10ISbwlG','7LVFoFj','11HftOvq','1766229dVvipc','13173655mRkiGI','262426leGXAR','win32'];a121_0x1a51=function(){return _0x4a7e97;};return a121_0x1a51();}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x25236b,_0x4a25fe){const _0x70cc27=a122_0xee61,_0x10ac2c=_0x25236b();while(!![]){try{const _0x10b6cb=parseInt(_0x70cc27(0x18a))/0x1+parseInt(_0x70cc27(0x182))/0x2+parseInt(_0x70cc27(0x196))/0x3*(-parseInt(_0x70cc27(0x181))/0x4)+parseInt(_0x70cc27(0x191))/0x5*(-parseInt(_0x70cc27(0x183))/0x6)+-parseInt(_0x70cc27(0x18e))/0x7+-parseInt(_0x70cc27(0x18c))/0x8*(-parseInt(_0x70cc27(0x192))/0x9)+-parseInt(_0x70cc27(0x190))/0xa;if(_0x10b6cb===_0x4a25fe)break;else _0x10ac2c['push'](_0x10ac2c['shift']());}catch(_0x1f08a3){_0x10ac2c['push'](_0x10ac2c['shift']());}}}(a122_0x5818,0xc4250));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';function a122_0xee61(_0x21cc5a,_0x23c869){_0x21cc5a=_0x21cc5a-0x17f;const _0x5818a1=a122_0x5818();let _0xee610c=_0x5818a1[_0x21cc5a];return _0xee610c;}import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x93de16=a122_0xee61,_0x37fe38=getTemplateBaseUrl();return _0x37fe38+_0x93de16(0x180);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,'../../templates/rules/lovrabet_rules.mdc.tpl');export async function fetchRulesFromCDN(){const _0x2448ac=a122_0xee61,_0x3827a2=getRulesCdnUrl(),_0xe4615f=await fetch(_0x3827a2,{'headers':{'Accept':'application/json'}});if(!_0xe4615f['ok'])throw new Error(_0x2448ac(0x195)+_0xe4615f[_0x2448ac(0x197)]+'\x20'+_0xe4615f[_0x2448ac(0x184)]);const _0x19607c=await _0xe4615f[_0x2448ac(0x17f)]();if(!_0x19607c[_0x2448ac(0x187)]||typeof _0x19607c['content']!==_0x2448ac(0x18d))throw new Error(_0x2448ac(0x194));return _0x19607c;}export async function getRulesContent(){const _0x115327=a122_0xee61;try{const _0x4b5e11=await fetchRulesFromCDN();return _0x4b5e11[_0x115327(0x187)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x9a1b09=a122_0xee61;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,'utf-8');throw new Error(_0x9a1b09(0x186)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x3e4fee){const _0x57b7c7=a122_0xee61,_0x4117f2=await fetchRulesFromCDN()[_0x57b7c7(0x193)](()=>null);let _0x3367ff;_0x4117f2?(_0x3367ff=_0x4117f2[_0x57b7c7(0x187)],_0x4117f2['lastUpdated']&&(_0x3367ff=appendUpdateTime(_0x3367ff,_0x4117f2[_0x57b7c7(0x185)]))):_0x3367ff=readLocalTemplate();const _0x36315b=dirname(_0x3e4fee);!existsSync(_0x36315b)&&mkdirSync(_0x36315b,{'recursive':!![]}),writeFileSync(_0x3e4fee,_0x3367ff,_0x57b7c7(0x188));}export async function copyRulesToCursor(_0x500033){const _0x30fd29=a122_0xee61,_0x1fe137=join(_0x500033,_0x30fd29(0x189)),_0x45c245=join(_0x1fe137,_0x30fd29(0x18b));if(existsSync(_0x45c245))return![];return await writeRulesFile(_0x45c245),!![];}function a122_0x5818(){const _0x3cc7cc=['1282730noiILn','6ltWvLq','statusText','lastUpdated','本地模板文件不存在:\x20','content','utf-8','.cursor/rules','1506645kkMCLi','lovrabet_rules.mdc','1216RJfcuY','string','4297447Mkagkh','agents.md','6030330HJxebw','7738085WCDAbn','84564IgpgSk','catch','CDN\x20返回数据格式错误','CDN\x20请求失败:\x20','8223gOURPi','status','json','/rules/rules.json','12cQpJUe'];a122_0x5818=function(){return _0x3cc7cc;};return a122_0x5818();}export async function copyRulesToAgentsMd(_0x1b0ace){const _0x255f7d=a122_0xee61,_0x22de11=join(_0x1b0ace,_0x255f7d(0x18f));if(existsSync(_0x22de11))return![];return await writeRulesFile(_0x22de11),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x36e46a){return new Promise(_0x3c44d3=>setTimeout(_0x3c44d3,_0x36e46a));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a124_0x22c851=a124_0x5b7b;(function(_0x276b06,_0x4ba961){const _0x212ccb=a124_0x5b7b,_0x449a7f=_0x276b06();while(!![]){try{const _0x27dc70=parseInt(_0x212ccb(0xbf))/0x1+-parseInt(_0x212ccb(0xba))/0x2+parseInt(_0x212ccb(0xb3))/0x3*(parseInt(_0x212ccb(0x91))/0x4)+parseInt(_0x212ccb(0xae))/0x5+-parseInt(_0x212ccb(0x92))/0x6*(parseInt(_0x212ccb(0xb9))/0x7)+parseInt(_0x212ccb(0x9c))/0x8*(parseInt(_0x212ccb(0xb2))/0x9)+-parseInt(_0x212ccb(0xc7))/0xa;if(_0x27dc70===_0x4ba961)break;else _0x449a7f['push'](_0x449a7f['shift']());}catch(_0x15aaf4){_0x449a7f['push'](_0x449a7f['shift']());}}}(a124_0x42ed,0x96fd1));import a124_0x248903 from'node:fs';import a124_0xe7cfc8 from'node:path';function a124_0x42ed(){const _0x5bef87=['\x20},','279qfrkhT','6981rEqZkE','info','copyFile','2-digit','alias:\x20\x22','YourModel','7swTdNf','707270meoiEJ','.tsx','processFile','numeric','template','936160AfOuZW','api','LOVRABET','version','.jsx','map','开始处理模板内容替换','processDirectory','17682280eqhwdu','.md','push','readdir','.js','isDirectory','toLowerCase','replaceApiContent','processTemplate','includes','1220UWJdXd','2643702ZTNDVq','slice','.tpl','charAt','split','pop','join','.ts','utf8','promises','207736XgoaNB','writeFile','tableName:\x20\x22','endsWith','readFile','toComponentName','default','toISOString','name:\x20\x22','name','.scss','toLocaleDateString','replaceContent','\x0a\x20\x20\x20\x20{\x20','toDisplayTitle','toUpperCase','mkdir','replace','3650285zjhZBo','alias','datasetCode:\x20\x22'];a124_0x42ed=function(){return _0x5bef87;};return a124_0x42ed();}import{createRequire}from'node:module';import{logger}from'./logger.js';function a124_0x5b7b(_0x2945f8,_0x46ea75){_0x2945f8=_0x2945f8-0x8d;const _0x42ed5f=a124_0x42ed();let _0x5b7b5e=_0x42ed5f[_0x2945f8];return _0x5b7b5e;}const require=createRequire(import.meta.url),CLI_VERSION=require('../../package.json')[a124_0x22c851(0xc2)];export class TemplateReplacer{static[a124_0x22c851(0xa1)](_0x27171b){const _0x420a21=a124_0x22c851,_0x6c4171=_0x27171b[_0x420a21(0x96)]('/')[_0x420a21(0x97)]()||_0x27171b;return _0x6c4171[_0x420a21(0x96)]('-')[_0x420a21(0xc4)](_0x46f826=>_0x46f826[_0x420a21(0x95)](0x0)[_0x420a21(0xab)]()+_0x46f826['slice'](0x1)[_0x420a21(0x8d)]())['join']('');}static['toDisplayTitle'](_0x284f1f){const _0xa921ec=a124_0x22c851,_0x3c851c=_0x284f1f[_0xa921ec(0x96)]('/')[_0xa921ec(0x97)]()||_0x284f1f;return _0x3c851c['split']('-')[_0xa921ec(0xc4)](_0xa3e9e8=>_0xa3e9e8[_0xa921ec(0x95)](0x0)[_0xa921ec(0xab)]()+_0xa3e9e8[_0xa921ec(0x93)](0x1)[_0xa921ec(0x8d)]())['join']('\x20');}static['replaceContent'](_0x196b83,_0x21ac2a,_0x566a3c){const _0x16052c=a124_0x22c851,_0x25cf4d=this['toComponentName'](_0x21ac2a),_0x5d111d=this[_0x16052c(0xaa)](_0x21ac2a),_0x31645a=new Date(),_0x2a2ab2=_0x31645a['toLocaleString'](undefined,{'year':_0x16052c(0xbd),'month':_0x16052c(0xb6),'day':_0x16052c(0xb6),'hour':_0x16052c(0xb6),'minute':'2-digit','second':'2-digit','hour12':![]})[_0x16052c(0xad)](/\//g,'-'),_0x2b31b1=_0x31645a[_0x16052c(0xa7)](undefined,{'year':_0x16052c(0xbd),'month':_0x16052c(0xb6),'day':_0x16052c(0xb6)})[_0x16052c(0xad)](/\//g,'-'),_0x54e154=_0x31645a['toLocaleTimeString'](undefined,{'hour12':![]});let _0x1f54ae=_0x196b83['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x16052c(0xad)](/\{ComponentName\}/g,_0x25cf4d)['replace'](/\{DisplayTitle\}/g,_0x5d111d)[_0x16052c(0xad)](/\{PageName\}/g,_0x21ac2a)[_0x16052c(0xad)](/\{TemplateName\}/g,_0x566a3c)['replace'](/\{CreatedAt\}/g,_0x2a2ab2)[_0x16052c(0xad)](/\{CreatedDate\}/g,_0x2b31b1)[_0x16052c(0xad)](/\{CreatedTime\}/g,_0x54e154);return _0x1f54ae;}static[a124_0x22c851(0x8e)](_0x452b7e,_0x22c2c6,_0x51a3be,_0x4e8335,_0x228e79,_0x340eca,_0x50e4a7,_0x31ab3d){const _0x1f43c6=a124_0x22c851,_0x2d5e32=new Date(),_0x1fd0e6=_0x2d5e32[_0x1f43c6(0xa3)](),_0x4fb3b6=_0x51a3be[_0x1f43c6(0xc4)](_0x23ba96=>{const _0x5bec0b=_0x1f43c6,_0x2de017=[_0x5bec0b(0xb0)+_0x23ba96['datasetCode']+'\x22',_0x5bec0b(0x9e)+_0x23ba96['tableName']+'\x22',_0x5bec0b(0xa4)+_0x23ba96['name']+'\x22'];return _0x23ba96[_0x5bec0b(0xaf)]&&_0x2de017[_0x5bec0b(0xc9)](_0x5bec0b(0xb7)+_0x23ba96[_0x5bec0b(0xaf)]+'\x22'),_0x5bec0b(0xa9)+_0x2de017[_0x5bec0b(0x98)](',\x20')+_0x5bec0b(0xb1);})[_0x1f43c6(0x98)](''),_0xf82170=_0x4e8335||_0x51a3be[0x0]?.[_0x1f43c6(0xaf)]||_0x1f43c6(0xb8);let _0x58ada9=_0x452b7e[_0x1f43c6(0xad)](/\{AppCode\}/g,_0x22c2c6)[_0x1f43c6(0xad)](/\{ModelConfigs\}/g,_0x4fb3b6)[_0x1f43c6(0xad)](/\{ExampleModelName\}/g,_0xf82170)[_0x1f43c6(0xad)](/\{ApiFileName\}/g,_0x228e79||_0x1f43c6(0xc0))[_0x1f43c6(0xad)](/\{ConfigName\}/g,_0x340eca||_0x1f43c6(0xa2))['replace'](/\{ClientConfigParam\}/g,_0x50e4a7||'')[_0x1f43c6(0xad)](/\{VarPrefix\}/g,_0x31ab3d||_0x1f43c6(0xc1))[_0x1f43c6(0xad)](/\{CreatedAt\}/g,_0x1fd0e6);return _0x58ada9;}static async[a124_0x22c851(0x8f)](_0x33b405,_0x520a7a,_0xb4c1ec,_0x4c9a6b,_0x3714b7=!![]){const _0x6a83af=a124_0x22c851,_0x5e7c53=Date['now']();try{_0x3714b7&&logger[_0x6a83af(0xb4)]('template',_0x6a83af(0xc5),{'templatePath':_0x33b405,'targetPath':_0x520a7a,'pageName':_0xb4c1ec,'templateName':_0x4c9a6b});await a124_0x248903['promises'][_0x6a83af(0xac)](_0x520a7a,{'recursive':!![]}),await this[_0x6a83af(0xc6)](_0x33b405,_0x520a7a,_0xb4c1ec,_0x4c9a6b);if(_0x3714b7){const _0x4a3976=Date['now']()-_0x5e7c53;logger['success'](_0x6a83af(0xbe),'模板内容替换完成',_0x4a3976,{'pageName':_0xb4c1ec,'templateName':_0x4c9a6b});}}catch(_0x8f703b){if(_0x3714b7){const _0x241ccf=Date['now']()-_0x5e7c53;logger['error']('template','模板内容替换失败',{'templatePath':_0x33b405,'targetPath':_0x520a7a,'pageName':_0xb4c1ec,'templateName':_0x4c9a6b,'error':_0x8f703b instanceof Error?_0x8f703b['message']:String(_0x8f703b),'duration':_0x241ccf});}throw _0x8f703b;}}static async[a124_0x22c851(0xc6)](_0x144b05,_0x742d2f,_0x23d28c,_0x5b4831){const _0x1ecd32=a124_0x22c851,_0x4f47ef=await a124_0x248903['promises'][_0x1ecd32(0xca)](_0x144b05,{'withFileTypes':!![]});for(const _0x4b7619 of _0x4f47ef){const _0x46ae68=a124_0xe7cfc8['join'](_0x144b05,_0x4b7619[_0x1ecd32(0xa5)]);let _0x47e9bb=a124_0xe7cfc8['join'](_0x742d2f,_0x4b7619['name']);_0x4b7619['name'][_0x1ecd32(0x9f)](_0x1ecd32(0x94))&&(_0x47e9bb=a124_0xe7cfc8[_0x1ecd32(0x98)](_0x742d2f,_0x4b7619[_0x1ecd32(0xa5)]['replace'](/\.tpl$/,'')));if(_0x4b7619[_0x1ecd32(0xcc)]())await a124_0x248903[_0x1ecd32(0x9b)][_0x1ecd32(0xac)](_0x47e9bb,{'recursive':!![]}),await this[_0x1ecd32(0xc6)](_0x46ae68,_0x47e9bb,_0x23d28c,_0x5b4831);else _0x4b7619['isFile']()&&await this[_0x1ecd32(0xbc)](_0x46ae68,_0x47e9bb,_0x23d28c,_0x5b4831);}}static async[a124_0x22c851(0xbc)](_0x2189e3,_0x2c39e0,_0x55c485,_0x3ccad6){const _0x33d109=a124_0x22c851,_0x141c1e=a124_0xe7cfc8['extname'](_0x2189e3)[_0x33d109(0x8d)]();_0x2189e3['endsWith']('.tpl')&&(_0x2c39e0=_0x2c39e0['replace'](/\.tpl$/,''));const _0x5357b5=[_0x33d109(0xbb),_0x33d109(0x99),_0x33d109(0xc3),_0x33d109(0xcb),'.json',_0x33d109(0xc8),'.css',_0x33d109(0xa6),_0x33d109(0x94)];if(_0x5357b5[_0x33d109(0x90)](_0x141c1e)||_0x2189e3[_0x33d109(0x9f)](_0x33d109(0x94))){const _0x477cf4=await a124_0x248903[_0x33d109(0x9b)][_0x33d109(0xa0)](_0x2189e3,_0x33d109(0x9a)),_0x1523fd=this[_0x33d109(0xa8)](_0x477cf4,_0x55c485,_0x3ccad6);await a124_0x248903[_0x33d109(0x9b)][_0x33d109(0x9d)](_0x2c39e0,_0x1523fd,_0x33d109(0x9a));}else await a124_0x248903[_0x33d109(0x9b)][_0x33d109(0xb5)](_0x2189e3,_0x2c39e0);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/rabetbase-cli",
|
|
3
|
-
"version": "2.0.2-beta.
|
|
3
|
+
"version": "2.0.2-beta.9",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@inquirer/prompts": "^8.3.2",
|
|
54
54
|
"@types/winston": "^2.4.4",
|
|
55
|
-
"@
|
|
55
|
+
"@lovrabet/otel-logger": "1.0.1-beta.2",
|
|
56
56
|
"chalk": "^5.6.2",
|
|
57
57
|
"execa": "^9.6.0",
|
|
58
58
|
"ink": "^6.2.3",
|
package/lib/ai-setup/config.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a0_0x1de0(){const _0x41e093=['lovrabet-dataset','Configuration:','info','2724wjMnpq','parse','36266725LWrZBB','error','message','utf-8','Please\x20run:\x20','\x0a📋\x20Other\x20IDE\x20MCP\x20configuration:\x0a','log','Other','env','Unsupported\x20MCP\x20IDE:\x20','@lovrabet/dataset-mcp-server@latest','RABETBASE_ENV','production','44274jxGoWR','Cursor\x20MCP\x20configuration\x20failed','Cursor\x20MCP\x20configured\x20successfully','claude\x20mcp\x20add\x20','Written\x20.cursor/mcp.json','\x20\x20\x20\x20\x22','npx','\x20\x20\x20\x20\x20\x20\x20\x20\x22RABETBASE_APP_CODE\x22:\x20\x22','cursor','Claude\x20Code','461853xObiDF','manual','92TuyeEr','mcpServers','appcode','40yzTQBW','claude','cwd','app','\x20\x20Restart\x20Claude\x20Code\x20to\x20take\x20effect\x0a','Cursor','Configuration\x20guide\x20displayed','\x20\x20\x20\x20\x20\x20\x20\x20\x22RABETBASE_ENV\x22:\x20\x22','Claude\x20Code\x20MCP\x20command\x20generated','\x20\x20AppCode:\x20','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20[','mcp-install','Appcode\x20must\x20be\x20configured\x20first','.cursor','\x20-e\x20RABETBASE_ENV=','success','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22','join','9471lTrpkr','mcp.json','102440GhCHPI','\x20\x20}','stringify','73941czHGWL','\x0a📋\x20Run\x20the\x20following\x20command\x20to\x20configure\x20Claude\x20Code\x20MCP:\x0a','\x20\x20\x20\x20\x20\x20}','\x20\x20Environment:\x20','4711760jsBgJL','39qJTwyM'];a0_0x1de0=function(){return _0x41e093;};return a0_0x1de0();}const a0_0x3d791f=a0_0x4318;(function(_0x1fe1d7,_0x5e91a6){const _0x2cc95a=a0_0x4318,_0x3be439=_0x1fe1d7();while(!![]){try{const _0x11fc89=-parseInt(_0x2cc95a(0xfe))/0x1*(parseInt(_0x2cc95a(0xd3))/0x2)+parseInt(_0x2cc95a(0xf9))/0x3*(-parseInt(_0x2cc95a(0xdf))/0x4)+parseInt(_0x2cc95a(0xf6))/0x5+-parseInt(_0x2cc95a(0xc4))/0x6*(parseInt(_0x2cc95a(0xf4))/0x7)+-parseInt(_0x2cc95a(0xfd))/0x8+parseInt(_0x2cc95a(0xdd))/0x9*(parseInt(_0x2cc95a(0xe2))/0xa)+parseInt(_0x2cc95a(0xc6))/0xb;if(_0x11fc89===_0x5e91a6)break;else _0x3be439['push'](_0x3be439['shift']());}catch(_0x1f8679){_0x3be439['push'](_0x3be439['shift']());}}}(a0_0x1de0,0xd91bb));import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{join}from'node:path';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';function a0_0x4318(_0x30447b,_0x2744fa){_0x30447b=_0x30447b-0xc4;const _0x1de027=a0_0x1de0();let _0x43189d=_0x1de027[_0x30447b];return _0x43189d;}import{copyRulesToAgentsMd,copyRulesToCursor}from'../utils/rules-cdn.js';import{normalizeEnv}from'../constant/env.js';const MCP_SERVER_NAME=a0_0x3d791f(0xff),MCP_COMMAND=a0_0x3d791f(0xd9),MCP_ARGS=[a0_0x3d791f(0xd0)];export function buildEnvConfig(_0xc816d9,_0x33d2f2){const _0x200cdf=a0_0x3d791f,_0x55859d={'RABETBASE_APP_CODE':String(_0xc816d9)};return _0x33d2f2!=='production'&&(_0x55859d[_0x200cdf(0xd1)]=String(_0x33d2f2)),_0x55859d;}export async function configureCursorMcp(_0x8f6cb){const _0x58ef85=a0_0x3d791f,_0x2db061=_0x8f6cb||process[_0x58ef85(0xe4)](),_0x2168b0=readConfig(_0x2db061),_0x747a91=_0x2168b0[_0x58ef85(0xe1)]||_0x2168b0[_0x58ef85(0xe5)],_0x52349c=normalizeEnv(_0x2168b0[_0x58ef85(0xce)]||_0x58ef85(0xd2));if(!_0x747a91)return{'ide':_0x58ef85(0xe7),'status':_0x58ef85(0xc7),'message':_0x58ef85(0xee)};const _0x30827c=buildEnvConfig(_0x747a91,_0x52349c),_0x16d982={'command':MCP_COMMAND,'args':MCP_ARGS,'env':_0x30827c},_0x263846=join(_0x2db061,_0x58ef85(0xef),_0x58ef85(0xf5)),_0x45dda1=join(_0x2db061,'.cursor');try{!existsSync(_0x45dda1)&&mkdirSync(_0x45dda1,{'recursive':!![]});let _0x5d6210={'mcpServers':{}};if(existsSync(_0x263846)){const _0x5e84af=readFileSync(_0x263846,_0x58ef85(0xc9));_0x5d6210=JSON[_0x58ef85(0xc5)](_0x5e84af);}return(!_0x5d6210[_0x58ef85(0xe0)]||typeof _0x5d6210['mcpServers']!=='object')&&(_0x5d6210[_0x58ef85(0xe0)]={}),_0x5d6210[_0x58ef85(0xe0)][MCP_SERVER_NAME]=_0x16d982,writeFileSync(_0x263846,JSON[_0x58ef85(0xf8)](_0x5d6210,null,0x2),_0x58ef85(0xc9)),logger[_0x58ef85(0x101)](_0x58ef85(0xed),_0x58ef85(0xd5),{'appcode':_0x747a91,'env':_0x52349c,'path':_0x263846}),await copyRulesToCursor(_0x2db061),{'ide':_0x58ef85(0xe7),'status':_0x58ef85(0xf1),'message':_0x58ef85(0xd7)};}catch(_0x5e2432){return logger[_0x58ef85(0xc7)](_0x58ef85(0xed),_0x58ef85(0xd4),{'error':_0x5e2432 instanceof Error?_0x5e2432[_0x58ef85(0xc8)]:String(_0x5e2432)}),{'ide':_0x58ef85(0xe7),'status':_0x58ef85(0xc7),'message':_0x5e2432 instanceof Error?_0x5e2432[_0x58ef85(0xc8)]:String(_0x5e2432)};}}export async function configureClaudeMcp(_0x3475e5){const _0x45804d=a0_0x3d791f,_0x10a412=_0x3475e5||process[_0x45804d(0xe4)](),_0x340a52=readConfig(_0x10a412),_0xf328f7=_0x340a52[_0x45804d(0xe1)]||_0x340a52['app'],_0x22f98d=normalizeEnv(_0x340a52[_0x45804d(0xce)]||'production');if(!_0xf328f7)return{'ide':_0x45804d(0xdc),'status':_0x45804d(0xc7),'message':_0x45804d(0xee)};let _0x317955=_0x45804d(0xd6)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+MCP_ARGS[_0x45804d(0xf3)]('\x20')+'\x20-e\x20RABETBASE_APP_CODE='+_0xf328f7;return _0x22f98d!==_0x45804d(0xd2)&&(_0x317955+=_0x45804d(0xf0)+_0x22f98d),await copyRulesToAgentsMd(_0x10a412),logger[_0x45804d(0x101)](_0x45804d(0xed),_0x45804d(0xea),{'command':_0x317955,'appcode':_0xf328f7,'env':_0x22f98d}),console[_0x45804d(0xcc)](_0x45804d(0xfa)),console[_0x45804d(0xcc)]('\x20\x20'+_0x317955+'\x0a'),console[_0x45804d(0xcc)](_0x45804d(0x100)),console['log'](_0x45804d(0xeb)+_0xf328f7),_0x22f98d!==_0x45804d(0xd2)&&console[_0x45804d(0xcc)](_0x45804d(0xfc)+_0x22f98d),console['log'](_0x45804d(0xe6)),{'ide':_0x45804d(0xdc),'status':_0x45804d(0xde),'message':_0x45804d(0xca)+_0x317955};}export async function showOtherGuide(_0x3cad30){const _0x4c3b14=a0_0x3d791f,_0x46c0bb=_0x3cad30||process[_0x4c3b14(0xe4)](),_0x5463bc=readConfig(_0x46c0bb),_0x3ca509=_0x5463bc[_0x4c3b14(0xe1)]||_0x5463bc['app'],_0x712b8e=normalizeEnv(_0x5463bc[_0x4c3b14(0xce)]||_0x4c3b14(0xd2));if(!_0x3ca509)return{'ide':_0x4c3b14(0xcd),'status':_0x4c3b14(0xc7),'message':_0x4c3b14(0xee)};return console['log'](_0x4c3b14(0xcb)),console['log']('{'),console[_0x4c3b14(0xcc)]('\x20\x20\x22mcpServers\x22:\x20{'),console['log'](_0x4c3b14(0xd8)+MCP_SERVER_NAME+'\x22:\x20{'),console['log'](_0x4c3b14(0xf2)+MCP_COMMAND+'\x22,'),console[_0x4c3b14(0xcc)](_0x4c3b14(0xec)+MCP_ARGS['map'](_0x25a7a=>'\x22'+_0x25a7a+'\x22')[_0x4c3b14(0xf3)](',\x20')+'],'),console[_0x4c3b14(0xcc)]('\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{'),console['log'](_0x4c3b14(0xda)+_0x3ca509+'\x22,'),_0x712b8e!=='production'&&console[_0x4c3b14(0xcc)](_0x4c3b14(0xe9)+_0x712b8e+'\x22,'),console[_0x4c3b14(0xcc)](_0x4c3b14(0xfb)),console[_0x4c3b14(0xcc)]('\x20\x20\x20\x20}'),console[_0x4c3b14(0xcc)](_0x4c3b14(0xf7)),console['log']('}\x0a'),logger['info'](_0x4c3b14(0xed),_0x4c3b14(0xe8),{'appcode':_0x3ca509,'env':_0x712b8e}),{'ide':'Other','status':_0x4c3b14(0xde),'message':'Configuration\x20guide\x20displayed'};}export async function configureMcp(_0x10bf44,_0x13dca0){const _0x5f1290=a0_0x3d791f;switch(_0x10bf44){case _0x5f1290(0xdb):return await configureCursorMcp(_0x13dca0);case _0x5f1290(0xe3):return await configureClaudeMcp(_0x13dca0);default:throw new Error(_0x5f1290(0xcf)+_0x10bf44);}}
|
package/lib/commands/mcp.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a44_0x340122=a44_0x5e70;(function(_0x170173,_0x3dd94e){const _0x2aebc9=a44_0x5e70,_0x347f65=_0x170173();while(!![]){try{const _0x506363=parseInt(_0x2aebc9(0x10b))/0x1+-parseInt(_0x2aebc9(0x104))/0x2*(-parseInt(_0x2aebc9(0x103))/0x3)+parseInt(_0x2aebc9(0x108))/0x4*(-parseInt(_0x2aebc9(0x106))/0x5)+parseInt(_0x2aebc9(0x10d))/0x6*(parseInt(_0x2aebc9(0xfe))/0x7)+parseInt(_0x2aebc9(0x107))/0x8*(-parseInt(_0x2aebc9(0x110))/0x9)+parseInt(_0x2aebc9(0xfc))/0xa+-parseInt(_0x2aebc9(0x100))/0xb;if(_0x506363===_0x3dd94e)break;else _0x347f65['push'](_0x347f65['shift']());}catch(_0x8d6372){_0x347f65['push'](_0x347f65['shift']());}}}(a44_0x33a8,0xc3b81));import{jsx as a44_0x4eb5fe}from'react/jsx-runtime';import{render}from'ink';import{McpInstallUI}from'../mcp/McpInstallUI.js';import{mcpCommand as a44_0x5165b5}from'../mcp/main.js';function a44_0x5e70(_0x5a3fa0,_0x6e0b2e){_0x5a3fa0=_0x5a3fa0-0xfa;const _0x33a8f4=a44_0x33a8();let _0x5e70b4=_0x33a8f4[_0x5a3fa0];return _0x5e70b4;}function a44_0x33a8(){const _0x1cff57=['push','other','9mqWBae','info','nonInteractive','enableBffSave','logger','337980DuIkss','mcp-install','878745HtgNuc','cursor','1789051iJznxE','install','claude','27717hgoyfl','290XaovrB','mcpCursor','5NzOgRr','979312OeQThQ','5952364VQYAxC','length','Configure\x20MCP\x20(Model\x20Context\x20Protocol)','1075823tSyhgs','mcp','6SxZlWD'];a44_0x33a8=function(){return _0x1cff57;};return a44_0x33a8();}export const mcpCommand={'name':a44_0x340122(0x10c),'description':a44_0x340122(0x10a),async 'run'(_0x233c75,_0x55db62,_0x514676){const _0xc73455=a44_0x340122,_0x4fe046=_0x55db62[0x0];if(_0x4fe046===_0xc73455(0x101)){const _0x34c832=[];if(_0x514676[_0xc73455(0x105)]||_0x514676[_0xc73455(0xff)])_0x34c832[_0xc73455(0x10e)](_0xc73455(0xff));if(_0x514676['mcpClaude']||_0x514676[_0xc73455(0x102)])_0x34c832[_0xc73455(0x10e)]('claude');if(_0x514676['mcpOther'])_0x34c832[_0xc73455(0x10e)](_0xc73455(0x10f));_0x233c75[_0xc73455(0xfb)][_0xc73455(0x111)](_0xc73455(0xfd),'执行配置\x20MCP\x20命令',{'preselected':_0x34c832});if(_0x233c75[_0xc73455(0x112)]&&_0x34c832[_0xc73455(0x109)]>0x0){const {installMcpNonInteractive:_0x27d94c}=await import('../mcp/mcp-install-non-interactive.js');await _0x27d94c(_0x34c832,_0x514676[_0xc73455(0xfa)]);}else render(a44_0x4eb5fe(McpInstallUI,{'preselectedIDEs':_0x34c832,'enableBffSave':_0x514676[_0xc73455(0xfa)]}));}else await a44_0x5165b5(_0x4fe046,[],_0x514676);}};
|
package/lib/mcp/McpInstallUI.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
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 +0,0 @@
|
|
|
1
|
-
const a112_0x49d418=a112_0x56ff;function a112_0x2ceb(){const _0xe67556=['28qJUQor','ide','1073454rAJbkk','Other\x20IDE','987556Hsppml','10pTBQuj','success','mcp-install-non-interactive','length','split','\x20succeeded)','151427dPjLDV','10001646rbGgjX','setLogPath','some','Cursor','cwd','log','needsManualAction','Start\x20configuring\x20MCP','92475wNcwcM','cursor','message','747328YOCYBp','64396fSBtZH','info'];a112_0x2ceb=function(){return _0xe67556;};return a112_0x2ceb();}(function(_0x4a2dd9,_0x4dea51){const _0x1a488d=a112_0x56ff,_0x38a63e=_0x4a2dd9();while(!![]){try{const _0x4e3fb6=parseInt(_0x1a488d(0x1ba))/0x1+parseInt(_0x1a488d(0x1b3))/0x2+-parseInt(_0x1a488d(0x1a9))/0x3+parseInt(_0x1a488d(0x1ad))/0x4+parseInt(_0x1a488d(0x1b4))/0x5*(parseInt(_0x1a488d(0x1b1))/0x6)+-parseInt(_0x1a488d(0x1af))/0x7*(-parseInt(_0x1a488d(0x1ac))/0x8)+-parseInt(_0x1a488d(0x1bb))/0x9;if(_0x4e3fb6===_0x4dea51)break;else _0x38a63e['push'](_0x38a63e['shift']());}catch(_0x535842){_0x38a63e['push'](_0x38a63e['shift']());}}}(a112_0x2ceb,0x3d32b));function a112_0x56ff(_0x1ed248,_0x3148ab){_0x1ed248=_0x1ed248-0x1a2;const _0x2ceb9d=a112_0x2ceb();let _0x56ff34=_0x2ceb9d[_0x1ed248];return _0x56ff34;}import{installMcp}from'./mcp-installer.js';import{logger}from'../utils/logger.js';export async function installMcpNonInteractive(_0x2e71fc,_0x2ad4ef,_0x27ee5e=process[a112_0x49d418(0x1a5)]()){const _0x3d0b00=a112_0x49d418;logger[_0x3d0b00(0x1a2)](_0x27ee5e),logger[_0x3d0b00(0x1ae)](_0x3d0b00(0x1b6),_0x3d0b00(0x1a8),{'ides':_0x2e71fc,'enableBffSave':_0x2ad4ef});const _0x21c46b=await installMcp(_0x2e71fc,_0x2ad4ef,_0x27ee5e);for(const _0x38c009 of _0x21c46b){const _0x12f3a5=_0x38c009[_0x3d0b00(0x1b0)]===_0x3d0b00(0x1aa)?_0x3d0b00(0x1a4):_0x38c009['ide']==='claude'?'Claude\x20Code':_0x3d0b00(0x1b2),_0x4b90e7=_0x38c009['needsManualAction']?'⚠️':_0x38c009[_0x3d0b00(0x1b5)]?'✓':'✗',_0x36f5f5=_0x38c009[_0x3d0b00(0x1b5)]?console[_0x3d0b00(0x1a6)]:console['error'];_0x36f5f5(_0x4b90e7+'\x20'+_0x12f3a5+':');const _0x1f4373=_0x38c009[_0x3d0b00(0x1ab)][_0x3d0b00(0x1b8)]('\x0a');for(const _0x548927 of _0x1f4373){_0x36f5f5('\x20\x20'+_0x548927);}console[_0x3d0b00(0x1a6)]('');}const _0x204d32=_0x21c46b['filter'](_0x1cba14=>_0x1cba14['success'])[_0x3d0b00(0x1b7)];console['log']('\x0a✓\x20MCP\x20configuration\x20completed\x20('+_0x204d32+'/'+_0x21c46b[_0x3d0b00(0x1b7)]+_0x3d0b00(0x1b9)),_0x21c46b[_0x3d0b00(0x1a3)](_0x1e722b=>_0x1e722b[_0x3d0b00(0x1a7)])?(console[_0x3d0b00(0x1a6)](''),console[_0x3d0b00(0x1a6)]('⚠️\x20\x20Note:\x20Some\x20configurations\x20require\x20manual\x20commands,\x20please\x20follow\x20the\x20instructions\x20above')):console['log']('');}
|
package/lib/mcp/mcp-installer.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a113_0x54a209=a113_0x3d1d;(function(_0x917e4f,_0x5dd975){const _0x3c0edb=a113_0x3d1d,_0x461243=_0x917e4f();while(!![]){try{const _0x3b8454=-parseInt(_0x3c0edb(0x1e6))/0x1+parseInt(_0x3c0edb(0x1f6))/0x2*(-parseInt(_0x3c0edb(0x1eb))/0x3)+parseInt(_0x3c0edb(0x21c))/0x4*(-parseInt(_0x3c0edb(0x1f4))/0x5)+parseInt(_0x3c0edb(0x220))/0x6+parseInt(_0x3c0edb(0x1dc))/0x7*(parseInt(_0x3c0edb(0x20e))/0x8)+parseInt(_0x3c0edb(0x212))/0x9*(parseInt(_0x3c0edb(0x1f2))/0xa)+parseInt(_0x3c0edb(0x1e9))/0xb*(parseInt(_0x3c0edb(0x204))/0xc);if(_0x3b8454===_0x5dd975)break;else _0x461243['push'](_0x461243['shift']());}catch(_0x535d9e){_0x461243['push'](_0x461243['shift']());}}}(a113_0x27d9,0xa2f7d));function a113_0x3d1d(_0x446b16,_0x142fed){_0x446b16=_0x446b16-0x1dc;const _0x27d927=a113_0x27d9();let _0x3d1df0=_0x27d927[_0x446b16];return _0x3d1df0;}import{existsSync,mkdirSync,writeFileSync,readFileSync}from'node:fs';import{normalizeEnv}from'../constant/env.js';import{join,dirname}from'node:path';import{fileURLToPath}from'node:url';import{readConfig}from'../utils/config.js';import{logger}from'../utils/logger.js';import{getRulesContent}from'../utils/rules-cdn.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME=a113_0x54a209(0x203);export const MCP_COMMAND=a113_0x54a209(0x214);export const MCP_ARGS=[a113_0x54a209(0x1e5)];export function getAppConfig(){const _0x422c1b=a113_0x54a209,_0x409d47=readConfig(),_0x592a60=_0x409d47['appcode']||_0x409d47[_0x422c1b(0x1f3)],_0x719135=normalizeEnv(_0x409d47[_0x422c1b(0x1df)]||_0x422c1b(0x1f7));if(!_0x592a60)throw new Error('No\x20appcode\x20found.\x20Run\x20\x27rabetbase\x20init\x27\x20to\x20initialize\x20project\x20config');return{'appcode':String(_0x592a60),'env':_0x719135};}export function buildMcpEnv(_0x5b52f9,_0x22736d){const _0x5f4047=a113_0x54a209,_0x3563d2={'RABETBASE_APP_CODE':_0x5b52f9};return _0x22736d!==_0x5f4047(0x1f7)&&(_0x3563d2[_0x5f4047(0x1ea)]=_0x22736d),_0x3563d2;}export function buildMcpArgs(_0xb075d5){const _0xcbb784=a113_0x54a209,_0x1b57bc=['@lovrabet/dataset-mcp-server@latest'];return _0xb075d5&&_0x1b57bc['push'](_0xcbb784(0x211)),_0x1b57bc;}export function buildMcpServerConfig(_0x57557f,_0x4c2009,_0x5b236c){return{'command':MCP_COMMAND,'args':buildMcpArgs(_0x5b236c),'env':buildMcpEnv(_0x57557f,_0x4c2009)};}function a113_0x27d9(){const _0x3464c5=['mcp-claude','parse','\x20\x20\x20\x20\x20\x20}','lovrabet_rules.mdc','agents.md','info','utf8','Unknown\x20IDE:\x20','lovrabet-dataset','732pHzGxN','cursor','claude','Run\x20the\x20following\x20command\x20to\x20configure\x20Claude\x20Code\x20MCP:','\x20\x20\x22mcpServers\x22:\x20{','needsManualAction','mcp-cursor','\x22RABETBASE_APP_CODE\x22:\x20\x22','rules','Create\x20agents.md\x20file','16DMjMNT','\x0a✓\x20Cursor\x20MCP\x20configured\x20successfully!\x0a','mcpServers','--enable-bff-save','7137blFsBv','Update\x20existing\x20mcp.json\x20config','npx','Please\x20restart\x20Cursor\x20to\x20load\x20the\x20new\x20MCP\x20config.','mcp-install','map','success','cwd','claude\x20mcp\x20add\x20','Create\x20Cursor\x20Rules\x20file','44PJNIKR','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','\x20\x20\x20\x20\x20\x20\x20\x20','error','4648968QeEAzp','Other\x20IDE\x20configuration\x20guide\x20displayed','2819376YADiCP','Restart\x20Claude\x20Code\x20to\x20take\x20effect','\x22RABETBASE_ENV\x22:\x20\x22','env','Configuration:','--------------------------------','utf-8','message','stringify','@lovrabet/dataset-mcp-server@latest','655620pEWrUS','Configuration\x20command\x20generated',',\x20env=','55363XYSeoL','RABETBASE_ENV','3RsonQi','.cursor','join','mcp.json','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{','\x20-e\x20RABETBASE_ENV=','\x0aError:\x20Configuration\x20failed\x20-\x20','9100lgxamG','app','377145nXGFTu','Environment:\x20','912302UYJVGa','production','AppCode:\x20','push','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{'];a113_0x27d9=function(){return _0x3464c5;};return a113_0x27d9();}export function buildClaudeMcpCommand(_0x54518b,_0x3b724f,_0x58b094){const _0x29b577=a113_0x54a209,_0x3498d2=buildMcpArgs(_0x58b094),_0x1d337c=_0x29b577(0x21a)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+_0x3498d2[_0x29b577(0x1ed)]('\x20')+'\x20-e\x20RABETBASE_APP_CODE='+_0x54518b,_0x81d671=_0x3b724f!==_0x29b577(0x1f7)?_0x29b577(0x1f0)+_0x3b724f:'';return''+_0x1d337c+_0x81d671;}export async function copyCursorRules(_0x329ef1){const _0x366340=a113_0x54a209,_0x187364=join(_0x329ef1,_0x366340(0x1ec)),_0x175af8=join(_0x187364,_0x366340(0x20c)),_0x37c423=join(_0x175af8,_0x366340(0x1fe));if(existsSync(_0x37c423))return logger['info'](_0x366340(0x216),'Cursor\x20Rules\x20file\x20already\x20exists,\x20skipping',{'path':_0x37c423}),![];try{ensureDir(_0x175af8);const _0xfdf98b=await getRulesContent();return writeFileSync(_0x37c423,_0xfdf98b,_0x366340(0x1e2)),logger[_0x366340(0x200)](_0x366340(0x216),_0x366340(0x21b),{'to':_0x37c423}),!![];}catch(_0x456797){return logger[_0x366340(0x21f)]('mcp-install','Failed\x20to\x20copy\x20Cursor\x20Rules\x20file',{'error':_0x456797 instanceof Error?_0x456797[_0x366340(0x1e3)]:String(_0x456797)}),![];}}export async function copyAgentsMd(_0x278a98){const _0x8ca6a9=a113_0x54a209,_0x56093d=join(_0x278a98,_0x8ca6a9(0x1ff));if(existsSync(_0x56093d))return logger[_0x8ca6a9(0x200)](_0x8ca6a9(0x216),'agents.md\x20already\x20exists,\x20skipping',{'path':_0x56093d}),![];try{const _0x5e0590=await getRulesContent();return writeFileSync(_0x56093d,_0x5e0590,'utf-8'),logger[_0x8ca6a9(0x200)]('mcp-install',_0x8ca6a9(0x20d),{'to':_0x56093d}),!![];}catch(_0xf052f6){return logger['error'](_0x8ca6a9(0x216),'Failed\x20to\x20copy\x20agents.md\x20file',{'error':_0xf052f6 instanceof Error?_0xf052f6[_0x8ca6a9(0x1e3)]:String(_0xf052f6)}),![];}}export async function configureCursorMcp(_0x5886df,_0x3ee472){const _0x55598a=a113_0x54a209;try{const {appcode:_0x416b5d,env:_0x5b3f9a}=getAppConfig(),_0x37941e=join(_0x5886df,_0x55598a(0x1ec)),_0x2853bb=join(_0x37941e,_0x55598a(0x1ee));ensureDir(_0x37941e);const _0x5900e8=buildMcpServerConfig(_0x416b5d,_0x5b3f9a,_0x3ee472);let _0x146e2b;if(existsSync(_0x2853bb)){const _0x187d4d=readFileSync(_0x2853bb,_0x55598a(0x201));_0x146e2b=JSON[_0x55598a(0x1fc)](_0x187d4d),!_0x146e2b[_0x55598a(0x210)]&&(_0x146e2b[_0x55598a(0x210)]={}),logger[_0x55598a(0x200)](_0x55598a(0x20a),_0x55598a(0x213),{'path':_0x2853bb,'appcode':_0x416b5d,'env':_0x5b3f9a});}else _0x146e2b={'mcpServers':{}},logger[_0x55598a(0x200)](_0x55598a(0x20a),'Create\x20new\x20mcp.json\x20config',{'path':_0x2853bb,'appcode':_0x416b5d,'env':_0x5b3f9a});_0x146e2b[_0x55598a(0x210)][MCP_SERVER_NAME]=_0x5900e8,writeFileSync(_0x2853bb,JSON[_0x55598a(0x1e4)](_0x146e2b,null,0x2),{'encoding':_0x55598a(0x201)});const _0x58b3c9=await copyCursorRules(_0x5886df),_0x1d51c9=['Written\x20.cursor/mcp.json',_0x55598a(0x1f8)+_0x416b5d];return _0x5b3f9a!==_0x55598a(0x1f7)&&_0x1d51c9[_0x55598a(0x1f9)](_0x55598a(0x1f5)+_0x5b3f9a),_0x1d51c9[_0x55598a(0x1f9)](_0x55598a(0x215)),_0x58b3c9&&_0x1d51c9[_0x55598a(0x1f9)](_0x55598a(0x21b)),logger[_0x55598a(0x200)]('mcp-cursor',_0x55598a(0x20f),{'appcode':_0x416b5d,'env':_0x5b3f9a,'configPath':_0x2853bb}),{'success':!![],'message':_0x1d51c9['join']('\x0a')};}catch(_0x21b2f1){return logger[_0x55598a(0x21f)]('mcp-cursor',_0x55598a(0x1f1)+(_0x21b2f1 instanceof Error?_0x21b2f1[_0x55598a(0x1e3)]:String(_0x21b2f1))+'\x0a',{'error':_0x21b2f1 instanceof Error?_0x21b2f1['message']:String(_0x21b2f1)}),{'success':![],'message':_0x21b2f1 instanceof Error?_0x21b2f1[_0x55598a(0x1e3)]:String(_0x21b2f1)};}}export function configureClaudeMcp(_0x45f77f,_0x19e7f6){const _0x119d64=a113_0x54a209;try{const {appcode:_0x420c3d,env:_0x2ad70e}=getAppConfig();copyAgentsMd(_0x45f77f);const _0x47f23f=buildMcpArgs(_0x19e7f6),_0x23c520=_0x119d64(0x21a)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+_0x47f23f[_0x119d64(0x1ed)]('\x20')+'\x20-e\x20RABETBASE_APP_CODE='+_0x420c3d,_0x1bb725=_0x2ad70e!==_0x119d64(0x1f7)?'\x20-e\x20RABETBASE_ENV='+_0x2ad70e:'',_0x429a96=''+_0x23c520+_0x1bb725,_0x31dc53=[_0x119d64(0x207),'--------------------------------',''+_0x429a96,_0x119d64(0x1e1),_0x119d64(0x1e0),_0x119d64(0x1f8)+_0x420c3d];return _0x2ad70e!=='production'&&_0x31dc53['push'](_0x119d64(0x1f5)+_0x2ad70e),_0x31dc53[_0x119d64(0x1f9)](_0x119d64(0x1dd)),logger['info'](_0x119d64(0x1fb),_0x119d64(0x1e7),{'appcode':_0x420c3d,'env':_0x2ad70e,'command':_0x429a96}),{'success':!![],'message':_0x31dc53[_0x119d64(0x1ed)]('\x0a'),'needsManualAction':!![]};}catch(_0x5b07a0){return logger[_0x119d64(0x21f)](_0x119d64(0x1fb),_0x119d64(0x1f1)+(_0x5b07a0 instanceof Error?_0x5b07a0[_0x119d64(0x1e3)]:String(_0x5b07a0))+'\x0a',{'error':_0x5b07a0 instanceof Error?_0x5b07a0[_0x119d64(0x1e3)]:String(_0x5b07a0)}),{'success':![],'message':_0x5b07a0 instanceof Error?_0x5b07a0[_0x119d64(0x1e3)]:String(_0x5b07a0)};}}export function showOtherMcpGuide(_0x4ff3fc,_0x42e662){const _0x48ff42=a113_0x54a209;try{const {appcode:_0x1b247c,env:_0x22e894}=getAppConfig(),_0x4ea782=buildMcpServerConfig(_0x1b247c,_0x22e894,_0x42e662),_0x432679=buildMcpArgs(_0x42e662),_0x4a7470=[_0x48ff42(0x20b)+_0x1b247c+'\x22'];_0x22e894!==_0x48ff42(0x1f7)&&_0x4a7470[_0x48ff42(0x1f9)](_0x48ff42(0x1de)+_0x22e894+'\x22');const _0x47944e=_0x22e894!=='production'?_0x48ff42(0x1e8)+_0x22e894:'',_0x1d16fd=['Configuration:\x20appcode='+_0x1b247c+_0x47944e,'{',_0x48ff42(0x208),_0x48ff42(0x1fa),_0x48ff42(0x21d),'\x20\x20\x20\x20\x20\x20\x22args\x22:\x20'+JSON[_0x48ff42(0x1e4)](_0x432679)+',',_0x48ff42(0x1ef),..._0x4a7470[_0x48ff42(0x217)](_0x5becc4=>_0x48ff42(0x21e)+_0x5becc4+','),_0x48ff42(0x1fd),'\x20\x20\x20\x20}','\x20\x20}','}','Detailed\x20guide:\x20https://open.lovrabet.com/en/docs/mcp/config-guide'];return logger[_0x48ff42(0x200)]('mcp-install',_0x48ff42(0x221),{'appcode':_0x1b247c,'env':_0x22e894}),{'success':!![],'message':_0x1d16fd[_0x48ff42(0x1ed)]('\x0a'),'needsManualAction':!![]};}catch(_0x204696){return{'success':![],'message':_0x204696 instanceof Error?_0x204696[_0x48ff42(0x1e3)]:String(_0x204696)};}}function ensureDir(_0x42feef){!existsSync(_0x42feef)&&mkdirSync(_0x42feef,{'recursive':!![]});}export async function installMcp(_0x308d52,_0x57878f,_0x450109=process[a113_0x54a209(0x219)]()){const _0x4adea0=a113_0x54a209,_0x47cbff=[];for(const _0x532b59 of _0x308d52){try{let _0x2262be;switch(_0x532b59){case _0x4adea0(0x205):_0x2262be=await configureCursorMcp(_0x450109,_0x57878f);break;case _0x4adea0(0x206):_0x2262be=configureClaudeMcp(_0x450109,_0x57878f);break;case'other':_0x2262be=showOtherMcpGuide(_0x450109,_0x57878f);break;default:_0x2262be={'success':![],'message':_0x4adea0(0x202)+_0x532b59};}_0x47cbff['push']({'ide':_0x532b59,'success':_0x2262be[_0x4adea0(0x218)],'message':_0x2262be[_0x4adea0(0x1e3)],'needsManualAction':_0x2262be[_0x4adea0(0x209)]});}catch(_0x2544fb){_0x47cbff['push']({'ide':_0x532b59,'success':![],'message':_0x2544fb instanceof Error?_0x2544fb[_0x4adea0(0x1e3)]:String(_0x2544fb)});}}return _0x47cbff;}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x1f5d09,_0x1a4838){const _0x616240=a117_0x1a09,_0x4189ee=_0x1f5d09();while(!![]){try{const _0x4d90fe=-parseInt(_0x616240(0xb2))/0x1*(parseInt(_0x616240(0xaf))/0x2)+parseInt(_0x616240(0xab))/0x3*(-parseInt(_0x616240(0xb7))/0x4)+parseInt(_0x616240(0xb5))/0x5+parseInt(_0x616240(0xb4))/0x6*(-parseInt(_0x616240(0xaa))/0x7)+-parseInt(_0x616240(0xa6))/0x8+-parseInt(_0x616240(0xb6))/0x9*(-parseInt(_0x616240(0xac))/0xa)+parseInt(_0x616240(0xb1))/0xb*(parseInt(_0x616240(0xa8))/0xc);if(_0x4d90fe===_0x1a4838)break;else _0x4189ee['push'](_0x4189ee['shift']());}catch(_0x204ce8){_0x4189ee['push'](_0x4189ee['shift']());}}}(a117_0x53b1,0x8c4d3));import{readFileSync}from'node:fs';function a117_0x53b1(){const _0x46506b=['parse','9746NVkDCP','8811GJhpRg','package.json','6zLZhzr','5215260RLVgXC','16389kmjPdd','76zsrdDV','utf-8','8816504RUWcep','0.0.0','28632SBluXe','version','2299171QQtnpC','93540TmHSxq','460AiNpDQ','resolve','@yuntoo/otel-logger/node','146uqznPW'];a117_0x53b1=function(){return _0x46506b;};return a117_0x53b1();}import{dirname,join}from'node:path';import{createRequire}from'node:module';function a117_0x1a09(_0x232b53,_0x2a7b25){_0x232b53=_0x232b53-0xa5;const _0x53b1d5=a117_0x53b1();let _0x1a09fc=_0x53b1d5[_0x232b53];return _0x1a09fc;}const require=createRequire(import.meta.url);export function getOtelLoggerPackageVersion(){const _0x31121c=a117_0x1a09;try{const _0x296fd9=require[_0x31121c(0xad)](_0x31121c(0xae)),_0x543a13=join(dirname(_0x296fd9),'..',_0x31121c(0xb3)),_0x151e08=JSON[_0x31121c(0xb0)](readFileSync(_0x543a13,_0x31121c(0xa5)));return _0x151e08[_0x31121c(0xa9)];}catch{return _0x31121c(0xa7);}}
|
package/lib/ui/IDESelector.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a120_0x59ec(){const _0x15f616=['2944458yLDgoS','gray','white','\x20↑/↓:\x20Move\x20\x20Space:\x20Toggle\x20\x20a:\x20All\x20\x20i/r:\x20Invert\x20\x20q:\x20Quit\x20\x20Enter:\x20Confirm','7guBmvk','blue','*\x20Select\x20IDEs\x20to\x20configure:','46802GPrXIG','3072812WlKNoO','4562208AYXJgE','592VXXXRU','[\x20]','22705101rmUfoz','has','cyan','[✓]','3675065ZSfRIW','red','column','181822sdBuik','map'];a120_0x59ec=function(){return _0x15f616;};return a120_0x59ec();}(function(_0x1b68ee,_0x17cd12){const _0x41ba72=a120_0x55a7,_0x452a15=_0x1b68ee();while(!![]){try{const _0x29d3b5=parseInt(_0x41ba72(0xce))/0x1*(parseInt(_0x41ba72(0xdd))/0x2)+-parseInt(_0x41ba72(0xca))/0x3+-parseInt(_0x41ba72(0xd2))/0x4+parseInt(_0x41ba72(0xda))/0x5+-parseInt(_0x41ba72(0xd3))/0x6+-parseInt(_0x41ba72(0xd1))/0x7*(parseInt(_0x41ba72(0xd4))/0x8)+parseInt(_0x41ba72(0xd6))/0x9;if(_0x29d3b5===_0x17cd12)break;else _0x452a15['push'](_0x452a15['shift']());}catch(_0x555b5c){_0x452a15['push'](_0x452a15['shift']());}}}(a120_0x59ec,0xd920e));import{jsxs as a120_0x557719,jsx as a120_0x252cc1}from'react/jsx-runtime';import{Text,Box}from'ink';function a120_0x55a7(_0x339e9c,_0x5a0845){_0x339e9c=_0x339e9c-0xc9;const _0x59ec2f=a120_0x59ec();let _0x55a786=_0x59ec2f[_0x339e9c];return _0x55a786;}export function IDESelector({ideList:_0x306a16,title:_0x116ced,selection:_0x16c148}){const _0x40ebcb=a120_0x55a7,{selectedIndexes:_0x5a1275,highlightIndex:_0x4811ed,errorMsg:_0x49e760}=_0x16c148;return a120_0x557719(Box,{'flexDirection':_0x40ebcb(0xdc),'marginTop':0x1,'children':[a120_0x252cc1(Box,{'children':a120_0x557719(Text,{'color':_0x40ebcb(0xd8),'children':['*\x20',_0x116ced]})}),_0x49e760&&a120_0x252cc1(Box,{'marginTop':0x1,'children':a120_0x557719(Text,{'color':_0x40ebcb(0xdb),'children':['✗\x20',_0x49e760]})}),a120_0x557719(Box,{'marginTop':0x1,'flexDirection':_0x40ebcb(0xdc),'children':[a120_0x252cc1(Text,{'bold':!![],'children':_0x40ebcb(0xd0)}),_0x306a16[_0x40ebcb(0xc9)]((_0x3b3abd,_0x1f3149)=>{const _0xc28120=_0x40ebcb,_0x4d5b05=_0x4811ed===_0x1f3149,_0x38af5f=_0x5a1275[_0xc28120(0xd7)](_0x1f3149);return a120_0x252cc1(Box,{'children':a120_0x557719(Text,{'backgroundColor':_0x4d5b05?_0xc28120(0xcf):undefined,'color':_0x4d5b05?_0xc28120(0xcc):undefined,'children':['\x20\x20',_0x38af5f?_0xc28120(0xd9):_0xc28120(0xd5),'\x20',_0x3b3abd['name'],'\x20',a120_0x557719(Text,{'color':_0x4d5b05?'white':_0xc28120(0xcb),'dimColor':!_0x4d5b05,'children':['-\x20',_0x3b3abd['description']]})]})},_0x3b3abd['key']);}),a120_0x252cc1(Box,{'marginTop':0x1,'children':a120_0x252cc1(Text,{'color':'gray','children':_0x40ebcb(0xcd)})})]})]});}export{useIDESelection}from'./useIDESelection.js';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x283917,_0xd625d7){const _0x3bfb04=a121_0x3c13,_0x137902=_0x283917();while(!![]){try{const _0x36bc34=-parseInt(_0x3bfb04(0x18a))/0x1*(parseInt(_0x3bfb04(0x194))/0x2)+-parseInt(_0x3bfb04(0x18d))/0x3*(parseInt(_0x3bfb04(0x18b))/0x4)+parseInt(_0x3bfb04(0x19b))/0x5*(parseInt(_0x3bfb04(0x195))/0x6)+-parseInt(_0x3bfb04(0x189))/0x7*(parseInt(_0x3bfb04(0x190))/0x8)+parseInt(_0x3bfb04(0x192))/0x9*(-parseInt(_0x3bfb04(0x199))/0xa)+-parseInt(_0x3bfb04(0x19c))/0xb+parseInt(_0x3bfb04(0x196))/0xc;if(_0x36bc34===_0xd625d7)break;else _0x137902['push'](_0x137902['shift']());}catch(_0x8060e4){_0x137902['push'](_0x137902['shift']());}}}(a121_0x5e1d,0x379b1));import{useState,useCallback}from'react';function a121_0x3c13(_0x4fcde5,_0x437a96){_0x4fcde5=_0x4fcde5-0x188;const _0x5e1d98=a121_0x5e1d();let _0x3c13f4=_0x5e1d98[_0x4fcde5];return _0x3c13f4;}function a121_0x5e1d(){const _0x52f564=['110oUUKbL','key','627055VleDlC','143407hvooqP','filter','add','28854yYniIC','13nEbAqw','534968mWeXeb','delete','9DsSKue','length','upArrow','256tTteOe','downArrow','179919GceSxZ','map','66644EWYBNz','6Yxwhay','15619248FKzZaN','has','size'];a121_0x5e1d=function(){return _0x52f564;};return a121_0x5e1d();}export function useIDESelection({ideList:_0x295e10,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0xb27bb6=a121_0x3c13,[_0x55fc0e,_0x20e7be]=useState(new Set(preselectedIDEs[_0xb27bb6(0x193)](_0x5effd8=>_0x295e10['findIndex'](_0x4625fd=>_0x4625fd[_0xb27bb6(0x19a)]===_0x5effd8))['filter'](_0x575846=>_0x575846>=0x0))),[_0x141619,_0x375213]=useState(0x0),[_0x22cb49,_0x329fdf]=useState(''),_0x53d46f=useCallback(()=>{_0x375213(_0x5da6bb=>_0x5da6bb>0x0?_0x5da6bb-0x1:_0x295e10['length']-0x1);},[_0x295e10[_0xb27bb6(0x18e)]]),_0x1219f5=useCallback(()=>{const _0x3d9927=_0xb27bb6;_0x375213(_0x5727c7=>_0x5727c7<_0x295e10[_0x3d9927(0x18e)]-0x1?_0x5727c7+0x1:0x0);},[_0x295e10[_0xb27bb6(0x18e)]]),_0x4ba36b=useCallback(()=>{if(!multiSelect){_0x20e7be(new Set([_0x141619]));return;}_0x20e7be(_0x4356ec=>{const _0x501193=a121_0x3c13,_0x46ab24=new Set(_0x4356ec);return _0x46ab24[_0x501193(0x197)](_0x141619)?_0x46ab24[_0x501193(0x18c)](_0x141619):_0x46ab24[_0x501193(0x188)](_0x141619),_0x46ab24;});},[_0x141619,multiSelect]),_0x4d0bf8=useCallback(()=>{const _0x22501e=_0xb27bb6;_0x20e7be(new Set(_0x295e10[_0x22501e(0x193)]((_0x4f51cc,_0x422944)=>_0x422944)));},[_0x295e10]),_0x2bb46e=useCallback(()=>{_0x20e7be(_0x597e88=>{const _0x443ac4=a121_0x3c13,_0x2467ee=new Set();for(let _0x31904b=0x0;_0x31904b<_0x295e10[_0x443ac4(0x18e)];_0x31904b++){!_0x597e88[_0x443ac4(0x197)](_0x31904b)&&_0x2467ee['add'](_0x31904b);}return _0x2467ee;});},[_0x295e10]),_0x55d7b1=useCallback(()=>{const _0x38963a=_0xb27bb6;return Array['from'](_0x55fc0e)['map'](_0x1e7214=>_0x295e10[_0x1e7214]?.[_0x38963a(0x19a)])[_0x38963a(0x19d)](_0x3dde95=>_0x3dde95!==undefined);},[_0x55fc0e,_0x295e10]),_0x3e27f5=useCallback(()=>{const _0x27706b=_0xb27bb6;return _0x55fc0e[_0x27706b(0x198)]===_0x295e10[_0x27706b(0x18e)];},[_0x55fc0e,_0x295e10]),_0x1ea34b=useCallback((_0x24e364,_0x7703ec)=>{const _0xa0d775=_0xb27bb6;if(_0x7703ec[_0xa0d775(0x18f)])return _0x53d46f(),!![];if(_0x7703ec[_0xa0d775(0x191)])return _0x1219f5(),!![];if(_0x24e364==='\x20')return _0x4ba36b(),!![];if(_0x24e364==='a'||_0x24e364==='A')return _0x4d0bf8(),!![];if(_0x24e364==='i'||_0x24e364==='I'||_0x24e364==='r'||_0x24e364==='R')return _0x2bb46e(),!![];return![];},[_0x53d46f,_0x1219f5,_0x4ba36b,_0x4d0bf8,_0x2bb46e]);return{'selectedIndexes':_0x55fc0e,'highlightIndex':_0x141619,'errorMsg':_0x22cb49,'setErrorMsg':_0x329fdf,'handleKeyDown':_0x1ea34b,'getSelectedIDEs':_0x55d7b1,'isAllSelected':_0x3e27f5,'toggleSelection':_0x4ba36b,'selectAll':_0x4d0bf8,'invertSelection':_0x2bb46e,'moveHighlightUp':_0x53d46f,'moveHighlightDown':_0x1219f5};}
|