@lovrabet/cli 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/add-page/input-page-router.js +1 -1
- package/lib/add-page/main.js +1 -1
- package/lib/add-page/select-page-template.js +1 -1
- 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.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 -0
- package/lib/i18n/hooks.js +1 -0
- package/lib/i18n/index.js +1 -0
- package/lib/i18n/locales/en-US.js +1 -0
- package/lib/i18n/locales/zh-CN.js +1 -0
- 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/router-updater.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 +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a83_0x56eb(_0x212c13,_0x1e816d){_0x212c13=_0x212c13-0x1ec;const _0x2f0ba4=a83_0x2f0b();let _0x56eb4f=_0x2f0ba4[_0x212c13];return _0x56eb4f;}function a83_0x2f0b(){const _0x3bf121=['addPageRoute','path:\x20\x22','4514496UKUkXI','success','split','indexOf','map','index','lastIndexOf','\x20from\x20\x22../pages/','3qFvGiG','writeFile','4951062vRbtlp','\x22,\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20element:\x20<','match','路由文件不存在:\x20','25022630VyWjLP','router','includes','路由配置更新完成','charAt','error','info','previewChanges','toComponentName','src','\x20\x20\x20\x20\x20\x20\x20\x20{\x0a\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20path:\x20\x22','771146BzfZEm','开始更新路由配置','3553890kExsBv','addRoute','length','routerFilePath','4mpKKqL','join','readFile','143507TyyXlL','now','existsSync','371889hxlOMj','import\x20','slice','路由配置更新失败','6GKXpbY','toLowerCase','toUpperCase','message','utf8','addImport'];a83_0x2f0b=function(){return _0x3bf121;};return a83_0x2f0b();}const a83_0x2680c8=a83_0x56eb;(function(_0x1d3f46,_0x5cc71c){const _0x4a862c=a83_0x56eb,_0x42348f=_0x1d3f46();while(!![]){try{const _0x4c235e=parseInt(_0x4a862c(0x1fd))/0x1+parseInt(_0x4a862c(0x1f4))/0x2*(-parseInt(_0x4a862c(0x214))/0x3)+parseInt(_0x4a862c(0x1fa))/0x4*(-parseInt(_0x4a862c(0x1f6))/0x5)+-parseInt(_0x4a862c(0x204))/0x6*(-parseInt(_0x4a862c(0x200))/0x7)+-parseInt(_0x4a862c(0x20c))/0x8+-parseInt(_0x4a862c(0x216))/0x9+parseInt(_0x4a862c(0x21a))/0xa;if(_0x4c235e===_0x5cc71c)break;else _0x42348f['push'](_0x42348f['shift']());}catch(_0x4957f7){_0x42348f['push'](_0x42348f['shift']());}}}(a83_0x2f0b,0x772b4));import a83_0x288469 from'node:fs';import a83_0x34e871 from'node:path';import{logger}from'./logger.js';export class RouterUpdater{[a83_0x2680c8(0x1f9)];constructor(_0x347441){const _0x1a5b75=a83_0x2680c8;this[_0x1a5b75(0x1f9)]=a83_0x34e871[_0x1a5b75(0x1fb)](_0x347441,_0x1a5b75(0x1f2),_0x1a5b75(0x21b),'index.tsx');}async[a83_0x2680c8(0x20a)](_0x4bc333,_0x5aa689){const _0x28efb7=a83_0x2680c8;if(!a83_0x288469[_0x28efb7(0x1ff)](this[_0x28efb7(0x1f9)]))throw new Error('路由文件不存在:\x20'+this[_0x28efb7(0x1f9)]);const _0x332d04=Date[_0x28efb7(0x1fe)]();logger[_0x28efb7(0x1ef)](_0x28efb7(0x21b),_0x28efb7(0x1f5),{'pageName':_0x4bc333,'routePath':_0x5aa689,'file':this[_0x28efb7(0x1f9)]});try{const _0xe6f719=await a83_0x288469['promises'][_0x28efb7(0x1fc)](this[_0x28efb7(0x1f9)],_0x28efb7(0x208)),_0x334f3f=this[_0x28efb7(0x1f1)](_0x4bc333),_0x5b90b1=this[_0x28efb7(0x209)](_0xe6f719,_0x334f3f,_0x4bc333),_0x1a3be8=this[_0x28efb7(0x1f7)](_0x5b90b1,_0x5aa689,_0x334f3f);await a83_0x288469['promises'][_0x28efb7(0x215)](this[_0x28efb7(0x1f9)],_0x1a3be8,_0x28efb7(0x208));const _0x3becb7=Date[_0x28efb7(0x1fe)]()-_0x332d04;logger[_0x28efb7(0x20d)](_0x28efb7(0x21b),_0x28efb7(0x1ec),_0x3becb7,{'pageName':_0x4bc333,'routePath':_0x5aa689,'componentName':_0x334f3f});}catch(_0x572655){const _0x3aab99=Date[_0x28efb7(0x1fe)]()-_0x332d04;logger[_0x28efb7(0x1ee)](_0x28efb7(0x21b),_0x28efb7(0x203),{'pageName':_0x4bc333,'routePath':_0x5aa689,'error':_0x572655 instanceof Error?_0x572655[_0x28efb7(0x207)]:String(_0x572655),'duration':_0x3aab99});throw _0x572655;}}['toComponentName'](_0xb145de){const _0x33e1e6=a83_0x2680c8;return _0xb145de[_0x33e1e6(0x20e)]('-')[_0x33e1e6(0x210)](_0x3d3e42=>_0x3d3e42[_0x33e1e6(0x1ed)](0x0)[_0x33e1e6(0x206)]()+_0x3d3e42['slice'](0x1)[_0x33e1e6(0x205)]())[_0x33e1e6(0x1fb)]('');}[a83_0x2680c8(0x209)](_0x4cd345,_0x270b3d,_0x144499){const _0x2e2ebf=a83_0x2680c8,_0x3c6297=/import\s+\w+\s+from\s+["']\.\.\/pages\/\w+["'];?\n/g,_0x32179a=_0x4cd345[_0x2e2ebf(0x218)](_0x3c6297)||[],_0x2b8c96=_0x2e2ebf(0x201)+_0x270b3d+_0x2e2ebf(0x213)+_0x144499+'\x22;';if(_0x4cd345[_0x2e2ebf(0x21c)](_0x2b8c96))return _0x4cd345;if(_0x32179a[_0x2e2ebf(0x1f8)]>0x0){const _0x1e375d=_0x32179a[_0x32179a[_0x2e2ebf(0x1f8)]-0x1];if(_0x1e375d){const _0x5eabef=_0x4cd345['lastIndexOf'](_0x1e375d),_0x52b36c=_0x5eabef+_0x1e375d[_0x2e2ebf(0x1f8)];return _0x4cd345['slice'](0x0,_0x52b36c)+_0x2b8c96+'\x0a'+_0x4cd345[_0x2e2ebf(0x202)](_0x52b36c);}}const _0x3b8cf2=_0x4cd345[_0x2e2ebf(0x218)](/import\s+\w+\s+from\s+["']\.\.\/layouts\/\w+["'];?\n/);if(_0x3b8cf2&&_0x3b8cf2['index']!==undefined){const _0x33c653=_0x3b8cf2['index']+_0x3b8cf2[0x0][_0x2e2ebf(0x1f8)];return _0x4cd345['slice'](0x0,_0x33c653)+_0x2b8c96+'\x0a'+_0x4cd345['slice'](_0x33c653);}return _0x4cd345;}['addRoute'](_0x4d48a3,_0x4ddea2,_0x18bd85){const _0x56240b=a83_0x2680c8,_0x471fe1=_0x56240b(0x1f3)+_0x4ddea2+_0x56240b(0x217)+_0x18bd85+'\x20/>,\x0a\x20\x20\x20\x20\x20\x20\x20\x20},';if(_0x4d48a3[_0x56240b(0x21c)](_0x56240b(0x20b)+_0x4ddea2+'\x22'))return _0x4d48a3;const _0x5d3449=/children:\s*\[([\s\S]*?)\]/,_0x870d86=_0x4d48a3[_0x56240b(0x218)](_0x5d3449);if(!_0x870d86||_0x870d86['index']===undefined)throw new Error('未找到路由配置的\x20children\x20数组');const _0x23b177=_0x870d86[0x1],_0x516bd0=_0x870d86[_0x56240b(0x211)]+_0x870d86[0x0][_0x56240b(0x20f)]('[')+0x1,_0x15dd83=_0x23b177?.[_0x56240b(0x218)](/\{[\s\S]*?\},/g)||[];if(_0x15dd83[_0x56240b(0x1f8)]>0x0){const _0x20d6e4=_0x15dd83[_0x15dd83[_0x56240b(0x1f8)]-0x1];if(_0x20d6e4){const _0x53fafa=_0x4d48a3[_0x56240b(0x212)](_0x20d6e4),_0x9e22fa=_0x53fafa+_0x20d6e4[_0x56240b(0x1f8)];return _0x4d48a3['slice'](0x0,_0x9e22fa)+'\x0a'+_0x471fe1+_0x4d48a3['slice'](_0x9e22fa);}}return _0x4d48a3[_0x56240b(0x202)](0x0,_0x516bd0)+'\x0a'+_0x471fe1+_0x4d48a3[_0x56240b(0x202)](_0x516bd0);}async[a83_0x2680c8(0x1f0)](_0x3e8167,_0x4f3314){const _0x20ccd6=a83_0x2680c8;if(!a83_0x288469[_0x20ccd6(0x1ff)](this[_0x20ccd6(0x1f9)]))throw new Error(_0x20ccd6(0x219)+this['routerFilePath']);const _0x342282=await a83_0x288469['promises'][_0x20ccd6(0x1fc)](this[_0x20ccd6(0x1f9)],_0x20ccd6(0x208)),_0x746d90=this[_0x20ccd6(0x1f1)](_0x3e8167);let _0x4da995=this[_0x20ccd6(0x209)](_0x342282,_0x746d90,_0x3e8167);return _0x4da995=this[_0x20ccd6(0x1f7)](_0x4da995,_0x4f3314,_0x746d90),_0x4da995;}}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x4765d5=a84_0x312e;(function(_0xba1f3e,_0xb4e45f){const _0x24b25c=a84_0x312e,_0x153b42=_0xba1f3e();while(!![]){try{const _0x4e3e17=parseInt(_0x24b25c(0x1f8))/0x1+-parseInt(_0x24b25c(0x1ef))/0x2*(-parseInt(_0x24b25c(0x1f7))/0x3)+-parseInt(_0x24b25c(0x1ea))/0x4+-parseInt(_0x24b25c(0x1f2))/0x5+parseInt(_0x24b25c(0x1e7))/0x6+parseInt(_0x24b25c(0x1f5))/0x7+-parseInt(_0x24b25c(0x1ee))/0x8;if(_0x4e3e17===_0xb4e45f)break;else _0x153b42['push'](_0x153b42['shift']());}catch(_0x42a2f8){_0x153b42['push'](_0x153b42['shift']());}}}(a84_0x34cb,0xceec5));function a84_0x34cb(){const _0x2a1fc8=['lastUpdated','.cursor/rules','../../cdn-source/rules/lovrabet_rules.mdc.tpl','utf-8','json','8570562SOcmla','catch','application/json','6640200MpTtUX','content','CDN\x20请求失败:\x20','/rules/rules.json','3271504UlPkIG','1920862sQbivx','lovrabet_rules.mdc','CDN\x20返回数据格式错误','4807385tiTPBc','本地模板文件不存在:\x20','statusText','7782467cKUQrV','string','3orgUAA','377383rQTIuw'];a84_0x34cb=function(){return _0x2a1fc8;};return a84_0x34cb();}import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';function a84_0x312e(_0x2c8c9d,_0x492401){_0x2c8c9d=_0x2c8c9d-0x1e4;const _0x34cb98=a84_0x34cb();let _0x312e24=_0x34cb98[_0x2c8c9d];return _0x312e24;}import{getTemplateBaseUrl}from'./config.js';import{appendUpdateTime}from'./guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x56861f=a84_0x312e,_0x4098a8=getTemplateBaseUrl();return _0x4098a8+_0x56861f(0x1ed);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a84_0x4765d5(0x1e4));export async function fetchRulesFromCDN(){const _0x1a9557=a84_0x4765d5,_0x3495c7=getRulesCdnUrl(),_0x55b2a1=await fetch(_0x3495c7,{'headers':{'Accept':_0x1a9557(0x1e9)}});if(!_0x55b2a1['ok'])throw new Error(_0x1a9557(0x1ec)+_0x55b2a1['status']+'\x20'+_0x55b2a1[_0x1a9557(0x1f4)]);const _0x48a43d=await _0x55b2a1[_0x1a9557(0x1e6)]();if(!_0x48a43d[_0x1a9557(0x1eb)]||typeof _0x48a43d[_0x1a9557(0x1eb)]!==_0x1a9557(0x1f6))throw new Error(_0x1a9557(0x1f1));return _0x48a43d;}export async function getRulesContent(){const _0x5d8703=a84_0x4765d5;try{const _0x7ab910=await fetchRulesFromCDN();return _0x7ab910[_0x5d8703(0x1eb)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x374f02=a84_0x4765d5;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x374f02(0x1e5));throw new Error(_0x374f02(0x1f3)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x51594f){const _0x47e525=a84_0x4765d5,_0x338643=await fetchRulesFromCDN()[_0x47e525(0x1e8)](()=>null);let _0x4148c6;_0x338643?(_0x4148c6=_0x338643['content'],_0x338643['lastUpdated']&&(_0x4148c6=appendUpdateTime(_0x4148c6,_0x338643[_0x47e525(0x1f9)]))):_0x4148c6=readLocalTemplate();const _0x535989=dirname(_0x51594f);!existsSync(_0x535989)&&mkdirSync(_0x535989,{'recursive':!![]}),writeFileSync(_0x51594f,_0x4148c6,_0x47e525(0x1e5));}export async function copyRulesToCursor(_0x22e3c1){const _0x322773=a84_0x4765d5,_0x3f65bb=join(_0x22e3c1,_0x322773(0x1fa)),_0x25846b=join(_0x3f65bb,_0x322773(0x1f0));if(existsSync(_0x25846b))return![];return await writeRulesFile(_0x25846b),!![];}export async function copyRulesToAgentsMd(_0x2acc20){const _0x2e53d4=join(_0x2acc20,'agents.md');if(existsSync(_0x2e53d4))return![];return await writeRulesFile(_0x2e53d4),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x234a73){return new Promise(_0x260e97=>setTimeout(_0x260e97,_0x234a73));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x107d32=a86_0xed76;(function(_0x32ad48,_0x53fbf2){const _0x25378f=a86_0xed76,_0x517096=_0x32ad48();while(!![]){try{const _0x3bb1e6=parseInt(_0x25378f(0x152))/0x1+-parseInt(_0x25378f(0x150))/0x2*(-parseInt(_0x25378f(0x121))/0x3)+parseInt(_0x25378f(0x13d))/0x4+-parseInt(_0x25378f(0x14f))/0x5+-parseInt(_0x25378f(0x12b))/0x6+-parseInt(_0x25378f(0x155))/0x7+parseInt(_0x25378f(0x122))/0x8;if(_0x3bb1e6===_0x53fbf2)break;else _0x517096['push'](_0x517096['shift']());}catch(_0x23a6c0){_0x517096['push'](_0x517096['shift']());}}}(a86_0x8a6c,0x29e6d));import a86_0x1d10f5 from'node:fs';import a86_0x49f290 from'node:path';import{createRequire}from'node:module';function a86_0xed76(_0x1611d6,_0x54c6e4){_0x1611d6=_0x1611d6-0x11f;const _0x8a6cb6=a86_0x8a6c();let _0xed7605=_0x8a6cb6[_0x1611d6];return _0xed7605;}import{logger}from'./logger.js';const require=createRequire(import.meta.url),CLI_VERSION=require(a86_0x107d32(0x12d))[a86_0x107d32(0x15d)];function a86_0x8a6c(){const _0x2a0566=['.jsx','message','version','includes','replace','toDisplayTitle','numeric','15ETSZhV','2100464EjAvgc','.md','map','replaceApiContent','toComponentName','error','datasetCode','mkdir','readFile','770166AhpcKg','processFile','../../package.json','alias','writeFile','split','alias:\x20\x22','readdir','tableName','toLowerCase','isDirectory','default','name','2-digit','\x20},','api','slice','pop','806204yIpMje','\x0a\x20\x20\x20\x20{\x20','toUpperCase','.tpl','push','template','.json','promises','info','.ts','endsWith','.scss','now','datasetCode:\x20\x22','toLocaleDateString','processDirectory','.js','processTemplate','920520oAveHG','29516Igzfbw','toLocaleString','253220Qhaamf','replaceContent','utf8','2149175zZhcZl','charAt','name:\x20\x22','模板内容替换完成','toLocaleTimeString','join'];a86_0x8a6c=function(){return _0x2a0566;};return a86_0x8a6c();}export class TemplateReplacer{static[a86_0x107d32(0x126)](_0x5169e9){const _0x238c2d=a86_0x107d32,_0x573583=_0x5169e9['split']('/')[_0x238c2d(0x13c)]()||_0x5169e9;return _0x573583[_0x238c2d(0x130)]('-')['map'](_0x384e9c=>_0x384e9c[_0x238c2d(0x156)](0x0)[_0x238c2d(0x13f)]()+_0x384e9c[_0x238c2d(0x13b)](0x1)[_0x238c2d(0x134)]())[_0x238c2d(0x15a)]('');}static[a86_0x107d32(0x11f)](_0x2cb35e){const _0x174722=a86_0x107d32,_0xc2ff0a=_0x2cb35e[_0x174722(0x130)]('/')[_0x174722(0x13c)]()||_0x2cb35e;return _0xc2ff0a['split']('-')[_0x174722(0x124)](_0x2c93e2=>_0x2c93e2['charAt'](0x0)['toUpperCase']()+_0x2c93e2[_0x174722(0x13b)](0x1)['toLowerCase']())[_0x174722(0x15a)]('\x20');}static[a86_0x107d32(0x153)](_0x590715,_0x476558,_0x30184a){const _0x5edda1=a86_0x107d32,_0x2f9ab5=this[_0x5edda1(0x126)](_0x476558),_0x58e706=this[_0x5edda1(0x11f)](_0x476558),_0x2443f3=new Date(),_0x4d8a80=_0x2443f3[_0x5edda1(0x151)](undefined,{'year':_0x5edda1(0x120),'month':_0x5edda1(0x138),'day':'2-digit','hour':_0x5edda1(0x138),'minute':_0x5edda1(0x138),'second':_0x5edda1(0x138),'hour12':![]})[_0x5edda1(0x15f)](/\//g,'-'),_0x33bd06=_0x2443f3[_0x5edda1(0x14b)](undefined,{'year':_0x5edda1(0x120),'month':_0x5edda1(0x138),'day':_0x5edda1(0x138)})[_0x5edda1(0x15f)](/\//g,'-'),_0xbbd9b7=_0x2443f3[_0x5edda1(0x159)](undefined,{'hour12':![]});let _0x5cc9be=_0x590715[_0x5edda1(0x15f)](/\{CliVersion\}/g,CLI_VERSION)[_0x5edda1(0x15f)](/\{ComponentName\}/g,_0x2f9ab5)[_0x5edda1(0x15f)](/\{DisplayTitle\}/g,_0x58e706)[_0x5edda1(0x15f)](/\{PageName\}/g,_0x476558)[_0x5edda1(0x15f)](/\{TemplateName\}/g,_0x30184a)[_0x5edda1(0x15f)](/\{CreatedAt\}/g,_0x4d8a80)[_0x5edda1(0x15f)](/\{CreatedDate\}/g,_0x33bd06)[_0x5edda1(0x15f)](/\{CreatedTime\}/g,_0xbbd9b7);return _0x5cc9be;}static[a86_0x107d32(0x125)](_0x472412,_0x1c7001,_0x841595,_0xd3cdc1,_0x4ba35d,_0x153e76,_0x503737){const _0x1384f7=a86_0x107d32,_0x731b1b=new Date(),_0x40d547=_0x731b1b['toISOString'](),_0x33117c=_0x841595[_0x1384f7(0x124)](_0x1a5af7=>{const _0x3754e5=_0x1384f7,_0x13191b=[_0x3754e5(0x14a)+_0x1a5af7[_0x3754e5(0x128)]+'\x22','tableName:\x20\x22'+_0x1a5af7[_0x3754e5(0x133)]+'\x22',_0x3754e5(0x157)+_0x1a5af7[_0x3754e5(0x137)]+'\x22'];return _0x1a5af7[_0x3754e5(0x12e)]&&_0x13191b[_0x3754e5(0x141)](_0x3754e5(0x131)+_0x1a5af7['alias']+'\x22'),_0x3754e5(0x13e)+_0x13191b[_0x3754e5(0x15a)](',\x20')+_0x3754e5(0x139);})['join'](''),_0x58312c=_0xd3cdc1||_0x841595[0x0]?.['alias']||'YourModel';let _0x45a8ca=_0x472412['replace'](/\{AppCode\}/g,_0x1c7001)[_0x1384f7(0x15f)](/\{ModelConfigs\}/g,_0x33117c)[_0x1384f7(0x15f)](/\{ExampleModelName\}/g,_0x58312c)[_0x1384f7(0x15f)](/\{ApiFileName\}/g,_0x4ba35d||_0x1384f7(0x13a))[_0x1384f7(0x15f)](/\{ConfigName\}/g,_0x153e76||_0x1384f7(0x136))[_0x1384f7(0x15f)](/\{ClientConfigParam\}/g,_0x503737||'')[_0x1384f7(0x15f)](/\{CreatedAt\}/g,_0x40d547);return _0x45a8ca;}static async[a86_0x107d32(0x14e)](_0x42d109,_0x386ea5,_0xb0c067,_0xaef707,_0x3f3b1e=!![]){const _0x1dbdb4=a86_0x107d32,_0x1a4270=Date[_0x1dbdb4(0x149)]();try{_0x3f3b1e&&logger[_0x1dbdb4(0x145)](_0x1dbdb4(0x142),'开始处理模板内容替换',{'templatePath':_0x42d109,'targetPath':_0x386ea5,'pageName':_0xb0c067,'templateName':_0xaef707});await a86_0x1d10f5[_0x1dbdb4(0x144)][_0x1dbdb4(0x129)](_0x386ea5,{'recursive':!![]}),await this[_0x1dbdb4(0x14c)](_0x42d109,_0x386ea5,_0xb0c067,_0xaef707);if(_0x3f3b1e){const _0x4a6360=Date[_0x1dbdb4(0x149)]()-_0x1a4270;logger['success']('template',_0x1dbdb4(0x158),_0x4a6360,{'pageName':_0xb0c067,'templateName':_0xaef707});}}catch(_0x3393f9){if(_0x3f3b1e){const _0x5874ef=Date[_0x1dbdb4(0x149)]()-_0x1a4270;logger[_0x1dbdb4(0x127)](_0x1dbdb4(0x142),'模板内容替换失败',{'templatePath':_0x42d109,'targetPath':_0x386ea5,'pageName':_0xb0c067,'templateName':_0xaef707,'error':_0x3393f9 instanceof Error?_0x3393f9[_0x1dbdb4(0x15c)]:String(_0x3393f9),'duration':_0x5874ef});}throw _0x3393f9;}}static async[a86_0x107d32(0x14c)](_0x5ec944,_0x252098,_0x57e117,_0x517d8b){const _0x461890=a86_0x107d32,_0x38eaf4=await a86_0x1d10f5[_0x461890(0x144)][_0x461890(0x132)](_0x5ec944,{'withFileTypes':!![]});for(const _0x36358f of _0x38eaf4){const _0x6338b4=a86_0x49f290[_0x461890(0x15a)](_0x5ec944,_0x36358f[_0x461890(0x137)]);let _0x4518f8=a86_0x49f290['join'](_0x252098,_0x36358f[_0x461890(0x137)]);_0x36358f[_0x461890(0x137)][_0x461890(0x147)](_0x461890(0x140))&&(_0x4518f8=a86_0x49f290[_0x461890(0x15a)](_0x252098,_0x36358f[_0x461890(0x137)][_0x461890(0x15f)](/\.tpl$/,'')));if(_0x36358f[_0x461890(0x135)]())await a86_0x1d10f5[_0x461890(0x144)][_0x461890(0x129)](_0x4518f8,{'recursive':!![]}),await this[_0x461890(0x14c)](_0x6338b4,_0x4518f8,_0x57e117,_0x517d8b);else _0x36358f['isFile']()&&await this['processFile'](_0x6338b4,_0x4518f8,_0x57e117,_0x517d8b);}}static async[a86_0x107d32(0x12c)](_0x46e846,_0xdf234d,_0x1300bc,_0x305213){const _0x2a128b=a86_0x107d32,_0x561bba=a86_0x49f290['extname'](_0x46e846)['toLowerCase']();_0x46e846[_0x2a128b(0x147)](_0x2a128b(0x140))&&(_0xdf234d=_0xdf234d[_0x2a128b(0x15f)](/\.tpl$/,''));const _0x3a586a=['.tsx',_0x2a128b(0x146),_0x2a128b(0x15b),_0x2a128b(0x14d),_0x2a128b(0x143),_0x2a128b(0x123),'.css',_0x2a128b(0x148),_0x2a128b(0x140)];if(_0x3a586a[_0x2a128b(0x15e)](_0x561bba)||_0x46e846[_0x2a128b(0x147)](_0x2a128b(0x140))){const _0x14776f=await a86_0x1d10f5[_0x2a128b(0x144)][_0x2a128b(0x12a)](_0x46e846,_0x2a128b(0x154)),_0x1ac727=this[_0x2a128b(0x153)](_0x14776f,_0x1300bc,_0x305213);await a86_0x1d10f5['promises'][_0x2a128b(0x12f)](_0xdf234d,_0x1ac727,_0x2a128b(0x154));}else await a86_0x1d10f5[_0x2a128b(0x144)]['copyFile'](_0x46e846,_0xdf234d);}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lovrabet/cli",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"bin": {
|
|
6
6
|
"lovrabet": "lib/cli.js"
|
|
@@ -38,6 +38,7 @@
|
|
|
38
38
|
"dependencies": {
|
|
39
39
|
"@types/winston": "^2.4.4",
|
|
40
40
|
"execa": "^9.6.0",
|
|
41
|
+
"i18next": "^25.8.4",
|
|
41
42
|
"ink": "^6.2.3",
|
|
42
43
|
"ink-spinner": "^5.0.0",
|
|
43
44
|
"javascript-obfuscator": "^4.1.1",
|
|
@@ -45,6 +46,7 @@
|
|
|
45
46
|
"meow": "^13.2.0",
|
|
46
47
|
"prettier": "^3.6.2",
|
|
47
48
|
"react": "^19.2.0",
|
|
49
|
+
"react-i18next": "^16.5.4",
|
|
48
50
|
"semver": "^7.7.3",
|
|
49
51
|
"winston": "^3.17.0"
|
|
50
52
|
},
|