@lovrabet/rabetbase-cli 2.0.2-beta.1
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/LICENSE +45 -0
- package/README.md +605 -0
- package/lib/ai-setup/config.js +1 -0
- package/lib/api/api-doc-ui.js +1 -0
- package/lib/api/api-doc.js +1 -0
- package/lib/api/api-pull-ui.js +1 -0
- package/lib/api/fetch-model-list.js +1 -0
- package/lib/api/generate-api-file.js +1 -0
- package/lib/api/main.js +1 -0
- package/lib/api/pull-silent.js +1 -0
- package/lib/app-menu/app-menu-sync-ui.js +1 -0
- package/lib/app-menu/create-menu.js +1 -0
- package/lib/app-menu/get-local-pages.js +1 -0
- package/lib/app-menu/get-online-menu-list.js +1 -0
- package/lib/app-menu/types.js +1 -0
- package/lib/app-menu/use-get-online-menu-list.js +1 -0
- package/lib/app-menu/utils.js +1 -0
- package/lib/app-menu/valid-url.js +1 -0
- package/lib/app-menu-update-cdn/current-content.js +1 -0
- package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -0
- package/lib/app-menu-update-cdn/main.js +1 -0
- package/lib/app-menu-update-cdn/types.js +1 -0
- package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -0
- package/lib/auth/auth-server-ui.js +1 -0
- package/lib/auth/auth-server.js +1 -0
- package/lib/auth/constant.js +1 -0
- package/lib/auth/get-cookie.js +1 -0
- package/lib/auth/is-session-valid.js +1 -0
- package/lib/auth/logout.js +1 -0
- package/lib/cli-flags.js +1 -0
- package/lib/cli.js +2 -0
- package/lib/commands/api.js +1 -0
- package/lib/commands/app.js +1 -0
- package/lib/commands/auth.js +1 -0
- package/lib/commands/bff/delete.js +1 -0
- package/lib/commands/bff/detail.js +1 -0
- package/lib/commands/bff/index.js +1 -0
- package/lib/commands/bff/list.js +1 -0
- package/lib/commands/bff/new.js +1 -0
- package/lib/commands/bff/pull.js +1 -0
- package/lib/commands/bff/push.js +1 -0
- package/lib/commands/bff/status.js +1 -0
- package/lib/commands/build.js +1 -0
- package/lib/commands/codegen/index.js +1 -0
- package/lib/commands/codegen/sdk.js +1 -0
- package/lib/commands/codegen/sql.js +1 -0
- package/lib/commands/config.js +1 -0
- package/lib/commands/create.js +1 -0
- package/lib/commands/dataset/detail.js +1 -0
- package/lib/commands/dataset/index.js +1 -0
- package/lib/commands/dataset/links.js +1 -0
- package/lib/commands/dataset/list.js +1 -0
- package/lib/commands/dataset/operations.js +1 -0
- package/lib/commands/init.js +1 -0
- package/lib/commands/logout.js +1 -0
- package/lib/commands/logs.js +1 -0
- package/lib/commands/mcp.js +1 -0
- package/lib/commands/menu.js +1 -0
- package/lib/commands/preview.js +1 -0
- package/lib/commands/registry.js +1 -0
- package/lib/commands/run.js +1 -0
- package/lib/commands/skill.js +1 -0
- package/lib/commands/sql/detail.js +1 -0
- package/lib/commands/sql/exec.js +1 -0
- package/lib/commands/sql/index.js +1 -0
- package/lib/commands/sql/list.js +1 -0
- package/lib/commands/sql/save.js +1 -0
- package/lib/commands/sql/validate.js +1 -0
- package/lib/commands/start.js +1 -0
- package/lib/config/config-help.js +1 -0
- package/lib/config/main.js +1 -0
- package/lib/constant/cli.js +1 -0
- package/lib/constant/domain.js +1 -0
- package/lib/constant/env.js +1 -0
- package/lib/context.js +1 -0
- package/lib/core/alias-resolver.js +1 -0
- package/lib/core/api-client.js +1 -0
- package/lib/core/bff/config.js +1 -0
- package/lib/core/bff/file-system.js +1 -0
- package/lib/core/bff/hash.js +1 -0
- package/lib/core/bff/lock.js +1 -0
- package/lib/core/bff/types.js +1 -0
- package/lib/core/bff/utils.js +1 -0
- package/lib/core/db-resolver.js +1 -0
- package/lib/core/sql-validator.js +1 -0
- package/lib/create-app/enhanced-guided-create.js +1 -0
- package/lib/create-app/format-elapsed.js +1 -0
- package/lib/create-app/main.js +1 -0
- package/lib/create-app/non-interactive.js +1 -0
- package/lib/create-app/task-finished.js +1 -0
- package/lib/create-app/task-loading.js +1 -0
- package/lib/create-app/task-running.js +1 -0
- package/lib/create-app/task-time.js +1 -0
- package/lib/create-app/use-copy-project-template.js +1 -0
- package/lib/create-app/use-format-code.js +1 -0
- package/lib/create-app/use-install-dependencies.js +1 -0
- package/lib/errors.js +1 -0
- package/lib/framework/flags.js +1 -0
- package/lib/framework/help.js +1 -0
- package/lib/framework/index.js +1 -0
- package/lib/framework/output.js +1 -0
- package/lib/framework/response.js +1 -0
- package/lib/framework/runner.js +1 -0
- package/lib/framework/types.js +1 -0
- package/lib/generated/build-info.js +1 -0
- package/lib/help.js +1 -0
- package/lib/init/main.js +1 -0
- package/lib/mcp/McpInstallUI.js +1 -0
- package/lib/mcp/claude.js +1 -0
- package/lib/mcp/cursor.js +1 -0
- package/lib/mcp/main.js +1 -0
- package/lib/mcp/mcp-install-non-interactive.js +1 -0
- package/lib/mcp/mcp-installer.js +1 -0
- package/lib/skills/main.js +1 -0
- package/lib/skills/npx-skills-add.js +1 -0
- package/lib/types/index.js +1 -0
- package/lib/ui/IDESelector.js +1 -0
- package/lib/ui/useIDESelection.js +1 -0
- package/lib/utils/ai_config.js +1 -0
- package/lib/utils/cdn-config.js +1 -0
- package/lib/utils/check-sdk-version.js +1 -0
- package/lib/utils/cli-version-check.js +1 -0
- package/lib/utils/config.js +1 -0
- package/lib/utils/copy-directory.js +1 -0
- package/lib/utils/file-utils.js +1 -0
- package/lib/utils/guides-cdn.js +1 -0
- package/lib/utils/http-client.js +1 -0
- package/lib/utils/logger.js +1 -0
- package/lib/utils/rules-cdn.js +1 -0
- package/lib/utils/sleep.js +1 -0
- package/lib/utils/template-replacer.js +1 -0
- package/package.json +77 -0
- package/sidecar/flags.json +10 -0
- package/templates/README.md +97 -0
- package/templates/generate-api/api.ts.tpl +47 -0
- package/templates/generate-api/client.ts.tpl +64 -0
- package/templates/projects/sub-app-react-demo/.prettierrc +1 -0
- package/templates/projects/sub-app-react-demo/CHANGELOG.md +53 -0
- package/templates/projects/sub-app-react-demo/README.md +318 -0
- package/templates/projects/sub-app-react-demo/docs/API_RULE_CHANGE.md +212 -0
- package/templates/projects/sub-app-react-demo/docs/quick-start.md +526 -0
- package/templates/projects/sub-app-react-demo/index.html +27 -0
- package/templates/projects/sub-app-react-demo/package.json +34 -0
- package/templates/projects/sub-app-react-demo/public/logo.svg +1 -0
- package/templates/projects/sub-app-react-demo/public/vite.svg +1 -0
- package/templates/projects/sub-app-react-demo/src/api/api.ts +83 -0
- package/templates/projects/sub-app-react-demo/src/api/client.ts +64 -0
- package/templates/projects/sub-app-react-demo/src/layouts/MainLayout.tsx +311 -0
- package/templates/projects/sub-app-react-demo/src/main.tsx +48 -0
- package/templates/projects/sub-app-react-demo/src/pages/dashboard/index.tsx +572 -0
- package/templates/projects/sub-app-react-demo/src/pages/data-screen/index.tsx +526 -0
- package/templates/projects/sub-app-react-demo/src/pages/index.tsx +467 -0
- package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +453 -0
- package/templates/projects/sub-app-react-demo/src/pages/workbench/index.module.css +293 -0
- package/templates/projects/sub-app-react-demo/src/pages/workbench/index.tsx +155 -0
- package/templates/projects/sub-app-react-demo/src/router/index.tsx +30 -0
- package/templates/projects/sub-app-react-demo/src/style.css +92 -0
- package/templates/projects/sub-app-react-demo/src/utils/api.ts +12 -0
- package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +2 -0
- package/templates/projects/sub-app-react-demo/tsconfig.json +26 -0
- package/templates/projects/sub-app-react-demo/vite.config.ts +111 -0
- package/templates/rules/lovrabet_rules.mdc.tpl +891 -0
- package/templates/skill/SKILL.md.tpl +120 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a82_0x31c8(){const _0x1b3f53=['\x20statements\x20cannot\x20be\x20auto-saved.\x20Please\x20operate\x20manually\x20on\x20the\x20platform.','reason','length','type','test','unknown\x20table(s)','push','242VSUxPT','10896WMazxJ','13163697ASiNlP','SQL\x20contains\x20modification\x20statements\x20alongside\x20SELECT','694211voOegG','matchAll','DELETE\x20statements\x20are\x20blocked\x20from\x20auto-save','39910FIMYnG','isDangerous','includes','split','849663qjYyUs','Unable\x20to\x20detect\x20SQL\x20type.\x20Please\x20check\x20the\x20SQL\x20content.','replace','6YmtNkB','trim','88vIgksC','match','join','UNKNOWN','UPDATE','SELECT','6371480gAQqce','WITH','413032WKppMu','startsWith','add','746YXkEiD','INSERT','DELETE','\x20query\x20targeting\x20','DDL','DDL\x20statements\x20are\x20blocked\x20from\x20auto-save'];a82_0x31c8=function(){return _0x1b3f53;};return a82_0x31c8();}(function(_0x108a47,_0x3d5dfb){const _0x85b0b4=a82_0x5537,_0x2dbbe5=_0x108a47();while(!![]){try{const _0x49b108=parseInt(_0x85b0b4(0xd1))/0x1+parseInt(_0x85b0b4(0xb9))/0x2*(-parseInt(_0x85b0b4(0xc7))/0x3)+-parseInt(_0x85b0b4(0xde))/0x4+-parseInt(_0x85b0b4(0xdc))/0x5*(-parseInt(_0x85b0b4(0xd4))/0x6)+-parseInt(_0x85b0b4(0xca))/0x7*(parseInt(_0x85b0b4(0xd6))/0x8)+parseInt(_0x85b0b4(0xc8))/0x9+-parseInt(_0x85b0b4(0xcd))/0xa*(parseInt(_0x85b0b4(0xc6))/0xb);if(_0x49b108===_0x3d5dfb)break;else _0x2dbbe5['push'](_0x2dbbe5['shift']());}catch(_0x253874){_0x2dbbe5['push'](_0x2dbbe5['shift']());}}}(a82_0x31c8,0xe7e85));export function detectSqlType(_0x3d9bc0){const _0x3a177b=a82_0x5537;if(!_0x3d9bc0?.['trim']())return{'type':_0x3a177b(0xd9),'isSelectOnly':![],'isDangerous':![],'reason':'SQL\x20content\x20is\x20empty'};const _0x243016=_0x3d9bc0['replace'](/#\{[^}]*\}/g,'?')[_0x3a177b(0xd3)](/\$\{[^}]*\}/g,'?')[_0x3a177b(0xd3)](/@[^(\s]+(\([^)]*\))?/g,'')[_0x3a177b(0xd5)](),_0x5d2c21=_0x243016[_0x3a177b(0xd0)]('\x0a');let _0x411c5d='';for(const _0x4c5e87 of _0x5d2c21){const _0x46a618=_0x4c5e87[_0x3a177b(0xd5)]();if(!_0x46a618||_0x46a618[_0x3a177b(0xb7)]('--')||_0x46a618[_0x3a177b(0xb7)]('/*'))continue;_0x411c5d=_0x46a618;break;}const _0xd7035f=_0x411c5d['toUpperCase']();if(_0xd7035f[_0x3a177b(0xb7)](_0x3a177b(0xdb))||_0xd7035f[_0x3a177b(0xb7)](_0x3a177b(0xdd))){const _0x4744cf=/\b(INSERT|UPDATE|DELETE|DROP|ALTER|CREATE|TRUNCATE)\b/i[_0x3a177b(0xc3)](_0x243016);return{'type':_0x3a177b(0xdb),'isSelectOnly':!_0x4744cf,'isDangerous':_0x4744cf,'reason':_0x4744cf?_0x3a177b(0xc9):undefined};}if(_0xd7035f[_0x3a177b(0xb7)](_0x3a177b(0xba)))return{'type':_0x3a177b(0xba),'isSelectOnly':![],'isDangerous':![]};if(_0xd7035f[_0x3a177b(0xb7)](_0x3a177b(0xda)))return{'type':_0x3a177b(0xda),'isSelectOnly':![],'isDangerous':![]};if(_0xd7035f['startsWith'](_0x3a177b(0xbb)))return{'type':'DELETE','isSelectOnly':![],'isDangerous':!![],'reason':_0x3a177b(0xcc)};if(/^(CREATE|ALTER|DROP|TRUNCATE)/i[_0x3a177b(0xc3)](_0xd7035f))return{'type':_0x3a177b(0xbd),'isSelectOnly':![],'isDangerous':!![],'reason':_0x3a177b(0xbe)};return{'type':'UNKNOWN','isSelectOnly':![],'isDangerous':![]};}function extractTables(_0x5d6d9c){const _0x1a073a=a82_0x5537,_0x4a8e00=_0x5d6d9c['replace'](/#\{[^}]*\}/g,'?')[_0x1a073a(0xd3)](/\$\{[^}]*\}/g,'?')[_0x1a073a(0xd3)](/'[^']*'/g,'\x27\x27')[_0x1a073a(0xd3)](/--.*$/gm,'')['replace'](/\/\*[\s\S]*?\*\//g,''),_0x227a60=[],_0xbc2ac5=_0x4a8e00['match'](/FROM\s+([^\s,)(]+)/i);if(_0xbc2ac5?.[0x1])_0x227a60[_0x1a073a(0xc5)](_0xbc2ac5[0x1][_0x1a073a(0xd3)](/[`"]/g,''));for(const _0x532a8d of _0x4a8e00[_0x1a073a(0xcb)](/(?:INNER|LEFT|RIGHT|FULL|CROSS)?\s*JOIN\s+([^\s,)(]+)/gi)){const _0x24755c=_0x532a8d[0x1]?.[_0x1a073a(0xd3)](/[`"]/g,'');if(_0x24755c&&!_0x227a60[_0x1a073a(0xcf)](_0x24755c))_0x227a60['push'](_0x24755c);}const _0x2df205=_0x4a8e00[_0x1a073a(0xd7)](/INTO\s+([^\s(]+)/i);if(_0x2df205?.[0x1]){const _0x19373b=_0x2df205[0x1][_0x1a073a(0xd3)](/[`"]/g,'');if(!_0x227a60[_0x1a073a(0xcf)](_0x19373b))_0x227a60['push'](_0x19373b);}const _0x338b4f=_0x4a8e00[_0x1a073a(0xd7)](/UPDATE\s+([^\s,)(]+)/i);if(_0x338b4f?.[0x1]){const _0x37aba1=_0x338b4f[0x1][_0x1a073a(0xd3)](/[`"]/g,'');if(!_0x227a60[_0x1a073a(0xcf)](_0x37aba1))_0x227a60[_0x1a073a(0xc5)](_0x37aba1);}return _0x227a60;}function a82_0x5537(_0x1dd712,_0x25e7dc){_0x1dd712=_0x1dd712-0xb7;const _0x31c88c=a82_0x31c8();let _0x55377a=_0x31c88c[_0x1dd712];return _0x55377a;}function extractParameters(_0xb0082f){const _0xd02ec0=a82_0x5537,_0x5a61dc=new Set();for(const _0x45848b of _0xb0082f['matchAll'](/#\{(\w+)\}/g))if(_0x45848b[0x1])_0x5a61dc[_0xd02ec0(0xb8)](_0x45848b[0x1]);for(const _0x3d15db of _0xb0082f[_0xd02ec0(0xcb)](/\$\{(\w+)\}/g))if(_0x3d15db[0x1])_0x5a61dc['add'](_0x3d15db[0x1]);return Array['from'](_0x5a61dc);}export function validateSql(_0x5c22de){const _0x576f08=a82_0x5537,_0x3c56fe=detectSqlType(_0x5c22de),_0x363131=extractTables(_0x5c22de),_0x572c5c=extractParameters(_0x5c22de);if(_0x3c56fe[_0x576f08(0xce)])return{'valid':![],'sqlType':_0x3c56fe,'tables':_0x363131,'parameters':_0x572c5c,'message':_0x3c56fe[_0x576f08(0xc0)]||_0x3c56fe['type']+_0x576f08(0xbf)};if(_0x3c56fe[_0x576f08(0xc2)]==='UNKNOWN')return{'valid':![],'sqlType':_0x3c56fe,'tables':_0x363131,'parameters':_0x572c5c,'message':_0x576f08(0xd2)};return{'valid':!![],'sqlType':_0x3c56fe,'tables':_0x363131,'parameters':_0x572c5c,'message':_0x3c56fe[_0x576f08(0xc2)]+_0x576f08(0xbc)+(_0x363131['length']?_0x363131[_0x576f08(0xd8)](',\x20'):_0x576f08(0xc4))+(_0x572c5c[_0x576f08(0xc1)]?'\x20with\x20parameters:\x20'+_0x572c5c['join'](',\x20'):'')};}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x1728f6,_0x308b73){const _0x46e98d=a83_0x3b5a,_0xb94d9d=_0x1728f6();while(!![]){try{const _0x29aaaa=parseInt(_0x46e98d(0x107))/0x1*(parseInt(_0x46e98d(0x10d))/0x2)+-parseInt(_0x46e98d(0xe4))/0x3*(parseInt(_0x46e98d(0x100))/0x4)+parseInt(_0x46e98d(0xfd))/0x5+-parseInt(_0x46e98d(0x11a))/0x6*(-parseInt(_0x46e98d(0x10f))/0x7)+-parseInt(_0x46e98d(0xf4))/0x8*(-parseInt(_0x46e98d(0xee))/0x9)+-parseInt(_0x46e98d(0x116))/0xa*(parseInt(_0x46e98d(0x123))/0xb)+-parseInt(_0x46e98d(0xfe))/0xc*(-parseInt(_0x46e98d(0x115))/0xd);if(_0x29aaaa===_0x308b73)break;else _0xb94d9d['push'](_0xb94d9d['shift']());}catch(_0x1f30a0){_0xb94d9d['push'](_0xb94d9d['shift']());}}}(a83_0x2641,0xc7ac1));import{jsx as a83_0x50467d,jsxs as a83_0x237121,Fragment as a83_0x7e165}from'react/jsx-runtime';function a83_0x2641(){const _0x224077=['If\x20Yes,\x20npx\x20skills\x20will\x20guide\x20you\x20to\x20select\x20an\x20AI\x20agent\x20and\x20install\x20the\x20developer\x20skill\x20pack,\x20then\x20Cursor\x20MCP\x20will\x20be\x20configured\x20automatically','column','login','resolve','Skills\x20&\x20MCP','619TMDDrq','√\x20Valid\x20login\x20detected','Invalid\x20AppCode','confirm-mcp-setup','red','cwd','970VLQAyH','cyan','189vLdbgZ','skills-mcp-setup','*\x20Logging\x20in,\x20please\x20complete\x20in\x20browser...','project-name','*\x20Install\x20AI\x20Skills\x20and\x20configure\x20MCP?','confirm-api-pull','13xQdEEg','197140rXSrmb','Login\x20failed','my-app','Login\x20status','112614getCUl','login-prompt','Project\x20Name','App\x20Code','*\x20AppCode\x20','trim','Yes','login-check','login-process','759SDduYm','\x20Logging\x20in...','*\x20Creating\x20project...','leftArrow','Invalid\x20project\x20name','*\x20Login\x20first\x20to\x20pull\x20API\x20config?','\x20Checking...','\x22\x20already\x20exists','\x20\x20Recommended:\x20Yes,\x20to\x20auto-configure\x20API','return','*\x20Checking\x20login\x20status...','gray','Logged\x20in','Project\x20directory\x20','\x20←\x20','env','184494SjJwmr','Project\x20name\x20must\x20start\x20with\x20a\x20letter\x20or\x20number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','Directory\x20\x22','AppCode\x20can\x20only\x20contain\x20letters,\x20numbers,\x20hyphens\x20and\x20underscores,\x20and\x20must\x20start\x20with\x20a\x20letter\x20or\x20number','step','!\x20No\x20valid\x20login\x20detected','Login\x20skipped','green','value','slice','845163MKqpzS','[optional]:\x20','production','creating','app-code','Project\x20name\x20cannot\x20exceed\x2050\x20characters','16KfiIaz','test','yellow','map','backspace','\x20\x20Use\x20←→\x20to\x20choose,\x20press\x20Enter\x20to\x20confirm','includes','Bind\x20AppCode\x20to\x20auto-configure\x20API,\x20e.g.\x20app-c4c89304\x20(press\x20Enter\x20to\x20skip)','*\x20Automatically\x20pull\x20API\x20config?','5932740HvbfJd','19148772MnoeXi','length','104xCBleD','Pull\x20API\x20config'];a83_0x2641=function(){return _0x224077;};return a83_0x2641();}import{useState}from'react';import{Text,Box,useInput}from'ink';import{existsSync}from'node:fs';import a83_0xe11456 from'node:path';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';function a83_0x3b5a(_0x447673,_0x4901d7){_0x447673=_0x447673-0xdc;const _0x2641ce=a83_0x2641();let _0x3b5afc=_0x2641ce[_0x447673];return _0x3b5afc;}import{readConfig}from'../utils/config.js';export function EnhancedGuidedCreate(_0x1240b7){const _0x3a4270=a83_0x3b5a,{onCreate:_0x4d6945,env:_0x3bd534}=_0x1240b7,[_0x57f794,_0xe31fd4]=useState('project-name'),[_0x3db248,_0x140dbf]=useState(''),[_0x12dd04,_0x5eef01]=useState(''),[_0x5a4c44,_0x67b3fb]=useState(''),[_0x5e0d50,_0x33e9c8]=useState(''),[_0x1a58d8,_0x33bb2c]=useState([]),[_0x3f82c6,_0x2921ab]=useState(null),[_0x1f5ea3,_0x1e998f]=useState(![]),[_0xb02d07,_0x495f80]=useState(![]),[_0x3decee,_0x35e049]=useState(![]),[_0x208d20,_0x4181e9]=useState(0x0),[_0x1a348c,_0x1eb79c]=useState(0x0),[_0x24a13e,_0x1bcab3]=useState(0x0),[_0x3d5422,_0x57250b]=useState(''),_0x1044d7=_0x3a4270(0x118),_0x54dc2a=readConfig(),_0x39474c=typeof _0x54dc2a[_0x3a4270(0xe3)]==='string'?_0x54dc2a[_0x3a4270(0xe3)]:undefined;function _0x23c137(_0xaed07d){const _0x294c34=_0x3a4270,_0x2ef639=_0xaed07d||_0x1044d7,_0x423a81=a83_0xe11456[_0x294c34(0x105)](process[_0x294c34(0x10c)](),_0x2ef639);return existsSync(_0x423a81);}function _0x2d7c44(_0x4a3460){const _0x2e092e=_0x3a4270;if(_0x4a3460[_0x2e092e(0xff)]>0x32)return{'valid':![],'message':_0x2e092e(0xf3)};const _0x4de417=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x4a3460?.['trim']()&&!_0x4de417[_0x2e092e(0xf5)](_0x4a3460))return{'valid':![],'message':_0x2e092e(0xe5)};return{'valid':!![]};}function _0x5694e1(_0x2c4a8b){const _0x3539cd=_0x3a4270;if(!_0x2c4a8b[_0x3539cd(0x11f)]())return{'valid':!![]};if(_0x2c4a8b[_0x3539cd(0xff)]>0x64)return{'valid':![],'message':'AppCode\x20cannot\x20exceed\x20100\x20characters'};const _0x1a7087=/^[a-zA-Z0-9][a-zA-Z0-9_-]*$/;if(!_0x1a7087[_0x3539cd(0xf5)](_0x2c4a8b))return{'valid':![],'message':_0x3539cd(0xe7)};return{'valid':!![]};}async function _0x5d564e(){_0x1e998f(!![]);try{const _0x289566=await getIsSessionValid();return _0x2921ab(_0x289566),_0x289566;}catch(_0xc80cee){return _0x2921ab(![]),![];}finally{_0x1e998f(![]);}}async function _0x508469(){_0x495f80(!![]);try{const _0x57fc65=await authServer({'silent':!![]});return _0x2921ab(_0x57fc65),_0x57fc65;}catch(_0x32fcb0){return _0x2921ab(![]),![];}finally{_0x495f80(![]);}}return useInput(async(_0x467b38,_0x3bcd11)=>{const _0x221958=_0x3a4270;if(_0x3bcd11[_0x221958(0x126)]||_0x3bcd11['rightArrow']){if(_0x57f794===_0x221958(0x114)){_0x4181e9(_0x1f0a1c=>_0x1f0a1c===0x0?0x1:0x0);return;}if(_0x57f794===_0x221958(0x10a)){_0x1eb79c(_0x4a030a=>_0x4a030a===0x0?0x1:0x0);return;}if(_0x57f794==='login-prompt'){_0x1bcab3(_0x2b908c=>_0x2b908c===0x0?0x1:0x0);return;}}if(_0x3bcd11[_0x221958(0xdd)]){if(_0x57f794===_0x221958(0x112)){const _0x26fd82=_0x5a4c44['trim']()||_0x1044d7;if(_0x5e0d50)return;if(_0x23c137(_0x26fd82)){_0x57250b(_0x221958(0xe1)+_0x26fd82+'\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name');return;}_0x140dbf(_0x26fd82),_0x33bb2c([{'step':_0x221958(0x112),'label':_0x221958(0x11c),'value':_0x26fd82}]),_0x67b3fb(''),_0x33e9c8(''),_0x57250b(''),_0xe31fd4(_0x221958(0xf2));return;}if(_0x57f794==='app-code'){if(_0x5e0d50)return;const _0x115fa8=_0x5a4c44[_0x221958(0x11f)]();_0x5eef01(_0x115fa8),_0x33bb2c(_0x298459=>[..._0x298459,{'step':_0x221958(0xf2),'label':_0x221958(0x11d),'value':_0x115fa8||'Not\x20set'}]),_0x67b3fb(''),_0x33e9c8('');if(_0x115fa8){_0xe31fd4(_0x221958(0x121));const _0x3723ab=await _0x5d564e();_0x3723ab?_0xe31fd4(_0x221958(0x114)):_0xe31fd4(_0x221958(0x11b));}else{const _0x224b85=_0x3bd534||_0x39474c||_0x221958(0xf0);_0x4d6945({'projectName':_0x3db248,'appCode':undefined,'pullApi':![],'setupMcp':![],'env':_0x224b85}),_0xe31fd4(_0x221958(0xf1));}return;}if(_0x57f794===_0x221958(0x114)){const _0x5bbaab=_0x208d20===0x0;_0x35e049(_0x5bbaab),_0x33bb2c(_0x45ed81=>[..._0x45ed81,{'step':'api-pull','label':_0x221958(0x101),'value':_0x5bbaab?_0x221958(0x120):'No'}]),_0xe31fd4('confirm-mcp-setup');return;}if(_0x57f794===_0x221958(0x10a)){const _0x548ed2=_0x1a348c===0x0;_0x33bb2c(_0x4aee3f=>[..._0x4aee3f,{'step':_0x221958(0x110),'label':_0x221958(0x106),'value':_0x548ed2?_0x221958(0x120):'No'}]);const _0x804c03=_0x3bd534||_0x39474c||_0x221958(0xf0);_0x4d6945({'projectName':_0x3db248,'appCode':_0x12dd04,'pullApi':_0x3decee,'setupMcp':_0x548ed2,'env':_0x804c03}),_0xe31fd4('creating');return;}if(_0x57f794===_0x221958(0x11b)){const _0x3b8362=_0x24a13e===0x0;if(_0x3b8362){_0xe31fd4(_0x221958(0x122));const _0x57950f=await _0x508469();_0x57950f?(_0x33bb2c(_0x5eb7e2=>[..._0x5eb7e2,{'step':'login','label':_0x221958(0x119),'value':_0x221958(0xe0)}]),_0xe31fd4(_0x221958(0x114))):(_0x33bb2c(_0x1c6848=>[..._0x1c6848,{'step':_0x221958(0x104),'label':_0x221958(0x119),'value':_0x221958(0x117)}]),_0xe31fd4(_0x221958(0x10a)));}else _0x33bb2c(_0x212942=>[..._0x212942,{'step':_0x221958(0x104),'label':_0x221958(0x119),'value':_0x221958(0xea)}]),_0xe31fd4('confirm-mcp-setup');return;}}if(_0x3bcd11[_0x221958(0xf8)]||_0x3bcd11['delete']){_0x67b3fb(_0x402946=>{const _0x112471=_0x221958,_0x5b3941=_0x402946[_0x112471(0xed)](0x0,-0x1);if(_0x57f794===_0x112471(0x112)){const {valid:_0x4102a6,message:_0x47e62d}=_0x2d7c44(_0x5b3941);_0x33e9c8(_0x4102a6?'':_0x47e62d||_0x112471(0x127));if(_0x4102a6&&!_0x5e0d50){const _0x513f0c=_0x5b3941||_0x1044d7;_0x23c137(_0x513f0c)?_0x57250b(_0x112471(0xe6)+_0x513f0c+'\x22\x20already\x20exists'):_0x57250b('');}}else{if(_0x57f794===_0x112471(0xf2)){const {valid:_0x53aa18,message:_0x199d56}=_0x5694e1(_0x5b3941);_0x33e9c8(_0x53aa18?'':_0x199d56||'Invalid\x20AppCode');}}return _0x5b3941;});return;}if([_0x221958(0xf1),_0x221958(0x121),_0x221958(0x122),_0x221958(0x114),_0x221958(0x10a),'login-prompt'][_0x221958(0xfa)](_0x57f794))return;_0x67b3fb(_0x342eb1=>{const _0x594657=_0x221958,_0xdafa06=_0x342eb1+_0x467b38;if(_0x57f794===_0x594657(0x112)){const {valid:_0x360800,message:_0x1fe128}=_0x2d7c44(_0xdafa06);_0x33e9c8(_0x360800?'':_0x1fe128||'Invalid\x20project\x20name');if(_0x360800&&!_0x5e0d50){const _0x80f661=_0xdafa06||_0x1044d7;_0x23c137(_0x80f661)?_0x57250b(_0x594657(0xe6)+_0x80f661+_0x594657(0x12a)):_0x57250b('');}}else{if(_0x57f794==='app-code'){const {valid:_0x34b54b,message:_0xe5aabd}=_0x5694e1(_0xdafa06);_0x33e9c8(_0x34b54b?'':_0xe5aabd||_0x594657(0x109));}}return _0xdafa06;});}),a83_0x237121(Box,{'flexDirection':_0x3a4270(0x103),'marginTop':0x1,'children':[_0x1a58d8[_0x3a4270(0xff)]===0x0&&a83_0x50467d(Box,{'children':a83_0x50467d(Text,{'color':_0x3a4270(0x10e),'children':'*\x20Create\x20new\x20project'})}),_0x1a58d8[_0x3a4270(0xf7)](_0x39c5cc=>a83_0x237121(Box,{'children':[a83_0x50467d(Text,{'color':_0x3a4270(0xeb),'children':'√\x20'+_0x39c5cc['label']+':\x20'}),a83_0x50467d(Text,{'color':_0x3a4270(0x10e),'children':_0x39c5cc[_0x3a4270(0xec)]})]},_0x39c5cc[_0x3a4270(0xe8)])),_0x57f794==='project-name'&&a83_0x237121(a83_0x7e165,{'children':[a83_0x237121(Box,{'children':[a83_0x50467d(Text,{'children':'*\x20Project\x20name:\x20'}),_0x5a4c44?a83_0x50467d(Text,{'color':_0x3a4270(0xeb),'children':_0x5a4c44}):a83_0x50467d(Text,{'color':_0x3a4270(0xdf),'children':_0x1044d7}),_0x5e0d50&&a83_0x237121(Text,{'color':_0x3a4270(0x10b),'children':[_0x3a4270(0xe2),_0x5e0d50]}),_0x3d5422&&a83_0x237121(Text,{'color':_0x3a4270(0x10b),'children':[_0x3a4270(0xe2),_0x3d5422]})]}),!_0x5e0d50&&!_0x3d5422&&!_0x5a4c44&&a83_0x50467d(Box,{'children':a83_0x50467d(Text,{'color':_0x3a4270(0xdf),'children':'Press\x20Enter\x20to\x20confirm\x20or\x20type\x20a\x20custom\x20name'})})]}),_0x57f794===_0x3a4270(0xf2)&&a83_0x237121(a83_0x7e165,{'children':[a83_0x237121(Box,{'children':[a83_0x50467d(Text,{'children':_0x3a4270(0x11e)}),a83_0x50467d(Text,{'color':_0x3a4270(0xdf),'children':_0x3a4270(0xef)}),a83_0x50467d(Text,{'color':_0x3a4270(0xeb),'children':_0x5a4c44}),_0x5e0d50&&a83_0x237121(Text,{'color':_0x3a4270(0x10b),'children':[_0x3a4270(0xe2),_0x5e0d50]})]}),!_0x5e0d50&&a83_0x50467d(Box,{'children':a83_0x50467d(Text,{'color':'gray','children':_0x3a4270(0xfb)})})]}),_0x57f794===_0x3a4270(0x121)&&a83_0x237121(Box,{'children':[a83_0x50467d(Text,{'children':_0x3a4270(0xde)}),_0x1f5ea3&&a83_0x50467d(Text,{'color':_0x3a4270(0xdf),'children':_0x3a4270(0x129)})]}),_0x57f794==='confirm-api-pull'&&a83_0x237121(a83_0x7e165,{'children':[a83_0x50467d(Box,{'children':a83_0x50467d(Text,{'color':'green','children':_0x3a4270(0x108)})}),a83_0x50467d(Box,{'marginTop':0x1,'children':a83_0x50467d(Text,{'children':_0x3a4270(0xfc)})}),a83_0x237121(Box,{'marginLeft':0x2,'children':[a83_0x237121(Text,{'color':_0x208d20===0x0?'green':_0x3a4270(0xdf),'children':[_0x208d20===0x0?'▶\x20':'\x20\x20',_0x3a4270(0x120)]}),a83_0x50467d(Text,{'children':'\x20'}),a83_0x237121(Text,{'color':_0x208d20===0x1?_0x3a4270(0xeb):_0x3a4270(0xdf),'children':[_0x208d20===0x1?'▶\x20':'\x20\x20','No']})]}),a83_0x50467d(Box,{'children':a83_0x50467d(Text,{'color':_0x3a4270(0xdf),'children':_0x3a4270(0xf9)})}),a83_0x50467d(Box,{'children':a83_0x50467d(Text,{'color':_0x3a4270(0xf6),'children':_0x3a4270(0xdc)})})]}),_0x57f794===_0x3a4270(0x10a)&&a83_0x237121(a83_0x7e165,{'children':[a83_0x50467d(Box,{'children':a83_0x50467d(Text,{'color':'green','children':'√'})}),a83_0x50467d(Box,{'marginTop':0x1,'children':a83_0x50467d(Text,{'children':_0x3a4270(0x113)})}),a83_0x237121(Box,{'marginLeft':0x2,'children':[a83_0x237121(Text,{'color':_0x1a348c===0x0?_0x3a4270(0xeb):'gray','children':[_0x1a348c===0x0?'▶\x20':'\x20\x20',_0x3a4270(0x120)]}),a83_0x50467d(Text,{'children':'\x20'}),a83_0x237121(Text,{'color':_0x1a348c===0x1?_0x3a4270(0xeb):_0x3a4270(0xdf),'children':[_0x1a348c===0x1?'▶\x20':'\x20\x20','No']})]}),a83_0x50467d(Box,{'children':a83_0x50467d(Text,{'color':_0x3a4270(0xdf),'children':'\x20\x20Use\x20←→\x20to\x20choose,\x20press\x20Enter\x20to\x20confirm'})}),a83_0x50467d(Box,{'marginTop':0x1,'children':a83_0x50467d(Text,{'color':_0x3a4270(0xdf),'children':_0x3a4270(0x102)})})]}),_0x57f794===_0x3a4270(0x11b)&&a83_0x237121(a83_0x7e165,{'children':[a83_0x50467d(Box,{'children':a83_0x50467d(Text,{'color':_0x3a4270(0xf6),'children':_0x3a4270(0xe9)})}),a83_0x50467d(Box,{'marginTop':0x1,'children':a83_0x50467d(Text,{'children':_0x3a4270(0x128)})}),a83_0x237121(Box,{'marginLeft':0x2,'children':[a83_0x237121(Text,{'color':_0x24a13e===0x0?'green':_0x3a4270(0xdf),'children':[_0x24a13e===0x0?'▶\x20':'\x20\x20',_0x3a4270(0x120)]}),a83_0x50467d(Text,{'children':'\x20'}),a83_0x237121(Text,{'color':_0x24a13e===0x1?_0x3a4270(0xeb):'gray','children':[_0x24a13e===0x1?'▶\x20':'\x20\x20','No']})]}),a83_0x50467d(Box,{'children':a83_0x50467d(Text,{'color':_0x3a4270(0xdf),'children':_0x3a4270(0xf9)})})]}),_0x57f794===_0x3a4270(0x122)&&a83_0x237121(Box,{'children':[a83_0x50467d(Text,{'children':_0x3a4270(0x111)}),_0xb02d07&&a83_0x50467d(Text,{'color':_0x3a4270(0xdf),'children':_0x3a4270(0x124)})]}),_0x57f794===_0x3a4270(0xf1)&&a83_0x50467d(Box,{'children':a83_0x50467d(Text,{'color':_0x3a4270(0xeb),'children':_0x3a4270(0x125)})})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x2a9733,_0x3850bc){const _0x4edf95=a84_0x1b69,_0x35a323=_0x2a9733();while(!![]){try{const _0x259285=-parseInt(_0x4edf95(0x1df))/0x1+-parseInt(_0x4edf95(0x1d8))/0x2+-parseInt(_0x4edf95(0x1db))/0x3+-parseInt(_0x4edf95(0x1dc))/0x4+-parseInt(_0x4edf95(0x1dd))/0x5+-parseInt(_0x4edf95(0x1e0))/0x6+parseInt(_0x4edf95(0x1d9))/0x7;if(_0x259285===_0x3850bc)break;else _0x35a323['push'](_0x35a323['shift']());}catch(_0x477634){_0x35a323['push'](_0x35a323['shift']());}}}(a84_0x290a,0x41fdc));function a84_0x1b69(_0x758c32,_0x318e27){_0x758c32=_0x758c32-0x1d8;const _0x290a0c=a84_0x290a();let _0x1b69b4=_0x290a0c[_0x758c32];return _0x1b69b4;}export function formatElapsed(_0xc4c148){const _0x3344c6=a84_0x1b69,_0x480416=Date['now']()-_0xc4c148;if(_0x480416<0x3e8)return _0x480416+'ms';const _0x275bb7=(_0x480416/0x3e8)[_0x3344c6(0x1da)](0x2),_0x3e1018=_0x275bb7[_0x3344c6(0x1de)](/\.?0+$/u,'');return _0x3e1018+'s';}function a84_0x290a(){const _0x36fbf0=['replace','320077ZgWfxB','3028836eJTKEc','493794YBYnMx','17440122cceltW','toFixed','1510320YxfXmr','1254048AYRQlY','1662070rrSoop'];a84_0x290a=function(){return _0x36fbf0;};return a84_0x290a();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a85_0x3800(){const _0x27d485=['appCode','production','项目创建完成:\x20','4615263kThfNH','Project\x20name:\x20','pullApi','string','\x20MCP\x20Cursor:\x20','Skills\x20安装异常,继续配置\x20MCP','*\x20Installing\x20AI\x20Skills\x20via\x20npx\x20skills...','length','warn','配置应用AppCode:\x20','574760ZFynIf','配置应用AppCode失败','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','!\x20API\x20configuration\x20pull\x20error,\x20project\x20created,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','更新\x20package.json\x20name','6wCaVvX','error','32924mojZSt','√\x20Lovrabet\x20MCP\x20and\x20Skill\x20configuration\x20completed','constants','column','API\x20配置拉取成功:\x20','red','doTask','清理项目目录失败:\x20','cd\x20','\x20\x20✗\x20MCP\x20Cursor:\x20','*\x20Configuring\x20AppCode\x20for\x20project\x20','*\x20Pulling\x20API\x20configuration...','trim','test','232966zaUblK','push','255adEOBH','cwd','\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name','message','Project\x20directory\x20','create','status','302015CSHuGp','2.\x20','\x20&&\x20rabetbase\x20start','5516710skujQr','readFileSync','rabetbase\x20api\x20pull','utf8','\x20√\x20','rmSync','🚀\x20Next\x20Steps:','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','accessSync','manual','setupMcp','rabetbase\x20mcp\x20install','then','CLI\x20版本检查','*\x20Configuring\x20MCP...','toLocaleString','setLogPath','log','stringify','parse','\x20|\x20AppCode:\x20','green','7xILlce','env','repeat','white','join','mcp-','Cursor','version','writeFileSync','5922433kgEUEm','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','√\x20API\x20configuration\x20pulled\x20successfully','×\x20Project\x20creation\x20failed:\x20','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','更新\x20package.json\x20失败','resolve','projectCode','!\x20API\x20configuration\x20pull\x20failed,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull','info','W_OK','Project\x20name\x20cannot\x20be\x20empty','success','projectName','currentVersion','yellow','1.0.0','6KlNOPd','cyan','Pull\x20API\x20configuration:','dirname','existsSync','needsUpgrade','Skills\x20installed\x20and\x20MCP\x20configured','Install\x20AI\x20Skills:\x20','name','Start\x20project:'];a85_0x3800=function(){return _0x27d485;};return a85_0x3800();}(function(_0x4b0af3,_0x411387){const _0xed20c7=a85_0x3480,_0x1f958a=_0x4b0af3();while(!![]){try{const _0x158ee0=-parseInt(_0xed20c7(0xee))/0x1*(parseInt(_0xed20c7(0x11a))/0x2)+-parseInt(_0xed20c7(0x11c))/0x3*(-parseInt(_0xed20c7(0x10c))/0x4)+-parseInt(_0xed20c7(0x123))/0x5*(-parseInt(_0xed20c7(0x10a))/0x6)+parseInt(_0xed20c7(0x13c))/0x7*(-parseInt(_0xed20c7(0x105))/0x8)+parseInt(_0xed20c7(0xfb))/0x9+-parseInt(_0xed20c7(0x126))/0xa+parseInt(_0xed20c7(0x145))/0xb;if(_0x158ee0===_0x411387)break;else _0x1f958a['push'](_0x1f958a['shift']());}catch(_0x5ae4de){_0x1f958a['push'](_0x1f958a['shift']());}}}(a85_0x3800,0x77582));import{jsx as a85_0x142688,Fragment as a85_0x35f1d6,jsxs as a85_0x189314}from'react/jsx-runtime';import a85_0x56b060 from'path';import a85_0x35490f from'fs';import{fileURLToPath}from'node:url';import{Box,Text}from'ink';import{useEffect,useState}from'react';import{EnhancedGuidedCreate}from'./enhanced-guided-create.js';import{pullApiSilent}from'../api/pull-silent.js';import{readConfig}from'../utils/config.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{useCopyProjectTemplate}from'./use-copy-project-template.js';function a85_0x3480(_0x4a8a10,_0xa122d9){_0x4a8a10=_0x4a8a10-0xee;const _0x380089=a85_0x3800();let _0x34803b=_0x380089[_0x4a8a10];return _0x34803b;}import{useInstallDependencies}from'./use-install-dependencies.js';import{useFormatCode}from'./use-format-code.js';import{TaskFinished}from'./task-finished.js';import{TaskRunning}from'./task-running.js';import{logger}from'../utils/logger.js';import{configureMcp}from'../ai-setup/config.js';import{runNpxSkillsAdd,NPX_SKILLS_ADD_COMMAND_LINE}from'../skills/npx-skills-add.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export function CreateApp(_0x1f9262){const _0x768161=a85_0x3480,[_0x5725ca,_0xeb6cba]=useState(![]),[_0x11e332,_0x20ef9c]=useState(![]),[_0x17ed5b,_0x315dbb]=useState(null),[_0x489161,_0x78e05d]=useState(null),[_0x17834d,_0x324b4b]=useState(![]),_0xd89687=useCopyProjectTemplate(),_0x291a8d=useInstallDependencies(),_0x3e12d1=useFormatCode();useEffect(()=>{const _0x528aa3=a85_0x3480;checkCliVersion()[_0x528aa3(0x132)](_0x3f178d=>{const _0x739b21=_0x528aa3;_0x3f178d[_0x739b21(0xf3)]&&(printCliUpgradeWarning(_0x3f178d),logger[_0x739b21(0x14e)](_0x739b21(0x121),_0x739b21(0x133),{'currentVersion':_0x3f178d[_0x739b21(0x153)],'stableVersion':_0x3f178d['stableVersion'],'needsUpgrade':_0x3f178d['needsUpgrade']}));});},[]);const _0x3a4bd3=async _0x552d81=>{const _0x1c598c=a85_0x3480;if(!_0x552d81['projectName']||_0x552d81[_0x1c598c(0x152)][_0x1c598c(0x118)]()===''){console[_0x1c598c(0x10b)](_0x1c598c(0x150));return;}const _0x11403a=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x11403a[_0x1c598c(0x119)](_0x552d81[_0x1c598c(0x152)])){console[_0x1c598c(0x10b)]('Project\x20name\x20contains\x20invalid\x20characters.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');return;}if(_0x552d81['projectName'][_0x1c598c(0x102)]>0x64){console[_0x1c598c(0x10b)](_0x1c598c(0x12d));return;}const _0x1acb3a=a85_0x56b060[_0x1c598c(0x14b)](process[_0x1c598c(0x11d)](),_0x552d81[_0x1c598c(0x152)]);if(a85_0x35490f[_0x1c598c(0xf2)](_0x1acb3a)){console['error'](_0x1c598c(0x120)+_0x552d81[_0x1c598c(0x152)]+_0x1c598c(0x11e));return;}try{const _0x49aba9=a85_0x56b060[_0x1c598c(0xf1)](_0x1acb3a);a85_0x35490f[_0x1c598c(0x12e)](_0x49aba9,a85_0x35490f[_0x1c598c(0x10e)][_0x1c598c(0x14f)]);}catch(_0x47c343){console[_0x1c598c(0x10b)](_0x1c598c(0x149));return;}_0x315dbb(_0x552d81),_0xeb6cba(!![]),logger[_0x1c598c(0x136)](_0x1acb3a),logger['info'](_0x1c598c(0x121),'开始创建项目:\x20'+_0x552d81[_0x1c598c(0x152)],{'projectDir':_0x1acb3a,'appCode':_0x552d81[_0x1c598c(0xf8)]});try{await _0xd89687['doTask'](_0x552d81[_0x1c598c(0x152)]),await _0x4548e3(_0x552d81[_0x1c598c(0x152)]),await _0x291a8d[_0x1c598c(0x112)](_0x552d81[_0x1c598c(0x152)]),await _0x3e12d1[_0x1c598c(0x112)](_0x552d81[_0x1c598c(0x152)]),await _0xaca8ee(_0x552d81[_0x1c598c(0x152)],_0x552d81[_0x1c598c(0xf8)]||'',_0x552d81[_0x1c598c(0x13d)]);if(_0x552d81[_0x1c598c(0xfd)]&&_0x552d81[_0x1c598c(0xf8)]){console[_0x1c598c(0x137)](_0x1c598c(0x117));try{const _0x3f43f3=await pullApiSilent(_0x552d81[_0x1c598c(0xf8)],undefined,_0x1acb3a,_0x552d81[_0x1c598c(0x13d)]);_0x3f43f3?(console[_0x1c598c(0x137)](_0x1c598c(0x147)),logger[_0x1c598c(0x14e)]('create',_0x1c598c(0x110)+_0x552d81[_0x1c598c(0xf8)])):(console[_0x1c598c(0x137)](_0x1c598c(0x14d)),logger[_0x1c598c(0x103)]('create','API\x20配置拉取失败:\x20'+_0x552d81[_0x1c598c(0xf8)]));}catch(_0x34ee54){console[_0x1c598c(0x137)](_0x1c598c(0x108)),logger[_0x1c598c(0x103)](_0x1c598c(0x121),'API\x20配置拉取异常',{'error':_0x34ee54 instanceof Error?_0x34ee54[_0x1c598c(0x11f)]:String(_0x34ee54)});}}const _0x53c98d=[];let _0x252b2d=![];if(_0x552d81[_0x1c598c(0x130)]&&_0x552d81[_0x1c598c(0xf8)]){console[_0x1c598c(0x137)](_0x1c598c(0x101));try{const _0x1f2e32=runNpxSkillsAdd(_0x1acb3a,{'stdio':'inherit'});_0x252b2d=_0x1f2e32['ok'],_0x1f2e32['skipped']&&console[_0x1c598c(0x137)]('\x20\x20(Skipped\x20npx;\x20assuming\x20skills\x20are\x20already\x20installed)');}catch(_0x42bd90){logger[_0x1c598c(0x103)](_0x1c598c(0x121),_0x1c598c(0x100),{'error':_0x42bd90 instanceof Error?_0x42bd90[_0x1c598c(0x11f)]:String(_0x42bd90)});}console[_0x1c598c(0x137)](_0x1c598c(0x134));const _0xcf4ef8='cursor';try{const _0x1d941f=await configureMcp(_0xcf4ef8,_0x1acb3a);_0x53c98d['push']({'ide':_0x1c598c(0x142),'status':_0x1d941f[_0x1c598c(0x122)],'message':_0x1d941f[_0x1c598c(0x11f)]}),console[_0x1c598c(0x137)]('\x20\x20'+(_0x1d941f['status']==='success'?'✓':_0x1d941f[_0x1c598c(0x122)]===_0x1c598c(0x12f)?'⚠️':'✗')+_0x1c598c(0xff)+_0x1d941f[_0x1c598c(0x11f)]);}catch(_0x383ddc){_0x53c98d[_0x1c598c(0x11b)]({'ide':_0x1c598c(0x142),'status':_0x1c598c(0x10b),'message':_0x383ddc instanceof Error?_0x383ddc[_0x1c598c(0x11f)]:String(_0x383ddc)}),console['log'](_0x1c598c(0x115)+(_0x383ddc instanceof Error?_0x383ddc['message']:String(_0x383ddc)));}}_0x324b4b(_0x252b2d),_0x78e05d(_0x53c98d[_0x1c598c(0x102)]>0x0?_0x53c98d:null),console[_0x1c598c(0x137)](_0x1c598c(0x10d)),logger[_0x1c598c(0x151)](_0x1c598c(0x121),_0x1c598c(0xfa)+_0x552d81[_0x1c598c(0x152)]),_0x20ef9c(!![]),_0xeb6cba(![]);}catch(_0x161ea3){logger['error'](_0x1c598c(0x121),'项目创建失败:\x20'+_0x552d81['projectName'],{'error':_0x161ea3 instanceof Error?_0x161ea3['message']:String(_0x161ea3)});try{a85_0x35490f[_0x1c598c(0xf2)](_0x1acb3a)&&(console[_0x1c598c(0x137)](_0x1c598c(0x107)+_0x1acb3a),a85_0x35490f[_0x1c598c(0x12b)](_0x1acb3a,{'recursive':!![],'force':!![]}));}catch(_0xbe8e8){logger[_0x1c598c(0x103)]('create',_0x1c598c(0x113)+_0x1acb3a);}_0xeb6cba(![]),console['error'](_0x1c598c(0x148)+(_0x161ea3 instanceof Error?_0x161ea3[_0x1c598c(0x11f)]:String(_0x161ea3)));}},_0x33c1b5=async _0x423236=>{const _0x4287b1=a85_0x3480;await _0x3a4bd3({'projectName':_0x423236,'env':_0x1f9262[_0x4287b1(0x13d)]});},_0x4548e3=async _0x412b83=>{const _0x4de89a=a85_0x3480,_0x5b345e=a85_0x56b060[_0x4de89a(0x14b)](process[_0x4de89a(0x11d)](),_0x412b83),_0x33cc04=a85_0x56b060[_0x4de89a(0x140)](_0x5b345e,'package.json');try{console[_0x4de89a(0x137)]('*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields');const _0x2cdd4f=fileURLToPath(import.meta.url),_0x542284=a85_0x56b060[_0x4de89a(0x14b)](a85_0x56b060[_0x4de89a(0xf1)](_0x2cdd4f),'../..'),_0x452a42=a85_0x56b060[_0x4de89a(0x140)](_0x542284,'package.json');let _0x49d54a='1.0.0';try{const _0x58d29c=JSON['parse'](a85_0x35490f[_0x4de89a(0x127)](_0x452a42,'utf8'));_0x49d54a=_0x58d29c[_0x4de89a(0x143)]||_0x4de89a(0x155);}catch(_0x544b77){}const _0xfead8f=a85_0x35490f[_0x4de89a(0x127)](_0x33cc04,'utf8'),_0x3db490=JSON['parse'](_0xfead8f);_0x3db490[_0x4de89a(0xf6)]=_0x412b83,_0x3db490['description']=_0x412b83+'\x20Generated\x20by\x20rabetbase\x20cli\x20'+_0x49d54a,a85_0x35490f[_0x4de89a(0x144)](_0x33cc04,JSON[_0x4de89a(0x138)](_0x3db490,null,0x2)+'\x0a','utf8'),console[_0x4de89a(0x137)]('√\x20package.json\x20updated:\x20name='+_0x412b83),logger['info'](_0x4de89a(0x121),_0x4de89a(0x109));}catch(_0x2eee10){logger['error'](_0x4de89a(0x121),_0x4de89a(0x14a));throw _0x2eee10;}},_0xaca8ee=async(_0x53529d,_0x53cbcf,_0xe80d8c)=>{const _0x12c1b2=a85_0x3480,_0x26ba0f=a85_0x56b060[_0x12c1b2(0x14b)](process[_0x12c1b2(0x11d)](),_0x53529d),_0x3b2501=a85_0x56b060[_0x12c1b2(0x140)](_0x26ba0f,NEW_CONFIG_NAME);try{_0x53cbcf?console[_0x12c1b2(0x137)](_0x12c1b2(0x116)+_0x53529d+':\x20'+_0x53cbcf):console['log'](_0x12c1b2(0x146)+_0x53529d);const _0x49bf8c=fileURLToPath(import.meta.url),_0x5e9059=a85_0x56b060['resolve'](a85_0x56b060[_0x12c1b2(0xf1)](_0x49bf8c),'../..'),_0x25b82a=a85_0x56b060[_0x12c1b2(0x140)](_0x5e9059,'package.json');let _0x7260fd=_0x12c1b2(0x155);try{const _0x50aa0c=JSON[_0x12c1b2(0x139)](a85_0x35490f['readFileSync'](_0x25b82a,_0x12c1b2(0x129)));_0x7260fd=_0x50aa0c['version']||_0x12c1b2(0x155);}catch{}const _0x45af20=readConfig(),_0x49bc61=typeof _0x45af20[_0x12c1b2(0x13d)]===_0x12c1b2(0xfe)?_0x45af20['env']:undefined,{app:_0x5c4695,appcode:_0x136de8,..._0x5df7c6}=_0x45af20,_0x2055ff={..._0x5df7c6,'appcode':_0x53cbcf||'','env':_0xe80d8c||_0x49bc61||_0x12c1b2(0xf9),'createdAt':new Date()[_0x12c1b2(0x135)](),'version':_0x7260fd};writeConfigFile(_0x3b2501,_0x2055ff),_0x53cbcf?console['log']('√\x20Configuration\x20file\x20created,\x20AppCode:\x20'+_0x53cbcf):console[_0x12c1b2(0x137)]('√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27rabetbase\x20config\x20set\x20appcode\x20<app-code>\x27'),logger[_0x12c1b2(0x14e)](_0x12c1b2(0x121),_0x12c1b2(0x104)+_0x53cbcf);}catch(_0x2bf342){logger[_0x12c1b2(0x10b)](_0x12c1b2(0x121),_0x12c1b2(0x106));}};useEffect(()=>{const _0x73d168=a85_0x3480;_0x1f9262[_0x73d168(0x14c)]&&_0x33c1b5(_0x1f9262[_0x73d168(0x14c)]);},[_0x1f9262[_0x768161(0x14c)]]);if(!_0x5725ca&&!_0x11e332&&!_0x1f9262[_0x768161(0x14c)])return a85_0x142688(EnhancedGuidedCreate,{'onCreate':_0x3a4bd3,'env':_0x1f9262['env']});if(_0x5725ca)return a85_0x189314(a85_0x35f1d6,{'children':[a85_0x189314(Box,{'marginTop':0x1,'children':[a85_0x142688(Box,{'width':'1'}),a85_0x142688(Text,{'color':'green','children':_0x768161(0x12a)}),a85_0x142688(Text,{'children':_0x768161(0xfc)}),a85_0x142688(Text,{'color':_0x768161(0x13b),'children':_0x17ed5b?.[_0x768161(0x152)]}),_0x17ed5b?.[_0x768161(0xf8)]&&a85_0x189314(a85_0x35f1d6,{'children':[a85_0x142688(Text,{'children':_0x768161(0x13a)}),a85_0x142688(Text,{'color':'cyan','children':_0x17ed5b['appCode']})]})]}),a85_0x142688(TaskRunning,{..._0xd89687}),a85_0x142688(TaskRunning,{..._0x291a8d}),a85_0x142688(TaskRunning,{..._0x3e12d1})]});if(_0x11e332){const _0x18dba2=_0x489161&&_0x489161['length']>0x0,_0x2038e4=_0x18dba2||_0x17834d;let _0x2e3358=0x1;const _0x397e5c=_0x2038e4?_0x2e3358++:_0x2e3358+0x2,_0x4db79a=_0x2038e4?_0x2e3358:_0x2e3358+0x3;return a85_0x189314(a85_0x35f1d6,{'children':[a85_0x189314(Box,{'marginTop':0x1,'children':[a85_0x142688(Box,{'width':'1'}),a85_0x142688(Text,{'color':_0x768161(0x13b),'children':'\x20√\x20'}),a85_0x142688(Text,{'children':_0x768161(0xfc)}),a85_0x142688(Text,{'color':'green','children':_0x17ed5b?.[_0x768161(0x152)]}),_0x17ed5b?.[_0x768161(0xf8)]&&a85_0x189314(a85_0x35f1d6,{'children':[a85_0x142688(Text,{'children':_0x768161(0x13a)}),a85_0x142688(Text,{'color':_0x768161(0xef),'children':_0x17ed5b[_0x768161(0xf8)]})]})]}),a85_0x142688(TaskFinished,{..._0xd89687}),a85_0x142688(TaskFinished,{..._0x291a8d}),a85_0x142688(TaskFinished,{..._0x3e12d1}),_0x18dba2&&a85_0x189314(a85_0x35f1d6,{'children':[a85_0x142688(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a85_0x142688(Text,{'color':_0x768161(0x13b),'children':'─'[_0x768161(0x13e)](0x3c)})}),a85_0x142688(Box,{'marginTop':0x1,'children':a85_0x142688(Text,{'color':_0x768161(0x13b),'bold':!![],'children':_0x768161(0xf4)})}),_0x489161['map']((_0x1d5919,_0x4a3a8f)=>a85_0x142688(Box,{'marginLeft':0x2,'children':a85_0x189314(Text,{'color':_0x1d5919[_0x768161(0x122)]===_0x768161(0x151)?_0x768161(0x13f):_0x1d5919['status']==='manual'?_0x768161(0x154):_0x768161(0x111),'children':[_0x1d5919['ide'],':\x20',_0x1d5919[_0x768161(0x11f)]]})},_0x768161(0x141)+_0x4a3a8f))]}),a85_0x142688(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a85_0x142688(Text,{'color':'green','children':'─'[_0x768161(0x13e)](0x3c)})}),a85_0x142688(Box,{'marginTop':0x1,'marginBottom':0x1,'children':a85_0x142688(Text,{'color':'cyan','bold':!![],'children':_0x768161(0x12c)})}),a85_0x189314(Box,{'marginLeft':0x2,'flexDirection':_0x768161(0x10f),'children':[!_0x2038e4&&a85_0x189314(a85_0x35f1d6,{'children':[a85_0x189314(Box,{'children':[a85_0x142688(Text,{'color':_0x768161(0x13b),'children':'1.\x20'}),a85_0x142688(Text,{'color':_0x768161(0x13f),'children':_0x768161(0xf5)}),a85_0x142688(Text,{'color':_0x768161(0xef),'bold':!![],'children':NPX_SKILLS_ADD_COMMAND_LINE})]}),_0x17ed5b?.[_0x768161(0xf8)]&&a85_0x189314(Box,{'marginTop':0x1,'children':[a85_0x142688(Text,{'color':'yellow','children':_0x768161(0x124)}),a85_0x142688(Text,{'color':'white','children':'Configure\x20MCP\x20server:\x20'}),a85_0x142688(Text,{'color':_0x768161(0xef),'bold':!![],'children':_0x768161(0x131)})]})]}),a85_0x189314(Box,{'marginTop':_0x2038e4?0x0:0x1,'children':[a85_0x189314(Text,{'color':_0x2038e4?_0x768161(0x13b):_0x768161(0x154),'children':[_0x2038e4?'1':_0x17ed5b?.[_0x768161(0xf8)]?'3':'2','.','\x20']}),a85_0x142688(Text,{'color':'white','children':_0x768161(0xf7)}),a85_0x142688(Text,{'color':'cyan','bold':!![],'children':_0x768161(0x114)+_0x17ed5b?.[_0x768161(0x152)]+_0x768161(0x125)})]}),_0x17ed5b?.[_0x768161(0xf8)]&&!_0x17ed5b?.[_0x768161(0xfd)]&&a85_0x189314(Box,{'children':[a85_0x189314(Text,{'color':_0x2038e4?_0x768161(0x13b):_0x768161(0x154),'children':[_0x2038e4?'2':'4','.','\x20']}),a85_0x142688(Text,{'color':_0x768161(0x13f),'children':_0x768161(0xf0)}),a85_0x142688(Text,{'color':_0x768161(0xef),'bold':!![],'children':_0x768161(0x128)})]})]}),a85_0x142688(Box,{'marginTop':0x1,'children':a85_0x142688(Text,{'color':_0x768161(0x13b),'children':'─'['repeat'](0x3c)})})]});}return null;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0xfc5a5f,_0x3098d2){const _0x2e5286=a86_0x195b,_0x5ae7c3=_0xfc5a5f();while(!![]){try{const _0x2fcd24=parseInt(_0x2e5286(0x1f0))/0x1+-parseInt(_0x2e5286(0x1f9))/0x2+parseInt(_0x2e5286(0x1f8))/0x3*(-parseInt(_0x2e5286(0x1e0))/0x4)+parseInt(_0x2e5286(0x1d9))/0x5*(-parseInt(_0x2e5286(0x20a))/0x6)+-parseInt(_0x2e5286(0x1ef))/0x7*(parseInt(_0x2e5286(0x20d))/0x8)+-parseInt(_0x2e5286(0x1d7))/0x9*(-parseInt(_0x2e5286(0x202))/0xa)+parseInt(_0x2e5286(0x20b))/0xb*(parseInt(_0x2e5286(0x1fb))/0xc);if(_0x2fcd24===_0x3098d2)break;else _0x5ae7c3['push'](_0x5ae7c3['shift']());}catch(_0x587e6a){_0x5ae7c3['push'](_0x5ae7c3['shift']());}}}(a86_0x3e8d,0xc62df));import a86_0x2aaa6c from'path';import{fileURLToPath}from'url';import a86_0x44e2b3 from'fs/promises';import{existsSync}from'fs';import{copyDirectory}from'../utils/copy-directory.js';import{exec}from'child_process';function a86_0x195b(_0x595d91,_0x10ca03){_0x595d91=_0x595d91-0x1d7;const _0x3e8d24=a86_0x3e8d();let _0x195b7a=_0x3e8d24[_0x595d91];return _0x195b7a;}import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';const execAsync=promisify(exec);function getTemplateDir(){const _0x3c4377=a86_0x195b,_0x88bc46=fileURLToPath(import.meta.url),_0x3e01bc=a86_0x2aaa6c[_0x3c4377(0x205)](_0x88bc46);return a86_0x2aaa6c[_0x3c4377(0x1e3)](_0x3e01bc,_0x3c4377(0x1f4));}export async function createProjectNonInteractive(_0x4f2f15,_0x139e01){const _0x4441ef=a86_0x195b,_0x173051=await checkCliVersion();_0x173051[_0x4441ef(0x1e2)]&&printCliUpgradeWarning(_0x173051);(!_0x4f2f15||_0x4f2f15[_0x4441ef(0x207)]()==='')&&(console['error']('Project\x20name\x20cannot\x20be\x20empty'),process[_0x4441ef(0x1f1)](0x1));const _0x5f54d6=/[<>:"|?*\x00-\x1f\x7f]/;_0x5f54d6[_0x4441ef(0x206)](_0x4f2f15)&&(console[_0x4441ef(0x1f7)](_0x4441ef(0x1ed)),process[_0x4441ef(0x1f1)](0x1));_0x4f2f15[_0x4441ef(0x1fa)]>0x64&&(console[_0x4441ef(0x1f7)]('Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters'),process[_0x4441ef(0x1f1)](0x1));const _0x9ea18c=a86_0x2aaa6c[_0x4441ef(0x1e3)](process[_0x4441ef(0x1e9)](),_0x4f2f15);existsSync(_0x9ea18c)&&(console[_0x4441ef(0x1f7)](_0x4441ef(0x1eb)+_0x4f2f15+_0x4441ef(0x1f6)),process[_0x4441ef(0x1f1)](0x1));try{const _0x1e8227=a86_0x2aaa6c[_0x4441ef(0x205)](_0x9ea18c);await a86_0x44e2b3['access'](_0x1e8227,a86_0x44e2b3['constants'][_0x4441ef(0x1fe)]);}catch(_0x269f4a){console[_0x4441ef(0x1f7)](_0x4441ef(0x1ee)),process[_0x4441ef(0x1f1)](0x1);}try{console[_0x4441ef(0x208)](_0x4441ef(0x1e4)+_0x4f2f15+_0x4441ef(0x200));const _0x41806e=getTemplateDir();await copyDirectory(_0x41806e,_0x9ea18c),console[_0x4441ef(0x208)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x4f2f15),console[_0x4441ef(0x208)](_0x4441ef(0x1dc)),console['log']('\x20\x20Installing\x20dependencies...'),console['log'](_0x4441ef(0x209)),await formatCode(_0x9ea18c),console[_0x4441ef(0x208)](_0x4441ef(0x1fd)),await configureAppEnv(_0x4f2f15,_0x139e01),console[_0x4441ef(0x208)](_0x4441ef(0x1ff)),console[_0x4441ef(0x208)](_0x4441ef(0x1db)+_0x4f2f15+_0x4441ef(0x204)),console[_0x4441ef(0x208)](_0x4441ef(0x1e5)+_0x4f2f15),console[_0x4441ef(0x208)](_0x4441ef(0x1f3));}catch(_0x2fe773){const _0x4dce39=_0x2fe773 instanceof Error?_0x2fe773[_0x4441ef(0x201)]:String(_0x2fe773);try{existsSync(_0x9ea18c)&&await a86_0x44e2b3['rm'](_0x9ea18c,{'recursive':!![],'force':!![]});}catch{}console['error'](_0x4441ef(0x1f2)+_0x4dce39),process[_0x4441ef(0x1f1)](0x1);}}function a86_0x3e8d(){const _0x54a1f1=['\x0a√\x20Project\x20','\x20\x20√\x20package.json\x20updated','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','bun\x20run\x20format','bun\x20--version','16TwQfPL','npm','needsUpgrade','resolve','*\x20Creating\x20project\x20','\x0a\x20\x20cd\x20','package.json','readFile','rabetbase.config.json','cwd','join','Project\x20directory\x20','utf-8','Project\x20name\x20contains\x20invalid\x20characters.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','532DeRXig','545151ISSrqG','exit','×\x20Project\x20creation\x20failed:\x20','\x20\x20rabetbase\x20start\x0a','../../templates/projects/sub-app-react-demo','stringify','\x20already\x20exists,\x20please\x20use\x20a\x20different\x20name','error','810960alUrey','1252006HkhUcv','length','19511508KcoWtl','writeFile','\x20\x20√\x20Code\x20formatted','W_OK','\x20\x20√\x20Environment\x20configured','...','message','1168490lssrKy','依赖安装失败:\x20','\x20created\x20successfully!','dirname','test','trim','log','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','225486Bdjxpq','22GLQyxO','env','116048zSEHQA','bun','27uytCHm','parse','70FselYN','\x20install'];a86_0x3e8d=function(){return _0x54a1f1;};return a86_0x3e8d();}async function updatePackageJsonName(_0x17a973){const _0x3c2538=a86_0x195b,_0x313fa8=a86_0x2aaa6c[_0x3c2538(0x1e3)](process[_0x3c2538(0x1e9)](),_0x17a973),_0x14da77=a86_0x2aaa6c['join'](_0x313fa8,_0x3c2538(0x1e6)),_0x6312af=await a86_0x44e2b3[_0x3c2538(0x1e7)](_0x14da77,_0x3c2538(0x1ec)),_0x16748d=JSON[_0x3c2538(0x1d8)](_0x6312af);_0x16748d['name']=_0x17a973,_0x16748d['description']=_0x3c2538(0x1dd),await a86_0x44e2b3[_0x3c2538(0x1fc)](_0x14da77,JSON[_0x3c2538(0x1f5)](_0x16748d,null,0x2)+'\x0a');}async function installDependencies(_0x1b7b94){const _0x4decf6=a86_0x195b,_0x11b31a=detectPackageManager(),_0x235f79=_0x11b31a+_0x4decf6(0x1da);try{await execAsync(_0x235f79,{'cwd':_0x1b7b94});}catch(_0x86a031){throw new Error(_0x4decf6(0x203)+_0x86a031);}}function detectPackageManager(){const _0x3160f9=a86_0x195b;try{return execAsync(_0x3160f9(0x1df),{}),_0x3160f9(0x20e);}catch{return _0x3160f9(0x1e1);}}async function formatCode(_0x9f4fa3){const _0x4f67ac=a86_0x195b;try{await execAsync(_0x4f67ac(0x1de),{'cwd':_0x9f4fa3});}catch{}}async function configureAppEnv(_0x3fe53b,_0x370a32){const _0x199196=a86_0x195b,_0xfde5cc=a86_0x2aaa6c[_0x199196(0x1e3)](process[_0x199196(0x1e9)](),_0x3fe53b),_0x178669=a86_0x2aaa6c[_0x199196(0x1ea)](_0xfde5cc,_0x199196(0x1e8));let _0xa5e80c={};if(existsSync(_0x178669)){const _0x321a47=await a86_0x44e2b3['readFile'](_0x178669,_0x199196(0x1ec));_0xa5e80c=JSON[_0x199196(0x1d8)](_0x321a47);}_0x370a32&&(_0xa5e80c[_0x199196(0x20c)]=_0x370a32),await a86_0x44e2b3[_0x199196(0x1fc)](_0x178669,JSON[_0x199196(0x1f5)](_0xa5e80c,null,0x2)+'\x0a');}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a87_0x1f5f(_0x2e630d,_0x271cce){_0x2e630d=_0x2e630d-0x157;var _0x3cc9c3=a87_0x3cc9();var _0x1f5fc2=_0x3cc9c3[_0x2e630d];return _0x1f5fc2;}function a87_0x3cc9(){var _0x590b75=['818412OTvLjh','taskName','40MTXxSK','68751UGLDYI','elapsed','24371HbGaTX','51954ZZnkBw','35vVLWmZ','91575ptoJPz','719608xnbQQG','795904YEtFku','18hNXIBH','green'];a87_0x3cc9=function(){return _0x590b75;};return a87_0x3cc9();}(function(_0x4cfe27,_0x385ec0){var _0x4296be=a87_0x1f5f,_0x5c0190=_0x4cfe27();while(!![]){try{var _0x317098=-parseInt(_0x4296be(0x158))/0x1+-parseInt(_0x4296be(0x15e))/0x2*(-parseInt(_0x4296be(0x163))/0x3)+-parseInt(_0x4296be(0x15d))/0x4+parseInt(_0x4296be(0x15a))/0x5*(parseInt(_0x4296be(0x159))/0x6)+parseInt(_0x4296be(0x160))/0x7+-parseInt(_0x4296be(0x15c))/0x8+parseInt(_0x4296be(0x15b))/0x9*(parseInt(_0x4296be(0x162))/0xa);if(_0x317098===_0x385ec0)break;else _0x5c0190['push'](_0x5c0190['shift']());}catch(_0x539192){_0x5c0190['push'](_0x5c0190['shift']());}}}(a87_0x3cc9,0x1b250));import{jsx as a87_0x11ec7e,jsxs as a87_0x3347b3}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskTime}from'./task-time.js';export function TaskFinished(_0x365870){var _0x3c1e30=a87_0x1f5f;return a87_0x3347b3(Box,{'children':[a87_0x11ec7e(Box,{'width':'1'}),a87_0x11ec7e(Text,{'color':_0x3c1e30(0x15f),'children':'\x20√\x20'}),a87_0x11ec7e(Text,{'children':_0x365870[_0x3c1e30(0x161)]}),a87_0x11ec7e(TaskTime,{'elapsed':_0x365870[_0x3c1e30(0x157)]})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x1e5c3a,_0x47f11b){var _0x37d0dc=a88_0x485e,_0x40e49f=_0x1e5c3a();while(!![]){try{var _0x1853f3=-parseInt(_0x37d0dc(0x91))/0x1*(-parseInt(_0x37d0dc(0x98))/0x2)+-parseInt(_0x37d0dc(0x92))/0x3+-parseInt(_0x37d0dc(0x95))/0x4+-parseInt(_0x37d0dc(0x97))/0x5+-parseInt(_0x37d0dc(0x99))/0x6*(parseInt(_0x37d0dc(0x9b))/0x7)+parseInt(_0x37d0dc(0x90))/0x8*(-parseInt(_0x37d0dc(0x9c))/0x9)+parseInt(_0x37d0dc(0x96))/0xa;if(_0x1853f3===_0x47f11b)break;else _0x40e49f['push'](_0x40e49f['shift']());}catch(_0x1d094f){_0x40e49f['push'](_0x40e49f['shift']());}}}(a88_0x1303,0x7e5b5));import{jsx as a88_0x3bac77,jsxs as a88_0x456cb9}from'react/jsx-runtime';import{Text}from'ink';function a88_0x1303(){var _0x4673a5=['\x20√\x20','green','1991652hhCPRR','30319360bEtQOO','3880830bzaEjh','1630Fkqkgl','12SyuuAB','dots','1763650kEVTPJ','30528opbQAV','808NOlsnc','746XcxJuG','3005394RmiuhQ'];a88_0x1303=function(){return _0x4673a5;};return a88_0x1303();}function a88_0x485e(_0x5cbe8a,_0x103616){_0x5cbe8a=_0x5cbe8a-0x90;var _0x13039f=a88_0x1303();var _0x485e85=_0x13039f[_0x5cbe8a];return _0x485e85;}import a88_0x443b18 from'ink-spinner';export function TaskLoading(_0x45b18d){var _0x2c5c39=a88_0x485e;if(_0x45b18d['finished'])return a88_0x3bac77(Text,{'color':_0x2c5c39(0x94),'children':_0x2c5c39(0x93)});if(_0x45b18d['loading'])return a88_0x456cb9(Text,{'color':'green','children':['\x20',a88_0x3bac77(a88_0x443b18,{'type':_0x2c5c39(0x9a)}),'\x20']});return a88_0x3bac77(Text,{'children':'\x20\x20\x20'});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x27e289,_0x3ec454){var _0x332c96=a89_0x1b6c,_0xf76f4b=_0x27e289();while(!![]){try{var _0x711f9b=parseInt(_0x332c96(0x190))/0x1*(parseInt(_0x332c96(0x189))/0x2)+-parseInt(_0x332c96(0x18a))/0x3*(-parseInt(_0x332c96(0x18f))/0x4)+parseInt(_0x332c96(0x18b))/0x5*(-parseInt(_0x332c96(0x188))/0x6)+parseInt(_0x332c96(0x191))/0x7+parseInt(_0x332c96(0x192))/0x8+-parseInt(_0x332c96(0x18c))/0x9+parseInt(_0x332c96(0x18e))/0xa*(parseInt(_0x332c96(0x18d))/0xb);if(_0x711f9b===_0x3ec454)break;else _0xf76f4b['push'](_0xf76f4b['shift']());}catch(_0x71ba8c){_0xf76f4b['push'](_0xf76f4b['shift']());}}}(a89_0xe5a2,0xcf7e5));function a89_0xe5a2(){var _0xdcdbe1=['3776718BFADbo','20GFAGjJ','3688YNOtmu','416524evnaiC','2212518ObDYtV','4288432IczZbT','3000NxDRyk','2piADqx','4581rWhxcS','10690WRWnyu','12998961pozhGI'];a89_0xe5a2=function(){return _0xdcdbe1;};return a89_0xe5a2();}import{jsx as a89_0x312f8e,jsxs as a89_0x13eabd}from'react/jsx-runtime';import{Box,Text}from'ink';import{TaskLoading}from'./task-loading.js';function a89_0x1b6c(_0x1bdba9,_0x29c54b){_0x1bdba9=_0x1bdba9-0x188;var _0xe5a2ab=a89_0xe5a2();var _0x1b6ce9=_0xe5a2ab[_0x1bdba9];return _0x1b6ce9;}import{TaskTime}from'./task-time.js';export function TaskRunning(_0x10fe38){return a89_0x13eabd(Box,{'children':[a89_0x312f8e(Box,{'width':'1'}),a89_0x312f8e(TaskLoading,{..._0x10fe38}),a89_0x312f8e(Text,{'children':_0x10fe38['taskName']}),a89_0x312f8e(TaskTime,{'elapsed':_0x10fe38['elapsed']})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a90_0x5140(_0x131d47,_0x5a0b6a){_0x131d47=_0x131d47-0xce;var _0x45b418=a90_0x45b4();var _0x514002=_0x45b418[_0x131d47];return _0x514002;}(function(_0x1558b8,_0x31e344){var _0x331e98=a90_0x5140,_0x5c1c12=_0x1558b8();while(!![]){try{var _0x4dec45=-parseInt(_0x331e98(0xcf))/0x1*(parseInt(_0x331e98(0xd5))/0x2)+-parseInt(_0x331e98(0xd4))/0x3*(-parseInt(_0x331e98(0xd7))/0x4)+-parseInt(_0x331e98(0xd2))/0x5*(parseInt(_0x331e98(0xda))/0x6)+-parseInt(_0x331e98(0xd1))/0x7+parseInt(_0x331e98(0xd0))/0x8*(parseInt(_0x331e98(0xd6))/0x9)+-parseInt(_0x331e98(0xd3))/0xa*(parseInt(_0x331e98(0xd9))/0xb)+parseInt(_0x331e98(0xd8))/0xc;if(_0x4dec45===_0x31e344)break;else _0x5c1c12['push'](_0x5c1c12['shift']());}catch(_0x50beda){_0x5c1c12['push'](_0x5c1c12['shift']());}}}(a90_0x45b4,0xae004));import{jsx as a90_0x36dc3d,Fragment as a90_0x23a2d4,jsxs as a90_0x18d41b}from'react/jsx-runtime';import{Text}from'ink';function a90_0x45b4(){var _0xd68e17=['7ayzkwo','16JtbzEC','980931amxjtb','350lPIBSM','10kRnMqW','16743kATXFM','123586LBigcw','5079861lvtGnX','996gKwmnN','7011432BHOIOA','6987101cqevoc','101334pssYqD','elapsed','gray'];a90_0x45b4=function(){return _0xd68e17;};return a90_0x45b4();}export function TaskTime(_0x2e662b){var _0x5b88f6=a90_0x5140;if(_0x2e662b[_0x5b88f6(0xdb)])return a90_0x18d41b(a90_0x23a2d4,{'children':[a90_0x36dc3d(Text,{'color':_0x5b88f6(0xce),'children':'\x20['}),a90_0x36dc3d(Text,{'color':_0x5b88f6(0xce),'bold':!![],'children':_0x2e662b[_0x5b88f6(0xdb)]}),a90_0x36dc3d(Text,{'color':_0x5b88f6(0xce),'children':']'})]});return null;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a91_0x231e72=a91_0x4c04;(function(_0x4df435,_0x572b3a){const _0x4e332c=a91_0x4c04,_0x113e36=_0x4df435();while(!![]){try{const _0x443b8a=-parseInt(_0x4e332c(0x13f))/0x1+parseInt(_0x4e332c(0x13a))/0x2*(-parseInt(_0x4e332c(0x14a))/0x3)+parseInt(_0x4e332c(0x145))/0x4+parseInt(_0x4e332c(0x148))/0x5*(-parseInt(_0x4e332c(0x14c))/0x6)+parseInt(_0x4e332c(0x142))/0x7*(parseInt(_0x4e332c(0x13c))/0x8)+parseInt(_0x4e332c(0x138))/0x9*(-parseInt(_0x4e332c(0x146))/0xa)+parseInt(_0x4e332c(0x137))/0xb;if(_0x443b8a===_0x572b3a)break;else _0x113e36['push'](_0x113e36['shift']());}catch(_0x5a6875){_0x113e36['push'](_0x113e36['shift']());}}}(a91_0x5bd9,0x5f7b5));import a91_0x1f260b from'node:path';import{fileURLToPath}from'node:url';import{useCallback,useState}from'react';import{copyDirectory}from'../utils/copy-directory.js';function a91_0x5bd9(){const _0x1b1982=['13401124BBhRPZ','5970141hXLihr','dirname','89618zJRWJW','项目模板复制完成','43816DdAyWq','error','开始复制项目模板','432571SbPWAe','success','copy','413NLuzRd','../../templates/projects/sub-app-react-demo','cwd','1530820tpGegW','10pgfapQ','message','12685HcEiyQ','resolve','24TFkXqL','项目模板复制失败','186uwQYbG','info','now'];a91_0x5bd9=function(){return _0x1b1982;};return a91_0x5bd9();}function a91_0x4c04(_0x182a49,_0x247a2a){_0x182a49=_0x182a49-0x135;const _0x5bd9f6=a91_0x5bd9();let _0x4c04d8=_0x5bd9f6[_0x182a49];return _0x4c04d8;}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a91_0x1f260b[a91_0x231e72(0x139)](fileURLToPath(import.meta.url)),templateDir=a91_0x1f260b[a91_0x231e72(0x149)](__dirname,a91_0x231e72(0x143));export function useCopyProjectTemplate(){const [_0x49b8b1,_0xf71166]=useState(![]),[_0x38a109,_0x436c20]=useState(![]),[_0x324012,_0x4905eb]=useState(''),_0x5496d3=useCallback(async _0x411a0f=>{const _0x1d1f44=a91_0x4c04,_0x33f11a=Date['now'](),_0x371bc6=a91_0x1f260b[_0x1d1f44(0x149)](process[_0x1d1f44(0x144)](),_0x411a0f);_0xf71166(!![]);try{logger[_0x1d1f44(0x135)](_0x1d1f44(0x141),_0x1d1f44(0x13e),{'projectCode':_0x411a0f,'templateDir':templateDir}),await copyDirectory(templateDir,_0x371bc6);const _0x3340d4=Date[_0x1d1f44(0x136)]()-_0x33f11a;logger[_0x1d1f44(0x140)](_0x1d1f44(0x141),_0x1d1f44(0x13b),_0x3340d4,{'projectCode':_0x411a0f});}catch(_0x542ab2){const _0x3a9c5b=Date[_0x1d1f44(0x136)]()-_0x33f11a;logger[_0x1d1f44(0x13d)](_0x1d1f44(0x141),_0x1d1f44(0x14b),{'projectCode':_0x411a0f,'error':_0x542ab2 instanceof Error?_0x542ab2[_0x1d1f44(0x147)]:String(_0x542ab2),'duration':_0x3a9c5b});throw _0x542ab2;}finally{_0xf71166(![]),_0x436c20(!![]),_0x4905eb(formatElapsed(_0x33f11a));}},[]);return{'taskName':'Copy\x20project\x20files','finished':_0x38a109,'loading':_0x49b8b1,'elapsed':_0x324012,'doTask':_0x5496d3};}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a92_0x190c(){const _0x1c2dda=['info','162885tomicA','387OaFCWi','Format\x20code','message','289566AMfcAU','success','5858220MzqqFm','21288jGoPqh','now','62931fAJBdw','代码格式化完成','24076jocOZC','npx','开始格式化代码','10MbLHjC','7OQLcta','18736ViqVxA','87LrBBvS','cwd','1luOgSM','format','代码格式化失败'];a92_0x190c=function(){return _0x1c2dda;};return a92_0x190c();}(function(_0x4689b4,_0x1ead61){const _0x199692=a92_0x1097,_0x43ab9f=_0x4689b4();while(!![]){try{const _0x10e0fa=-parseInt(_0x199692(0x17b))/0x1*(parseInt(_0x199692(0x183))/0x2)+-parseInt(_0x199692(0x179))/0x3*(parseInt(_0x199692(0x173))/0x4)+parseInt(_0x199692(0x17f))/0x5+-parseInt(_0x199692(0x16f))/0x6*(parseInt(_0x199692(0x177))/0x7)+-parseInt(_0x199692(0x178))/0x8*(parseInt(_0x199692(0x180))/0x9)+-parseInt(_0x199692(0x176))/0xa*(-parseInt(_0x199692(0x171))/0xb)+parseInt(_0x199692(0x185))/0xc;if(_0x10e0fa===_0x1ead61)break;else _0x43ab9f['push'](_0x43ab9f['shift']());}catch(_0x1fb5b6){_0x43ab9f['push'](_0x43ab9f['shift']());}}}(a92_0x190c,0x191ef));import a92_0xc5c08d from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';function a92_0x1097(_0x8dc0dc,_0x259ee4){_0x8dc0dc=_0x8dc0dc-0x16f;const _0x190cc5=a92_0x190c();let _0x10977a=_0x190cc5[_0x8dc0dc];return _0x10977a;}import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useFormatCode(){const _0x1a2065=a92_0x1097,[_0x29e402,_0x2de33e]=useState(![]),[_0x239353,_0x5da0ea]=useState(![]),[_0x592307,_0x33d6c1]=useState(''),_0x28584c=useCallback(async _0x5040e6=>{const _0x5ca565=a92_0x1097,_0x559c37=Date[_0x5ca565(0x170)](),_0x19f966=a92_0xc5c08d['resolve'](process[_0x5ca565(0x17a)](),_0x5040e6);_0x2de33e(!![]);try{logger[_0x5ca565(0x17e)]('format',_0x5ca565(0x175),{'projectCode':_0x5040e6}),await execa(_0x5ca565(0x174),['prettier','--write','.'],{'cwd':_0x19f966});const _0x1bc562=Date[_0x5ca565(0x170)]()-_0x559c37;logger[_0x5ca565(0x184)]('format',_0x5ca565(0x172),_0x1bc562,{'projectCode':_0x5040e6});}catch(_0x41c040){const _0x54862d=Date[_0x5ca565(0x170)]()-_0x559c37;logger['error'](_0x5ca565(0x17c),_0x5ca565(0x17d),{'projectCode':_0x5040e6,'error':_0x41c040 instanceof Error?_0x41c040[_0x5ca565(0x182)]:String(_0x41c040),'duration':_0x54862d});throw _0x41c040;}finally{_0x2de33e(![]),_0x5da0ea(!![]),_0x33d6c1(formatElapsed(_0x559c37));}},[]);return{'taskName':_0x1a2065(0x181),'finished':_0x239353,'loading':_0x29e402,'elapsed':_0x592307,'doTask':_0x28584c};}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x2386af,_0x368c6e){const _0x31a1d8=a93_0x470e,_0x5d3fa0=_0x2386af();while(!![]){try{const _0x148ecb=-parseInt(_0x31a1d8(0x70))/0x1*(-parseInt(_0x31a1d8(0x78))/0x2)+parseInt(_0x31a1d8(0x7b))/0x3+parseInt(_0x31a1d8(0x7a))/0x4+-parseInt(_0x31a1d8(0x79))/0x5+parseInt(_0x31a1d8(0x7d))/0x6+-parseInt(_0x31a1d8(0x7c))/0x7+-parseInt(_0x31a1d8(0x6e))/0x8;if(_0x148ecb===_0x368c6e)break;else _0x5d3fa0['push'](_0x5d3fa0['shift']());}catch(_0x12220b){_0x5d3fa0['push'](_0x5d3fa0['shift']());}}}(a93_0x8527,0x329c2));function a93_0x470e(_0x46d2f6,_0x1da844){_0x46d2f6=_0x46d2f6-0x6c;const _0x852792=a93_0x8527();let _0x470ead=_0x852792[_0x46d2f6];return _0x470ead;}function a93_0x8527(){const _0x627167=['669262PJZZen','1829760RzJbHl','574492oxczuC','205119FBngwE','154336WWstez','1051956LmcdUs','https://registry.npmmirror.com','resolve','1013240LBnHoi','info','1hpshqP','install','message','依赖安装失败','now','开始安装依赖','error','npm'];a93_0x8527=function(){return _0x627167;};return a93_0x8527();}import a93_0x36ef98 from'node:path';import{useCallback,useState}from'react';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';export function useInstallDependencies(){const [_0x4d21c2,_0x10dde2]=useState(![]),[_0x2af5f2,_0x34f4ee]=useState(![]),[_0x15b0d6,_0x13615b]=useState(''),_0x5f34b7=useCallback(async _0x51e143=>{const _0x2c9299=a93_0x470e,_0xa17646=Date[_0x2c9299(0x74)](),_0x27114a=a93_0x36ef98[_0x2c9299(0x6d)](process['cwd'](),_0x51e143);_0x10dde2(!![]),_0x34f4ee(![]);const _0x498270=async(_0x348fcd,_0x38ba26)=>{await execa(_0x348fcd,_0x38ba26,{'cwd':_0x27114a});};try{logger[_0x2c9299(0x6f)]('install',_0x2c9299(0x75),{'projectCode':_0x51e143,'registry':_0x2c9299(0x6c)}),await _0x498270(_0x2c9299(0x77),['install','--registry',_0x2c9299(0x6c)]);const _0x12b111=Date['now']()-_0xa17646;logger['success'](_0x2c9299(0x71),'依赖安装完成',_0x12b111,{'projectCode':_0x51e143});}catch(_0x2ff39e){const _0x4bc9d6=Date[_0x2c9299(0x74)]()-_0xa17646;logger[_0x2c9299(0x76)](_0x2c9299(0x71),_0x2c9299(0x73),{'projectCode':_0x51e143,'error':_0x2ff39e instanceof Error?_0x2ff39e[_0x2c9299(0x72)]:String(_0x2ff39e),'duration':_0x4bc9d6});throw _0x2ff39e;}finally{_0x10dde2(![]),_0x34f4ee(!![]),_0x13615b(formatElapsed(_0xa17646));}},[]);return{'taskName':'Install\x20dependencies','finished':_0x2af5f2,'loading':_0x4d21c2,'elapsed':_0x15b0d6,'doTask':_0x5f34b7};}
|
package/lib/errors.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a94_0x6d60(_0x16e944,_0x1e24d7){_0x16e944=_0x16e944-0x18c;const _0x1934b2=a94_0x1934();let _0x6d6090=_0x1934b2[_0x16e944];return _0x6d6090;}const a94_0x1fef2b=a94_0x6d60;(function(_0x517614,_0x420a2b){const _0xff52fd=a94_0x6d60,_0x3a9811=_0x517614();while(!![]){try{const _0x1ae148=-parseInt(_0xff52fd(0x1a3))/0x1+-parseInt(_0xff52fd(0x19c))/0x2+parseInt(_0xff52fd(0x1a7))/0x3*(parseInt(_0xff52fd(0x195))/0x4)+parseInt(_0xff52fd(0x18f))/0x5+-parseInt(_0xff52fd(0x1aa))/0x6*(parseInt(_0xff52fd(0x194))/0x7)+parseInt(_0xff52fd(0x19e))/0x8*(-parseInt(_0xff52fd(0x18e))/0x9)+parseInt(_0xff52fd(0x1a6))/0xa*(parseInt(_0xff52fd(0x193))/0xb);if(_0x1ae148===_0x420a2b)break;else _0x3a9811['push'](_0x3a9811['shift']());}catch(_0x9d7a8d){_0x3a9811['push'](_0x3a9811['shift']());}}}(a94_0x1934,0x66ac0));import{CLI_BIN_NAME}from'./constant/cli.js';export class CliError extends Error{[a94_0x1fef2b(0x198)];[a94_0x1fef2b(0x192)];[a94_0x1fef2b(0x1a8)];constructor(_0x426312,_0x3ed838,_0x57bf5d,_0x55d6cb){const _0x48c7a0=a94_0x1fef2b;super(_0x57bf5d),this[_0x48c7a0(0x1a4)]=_0x48c7a0(0x19b),this[_0x48c7a0(0x198)]=_0x426312,this[_0x48c7a0(0x192)]=_0x3ed838,this[_0x48c7a0(0x1a8)]=_0x55d6cb;}}export const CliErrors={'authRequired':_0xcba24b=>new CliError(a94_0x1fef2b(0x1a5),0x1,a94_0x1fef2b(0x1a0),_0xcba24b??a94_0x1fef2b(0x197)+CLI_BIN_NAME+a94_0x1fef2b(0x1a9)),'configMissing':_0x373904=>new CliError('config_missing',0x1,a94_0x1fef2b(0x19a),_0x373904??a94_0x1fef2b(0x197)+CLI_BIN_NAME+a94_0x1fef2b(0x190)),'notInProject':()=>new CliError('not_in_project',0x1,'Not\x20in\x20a\x20'+CLI_BIN_NAME+a94_0x1fef2b(0x19d),a94_0x1fef2b(0x196)),'apiError':(_0xfc3fd9,_0x2c6508)=>new CliError(a94_0x1fef2b(0x199),0x2,_0xfc3fd9,_0x2c6508),'networkError':_0x10a41c=>new CliError(a94_0x1fef2b(0x191),0x2,'Network\x20error:\x20'+_0x10a41c,a94_0x1fef2b(0x18c)),'unknownCommand':_0x1948e6=>new CliError('unknown_command',0x1,'Unknown\x20command:\x20'+_0x1948e6,a94_0x1fef2b(0x197)+CLI_BIN_NAME+a94_0x1fef2b(0x18d)),'flagMissing':(_0x36ba08,_0x40d3ad)=>new CliError(a94_0x1fef2b(0x1a1),0x1,'Missing\x20required\x20flag:\x20--'+_0x36ba08,_0x40d3ad),'validation':(_0xf50e0a,_0x2603e7)=>new CliError(a94_0x1fef2b(0x19f),0x1,_0xf50e0a,_0x2603e7),'cancelled':_0x526d39=>new CliError('cancelled',0x0,_0x526d39??a94_0x1fef2b(0x1a2),undefined)};function a94_0x1934(){const _0x2aac23=['77rVzqIn','329FbGXjY','484IbeqqU','Run\x20this\x20command\x20inside\x20a\x20project\x20with\x20.rabetbase.json\x20file.','Run\x20`','code','api_error','Configuration\x20file\x20not\x20found','CliError','227380oLFMtk','\x20project\x20directory','40dhhPFU','validation_error','Authentication\x20required','flag_missing','Operation\x20cancelled.','69299lpGBey','name','auth_required','824110GjOtSy','7386kRYoDj','hint','\x20auth`\x20to\x20login\x20first.','58794xDqeFK','Check\x20your\x20internet\x20connection\x20and\x20try\x20again.','\x20--help`\x20to\x20see\x20available\x20commands.','78741zHaSio','1165260ztNIsr','\x20init`\x20to\x20create\x20a\x20config\x20file.','network_error','exitCode'];a94_0x1934=function(){return _0x2aac23;};return a94_0x1934();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x5e91e0,_0x2dfb5c){const _0x31ca07=a95_0x2128,_0x3d72a4=_0x5e91e0();while(!![]){try{const _0x481baf=parseInt(_0x31ca07(0x199))/0x1*(parseInt(_0x31ca07(0x1a4))/0x2)+parseInt(_0x31ca07(0x18f))/0x3*(parseInt(_0x31ca07(0x1a7))/0x4)+parseInt(_0x31ca07(0x1a0))/0x5*(-parseInt(_0x31ca07(0x198))/0x6)+parseInt(_0x31ca07(0x1a6))/0x7+-parseInt(_0x31ca07(0x1a9))/0x8*(-parseInt(_0x31ca07(0x1ab))/0x9)+-parseInt(_0x31ca07(0x1a1))/0xa+parseInt(_0x31ca07(0x1a8))/0xb*(-parseInt(_0x31ca07(0x1a5))/0xc);if(_0x481baf===_0x2dfb5c)break;else _0x3d72a4['push'](_0x3d72a4['shift']());}catch(_0x4a8262){_0x3d72a4['push'](_0x3d72a4['shift']());}}}(a95_0x28e2,0xdf54e));function a95_0x2128(_0x5153a8,_0x52050a){_0x5153a8=_0x5153a8-0x18e;const _0x28e28e=a95_0x28e2();let _0x2128b0=_0x28e28e[_0x5153a8];return _0x2128b0;}import{CliErrors}from'../errors.js';export function parseFlags(_0x25a60b,_0x3113a4){const _0x1691cc=a95_0x2128,_0x53f49b={};for(const _0x26e6a9 of _0x25a60b){const _0x4a210a=_0x3113a4[_0x26e6a9[_0x1691cc(0x19d)]]??_0x3113a4[toCamelCase(_0x26e6a9[_0x1691cc(0x19d)])];if(_0x4a210a===undefined||_0x4a210a===null){_0x26e6a9[_0x1691cc(0x19b)]!==undefined&&(_0x53f49b[_0x26e6a9['name']]=_0x26e6a9[_0x1691cc(0x19b)]);continue;}_0x53f49b[_0x26e6a9[_0x1691cc(0x19d)]]=coerce(_0x26e6a9,_0x4a210a);}for(const _0x417728 of['dry-run',_0x1691cc(0x19f),_0x1691cc(0x191),_0x1691cc(0x18e)]){const _0x50988c=_0x3113a4[_0x417728];if(_0x50988c!==undefined){const _0x1493f8=_0x417728===_0x1691cc(0x19f)?'dry-run':_0x417728;_0x53f49b[_0x1493f8]=_0x50988c;}}return _0x53f49b;}export function validateFlags(_0x21c978,_0x2d0a1e,_0x5cb7af){const _0x110e63=a95_0x2128;for(const _0x482a43 of _0x21c978){const _0x161bc7=_0x2d0a1e[_0x482a43[_0x110e63(0x19d)]];if(_0x482a43['required']&&(_0x161bc7===undefined||_0x161bc7===''))throw CliErrors[_0x110e63(0x19e)](_0x482a43[_0x110e63(0x19d)],'--'+_0x482a43['name']+_0x110e63(0x19a)+_0x5cb7af+'`.');if(_0x482a43[_0x110e63(0x190)]&&_0x482a43[_0x110e63(0x190)]['length']>0x0&&_0x161bc7!==undefined&&_0x161bc7!==''){if(!_0x482a43[_0x110e63(0x190)][_0x110e63(0x1a3)](String(_0x161bc7)))throw CliErrors[_0x110e63(0x196)](_0x110e63(0x1aa)+_0x161bc7+_0x110e63(0x194)+_0x482a43[_0x110e63(0x19d)]+_0x110e63(0x195)+_0x482a43[_0x110e63(0x190)]['join'](',\x20'));}}}function a95_0x28e2(){const _0x23c008=['enum','yes','boolean','toUpperCase','\x22\x20for\x20--','.\x20Allowed:\x20','validation','\x20expects\x20a\x20number,\x20got\x20\x22','6rlEVvt','13644DAyZdD','\x20is\x20required\x20for\x20`','default','replace','name','flagMissing','dryRun','8150835GHWbcM','6178680cPURqa','true','includes','228eSjYYz','244560LCUexq','4451356wbbmzj','3218920ZZzfZs','55WYwKgR','716392tsBPqL','Invalid\x20value\x20\x22','27OFgaEY','format','3fHNatM'];a95_0x28e2=function(){return _0x23c008;};return a95_0x28e2();}function coerce(_0x5a043f,_0xa815d1){const _0x1b8999=a95_0x2128;switch(_0x5a043f['type']){case _0x1b8999(0x192):return _0xa815d1===!![]||_0xa815d1===_0x1b8999(0x1a2);case'number':{const _0x5de265=Number(_0xa815d1);if(isNaN(_0x5de265))throw CliErrors['validation']('--'+_0x5a043f[_0x1b8999(0x19d)]+_0x1b8999(0x197)+_0xa815d1+'\x22');return _0x5de265;}default:return String(_0xa815d1);}}function toCamelCase(_0x370a76){const _0x573ed8=a95_0x2128;return _0x370a76[_0x573ed8(0x19c)](/-([a-z])/g,(_0x545f92,_0x14db72)=>_0x14db72[_0x573ed8(0x193)]());}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a96_0x1ccb02=a96_0x4514;(function(_0x40857a,_0x1c12e7){const _0x3e3c1f=a96_0x4514,_0x589739=_0x40857a();while(!![]){try{const _0x481995=-parseInt(_0x3e3c1f(0x142))/0x1*(parseInt(_0x3e3c1f(0x15e))/0x2)+parseInt(_0x3e3c1f(0x15b))/0x3+-parseInt(_0x3e3c1f(0x157))/0x4+-parseInt(_0x3e3c1f(0x156))/0x5*(-parseInt(_0x3e3c1f(0x12b))/0x6)+parseInt(_0x3e3c1f(0x12d))/0x7*(parseInt(_0x3e3c1f(0x161))/0x8)+parseInt(_0x3e3c1f(0x13f))/0x9*(parseInt(_0x3e3c1f(0x152))/0xa)+-parseInt(_0x3e3c1f(0x136))/0xb;if(_0x481995===_0x1c12e7)break;else _0x589739['push'](_0x589739['shift']());}catch(_0x545ec7){_0x589739['push'](_0x589739['shift']());}}}(a96_0x361c,0xb3fe1));import{serviceRegistry,getServiceEntry}from'../commands/registry.js';import{CLI_BIN_NAME}from'../constant/cli.js';const RISK_LABELS={'read':'','write':a96_0x1ccb02(0x162),'high-risk-write':a96_0x1ccb02(0x154)};export function generateCommandHelp(_0x15b8fc){const _0x5e90ee=a96_0x1ccb02,_0xdfe88b=[],_0x4a7486=CLI_BIN_NAME+'\x20'+_0x15b8fc['service']+'\x20'+_0x15b8fc[_0x5e90ee(0x130)];_0xdfe88b[_0x5e90ee(0x160)](''),_0xdfe88b[_0x5e90ee(0x160)]('\x20\x20'+_0x15b8fc[_0x5e90ee(0x131)]),_0xdfe88b[_0x5e90ee(0x160)](''),_0xdfe88b[_0x5e90ee(0x160)]('\x20\x20USAGE'),_0xdfe88b[_0x5e90ee(0x160)](_0x5e90ee(0x158)+_0x4a7486+_0x5e90ee(0x144)),_0xdfe88b[_0x5e90ee(0x160)](''),_0xdfe88b[_0x5e90ee(0x160)](_0x5e90ee(0x14a)+_0x15b8fc[_0x5e90ee(0x149)]);_0x15b8fc[_0x5e90ee(0x149)]===_0x5e90ee(0x124)&&_0xdfe88b[_0x5e90ee(0x160)]('\x20\x20\x20\x20Requires\x20--yes\x20to\x20confirm,\x20or\x20interactive\x20prompt.');_0xdfe88b[_0x5e90ee(0x160)]('');if(_0x15b8fc['flags'][_0x5e90ee(0x13d)]>0x0||_0x15b8fc[_0x5e90ee(0x165)]||_0x15b8fc[_0x5e90ee(0x141)]!==![]){_0xdfe88b[_0x5e90ee(0x160)]('\x20\x20FLAGS');const _0x1de3b0=buildAllFlags(_0x15b8fc),_0x56b971=Math[_0x5e90ee(0x145)](..._0x1de3b0['map'](_0x5348da=>formatFlagName(_0x5348da)[_0x5e90ee(0x13d)]));for(const _0x151f0a of _0x1de3b0){const _0x4e1185=formatFlagName(_0x151f0a)[_0x5e90ee(0x13b)](_0x56b971+0x2);let _0x31f262=_0x151f0a[_0x5e90ee(0x131)];_0x151f0a['enum']&&_0x151f0a[_0x5e90ee(0x133)]['length']>0x0&&(_0x31f262+='\x20('+_0x151f0a[_0x5e90ee(0x133)][_0x5e90ee(0x163)](_0x5e90ee(0x153))+')'),_0x151f0a[_0x5e90ee(0x12c)]!==undefined&&_0x151f0a[_0x5e90ee(0x12c)]!==''&&(_0x31f262+=_0x5e90ee(0x13a)+_0x151f0a['default']+']'),_0x151f0a['required']&&(_0x31f262+=_0x5e90ee(0x127)),_0xdfe88b[_0x5e90ee(0x160)](_0x5e90ee(0x158)+_0x4e1185+_0x31f262);}_0xdfe88b[_0x5e90ee(0x160)]('');}const _0x5c336d=[];_0x15b8fc[_0x5e90ee(0x151)]!==![]&&_0x5c336d[_0x5e90ee(0x160)](_0x5e90ee(0x143)+CLI_BIN_NAME+_0x5e90ee(0x14f));_0x15b8fc[_0x5e90ee(0x14c)]!==![]&&_0x5c336d[_0x5e90ee(0x160)](_0x5e90ee(0x125)+CLI_BIN_NAME+'\x20project\x20init`\x20or\x20--appcode).');if(_0x5c336d[_0x5e90ee(0x13d)]>0x0){_0xdfe88b[_0x5e90ee(0x160)](_0x5e90ee(0x126));for(const _0x419320 of _0x5c336d){_0xdfe88b[_0x5e90ee(0x160)](_0x5e90ee(0x123)+_0x419320);}_0xdfe88b[_0x5e90ee(0x160)]('');}return _0xdfe88b[_0x5e90ee(0x163)]('\x0a');}function a96_0x4514(_0x1b7cb4,_0x35a41a){_0x1b7cb4=_0x1b7cb4-0x123;const _0x361ceb=a96_0x361c();let _0x45147a=_0x361ceb[_0x1b7cb4];return _0x45147a;}function a96_0x361c(){const _0x317121=['hasFormat','809876ZqzFaP','Requires\x20authentication\x20(run\x20`','\x20[flags]','max','\x20\x20\x20\x20--non-interactive\x20\x20\x20\x20\x20\x20Force\x20non-interactive\x20mode\x20(CI)','format','boolean','risk','\x20\x20RISK:\x20','label','requiresAppCode','pretty','\x20\x20\x20\x20--dry-run\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Preview\x20operation\x20without\x20executing','\x20auth`\x20first).','\x20\x20\x20\x20$\x20','requiresAuth','5453270IwIUNp','\x20|\x20','\x20\x20[high-risk-write]','Skip\x20confirmation\x20prompt','1041670Jnwyiq','2358632ytgbfk','\x20\x20\x20\x20','flags','name','4210371HpjMYY','\x20<service>\x20<command>\x20--help`\x20for\x20command-level\x20flags.','Preview\x20the\x20operation\x20without\x20executing','2ioyhAD','\x20\x20\x20\x20--appcode\x20<code>\x20\x20\x20\x20\x20\x20\x20Override\x20appcode','push','32TXKaQu','\x20\x20[write]','join','\x20\x20Run\x20`','dryRun','\x20<n>','commands','\x20<command>\x20[flags]','table','\x20\x20\x20\x20•\x20','high-risk-write','Requires\x20appcode\x20(set\x20via\x20`','\x20\x20PREREQUISITES','\x20(required)','\x20\x20COMMANDS','number','string','42VRtKrA','default','2215717qWjiwz','\x20\x20Rabetbase\x20CLI','json','command','description','\x20\x20GLOBAL\x20OPTIONS','enum','yes','\x20\x20\x20\x20--env\x20<env>\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Environment:\x20production\x20|\x20daily','27901093JudfRG','\x20\x20\x20\x20--version\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20version','dry-run','map','\x20[default:\x20','padEnd','Output\x20format','length','\x20\x20USAGE','9HkZHdJ','\x20<command>\x20--help`\x20for\x20flag\x20details.'];a96_0x361c=function(){return _0x317121;};return a96_0x361c();}export function generateServiceHelp(_0x38577d){const _0x59bcfb=a96_0x1ccb02,_0x2c6f8c=getServiceEntry(_0x38577d);if(!_0x2c6f8c)return'\x20\x20Unknown\x20service:\x20'+_0x38577d+'\x0a';const _0x194f5c=[];_0x194f5c[_0x59bcfb(0x160)](''),_0x194f5c[_0x59bcfb(0x160)]('\x20\x20'+_0x2c6f8c[_0x59bcfb(0x14b)]),_0x194f5c['push'](''),_0x194f5c[_0x59bcfb(0x160)](_0x59bcfb(0x13e)),_0x194f5c[_0x59bcfb(0x160)](_0x59bcfb(0x158)+CLI_BIN_NAME+'\x20'+_0x38577d+_0x59bcfb(0x168)),_0x194f5c[_0x59bcfb(0x160)](''),_0x194f5c[_0x59bcfb(0x160)](_0x59bcfb(0x128));const _0x17ba65=Math['max'](..._0x2c6f8c[_0x59bcfb(0x167)]['map'](_0x1cb168=>_0x1cb168[_0x59bcfb(0x130)][_0x59bcfb(0x13d)]));for(const _0x557e8f of _0x2c6f8c[_0x59bcfb(0x167)]){const _0x4e1d34=_0x557e8f['tag']??'';_0x194f5c[_0x59bcfb(0x160)](_0x59bcfb(0x158)+_0x557e8f[_0x59bcfb(0x130)][_0x59bcfb(0x13b)](_0x17ba65+0x2)+_0x557e8f[_0x59bcfb(0x131)]+_0x4e1d34);}return _0x194f5c[_0x59bcfb(0x160)](''),_0x194f5c[_0x59bcfb(0x160)](_0x59bcfb(0x164)+CLI_BIN_NAME+'\x20'+_0x38577d+_0x59bcfb(0x140)),_0x194f5c[_0x59bcfb(0x160)](''),_0x194f5c[_0x59bcfb(0x163)]('\x0a');}export function generateFullHelp(){const _0x521fa3=a96_0x1ccb02,_0x57405e=[];_0x57405e['push'](''),_0x57405e[_0x521fa3(0x160)](_0x521fa3(0x12e)),_0x57405e['push'](''),_0x57405e['push'](_0x521fa3(0x13e)),_0x57405e[_0x521fa3(0x160)](_0x521fa3(0x150)+CLI_BIN_NAME+'\x20[global-options]\x20<service>\x20<command>\x20[flags]'),_0x57405e[_0x521fa3(0x160)](''),_0x57405e[_0x521fa3(0x160)](_0x521fa3(0x132)),_0x57405e[_0x521fa3(0x160)](_0x521fa3(0x15f)),_0x57405e['push'](_0x521fa3(0x135)),_0x57405e[_0x521fa3(0x160)]('\x20\x20\x20\x20--format\x20<fmt>\x20\x20\x20\x20\x20\x20\x20\x20\x20Output\x20format:\x20json\x20|\x20pretty\x20|\x20table'),_0x57405e[_0x521fa3(0x160)](_0x521fa3(0x14e)),_0x57405e[_0x521fa3(0x160)]('\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'),_0x57405e['push'](_0x521fa3(0x146)),_0x57405e['push']('\x20\x20\x20\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20Show\x20help'),_0x57405e[_0x521fa3(0x160)](_0x521fa3(0x137)),_0x57405e[_0x521fa3(0x160)](''),_0x57405e[_0x521fa3(0x160)](_0x521fa3(0x128)),_0x57405e[_0x521fa3(0x160)]('');for(const _0x1d4cdc of serviceRegistry){_0x57405e[_0x521fa3(0x160)]('\x20\x20'+_0x1d4cdc[_0x521fa3(0x14b)]);const _0x4185c2=_0x1d4cdc[_0x521fa3(0x167)][_0x521fa3(0x139)](_0x53ec5e=>_0x1d4cdc['service']+'\x20'+_0x53ec5e[_0x521fa3(0x130)]),_0x5f9b8b=Math['max'](..._0x4185c2[_0x521fa3(0x139)](_0x4b329f=>_0x4b329f[_0x521fa3(0x13d)]));for(let _0x9eba57=0x0;_0x9eba57<_0x1d4cdc['commands'][_0x521fa3(0x13d)];_0x9eba57++){const _0x324805=_0x1d4cdc['commands'][_0x9eba57],_0x485db7=_0x324805['tag']??'';_0x57405e[_0x521fa3(0x160)](_0x521fa3(0x158)+_0x4185c2[_0x9eba57]['padEnd'](_0x5f9b8b+0x2)+_0x324805[_0x521fa3(0x131)]+_0x485db7);}_0x57405e['push']('');}return _0x57405e[_0x521fa3(0x160)]('\x20\x20Run\x20`'+CLI_BIN_NAME+_0x521fa3(0x15c)),_0x57405e[_0x521fa3(0x160)](''),_0x57405e[_0x521fa3(0x163)]('\x0a');}function buildAllFlags(_0x1faa2c){const _0xa4041a=a96_0x1ccb02,_0x9db93a=[..._0x1faa2c[_0xa4041a(0x159)]];return _0x1faa2c[_0xa4041a(0x165)]&&_0x9db93a[_0xa4041a(0x160)]({'name':_0xa4041a(0x138),'type':_0xa4041a(0x148),'description':_0xa4041a(0x15d)}),_0x1faa2c['hasFormat']!==![]&&_0x9db93a[_0xa4041a(0x160)]({'name':_0xa4041a(0x147),'type':_0xa4041a(0x12a),'default':_0xa4041a(0x14d),'enum':[_0xa4041a(0x12f),_0xa4041a(0x14d),_0xa4041a(0x169)],'description':_0xa4041a(0x13c)}),_0x1faa2c[_0xa4041a(0x149)]===_0xa4041a(0x124)&&_0x9db93a[_0xa4041a(0x160)]({'name':_0xa4041a(0x134),'type':_0xa4041a(0x148),'description':_0xa4041a(0x155)}),_0x9db93a;}function formatFlagName(_0x46b8ce){const _0x2576ef=a96_0x1ccb02,_0x218b14=_0x46b8ce['type']===_0x2576ef(0x148)?'':_0x46b8ce['type']===_0x2576ef(0x129)?_0x2576ef(0x166):'\x20<value>';return'--'+_0x46b8ce[_0x2576ef(0x15a)]+_0x218b14;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x4f1a48,_0x3b5f1a){var _0x1847ea=a97_0x50e7,_0x4d0c20=_0x4f1a48();while(!![]){try{var _0xe896af=-parseInt(_0x1847ea(0x14b))/0x1*(parseInt(_0x1847ea(0x14e))/0x2)+parseInt(_0x1847ea(0x148))/0x3*(-parseInt(_0x1847ea(0x14d))/0x4)+parseInt(_0x1847ea(0x149))/0x5+-parseInt(_0x1847ea(0x14f))/0x6+-parseInt(_0x1847ea(0x14c))/0x7+-parseInt(_0x1847ea(0x14a))/0x8*(parseInt(_0x1847ea(0x146))/0x9)+parseInt(_0x1847ea(0x147))/0xa;if(_0xe896af===_0x3b5f1a)break;else _0x4d0c20['push'](_0x4d0c20['shift']());}catch(_0x5f0c23){_0x4d0c20['push'](_0x4d0c20['shift']());}}}(a97_0x3e71,0x9f61b));export{runCommand}from'./runner.js';export{parseFlags,validateFlags}from'./flags.js';export{formatOutput}from'./output.js';export{generateCommandHelp,generateServiceHelp,generateFullHelp}from'./help.js';function a97_0x50e7(_0x25267f,_0x2dd00f){_0x25267f=_0x25267f-0x146;var _0x3e7103=a97_0x3e71();var _0x50e79f=_0x3e7103[_0x25267f];return _0x50e79f;}function a97_0x3e71(){var _0x4cdbe1=['130UfUjdp','7215691sxHpDt','3202456QlkvAo','1414HrrqnF','3325380rGbMtJ','117PblkQu','33304170SgbsyS','3nYBNZV','1381355xdZszv','293104ptKMvl'];a97_0x3e71=function(){return _0x4cdbe1;};return a97_0x3e71();}export{extractList,extractPaging}from'./response.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a98_0x1b86(){const _0x4d8f7c=['repeat','\x20items:\x0a','log','2kVZcYn','json','object','2409275cAqVOb','pretty','Unknown\x20error','join','message','313211GSfVsR','Error:\x20','isArray','dryRun','map','keys','4zzdnDc','9215672KUxOvP','length','error','command_error','values','max','data','7898AkwGuA','entries','command','(empty)','risk','slice','3946341VqGtcQ','padEnd','601572KTlJOO','stringify','1597020ZefsKS','9AtqwwN','Found\x20','23530SvJUJO'];a98_0x1b86=function(){return _0x4d8f7c;};return a98_0x1b86();}(function(_0x37cd49,_0x183a0c){const _0x3b1ca9=a98_0x5b8c,_0x5e8e96=_0x37cd49();while(!![]){try{const _0x3b642c=parseInt(_0x3b1ca9(0x15f))/0x1*(-parseInt(_0x3b1ca9(0x157))/0x2)+parseInt(_0x3b1ca9(0x150))/0x3*(-parseInt(_0x3b1ca9(0x165))/0x4)+parseInt(_0x3b1ca9(0x15a))/0x5+-parseInt(_0x3b1ca9(0x14e))/0x6+parseInt(_0x3b1ca9(0x14c))/0x7+parseInt(_0x3b1ca9(0x166))/0x8*(-parseInt(_0x3b1ca9(0x151))/0x9)+parseInt(_0x3b1ca9(0x153))/0xa*(parseInt(_0x3b1ca9(0x146))/0xb);if(_0x3b642c===_0x183a0c)break;else _0x5e8e96['push'](_0x5e8e96['shift']());}catch(_0x5c46c0){_0x5e8e96['push'](_0x5e8e96['shift']());}}}(a98_0x1b86,0x9b974));export function formatOutput(_0x4540a4,_0x43b577){const _0x46a3e5=a98_0x5b8c,{format:_0x46f295}=_0x43b577;switch(_0x46f295){case _0x46a3e5(0x158):printJson(_0x4540a4,_0x43b577);break;case'table':printTable(_0x4540a4,_0x43b577);break;case _0x46a3e5(0x15b):default:printPretty(_0x4540a4,_0x43b577);break;}}function printJson(_0xa4a3bc,_0x299fb2){const _0x4d1cf3=a98_0x5b8c,_0x4fb1f6={'ok':_0xa4a3bc['ok'],'command':_0x299fb2[_0x4d1cf3(0x148)],'risk':_0x299fb2[_0x4d1cf3(0x14a)]};if(_0x299fb2['dryRun'])_0x4fb1f6['dryRun']=!![];if(_0xa4a3bc['data']!==undefined)_0x4fb1f6[_0x4d1cf3(0x145)]=_0xa4a3bc[_0x4d1cf3(0x145)];!_0xa4a3bc['ok']&&_0xa4a3bc[_0x4d1cf3(0x15e)]&&(_0x4fb1f6[_0x4d1cf3(0x141)]={'code':_0x4d1cf3(0x142),'message':_0xa4a3bc[_0x4d1cf3(0x15e)]}),process['stdout']['write'](JSON[_0x4d1cf3(0x14f)](_0x4fb1f6,null,0x2)+'\x0a');}function printPretty(_0x5ce504,_0x52e2b0){const _0x160862=a98_0x5b8c;if(_0x52e2b0[_0x160862(0x162)]){console[_0x160862(0x156)]('[dry-run]\x20Would\x20execute:'),console[_0x160862(0x156)](JSON[_0x160862(0x14f)](_0x5ce504[_0x160862(0x145)],null,0x2));return;}if(!_0x5ce504['ok']){console['error'](_0x160862(0x160)+(_0x5ce504[_0x160862(0x15e)]??_0x160862(0x15c)));return;}const _0x599c72=_0x5ce504[_0x160862(0x145)];if(_0x599c72===undefined||_0x599c72===null){if(_0x5ce504[_0x160862(0x15e)])console['log'](_0x5ce504[_0x160862(0x15e)]);return;}if(Array[_0x160862(0x161)](_0x599c72)){printArrayPretty(_0x599c72);return;}if(typeof _0x599c72===_0x160862(0x159)){printObjectPretty(_0x599c72);return;}console[_0x160862(0x156)](String(_0x599c72));}function printObjectPretty(_0x142155){const _0x2e6a18=a98_0x5b8c,_0x3362dd=Math[_0x2e6a18(0x144)](...Object[_0x2e6a18(0x164)](_0x142155)[_0x2e6a18(0x163)](_0x49199e=>_0x49199e[_0x2e6a18(0x140)]),0x0);for(const [_0x5bccd5,_0x56642a]of Object[_0x2e6a18(0x147)](_0x142155)){if(_0x56642a===undefined||_0x56642a===null)continue;const _0x5cb979=_0x5bccd5['padEnd'](_0x3362dd);typeof _0x56642a===_0x2e6a18(0x159)?console['log'](_0x5cb979+'\x20\x20'+JSON[_0x2e6a18(0x14f)](_0x56642a)):console[_0x2e6a18(0x156)](_0x5cb979+'\x20\x20'+_0x56642a);}}function printArrayPretty(_0x573da0){const _0x2d5eee=a98_0x5b8c;if(_0x573da0[_0x2d5eee(0x140)]===0x0){console[_0x2d5eee(0x156)]('(empty)');return;}console[_0x2d5eee(0x156)](_0x2d5eee(0x152)+_0x573da0['length']+_0x2d5eee(0x155));for(const _0x24fcb7 of _0x573da0){if(typeof _0x24fcb7===_0x2d5eee(0x159)&&_0x24fcb7!==null){const _0x36e3c7=Object[_0x2d5eee(0x143)](_0x24fcb7)[_0x2d5eee(0x14b)](0x0,0x4)[_0x2d5eee(0x15d)]('\x20\x20');console['log']('\x20\x20'+_0x36e3c7);}else console['log']('\x20\x20'+_0x24fcb7);}}function a98_0x5b8c(_0x50cf20,_0x7617c){_0x50cf20=_0x50cf20-0x140;const _0x1b86dd=a98_0x1b86();let _0x5b8c5f=_0x1b86dd[_0x50cf20];return _0x5b8c5f;}function printTable(_0x40f73d,_0x21e690){const _0x5c4d68=a98_0x5b8c,_0x17fe50=_0x40f73d[_0x5c4d68(0x145)];if(!_0x40f73d['ok']){console[_0x5c4d68(0x141)](_0x5c4d68(0x160)+(_0x40f73d['message']??'Unknown\x20error'));return;}const _0x4f467e=Array[_0x5c4d68(0x161)](_0x17fe50)?_0x17fe50:_0x17fe50?[_0x17fe50]:[];if(_0x4f467e[_0x5c4d68(0x140)]===0x0){console[_0x5c4d68(0x156)](_0x5c4d68(0x149));return;}const _0x5aaf54=Object['keys'](_0x4f467e[0x0]),_0xcb52b4=_0x5aaf54['map'](_0x308f37=>Math[_0x5c4d68(0x144)](_0x308f37['length'],..._0x4f467e[_0x5c4d68(0x163)](_0x4ff3aa=>String(_0x4ff3aa[_0x308f37]??'')[_0x5c4d68(0x140)]))),_0x226bd5=_0x5aaf54[_0x5c4d68(0x163)]((_0x2bf3b3,_0x2cffc8)=>_0x2bf3b3[_0x5c4d68(0x14d)](_0xcb52b4[_0x2cffc8]))[_0x5c4d68(0x15d)]('\x20\x20'),_0x664e89=_0xcb52b4[_0x5c4d68(0x163)](_0xff6970=>'-'[_0x5c4d68(0x154)](_0xff6970))[_0x5c4d68(0x15d)]('\x20\x20');console['log'](_0x226bd5),console[_0x5c4d68(0x156)](_0x664e89);for(const _0x4ea138 of _0x4f467e){const _0x2c2334=_0x5aaf54[_0x5c4d68(0x163)]((_0x6f3b62,_0x2a7f78)=>String(_0x4ea138[_0x6f3b62]??'')[_0x5c4d68(0x14d)](_0xcb52b4[_0x2a7f78]))[_0x5c4d68(0x15d)]('\x20\x20');console[_0x5c4d68(0x156)](_0x2c2334);}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a99_0x329a(_0x55e51c,_0x594f4b){_0x55e51c=_0x55e51c-0x106;var _0x531cf7=a99_0x531c();var _0x329a9d=_0x531cf7[_0x55e51c];return _0x329a9d;}(function(_0x17b08c,_0x7704){var _0x321861=a99_0x329a,_0x44a845=_0x17b08c();while(!![]){try{var _0x55970f=-parseInt(_0x321861(0x10f))/0x1+-parseInt(_0x321861(0x10a))/0x2+-parseInt(_0x321861(0x10d))/0x3+-parseInt(_0x321861(0x111))/0x4*(parseInt(_0x321861(0x10b))/0x5)+parseInt(_0x321861(0x112))/0x6+parseInt(_0x321861(0x10c))/0x7+parseInt(_0x321861(0x107))/0x8*(parseInt(_0x321861(0x110))/0x9);if(_0x55970f===_0x7704)break;else _0x44a845['push'](_0x44a845['shift']());}catch(_0x29decd){_0x44a845['push'](_0x44a845['shift']());}}}(a99_0x531c,0xddec9));function a99_0x531c(){var _0x164d31=['1402912AGbbKN','1858770xKBwiI','isArray','1644246MXePlh','17811uHsQEb','3438412ByOlWf','2110452hoSqBI','paging','21224lmbkhe','object','tableData','1820804SpEHdx','10pEOnOS'];a99_0x531c=function(){return _0x164d31;};return a99_0x531c();}export function extractList(_0x2c6a55){var _0x303970=a99_0x329a;if(Array['isArray'](_0x2c6a55))return _0x2c6a55;if(_0x2c6a55&&typeof _0x2c6a55===_0x303970(0x108))return _0x2c6a55[_0x303970(0x109)]??[];return[];}export function extractPaging(_0x49d2f8){var _0x5509e9=a99_0x329a;if(_0x49d2f8&&typeof _0x49d2f8===_0x5509e9(0x108)&&!Array[_0x5509e9(0x10e)](_0x49d2f8))return _0x49d2f8[_0x5509e9(0x106)];return undefined;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x2fb0f9,_0x182a93){const _0x52dae8=a100_0x2a70,_0x5638f7=_0x2fb0f9();while(!![]){try{const _0x12b84e=-parseInt(_0x52dae8(0x197))/0x1*(-parseInt(_0x52dae8(0x1a5))/0x2)+parseInt(_0x52dae8(0x199))/0x3*(-parseInt(_0x52dae8(0x1cf))/0x4)+parseInt(_0x52dae8(0x18d))/0x5+parseInt(_0x52dae8(0x1ab))/0x6*(parseInt(_0x52dae8(0x19b))/0x7)+-parseInt(_0x52dae8(0x1d2))/0x8+parseInt(_0x52dae8(0x1bb))/0x9*(parseInt(_0x52dae8(0x195))/0xa)+-parseInt(_0x52dae8(0x1ad))/0xb;if(_0x12b84e===_0x182a93)break;else _0x5638f7['push'](_0x5638f7['shift']());}catch(_0x39af55){_0x5638f7['push'](_0x5638f7['shift']());}}}(a100_0x1625,0x5c9cf));import{parseFlags,validateFlags}from'./flags.js';import{formatOutput}from'./output.js';import{CliErrors}from'../errors.js';function a100_0x1625(){const _0x1b491a=['stdin','pagesize','string','dryRun','resolveApiDomain','\x22,\x20which\x20exceeds\x20the\x20configured\x20riskLevel\x20\x22','defaultVerbose','toLowerCase','read','join','6476WIFijf','risk','verbose','2727512fJOFyl','close','authRequired','Command\x20`','\x22.\x20','alias','\x0a\x20\x20\x20Continue?\x20[y/N]\x20','map','some','1093650hPqRhN','execute','`\x20requires\x20--yes\x20in\x20non-interactive\x20mode.','name','\x22.\x0a','hasFormat','validate','defaultPageSize','300ltSaDd','Unknown\x20alias\x20\x22','490619QYoujb','apiDir','492OmczlK','command','7BmfhBM','`\x20has\x20risk\x20level\x20\x22','configMissing','defaultFormat','high-risk-write','format','service','appCode','table','\x20api\x20pull`\x20first.','2URDFln','resolveAppCode','type','cancelled','⚠\x20\x20High-risk\x20operation:\x20','question','3115194CbnCDG','yes','6529930QPqCeA','flags','isNonInteractive','apiDomain','riskLevel','./src/api','../core/api-client.js','requiresAuth','Available\x20aliases:\x20','nonInteractive','createInterface','Set\x20appcode\x20via\x20`','cookie','validation','105264dwPYwy','code','High-risk\x20operation\x20`','requiresAppCode','--dry-run\x20is\x20not\x20supported\x20for\x20`','pretty','length','json','resolveCookie','rawFlags'];a100_0x1625=function(){return _0x1b491a;};return a100_0x1625();}import{resolveAlias,listAliases}from'../core/alias-resolver.js';import{CLI_BIN_NAME}from'../constant/cli.js';function a100_0x2a70(_0x5d6e7c,_0x57afce){_0x5d6e7c=_0x5d6e7c-0x18d;const _0x1625a0=a100_0x1625();let _0x2a705f=_0x1625a0[_0x5d6e7c];return _0x2a705f;}export async function runCommand(_0x4bbc4d,_0x59eaa0){const _0x124e53=a100_0x2a70,_0x5e7401=CLI_BIN_NAME+'\x20'+_0x4bbc4d[_0x124e53(0x1a1)]+'\x20'+_0x4bbc4d['command'],_0x14c5ad=parseFlags(_0x4bbc4d[_0x124e53(0x1ae)],_0x59eaa0[_0x124e53(0x1c4)]);validateFlags(_0x4bbc4d[_0x124e53(0x1ae)],_0x14c5ad,_0x5e7401);if(!_0x14c5ad['dry-run']&&_0x59eaa0[_0x124e53(0x1b1)]&&riskLevelOrder(_0x4bbc4d[_0x124e53(0x1d0)])>riskLevelOrder(_0x59eaa0[_0x124e53(0x1b1)]))throw CliErrors[_0x124e53(0x1ba)](_0x124e53(0x1d5)+_0x5e7401+_0x124e53(0x19c)+_0x4bbc4d[_0x124e53(0x1d0)]+_0x124e53(0x1ca)+_0x59eaa0[_0x124e53(0x1b1)]+_0x124e53(0x191)+'\x20\x20Set\x20riskLevel\x20in\x20.rabetbase.json\x20or\x20RABETBASE_RISK_LEVEL\x20to\x20allow\x20this\x20operation.');const _0x5bbb09=_0x59eaa0[_0x124e53(0x198)]||_0x124e53(0x1b2);resolveAliasToCode(_0x4bbc4d,_0x14c5ad,_0x5bbb09,_0x5e7401);let _0x46d6ea='';if(_0x4bbc4d[_0x124e53(0x1b4)]!==![]){_0x46d6ea=_0x59eaa0[_0x124e53(0x1c3)]();if(!_0x46d6ea)throw CliErrors[_0x124e53(0x1d4)]();const {setActiveCookie:_0x297dcf}=await import(_0x124e53(0x1b3));_0x297dcf(_0x46d6ea);}let _0x30c9f9='';if(_0x4bbc4d[_0x124e53(0x1be)]!==![]){_0x30c9f9=_0x59eaa0[_0x124e53(0x1a6)]()??'';if(!_0x30c9f9)throw CliErrors[_0x124e53(0x19d)](_0x124e53(0x1b8)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>`\x20or\x20pass\x20--appcode.');}const _0x4f11b7=resolveFormat(_0x14c5ad,_0x4bbc4d,_0x59eaa0[_0x124e53(0x19e)]),_0x7a7cb7=buildRuntimeContext({'appCode':_0x30c9f9,'cookie':_0x46d6ea,'apiDomain':_0x59eaa0[_0x124e53(0x1c9)](),'format':_0x4f11b7,'flags':_0x14c5ad,'def':_0x4bbc4d,'nonInteractive':_0x59eaa0[_0x124e53(0x1af)],'defaultPageSize':_0x59eaa0[_0x124e53(0x194)],'defaultVerbose':_0x59eaa0[_0x124e53(0x1cb)],'apiDir':_0x5bbb09});_0x4bbc4d[_0x124e53(0x193)]&&await _0x4bbc4d[_0x124e53(0x193)](_0x7a7cb7);if(_0x14c5ad['dry-run']){if(!_0x4bbc4d['dryRun'])throw CliErrors[_0x124e53(0x1ba)](_0x124e53(0x1bf)+_0x5e7401+'`.');const _0x50203f=await _0x4bbc4d[_0x124e53(0x1c8)](_0x7a7cb7);formatOutput({'ok':!![],'data':_0x50203f},{'command':_0x5e7401,'risk':_0x4bbc4d['risk'],'format':_0x4f11b7,'dryRun':!![]});return;}if(_0x4bbc4d[_0x124e53(0x1d0)]===_0x124e53(0x19f)&&!_0x14c5ad[_0x124e53(0x1ac)]){if(_0x59eaa0['isNonInteractive'])throw CliErrors[_0x124e53(0x1ba)](_0x124e53(0x1bd)+_0x5e7401+_0x124e53(0x18f));await requireConfirmation(_0x5e7401);}const _0x114c84=await _0x4bbc4d[_0x124e53(0x18e)](_0x7a7cb7);formatOutput(_0x114c84,{'command':_0x5e7401,'risk':_0x4bbc4d['risk'],'format':_0x4f11b7});}function buildRuntimeContext(_0x6e618c){const _0x40f7dd=a100_0x2a70,{flags:_0x1475e4,def:_0x223ac3}=_0x6e618c,_0x313b83=CLI_BIN_NAME+'\x20'+_0x223ac3[_0x40f7dd(0x1a1)]+'\x20'+_0x223ac3[_0x40f7dd(0x19a)];return{'appCode':_0x6e618c[_0x40f7dd(0x1a2)],'cookie':_0x6e618c[_0x40f7dd(0x1b9)],'apiDomain':_0x6e618c[_0x40f7dd(0x1b0)],'format':_0x6e618c[_0x40f7dd(0x1a0)],'nonInteractive':_0x6e618c[_0x40f7dd(0x1b6)],'apiDir':_0x6e618c[_0x40f7dd(0x198)],'str'(_0x201823){return String(_0x1475e4[_0x201823]??'');},'bool'(_0xc1d029){const _0x129f3f=_0x40f7dd;if(_0x1475e4[_0xc1d029]===!![])return!![];if(_0xc1d029===_0x129f3f(0x1d1)&&_0x6e618c[_0x129f3f(0x1cb)])return!![];return![];},'num'(_0x15aebe,_0xc0e5d5){const _0x1dd9b9=_0x40f7dd,_0x42d110=_0x1475e4[_0x15aebe];if(typeof _0x42d110==='number')return _0x42d110;if(_0x15aebe===_0x1dd9b9(0x1c6)&&_0x6e618c[_0x1dd9b9(0x194)]!=null)return _0x6e618c[_0x1dd9b9(0x194)];return _0xc0e5d5??0x0;},'flag'(_0x5bab8e){return _0x1475e4[_0x5bab8e];},'output'(_0x595260){const _0x3379df=_0x40f7dd;formatOutput(_0x595260,{'command':_0x313b83,'risk':_0x223ac3[_0x3379df(0x1d0)],'format':_0x6e618c[_0x3379df(0x1a0)]});}};}function resolveFormat(_0x55469a,_0x5d856a,_0x50dd31){const _0x76ad63=a100_0x2a70;if(_0x5d856a[_0x76ad63(0x192)]===![])return'pretty';const _0x3fc677=_0x55469a[_0x76ad63(0x1a0)];if(_0x3fc677===_0x76ad63(0x1c2)||_0x3fc677===_0x76ad63(0x1c0)||_0x3fc677===_0x76ad63(0x1a3))return _0x3fc677;if(_0x50dd31)return _0x50dd31;return _0x76ad63(0x1c0);}async function requireConfirmation(_0x1d9871){const _0x4995c1=a100_0x2a70,_0x205f3f=await import('node:readline'),_0x2faa1b=_0x205f3f[_0x4995c1(0x1b7)]({'input':process[_0x4995c1(0x1c5)],'output':process['stderr']});return new Promise((_0x28d40a,_0x11338a)=>{const _0x49cba6=_0x4995c1;_0x2faa1b[_0x49cba6(0x1aa)](_0x49cba6(0x1a9)+_0x1d9871+_0x49cba6(0x1d8),_0x35c69d=>{const _0x462036=_0x49cba6;_0x2faa1b[_0x462036(0x1d3)](),_0x35c69d[_0x462036(0x1cc)]()==='y'||_0x35c69d[_0x462036(0x1cc)]()===_0x462036(0x1ac)?_0x28d40a():_0x11338a(CliErrors[_0x462036(0x1a8)]('Operation\x20cancelled\x20by\x20user.'));});});}const RISK_ORDER={'read':0x0,'write':0x1,'high-risk-write':0x2};function riskLevelOrder(_0x14e14c){const _0x20ccac=a100_0x2a70;return RISK_ORDER[_0x14e14c??_0x20ccac(0x1cd)]??0x0;}function resolveAliasToCode(_0x1ff4ed,_0x459319,_0x2051d3,_0x4b92c6){const _0x5b394c=a100_0x2a70,_0x3b9799=_0x1ff4ed['flags'][_0x5b394c(0x1da)](_0x1aeb6e=>_0x1aeb6e[_0x5b394c(0x190)]===_0x5b394c(0x1bc)&&_0x1aeb6e['type']===_0x5b394c(0x1c7)),_0x5c3f41=_0x1ff4ed['flags'][_0x5b394c(0x1da)](_0x327dd1=>_0x327dd1['name']===_0x5b394c(0x1d7)&&_0x327dd1[_0x5b394c(0x1a7)]==='string');if(!_0x3b9799||!_0x5c3f41)return;const _0xdc50c8=_0x459319['code']?String(_0x459319[_0x5b394c(0x1bc)]):'',_0x2931eb=_0x459319[_0x5b394c(0x1d7)]?String(_0x459319[_0x5b394c(0x1d7)]):'';if(!_0xdc50c8&&!_0x2931eb)throw CliErrors[_0x5b394c(0x1ba)]('`'+_0x4b92c6+'`\x20requires\x20either\x20--code\x20or\x20--alias.');if(_0x2931eb&&!_0xdc50c8){const _0x5a4b58=resolveAlias(_0x2051d3,_0x2931eb);if(!_0x5a4b58){const _0x4d91eb=listAliases(_0x2051d3)[_0x5b394c(0x1d9)](_0x3bd0e9=>_0x3bd0e9[_0x5b394c(0x1d7)]),_0x206078=_0x4d91eb[_0x5b394c(0x1c1)]?_0x5b394c(0x1b5)+_0x4d91eb[_0x5b394c(0x1ce)](',\x20'):'No\x20api.ts\x20found\x20in\x20'+_0x2051d3+'.\x20Run\x20`'+CLI_BIN_NAME+_0x5b394c(0x1a4);throw CliErrors[_0x5b394c(0x1ba)](_0x5b394c(0x196)+_0x2931eb+_0x5b394c(0x1d6)+_0x206078);}_0x459319['code']=_0x5a4b58;}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const BUILD_NUMBER=0x15;
|
package/lib/help.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x4c93cd,_0x223db3){var _0x2ee1b9=a103_0x3aa3,_0x2211fa=_0x4c93cd();while(!![]){try{var _0x439df4=-parseInt(_0x2ee1b9(0x91))/0x1+parseInt(_0x2ee1b9(0x93))/0x2*(parseInt(_0x2ee1b9(0x92))/0x3)+parseInt(_0x2ee1b9(0x90))/0x4+-parseInt(_0x2ee1b9(0x8d))/0x5*(parseInt(_0x2ee1b9(0x8a))/0x6)+-parseInt(_0x2ee1b9(0x8b))/0x7+-parseInt(_0x2ee1b9(0x8c))/0x8+parseInt(_0x2ee1b9(0x94))/0x9;if(_0x439df4===_0x223db3)break;else _0x2211fa['push'](_0x2211fa['shift']());}catch(_0x213646){_0x2211fa['push'](_0x2211fa['shift']());}}}(a103_0x2179,0x7cf83));import{jsx as a103_0x4475d3,jsxs as a103_0x3e40bd}from'react/jsx-runtime';function a103_0x3aa3(_0x4c6258,_0x34d719){_0x4c6258=_0x4c6258-0x89;var _0x217916=a103_0x2179();var _0x3aa320=_0x217916[_0x4c6258];return _0x3aa320;}function a103_0x2179(){var _0x11a187=['green','2454EbClnq','3907939ceXgfY','4404760QlIMBj','2930NMvDVe','\x20\x20Rabetbase\x20CLI','\x20--help','2105124cdgSlg','908357oAnSUZ','21nzsfqH','230618wmRrBe','12918006ecuxac'];a103_0x2179=function(){return _0x11a187;};return a103_0x2179();}import{Box,Text}from'ink';import{CLI_BIN_NAME}from'./constant/cli.js';export function Help(){var _0x273f69=a103_0x3aa3;return a103_0x3e40bd(Box,{'flexDirection':'column','marginTop':0x1,'marginBottom':0x1,'children':[a103_0x4475d3(Box,{'children':a103_0x4475d3(Text,{'bold':!![],'color':_0x273f69(0x89),'children':_0x273f69(0x8e)})}),a103_0x3e40bd(Box,{'marginTop':0x1,'children':[a103_0x4475d3(Text,{'dimColor':!![],'children':'\x20\x20Use\x20'}),a103_0x4475d3(Text,{'bold':!![],'color':_0x273f69(0x89),'children':CLI_BIN_NAME+_0x273f69(0x8f)}),a103_0x4475d3(Text,{'dimColor':!![],'children':'\x20to\x20view\x20available\x20commands.'})]})]});}
|
package/lib/init/main.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x39e59a,_0x4ab0f9){const _0x4cc793=a104_0x16b5,_0x5d437c=_0x39e59a();while(!![]){try{const _0x1d25cc=-parseInt(_0x4cc793(0x9b))/0x1+parseInt(_0x4cc793(0x97))/0x2*(-parseInt(_0x4cc793(0xb4))/0x3)+-parseInt(_0x4cc793(0xa8))/0x4+parseInt(_0x4cc793(0xbe))/0x5+-parseInt(_0x4cc793(0xbc))/0x6+parseInt(_0x4cc793(0xae))/0x7+parseInt(_0x4cc793(0x9f))/0x8;if(_0x1d25cc===_0x4ab0f9)break;else _0x5d437c['push'](_0x5d437c['shift']());}catch(_0x1c2143){_0x5d437c['push'](_0x5d437c['shift']());}}}(a104_0x79ce,0x834bf));import{jsxs as a104_0x3da78b,jsx as a104_0x23c319}from'react/jsx-runtime';import{useState,useEffect}from'react';import{Box,Text,useInput}from'ink';import{readFileSync}from'node:fs';function a104_0x16b5(_0x4adde6,_0x59079a){_0x4adde6=_0x4adde6-0x95;const _0x79ce99=a104_0x79ce();let _0x16b527=_0x79ce99[_0x4adde6];return _0x16b527;}import{resolve,join,dirname}from'node:path';function a104_0x79ce(){const _0xe26f7d=['Initializing\x20configuration\x20file...','AppCode','trim','cwd','length','90MmQeLZ','env','setLogPath','cyan','gray','App\x20Code\x20cannot\x20exceed\x20100\x20characters','message','parse','3974886BytWZI','1.0.0','4363950YaoDFj','Config\x20file\x20already\x20exists\x20in\x20current\x20directory','error','package.json','Invalid\x20App\x20Code','red','4680BRZObp','App\x20Code\x20can\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','init','初始化项目配置文件成功','420427jTravj','version','App\x20Code\x20identifies\x20your\x20project.\x20Only\x20letters,\x20numbers,\x20-\x20and\x20_\x20are\x20allowed','Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','7112072yEUaAk','green','../..','utf8','Please\x20enter\x20App\x20Code:','string','创建配置文件失败','column','\x20←\x20','1793160lAKPZc','toLocaleString','test','delete','exit','backspace','2641730gddGKe'];a104_0x79ce=function(){return _0xe26f7d;};return a104_0x79ce();}import{fileURLToPath}from'node:url';import{logger}from'../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME}from'../context.js';export function Init({appcode:_0x266e04,env:_0x14c688}){const _0x5e5341=a104_0x16b5,[_0x526a8a,_0x3ca7a4]=useState(null),[_0x5f3380,_0x4ca219]=useState(![]),[_0x3fa014,_0x5c9811]=useState(!_0x266e04),[_0xcc99f4,_0x11e35b]=useState(''),[_0x10f54d,_0xcba05c]=useState(''),[_0x349fc9,_0x5209e7]=useState(_0x266e04||''),[_0x35d491]=useState(_0x14c688);function _0x4bab35(_0x29356f){const _0x28726b=a104_0x16b5;if(_0x29356f[_0x28726b(0xb3)]===0x0)return{'valid':![],'message':''};if(_0x29356f[_0x28726b(0xb3)]>0x64)return{'valid':![],'message':_0x28726b(0xb9)};const _0x3ae5bd=/^[A-Za-z0-9_-]+$/;if(!_0x3ae5bd[_0x28726b(0xaa)](_0x29356f))return{'valid':![],'message':_0x28726b(0x98)};return{'valid':!![]};}useInput((_0x198aa0,_0x39b63b)=>{const _0x106475=a104_0x16b5;if(!_0x3fa014)return;if(_0x39b63b['return']){if(_0x10f54d||!_0xcc99f4[_0x106475(0xb1)]()){_0xcba05c('App\x20Code\x20cannot\x20be\x20empty');return;}const _0x552bfa=_0xcc99f4[_0x106475(0xb1)](),{valid:_0x4b2af9,message:_0x2df410}=_0x4bab35(_0x552bfa);if(!_0x4b2af9){_0xcba05c(_0x2df410||_0x106475(0x95));return;}_0x5209e7(_0x552bfa),_0x5c9811(![]);}else{if(_0x39b63b[_0x106475(0xad)]||_0x39b63b[_0x106475(0xab)])_0x11e35b(_0x55d4de=>{const _0x5b4e23=_0x106475,_0x334006=_0x55d4de['slice'](0x0,-0x1);if(_0x334006[_0x5b4e23(0xb3)]===0x0)_0xcba05c('');else{const {valid:_0x189b7e,message:_0x13499b}=_0x4bab35(_0x334006);_0xcba05c(_0x189b7e?'':_0x13499b||_0x5b4e23(0x95));}return _0x334006;});else _0x39b63b['ctrl']&&_0x198aa0==='c'?process[_0x106475(0xac)](0x0):_0x11e35b(_0x2a9354=>{const _0x260bb4=_0x106475,_0x1083af=_0x2a9354+_0x198aa0,{valid:_0x42c1ca,message:_0x17d145}=_0x4bab35(_0x1083af);return _0xcba05c(_0x42c1ca?'':_0x17d145||_0x260bb4(0x95)),_0x1083af;});}},{'isActive':_0x3fa014}),useEffect(()=>{const _0x3a0143=a104_0x16b5;if(!_0x349fc9||_0x3fa014)return;if(getProjectConfigPath()){_0x3ca7a4(_0x3a0143(0xbf)),setTimeout(()=>process['exit'](0x1),0x64);return;}const _0x2c6aeb=resolve(process[_0x3a0143(0xb2)](),NEW_CONFIG_NAME);try{const _0x49cdf6=fileURLToPath(import.meta.url),_0x37371b=resolve(dirname(_0x49cdf6),_0x3a0143(0xa1)),_0x139c45=join(_0x37371b,_0x3a0143(0xc1));let _0x13fc52='1.0.0';try{const _0x2dab71=JSON[_0x3a0143(0xbb)](readFileSync(_0x139c45,_0x3a0143(0xa2)));_0x13fc52=_0x2dab71['version']||_0x3a0143(0xbd);}catch{}const _0x2f5000=readRawConfig(),_0x3c4988=typeof _0x2f5000[_0x3a0143(0xb5)]===_0x3a0143(0xa4)?_0x2f5000[_0x3a0143(0xb5)]:undefined,{app:_0x3a56a7,appcode:_0x3dafc5,..._0x4dde4f}=_0x2f5000,_0x38b403={..._0x4dde4f,'appcode':_0x349fc9,'env':_0x35d491||_0x3c4988||'production','createdAt':new Date()[_0x3a0143(0xa9)](),'version':_0x13fc52};writeConfigFile(_0x2c6aeb,_0x38b403),logger[_0x3a0143(0xb6)](process[_0x3a0143(0xb2)]()),logger['info'](_0x3a0143(0x99),_0x3a0143(0x9a),{'appcode':_0x349fc9,'env':_0x38b403[_0x3a0143(0xb5)],'version':_0x38b403[_0x3a0143(0x9c)],'configPath':_0x2c6aeb}),_0x4ca219(!![]),setTimeout(()=>process['exit'](0x0),0x64);}catch(_0x4af5ee){logger[_0x3a0143(0xc0)](_0x3a0143(0x99),_0x3a0143(0xa5),{'error':_0x4af5ee instanceof Error?_0x4af5ee[_0x3a0143(0xba)]:String(_0x4af5ee)}),_0x3ca7a4('Error:\x20'+(_0x4af5ee instanceof Error?_0x4af5ee['message']:String(_0x4af5ee))),setTimeout(()=>process[_0x3a0143(0xac)](0x1),0x64);}},[_0x349fc9,_0x3fa014,_0x35d491]);if(_0x526a8a)return a104_0x23c319(Box,{'flexDirection':_0x5e5341(0xa6),'children':a104_0x3da78b(Text,{'color':_0x5e5341(0x96),'children':['✗\x20',_0x526a8a]})});if(_0x3fa014)return a104_0x3da78b(Box,{'flexDirection':'column','children':[a104_0x3da78b(Box,{'children':[a104_0x3da78b(Text,{'color':_0x5e5341(0xb7),'children':[_0x5e5341(0xa3),'\x20']}),_0xcc99f4?a104_0x23c319(Text,{'color':_0x5e5341(0xa0),'children':_0xcc99f4}):a104_0x23c319(Text,{'color':_0x5e5341(0xb8),'children':'_'}),_0x10f54d&&a104_0x3da78b(Text,{'color':_0x5e5341(0x96),'children':[_0x5e5341(0xa7),_0x10f54d]})]}),!_0x10f54d&&!_0xcc99f4&&a104_0x23c319(Box,{'children':a104_0x23c319(Text,{'color':_0x5e5341(0xb8),'children':_0x5e5341(0x9d)})})]});if(_0x5f3380)return a104_0x3da78b(Box,{'flexDirection':_0x5e5341(0xa6),'children':[a104_0x3da78b(Text,{'color':_0x5e5341(0xa0),'children':['✓\x20',_0x5e5341(0x9e)]}),a104_0x3da78b(Text,{'color':_0x5e5341(0xb7),'children':[_0x5e5341(0xb0),':\x20',_0x349fc9]}),a104_0x23c319(Text,{'children':'You\x20can\x20now\x20use\x20commands\x20like\x20\x27rabetbase\x20api\x20doc\x27\x20and\x20\x27rabetbase\x20api\x20pull\x27'})]});return a104_0x23c319(Box,{'children':a104_0x23c319(Text,{'children':_0x5e5341(0xaf)})});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x340ded,_0x39e78a){const _0x5b357a=a105_0x3492,_0x4ff5a2=_0x340ded();while(!![]){try{const _0x768f5a=-parseInt(_0x5b357a(0x164))/0x1*(-parseInt(_0x5b357a(0x14e))/0x2)+parseInt(_0x5b357a(0x15a))/0x3+parseInt(_0x5b357a(0x15c))/0x4*(parseInt(_0x5b357a(0x149))/0x5)+parseInt(_0x5b357a(0x143))/0x6+parseInt(_0x5b357a(0x165))/0x7+parseInt(_0x5b357a(0x15d))/0x8+-parseInt(_0x5b357a(0x14f))/0x9;if(_0x768f5a===_0x39e78a)break;else _0x4ff5a2['push'](_0x4ff5a2['shift']());}catch(_0xecd1d1){_0x4ff5a2['push'](_0x4ff5a2['shift']());}}}(a105_0x4136,0x5e445));import{jsx as a105_0x597211,jsxs as a105_0x1eee05,Fragment as a105_0x2ffb00}from'react/jsx-runtime';import{useState,useEffect,useMemo}from'react';import{Text,Box,useInput,useApp}from'ink';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';function a105_0x4136(){const _0x196d3f=['⚠️\x20Some\x20configurations\x20require\x20manual\x20steps','success','Configuring\x20MCP\x20server...','Configure\x20Lovrabet\x20MCP\x20Server','cyan','2168055ZFdESd','message','234788vrurBe','1492848OGEUXj','error','selectedIndexes','gray','status','return','Other\x20IDE\x20configuration\x20guide','419459hWGZeu','770042SDOVfV','other','needsManualAction','✗\x20Configuration\x20failed','name','manual','column','find','size','getSelectedIDEs','every','32892nRGBfR','setErrorMsg','yellow','configuring','green','Other\x20IDE','40DPmUUi','some','red','map','ide','2nwHnao','13749273Qbgpgw','from','done','Press\x20any\x20key\x20to\x20exit...','selecting','length'];a105_0x4136=function(){return _0x196d3f;};return a105_0x4136();}function a105_0x3492(_0x3066d3,_0x367871){_0x3066d3=_0x3066d3-0x13e;const _0x413621=a105_0x4136();let _0x349263=_0x413621[_0x3066d3];return _0x349263;}import{IDESelector,useIDESelection}from'../ui/IDESelector.js';import{installMcp}from'./mcp-installer.js';export function McpInstallUI({preselectedIDEs:preselectedIDEs=[],enableBffSave:_0x47a82a}){const _0x2f75c8=a105_0x3492,{exit:_0x2b3d2a}=useApp(),[_0x52090c,_0x4cb4b9]=useState('selecting'),[_0xa6f66,_0x115d21]=useState([]),[_0x52c976,_0x46cb8a]=useState([]),_0x96ebac=useMemo(()=>[...Array[_0x2f75c8(0x150)](MCP_IDES)[_0x2f75c8(0x14c)](_0x10862c=>({'key':_0x10862c,'name':IDE_CONFIGS[_0x10862c][_0x2f75c8(0x169)],'description':IDE_CONFIGS[_0x10862c]['description']})),{'key':_0x2f75c8(0x166),'name':_0x2f75c8(0x148),'description':_0x2f75c8(0x163)}],[]),_0x270fbe=useIDESelection({'ideList':_0x96ebac,'preselectedIDEs':preselectedIDEs,'multiSelect':!![]});useEffect(()=>{const _0xabe2bc=_0x2f75c8;preselectedIDEs[_0xabe2bc(0x154)]>0x0&&_0x270fbe[_0xabe2bc(0x15f)][_0xabe2bc(0x140)]>0x0&&_0x4d7b34();},[]),useInput((_0x3e5ecc,_0x304630)=>{const _0x4b0e66=_0x2f75c8;if(_0x52090c===_0x4b0e66(0x153)){if(_0x3e5ecc==='q'||_0x3e5ecc==='Q'){_0x2b3d2a();return;}if(_0x304630[_0x4b0e66(0x162)]){if(_0x270fbe[_0x4b0e66(0x15f)]['size']===0x0){_0x270fbe[_0x4b0e66(0x144)]('Please\x20select\x20at\x20least\x20one\x20IDE');return;}_0x4d7b34();return;}_0x270fbe['handleKeyDown'](_0x3e5ecc,_0x304630);}_0x52090c===_0x4b0e66(0x151)&&_0x2b3d2a();});async function _0x4d7b34(){const _0x21fcec=_0x2f75c8,_0x50b9e8=_0x270fbe[_0x21fcec(0x141)]();_0x115d21([{'label':'Selected\x20IDEs','value':''+_0x270fbe[_0x21fcec(0x15f)][_0x21fcec(0x140)]}]),_0x4cb4b9(_0x21fcec(0x146));const _0x1e5744=await installMcp(_0x50b9e8,_0x47a82a),_0x4f65e3=_0x1e5744[_0x21fcec(0x14c)](_0x4da6a6=>({'ide':_0x96ebac[_0x21fcec(0x13f)](_0x578452=>_0x578452['key']===_0x4da6a6[_0x21fcec(0x14d)])?.['name']||_0x4da6a6['ide'],'status':_0x4da6a6[_0x21fcec(0x167)]?_0x21fcec(0x16a):_0x4da6a6[_0x21fcec(0x156)]?_0x21fcec(0x156):_0x21fcec(0x15e),'message':_0x4da6a6[_0x21fcec(0x15b)]}));_0x46cb8a(_0x4f65e3),_0x4cb4b9(_0x21fcec(0x151)),setTimeout(()=>{_0x2b3d2a();},0x1388);}return a105_0x1eee05(Box,{'flexDirection':_0x2f75c8(0x13e),'marginTop':0x1,'children':[_0x52090c===_0x2f75c8(0x153)&&a105_0x597211(IDESelector,{'ideList':_0x96ebac,'title':_0x2f75c8(0x158),'selection':_0x270fbe}),_0x52090c===_0x2f75c8(0x146)&&a105_0x1eee05(a105_0x2ffb00,{'children':[_0xa6f66['map']((_0x117b51,_0x120cc6)=>a105_0x1eee05(Box,{'children':[a105_0x1eee05(Text,{'color':_0x2f75c8(0x147),'children':['√\x20',_0x117b51['label'],':\x20']}),a105_0x597211(Text,{'color':_0x2f75c8(0x159),'children':_0x117b51['value']})]},_0x120cc6)),a105_0x597211(Box,{'marginTop':0x1,'children':a105_0x597211(Text,{'children':_0x2f75c8(0x157)})})]}),_0x52090c==='done'&&a105_0x597211(DoneStep,{'configResults':_0x52c976})]});}function DoneStep({configResults:_0x18d606}){const _0x5f21b1=a105_0x3492,_0x47afc1=_0x18d606[_0x5f21b1(0x142)](_0xaba8cd=>_0xaba8cd[_0x5f21b1(0x161)]===_0x5f21b1(0x156)),_0x534242=_0x18d606[_0x5f21b1(0x14a)](_0x1bd4e8=>_0x1bd4e8[_0x5f21b1(0x161)]==='manual'),_0x129708=_0x18d606[_0x5f21b1(0x14a)](_0x41de2d=>_0x41de2d[_0x5f21b1(0x161)]===_0x5f21b1(0x15e));return a105_0x1eee05(Box,{'flexDirection':_0x5f21b1(0x13e),'children':[a105_0x597211(Box,{'marginTop':0x1,'marginBottom':0x1,'children':_0x47afc1?a105_0x597211(Text,{'color':_0x5f21b1(0x147),'bold':!![],'children':'✓\x20MCP\x20configuration\x20completed!'}):_0x534242?a105_0x597211(Text,{'color':_0x5f21b1(0x145),'bold':!![],'children':_0x5f21b1(0x155)}):_0x129708?a105_0x597211(Text,{'color':_0x5f21b1(0x14b),'bold':!![],'children':_0x5f21b1(0x168)}):a105_0x597211(Text,{'color':_0x5f21b1(0x145),'bold':!![],'children':'⚠️\x20Configuration\x20requires\x20manual\x20steps'})}),_0x18d606[_0x5f21b1(0x14c)]((_0x2c21f1,_0x3eb22a)=>{const _0x3fa30d=_0x5f21b1,_0x3ee556=_0x2c21f1['status']===_0x3fa30d(0x156),_0x5fa8f9=_0x2c21f1[_0x3fa30d(0x161)]===_0x3fa30d(0x16a);return a105_0x1eee05(Box,{'flexDirection':'column','marginBottom':0x1,'children':[a105_0x597211(Box,{'children':a105_0x1eee05(Text,{'bold':!![],'color':_0x3ee556?_0x3fa30d(0x147):_0x5fa8f9?_0x3fa30d(0x145):'red','children':[_0x3ee556?'✓\x20':_0x5fa8f9?'⚠️\x20':'✗\x20',_0x2c21f1[_0x3fa30d(0x14d)],':']})}),a105_0x597211(Box,{'paddingLeft':0x3,'flexDirection':_0x3fa30d(0x13e),'children':a105_0x597211(Text,{'color':'white','children':_0x2c21f1['message']})})]},_0x3eb22a);}),a105_0x597211(Box,{'marginTop':0x1,'children':a105_0x597211(Text,{'color':_0x5f21b1(0x160),'children':_0x5f21b1(0x152)})})]});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x4586f7,_0xa8c79d){const _0x1b27ec=a106_0x4104,_0xd0f14c=_0x4586f7();while(!![]){try{const _0x1511e1=parseInt(_0x1b27ec(0x107))/0x1+-parseInt(_0x1b27ec(0x10e))/0x2*(parseInt(_0x1b27ec(0x10f))/0x3)+-parseInt(_0x1b27ec(0x111))/0x4+parseInt(_0x1b27ec(0x10d))/0x5+parseInt(_0x1b27ec(0x112))/0x6+parseInt(_0x1b27ec(0x113))/0x7+parseInt(_0x1b27ec(0x10c))/0x8*(parseInt(_0x1b27ec(0x108))/0x9);if(_0x1511e1===_0xa8c79d)break;else _0xd0f14c['push'](_0xd0f14c['shift']());}catch(_0x59a62e){_0xd0f14c['push'](_0xd0f14c['shift']());}}}(a106_0x3181,0x25684));import{configureClaudeMcp as a106_0x57244c}from'./mcp-installer.js';function a106_0x3181(){const _0x55658d=['exit','message','14790fNQGQL','9tMomxZ','\x0a📋\x20','\x0aError:\x20Configuration\x20failed\x20-\x20','cwd','605944ycwPNO','1373905kwQIiJ','2JtLIQx','843393MPMZeN','error','555960WnexIH','280542miynbS','1128890LEfbAz'];a106_0x3181=function(){return _0x55658d;};return a106_0x3181();}function a106_0x4104(_0x5c3eac,_0x524cab){_0x5c3eac=_0x5c3eac-0x105;const _0x3181e1=a106_0x3181();let _0x4104c9=_0x3181e1[_0x5c3eac];return _0x4104c9;}export async function configureClaudeMcp(){const _0x162601=a106_0x4104,_0x418074=process[_0x162601(0x10b)](),_0x4e84ef=a106_0x57244c(_0x418074);_0x4e84ef['success']?(console['log'](_0x162601(0x109)+_0x4e84ef[_0x162601(0x106)]+'\x0a'),process[_0x162601(0x105)](0x0)):(console[_0x162601(0x110)](_0x162601(0x10a)+_0x4e84ef[_0x162601(0x106)]+'\x0a'),process[_0x162601(0x105)](0x1));}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x964331,_0x596c17){const _0xf4c5af=a107_0x5a19,_0x8ea506=_0x964331();while(!![]){try{const _0x3cbf9f=-parseInt(_0xf4c5af(0x135))/0x1+parseInt(_0xf4c5af(0x137))/0x2*(parseInt(_0xf4c5af(0x13e))/0x3)+parseInt(_0xf4c5af(0x131))/0x4+-parseInt(_0xf4c5af(0x13f))/0x5+-parseInt(_0xf4c5af(0x13c))/0x6*(parseInt(_0xf4c5af(0x134))/0x7)+parseInt(_0xf4c5af(0x133))/0x8+parseInt(_0xf4c5af(0x12c))/0x9*(-parseInt(_0xf4c5af(0x13b))/0xa);if(_0x3cbf9f===_0x596c17)break;else _0x8ea506['push'](_0x8ea506['shift']());}catch(_0x2411e4){_0x8ea506['push'](_0x8ea506['shift']());}}}(a107_0x280a,0x79043));import{configureCursorMcp as a107_0xac08ce}from'./mcp-installer.js';export async function configureCursorMcp(){const _0x1ef553=a107_0x5a19,_0xfeb086=process[_0x1ef553(0x130)](),_0x1a9920=await a107_0xac08ce(_0xfeb086);_0x1a9920[_0x1ef553(0x12e)]?(console[_0x1ef553(0x138)](_0x1ef553(0x132)),console[_0x1ef553(0x138)](_0x1ef553(0x13a)),console['log']('\x20\x20'+_0x1a9920['message']+'\x0a'),console[_0x1ef553(0x138)](_0x1ef553(0x139)),console[_0x1ef553(0x138)](_0x1ef553(0x13d)),process[_0x1ef553(0x136)](0x0)):(console[_0x1ef553(0x12f)](_0x1ef553(0x12d)+_0x1a9920['message']+'\x0a'),process[_0x1ef553(0x136)](0x1));}function a107_0x5a19(_0x236d81,_0x313db9){_0x236d81=_0x236d81-0x12c;const _0x280a33=a107_0x280a();let _0x5a19f4=_0x280a33[_0x236d81];return _0x5a19f4;}function a107_0x280a(){const _0x5a395b=['log','You\x20can\x20now\x20use\x20Lovrabet\x20dataset\x20MCP\x20tools\x20in\x20Cursor.','Configuration:','20YuwgWn','86898WYJLAG','Please\x20restart\x20Cursor\x20to\x20load\x20the\x20new\x20MCP\x20config.','3qXEHiI','414410zRvyaT','5239602uuDwKU','\x0aError:\x20Configuration\x20failed\x20-\x20','success','error','cwd','3882660uovPqw','\x0a✓\x20Cursor\x20MCP\x20configured\x20successfully!\x0a','5287640kMrydk','133FheMfS','562563wdxpIb','exit','1898082udkqLN'];a107_0x280a=function(){return _0x5a395b;};return a107_0x280a();}
|
package/lib/mcp/main.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x2a82f0,_0x17e1aa){const _0x4eb535=a108_0x4b44,_0x397f75=_0x2a82f0();while(!![]){try{const _0x158fbb=parseInt(_0x4eb535(0x120))/0x1*(-parseInt(_0x4eb535(0x12a))/0x2)+-parseInt(_0x4eb535(0x12f))/0x3*(parseInt(_0x4eb535(0x132))/0x4)+-parseInt(_0x4eb535(0x13b))/0x5*(parseInt(_0x4eb535(0x126))/0x6)+-parseInt(_0x4eb535(0x131))/0x7+parseInt(_0x4eb535(0x13a))/0x8*(parseInt(_0x4eb535(0x12c))/0x9)+-parseInt(_0x4eb535(0x130))/0xa*(parseInt(_0x4eb535(0x13f))/0xb)+parseInt(_0x4eb535(0x135))/0xc*(parseInt(_0x4eb535(0x123))/0xd);if(_0x158fbb===_0x17e1aa)break;else _0x397f75['push'](_0x397f75['shift']());}catch(_0x112fee){_0x397f75['push'](_0x397f75['shift']());}}}(a108_0x5928,0xeead1));function a108_0x4b44(_0xab441a,_0x34d738){_0xab441a=_0xab441a-0x11e;const _0x5928b0=a108_0x5928();let _0x4b4493=_0x5928b0[_0xab441a];return _0x4b4493;}import{installMcp}from'./mcp-installer.js';function a108_0x5928(){const _0x155a45=['446640pPDxfi','5570Dgpfwb','toLowerCase','\x20\x20rabetbase\x20mcp\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','mcpClaude','1037069OfMVgp','log','from','\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','\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','exit','ide','5984awoiKv','name','help','39KEmEFt','cursor','error','6816ufDKbq','split','claude','success','274kjseRD','--help','108JaMInF','mcpCursor','message','18WlFWiU','120lCPnDY','8663984Tddezc','493364ozSeSZ','Error:\x20Unsupported\x20command:\x20','join','22008300oRutFV','needsManualAction','has','map','setLogPath'];a108_0x5928=function(){return _0x155a45;};return a108_0x5928();}import{logger}from'../utils/logger.js';import{MCP_IDES,IDE_CONFIGS}from'../utils/ai_config.js';export async function mcpCommand(_0x201850,_0x53343c,_0x1a3285){const _0x12b901=a108_0x4b44;logger[_0x12b901(0x139)](process['cwd']());if(_0x1a3285?.[_0x12b901(0x122)]||_0x201850===_0x12b901(0x12b)){showHelp();return;}_0x201850!=='install'&&(console[_0x12b901(0x125)](_0x12b901(0x133)+(_0x201850||'-')),console[_0x12b901(0x140)]('\x0aAvailable\x20commands:'),console[_0x12b901(0x140)]('\x20\x20rabetbase\x20mcp\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20MCP\x20configuration'),console[_0x12b901(0x140)](_0x12b901(0x13d)),logger[_0x12b901(0x125)]('mcp',_0x12b901(0x133)+(_0x201850||'-')),process[_0x12b901(0x11e)](0x1));let _0x5a1760;if(_0x1a3285?.[_0x12b901(0x12d)])_0x5a1760=_0x12b901(0x124);else{if(_0x1a3285?.[_0x12b901(0x13e)])_0x5a1760=_0x12b901(0x128);else{if(_0x53343c?.[0x0]){const _0x4f6e4c=_0x53343c[0x0][_0x12b901(0x13c)]();MCP_IDES[_0x12b901(0x137)](_0x4f6e4c)&&(_0x5a1760=_0x4f6e4c);}}}const _0x28703a=_0x5a1760?[_0x5a1760]:[],_0x5f1c4c=await installMcp(_0x28703a,_0x1a3285?.['enableBffSave']);for(const _0x4e8ee4 of _0x5f1c4c){const _0x232cc3=IDE_CONFIGS[_0x4e8ee4['ide']]?.[_0x12b901(0x121)]||_0x4e8ee4[_0x12b901(0x11f)],_0x29e7ac=_0x4e8ee4[_0x12b901(0x136)]?'⚠️':_0x4e8ee4[_0x12b901(0x129)]?'✓':'✗',_0x4dbfe8=_0x4e8ee4[_0x12b901(0x129)]?console[_0x12b901(0x140)]:console[_0x12b901(0x125)];_0x4dbfe8(_0x29e7ac+'\x20'+_0x232cc3+':');const _0x3a9415=_0x4e8ee4[_0x12b901(0x12e)][_0x12b901(0x127)]('\x0a');for(const _0x32e5f8 of _0x3a9415){_0x4dbfe8('\x20\x20'+_0x32e5f8);}console[_0x12b901(0x140)]('');}}function showHelp(){const _0x986b5f=a108_0x4b44;console[_0x986b5f(0x140)](_0x986b5f(0x142)+Array[_0x986b5f(0x141)](MCP_IDES)[_0x986b5f(0x138)]((_0x312e68,_0x246d02)=>'\x20\x20'+(_0x246d02+0x1)+'.\x20'+IDE_CONFIGS[_0x312e68][_0x986b5f(0x121)]+'\x20-\x20'+IDE_CONFIGS[_0x312e68]['description'])[_0x986b5f(0x134)]('\x0a')+_0x986b5f(0x143));}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a109_0x129d(){const _0x4e1978=['log','cursor','463578GCrXOB','\x20succeeded)','932566sJmSSO','Claude\x20Code','message','cwd','6vSxKHy','error','5241388fGQUVD','Cursor','Start\x20configuring\x20MCP','info','⚠️\x20\x20Note:\x20Some\x20configurations\x20require\x20manual\x20commands,\x20please\x20follow\x20the\x20instructions\x20above','length','ide','mcp-install-non-interactive','\x0a✓\x20MCP\x20configuration\x20completed\x20(','some','9844794qIJGyW','1799235CVUXOQ','setLogPath','success','claude','11892608xXjtLi','1026851ssfwbp','needsManualAction','56wjcVEC'];a109_0x129d=function(){return _0x4e1978;};return a109_0x129d();}const a109_0xbc3819=a109_0xb74b;(function(_0x1f4363,_0x31eb49){const _0x38c17b=a109_0xb74b,_0x7cafb5=_0x1f4363();while(!![]){try{const _0x255182=-parseInt(_0x38c17b(0x1e2))/0x1+parseInt(_0x38c17b(0x1e9))/0x2*(-parseInt(_0x38c17b(0x1ed))/0x3)+parseInt(_0x38c17b(0x1ef))/0x4+-parseInt(_0x38c17b(0x1dd))/0x5+parseInt(_0x38c17b(0x1e7))/0x6*(-parseInt(_0x38c17b(0x1e4))/0x7)+parseInt(_0x38c17b(0x1e1))/0x8+parseInt(_0x38c17b(0x1dc))/0x9;if(_0x255182===_0x31eb49)break;else _0x7cafb5['push'](_0x7cafb5['shift']());}catch(_0x5d398f){_0x7cafb5['push'](_0x7cafb5['shift']());}}}(a109_0x129d,0xe8c4d));import{installMcp}from'./mcp-installer.js';import{logger}from'../utils/logger.js';function a109_0xb74b(_0x453c57,_0x41f2e0){_0x453c57=_0x453c57-0x1d4;const _0x129d58=a109_0x129d();let _0xb74b9=_0x129d58[_0x453c57];return _0xb74b9;}export async function installMcpNonInteractive(_0x29c47c,_0x322a66,_0x1ac6c7=process[a109_0xbc3819(0x1ec)]()){const _0xb7d470=a109_0xbc3819;logger[_0xb7d470(0x1de)](_0x1ac6c7),logger[_0xb7d470(0x1d5)](_0xb7d470(0x1d9),_0xb7d470(0x1d4),{'ides':_0x29c47c,'enableBffSave':_0x322a66});const _0x3ae31d=await installMcp(_0x29c47c,_0x322a66,_0x1ac6c7);for(const _0x10b4bf of _0x3ae31d){const _0x12d93c=_0x10b4bf[_0xb7d470(0x1d8)]===_0xb7d470(0x1e6)?_0xb7d470(0x1f0):_0x10b4bf[_0xb7d470(0x1d8)]===_0xb7d470(0x1e0)?_0xb7d470(0x1ea):'Other\x20IDE',_0x343285=_0x10b4bf['needsManualAction']?'⚠️':_0x10b4bf[_0xb7d470(0x1df)]?'✓':'✗',_0x31b3cd=_0x10b4bf[_0xb7d470(0x1df)]?console[_0xb7d470(0x1e5)]:console[_0xb7d470(0x1ee)];_0x31b3cd(_0x343285+'\x20'+_0x12d93c+':');const _0x36c767=_0x10b4bf[_0xb7d470(0x1eb)]['split']('\x0a');for(const _0x2a249b of _0x36c767){_0x31b3cd('\x20\x20'+_0x2a249b);}console[_0xb7d470(0x1e5)]('');}const _0x154e04=_0x3ae31d['filter'](_0x85bf9b=>_0x85bf9b[_0xb7d470(0x1df)])[_0xb7d470(0x1d7)];console['log'](_0xb7d470(0x1da)+_0x154e04+'/'+_0x3ae31d[_0xb7d470(0x1d7)]+_0xb7d470(0x1e8)),_0x3ae31d[_0xb7d470(0x1db)](_0x205775=>_0x205775[_0xb7d470(0x1e3)])?(console['log'](''),console[_0xb7d470(0x1e5)](_0xb7d470(0x1d6))):console['log']('');}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a110_0x95ea9=a110_0x476e;(function(_0x23a042,_0x2621d6){const _0x1b46e1=a110_0x476e,_0x50e98a=_0x23a042();while(!![]){try{const _0x445c6f=parseInt(_0x1b46e1(0x1c7))/0x1+parseInt(_0x1b46e1(0x1f4))/0x2*(-parseInt(_0x1b46e1(0x1de))/0x3)+-parseInt(_0x1b46e1(0x1cc))/0x4*(parseInt(_0x1b46e1(0x1f2))/0x5)+-parseInt(_0x1b46e1(0x1d6))/0x6+parseInt(_0x1b46e1(0x1cb))/0x7+-parseInt(_0x1b46e1(0x1f6))/0x8+parseInt(_0x1b46e1(0x1f3))/0x9;if(_0x445c6f===_0x2621d6)break;else _0x50e98a['push'](_0x50e98a['shift']());}catch(_0x5825fd){_0x50e98a['push'](_0x50e98a['shift']());}}}(a110_0x2a1c,0xa3239));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';function a110_0x476e(_0x378db4,_0x39a54f){_0x378db4=_0x378db4-0x1b8;const _0x2a1c9c=a110_0x2a1c();let _0x476ea7=_0x2a1c9c[_0x378db4];return _0x476ea7;}import{getRulesContent}from'../utils/rules-cdn.js';const __dirname=dirname(fileURLToPath(import.meta.url));export const MCP_SERVER_NAME='lovrabet-dataset';export const MCP_COMMAND=a110_0x95ea9(0x1f1);export const MCP_ARGS=[a110_0x95ea9(0x1b9)];export function getAppConfig(){const _0x258320=a110_0x95ea9,_0x56dafe=readConfig(),_0x535bc1=_0x56dafe[_0x258320(0x1c1)]||_0x56dafe[_0x258320(0x1e6)],_0x4a8374=normalizeEnv(_0x56dafe[_0x258320(0x1bb)]||_0x258320(0x1dd));if(!_0x535bc1)throw new Error(_0x258320(0x1ec));return{'appcode':String(_0x535bc1),'env':_0x4a8374};}export function buildMcpEnv(_0x1df215,_0x2b9c42){const _0x138533=a110_0x95ea9,_0x574d38={'RABETBASE_APP_CODE':_0x1df215};return _0x2b9c42!==_0x138533(0x1dd)&&(_0x574d38['RABETBASE_ENV']=_0x2b9c42),_0x574d38;}export function buildMcpArgs(_0x4c4ad5){const _0x5f4252=a110_0x95ea9,_0x13a028=['@lovrabet/dataset-mcp-server@latest'];return _0x4c4ad5&&_0x13a028[_0x5f4252(0x1ed)](_0x5f4252(0x1c3)),_0x13a028;}export function buildMcpServerConfig(_0x56da6f,_0x3a0fa9,_0x5606c1){return{'command':MCP_COMMAND,'args':buildMcpArgs(_0x5606c1),'env':buildMcpEnv(_0x56da6f,_0x3a0fa9)};}export function buildClaudeMcpCommand(_0x21ffb7,_0x1de61c,_0x21f35f){const _0x29a581=a110_0x95ea9,_0x3b691e=buildMcpArgs(_0x21f35f),_0x4548f3=_0x29a581(0x1bc)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+_0x3b691e['join']('\x20')+_0x29a581(0x1f0)+_0x21ffb7,_0x547350=_0x1de61c!=='production'?_0x29a581(0x1d2)+_0x1de61c:'';return''+_0x4548f3+_0x547350;}export async function copyCursorRules(_0x1a3a50){const _0x3ac122=a110_0x95ea9,_0x1828cb=join(_0x1a3a50,_0x3ac122(0x1ea)),_0x112e57=join(_0x1828cb,'rules'),_0x3d5c5b=join(_0x112e57,_0x3ac122(0x1da));if(existsSync(_0x3d5c5b))return logger[_0x3ac122(0x1db)](_0x3ac122(0x1d4),_0x3ac122(0x1cf),{'path':_0x3d5c5b}),![];try{ensureDir(_0x112e57);const _0xd1edf5=await getRulesContent();return writeFileSync(_0x3d5c5b,_0xd1edf5,_0x3ac122(0x1d1)),logger[_0x3ac122(0x1db)](_0x3ac122(0x1d4),_0x3ac122(0x1c4),{'to':_0x3d5c5b}),!![];}catch(_0x52885e){return logger[_0x3ac122(0x1ba)](_0x3ac122(0x1d4),'Failed\x20to\x20copy\x20Cursor\x20Rules\x20file',{'error':_0x52885e instanceof Error?_0x52885e[_0x3ac122(0x1ce)]:String(_0x52885e)}),![];}}export async function copyAgentsMd(_0x5e9fe3){const _0x2829d6=a110_0x95ea9,_0x4caccf=join(_0x5e9fe3,'agents.md');if(existsSync(_0x4caccf))return logger[_0x2829d6(0x1db)](_0x2829d6(0x1d4),_0x2829d6(0x1c2),{'path':_0x4caccf}),![];try{const _0x525cb3=await getRulesContent();return writeFileSync(_0x4caccf,_0x525cb3,_0x2829d6(0x1d1)),logger[_0x2829d6(0x1db)](_0x2829d6(0x1d4),_0x2829d6(0x1e0),{'to':_0x4caccf}),!![];}catch(_0x31c6a3){return logger[_0x2829d6(0x1ba)](_0x2829d6(0x1d4),_0x2829d6(0x1bf),{'error':_0x31c6a3 instanceof Error?_0x31c6a3['message']:String(_0x31c6a3)}),![];}}function a110_0x2a1c(){const _0x690bb1=['utf-8','\x20-e\x20RABETBASE_ENV=','--------------------------------','mcp-install','\x22RABETBASE_ENV\x22:\x20\x22','6118764OGzvez','AppCode:\x20','mcp.json','Other\x20IDE\x20configuration\x20guide\x20displayed','lovrabet_rules.mdc','info','mcpServers','production','7845ZMRUzH','claude','Create\x20agents.md\x20file','Environment:\x20','Restart\x20Claude\x20Code\x20to\x20take\x20effect','\x20\x20\x20\x20}','Create\x20new\x20mcp.json\x20config','needsManualAction','app','\x20\x20\x20\x20\x20\x20\x22command\x22:\x20\x22npx\x22,','Configuration:\x20appcode=','\x0aError:\x20Configuration\x20failed\x20-\x20','.cursor','\x22RABETBASE_APP_CODE\x22:\x20\x22','No\x20appcode\x20found.\x20Run\x20\x27rabetbase\x20init\x27\x20to\x20initialize\x20project\x20config','push','stringify','Update\x20existing\x20mcp.json\x20config','\x20-e\x20RABETBASE_APP_CODE=','npx','35hXKTGs','2632257jCXDlC','488hswKof','mcp-cursor','2305472eYclJG','\x20\x20\x20\x20\x20\x20\x22args\x22:\x20','success','join','Unknown\x20IDE:\x20','Written\x20.cursor/mcp.json','@lovrabet/dataset-mcp-server@latest','error','env','claude\x20mcp\x20add\x20','parse','Configuration\x20command\x20generated','Failed\x20to\x20copy\x20agents.md\x20file','cwd','appcode','agents.md\x20already\x20exists,\x20skipping','--enable-bff-save','Create\x20Cursor\x20Rules\x20file','Detailed\x20guide:\x20https://open.lovrabet.com/en/docs/mcp/config-guide','\x20\x20\x20\x20\x20\x20}','1318259aYmcLU','\x20\x20}','Please\x20restart\x20Cursor\x20to\x20load\x20the\x20new\x20MCP\x20config.','Run\x20the\x20following\x20command\x20to\x20configure\x20Claude\x20Code\x20MCP:','9261854yGquGn','182628kGOUbf','utf8','message','Cursor\x20Rules\x20file\x20already\x20exists,\x20skipping','mcp-claude'];a110_0x2a1c=function(){return _0x690bb1;};return a110_0x2a1c();}export async function configureCursorMcp(_0x275c6b,_0x197291){const _0x2bcab2=a110_0x95ea9;try{const {appcode:_0x43ac8f,env:_0x305634}=getAppConfig(),_0xad543e=join(_0x275c6b,_0x2bcab2(0x1ea)),_0x3e9a3c=join(_0xad543e,_0x2bcab2(0x1d8));ensureDir(_0xad543e);const _0x3f66a5=buildMcpServerConfig(_0x43ac8f,_0x305634,_0x197291);let _0x55030e;if(existsSync(_0x3e9a3c)){const _0x3aa0ee=readFileSync(_0x3e9a3c,_0x2bcab2(0x1cd));_0x55030e=JSON[_0x2bcab2(0x1bd)](_0x3aa0ee),!_0x55030e['mcpServers']&&(_0x55030e[_0x2bcab2(0x1dc)]={}),logger['info'](_0x2bcab2(0x1f5),_0x2bcab2(0x1ef),{'path':_0x3e9a3c,'appcode':_0x43ac8f,'env':_0x305634});}else _0x55030e={'mcpServers':{}},logger[_0x2bcab2(0x1db)]('mcp-cursor',_0x2bcab2(0x1e4),{'path':_0x3e9a3c,'appcode':_0x43ac8f,'env':_0x305634});_0x55030e[_0x2bcab2(0x1dc)][MCP_SERVER_NAME]=_0x3f66a5,writeFileSync(_0x3e9a3c,JSON[_0x2bcab2(0x1ee)](_0x55030e,null,0x2),{'encoding':_0x2bcab2(0x1cd)});const _0x1c712f=await copyCursorRules(_0x275c6b),_0x19daa4=[_0x2bcab2(0x1b8),_0x2bcab2(0x1d7)+_0x43ac8f];return _0x305634!==_0x2bcab2(0x1dd)&&_0x19daa4[_0x2bcab2(0x1ed)](_0x2bcab2(0x1e1)+_0x305634),_0x19daa4[_0x2bcab2(0x1ed)](_0x2bcab2(0x1c9)),_0x1c712f&&_0x19daa4[_0x2bcab2(0x1ed)](_0x2bcab2(0x1c4)),logger[_0x2bcab2(0x1db)]('mcp-cursor','\x0a✓\x20Cursor\x20MCP\x20configured\x20successfully!\x0a',{'appcode':_0x43ac8f,'env':_0x305634,'configPath':_0x3e9a3c}),{'success':!![],'message':_0x19daa4[_0x2bcab2(0x1f9)]('\x0a')};}catch(_0x311db4){return logger['error'](_0x2bcab2(0x1f5),_0x2bcab2(0x1e9)+(_0x311db4 instanceof Error?_0x311db4['message']:String(_0x311db4))+'\x0a',{'error':_0x311db4 instanceof Error?_0x311db4[_0x2bcab2(0x1ce)]:String(_0x311db4)}),{'success':![],'message':_0x311db4 instanceof Error?_0x311db4['message']:String(_0x311db4)};}}export function configureClaudeMcp(_0x488c2a,_0x1787c1){const _0x15b4ae=a110_0x95ea9;try{const {appcode:_0x23767c,env:_0xcbbd29}=getAppConfig();copyAgentsMd(_0x488c2a);const _0x1d2004=buildMcpArgs(_0x1787c1),_0x23a0c0=_0x15b4ae(0x1bc)+MCP_SERVER_NAME+'\x20'+MCP_COMMAND+'\x20'+_0x1d2004[_0x15b4ae(0x1f9)]('\x20')+_0x15b4ae(0x1f0)+_0x23767c,_0xbbfd97=_0xcbbd29!==_0x15b4ae(0x1dd)?_0x15b4ae(0x1d2)+_0xcbbd29:'',_0x25be1f=''+_0x23a0c0+_0xbbfd97,_0x190500=[_0x15b4ae(0x1ca),_0x15b4ae(0x1d3),''+_0x25be1f,_0x15b4ae(0x1d3),'Configuration:',_0x15b4ae(0x1d7)+_0x23767c];return _0xcbbd29!==_0x15b4ae(0x1dd)&&_0x190500[_0x15b4ae(0x1ed)](_0x15b4ae(0x1e1)+_0xcbbd29),_0x190500['push'](_0x15b4ae(0x1e2)),logger[_0x15b4ae(0x1db)](_0x15b4ae(0x1d0),_0x15b4ae(0x1be),{'appcode':_0x23767c,'env':_0xcbbd29,'command':_0x25be1f}),{'success':!![],'message':_0x190500[_0x15b4ae(0x1f9)]('\x0a'),'needsManualAction':!![]};}catch(_0x2671e6){return logger[_0x15b4ae(0x1ba)](_0x15b4ae(0x1d0),_0x15b4ae(0x1e9)+(_0x2671e6 instanceof Error?_0x2671e6[_0x15b4ae(0x1ce)]:String(_0x2671e6))+'\x0a',{'error':_0x2671e6 instanceof Error?_0x2671e6[_0x15b4ae(0x1ce)]:String(_0x2671e6)}),{'success':![],'message':_0x2671e6 instanceof Error?_0x2671e6['message']:String(_0x2671e6)};}}export function showOtherMcpGuide(_0x431b90,_0x2c5f44){const _0x334b40=a110_0x95ea9;try{const {appcode:_0x2f5510,env:_0x3e6699}=getAppConfig(),_0x56ea8a=buildMcpServerConfig(_0x2f5510,_0x3e6699,_0x2c5f44),_0x126582=buildMcpArgs(_0x2c5f44),_0xa84436=[_0x334b40(0x1eb)+_0x2f5510+'\x22'];_0x3e6699!=='production'&&_0xa84436[_0x334b40(0x1ed)](_0x334b40(0x1d5)+_0x3e6699+'\x22');const _0x3c37dd=_0x3e6699!==_0x334b40(0x1dd)?',\x20env='+_0x3e6699:'',_0x57bb79=[_0x334b40(0x1e8)+_0x2f5510+_0x3c37dd,'{','\x20\x20\x22mcpServers\x22:\x20{','\x20\x20\x20\x20\x22lovrabet-dataset\x22:\x20{',_0x334b40(0x1e7),_0x334b40(0x1f7)+JSON[_0x334b40(0x1ee)](_0x126582)+',','\x20\x20\x20\x20\x20\x20\x22env\x22:\x20{',..._0xa84436['map'](_0xbc4260=>'\x20\x20\x20\x20\x20\x20\x20\x20'+_0xbc4260+','),_0x334b40(0x1c6),_0x334b40(0x1e3),_0x334b40(0x1c8),'}',_0x334b40(0x1c5)];return logger['info'](_0x334b40(0x1d4),_0x334b40(0x1d9),{'appcode':_0x2f5510,'env':_0x3e6699}),{'success':!![],'message':_0x57bb79[_0x334b40(0x1f9)]('\x0a'),'needsManualAction':!![]};}catch(_0x3085bd){return{'success':![],'message':_0x3085bd instanceof Error?_0x3085bd[_0x334b40(0x1ce)]:String(_0x3085bd)};}}function ensureDir(_0x355092){!existsSync(_0x355092)&&mkdirSync(_0x355092,{'recursive':!![]});}export async function installMcp(_0xfc8981,_0x4c16c3,_0x50558e=process[a110_0x95ea9(0x1c0)]()){const _0x1a9114=a110_0x95ea9,_0x11f600=[];for(const _0x1cce70 of _0xfc8981){try{let _0x338341;switch(_0x1cce70){case'cursor':_0x338341=await configureCursorMcp(_0x50558e,_0x4c16c3);break;case _0x1a9114(0x1df):_0x338341=configureClaudeMcp(_0x50558e,_0x4c16c3);break;case'other':_0x338341=showOtherMcpGuide(_0x50558e,_0x4c16c3);break;default:_0x338341={'success':![],'message':_0x1a9114(0x1fa)+_0x1cce70};}_0x11f600[_0x1a9114(0x1ed)]({'ide':_0x1cce70,'success':_0x338341[_0x1a9114(0x1f8)],'message':_0x338341[_0x1a9114(0x1ce)],'needsManualAction':_0x338341[_0x1a9114(0x1e5)]});}catch(_0x45ee92){_0x11f600[_0x1a9114(0x1ed)]({'ide':_0x1cce70,'success':![],'message':_0x45ee92 instanceof Error?_0x45ee92[_0x1a9114(0x1ce)]:String(_0x45ee92)});}}return _0x11f600;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x580f93,_0x4938af){const _0x1299ff=a111_0x23e2,_0x578d5e=_0x580f93();while(!![]){try{const _0x40ebd6=-parseInt(_0x1299ff(0x12c))/0x1*(parseInt(_0x1299ff(0x134))/0x2)+-parseInt(_0x1299ff(0x127))/0x3*(-parseInt(_0x1299ff(0x123))/0x4)+parseInt(_0x1299ff(0x136))/0x5*(-parseInt(_0x1299ff(0x143))/0x6)+parseInt(_0x1299ff(0x129))/0x7+-parseInt(_0x1299ff(0x125))/0x8+-parseInt(_0x1299ff(0x140))/0x9*(-parseInt(_0x1299ff(0x130))/0xa)+parseInt(_0x1299ff(0x135))/0xb;if(_0x40ebd6===_0x4938af)break;else _0x578d5e['push'](_0x578d5e['shift']());}catch(_0x364bda){_0x578d5e['push'](_0x578d5e['shift']());}}}(a111_0x50eb,0x7f085));import{logger}from'../utils/logger.js';import{NPX_SKILLS_ADD_COMMAND_LINE}from'./npx-skills-add.js';function a111_0x23e2(_0x157db6,_0x2cc9a1){_0x157db6=_0x157db6-0x123;const _0x50ebea=a111_0x50eb();let _0x23e291=_0x50ebea[_0x157db6];return _0x23e291;}export function camelCaseFlagsToKebab(_0x3b278b){const _0x5b5623=a111_0x23e2,_0x32a7eb=[];for(const [_0x42cc33,_0x439c74]of Object['entries'](_0x3b278b)){if(_0x439c74===!![]){const _0x54e380=_0x42cc33[_0x5b5623(0x145)](/([A-Z])/g,_0x5b5623(0x133))[_0x5b5623(0x138)]();_0x32a7eb[_0x5b5623(0x12f)](_0x54e380);}}return _0x32a7eb;}export function parseDynamicFlags(){const _0x3903c6=a111_0x23e2,_0x17757a=[];for(let _0x1b200b=0x3;_0x1b200b<process[_0x3903c6(0x124)][_0x3903c6(0x13a)];_0x1b200b++){const _0x1b2673=process[_0x3903c6(0x124)][_0x1b200b];if(_0x1b2673&&_0x1b2673[_0x3903c6(0x12e)]('--')){const _0x1c84cd=_0x1b2673['slice'](0x2);_0x1c84cd&&!_0x1c84cd[_0x3903c6(0x144)]('=')&&_0x17757a['push'](_0x1c84cd);}}return _0x17757a;}export function getAllProvidedFlags(_0x17ef0d){const _0xac8325=camelCaseFlagsToKebab(_0x17ef0d),_0x458e35=parseDynamicFlags(),_0x41b7be=new Set([..._0xac8325,..._0x458e35]);return Array['from'](_0x41b7be);}function a111_0x50eb(){const _0x25074d=['argv','6782272xfvAYX','\x0aAvailable\x20commands:','15FfhVWG','\x20\x20rabetbase\x20skill\x20install\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Interactive\x20skill\x20installation','6475350twMZIU','不支持的命令:\x20','enable-bff-save','2rbAqVB','log','startsWith','push','90agtJNo','\x20\x20rabetbase\x20skill\x20--help\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20#\x20Show\x20help\x0a','skill','-$1','282306poSTgx','3194961yLqDkP','5pyjIeO','setLogPath','toLowerCase','Error:\x20Unsupported\x20command:\x20','length','help','cwd','(empty)','Equivalent\x20command:\x20','--help','628038TtsIZw','add','from','4433394jrvgMk','includes','replace','\x0aLovrabet\x20Skill\x20-\x20Developer\x20Skill\x20Installation\x20Tool\x0a\x0aUsage:\x0a\x20\x20rabetbase\x20skill\x20--help\x0a\x20\x20rabetbase\x20skill\x20install\x0a\x0aEquivalent\x20command:\x20','436620geuXIZ'];a111_0x50eb=function(){return _0x25074d;};return a111_0x50eb();}export function normalizeLegacyBffSaveFlags(_0x1d5984){const _0x56038e=a111_0x23e2,_0x78059d=new Set(_0x1d5984);return _0x78059d['has']('dangerously-bff-save')&&_0x78059d[_0x56038e(0x141)](_0x56038e(0x12b)),Array[_0x56038e(0x142)](_0x78059d);}export async function skillsCommand(_0x2b8b40,_0x1aae80,_0x102590){const _0x57567a=a111_0x23e2;logger[_0x57567a(0x137)](process[_0x57567a(0x13c)]());if(_0x102590?.[_0x57567a(0x13b)]||_0x2b8b40===_0x57567a(0x13f)){showHelp();return;}console['error'](_0x57567a(0x139)+(_0x2b8b40||_0x57567a(0x13d))),console['log'](_0x57567a(0x126)),console[_0x57567a(0x12d)](_0x57567a(0x128)),console['log'](_0x57567a(0x131)),console[_0x57567a(0x12d)](''),console[_0x57567a(0x12d)](_0x57567a(0x13e)+NPX_SKILLS_ADD_COMMAND_LINE),logger['error'](_0x57567a(0x132),_0x57567a(0x12a)+_0x2b8b40),process['exit'](0x1);}function showHelp(){const _0x26737a=a111_0x23e2;console['log'](_0x26737a(0x146)+NPX_SKILLS_ADD_COMMAND_LINE+'\x0a\x0aNote:\x20npx\x20skills\x20selects\x20the\x20agent\x20and\x20writes\x20files;\x20guides\x20live\x20under\x20skills/lovrabet/guides/.\x0a');}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a112_0x218d23=a112_0x5bba;(function(_0x54022a,_0x19f7f0){const _0x25a27a=a112_0x5bba,_0x122b80=_0x54022a();while(!![]){try{const _0x233f39=-parseInt(_0x25a27a(0xca))/0x1+-parseInt(_0x25a27a(0xc1))/0x2+parseInt(_0x25a27a(0xc8))/0x3*(parseInt(_0x25a27a(0xc2))/0x4)+-parseInt(_0x25a27a(0xb8))/0x5+parseInt(_0x25a27a(0xb6))/0x6+parseInt(_0x25a27a(0xba))/0x7*(parseInt(_0x25a27a(0xc0))/0x8)+parseInt(_0x25a27a(0xc3))/0x9*(parseInt(_0x25a27a(0xc4))/0xa);if(_0x233f39===_0x19f7f0)break;else _0x122b80['push'](_0x122b80['shift']());}catch(_0x25b9ab){_0x122b80['push'](_0x122b80['shift']());}}}(a112_0x278d,0x68271));import{spawnSync}from'node:child_process';export const NPX_FLAG_YES='-y';export const NPX_SKILLS_CLI=a112_0x218d23(0xbf);export const NPX_SKILLS_SUBCOMMAND_ADD=a112_0x218d23(0xc5);export const NPX_SKILLS_FLAG_SKILL=a112_0x218d23(0xb3);export const RABETBASE_SKILL_SOURCE=a112_0x218d23(0xc9);export const DEFAULT_RABETBASE_SKILL_NAME=a112_0x218d23(0xb5);export function buildNpxSkillsAddArgv(_0x5555c9=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x5555c9];}export const NPX_SKILLS_ADD_COMMAND_LINE=[a112_0x218d23(0xbd),...buildNpxSkillsAddArgv()]['join']('\x20');function a112_0x5bba(_0x22b419,_0x521a39){_0x22b419=_0x22b419-0xb3;const _0x278dd2=a112_0x278d();let _0x5bbaa7=_0x278dd2[_0x22b419];return _0x5bbaa7;}function a112_0x278d(){const _0x4aa7e1=['Lovrabet','5090268pJKIxL','exit\x20','2840915bWwvJZ','skill','4405779YvdnqJ','env','toString','npx','pipe','skills','8wHEAMm','1470982QgqWzl','2745716inyziU','774108gfvyuW','10cykljP','add','platform','stdout','3uSMnsf','lovrabet/lovrabet-skill','519933YraTgl','--skill','trim'];a112_0x278d=function(){return _0x4aa7e1;};return a112_0x278d();}export function shouldSkipNpxSkillsAdd(){const _0xda7c55=a112_0x218d23;return process[_0xda7c55(0xbb)]['RABETBASE_SKIP_NPX_SKILLS']==='1';}export function runNpxSkillsAdd(_0xa743db,_0x20ca69){const _0x4ba683=a112_0x218d23;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x18689b=_0x20ca69?.['stdio']??'inherit',_0x253a91=process[_0x4ba683(0xc6)]==='win32'?'npx.cmd':_0x4ba683(0xbd),_0x128cff=buildNpxSkillsAddArgv(_0x20ca69?.[_0x4ba683(0xb9)]??DEFAULT_RABETBASE_SKILL_NAME),_0x12ed33=[_0x253a91,..._0x128cff]['join']('\x20');console['log']('*\x20'+_0x12ed33);const _0x19f685=spawnSync(_0x253a91,_0x128cff,{'cwd':_0xa743db,'stdio':_0x18689b,'env':process[_0x4ba683(0xbb)],'shell':![]}),_0x1973d9=_0x19f685['status'];if(_0x1973d9===0x0)return{'ok':!![],'status':0x0};let _0x299c09=_0x4ba683(0xb7)+(_0x1973d9??'unknown');if(_0x18689b===_0x4ba683(0xbe)){const _0x4d4d70=_0x19f685['stderr']?_0x19f685['stderr'][_0x4ba683(0xbc)]()[_0x4ba683(0xb4)]():'',_0x265366=_0x19f685[_0x4ba683(0xc7)]?_0x19f685[_0x4ba683(0xc7)][_0x4ba683(0xbc)]()['trim']():'';if(_0x4d4d70)_0x299c09=_0x4d4d70;else{if(_0x265366)_0x299c09=_0x265366;}}return{'ok':![],'status':_0x1973d9??null,'error':_0x299c09};}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x51f2fc,_0x2a7aa2){const _0x549f20=a114_0x3892,_0x40f44d=_0x51f2fc();while(!![]){try{const _0xd527f9=-parseInt(_0x549f20(0x172))/0x1*(-parseInt(_0x549f20(0x16b))/0x2)+parseInt(_0x549f20(0x16c))/0x3+parseInt(_0x549f20(0x170))/0x4*(-parseInt(_0x549f20(0x16f))/0x5)+parseInt(_0x549f20(0x15b))/0x6*(-parseInt(_0x549f20(0x16e))/0x7)+-parseInt(_0x549f20(0x160))/0x8*(parseInt(_0x549f20(0x162))/0x9)+-parseInt(_0x549f20(0x167))/0xa+-parseInt(_0x549f20(0x16d))/0xb*(-parseInt(_0x549f20(0x169))/0xc);if(_0xd527f9===_0x2a7aa2)break;else _0x40f44d['push'](_0x40f44d['shift']());}catch(_0x279659){_0x40f44d['push'](_0x40f44d['shift']());}}}(a114_0xe1db,0x318cc));import{jsxs as a114_0x485a6e,jsx as a114_0x3cf895}from'react/jsx-runtime';import{Text,Box}from'ink';export function IDESelector({ideList:_0xbcd5c7,title:_0x5a5f48,selection:_0x2c07f0}){const _0x19e3d2=a114_0x3892,{selectedIndexes:_0x5595a0,highlightIndex:_0x54572e,errorMsg:_0x17e9a6}=_0x2c07f0;return a114_0x485a6e(Box,{'flexDirection':_0x19e3d2(0x15d),'marginTop':0x1,'children':[a114_0x3cf895(Box,{'children':a114_0x485a6e(Text,{'color':_0x19e3d2(0x173),'children':['*\x20',_0x5a5f48]})}),_0x17e9a6&&a114_0x3cf895(Box,{'marginTop':0x1,'children':a114_0x485a6e(Text,{'color':_0x19e3d2(0x15f),'children':['✗\x20',_0x17e9a6]})}),a114_0x485a6e(Box,{'marginTop':0x1,'flexDirection':_0x19e3d2(0x15d),'children':[a114_0x3cf895(Text,{'bold':!![],'children':_0x19e3d2(0x166)}),_0xbcd5c7['map']((_0x417768,_0x7a7dd6)=>{const _0x2cbf7c=_0x19e3d2,_0x4937d2=_0x54572e===_0x7a7dd6,_0x2a62d3=_0x5595a0[_0x2cbf7c(0x16a)](_0x7a7dd6);return a114_0x3cf895(Box,{'children':a114_0x485a6e(Text,{'backgroundColor':_0x4937d2?_0x2cbf7c(0x15c):undefined,'color':_0x4937d2?_0x2cbf7c(0x171):undefined,'children':['\x20\x20',_0x2a62d3?_0x2cbf7c(0x15e):_0x2cbf7c(0x168),'\x20',_0x417768['name'],'\x20',a114_0x485a6e(Text,{'color':_0x4937d2?_0x2cbf7c(0x171):_0x2cbf7c(0x165),'dimColor':!_0x4937d2,'children':['-\x20',_0x417768[_0x2cbf7c(0x164)]]})]})},_0x417768[_0x2cbf7c(0x161)]);}),a114_0x3cf895(Box,{'marginTop':0x1,'children':a114_0x3cf895(Text,{'color':_0x19e3d2(0x165),'children':_0x19e3d2(0x163)})})]})]});}export{useIDESelection}from'./useIDESelection.js';function a114_0x3892(_0x438f5f,_0x3cc8a9){_0x438f5f=_0x438f5f-0x15b;const _0xe1dbc5=a114_0xe1db();let _0x38922a=_0xe1dbc5[_0x438f5f];return _0x38922a;}function a114_0xe1db(){const _0x133b17=['cyan','6rPUiyp','blue','column','[✓]','red','952TvaPGb','key','9621QztCqq','\x20↑/↓:\x20Move\x20\x20Space:\x20Toggle\x20\x20a:\x20All\x20\x20i/r:\x20Invert\x20\x20q:\x20Quit\x20\x20Enter:\x20Confirm','description','gray','*\x20Select\x20IDEs\x20to\x20configure:','1442550rjwOBY','[\x20]','36CzYXJZ','has','5660EnHZUW','615954uiVmSm','2447907OHlrRy','1242647Rvxxwd','10SIBMMo','453292akJlMy','white','2JiYyhq'];a114_0xe1db=function(){return _0x133b17;};return a114_0xe1db();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a115_0x339b(_0x4a0824,_0x6f8521){_0x4a0824=_0x4a0824-0xd6;const _0x3845ac=a115_0x3845();let _0x339b42=_0x3845ac[_0x4a0824];return _0x339b42;}(function(_0x557853,_0x52a453){const _0x70efe9=a115_0x339b,_0x3826ce=_0x557853();while(!![]){try{const _0x409376=-parseInt(_0x70efe9(0xe6))/0x1+parseInt(_0x70efe9(0xdb))/0x2+parseInt(_0x70efe9(0xd7))/0x3*(-parseInt(_0x70efe9(0xe5))/0x4)+parseInt(_0x70efe9(0xe9))/0x5*(parseInt(_0x70efe9(0xd8))/0x6)+parseInt(_0x70efe9(0xe1))/0x7*(parseInt(_0x70efe9(0xda))/0x8)+parseInt(_0x70efe9(0xdf))/0x9*(parseInt(_0x70efe9(0xdd))/0xa)+-parseInt(_0x70efe9(0xeb))/0xb*(parseInt(_0x70efe9(0xea))/0xc);if(_0x409376===_0x52a453)break;else _0x3826ce['push'](_0x3826ce['shift']());}catch(_0x48828d){_0x3826ce['push'](_0x3826ce['shift']());}}}(a115_0x3845,0x23255));import{useState,useCallback}from'react';export function useIDESelection({ideList:_0x4ffbde,preselectedIDEs:preselectedIDEs=[],multiSelect:multiSelect=!![]}){const _0x7537a2=a115_0x339b,[_0x193fc0,_0xf69840]=useState(new Set(preselectedIDEs['map'](_0x48f815=>_0x4ffbde['findIndex'](_0x2a693b=>_0x2a693b['key']===_0x48f815))[_0x7537a2(0xe7)](_0x985d6b=>_0x985d6b>=0x0))),[_0x4fd8d5,_0x4d219f]=useState(0x0),[_0x19da89,_0x39b8c8]=useState(''),_0x6f89e3=useCallback(()=>{const _0x1426d1=_0x7537a2;_0x4d219f(_0x2be264=>_0x2be264>0x0?_0x2be264-0x1:_0x4ffbde[_0x1426d1(0xe3)]-0x1);},[_0x4ffbde[_0x7537a2(0xe3)]]),_0x438e5b=useCallback(()=>{const _0x559637=_0x7537a2;_0x4d219f(_0x3b8d0c=>_0x3b8d0c<_0x4ffbde[_0x559637(0xe3)]-0x1?_0x3b8d0c+0x1:0x0);},[_0x4ffbde[_0x7537a2(0xe3)]]),_0x5ed646=useCallback(()=>{if(!multiSelect){_0xf69840(new Set([_0x4fd8d5]));return;}_0xf69840(_0x168448=>{const _0x595a9b=a115_0x339b,_0x8015db=new Set(_0x168448);return _0x8015db[_0x595a9b(0xe0)](_0x4fd8d5)?_0x8015db[_0x595a9b(0xd9)](_0x4fd8d5):_0x8015db[_0x595a9b(0xe2)](_0x4fd8d5),_0x8015db;});},[_0x4fd8d5,multiSelect]),_0x476f1f=useCallback(()=>{const _0x5531d5=_0x7537a2;_0xf69840(new Set(_0x4ffbde[_0x5531d5(0xde)]((_0x427e7e,_0x1f7ad2)=>_0x1f7ad2)));},[_0x4ffbde]),_0x217b9d=useCallback(()=>{_0xf69840(_0x48d44b=>{const _0x406927=a115_0x339b,_0x213ac4=new Set();for(let _0x47125e=0x0;_0x47125e<_0x4ffbde[_0x406927(0xe3)];_0x47125e++){!_0x48d44b[_0x406927(0xe0)](_0x47125e)&&_0x213ac4[_0x406927(0xe2)](_0x47125e);}return _0x213ac4;});},[_0x4ffbde]),_0x1a4590=useCallback(()=>{const _0x4aa206=_0x7537a2;return Array[_0x4aa206(0xe8)](_0x193fc0)['map'](_0x326c63=>_0x4ffbde[_0x326c63]?.[_0x4aa206(0xe4)])['filter'](_0x4b694a=>_0x4b694a!==undefined);},[_0x193fc0,_0x4ffbde]),_0x186d5b=useCallback(()=>{const _0x3a8acb=_0x7537a2;return _0x193fc0['size']===_0x4ffbde[_0x3a8acb(0xe3)];},[_0x193fc0,_0x4ffbde]),_0xd51217=useCallback((_0x263de6,_0x5e3a67)=>{const _0x4c6c11=_0x7537a2;if(_0x5e3a67[_0x4c6c11(0xdc)])return _0x6f89e3(),!![];if(_0x5e3a67[_0x4c6c11(0xd6)])return _0x438e5b(),!![];if(_0x263de6==='\x20')return _0x5ed646(),!![];if(_0x263de6==='a'||_0x263de6==='A')return _0x476f1f(),!![];if(_0x263de6==='i'||_0x263de6==='I'||_0x263de6==='r'||_0x263de6==='R')return _0x217b9d(),!![];return![];},[_0x6f89e3,_0x438e5b,_0x5ed646,_0x476f1f,_0x217b9d]);return{'selectedIndexes':_0x193fc0,'highlightIndex':_0x4fd8d5,'errorMsg':_0x19da89,'setErrorMsg':_0x39b8c8,'handleKeyDown':_0xd51217,'getSelectedIDEs':_0x1a4590,'isAllSelected':_0x186d5b,'toggleSelection':_0x5ed646,'selectAll':_0x476f1f,'invertSelection':_0x217b9d,'moveHighlightUp':_0x6f89e3,'moveHighlightDown':_0x438e5b};}function a115_0x3845(){const _0x359976=['map','9ohTkNx','has','70hbqQdd','add','length','key','9416UzGYiI','5665ATGCNg','filter','from','3470RaDVAG','4633404ZlGmRF','11PuWlvW','downArrow','66UzipYz','786VoLPjT','delete','218464fkpMcR','278360XxnILu','upArrow','843530mRzuno'];a115_0x3845=function(){return _0x359976;};return a115_0x3845();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a116_0xf16b(){const _0x1bd6fa=['Codex\x20IDE','1676864wYyiRE','SKILL.md.tpl','.windsurf/workflows/rabetbase.md','codex','OpenCode','.trae/skills/lovrabet/SKILL.md','claude','qoder','.cursor/skills/rabetbase.md','.qoder','file','.agent/skills/lovrabet/SKILL.md','OpenCode\x20IDE','.claude','4455252nVOJPj','.codebuddy/skills/lovrabet/SKILL.md','.opencode/skills/lovrabet/SKILL.md','codebuddy','740847SaMcOi','3282YZkCta','.agent','Claude\x20Code','2718051uQnMFp','12050HrWHoi','Cline','opencode','Qoder\x20IDE','其他\x20(通用模板)','cline','antigravity','trae','Trae','windsurf','Antigravity\x20IDE','.cline/skills/lovrabet/SKILL.md','.cursorrules','3618054DTVNCJ','4110336HaSzES','.claude/skills/lovrabet/SKILL.md','Trae\x20IDE','agent','cursor','Qoder','Cline\x20IDE','2MYvFuU','Windsurf','Cursor','.codex','.codex/skills/lovrabet/SKILL.md','.qoder/rules/rabetbase.md','Antigravity','CodeBuddy\x20IDE'];a116_0xf16b=function(){return _0x1bd6fa;};return a116_0xf16b();}const a116_0x39b2c7=a116_0x3b36;(function(_0x24ab9f,_0x4c23ea){const _0x4c52de=a116_0x3b36,_0x211688=_0x24ab9f();while(!![]){try{const _0x3e38b3=parseInt(_0x4c52de(0x1a0))/0x1+-parseInt(_0x4c52de(0x1ba))/0x2*(-parseInt(_0x4c52de(0x1a4))/0x3)+-parseInt(_0x4c52de(0x19c))/0x4+-parseInt(_0x4c52de(0x1a5))/0x5*(-parseInt(_0x4c52de(0x1a1))/0x6)+-parseInt(_0x4c52de(0x1c3))/0x7+-parseInt(_0x4c52de(0x1b3))/0x8+-parseInt(_0x4c52de(0x1b2))/0x9;if(_0x3e38b3===_0x4c23ea)break;else _0x211688['push'](_0x211688['shift']());}catch(_0x1f7e77){_0x211688['push'](_0x211688['shift']());}}}(a116_0xf16b,0xa9ea3));export const CORE_IDE_CONFIGS={'cursor':{'name':a116_0x39b2c7(0x1bc),'description':'Cursor\x20IDE','folders':[a116_0x39b2c7(0x1b1),'.cursor'],'files':[{'type':a116_0x39b2c7(0x198),'path':a116_0x39b2c7(0x1cb),'template':'SKILL.md.tpl'}]},'windsurf':{'name':a116_0x39b2c7(0x1bb),'description':'Windsurf\x20IDE','folders':['.windsurf'],'files':[{'type':a116_0x39b2c7(0x198),'path':a116_0x39b2c7(0x1c5),'template':a116_0x39b2c7(0x1c4)}]},'claude':{'name':a116_0x39b2c7(0x1a3),'description':'Claude\x20Code','folders':[a116_0x39b2c7(0x19b)],'files':[{'type':'file','path':a116_0x39b2c7(0x1b4),'template':a116_0x39b2c7(0x1c4)}]},'cline':{'name':a116_0x39b2c7(0x1a6),'description':a116_0x39b2c7(0x1b9),'folders':['.cline'],'files':[{'type':a116_0x39b2c7(0x198),'path':a116_0x39b2c7(0x1b0),'template':a116_0x39b2c7(0x1c4)}]},'codex':{'name':'Codex','description':a116_0x39b2c7(0x1c2),'folders':[a116_0x39b2c7(0x1bd)],'files':[{'type':'file','path':a116_0x39b2c7(0x1be),'template':a116_0x39b2c7(0x1c4)}]},'opencode':{'name':a116_0x39b2c7(0x1c7),'description':a116_0x39b2c7(0x19a),'folders':['.opencode'],'files':[{'type':a116_0x39b2c7(0x198),'path':a116_0x39b2c7(0x19e),'template':a116_0x39b2c7(0x1c4)}]},'qoder':{'name':a116_0x39b2c7(0x1b8),'description':a116_0x39b2c7(0x1a8),'folders':[a116_0x39b2c7(0x1cc)],'files':[{'type':'file','path':a116_0x39b2c7(0x1bf),'template':a116_0x39b2c7(0x1c4)},{'type':a116_0x39b2c7(0x198),'path':'.qoder/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]},'codebuddy':{'name':'CodeBuddy','description':a116_0x39b2c7(0x1c1),'folders':['.codebuddy'],'files':[{'type':a116_0x39b2c7(0x198),'path':a116_0x39b2c7(0x19d),'template':a116_0x39b2c7(0x1c4)}]},'trae':{'name':a116_0x39b2c7(0x1ad),'description':a116_0x39b2c7(0x1b5),'folders':['.trae'],'files':[{'type':a116_0x39b2c7(0x198),'path':a116_0x39b2c7(0x1c8),'template':'SKILL.md.tpl'}]}};function a116_0x3b36(_0x122bd8,_0x56cd77){_0x122bd8=_0x122bd8-0x198;const _0xf16b8d=a116_0xf16b();let _0x3b3691=_0xf16b8d[_0x122bd8];return _0x3b3691;}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a116_0x39b2c7(0x1a9),'description':'通用模板\x20-\x20兜底方案','folders':['.agent'],'files':[{'type':a116_0x39b2c7(0x198),'path':a116_0x39b2c7(0x199),'template':a116_0x39b2c7(0x1c4)}]},'antigravity':{'name':a116_0x39b2c7(0x1c0),'description':a116_0x39b2c7(0x1af),'folders':[a116_0x39b2c7(0x1a2)],'files':[{'type':a116_0x39b2c7(0x198),'path':a116_0x39b2c7(0x199),'template':'SKILL.md.tpl'}]}};export const CORE_IDE_LIST=[a116_0x39b2c7(0x1c9),a116_0x39b2c7(0x1aa),a116_0x39b2c7(0x19f),'codex',a116_0x39b2c7(0x1b7),a116_0x39b2c7(0x1a7),a116_0x39b2c7(0x1ca),a116_0x39b2c7(0x1ac),'windsurf'];export const IDE_LIST=[a116_0x39b2c7(0x1ab),a116_0x39b2c7(0x1c9),a116_0x39b2c7(0x1aa),a116_0x39b2c7(0x19f),'codex',a116_0x39b2c7(0x1b7),'opencode',a116_0x39b2c7(0x1ca),a116_0x39b2c7(0x1ac),a116_0x39b2c7(0x1ae),a116_0x39b2c7(0x1b6)];export const ALL_CORE_IDES=[a116_0x39b2c7(0x1b7),a116_0x39b2c7(0x1ae),a116_0x39b2c7(0x1c9),a116_0x39b2c7(0x1aa),a116_0x39b2c7(0x1c6),a116_0x39b2c7(0x1a7),a116_0x39b2c7(0x1ca),a116_0x39b2c7(0x19f),a116_0x39b2c7(0x1ac)];export const MCP_IDES=new Set(['cursor',a116_0x39b2c7(0x1c9)]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0xcd578c,_0x58ac92){const _0x27ea5a=a117_0x4598,_0x29408d=_0xcd578c();while(!![]){try{const _0x540892=parseInt(_0x27ea5a(0x1b6))/0x1*(-parseInt(_0x27ea5a(0x1b7))/0x2)+-parseInt(_0x27ea5a(0x1b1))/0x3*(-parseInt(_0x27ea5a(0x1b2))/0x4)+-parseInt(_0x27ea5a(0x1ba))/0x5*(parseInt(_0x27ea5a(0x1b5))/0x6)+-parseInt(_0x27ea5a(0x1af))/0x7*(parseInt(_0x27ea5a(0x1b3))/0x8)+-parseInt(_0x27ea5a(0x1ad))/0x9+parseInt(_0x27ea5a(0x1b0))/0xa+parseInt(_0x27ea5a(0x1ab))/0xb;if(_0x540892===_0x58ac92)break;else _0x29408d['push'](_0x29408d['shift']());}catch(_0x2edeaf){_0x29408d['push'](_0x29408d['shift']());}}}(a117_0x15e0,0xb3c23));import{getTemplateBaseUrl}from'./config.js';export async function fetchCdnConfig(){const _0x348616=a117_0x4598;try{const _0x2d28d5=getTemplateBaseUrl(),_0x43d643=_0x2d28d5+'/config.json',_0x402a9c=await fetch(_0x43d643,{'headers':{'Accept':_0x348616(0x1b4)}});if(!_0x402a9c['ok'])return null;const _0x4a3a4b=await _0x402a9c['json']();if(!_0x4a3a4b[_0x348616(0x1ac)]?.[_0x348616(0x1b8)]||!_0x4a3a4b[_0x348616(0x1b9)]?.[_0x348616(0x1ae)]?.[_0x348616(0x1b8)])return null;return _0x4a3a4b;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8;function a117_0x15e0(){const _0x198717=['28163bGMVPn','100JxJLBL','stableVersion','sdk','5gZGaEs','now','30948126lAylAv','cli','6364449wTzYuo','node','28AEyZHq','7000530AnAaEL','6ZMTSyN','1502772CfJaiJ','2112440jqzyzz','application/json','2142498JTbSkl'];a117_0x15e0=function(){return _0x198717;};return a117_0x15e0();}function a117_0x4598(_0x4ba3c1,_0x5264eb){_0x4ba3c1=_0x4ba3c1-0x1aa;const _0x15e0a2=a117_0x15e0();let _0x45982f=_0x15e0a2[_0x4ba3c1];return _0x45982f;}export async function getCdnConfig(){const _0x5c6aae=a117_0x4598,_0x57a073=Date[_0x5c6aae(0x1aa)]();if(cachedConfig&&_0x57a073-cacheTime<CACHE_TTL)return cachedConfig;const _0x1012e5=await fetchCdnConfig();return _0x1012e5&&(cachedConfig=_0x1012e5,cacheTime=_0x57a073),_0x1012e5;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a118_0x3b787e=a118_0x5f2a;function a118_0x386e(){const _0x3306d6=['existsSync','utf8','log','test','\x20\x20\x20Upgrade\x20command:\x20','sdk','node_modules','devDependencies','version','5YvVLvP','981343cVaFyn','2029026klQZwQ','5098702MfccoS','parse','npm\x20install\x20','2771864kxpDnC','\x20\x20\x20Stable\x20version:\x20','stableVersion','dependencies','@lovrabet/sdk','1198818ZylJMW','utf-8','↪\x20SDK\x20update\x20available','8BRCQvb','some','latest','readFileSync','minVersion','join','9327840ucUpwq','all','8frNfLU','coerce','\x1b[33m','package.json','needsUpgrade','110npEyvZ','1.2.0','node','\x20\x20\x20Current\x20version:\x20','9744196KstDzn','packageName'];a118_0x386e=function(){return _0x3306d6;};return a118_0x386e();}(function(_0x324592,_0xd36499){const _0x18e398=a118_0x5f2a,_0x1fe8fe=_0x324592();while(!![]){try{const _0x277612=parseInt(_0x18e398(0x115))/0x1+parseInt(_0x18e398(0xf0))/0x2+-parseInt(_0x18e398(0xec))/0x3*(-parseInt(_0x18e398(0x100))/0x4)+-parseInt(_0x18e398(0x114))/0x5*(parseInt(_0x18e398(0xfe))/0x6)+-parseInt(_0x18e398(0xed))/0x7*(parseInt(_0x18e398(0xf8))/0x8)+parseInt(_0x18e398(0xf5))/0x9*(-parseInt(_0x18e398(0x105))/0xa)+parseInt(_0x18e398(0x109))/0xb;if(_0x277612===_0xd36499)break;else _0x1fe8fe['push'](_0x1fe8fe['shift']());}catch(_0x4465cf){_0x1fe8fe['push'](_0x1fe8fe['shift']());}}}(a118_0x386e,0xd15cb));import a118_0x1c7005 from'node:fs';import a118_0x183fad from'node:path';import a118_0x397a1d from'semver';import{getCdnConfig}from'./cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a118_0x3b787e(0x106);function isNonNumericVersion(_0x4e1a29){const _0x29174e=a118_0x3b787e,_0x4edec0=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x4edec0[_0x29174e(0xf9)](_0x327502=>_0x327502[_0x29174e(0x10e)](_0x4e1a29));}function getInstalledVersion(_0x505657,_0xb77eba){const _0x5d3122=a118_0x3b787e;try{const _0x5ba1e8=a118_0x183fad[_0x5d3122(0xfd)](_0x505657,_0x5d3122(0x111),_0xb77eba,_0x5d3122(0x103));if(a118_0x1c7005[_0x5d3122(0x10b)](_0x5ba1e8)){const _0x142d95=JSON[_0x5d3122(0xee)](a118_0x1c7005[_0x5d3122(0xfb)](_0x5ba1e8,_0x5d3122(0xf6)));return _0x142d95['version']||null;}}catch{}return null;}async function getSdkStableVersion(){try{const _0x14688d=await getCdnConfig();return _0x14688d?.['sdk']?.['node']?.['stableVersion']||null;}catch{return null;}}async function getSdkPackageName(){const _0x59b4c6=a118_0x3b787e;try{const _0x30c3ee=await getCdnConfig();return _0x30c3ee?.[_0x59b4c6(0x110)]?.[_0x59b4c6(0x107)]?.[_0x59b4c6(0x10a)]||_0x59b4c6(0xf4);}catch{return'@lovrabet/sdk';}}export async function checkSdkVersion(_0x2eac2a){const _0x209b66=a118_0x3b787e,_0x9b52cb=a118_0x183fad[_0x209b66(0xfd)](_0x2eac2a,_0x209b66(0x103)),[_0x2778ba,_0x5da98c]=await Promise[_0x209b66(0xff)]([getSdkStableVersion(),getSdkPackageName()]),_0x8fa504=_0x2778ba||FALLBACK_MIN_SDK_VERSION;if(!a118_0x1c7005[_0x209b66(0x10b)](_0x9b52cb))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x8fa504,'packageName':_0x5da98c,'stableVersion':_0x2778ba};try{const _0x50bbf8=JSON[_0x209b66(0xee)](a118_0x1c7005['readFileSync'](_0x9b52cb,_0x209b66(0x10c))),_0xbf215a=_0x50bbf8[_0x209b66(0xf3)]||{},_0x38ea05=_0x50bbf8['devDependencies']||{},_0x140309=_0xbf215a[_0x5da98c]||_0x38ea05[_0x5da98c];if(!_0x140309)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x8fa504,'packageName':_0x5da98c,'stableVersion':_0x2778ba};let _0x1ed9ef=getInstalledVersion(_0x2eac2a,_0x5da98c);!_0x1ed9ef&&(_0x1ed9ef=_0x140309);if(isNonNumericVersion(_0x140309))return{'installed':!![],'version':_0x1ed9ef,'needsUpgrade':![],'minVersion':_0x8fa504,'packageName':_0x5da98c,'stableVersion':_0x2778ba};const _0x271df1=a118_0x397a1d[_0x209b66(0x101)](_0x1ed9ef),_0x350d39=a118_0x397a1d[_0x209b66(0x101)](_0x8fa504),_0x59df26=_0x271df1&&_0x350d39?a118_0x397a1d['lt'](_0x271df1,_0x350d39):![];return{'installed':!![],'version':_0x1ed9ef,'needsUpgrade':_0x59df26,'minVersion':_0x8fa504,'packageName':_0x5da98c,'stableVersion':_0x2778ba};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x8fa504,'packageName':_0x5da98c,'stableVersion':_0x2778ba};}}function a118_0x5f2a(_0x2fb0f1,_0x1d3983){_0x2fb0f1=_0x2fb0f1-0xec;const _0x386e5d=a118_0x386e();let _0x5f2ad2=_0x386e5d[_0x2fb0f1];return _0x5f2ad2;}export function checkSdkVersionSync(_0x194f17){const _0x2df1e0=a118_0x3b787e,_0x267832=a118_0x183fad[_0x2df1e0(0xfd)](_0x194f17,_0x2df1e0(0x103)),_0x5b32cb=_0x2df1e0(0xf4);if(!a118_0x1c7005[_0x2df1e0(0x10b)](_0x267832))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5b32cb,'stableVersion':null};try{const _0x58cf1b=JSON[_0x2df1e0(0xee)](a118_0x1c7005[_0x2df1e0(0xfb)](_0x267832,_0x2df1e0(0x10c))),_0x51e22b=_0x58cf1b[_0x2df1e0(0xf3)]||{},_0x299a37=_0x58cf1b[_0x2df1e0(0x112)]||{},_0x98fca4=_0x51e22b[_0x5b32cb]||_0x299a37[_0x5b32cb];if(!_0x98fca4)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5b32cb,'stableVersion':null};let _0x2b4970=getInstalledVersion(_0x194f17,_0x5b32cb);!_0x2b4970&&(_0x2b4970=_0x98fca4);if(isNonNumericVersion(_0x98fca4))return{'installed':!![],'version':_0x2b4970,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5b32cb,'stableVersion':null};const _0x5f00c9=a118_0x397a1d[_0x2df1e0(0x101)](_0x2b4970),_0x54530c=_0x5f00c9?a118_0x397a1d['lt'](_0x5f00c9,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x2b4970,'needsUpgrade':_0x54530c,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5b32cb,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5b32cb,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x1ae28d){const _0x3f7522=a118_0x3b787e;if(!_0x1ae28d[_0x3f7522(0x104)])return;const _0x3f3984=_0x3f7522(0x102),_0x540840='\x1b[0m',_0x72d77b='\x1b[1m',_0x56a7be=_0x1ae28d[_0x3f7522(0x10a)]||'@lovrabet/sdk',_0x13f71f=_0x1ae28d[_0x3f7522(0xf2)]||_0x1ae28d[_0x3f7522(0xfc)],_0x4fb54a=_0x3f7522(0xef)+_0x56a7be+'@'+(_0x13f71f||_0x3f7522(0xfa));console[_0x3f7522(0x10d)](),console[_0x3f7522(0x10d)](''+_0x3f3984+_0x72d77b+_0x3f7522(0xf7)+_0x540840),console[_0x3f7522(0x10d)](_0x3f3984+_0x3f7522(0x108)+_0x56a7be+'@'+_0x1ae28d[_0x3f7522(0x113)]+_0x540840),console['log'](_0x3f3984+_0x3f7522(0xf1)+_0x13f71f+_0x540840),console[_0x3f7522(0x10d)](_0x3f3984+_0x3f7522(0x10f)+_0x4fb54a+_0x540840),console[_0x3f7522(0x10d)]();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x139676,_0x34bc00){const _0x42dce1=a119_0x26e7,_0x37e6b6=_0x139676();while(!![]){try{const _0x1766c3=-parseInt(_0x42dce1(0x197))/0x1+-parseInt(_0x42dce1(0x19a))/0x2*(-parseInt(_0x42dce1(0x199))/0x3)+parseInt(_0x42dce1(0x18e))/0x4*(-parseInt(_0x42dce1(0x19e))/0x5)+parseInt(_0x42dce1(0x193))/0x6*(parseInt(_0x42dce1(0x18a))/0x7)+-parseInt(_0x42dce1(0x198))/0x8*(parseInt(_0x42dce1(0x185))/0x9)+parseInt(_0x42dce1(0x195))/0xa+parseInt(_0x42dce1(0x189))/0xb;if(_0x1766c3===_0x34bc00)break;else _0x37e6b6['push'](_0x37e6b6['shift']());}catch(_0x1670e0){_0x37e6b6['push'](_0x37e6b6['shift']());}}}(a119_0x5506,0x821c0));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a119_0x1236e2 from'semver';function a119_0x26e7(_0x4d16b8,_0x242ea5){_0x4d16b8=_0x4d16b8-0x184;const _0x5506ea=a119_0x5506();let _0x26e717=_0x5506ea[_0x4d16b8];return _0x26e717;}import{getCdnConfig}from'./cdn-config.js';function a119_0x5506(){const _0x10437a=['8KMedVQ','version','\x1b[1m','some','\x1b[0m','12epLVxH','\x1b[33m','6021970RBdCOw','\x20\x20\x20Stable\x20version:\x20','10125TdpkSM','24XSXhcJ','66ydlZxJ','89486lngQhE','cli','package.json','../..','1082255AfOrld','coerce','stableVersion','1.0.0','2305746UpzsQa','parse','needsUpgrade','↪\x20New\x20version\x20available','982850HDbeUz','240254QVTQHM','utf-8','log','npm\x20install\x20-g\x20'];a119_0x5506=function(){return _0x10437a;};return a119_0x5506();}import{NPM_PACKAGE_NAME}from'../constant/cli.js';function getCurrentCliVersion(){const _0x1c2e9b=a119_0x26e7;try{const _0x35432f=fileURLToPath(import.meta.url),_0x598b9a=resolve(dirname(_0x35432f),_0x1c2e9b(0x19d)),_0xadab6b=resolve(_0x598b9a,_0x1c2e9b(0x19c)),_0x39372b=JSON[_0x1c2e9b(0x186)](readFileSync(_0xadab6b,_0x1c2e9b(0x18b)));return _0x39372b[_0x1c2e9b(0x18f)]||_0x1c2e9b(0x184);}catch{return _0x1c2e9b(0x184);}}function isNonNumericVersion(_0x566140){const _0x184146=a119_0x26e7,_0x5d90e1=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x5d90e1[_0x184146(0x191)](_0x42291c=>_0x42291c['test'](_0x566140));}export async function checkCliVersion(){const _0xdc62e5=a119_0x26e7,_0x4cf9de=getCurrentCliVersion(),_0x3d90ea=await getCdnConfig(),_0x48508e=_0x3d90ea?.[_0xdc62e5(0x19b)]?.[_0xdc62e5(0x1a0)]||null;let _0x401cf6=![];if(_0x48508e)try{const _0x4bbec5=a119_0x1236e2[_0xdc62e5(0x19f)](_0x4cf9de),_0x1d1cde=a119_0x1236e2['coerce'](_0x48508e);_0x4bbec5&&_0x1d1cde&&(_0x401cf6=a119_0x1236e2['lt'](_0x4bbec5,_0x1d1cde));}catch{_0x401cf6=![];}return{'currentVersion':_0x4cf9de,'stableVersion':_0x48508e,'needsUpgrade':_0x401cf6,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x4f17f3){const _0x25b11a=a119_0x26e7;if(!_0x4f17f3[_0x25b11a(0x187)])return;const _0x2be5e2=_0x25b11a(0x194),_0x4bae7d=_0x25b11a(0x192),_0x2dcd59=_0x25b11a(0x190),_0x41b18e=_0x25b11a(0x18d)+NPM_PACKAGE_NAME+'@latest';console['log'](),console[_0x25b11a(0x18c)](''+_0x2be5e2+_0x2dcd59+_0x25b11a(0x188)+_0x4bae7d),console['log'](_0x2be5e2+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x4f17f3['currentVersion']+_0x4bae7d),console[_0x25b11a(0x18c)](_0x2be5e2+_0x25b11a(0x196)+_0x4f17f3[_0x25b11a(0x1a0)]+_0x4bae7d),console[_0x25b11a(0x18c)](_0x2be5e2+'\x20\x20\x20Upgrade\x20command:\x20'+_0x41b18e+_0x4bae7d),console[_0x25b11a(0x18c)]();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x5405fb,_0x4f0aba){const _0x44f8aa=a120_0x317e,_0x2fbee8=_0x5405fb();while(!![]){try{const _0x3b5d13=parseInt(_0x44f8aa(0x1ab))/0x1+parseInt(_0x44f8aa(0x1a8))/0x2*(-parseInt(_0x44f8aa(0x1ad))/0x3)+parseInt(_0x44f8aa(0x1a3))/0x4*(-parseInt(_0x44f8aa(0x1af))/0x5)+-parseInt(_0x44f8aa(0x1a1))/0x6+-parseInt(_0x44f8aa(0x1a7))/0x7+parseInt(_0x44f8aa(0x1a0))/0x8*(-parseInt(_0x44f8aa(0x1b0))/0x9)+parseInt(_0x44f8aa(0x19f))/0xa*(parseInt(_0x44f8aa(0x1a6))/0xb);if(_0x3b5d13===_0x4f0aba)break;else _0x2fbee8['push'](_0x2fbee8['shift']());}catch(_0xc807fe){_0x2fbee8['push'](_0x2fbee8['shift']());}}}(a120_0x5545,0x6472c));import{initEnv}from'../constant/env.js';function a120_0x5545(){const _0x3c2e41=['https://g.lovrabet.com/dist/lovrabet-skill','99KxlaBU','477435mrMrxe','428tUluFj','trim','string','394183AozBbi','env','27CfzIat','template_base_url','123695VzRMNF','5817987JNDipR','1405410MWmJKv','8uleFps','366006cgPIuH','app','76JLxfPe','replace'];a120_0x5545=function(){return _0x3c2e41;};return a120_0x5545();}import{readRawConfig}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x101818){const _0x30e233=a120_0x317e,_0x2bad51=readRawConfig(_0x101818);return _0x2bad51[_0x30e233(0x1ac)]&&typeof _0x2bad51['env']==='string'&&initEnv(_0x2bad51['env']),_0x2bad51;}function a120_0x317e(_0x576cce,_0x2b580c){_0x576cce=_0x576cce-0x19f;const _0x5545c9=a120_0x5545();let _0x317e9a=_0x5545c9[_0x576cce];return _0x317e9a;}export function getConfigAppCode(){const _0x5b03d7=a120_0x317e,_0x176e23=readRawConfig(),_0x4e06d7=_0x176e23['appcode']||_0x176e23[_0x5b03d7(0x1a2)];if(typeof _0x4e06d7!==_0x5b03d7(0x1aa)||_0x4e06d7[_0x5b03d7(0x1a9)]()==='')return undefined;return _0x4e06d7[_0x5b03d7(0x1a9)]();}export function getTemplateBaseUrl(){const _0x380745=a120_0x317e,_0x4107ca=readRawConfig();if(_0x4107ca[_0x380745(0x1ae)]&&typeof _0x4107ca['template_base_url']===_0x380745(0x1aa))return _0x4107ca['template_base_url'][_0x380745(0x1a4)](/\/$/,'');return _0x380745(0x1a5);}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a121_0x1e2d(_0x2816c9,_0x51f9d8){_0x2816c9=_0x2816c9-0x10e;const _0xcd3cb4=a121_0xcd3c();let _0x1e2d0d=_0xcd3cb4[_0x2816c9];return _0x1e2d0d;}(function(_0x3d62f3,_0x3ff986){const _0x4b32ab=a121_0x1e2d,_0x167719=_0x3d62f3();while(!![]){try{const _0x1e31df=parseInt(_0x4b32ab(0x114))/0x1+-parseInt(_0x4b32ab(0x116))/0x2+parseInt(_0x4b32ab(0x118))/0x3+-parseInt(_0x4b32ab(0x111))/0x4+-parseInt(_0x4b32ab(0x113))/0x5+parseInt(_0x4b32ab(0x119))/0x6+parseInt(_0x4b32ab(0x115))/0x7*(-parseInt(_0x4b32ab(0x117))/0x8);if(_0x1e31df===_0x3ff986)break;else _0x167719['push'](_0x167719['shift']());}catch(_0xbab466){_0x167719['push'](_0x167719['shift']());}}}(a121_0xcd3c,0xb69d1));import a121_0x24ad9c from'node:path';import a121_0x45f30f from'node:fs';export async function copyDirectory(_0x1da8db,_0x12039a){const _0x385248=a121_0x1e2d;try{const _0x251db4=a121_0x45f30f['readdirSync'](_0x1da8db,{'withFileTypes':!![]});a121_0x45f30f['mkdirSync'](_0x12039a,{'recursive':!![]});for(const _0x108674 of _0x251db4){const _0x949d12=a121_0x24ad9c['join'](_0x1da8db,_0x108674[_0x385248(0x10e)]),_0x52153f=a121_0x24ad9c['join'](_0x12039a,_0x108674[_0x385248(0x10e)]);_0x108674[_0x385248(0x11a)]()?await copyDirectory(_0x949d12,_0x52153f):a121_0x45f30f[_0x385248(0x110)](_0x949d12,_0x52153f);}}catch(_0x3c0271){console[_0x385248(0x10f)](_0x385248(0x112),_0x3c0271);}}function a121_0xcd3c(){const _0x4f0c1e=['814748zHxjiw','复制目录时出错:','1935330INeEnS','1299115liHyue','14SRwNcV','780284ZvcJhj','4043544GHdImE','345207EZYZNw','7953492exGqBV','isDirectory','name','error','copyFileSync'];a121_0xcd3c=function(){return _0x4f0c1e;};return a121_0xcd3c();}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(_0x2fe8f9,_0x45a163){const _0x5872b6=a122_0x71d1,_0x1f93f0=_0x2fe8f9();while(!![]){try{const _0x3f52db=parseInt(_0x5872b6(0x114))/0x1*(parseInt(_0x5872b6(0x117))/0x2)+parseInt(_0x5872b6(0x10f))/0x3*(-parseInt(_0x5872b6(0x113))/0x4)+parseInt(_0x5872b6(0x116))/0x5+-parseInt(_0x5872b6(0x115))/0x6*(-parseInt(_0x5872b6(0x10e))/0x7)+parseInt(_0x5872b6(0x112))/0x8+parseInt(_0x5872b6(0x110))/0x9+-parseInt(_0x5872b6(0x111))/0xa;if(_0x3f52db===_0x45a163)break;else _0x1f93f0['push'](_0x1f93f0['shift']());}catch(_0x3fcd18){_0x1f93f0['push'](_0x1f93f0['shift']());}}}(a122_0x5c2c,0xb32c0));function a122_0x5c2c(){const _0x4e30d5=['2529756nRWmAc','5739730tlcjTg','4941776vLdudJ','1928tgQqeQ','3329SDSefr','153540LRipMC','2730370nEnsIr','298RWgfxE','49NXvfNa','5055MkNQKi'];a122_0x5c2c=function(){return _0x4e30d5;};return a122_0x5c2c();}function a122_0x71d1(_0x1e3366,_0x578189){_0x1e3366=_0x1e3366-0x10e;const _0x5c2c5f=a122_0x5c2c();let _0x71d12=_0x5c2c5f[_0x1e3366];return _0x71d12;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x59c813,_0x434137){const _0x112578=statSync(_0x59c813);if(_0x112578['isDirectory']()){!existsSync(_0x434137)&&mkdirSync(_0x434137,{'recursive':!![]});const _0x1fbd8a=readdirSync(_0x59c813);for(const _0x17a6fe of _0x1fbd8a){await copyDir(join(_0x59c813,_0x17a6fe),join(_0x434137,_0x17a6fe));}}else copyFileSync(_0x59c813,_0x434137);}export function ensureDir(_0x5474c1){!existsSync(_0x5474c1)&&mkdirSync(_0x5474c1,{'recursive':!![]});}export function pathExists(_0x17efd9){return existsSync(_0x17efd9);}
|