@lovrabet/cli 1.3.4-beta.0 → 1.3.4-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/ai-setup/AISetupUI.js +1 -1
- package/lib/ai-setup/config.js +1 -1
- package/lib/api/api-doc-ui.js +1 -1
- package/lib/api/api-doc.js +1 -1
- package/lib/api/api-pull-ui.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/main.js +1 -1
- package/lib/api/pull-silent.js +1 -1
- package/lib/app-menu/app-menu-sync-ui.js +1 -1
- package/lib/app-menu/create-menu.js +1 -1
- package/lib/app-menu/get-local-pages.js +1 -1
- package/lib/app-menu/get-online-menu-list.js +1 -1
- package/lib/app-menu/use-get-online-menu-list.js +1 -1
- package/lib/app-menu/utils.js +1 -1
- package/lib/app-menu/valid-url.js +1 -1
- package/lib/app-menu-update-cdn/current-content.js +1 -1
- package/lib/app-menu-update-cdn/input-cdn-asset.js +1 -1
- package/lib/app-menu-update-cdn/main.js +1 -1
- package/lib/app-menu-update-cdn/update-menu-cdn-url.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/cmd/build-watch.js +1 -1
- package/lib/cmd/build.js +1 -1
- package/lib/cmd/logs.js +1 -1
- package/lib/cmd/preview.js +1 -1
- package/lib/cmd/start-execa.js +1 -1
- package/lib/cmd/start.js +1 -1
- package/lib/config/config-help.js +1 -1
- package/lib/config/main.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/create-app/enhanced-guided-create.js +1 -1
- package/lib/create-app/format-elapsed.js +1 -1
- package/lib/create-app/main.js +1 -1
- package/lib/create-app/non-interactive.js +1 -1
- package/lib/create-app/task-finished.js +1 -1
- package/lib/create-app/task-loading.js +1 -1
- package/lib/create-app/task-running.js +1 -1
- package/lib/create-app/task-time.js +1 -1
- package/lib/create-app/use-copy-project-template.js +1 -1
- package/lib/create-app/use-format-code.js +1 -1
- package/lib/create-app/use-install-dependencies.js +1 -1
- package/lib/help.js +1 -1
- package/lib/i18n/I18nProvider.js +1 -1
- package/lib/i18n/hooks.js +1 -1
- package/lib/i18n/index.js +1 -1
- package/lib/i18n/locales/en-US.js +1 -1
- package/lib/i18n/locales/zh-CN.js +1 -1
- package/lib/init/main.js +1 -1
- package/lib/mcp/McpInstallUI.js +1 -1
- package/lib/mcp/claude.js +1 -1
- package/lib/mcp/cursor.js +1 -1
- package/lib/mcp/main.js +1 -1
- package/lib/mcp/mcp-install-non-interactive.js +1 -1
- package/lib/mcp/mcp-installer.js +1 -1
- package/lib/skills/SkillInstallUI.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/skill-install-non-interactive.js +1 -1
- package/lib/skills/skill-installer.js +1 -1
- package/lib/ui/IDESelector.js +1 -1
- package/lib/ui/useIDESelection.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/package.json +1 -1
- package/templates/projects/sub-app-react-demo/src/pages/index.tsx +29 -6
- package/templates/projects/sub-app-react-demo/src/pages/sdk-demo/index.tsx +3 -3
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x13d7de=a71_0x1e80;(function(_0x244eb6,_0x16e7cd){const _0x55c3df=a71_0x1e80,_0x5981c8=_0x244eb6();while(!![]){try{const _0x471d2d=parseInt(_0x55c3df(0x197))/0x1+parseInt(_0x55c3df(0x182))/0x2+parseInt(_0x55c3df(0x198))/0x3+parseInt(_0x55c3df(0x189))/0x4*(-parseInt(_0x55c3df(0x16b))/0x5)+parseInt(_0x55c3df(0x183))/0x6+parseInt(_0x55c3df(0x18f))/0x7+-parseInt(_0x55c3df(0x179))/0x8;if(_0x471d2d===_0x16e7cd)break;else _0x5981c8['push'](_0x5981c8['shift']());}catch(_0x29c933){_0x5981c8['push'](_0x5981c8['shift']());}}}(a71_0x2de9,0xa9e70));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':'Cursor\x20IDE','folders':[a71_0x13d7de(0x171),'.cursor'],'files':[{'type':a71_0x13d7de(0x196),'path':a71_0x13d7de(0x184),'template':a71_0x13d7de(0x17f)}]},'windsurf':{'name':'Windsurf','description':a71_0x13d7de(0x185),'folders':['.windsurf'],'files':[{'type':'file','path':a71_0x13d7de(0x178),'template':a71_0x13d7de(0x17f)}]},'claude':{'name':a71_0x13d7de(0x195),'description':'Claude\x20Code','folders':[a71_0x13d7de(0x181)],'files':[{'type':'file','path':'.claude/skills/lovrabet/SKILL.md','template':a71_0x13d7de(0x17f)}]},'cline':{'name':a71_0x13d7de(0x168),'description':a71_0x13d7de(0x18c),'folders':[a71_0x13d7de(0x16e)],'files':[{'type':a71_0x13d7de(0x196),'path':a71_0x13d7de(0x169),'template':a71_0x13d7de(0x17f)}]},'codex':{'name':a71_0x13d7de(0x18d),'description':a71_0x13d7de(0x16f),'folders':[a71_0x13d7de(0x175)],'files':[{'type':a71_0x13d7de(0x196),'path':a71_0x13d7de(0x199),'template':a71_0x13d7de(0x17f)}]},'opencode':{'name':a71_0x13d7de(0x176),'description':a71_0x13d7de(0x19b),'folders':['.opencode'],'files':[{'type':a71_0x13d7de(0x196),'path':a71_0x13d7de(0x16c),'template':a71_0x13d7de(0x17f)}]},'qoder':{'name':a71_0x13d7de(0x17c),'description':a71_0x13d7de(0x193),'folders':[a71_0x13d7de(0x19a)],'files':[{'type':a71_0x13d7de(0x196),'path':a71_0x13d7de(0x18e),'template':a71_0x13d7de(0x17f)},{'type':a71_0x13d7de(0x196),'path':a71_0x13d7de(0x174),'template':'SKILL.md.tpl'}]},'codebuddy':{'name':a71_0x13d7de(0x16a),'description':a71_0x13d7de(0x16d),'folders':[a71_0x13d7de(0x18a)],'files':[{'type':a71_0x13d7de(0x196),'path':a71_0x13d7de(0x187),'template':a71_0x13d7de(0x17f)}]},'trae':{'name':a71_0x13d7de(0x191),'description':a71_0x13d7de(0x17b),'folders':['.trae'],'files':[{'type':a71_0x13d7de(0x196),'path':a71_0x13d7de(0x177),'template':a71_0x13d7de(0x17f)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':'其他\x20(通用模板)','description':a71_0x13d7de(0x17e),'folders':[a71_0x13d7de(0x192)],'files':[{'type':a71_0x13d7de(0x196),'path':a71_0x13d7de(0x17a),'template':'SKILL.md.tpl'}]},'antigravity':{'name':a71_0x13d7de(0x17d),'description':a71_0x13d7de(0x19c),'folders':[a71_0x13d7de(0x192)],'files':[{'type':a71_0x13d7de(0x196),'path':a71_0x13d7de(0x17a),'template':a71_0x13d7de(0x17f)}]}};export const CORE_IDE_LIST=['claude',a71_0x13d7de(0x167),a71_0x13d7de(0x19d),a71_0x13d7de(0x170),a71_0x13d7de(0x173),a71_0x13d7de(0x180),a71_0x13d7de(0x172),a71_0x13d7de(0x190),a71_0x13d7de(0x194)];function a71_0x2de9(){const _0x315a5b=['OpenCode\x20IDE','Antigravity\x20IDE','codebuddy','cline','Cline','.cline/skills/lovrabet/SKILL.md','CodeBuddy','25tVlGZA','.opencode/skills/lovrabet/SKILL.md','CodeBuddy\x20IDE','.cline','Codex\x20IDE','codex','.cursorrules','qoder','cursor','.qoder/skills/lovrabet/SKILL.md','.codex','OpenCode','.trae/skills/lovrabet/SKILL.md','.windsurf/workflows/lovrabet.md','24853080nxHAPT','.agent/skills/lovrabet/SKILL.md','Trae\x20IDE','Qoder','Antigravity','通用模板\x20-\x20兜底方案','SKILL.md.tpl','opencode','.claude','2148534iWfdtO','7323282vXFIpN','.cursor/skills/lovrabet.md','Windsurf\x20IDE','agent','.codebuddy/skills/lovrabet/SKILL.md','claude','808396jkRJRz','.codebuddy','antigravity','Cline\x20IDE','Codex','.qoder/rules/lovrabet.md','8648024ZZlmAl','trae','Trae','.agent','Qoder\x20IDE','windsurf','Claude\x20Code','file','482507dGZMcG','2400891mdYlxz','.codex/skills/lovrabet/SKILL.md','.qoder'];a71_0x2de9=function(){return _0x315a5b;};return a71_0x2de9();}export const IDE_LIST=[a71_0x13d7de(0x18b),a71_0x13d7de(0x188),a71_0x13d7de(0x167),a71_0x13d7de(0x19d),'codex',a71_0x13d7de(0x173),a71_0x13d7de(0x180),a71_0x13d7de(0x172),a71_0x13d7de(0x190),a71_0x13d7de(0x194),a71_0x13d7de(0x186)];export const ALL_CORE_IDES=['cursor',a71_0x13d7de(0x194),a71_0x13d7de(0x188),a71_0x13d7de(0x167),'codex',a71_0x13d7de(0x180),'qoder',a71_0x13d7de(0x19d),a71_0x13d7de(0x190)];function a71_0x1e80(_0x1ad1b9,_0x4c269d){_0x1ad1b9=_0x1ad1b9-0x167;const _0x2de9b7=a71_0x2de9();let _0x1e80ed=_0x2de9b7[_0x1ad1b9];return _0x1e80ed;}export const MCP_IDES=new Set(['cursor',a71_0x13d7de(0x188)]);
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c84c7,_0x2320ed){const _0x2979e1=a72_0x14c1,_0xe35aca=_0x4c84c7();while(!![]){try{const _0x4286e1=parseInt(_0x2979e1(0x1fd))/0x1*(-parseInt(_0x2979e1(0x1f3))/0x2)+-parseInt(_0x2979e1(0x1f5))/0x3+-parseInt(_0x2979e1(0x202))/0x4+parseInt(_0x2979e1(0x1ff))/0x5*(-parseInt(_0x2979e1(0x1fe))/0x6)+-parseInt(_0x2979e1(0x203))/0x7*(parseInt(_0x2979e1(0x1f9))/0x8)+-parseInt(_0x2979e1(0x1fb))/0x9*(parseInt(_0x2979e1(0x201))/0xa)+-parseInt(_0x2979e1(0x1f2))/0xb*(-parseInt(_0x2979e1(0x1fa))/0xc);if(_0x4286e1===_0x2320ed)break;else _0xe35aca['push'](_0xe35aca['shift']());}catch(_0x4215fd){_0xe35aca['push'](_0xe35aca['shift']());}}}(a72_0x122c,0x9429a));import{getTemplateBaseUrl}from'./config.js';export async function fetchCdnConfig(){const _0x2aa6e7=a72_0x14c1;try{const _0x3e4dff=getTemplateBaseUrl(),_0x459280=_0x3e4dff+_0x2aa6e7(0x200),_0xb8a59=await fetch(_0x459280,{'headers':{'Accept':_0x2aa6e7(0x1f7)}});if(!_0xb8a59['ok'])return null;const _0x3707c0=await _0xb8a59['json']();if(!_0x3707c0[_0x2aa6e7(0x1f4)]?.[_0x2aa6e7(0x1fc)]||!_0x3707c0['sdk']?.[_0x2aa6e7(0x1f6)]?.[_0x2aa6e7(0x1fc)])return null;return _0x3707c0;}catch{return null;}}let cachedConfig=null,cacheTime=0x0;function a72_0x14c1(_0x2503ac,_0x4e39d2){_0x2503ac=_0x2503ac-0x1f2;const _0x122c38=a72_0x122c();let _0x14c1d5=_0x122c38[_0x2503ac];return _0x14c1d5;}function a72_0x122c(){const _0x2f0b10=['application/json','now','9416744TbLNdI','42659964cSeFHY','3789rgUlIm','stableVersion','1uSPwOw','6mIombz','4461780YxPYme','/config.json','1640LGpkCJ','1387816sbayqz','7mBSdEi','11NfkmVG','154048UbOJcG','cli','1156956gTbPDb','node'];a72_0x122c=function(){return _0x2f0b10;};return a72_0x122c();}const CACHE_TTL=0x5*0x3c*0x3e8;export async function getCdnConfig(){const _0x2f959a=a72_0x14c1,_0x3e8f29=Date[_0x2f959a(0x1f8)]();if(cachedConfig&&_0x3e8f29-cacheTime<CACHE_TTL)return cachedConfig;const _0x5af435=await fetchCdnConfig();return _0x5af435&&(cachedConfig=_0x5af435,cacheTime=_0x3e8f29),_0x5af435;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a73_0x4af451=a73_0x2ca1;(function(_0x1d1228,_0x24bf7c){const _0x1c119e=a73_0x2ca1,_0x1b6ea3=_0x1d1228();while(!![]){try{const _0x16f642=-parseInt(_0x1c119e(0xf5))/0x1+parseInt(_0x1c119e(0x112))/0x2+parseInt(_0x1c119e(0xed))/0x3+-parseInt(_0x1c119e(0x103))/0x4+-parseInt(_0x1c119e(0x104))/0x5*(parseInt(_0x1c119e(0x110))/0x6)+-parseInt(_0x1c119e(0xfb))/0x7+parseInt(_0x1c119e(0xf1))/0x8*(parseInt(_0x1c119e(0x108))/0x9);if(_0x16f642===_0x24bf7c)break;else _0x1b6ea3['push'](_0x1b6ea3['shift']());}catch(_0x39c444){_0x1b6ea3['push'](_0x1b6ea3['shift']());}}}(a73_0x42d9,0x3b0d4));import a73_0x3bacaf from'node:fs';import a73_0x376f0f from'node:path';import a73_0x558901 from'semver';import{getCdnConfig}from'./cdn-config.js';import a73_0x19a15c from'../i18n/index.js';const t=a73_0x19a15c['t'][a73_0x4af451(0xee)](a73_0x19a15c),FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0x4e88a1){const _0x523701=a73_0x4af451,_0x1517e2=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x1517e2[_0x523701(0x109)](_0xf905d8=>_0xf905d8[_0x523701(0x106)](_0x4e88a1));}function getInstalledVersion(_0xd79c88,_0x8a9a0d){const _0x474c71=a73_0x4af451;try{const _0x1b90a8=a73_0x376f0f[_0x474c71(0x111)](_0xd79c88,_0x474c71(0x10f),_0x8a9a0d,_0x474c71(0xf4));if(a73_0x3bacaf[_0x474c71(0xfe)](_0x1b90a8)){const _0x7d9a0a=JSON[_0x474c71(0x10d)](a73_0x3bacaf[_0x474c71(0x10b)](_0x1b90a8,_0x474c71(0x101)));return _0x7d9a0a[_0x474c71(0x105)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x5717e9=a73_0x4af451;try{const _0x1b3d0d=await getCdnConfig();return _0x1b3d0d?.[_0x5717e9(0x10c)]?.['node']?.[_0x5717e9(0x10a)]||null;}catch{return null;}}function a73_0x42d9(){const _0x355af6=['minVersion','upgrade.sdk.current','latest','2758350UjsSQR','\x1b[1m','log','existsSync','upgrade.sdk.command','npm\x20install\x20','utf-8','\x1b[33m','1790648TgeyOJ','1460305dVbTpP','version','test','utf8','261tRaTnk','some','stableVersion','readFileSync','sdk','parse','upgrade.sdk.stable','node_modules','6uwRSRV','join','651064BsuTzn','devDependencies','@lovrabet/sdk','packageName','1283928VVyBFp','bind','needsUpgrade','coerce','177880JmMEBO','all','dependencies','package.json','22674GNDphr','\x1b[0m','upgrade.sdk.title'];a73_0x42d9=function(){return _0x355af6;};return a73_0x42d9();}async function getSdkPackageName(){const _0x4b227a=a73_0x4af451;try{const _0x1e8897=await getCdnConfig();return _0x1e8897?.[_0x4b227a(0x10c)]?.['node']?.[_0x4b227a(0x115)]||_0x4b227a(0x114);}catch{return _0x4b227a(0x114);}}function a73_0x2ca1(_0x40a0e5,_0x27d9ce){_0x40a0e5=_0x40a0e5-0xed;const _0x42d911=a73_0x42d9();let _0x2ca1b4=_0x42d911[_0x40a0e5];return _0x2ca1b4;}export async function checkSdkVersion(_0x5b06f3){const _0x8a6e22=a73_0x4af451,_0x570b15=a73_0x376f0f[_0x8a6e22(0x111)](_0x5b06f3,_0x8a6e22(0xf4)),[_0x52b7df,_0x424b17]=await Promise[_0x8a6e22(0xf2)]([getSdkStableVersion(),getSdkPackageName()]),_0x10339a=_0x52b7df||FALLBACK_MIN_SDK_VERSION;if(!a73_0x3bacaf['existsSync'](_0x570b15))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x10339a,'packageName':_0x424b17,'stableVersion':_0x52b7df};try{const _0x4e31d2=JSON[_0x8a6e22(0x10d)](a73_0x3bacaf[_0x8a6e22(0x10b)](_0x570b15,_0x8a6e22(0x107))),_0x1da4e9=_0x4e31d2[_0x8a6e22(0xf3)]||{},_0x311402=_0x4e31d2[_0x8a6e22(0x113)]||{},_0x3bfc89=_0x1da4e9[_0x424b17]||_0x311402[_0x424b17];if(!_0x3bfc89)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x10339a,'packageName':_0x424b17,'stableVersion':_0x52b7df};let _0x13c11a=getInstalledVersion(_0x5b06f3,_0x424b17);!_0x13c11a&&(_0x13c11a=_0x3bfc89);if(isNonNumericVersion(_0x3bfc89))return{'installed':!![],'version':_0x13c11a,'needsUpgrade':![],'minVersion':_0x10339a,'packageName':_0x424b17,'stableVersion':_0x52b7df};const _0x44ffeb=a73_0x558901[_0x8a6e22(0xf0)](_0x13c11a),_0x12ec6c=a73_0x558901[_0x8a6e22(0xf0)](_0x10339a),_0xc5bc93=_0x44ffeb&&_0x12ec6c?a73_0x558901['lt'](_0x44ffeb,_0x12ec6c):![];return{'installed':!![],'version':_0x13c11a,'needsUpgrade':_0xc5bc93,'minVersion':_0x10339a,'packageName':_0x424b17,'stableVersion':_0x52b7df};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x10339a,'packageName':_0x424b17,'stableVersion':_0x52b7df};}}export function checkSdkVersionSync(_0x2c26ca){const _0x4a9327=a73_0x4af451,_0x29294c=a73_0x376f0f['join'](_0x2c26ca,_0x4a9327(0xf4)),_0x101ccd=_0x4a9327(0x114);if(!a73_0x3bacaf[_0x4a9327(0xfe)](_0x29294c))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x101ccd,'stableVersion':null};try{const _0x35be29=JSON[_0x4a9327(0x10d)](a73_0x3bacaf[_0x4a9327(0x10b)](_0x29294c,_0x4a9327(0x107))),_0x2db9be=_0x35be29[_0x4a9327(0xf3)]||{},_0x1dbed0=_0x35be29[_0x4a9327(0x113)]||{},_0x30197b=_0x2db9be[_0x101ccd]||_0x1dbed0[_0x101ccd];if(!_0x30197b)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x101ccd,'stableVersion':null};let _0xf60a94=getInstalledVersion(_0x2c26ca,_0x101ccd);!_0xf60a94&&(_0xf60a94=_0x30197b);if(isNonNumericVersion(_0x30197b))return{'installed':!![],'version':_0xf60a94,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x101ccd,'stableVersion':null};const _0x115c9a=a73_0x558901[_0x4a9327(0xf0)](_0xf60a94),_0x3a92be=_0x115c9a?a73_0x558901['lt'](_0x115c9a,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0xf60a94,'needsUpgrade':_0x3a92be,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x101ccd,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x101ccd,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x4c1185){const _0x4cc86e=a73_0x4af451;if(!_0x4c1185[_0x4cc86e(0xef)])return;const _0x263f1d=_0x4cc86e(0x102),_0x4c3734=_0x4cc86e(0xf6),_0x5b527b=_0x4cc86e(0xfc),_0x2142d4=_0x4c1185['packageName']||'@lovrabet/sdk',_0x4e73b9=_0x4c1185[_0x4cc86e(0x10a)]||_0x4c1185[_0x4cc86e(0xf8)],_0x511712=_0x4cc86e(0x100)+_0x2142d4+'@'+(_0x4e73b9||_0x4cc86e(0xfa));console[_0x4cc86e(0xfd)](),console[_0x4cc86e(0xfd)](''+_0x263f1d+_0x5b527b+t(_0x4cc86e(0xf7))+_0x4c3734),console[_0x4cc86e(0xfd)](''+_0x263f1d+t(_0x4cc86e(0xf9),{'package':_0x2142d4,'version':_0x4c1185[_0x4cc86e(0x105)]})+_0x4c3734),console[_0x4cc86e(0xfd)](''+_0x263f1d+t(_0x4cc86e(0x10e),{'version':_0x4e73b9})+_0x4c3734),console['log'](''+_0x263f1d+t(_0x4cc86e(0xff),{'command':_0x511712})+_0x4c3734),console['log']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x46e1ba,_0x2802e5){const _0x459bba=a74_0x338c,_0x208c7b=_0x46e1ba();while(!![]){try{const _0x1b0798=-parseInt(_0x459bba(0x92))/0x1*(parseInt(_0x459bba(0x85))/0x2)+parseInt(_0x459bba(0x89))/0x3+parseInt(_0x459bba(0x83))/0x4+-parseInt(_0x459bba(0x95))/0x5*(parseInt(_0x459bba(0x96))/0x6)+-parseInt(_0x459bba(0x88))/0x7*(parseInt(_0x459bba(0x99))/0x8)+-parseInt(_0x459bba(0x90))/0x9*(-parseInt(_0x459bba(0x82))/0xa)+parseInt(_0x459bba(0x8f))/0xb;if(_0x1b0798===_0x2802e5)break;else _0x208c7b['push'](_0x208c7b['shift']());}catch(_0x471006){_0x208c7b['push'](_0x208c7b['shift']());}}}(a74_0x53fb,0x29306));function a74_0x53fb(){const _0x5f4fb6=['version','8WFAcQQ','20rLZwWe','200716zJnnfg','1.0.0','366572GzyOLW','currentVersion','upgrade.cli.stable','1250683bgbnsN','254583qBqHOZ','coerce','log','\x1b[33m','some','upgrade.cli.title','6275412qhMJmq','458523VkUFcj','parse','1Aggfzi','needsUpgrade','\x1b[1m','1383805CmyTRd','6LrMLHD','stableVersion'];a74_0x53fb=function(){return _0x5f4fb6;};return a74_0x53fb();}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a74_0x42152f from'semver';import{getCdnConfig}from'./cdn-config.js';import a74_0x248a28 from'../i18n/index.js';const t=a74_0x248a28['t']['bind'](a74_0x248a28);function getCurrentCliVersion(){const _0x547179=a74_0x338c;try{const _0x3d1445=fileURLToPath(import.meta.url),_0x410532=resolve(dirname(_0x3d1445),'../..'),_0x576e73=resolve(_0x410532,'package.json'),_0x401785=JSON[_0x547179(0x91)](readFileSync(_0x576e73,'utf-8'));return _0x401785[_0x547179(0x98)]||_0x547179(0x84);}catch{return _0x547179(0x84);}}function isNonNumericVersion(_0x30e9c6){const _0x56109c=a74_0x338c,_0x1943c9=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\^/,/^~/,/^>/,/^</,/^\*/,/^x$/];return _0x1943c9[_0x56109c(0x8d)](_0x4f8b37=>_0x4f8b37['test'](_0x30e9c6));}function a74_0x338c(_0xd352aa,_0x5cfaef){_0xd352aa=_0xd352aa-0x82;const _0x53fbca=a74_0x53fb();let _0x338cd9=_0x53fbca[_0xd352aa];return _0x338cd9;}export async function checkCliVersion(){const _0x132b31=a74_0x338c,_0x73dc95=getCurrentCliVersion(),_0x2f748f=await getCdnConfig(),_0x576c2f=_0x2f748f?.['cli']?.['stableVersion']||null;let _0x565459=![];if(_0x576c2f)try{const _0x32ad84=a74_0x42152f[_0x132b31(0x8a)](_0x73dc95),_0x16af76=a74_0x42152f[_0x132b31(0x8a)](_0x576c2f);_0x32ad84&&_0x16af76&&(_0x565459=a74_0x42152f['lt'](_0x32ad84,_0x16af76));}catch{_0x565459=![];}return{'currentVersion':_0x73dc95,'stableVersion':_0x576c2f,'needsUpgrade':_0x565459,'isPreRelease':![]};}export function printCliUpgradeWarning(_0x52997c){const _0xcec078=a74_0x338c;if(!_0x52997c[_0xcec078(0x93)])return;const _0xe9b2e4=_0xcec078(0x8c),_0x1d7444='\x1b[0m',_0x336a78=_0xcec078(0x94),_0x474900='npm\x20install\x20-g\x20@lovrabet/cli@latest';console[_0xcec078(0x8b)](),console[_0xcec078(0x8b)](''+_0xe9b2e4+_0x336a78+t(_0xcec078(0x8e))+_0x1d7444),console[_0xcec078(0x8b)](''+_0xe9b2e4+t('upgrade.cli.current',{'version':_0x52997c[_0xcec078(0x86)]})+_0x1d7444),console[_0xcec078(0x8b)](''+_0xe9b2e4+t(_0xcec078(0x87),{'version':_0x52997c[_0xcec078(0x97)]})+_0x1d7444),console[_0xcec078(0x8b)](''+_0xe9b2e4+t('upgrade.cli.command',{'command':_0x474900})+_0x1d7444),console[_0xcec078(0x8b)]();}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a75_0x38c90e=a75_0x421f;(function(_0x28ed57,_0x5c6fc8){const _0x261ab4=a75_0x421f,_0x31c31b=_0x28ed57();while(!![]){try{const _0x246cba=-parseInt(_0x261ab4(0x122))/0x1+-parseInt(_0x261ab4(0x11e))/0x2*(-parseInt(_0x261ab4(0x12d))/0x3)+parseInt(_0x261ab4(0x127))/0x4+parseInt(_0x261ab4(0x124))/0x5*(parseInt(_0x261ab4(0x12a))/0x6)+parseInt(_0x261ab4(0x129))/0x7+-parseInt(_0x261ab4(0x128))/0x8+parseInt(_0x261ab4(0x119))/0x9*(-parseInt(_0x261ab4(0x11f))/0xa);if(_0x246cba===_0x5c6fc8)break;else _0x31c31b['push'](_0x31c31b['shift']());}catch(_0x45dbcf){_0x31c31b['push'](_0x31c31b['shift']());}}}(a75_0x2897,0x3a620));import{existsSync,readFileSync}from'node:fs';import{resolve}from'node:path';function a75_0x421f(_0x1a6301,_0x4a99a1){_0x1a6301=_0x1a6301-0x119;const _0x289753=a75_0x2897();let _0x421fcf=_0x289753[_0x1a6301];return _0x421fcf;}import{homedir}from'node:os';function a75_0x2897(){const _0x433493=['appcode','4390QPHwGT','app','string','1504816jqpPil','1896272nfteVu','451325YsBFoE','2502rJqaau','replace','utf8','216CphWET','1007217GNaqGz','cwd','parse','env','template_base_url','10202bWawTX','60jxycEC','https://g.lovrabet.com/dist/lovrabet-cli','.lovrabetrc','26429iisYYL'];a75_0x2897=function(){return _0x433493;};return a75_0x2897();}import{initEnv}from'../constant/env.js';export const projectConfigPath=resolve(process[a75_0x38c90e(0x11a)](),'.lovrabetrc');export const globalConfigPath=resolve(homedir(),a75_0x38c90e(0x121));export function readConfig(_0x46e7b6){const _0x24477a=a75_0x38c90e;let _0x175bb1={};try{if(existsSync(globalConfigPath)){const _0x4addab=readFileSync(globalConfigPath,{'encoding':_0x24477a(0x12c)});_0x4addab&&(_0x175bb1=JSON[_0x24477a(0x11b)](_0x4addab));}}catch(_0xee00c1){}try{const _0xfb82f6=_0x46e7b6?resolve(_0x46e7b6,_0x24477a(0x121)):projectConfigPath;if(existsSync(_0xfb82f6)){const _0x1c0c77=readFileSync(_0xfb82f6,{'encoding':'utf8'});if(_0x1c0c77){const _0x241f92=JSON[_0x24477a(0x11b)](_0x1c0c77);_0x175bb1={..._0x175bb1,..._0x241f92};}}}catch(_0x5104f1){}return _0x175bb1[_0x24477a(0x11c)]&&typeof _0x175bb1[_0x24477a(0x11c)]==='string'&&initEnv(_0x175bb1[_0x24477a(0x11c)]),_0x175bb1;}export function getConfigAppCode(){const _0x292bee=a75_0x38c90e;let _0x3c360d={},_0x15df3b={};try{if(existsSync(globalConfigPath)){const _0x218fd=readFileSync(globalConfigPath,{'encoding':_0x292bee(0x12c)});_0x218fd&&(_0x15df3b=JSON[_0x292bee(0x11b)](_0x218fd));}}catch(_0x363369){}try{if(existsSync(projectConfigPath)){const _0x5d76b6=readFileSync(projectConfigPath,{'encoding':_0x292bee(0x12c)});_0x5d76b6&&(_0x3c360d=JSON[_0x292bee(0x11b)](_0x5d76b6));}}catch(_0x52e1b1){}let _0x4ad246;if('appcode'in _0x3c360d)_0x4ad246=_0x3c360d[_0x292bee(0x123)];else{if('app'in _0x3c360d)_0x4ad246=_0x3c360d[_0x292bee(0x125)];else{if(_0x292bee(0x123)in _0x15df3b)_0x4ad246=_0x15df3b[_0x292bee(0x123)];else _0x292bee(0x125)in _0x15df3b&&(_0x4ad246=_0x15df3b['app']);}}if(typeof _0x4ad246!==_0x292bee(0x126)||_0x4ad246['trim']()==='')return undefined;return _0x4ad246;}export function isInProject(){return existsSync(projectConfigPath);}export function getTemplateBaseUrl(){const _0x29fade=a75_0x38c90e,_0x371b73=readConfig();if(_0x371b73[_0x29fade(0x11d)]&&typeof _0x371b73[_0x29fade(0x11d)]==='string')return _0x371b73[_0x29fade(0x11d)][_0x29fade(0x12b)](/\/$/,'');return _0x29fade(0x120);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa4b792,_0x41dcb6){const _0x4a898a=a76_0x3595,_0x22ee6c=_0xa4b792();while(!![]){try{const _0x451618=parseInt(_0x4a898a(0xe8))/0x1+parseInt(_0x4a898a(0xe2))/0x2*(parseInt(_0x4a898a(0xdb))/0x3)+-parseInt(_0x4a898a(0xe6))/0x4*(-parseInt(_0x4a898a(0xdd))/0x5)+parseInt(_0x4a898a(0xde))/0x6+-parseInt(_0x4a898a(0xe7))/0x7+-parseInt(_0x4a898a(0xdc))/0x8*(parseInt(_0x4a898a(0xdf))/0x9)+-parseInt(_0x4a898a(0xe3))/0xa*(-parseInt(_0x4a898a(0xe1))/0xb);if(_0x451618===_0x41dcb6)break;else _0x22ee6c['push'](_0x22ee6c['shift']());}catch(_0x386e3d){_0x22ee6c['push'](_0x22ee6c['shift']());}}}(a76_0x5e46,0x1e8a0));function a76_0x5e46(){const _0xaf6410=['435702dqaEQr','9OvPtIi','name','2915lsjSMU','2ZCphNd','4070LnTsWH','readdirSync','join','104PmTBbq','1068333RYLIFr','224023YeNwHT','复制目录时出错:','mkdirSync','isDirectory','238569mlRKVv','1988904XBzeSg','8135KMimUN'];a76_0x5e46=function(){return _0xaf6410;};return a76_0x5e46();}import a76_0x4ffdd0 from'node:path';function a76_0x3595(_0x19122c,_0x3a985b){_0x19122c=_0x19122c-0xd8;const _0x5e46b0=a76_0x5e46();let _0x3595fe=_0x5e46b0[_0x19122c];return _0x3595fe;}import a76_0x1bbaaf from'node:fs';export async function copyDirectory(_0x29cf44,_0x5dadeb){const _0x3d6193=a76_0x3595;try{const _0x12bac7=a76_0x1bbaaf[_0x3d6193(0xe4)](_0x29cf44,{'withFileTypes':!![]});a76_0x1bbaaf[_0x3d6193(0xd9)](_0x5dadeb,{'recursive':!![]});for(const _0x5d8be9 of _0x12bac7){const _0x385cd2=a76_0x4ffdd0['join'](_0x29cf44,_0x5d8be9[_0x3d6193(0xe0)]),_0x47b647=a76_0x4ffdd0[_0x3d6193(0xe5)](_0x5dadeb,_0x5d8be9[_0x3d6193(0xe0)]);_0x5d8be9[_0x3d6193(0xda)]()?await copyDirectory(_0x385cd2,_0x47b647):a76_0x1bbaaf['copyFileSync'](_0x385cd2,_0x47b647);}}catch(_0xb16667){console['error'](_0x3d6193(0xd8),_0xb16667);}}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a77_0x16e2(_0x595527,_0x1e7327){_0x595527=_0x595527-0x173;const _0x46c8c9=a77_0x46c8();let _0x16e277=_0x46c8c9[_0x595527];return _0x16e277;}(function(_0x38b9e4,_0x11b389){const _0x2a2b6f=a77_0x16e2,_0x48a969=_0x38b9e4();while(!![]){try{const _0x4a17e7=-parseInt(_0x2a2b6f(0x17c))/0x1+parseInt(_0x2a2b6f(0x174))/0x2+parseInt(_0x2a2b6f(0x175))/0x3+-parseInt(_0x2a2b6f(0x176))/0x4+parseInt(_0x2a2b6f(0x17b))/0x5*(-parseInt(_0x2a2b6f(0x177))/0x6)+-parseInt(_0x2a2b6f(0x178))/0x7+parseInt(_0x2a2b6f(0x17a))/0x8*(parseInt(_0x2a2b6f(0x179))/0x9);if(_0x4a17e7===_0x11b389)break;else _0x48a969['push'](_0x48a969['shift']());}catch(_0x4ea92f){_0x48a969['push'](_0x48a969['shift']());}}}(a77_0x46c8,0x94787));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a77_0x46c8(){const _0x43bc54=['2623113vkJkLA','2105056YOYODV','210246XvzMzZ','326648JUiLAh','477YcHLca','197208EpvZLA','155NxbzQi','49041ZsDafA','isDirectory','271002wTNrWY'];a77_0x46c8=function(){return _0x43bc54;};return a77_0x46c8();}export async function copyDir(_0x436b3e,_0x45a7c7){const _0x31218c=a77_0x16e2,_0x36a0ed=statSync(_0x436b3e);if(_0x36a0ed[_0x31218c(0x173)]()){!existsSync(_0x45a7c7)&&mkdirSync(_0x45a7c7,{'recursive':!![]});const _0x2767be=readdirSync(_0x436b3e);for(const _0x41b427 of _0x2767be){await copyDir(join(_0x436b3e,_0x41b427),join(_0x45a7c7,_0x41b427));}}else copyFileSync(_0x436b3e,_0x45a7c7);}export function ensureDir(_0x3745f7){!existsSync(_0x3745f7)&&mkdirSync(_0x3745f7,{'recursive':!![]});}export function pathExists(_0x5ad608){return existsSync(_0x5ad608);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0xa980d4=a78_0x1055;(function(_0x276a88,_0x56f842){const _0x12bc80=a78_0x1055,_0x2d3eda=_0x276a88();while(!![]){try{const _0x32748e=parseInt(_0x12bc80(0x161))/0x1*(-parseInt(_0x12bc80(0x183))/0x2)+parseInt(_0x12bc80(0x187))/0x3+parseInt(_0x12bc80(0x173))/0x4+parseInt(_0x12bc80(0x18d))/0x5*(-parseInt(_0x12bc80(0x191))/0x6)+-parseInt(_0x12bc80(0x190))/0x7*(parseInt(_0x12bc80(0x171))/0x8)+-parseInt(_0x12bc80(0x17e))/0x9*(-parseInt(_0x12bc80(0x16b))/0xa)+-parseInt(_0x12bc80(0x189))/0xb;if(_0x32748e===_0x56f842)break;else _0x2d3eda['push'](_0x2d3eda['shift']());}catch(_0x27c5b9){_0x2d3eda['push'](_0x2d3eda['shift']());}}}(a78_0x399a,0x77836));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0xe357dd=a78_0x1055,_0x5577ac=getTemplateBaseUrl();return _0x5577ac+_0xe357dd(0x165);}function getGuidesExtendCdnUrl(){const _0x568815=getTemplateBaseUrl();return _0x568815+'/skills/guides-extend.json';}const CACHE_DIR=join(process['env'][a78_0xa980d4(0x163)]||process[a78_0xa980d4(0x186)][a78_0xa980d4(0x181)]||'',a78_0xa980d4(0x16d),a78_0xa980d4(0x16a));function a78_0x1055(_0xd70181,_0x349b3e){_0xd70181=_0xd70181-0x161;const _0x399a75=a78_0x399a();let _0x1055fd=_0x399a75[_0xd70181];return _0x1055fd;}export async function fetchGuidesFromCDN(_0xd80cc9=![]){const _0x4ee9e5=a78_0xa980d4,_0x57093e=getGuidesCdnUrl(),_0x1a3fd3=await fetch(_0x57093e,{'headers':{'Accept':_0x4ee9e5(0x168)}});if(!_0x1a3fd3['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x1a3fd3[_0x4ee9e5(0x180)]+'\x20'+_0x1a3fd3[_0x4ee9e5(0x169)]);const _0x33daa4=await _0x1a3fd3[_0x4ee9e5(0x188)]();if(!_0x33daa4['guides']||typeof _0x33daa4[_0x4ee9e5(0x17f)]!=='object')throw new Error(_0x4ee9e5(0x167));if(!_0xd80cc9)return _0x33daa4;try{const _0x41a62c=getGuidesExtendCdnUrl(),_0x214062=await fetch(_0x41a62c,{'headers':{'Accept':_0x4ee9e5(0x168)}});if(_0x214062['ok']){const _0xcf6453=await _0x214062[_0x4ee9e5(0x188)]();_0xcf6453['guides']&&typeof _0xcf6453[_0x4ee9e5(0x17f)]===_0x4ee9e5(0x170)&&(_0x33daa4[_0x4ee9e5(0x17f)]={..._0x33daa4[_0x4ee9e5(0x17f)],..._0xcf6453[_0x4ee9e5(0x17f)]});}}catch{}return _0x33daa4;}export function writeGuidesToProject(_0x1789b6,_0x2d807a,_0x5c281b=a78_0xa980d4(0x192),_0x1da18f){const _0x3f2780=a78_0xa980d4,_0x1dfc96=join(_0x2d807a,_0x5c281b);for(const [_0x45070d,_0x2e3674]of Object['entries'](_0x1789b6['guides'])){if(_0x2e3674['requireFlags']&&_0x2e3674[_0x3f2780(0x162)][_0x3f2780(0x179)]>0x0){const _0x41674f=_0x2e3674['requireFlags'][_0x3f2780(0x18b)](_0x26dd67=>_0x1da18f?.[_0x3f2780(0x16e)](_0x26dd67));if(!_0x41674f)continue;}const _0x3af0ef=join(_0x1dfc96,_0x45070d);mkdirSync(_0x3af0ef,{'recursive':!![]});let _0x39986c=_0x2e3674['content'];_0x2e3674[_0x3f2780(0x166)]&&(_0x39986c=appendUpdateTime(_0x39986c,_0x2e3674[_0x3f2780(0x166)])),writeFileSync(join(_0x3af0ef,'guide.md'),_0x39986c,'utf-8');}}export function appendUpdateTime(_0x3b9f15,_0x56cd39){const _0x13f76e=a78_0xa980d4;return _0x3b9f15=_0x3b9f15[_0x13f76e(0x17c)](/\n*>更新时间:.*$/m,''),_0x3b9f15['trimEnd']()+(_0x13f76e(0x16f)+_0x56cd39);}export function getSkillTemplate(_0x4cb6a6){const _0x2eb954=a78_0xa980d4;return _0x4cb6a6[_0x2eb954(0x174)]?.[_0x2eb954(0x18f)]||'';}export function appendExtendContents(_0x3fa69c,_0x442012,_0x22c1d5){const _0x46e7f8=a78_0xa980d4,_0x187eea=[];for(const [_0x2acf2e,_0xe9d7d6]of Object['entries'](_0x442012[_0x46e7f8(0x17f)])){if(_0xe9d7d6[_0x46e7f8(0x162)]&&_0xe9d7d6[_0x46e7f8(0x162)][_0x46e7f8(0x179)]>0x0){const _0x4b6b59=_0xe9d7d6[_0x46e7f8(0x162)][_0x46e7f8(0x18b)](_0x3687e1=>_0x22c1d5?.[_0x46e7f8(0x16e)](_0x3687e1));if(!_0x4b6b59)continue;}_0xe9d7d6[_0x46e7f8(0x178)]&&_0x187eea[_0x46e7f8(0x17b)](_0xe9d7d6[_0x46e7f8(0x178)][_0x46e7f8(0x175)]());}if(_0x187eea[_0x46e7f8(0x179)]===0x0)return _0x3fa69c;return _0x3fa69c['trimEnd']()+'\x0a\x0a'+_0x187eea[_0x46e7f8(0x17d)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x115dae,_0x1590e4,_0x5e11ce,_0x21eb90){const _0x58b95d=a78_0xa980d4,_0x4492aa=getSkillTemplate(_0x115dae);if(!_0x4492aa)throw new Error(_0x58b95d(0x172));const _0x52f8e3=dirname(_0x1590e4);mkdirSync(_0x52f8e3,{'recursive':!![]});let _0xef8791=_0x4492aa[_0x58b95d(0x17c)](/\{\{IDE_NAME\}\}/g,_0x5e11ce);_0xef8791=insertGuidesSection(_0xef8791,_0x115dae,_0x21eb90),_0xef8791=appendExtendContents(_0xef8791,_0x115dae,_0x21eb90),_0x115dae[_0x58b95d(0x174)][_0x58b95d(0x166)]&&(_0xef8791=appendUpdateTime(_0xef8791,_0x115dae[_0x58b95d(0x174)][_0x58b95d(0x166)])),writeFileSync(_0x1590e4,_0xef8791,'utf-8');}function a78_0x399a(){const _0x3cc4aa=['keys','1450090WpKTdI','|\x20`','content','2631097uQCsbU','6SEMYpN','.lovrabet/skill/.shared/guides','`\x20|\x20','1gcRDje','requireFlags','HOME','\x0a<!--\x20GUIDES_APPEND\x20-->','/skills/guides.json','lastUpdated','CDN\x20返回数据格式错误','application/json','statusText','cache','3754030sNGAcg','entries','.lovrabet','includes','\x0a\x0a>更新时间:','object','8RcxAyE','CDN\x20数据中缺少\x20skillTemplate','3348512FkPcsW','skillTemplate','trimEnd','<!--\x20GUIDES_APPEND\x20-->','test','extendContent','length','title','push','replace','join','9eeDApM','guides','status','USERPROFILE','path','98322RoJaVN','map','sort','env','520950sjeYEt','json','1997655gWzTEL','indexOf','some'];a78_0x399a=function(){return _0x3cc4aa;};return a78_0x399a();}export function insertGuidesSection(_0x1ac700,_0x37dd32,_0x52bc58){const _0x4d91b9=a78_0xa980d4,_0x51dc3a=_0x4d91b9(0x176),_0x32ff7b=_0x1ac700[_0x4d91b9(0x18a)](_0x51dc3a);if(_0x32ff7b===-0x1)return _0x1ac700;const _0x4f787a=[],_0x502f10=Object[_0x4d91b9(0x18c)](_0x37dd32[_0x4d91b9(0x17f)])[_0x4d91b9(0x185)]();for(const _0x23eac4 of _0x502f10){const _0x1a424e=_0x37dd32[_0x4d91b9(0x17f)][_0x23eac4];if(!_0x1a424e)continue;if(/^0[1-6]-/[_0x4d91b9(0x177)](_0x23eac4))continue;if(_0x1a424e[_0x4d91b9(0x162)]&&_0x1a424e[_0x4d91b9(0x162)][_0x4d91b9(0x179)]>0x0){const _0x5e6b62=_0x1a424e[_0x4d91b9(0x162)][_0x4d91b9(0x18b)](_0x3eea89=>_0x52bc58?.['includes'](_0x3eea89));if(!_0x5e6b62)continue;}const _0x224321=_0x1a424e[_0x4d91b9(0x182)]['replace'](/^\.lovrabet\/skill\/\.shared\/guides\//,'');_0x4f787a[_0x4d91b9(0x17b)](_0x4d91b9(0x18e)+_0x224321+_0x4d91b9(0x193)+_0x1a424e['title']+'\x20|');}if(_0x4f787a['length']===0x0)return _0x1ac700[_0x4d91b9(0x17c)](_0x51dc3a,_0x4d91b9(0x176));const _0x315890=_0x4f787a[_0x4d91b9(0x17d)]('\x0a');return _0x1ac700[_0x4d91b9(0x17c)](_0x51dc3a,_0x315890+_0x4d91b9(0x164));}export async function installGuides(_0x74f9e4){const _0x169198=a78_0xa980d4,_0x2012e5=await fetchGuidesFromCDN();return writeGuidesToProject(_0x2012e5,_0x74f9e4),Object[_0x169198(0x18c)](_0x2012e5[_0x169198(0x17f)])[_0x169198(0x179)];}export function getGuidesSummary(_0x449d18){const _0x381a88=a78_0xa980d4;return Object[_0x381a88(0x16c)](_0x449d18[_0x381a88(0x17f)])[_0x381a88(0x184)](([_0x2da4b7,_0x2ec6e5])=>({'key':_0x2da4b7,'title':_0x2ec6e5[_0x381a88(0x17a)],'path':_0x2ec6e5[_0x381a88(0x182)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e2b9e,_0xfaa345){const _0x5620f4=a79_0x2ea3,_0x489e29=_0x3e2b9e();while(!![]){try{const _0x285df7=-parseInt(_0x5620f4(0x8b))/0x1+parseInt(_0x5620f4(0x87))/0x2*(parseInt(_0x5620f4(0x8f))/0x3)+-parseInt(_0x5620f4(0x80))/0x4*(parseInt(_0x5620f4(0x8d))/0x5)+-parseInt(_0x5620f4(0x7e))/0x6+parseInt(_0x5620f4(0x89))/0x7+parseInt(_0x5620f4(0x8a))/0x8+parseInt(_0x5620f4(0x95))/0x9*(parseInt(_0x5620f4(0x90))/0xa);if(_0x285df7===_0xfaa345)break;else _0x489e29['push'](_0x489e29['shift']());}catch(_0x2f143e){_0x489e29['push'](_0x489e29['shift']());}}}(a79_0x4767,0x24a49));export async function httpRequest(_0x1e2249,_0x12be38={}){const _0x40f2e9=a79_0x2ea3,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x12be38;let _0x41a51d=null;for(let _0x75c3c=0x0;_0x75c3c<=retries;_0x75c3c++){try{const _0x38c091=new AbortController(),_0x14bd08=setTimeout(()=>_0x38c091['abort'](),timeout),_0x420f86=await fetch(_0x1e2249,{'headers':headers,'signal':_0x38c091['signal']});clearTimeout(_0x14bd08);let _0x4afbd6;const _0x22ba71=_0x420f86[_0x40f2e9(0x91)][_0x40f2e9(0x96)](_0x40f2e9(0x81));return _0x22ba71?.[_0x40f2e9(0x8e)](_0x40f2e9(0x78))?_0x4afbd6=await _0x420f86[_0x40f2e9(0x88)]():_0x4afbd6=await _0x420f86['text'](),{'ok':_0x420f86['ok'],'status':_0x420f86[_0x40f2e9(0x82)],'statusText':_0x420f86[_0x40f2e9(0x7b)],'data':_0x4afbd6,'headers':_0x420f86[_0x40f2e9(0x91)],'url':_0x420f86[_0x40f2e9(0x92)],'text':()=>_0x420f86[_0x40f2e9(0x7f)]()};}catch(_0x2e28f0){_0x41a51d=_0x2e28f0 instanceof Error?_0x2e28f0:new Error(String(_0x2e28f0));if(_0x75c3c===retries)break;if(shouldRetry(_0x2e28f0)){console[_0x40f2e9(0x86)](_0x40f2e9(0x94)+retryDelay+_0x40f2e9(0x7d)+(_0x75c3c+0x1)+_0x40f2e9(0x93)),await sleep(retryDelay);continue;}else break;}}throw _0x41a51d||new Error(_0x40f2e9(0x7c));}function shouldRetry(_0x435b04){const _0x59d381=a79_0x2ea3;if(_0x435b04 instanceof Error){if(_0x435b04[_0x59d381(0x7a)]===_0x59d381(0x84))return![];if(_0x435b04[_0x59d381(0x7a)]===_0x59d381(0x8c)&&_0x435b04[_0x59d381(0x85)][_0x59d381(0x8e)](_0x59d381(0x79)))return!![];if(_0x435b04[_0x59d381(0x85)]['includes'](_0x59d381(0x83)))return!![];if(_0x435b04[_0x59d381(0x85)][_0x59d381(0x8e)]('ENOTFOUND'))return![];}return![];}function a79_0x4767(){const _0x36b63f=['ms\x20后进行第\x20','1278060gYsQtB','text','568588sBOlvL','content-type','status','ECONNRESET','AbortError','message','log','3682ZqOJBE','json','1970633RVbrPn','131040ANlQoB','180981Ljknzg','TypeError','10qylYAE','includes','3BFJCiA','5286340IPgBcb','headers','url','\x20次重试...','*\x20请求失败,','9YRjplM','get','application/json','fetch','name','statusText','Request\x20failed'];a79_0x4767=function(){return _0x36b63f;};return a79_0x4767();}function sleep(_0x5b67ce){return new Promise(_0x5273c6=>setTimeout(_0x5273c6,_0x5b67ce));}function a79_0x2ea3(_0x34df03,_0x1cfdae){_0x34df03=_0x34df03-0x78;const _0x47671f=a79_0x4767();let _0x2ea3f3=_0x47671f[_0x34df03];return _0x2ea3f3;}export function validateUrl(_0x2aa784){try{return new URL(_0x2aa784),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a80_0x4614ab=a80_0x2b7d;(function(_0x46200d,_0x11f57d){const _0x570e03=a80_0x2b7d,_0x1e20a6=_0x46200d();while(!![]){try{const _0x9c5b98=parseInt(_0x570e03(0x127))/0x1*(-parseInt(_0x570e03(0x111))/0x2)+parseInt(_0x570e03(0x10d))/0x3+parseInt(_0x570e03(0x105))/0x4+-parseInt(_0x570e03(0x104))/0x5+parseInt(_0x570e03(0x128))/0x6+parseInt(_0x570e03(0xfa))/0x7*(-parseInt(_0x570e03(0x103))/0x8)+parseInt(_0x570e03(0x116))/0x9;if(_0x9c5b98===_0x11f57d)break;else _0x1e20a6['push'](_0x1e20a6['shift']());}catch(_0x327d48){_0x1e20a6['push'](_0x1e20a6['shift']());}}}(a80_0x2765,0x42ab9));function a80_0x2b7d(_0x1ecc5e,_0x1e0976){_0x1ecc5e=_0x1ecc5e-0xf2;const _0x276525=a80_0x2765();let _0x2b7d6f=_0x276525[_0x1ecc5e];return _0x2b7d6f;}function a80_0x2765(){const _0x29f2ee=['success','utf8','map','unknown','addColors','duration','blue','clear','combine','command','green','logFilePath','winstonLogger','details','error','warn','2LglQqF','846906KQQKzY','initWinstonLogger','setRawCommand','File','createLogger','readFileSync','getWinstonInstance','mkdirSync','Failed\x20to\x20clear\x20logs:','2027753cyYzdA','readLogs','level','split','logTask','join','timestamp','filter','开始执行:\x20','8GnbmfL','1315790GmQitq','1521940mZUnSe','setLogPath','.lovrabet.log','stringify','message','red','info','完成:\x20','1370526DznGiH','trim','rawCommand','失败:\x20','380924GTNDXi','log','existsSync','errors','format','2055276ksYHYB'];a80_0x2765=function(){return _0x29f2ee;};return a80_0x2765();}import a80_0x388dd2 from'winston';import a80_0x5280d2 from'node:fs';import a80_0xceb533 from'node:path';class Logger{['winstonLogger'];[a80_0x4614ab(0x122)];['currentRawCommand']='';constructor(){const _0x45ba5e=a80_0x4614ab;this[_0x45ba5e(0x122)]='';}[a80_0x4614ab(0xf3)](_0x41255a){this['currentRawCommand']=_0x41255a;}[a80_0x4614ab(0xf2)](){const _0x3210c5=a80_0x4614ab,_0x33f318=a80_0xceb533['dirname'](this[_0x3210c5(0x122)]);!a80_0x5280d2[_0x3210c5(0x113)](_0x33f318)&&a80_0x5280d2[_0x3210c5(0xf8)](_0x33f318,{'recursive':!![]});const _0x39dbaa=a80_0x388dd2[_0x3210c5(0x115)][_0x3210c5(0x11f)](a80_0x388dd2[_0x3210c5(0x115)]['timestamp'](),a80_0x388dd2['format'][_0x3210c5(0x114)]({'stack':!![]}),a80_0x388dd2[_0x3210c5(0x115)]['printf'](_0x33c4ef=>{const _0x3e0ff3=_0x3210c5,_0xec6b2={'timestamp':_0x33c4ef[_0x3e0ff3(0x100)]||new Date()['toISOString'](),'level':_0x33c4ef[_0x3e0ff3(0xfc)]||'info','command':_0x33c4ef[_0x3e0ff3(0x120)]||_0x3e0ff3(0x11a),'rawCommand':_0x33c4ef[_0x3e0ff3(0x10f)]||this['currentRawCommand']||undefined,'message':_0x33c4ef['message']||'','duration':_0x33c4ef[_0x3e0ff3(0x11c)]||undefined,'details':_0x33c4ef[_0x3e0ff3(0x124)]||undefined};return JSON[_0x3e0ff3(0x108)](_0xec6b2);}));this['winstonLogger']=a80_0x388dd2[_0x3210c5(0xf5)]({'level':'info','format':_0x39dbaa,'transports':[new a80_0x388dd2['transports'][(_0x3210c5(0xf4))]({'filename':this[_0x3210c5(0x122)],'level':'info'})],'silent':![]}),a80_0x388dd2[_0x3210c5(0x11b)]({'success':_0x3210c5(0x121),'error':_0x3210c5(0x10a),'warn':'yellow','info':_0x3210c5(0x11d)});}[a80_0x4614ab(0x106)](_0x41fdd0){const _0xdc6c0=a80_0x4614ab;this['logFilePath']=a80_0xceb533[_0xdc6c0(0xff)](_0x41fdd0,_0xdc6c0(0x107)),this[_0xdc6c0(0x123)]&&this[_0xdc6c0(0x123)][_0xdc6c0(0x11e)](),this[_0xdc6c0(0xf2)]();}[a80_0x4614ab(0x10b)](_0x55181c,_0x206f9c,_0x5075d6){const _0x2ef7ba=a80_0x4614ab;if(!this[_0x2ef7ba(0x122)]||!this[_0x2ef7ba(0x123)])return;this[_0x2ef7ba(0x123)][_0x2ef7ba(0x10b)](_0x206f9c,{'command':_0x55181c,'details':_0x5075d6});}[a80_0x4614ab(0x117)](_0x3bc08b,_0x1312b6,_0x30df85,_0x284d74){const _0x44c824=a80_0x4614ab;if(!this[_0x44c824(0x122)]||!this[_0x44c824(0x123)])return;this[_0x44c824(0x123)][_0x44c824(0x112)](_0x44c824(0x10b),_0x1312b6,{'level':'success','command':_0x3bc08b,'duration':_0x30df85,'details':_0x284d74});}[a80_0x4614ab(0x125)](_0x1d602f,_0xb17db0,_0x33d13f){const _0x343561=a80_0x4614ab;if(!this[_0x343561(0x122)]||!this[_0x343561(0x123)])return;this[_0x343561(0x123)][_0x343561(0x125)](_0xb17db0,{'command':_0x1d602f,'details':_0x33d13f});}['warn'](_0x3b7ce7,_0x545351,_0x2c057b){const _0x1fb9c5=a80_0x4614ab;if(!this[_0x1fb9c5(0x122)]||!this[_0x1fb9c5(0x123)])return;this['winstonLogger'][_0x1fb9c5(0x126)](_0x545351,{'command':_0x3b7ce7,'details':_0x2c057b});}async[a80_0x4614ab(0xfe)](_0x2f272d,_0x3bc154,_0x9cc6ba){const _0x563e72=a80_0x4614ab,_0x397905=Date['now']();this[_0x563e72(0x10b)](_0x2f272d,_0x563e72(0x102)+_0x3bc154);try{const _0x1f409c=await _0x9cc6ba(),_0x177077=Date['now']()-_0x397905;return this['success'](_0x2f272d,_0x563e72(0x10c)+_0x3bc154,_0x177077),_0x1f409c;}catch(_0x1dfeab){const _0xa03440=Date['now']()-_0x397905;this[_0x563e72(0x125)](_0x2f272d,_0x563e72(0x110)+_0x3bc154,{'error':_0x1dfeab instanceof Error?_0x1dfeab[_0x563e72(0x109)]:String(_0x1dfeab),'duration':_0xa03440});throw _0x1dfeab;}}[a80_0x4614ab(0xfb)](){const _0x2995fa=a80_0x4614ab;try{if(!a80_0x5280d2[_0x2995fa(0x113)](this[_0x2995fa(0x122)]))return[];const _0xa7fcbd=a80_0x5280d2[_0x2995fa(0xf6)](this[_0x2995fa(0x122)],_0x2995fa(0x118));return _0xa7fcbd[_0x2995fa(0xfd)]('\x0a')[_0x2995fa(0x101)](_0x3ad122=>_0x3ad122[_0x2995fa(0x10e)]())[_0x2995fa(0x119)](_0x95b604=>JSON['parse'](_0x95b604));}catch(_0x28ad28){return console['warn']('Failed\x20to\x20read\x20logs:',_0x28ad28),[];}}['clearLogs'](){const _0x5bb71f=a80_0x4614ab;try{a80_0x5280d2[_0x5bb71f(0x113)](this[_0x5bb71f(0x122)])&&a80_0x5280d2['writeFileSync'](this['logFilePath'],'',_0x5bb71f(0x118));}catch(_0x32d35b){console['warn'](_0x5bb71f(0xf9),_0x32d35b);}}[a80_0x4614ab(0xf7)](){return this['winstonLogger'];}}export const logger=new Logger();
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x145ca8=a81_0x2d7e;function a81_0x56da(){const _0x23ba7f=['content','statusText','2132672roJygQ','44RXSfrV','CDN\x20请求失败:\x20','CDN\x20返回数据格式错误','6yQIwtg','47369uKdemp','10558GmRxQt','../../cdn-source/rules/lovrabet_rules.mdc.tpl','32Keoniv','2258890JxOyIE','2083140vpExTT','161355nVjoII','json','lastUpdated','本地模板文件不存在:\x20','utf-8','12438888kZOIQS','agents.md','9nDJauX','/rules/rules.json'];a81_0x56da=function(){return _0x23ba7f;};return a81_0x56da();}(function(_0x3a7e9c,_0x182a04){const _0x319777=a81_0x2d7e,_0x1999c3=_0x3a7e9c();while(!![]){try{const _0x44e9ea=parseInt(_0x319777(0x8f))/0x1*(-parseInt(_0x319777(0x8d))/0x2)+-parseInt(_0x319777(0x92))/0x3*(parseInt(_0x319777(0x9e))/0x4)+parseInt(_0x319777(0x91))/0x5+parseInt(_0x319777(0xa1))/0x6*(parseInt(_0x319777(0xa2))/0x7)+-parseInt(_0x319777(0x9d))/0x8+-parseInt(_0x319777(0x99))/0x9*(parseInt(_0x319777(0x90))/0xa)+parseInt(_0x319777(0x97))/0xb;if(_0x44e9ea===_0x182a04)break;else _0x1999c3['push'](_0x1999c3['shift']());}catch(_0x127122){_0x1999c3['push'](_0x1999c3['shift']());}}}(a81_0x56da,0x4986f));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x258c04=a81_0x2d7e,_0x3840aa=getTemplateBaseUrl();return _0x3840aa+_0x258c04(0x9a);}function a81_0x2d7e(_0x42ff02,_0x4657ce){_0x42ff02=_0x42ff02-0x8d;const _0x56da61=a81_0x56da();let _0x2d7ecb=_0x56da61[_0x42ff02];return _0x2d7ecb;}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a81_0x145ca8(0x8e));export async function fetchRulesFromCDN(){const _0x5776bd=a81_0x145ca8,_0x46616b=getRulesCdnUrl(),_0x2f2dcb=await fetch(_0x46616b,{'headers':{'Accept':'application/json'}});if(!_0x2f2dcb['ok'])throw new Error(_0x5776bd(0x9f)+_0x2f2dcb['status']+'\x20'+_0x2f2dcb[_0x5776bd(0x9c)]);const _0x39fdca=await _0x2f2dcb[_0x5776bd(0x93)]();if(!_0x39fdca[_0x5776bd(0x9b)]||typeof _0x39fdca['content']!=='string')throw new Error(_0x5776bd(0xa0));return _0x39fdca;}export async function getRulesContent(){const _0x9e9ff5=a81_0x145ca8;try{const _0x5e7cec=await fetchRulesFromCDN();return _0x5e7cec[_0x9e9ff5(0x9b)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x2837d1=a81_0x145ca8;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x2837d1(0x96));throw new Error(_0x2837d1(0x95)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x355f21){const _0x3080ff=a81_0x145ca8,_0x17c87c=await fetchRulesFromCDN()['catch'](()=>null);let _0x2e7614;_0x17c87c?(_0x2e7614=_0x17c87c['content'],_0x17c87c[_0x3080ff(0x94)]&&(_0x2e7614=appendUpdateTime(_0x2e7614,_0x17c87c[_0x3080ff(0x94)]))):_0x2e7614=readLocalTemplate();const _0x5e4eaf=dirname(_0x355f21);!existsSync(_0x5e4eaf)&&mkdirSync(_0x5e4eaf,{'recursive':!![]}),writeFileSync(_0x355f21,_0x2e7614,_0x3080ff(0x96));}export async function copyRulesToCursor(_0x143e2f){const _0x3bfae4=join(_0x143e2f,'.cursor/rules'),_0x42a702=join(_0x3bfae4,'lovrabet_rules.mdc');if(existsSync(_0x42a702))return![];return await writeRulesFile(_0x42a702),!![];}export async function copyRulesToAgentsMd(_0x1ec249){const _0x1faf92=a81_0x145ca8,_0x2a2ee7=join(_0x1ec249,_0x1faf92(0x98));if(existsSync(_0x2a2ee7))return![];return await writeRulesFile(_0x2a2ee7),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x239f1d){return new Promise(_0x4ff414=>setTimeout(_0x4ff414,_0x239f1d));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a83_0x4a7d(_0x11329c,_0x19ee97){_0x11329c=_0x11329c-0x193;const _0x568415=a83_0x5684();let _0x4a7d8b=_0x568415[_0x11329c];return _0x4a7d8b;}const a83_0x2dcd00=a83_0x4a7d;(function(_0x2a580b,_0x541905){const _0x373388=a83_0x4a7d,_0x24dc21=_0x2a580b();while(!![]){try{const _0x46ce46=parseInt(_0x373388(0x1be))/0x1*(-parseInt(_0x373388(0x1bc))/0x2)+-parseInt(_0x373388(0x19e))/0x3+parseInt(_0x373388(0x1a4))/0x4*(-parseInt(_0x373388(0x1d7))/0x5)+-parseInt(_0x373388(0x1a7))/0x6+-parseInt(_0x373388(0x1a8))/0x7*(parseInt(_0x373388(0x1c4))/0x8)+parseInt(_0x373388(0x1a5))/0x9+-parseInt(_0x373388(0x1ad))/0xa*(-parseInt(_0x373388(0x1c9))/0xb);if(_0x46ce46===_0x541905)break;else _0x24dc21['push'](_0x24dc21['shift']());}catch(_0x13e38d){_0x24dc21['push'](_0x24dc21['shift']());}}}(a83_0x5684,0xb606b));function a83_0x5684(){const _0x362aba=['template','toUpperCase','datasetCode:\x20\x22','2622390FhFMSj','.js','isFile','.tpl','toISOString','toDisplayTitle','5481244eAHlJK','8642889GIixTZ','mkdir','460170hBgWFO','56Jstogn','2-digit','join','default','name','25286460raPrPR','now','模板内容替换失败','charAt','map','promises','processFile','../../package.json','success','toLowerCase','message','processDirectory','toLocaleTimeString','replaceContent','.json','66842PgSTpt','copyFile','4CIIQwu','alias:\x20\x22','datasetCode','name:\x20\x22','includes','numeric','288568xrBenv','info','开始处理模板内容替换','split','pop','11qafxIw','\x0a\x20\x20\x20\x20{\x20','endsWith','YourModel','api','toLocaleDateString','utf8','replace','isDirectory','.css','processTemplate','writeFile','.tsx','.scss','5vICSSc','slice','alias','readFile','toComponentName','extname','.md','\x20},','readdir'];a83_0x5684=function(){return _0x362aba;};return a83_0x5684();}import a83_0x3b7040 from'node:fs';import a83_0x9af08c from'node:path';import{createRequire}from'node:module';import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require(a83_0x2dcd00(0x1b4))['version'];export class TemplateReplacer{static[a83_0x2dcd00(0x196)](_0x74d6e1){const _0x1c16b0=a83_0x2dcd00,_0x5b12af=_0x74d6e1[_0x1c16b0(0x1c7)]('/')[_0x1c16b0(0x1c8)]()||_0x74d6e1;return _0x5b12af['split']('-')['map'](_0x38be98=>_0x38be98[_0x1c16b0(0x1b0)](0x0)[_0x1c16b0(0x19c)]()+_0x38be98['slice'](0x1)[_0x1c16b0(0x1b6)]())['join']('');}static[a83_0x2dcd00(0x1a3)](_0x52701e){const _0x21d187=a83_0x2dcd00,_0x10992e=_0x52701e[_0x21d187(0x1c7)]('/')[_0x21d187(0x1c8)]()||_0x52701e;return _0x10992e[_0x21d187(0x1c7)]('-')['map'](_0x4f60df=>_0x4f60df['charAt'](0x0)['toUpperCase']()+_0x4f60df[_0x21d187(0x193)](0x1)['toLowerCase']())[_0x21d187(0x1aa)]('\x20');}static[a83_0x2dcd00(0x1ba)](_0x30781a,_0x581c25,_0xdfea61){const _0x343535=a83_0x2dcd00,_0x1850cb=this['toComponentName'](_0x581c25),_0x1de3de=this[_0x343535(0x1a3)](_0x581c25),_0x1db021=new Date(),_0xe28f4a=_0x1db021['toLocaleString'](undefined,{'year':'numeric','month':_0x343535(0x1a9),'day':_0x343535(0x1a9),'hour':_0x343535(0x1a9),'minute':'2-digit','second':'2-digit','hour12':![]})[_0x343535(0x1d0)](/\//g,'-'),_0x36049a=_0x1db021[_0x343535(0x1ce)](undefined,{'year':_0x343535(0x1c3),'month':_0x343535(0x1a9),'day':_0x343535(0x1a9)})['replace'](/\//g,'-'),_0x2248c4=_0x1db021[_0x343535(0x1b9)](undefined,{'hour12':![]});let _0x2c7cae=_0x30781a[_0x343535(0x1d0)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x1850cb)[_0x343535(0x1d0)](/\{DisplayTitle\}/g,_0x1de3de)[_0x343535(0x1d0)](/\{PageName\}/g,_0x581c25)[_0x343535(0x1d0)](/\{TemplateName\}/g,_0xdfea61)['replace'](/\{CreatedAt\}/g,_0xe28f4a)[_0x343535(0x1d0)](/\{CreatedDate\}/g,_0x36049a)['replace'](/\{CreatedTime\}/g,_0x2248c4);return _0x2c7cae;}static['replaceApiContent'](_0x427da4,_0x467f3b,_0x50e1f3,_0x1a64e8,_0x10a356,_0x30961f,_0x596a46){const _0x2fe018=a83_0x2dcd00,_0x2cfd4c=new Date(),_0x2ec816=_0x2cfd4c[_0x2fe018(0x1a2)](),_0x59916d=_0x50e1f3[_0x2fe018(0x1b1)](_0x2842f4=>{const _0x110acc=_0x2fe018,_0x78179f=[_0x110acc(0x19d)+_0x2842f4[_0x110acc(0x1c0)]+'\x22','tableName:\x20\x22'+_0x2842f4['tableName']+'\x22',_0x110acc(0x1c1)+_0x2842f4[_0x110acc(0x1ac)]+'\x22'];return _0x2842f4['alias']&&_0x78179f['push'](_0x110acc(0x1bf)+_0x2842f4[_0x110acc(0x194)]+'\x22'),_0x110acc(0x1ca)+_0x78179f[_0x110acc(0x1aa)](',\x20')+_0x110acc(0x199);})[_0x2fe018(0x1aa)](''),_0x2874d7=_0x1a64e8||_0x50e1f3[0x0]?.[_0x2fe018(0x194)]||_0x2fe018(0x1cc);let _0x508968=_0x427da4[_0x2fe018(0x1d0)](/\{AppCode\}/g,_0x467f3b)[_0x2fe018(0x1d0)](/\{ModelConfigs\}/g,_0x59916d)['replace'](/\{ExampleModelName\}/g,_0x2874d7)[_0x2fe018(0x1d0)](/\{ApiFileName\}/g,_0x10a356||_0x2fe018(0x1cd))['replace'](/\{ConfigName\}/g,_0x30961f||_0x2fe018(0x1ab))[_0x2fe018(0x1d0)](/\{ClientConfigParam\}/g,_0x596a46||'')[_0x2fe018(0x1d0)](/\{CreatedAt\}/g,_0x2ec816);return _0x508968;}static async[a83_0x2dcd00(0x1d3)](_0x51cb95,_0x36841b,_0x3ac258,_0x5a6226,_0x56b902=!![]){const _0x2aa8d0=a83_0x2dcd00,_0x3eec67=Date[_0x2aa8d0(0x1ae)]();try{_0x56b902&&logger[_0x2aa8d0(0x1c5)](_0x2aa8d0(0x19b),_0x2aa8d0(0x1c6),{'templatePath':_0x51cb95,'targetPath':_0x36841b,'pageName':_0x3ac258,'templateName':_0x5a6226});await a83_0x3b7040[_0x2aa8d0(0x1b2)][_0x2aa8d0(0x1a6)](_0x36841b,{'recursive':!![]}),await this[_0x2aa8d0(0x1b8)](_0x51cb95,_0x36841b,_0x3ac258,_0x5a6226);if(_0x56b902){const _0x1a401a=Date['now']()-_0x3eec67;logger[_0x2aa8d0(0x1b5)](_0x2aa8d0(0x19b),'模板内容替换完成',_0x1a401a,{'pageName':_0x3ac258,'templateName':_0x5a6226});}}catch(_0x13ac02){if(_0x56b902){const _0x347c03=Date[_0x2aa8d0(0x1ae)]()-_0x3eec67;logger['error'](_0x2aa8d0(0x19b),_0x2aa8d0(0x1af),{'templatePath':_0x51cb95,'targetPath':_0x36841b,'pageName':_0x3ac258,'templateName':_0x5a6226,'error':_0x13ac02 instanceof Error?_0x13ac02[_0x2aa8d0(0x1b7)]:String(_0x13ac02),'duration':_0x347c03});}throw _0x13ac02;}}static async[a83_0x2dcd00(0x1b8)](_0x580efd,_0x12ff69,_0x33be69,_0x3119d4){const _0x27722a=a83_0x2dcd00,_0xfbd939=await a83_0x3b7040['promises'][_0x27722a(0x19a)](_0x580efd,{'withFileTypes':!![]});for(const _0x4a69f0 of _0xfbd939){const _0xcf91f8=a83_0x9af08c[_0x27722a(0x1aa)](_0x580efd,_0x4a69f0[_0x27722a(0x1ac)]);let _0x27af0b=a83_0x9af08c['join'](_0x12ff69,_0x4a69f0[_0x27722a(0x1ac)]);_0x4a69f0[_0x27722a(0x1ac)][_0x27722a(0x1cb)](_0x27722a(0x1a1))&&(_0x27af0b=a83_0x9af08c['join'](_0x12ff69,_0x4a69f0[_0x27722a(0x1ac)][_0x27722a(0x1d0)](/\.tpl$/,'')));if(_0x4a69f0[_0x27722a(0x1d1)]())await a83_0x3b7040['promises']['mkdir'](_0x27af0b,{'recursive':!![]}),await this[_0x27722a(0x1b8)](_0xcf91f8,_0x27af0b,_0x33be69,_0x3119d4);else _0x4a69f0[_0x27722a(0x1a0)]()&&await this[_0x27722a(0x1b3)](_0xcf91f8,_0x27af0b,_0x33be69,_0x3119d4);}}static async['processFile'](_0x2fb030,_0x47154e,_0x3b5922,_0x5ba82b){const _0x1d6397=a83_0x2dcd00,_0x76f770=a83_0x9af08c[_0x1d6397(0x197)](_0x2fb030)[_0x1d6397(0x1b6)]();_0x2fb030['endsWith'](_0x1d6397(0x1a1))&&(_0x47154e=_0x47154e[_0x1d6397(0x1d0)](/\.tpl$/,''));const _0xdd263c=[_0x1d6397(0x1d5),'.ts','.jsx',_0x1d6397(0x19f),_0x1d6397(0x1bb),_0x1d6397(0x198),_0x1d6397(0x1d2),_0x1d6397(0x1d6),_0x1d6397(0x1a1)];if(_0xdd263c[_0x1d6397(0x1c2)](_0x76f770)||_0x2fb030[_0x1d6397(0x1cb)](_0x1d6397(0x1a1))){const _0x1af193=await a83_0x3b7040[_0x1d6397(0x1b2)][_0x1d6397(0x195)](_0x2fb030,_0x1d6397(0x1cf)),_0xa4e3c5=this[_0x1d6397(0x1ba)](_0x1af193,_0x3b5922,_0x5ba82b);await a83_0x3b7040['promises'][_0x1d6397(0x1d4)](_0x47154e,_0xa4e3c5,_0x1d6397(0x1cf));}else await a83_0x3b7040[_0x1d6397(0x1b2)][_0x1d6397(0x1bd)](_0x2fb030,_0x47154e);}}
|
package/package.json
CHANGED
|
@@ -2,7 +2,17 @@
|
|
|
2
2
|
* Title: Rabetbase 开发指南
|
|
3
3
|
*/
|
|
4
4
|
import React from "react";
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
Typography,
|
|
7
|
+
Card,
|
|
8
|
+
Row,
|
|
9
|
+
Col,
|
|
10
|
+
Button,
|
|
11
|
+
Tabs,
|
|
12
|
+
Alert,
|
|
13
|
+
Space,
|
|
14
|
+
Tag,
|
|
15
|
+
} from "antd";
|
|
6
16
|
import {
|
|
7
17
|
CodeOutlined,
|
|
8
18
|
RobotOutlined,
|
|
@@ -303,11 +313,15 @@ lovrabet menu sync`;
|
|
|
303
313
|
<Title level={3} style={{ marginBottom: 12 }}>
|
|
304
314
|
什么是 Rabetbase?
|
|
305
315
|
</Title>
|
|
306
|
-
<Paragraph
|
|
316
|
+
<Paragraph
|
|
317
|
+
style={{ fontSize: 15, marginBottom: 16, color: "#595959" }}
|
|
318
|
+
>
|
|
307
319
|
<strong>Rabetbase 是 Lovrabet 面向技术岗位的开发者平台。</strong>
|
|
308
320
|
<br />
|
|
309
|
-
Lovrabet 工作台让业务人员用 AI
|
|
310
|
-
|
|
321
|
+
Lovrabet 工作台让业务人员用 AI
|
|
322
|
+
生成管理系统,但有些个性化需求(如小程序、ERP
|
|
323
|
+
对接、复杂业务逻辑)需要开发者介入。 Rabetbase 把 Lovrabet
|
|
324
|
+
平台的数据能力开放出来,让开发者专注于写业务逻辑。
|
|
311
325
|
</Paragraph>
|
|
312
326
|
<Space wrap>
|
|
313
327
|
<Button
|
|
@@ -355,10 +369,19 @@ lovrabet menu sync`;
|
|
|
355
369
|
padding: 20,
|
|
356
370
|
}}
|
|
357
371
|
>
|
|
358
|
-
<Text
|
|
372
|
+
<Text
|
|
373
|
+
style={{ fontSize: 14, display: "block", marginBottom: 12 }}
|
|
374
|
+
>
|
|
359
375
|
<strong>核心价值:</strong>
|
|
360
376
|
</Text>
|
|
361
|
-
<ul
|
|
377
|
+
<ul
|
|
378
|
+
style={{
|
|
379
|
+
color: "#595959",
|
|
380
|
+
margin: 0,
|
|
381
|
+
paddingLeft: 20,
|
|
382
|
+
fontSize: 14,
|
|
383
|
+
}}
|
|
384
|
+
>
|
|
362
385
|
<li style={{ marginBottom: 8 }}>AI 自动理解业务模型</li>
|
|
363
386
|
<li style={{ marginBottom: 8 }}>现成的 API 和 SDK</li>
|
|
364
387
|
<li style={{ marginBottom: 8 }}>开发效率提升 2~5 倍</li>
|
|
@@ -436,14 +436,14 @@ const options = await lovrabetClient
|
|
|
436
436
|
<Card size="small" style={{ marginTop: 24, background: "#f5f5f5" }}>
|
|
437
437
|
<Paragraph style={{ margin: 0, textAlign: "center" }}>
|
|
438
438
|
<Text type="secondary">
|
|
439
|
-
|
|
439
|
+
技术开发文档指引:{" "}
|
|
440
440
|
<a
|
|
441
|
-
href="https://open.lovrabet.com/docs/
|
|
441
|
+
href="https://open.lovrabet.com/docs/guides/tutorial"
|
|
442
442
|
target="_blank"
|
|
443
443
|
rel="noopener noreferrer"
|
|
444
444
|
style={{ color: "#1890ff" }}
|
|
445
445
|
>
|
|
446
|
-
https://open.lovrabet.com/docs/
|
|
446
|
+
https://open.lovrabet.com/docs/guides/tutorial
|
|
447
447
|
</a>
|
|
448
448
|
</Text>
|
|
449
449
|
</Paragraph>
|