@lovrabet/rabetbase-cli 2.0.5 → 2.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/doc.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/new.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -0
- package/lib/commands/project/create/main.js +1 -0
- package/lib/commands/project/create/non-interactive.js +1 -0
- package/lib/commands/project/create/project-template-path.js +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -0
- package/lib/commands/project/upgrade.js +1 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.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/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/platform.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/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/package.json +1 -1
- package/lib/commands/build.js +0 -1
- package/lib/commands/preview.js +0 -1
- package/lib/commands/project-upgrade.js +0 -1
- package/lib/commands/start.js +0 -1
- package/lib/create-app/enhanced-guided-create.js +0 -1
- package/lib/create-app/format-elapsed.js +0 -1
- package/lib/create-app/main.js +0 -1
- package/lib/create-app/non-interactive.js +0 -1
- package/lib/create-app/use-copy-project-template.js +0 -1
- package/lib/create-app/use-format-code.js +0 -1
- package/lib/create-app/use-install-dependencies.js +0 -1
- package/lib/init/main.js +0 -1
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a125_0x5f8407=a125_0x208a;(function(_0x346435,_0x1ea359){const _0x319954=a125_0x208a,_0x568560=_0x346435();while(!![]){try{const _0x1b049e=parseInt(_0x319954(0x10e))/0x1*(parseInt(_0x319954(0x102))/0x2)+parseInt(_0x319954(0x115))/0x3*(parseInt(_0x319954(0x120))/0x4)+parseInt(_0x319954(0x10d))/0x5*(parseInt(_0x319954(0x10a))/0x6)+-parseInt(_0x319954(0x11a))/0x7+parseInt(_0x319954(0x103))/0x8+-parseInt(_0x319954(0x124))/0x9*(parseInt(_0x319954(0x122))/0xa)+-parseInt(_0x319954(0x109))/0xb*(parseInt(_0x319954(0x126))/0xc);if(_0x1b049e===_0x1ea359)break;else _0x568560['push'](_0x568560['shift']());}catch(_0x10f5af){_0x568560['push'](_0x568560['shift']());}}}(a125_0x36c8,0x2e1e2));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';function a125_0x208a(_0x5d26e8,_0x28d8a0){_0x5d26e8=_0x5d26e8-0x102;const _0x36c80b=a125_0x36c8();let _0x208a21=_0x36c80b[_0x5d26e8];return _0x208a21;}import{getTemplateBaseUrl}from'./config.js';function getGuidesCdnUrl(){const _0x3f591e=a125_0x208a,_0x1559ab=getTemplateBaseUrl();return _0x1559ab+_0x3f591e(0x116);}const CACHE_DIR=join(homedir(),'.lovrabet',a125_0x5f8407(0x10b));export async function fetchGuidesFromCDN(){const _0x55bc66=a125_0x5f8407,_0x566e7b=getGuidesCdnUrl(),_0x43f587=await fetch(_0x566e7b,{'headers':{'Accept':'application/json'}});if(!_0x43f587['ok'])throw new Error(_0x55bc66(0x106)+_0x43f587[_0x55bc66(0x104)]+'\x20'+_0x43f587[_0x55bc66(0x11c)]);const _0x3b7647=await _0x43f587[_0x55bc66(0x105)]();if(!_0x3b7647[_0x55bc66(0x125)]||typeof _0x3b7647['guides']!==_0x55bc66(0x119))throw new Error(_0x55bc66(0x110));return _0x3b7647;}export function writeGuidesToProject(_0x45f2ce,_0x14b9d9,_0x2a5b76=a125_0x5f8407(0x121),_0x3f9b10){const _0x2d1699=a125_0x5f8407,_0x226d68=join(_0x14b9d9,_0x2a5b76);mkdirSync(_0x226d68,{'recursive':!![]});for(const [_0x49ce1f,_0x401ae8]of Object[_0x2d1699(0x108)](_0x45f2ce[_0x2d1699(0x125)])){let _0x3b6b23=_0x401ae8[_0x2d1699(0x11e)];_0x401ae8[_0x2d1699(0x10c)]&&(_0x3b6b23=appendUpdateTime(_0x3b6b23,_0x401ae8['lastUpdated'])),writeFileSync(join(_0x226d68,_0x49ce1f+_0x2d1699(0x11b)),_0x3b6b23,_0x2d1699(0x117));}}export function appendUpdateTime(_0x4b9067,_0x186c3f){const _0x325a7f=a125_0x5f8407;return _0x4b9067=_0x4b9067[_0x325a7f(0x114)](/\n*>更新时间:.*$/m,''),_0x4b9067['trimEnd']()+('\x0a\x0a>更新时间:'+_0x186c3f);}export function getSkillTemplate(_0x259f8f){const _0x161150=a125_0x5f8407;return _0x259f8f[_0x161150(0x123)]?.[_0x161150(0x11e)]||'';}export function appendExtendContents(_0x4a1224,_0x6afdb6,_0x212631){const _0x2e0b5f=a125_0x5f8407,_0x564129=[];for(const [,_0x1b2189]of Object[_0x2e0b5f(0x108)](_0x6afdb6[_0x2e0b5f(0x125)])){_0x1b2189[_0x2e0b5f(0x112)]&&_0x564129[_0x2e0b5f(0x111)](_0x1b2189[_0x2e0b5f(0x112)][_0x2e0b5f(0x118)]());}if(_0x564129[_0x2e0b5f(0x11f)]===0x0)return _0x4a1224;return _0x4a1224[_0x2e0b5f(0x118)]()+'\x0a\x0a'+_0x564129['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x16c3ce,_0x3cb72b,_0x512c9d){const _0xe85514=a125_0x5f8407,_0x2b008d=getSkillTemplate(_0x16c3ce);if(!_0x2b008d)throw new Error(_0xe85514(0x11d));const _0xd04c20=dirname(_0x3cb72b);mkdirSync(_0xd04c20,{'recursive':!![]});let _0x2536bf=_0x2b008d[_0xe85514(0x114)](/\{\{IDE_NAME\}\}/g,_0x512c9d);_0x2536bf=appendExtendContents(_0x2536bf,_0x16c3ce),_0x16c3ce[_0xe85514(0x123)][_0xe85514(0x10c)]&&(_0x2536bf=appendUpdateTime(_0x2536bf,_0x16c3ce['skillTemplate'][_0xe85514(0x10c)])),writeFileSync(_0x3cb72b,_0x2536bf,_0xe85514(0x117));}export async function installGuides(_0x27311c){const _0x38e969=a125_0x5f8407,_0x3d40b6=await fetchGuidesFromCDN();return writeGuidesToProject(_0x3d40b6,_0x27311c),Object[_0x38e969(0x113)](_0x3d40b6[_0x38e969(0x125)])[_0x38e969(0x11f)];}function a125_0x36c8(){const _0x10f545=['5nQVmcE','8864AjpOfZ','path','CDN\x20返回数据格式错误','push','extendContent','keys','replace','47163oBRSMC','/skills/guides.json','utf-8','trimEnd','object','1012256ZfESGl','.md','statusText','CDN\x20数据中缺少\x20skillTemplate','content','length','4yocLTD','.lovrabet/skill/guides','20JuYfMh','skillTemplate','478809ZCNGPi','guides','18996mAfFQc','76lCTeGv','2582088XGPEYW','status','json','CDN\x20请求失败:\x20','map','entries','3531EwKJOu','1636422fGNTQN','cache','lastUpdated'];a125_0x36c8=function(){return _0x10f545;};return a125_0x36c8();}export function getGuidesSummary(_0x576213){const _0x2855ac=a125_0x5f8407;return Object[_0x2855ac(0x108)](_0x576213['guides'])[_0x2855ac(0x107)](([_0x41dde0,_0x113fa0])=>({'key':_0x41dde0,'title':_0x113fa0['title'],'path':_0x113fa0[_0x2855ac(0x10f)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1006bd,_0x573f9d){const _0x5efa85=a126_0x654c,_0x320f8e=_0x1006bd();while(!![]){try{const _0x52c881=-parseInt(_0x5efa85(0x147))/0x1+-parseInt(_0x5efa85(0x14e))/0x2+-parseInt(_0x5efa85(0x15b))/0x3+-parseInt(_0x5efa85(0x159))/0x4+parseInt(_0x5efa85(0x153))/0x5+-parseInt(_0x5efa85(0x152))/0x6+-parseInt(_0x5efa85(0x15a))/0x7*(-parseInt(_0x5efa85(0x15d))/0x8);if(_0x52c881===_0x573f9d)break;else _0x320f8e['push'](_0x320f8e['shift']());}catch(_0x53bd5f){_0x320f8e['push'](_0x320f8e['shift']());}}}(a126_0x23a9,0xe9944));export async function httpRequest(_0x2fef9f,_0x19cc7d={}){const _0x1d425a=a126_0x654c,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x19cc7d;let _0x894258=null;for(let _0x315aeb=0x0;_0x315aeb<=retries;_0x315aeb++){try{const _0x456ba9=new AbortController(),_0x48d8b5=setTimeout(()=>_0x456ba9['abort'](),timeout),_0x288836=await fetch(_0x2fef9f,{'headers':headers,'signal':_0x456ba9[_0x1d425a(0x150)]});clearTimeout(_0x48d8b5);let _0xf7bab;const _0x4e0668=_0x288836[_0x1d425a(0x143)][_0x1d425a(0x157)](_0x1d425a(0x15e));return _0x4e0668?.[_0x1d425a(0x146)](_0x1d425a(0x155))?_0xf7bab=await _0x288836[_0x1d425a(0x14a)]():_0xf7bab=await _0x288836['text'](),{'ok':_0x288836['ok'],'status':_0x288836[_0x1d425a(0x158)],'statusText':_0x288836[_0x1d425a(0x14c)],'data':_0xf7bab,'headers':_0x288836[_0x1d425a(0x143)],'url':_0x288836[_0x1d425a(0x148)],'text':()=>_0x288836[_0x1d425a(0x149)]()};}catch(_0x38497e){_0x894258=_0x38497e instanceof Error?_0x38497e:new Error(String(_0x38497e));if(_0x315aeb===retries)break;if(shouldRetry(_0x38497e)){console[_0x1d425a(0x14f)](_0x1d425a(0x15c)+retryDelay+_0x1d425a(0x156)+(_0x315aeb+0x1)+_0x1d425a(0x14d)),await sleep(retryDelay);continue;}else break;}}throw _0x894258||new Error('Request\x20failed');}function a126_0x23a9(){const _0x408582=['1820370SNJPjR','message','application/json','ms\x20后进行第\x20','get','status','7156900xTIfDK','35WjSKCY','371220UhkoEa','*\x20请求失败,','9864632FDDPaR','content-type','name','headers','TypeError','ENOTFOUND','includes','517783oOJZFT','url','text','json','fetch','statusText','\x20次重试...','3103652zVoKRI','log','signal','AbortError','9540930gHgMPs'];a126_0x23a9=function(){return _0x408582;};return a126_0x23a9();}function shouldRetry(_0x4e0251){const _0x52833d=a126_0x654c;if(_0x4e0251 instanceof Error){if(_0x4e0251[_0x52833d(0x15f)]===_0x52833d(0x151))return![];if(_0x4e0251[_0x52833d(0x15f)]===_0x52833d(0x144)&&_0x4e0251[_0x52833d(0x154)][_0x52833d(0x146)](_0x52833d(0x14b)))return!![];if(_0x4e0251[_0x52833d(0x154)][_0x52833d(0x146)]('ECONNRESET'))return!![];if(_0x4e0251[_0x52833d(0x154)][_0x52833d(0x146)](_0x52833d(0x145)))return![];}return![];}function a126_0x654c(_0xc8b5c,_0x292b1a){_0xc8b5c=_0xc8b5c-0x143;const _0x23a9a8=a126_0x23a9();let _0x654c7f=_0x23a9a8[_0xc8b5c];return _0x654c7f;}function sleep(_0x35c62c){return new Promise(_0x5c945b=>setTimeout(_0x5c945b,_0x35c62c));}export function validateUrl(_0x56eeb9){try{return new URL(_0x56eeb9),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9a2df4,_0x560548){const _0x4934f9=a127_0xc47d,_0x3bd283=_0x9a2df4();while(!![]){try{const _0x226019=parseInt(_0x4934f9(0x1a5))/0x1*(parseInt(_0x4934f9(0x1a3))/0x2)+parseInt(_0x4934f9(0x1a1))/0x3+-parseInt(_0x4934f9(0x19f))/0x4+-parseInt(_0x4934f9(0x1a4))/0x5+-parseInt(_0x4934f9(0x1aa))/0x6*(parseInt(_0x4934f9(0x1af))/0x7)+parseInt(_0x4934f9(0x1a2))/0x8*(-parseInt(_0x4934f9(0x1a8))/0x9)+-parseInt(_0x4934f9(0x1ad))/0xa*(-parseInt(_0x4934f9(0x1a6))/0xb);if(_0x226019===_0x560548)break;else _0x3bd283['push'](_0x3bd283['shift']());}catch(_0x51d7e9){_0x3bd283['push'](_0x3bd283['shift']());}}}(a127_0x5414,0x51319));function a127_0xc47d(_0x5e63c0,_0x231ceb){_0x5e63c0=_0x5e63c0-0x19f;const _0x5414df=a127_0x5414();let _0xc47d92=_0x5414df[_0x5e63c0];return _0xc47d92;}function env(_0x12ce88){return process.env[`RABETBASE_${_0x12ce88}`]||process.env[`LOVRABET_${_0x12ce88}`]||undefined;}function a127_0x5414(){const _0xca7b31=['94fXWxOY','2737025nfiLUw','3369STGLnX','8729875heBlcS','stdout','81nHmxdm','stdin','6RKnZcN','nonInteractive','true','20WqdeMZ','setRawMode','1001749NbcdzA','isRaw','2096756xFNYCs','isTTY','488028ejDXct','320888vXfSXQ'];a127_0x5414=function(){return _0xca7b31;};return a127_0x5414();}export function isNonInteractive(_0x51cedb){const _0x11e827=a127_0xc47d;return!!(_0x51cedb[_0x11e827(0x1ab)]||_0x51cedb['ci']||env('CI')===_0x11e827(0x1ac)||process.env.CI==='true'||!process[_0x11e827(0x1a7)][_0x11e827(0x1a0)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x126bd9=a127_0xc47d;if(!process[_0x126bd9(0x1a9)][_0x126bd9(0x1a0)])return![];try{const _0x30153c=process[_0x126bd9(0x1a9)][_0x126bd9(0x1b0)];return process[_0x126bd9(0x1a9)][_0x126bd9(0x1ae)](!![]),process[_0x126bd9(0x1a9)]['setRawMode'](_0x30153c??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a128_0x40c987=a128_0x48a6;(function(_0x12ffea,_0x26a007){const _0x3f514e=a128_0x48a6,_0x3b9867=_0x12ffea();while(!![]){try{const _0x42b730=parseInt(_0x3f514e(0x9a))/0x1+parseInt(_0x3f514e(0xb6))/0x2+parseInt(_0x3f514e(0xad))/0x3+-parseInt(_0x3f514e(0xb3))/0x4+parseInt(_0x3f514e(0xb1))/0x5*(parseInt(_0x3f514e(0x95))/0x6)+-parseInt(_0x3f514e(0xbb))/0x7*(-parseInt(_0x3f514e(0xa4))/0x8)+-parseInt(_0x3f514e(0xac))/0x9;if(_0x42b730===_0x26a007)break;else _0x3b9867['push'](_0x3b9867['shift']());}catch(_0xf1ff80){_0x3b9867['push'](_0x3b9867['shift']());}}}(a128_0x2b20,0x74003));import a128_0x542c10 from'winston';import a128_0x781118 from'node:fs';import a128_0x1c397e from'node:path';function a128_0x2b20(){const _0x41e7ef=['errors','1310456XCRnHP','combine','clearLogs','605124cuHRnf','printf','warn','setLogPath','message','7lrdDDV','existsSync','winstonLogger','filter','timestamp','info','blue','Failed\x20to\x20read\x20logs:','toISOString','red','success','currentRawCommand','204xbmGIA','initWinstonLogger','level','完成:\x20','transports','816091HFtdRK','format','dirname','addColors','logFilePath','error','utf8','logTask','trim','green','2990424cMvSxX','Failed\x20to\x20clear\x20logs:','yellow','stringify','clear','writeFileSync','command','createLogger','14012901EnZDqq','368058jacfZX','parse','rawCommand','now','109500CzePLX'];a128_0x2b20=function(){return _0x41e7ef;};return a128_0x2b20();}class Logger{[a128_0x40c987(0xbd)];['logFilePath'];['currentRawCommand']='';constructor(){this['logFilePath']='';}['setRawCommand'](_0x211587){this['currentRawCommand']=_0x211587;}['initWinstonLogger'](){const _0x4e9f98=a128_0x40c987,_0x1c3851=a128_0x1c397e[_0x4e9f98(0x9c)](this[_0x4e9f98(0x9e)]);!a128_0x781118['existsSync'](_0x1c3851)&&a128_0x781118['mkdirSync'](_0x1c3851,{'recursive':!![]});const _0x40c632=a128_0x542c10[_0x4e9f98(0x9b)][_0x4e9f98(0xb4)](a128_0x542c10['format'][_0x4e9f98(0x8d)](),a128_0x542c10[_0x4e9f98(0x9b)][_0x4e9f98(0xb2)]({'stack':!![]}),a128_0x542c10[_0x4e9f98(0x9b)][_0x4e9f98(0xb7)](_0x49098e=>{const _0x23972b=_0x4e9f98,_0x3031db={'timestamp':_0x49098e[_0x23972b(0x8d)]||new Date()[_0x23972b(0x91)](),'level':_0x49098e[_0x23972b(0x97)]||_0x23972b(0x8e),'command':_0x49098e[_0x23972b(0xaa)]||'unknown','rawCommand':_0x49098e[_0x23972b(0xaf)]||this[_0x23972b(0x94)]||undefined,'message':_0x49098e[_0x23972b(0xba)]||'','duration':_0x49098e['duration']||undefined,'details':_0x49098e['details']||undefined};return JSON[_0x23972b(0xa7)](_0x3031db);}));this[_0x4e9f98(0xbd)]=a128_0x542c10[_0x4e9f98(0xab)]({'level':_0x4e9f98(0x8e),'format':_0x40c632,'transports':[new a128_0x542c10[(_0x4e9f98(0x99))]['File']({'filename':this[_0x4e9f98(0x9e)],'level':_0x4e9f98(0x8e)})],'silent':![]}),a128_0x542c10[_0x4e9f98(0x9d)]({'success':_0x4e9f98(0xa3),'error':_0x4e9f98(0x92),'warn':_0x4e9f98(0xa6),'info':_0x4e9f98(0x8f)});}[a128_0x40c987(0xb9)](_0x2ae8f4){const _0x5107fd=a128_0x40c987;this[_0x5107fd(0x9e)]=a128_0x1c397e['join'](_0x2ae8f4,'.lovrabet.log'),this[_0x5107fd(0xbd)]&&this[_0x5107fd(0xbd)][_0x5107fd(0xa8)](),this[_0x5107fd(0x96)]();}[a128_0x40c987(0x8e)](_0x357b6e,_0x3b4590,_0x3ddb59){const _0x10ba73=a128_0x40c987;if(!this['logFilePath']||!this[_0x10ba73(0xbd)])return;this[_0x10ba73(0xbd)]['info'](_0x3b4590,{'command':_0x357b6e,'details':_0x3ddb59});}[a128_0x40c987(0x93)](_0x5c2250,_0xd3e503,_0x4e70fb,_0xb53820){const _0x4aa22b=a128_0x40c987;if(!this[_0x4aa22b(0x9e)]||!this[_0x4aa22b(0xbd)])return;this[_0x4aa22b(0xbd)]['log'](_0x4aa22b(0x8e),_0xd3e503,{'level':'success','command':_0x5c2250,'duration':_0x4e70fb,'details':_0xb53820});}['error'](_0x5817dc,_0x28aa91,_0x2960da){const _0x1590a4=a128_0x40c987;if(!this[_0x1590a4(0x9e)]||!this[_0x1590a4(0xbd)])return;this['winstonLogger']['error'](_0x28aa91,{'command':_0x5817dc,'details':_0x2960da});}[a128_0x40c987(0xb8)](_0x265509,_0x324017,_0x2a0d6d){const _0x433421=a128_0x40c987;if(!this[_0x433421(0x9e)]||!this['winstonLogger'])return;this[_0x433421(0xbd)][_0x433421(0xb8)](_0x324017,{'command':_0x265509,'details':_0x2a0d6d});}async[a128_0x40c987(0xa1)](_0x247c48,_0x2e4435,_0x36d0b4){const _0x20ddc8=a128_0x40c987,_0x15653b=Date[_0x20ddc8(0xb0)]();this[_0x20ddc8(0x8e)](_0x247c48,'开始执行:\x20'+_0x2e4435);try{const _0x3c9d54=await _0x36d0b4(),_0x2ea450=Date['now']()-_0x15653b;return this[_0x20ddc8(0x93)](_0x247c48,_0x20ddc8(0x98)+_0x2e4435,_0x2ea450),_0x3c9d54;}catch(_0x10755e){const _0x386b64=Date['now']()-_0x15653b;this[_0x20ddc8(0x9f)](_0x247c48,'失败:\x20'+_0x2e4435,{'error':_0x10755e instanceof Error?_0x10755e['message']:String(_0x10755e),'duration':_0x386b64});throw _0x10755e;}}['readLogs'](){const _0x1b82ac=a128_0x40c987;try{if(!a128_0x781118[_0x1b82ac(0xbc)](this['logFilePath']))return[];const _0x47b7e8=a128_0x781118['readFileSync'](this[_0x1b82ac(0x9e)],_0x1b82ac(0xa0));return _0x47b7e8['split']('\x0a')[_0x1b82ac(0xbe)](_0x4e1d1c=>_0x4e1d1c[_0x1b82ac(0xa2)]())['map'](_0x564d62=>JSON[_0x1b82ac(0xae)](_0x564d62));}catch(_0x2add6f){return console[_0x1b82ac(0xb8)](_0x1b82ac(0x90),_0x2add6f),[];}}[a128_0x40c987(0xb5)](){const _0x3aa6c0=a128_0x40c987;try{a128_0x781118[_0x3aa6c0(0xbc)](this[_0x3aa6c0(0x9e)])&&a128_0x781118[_0x3aa6c0(0xa9)](this[_0x3aa6c0(0x9e)],'',_0x3aa6c0(0xa0));}catch(_0x32e1b5){console[_0x3aa6c0(0xb8)](_0x3aa6c0(0xa5),_0x32e1b5);}}['getWinstonInstance'](){const _0x50a47e=a128_0x40c987;return this[_0x50a47e(0xbd)];}}function a128_0x48a6(_0x8a03,_0x55181f){_0x8a03=_0x8a03-0x8d;const _0x2b2018=a128_0x2b20();let _0x48a646=_0x2b2018[_0x8a03];return _0x48a646;}export const logger=new Logger();
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a129_0x120c85=a129_0x2ef2;function a129_0x2ef2(_0xf07c92,_0x35f673){_0xf07c92=_0xf07c92-0x1b3;const _0x398545=a129_0x3985();let _0x2ef2cb=_0x398545[_0xf07c92];return _0x2ef2cb;}(function(_0x211449,_0x3b9f2c){const _0x5a4cb1=a129_0x2ef2,_0x90abf6=_0x211449();while(!![]){try{const _0x212305=parseInt(_0x5a4cb1(0x1b3))/0x1*(-parseInt(_0x5a4cb1(0x1b4))/0x2)+-parseInt(_0x5a4cb1(0x1b7))/0x3*(-parseInt(_0x5a4cb1(0x1b8))/0x4)+-parseInt(_0x5a4cb1(0x1b5))/0x5+-parseInt(_0x5a4cb1(0x1ba))/0x6+-parseInt(_0x5a4cb1(0x1b6))/0x7*(-parseInt(_0x5a4cb1(0x1b9))/0x8)+-parseInt(_0x5a4cb1(0x1be))/0x9+parseInt(_0x5a4cb1(0x1bc))/0xa;if(_0x212305===_0x3b9f2c)break;else _0x90abf6['push'](_0x90abf6['shift']());}catch(_0x29b51b){_0x90abf6['push'](_0x90abf6['shift']());}}}(a129_0x3985,0x851fb));export const isWindows=process['platform']===a129_0x120c85(0x1bd);export function resolveNpmBin(_0x49dcb9){const _0x381add=a129_0x120c85;return isWindows?_0x49dcb9+_0x381add(0x1bb):_0x49dcb9;}function a129_0x3985(){const _0x32a8af=['4173UQGNWK','1844qmKQCx','58472BLQjws','2238384nKgiZA','.cmd','19384050asHhqt','win32','6130638XsmLCv','1MRKMsz','1954642ShVzHa','708425nfepUC','133FEefnN'];a129_0x3985=function(){return _0x32a8af;};return a129_0x3985();}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a130_0x1c37(_0x3d8eda,_0x25b848){_0x3d8eda=_0x3d8eda-0x1cc;const _0xe67abf=a130_0xe67a();let _0x1c370b=_0xe67abf[_0x3d8eda];return _0x1c370b;}const a130_0x13d191=a130_0x1c37;(function(_0x3c659f,_0x1cd929){const _0x24f526=a130_0x1c37,_0xdde557=_0x3c659f();while(!![]){try{const _0x552654=parseInt(_0x24f526(0x1e3))/0x1*(parseInt(_0x24f526(0x1d1))/0x2)+parseInt(_0x24f526(0x1d6))/0x3*(parseInt(_0x24f526(0x1d8))/0x4)+-parseInt(_0x24f526(0x1d9))/0x5*(parseInt(_0x24f526(0x1dc))/0x6)+-parseInt(_0x24f526(0x1de))/0x7+-parseInt(_0x24f526(0x1e5))/0x8+parseInt(_0x24f526(0x1cd))/0x9*(-parseInt(_0x24f526(0x1e4))/0xa)+parseInt(_0x24f526(0x1d2))/0xb*(parseInt(_0x24f526(0x1d7))/0xc);if(_0x552654===_0x1cd929)break;else _0xdde557['push'](_0xdde557['shift']());}catch(_0x37a6d3){_0xdde557['push'](_0xdde557['shift']());}}}(a130_0xe67a,0x37dbf));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 _0x4a9a22=a130_0x1c37,_0x194dc4=getTemplateBaseUrl();return _0x194dc4+_0x4a9a22(0x1df);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a130_0x13d191(0x1e0));export async function fetchRulesFromCDN(){const _0x21b6ac=a130_0x13d191,_0x2374e6=getRulesCdnUrl(),_0x57d2f2=await fetch(_0x2374e6,{'headers':{'Accept':_0x21b6ac(0x1cf)}});if(!_0x57d2f2['ok'])throw new Error(_0x21b6ac(0x1ce)+_0x57d2f2[_0x21b6ac(0x1d3)]+'\x20'+_0x57d2f2['statusText']);const _0x48e245=await _0x57d2f2[_0x21b6ac(0x1cc)]();if(!_0x48e245[_0x21b6ac(0x1d0)]||typeof _0x48e245[_0x21b6ac(0x1d0)]!==_0x21b6ac(0x1d5))throw new Error(_0x21b6ac(0x1d4));return _0x48e245;}export async function getRulesContent(){const _0x44cb74=a130_0x13d191;try{const _0x508e0e=await fetchRulesFromCDN();return _0x508e0e[_0x44cb74(0x1d0)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x1eec81=a130_0x13d191;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x1eec81(0x1e2));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}function a130_0xe67a(){const _0x46150b=['utf-8','16Lfdhmw','2819480HZqlIx','3318712GMKrIe','json','9XiDCqE','CDN\x20请求失败:\x20','application/json','content','54110pFXpRr','4909982HpQtAl','status','CDN\x20返回数据格式错误','string','69DSRylV','24qpIQIt','60444qFReMg','2235505BRDtDu','lastUpdated','agents.md','6FjcUMl','catch','2103290FvIESM','/rules/rules.json','../../templates/rules/lovrabet_rules.mdc.tpl','.cursor/rules'];a130_0xe67a=function(){return _0x46150b;};return a130_0xe67a();}export async function writeRulesFile(_0x464245){const _0xa3064b=a130_0x13d191,_0x4eab5a=await fetchRulesFromCDN()[_0xa3064b(0x1dd)](()=>null);let _0x1bb40a;_0x4eab5a?(_0x1bb40a=_0x4eab5a[_0xa3064b(0x1d0)],_0x4eab5a['lastUpdated']&&(_0x1bb40a=appendUpdateTime(_0x1bb40a,_0x4eab5a[_0xa3064b(0x1da)]))):_0x1bb40a=readLocalTemplate();const _0x607509=dirname(_0x464245);!existsSync(_0x607509)&&mkdirSync(_0x607509,{'recursive':!![]}),writeFileSync(_0x464245,_0x1bb40a,_0xa3064b(0x1e2));}export async function copyRulesToCursor(_0x229cb7){const _0x48f749=a130_0x13d191,_0x5a467d=join(_0x229cb7,_0x48f749(0x1e1)),_0x2ace9d=join(_0x5a467d,'lovrabet_rules.mdc');if(existsSync(_0x2ace9d))return![];return await writeRulesFile(_0x2ace9d),!![];}export async function copyRulesToAgentsMd(_0x4ac75e){const _0x570f89=a130_0x13d191,_0x37c744=join(_0x4ac75e,_0x570f89(0x1db));if(existsSync(_0x37c744))return![];return await writeRulesFile(_0x37c744),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x30b7b6){return new Promise(_0x257ca6=>setTimeout(_0x257ca6,_0x30b7b6));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a132_0x3d4cf4=a132_0x5c53;(function(_0x2a37b2,_0x495c26){const _0x34e0d4=a132_0x5c53,_0x413e3d=_0x2a37b2();while(!![]){try{const _0x1ae413=-parseInt(_0x34e0d4(0x94))/0x1*(-parseInt(_0x34e0d4(0x68))/0x2)+parseInt(_0x34e0d4(0xa6))/0x3+-parseInt(_0x34e0d4(0x8d))/0x4+parseInt(_0x34e0d4(0x67))/0x5+-parseInt(_0x34e0d4(0x91))/0x6*(-parseInt(_0x34e0d4(0xa1))/0x7)+parseInt(_0x34e0d4(0x90))/0x8*(-parseInt(_0x34e0d4(0x7e))/0x9)+parseInt(_0x34e0d4(0x81))/0xa*(-parseInt(_0x34e0d4(0x86))/0xb);if(_0x1ae413===_0x495c26)break;else _0x413e3d['push'](_0x413e3d['shift']());}catch(_0x31861b){_0x413e3d['push'](_0x413e3d['shift']());}}}(a132_0x1a65,0x56522));import a132_0x545e31 from'node:fs';import a132_0x7bbee5 from'node:path';function a132_0x5c53(_0x3e3b59,_0x26e266){_0x3e3b59=_0x3e3b59-0x66;const _0x1a650c=a132_0x1a65();let _0x5c53c2=_0x1a650c[_0x3e3b59];return _0x5c53c2;}import{logger}from'./logger.js';import{getCliVersion}from'./version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a132_0x3d4cf4(0x95)](_0x141144){const _0x2be606=a132_0x3d4cf4,_0x172242=_0x141144['split']('/')[_0x2be606(0x80)]()||_0x141144;return _0x172242[_0x2be606(0x89)]('-')[_0x2be606(0x84)](_0x573f0f=>_0x573f0f[_0x2be606(0x74)](0x0)[_0x2be606(0x7d)]()+_0x573f0f[_0x2be606(0x88)](0x1)[_0x2be606(0x83)]())[_0x2be606(0x8b)]('');}static['toDisplayTitle'](_0x41031f){const _0x3afd0e=a132_0x3d4cf4,_0x3edb07=_0x41031f['split']('/')['pop']()||_0x41031f;return _0x3edb07[_0x3afd0e(0x89)]('-')['map'](_0x3b74d3=>_0x3b74d3[_0x3afd0e(0x74)](0x0)['toUpperCase']()+_0x3b74d3[_0x3afd0e(0x88)](0x1)[_0x3afd0e(0x83)]())['join']('\x20');}static[a132_0x3d4cf4(0x6f)](_0x20812d,_0x1f3111,_0x548405){const _0x584b3e=a132_0x3d4cf4,_0x194038=this[_0x584b3e(0x95)](_0x1f3111),_0x4d124b=this['toDisplayTitle'](_0x1f3111),_0x267149=new Date(),_0x2e1149=_0x267149[_0x584b3e(0x79)](undefined,{'year':_0x584b3e(0xa7),'month':_0x584b3e(0x8c),'day':_0x584b3e(0x8c),'hour':'2-digit','minute':_0x584b3e(0x8c),'second':'2-digit','hour12':![]})[_0x584b3e(0x70)](/\//g,'-'),_0x2409fe=_0x267149[_0x584b3e(0x66)](undefined,{'year':_0x584b3e(0xa7),'month':'2-digit','day':'2-digit'})[_0x584b3e(0x70)](/\//g,'-'),_0x1ea8ed=_0x267149[_0x584b3e(0x75)](undefined,{'hour12':![]});let _0x2a84e7=_0x20812d[_0x584b3e(0x70)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x194038)[_0x584b3e(0x70)](/\{DisplayTitle\}/g,_0x4d124b)[_0x584b3e(0x70)](/\{PageName\}/g,_0x1f3111)[_0x584b3e(0x70)](/\{TemplateName\}/g,_0x548405)[_0x584b3e(0x70)](/\{CreatedAt\}/g,_0x2e1149)['replace'](/\{CreatedDate\}/g,_0x2409fe)[_0x584b3e(0x70)](/\{CreatedTime\}/g,_0x1ea8ed);return _0x2a84e7;}static[a132_0x3d4cf4(0x69)](_0x19f5b2,_0x50a57c,_0x91e5a6,_0x44238c,_0x57566e,_0xdb6960,_0x5d9762,_0x7b9a44){const _0x278bae=a132_0x3d4cf4,_0x1e2c88=new Date(),_0x7d99ce=_0x1e2c88[_0x278bae(0xa8)](),_0x12348e=_0x91e5a6[_0x278bae(0x84)](_0x78c509=>{const _0x110b1b=_0x278bae,_0x579793=[_0x110b1b(0x7c)+_0x78c509['datasetCode']+'\x22','tableName:\x20\x22'+_0x78c509[_0x110b1b(0x82)]+'\x22',_0x110b1b(0x6d)+_0x78c509[_0x110b1b(0x92)]+'\x22'];return _0x78c509['alias']&&_0x579793[_0x110b1b(0x7f)]('alias:\x20\x22'+_0x78c509[_0x110b1b(0x9c)]+'\x22'),_0x110b1b(0x99)+_0x579793[_0x110b1b(0x8b)](',\x20')+_0x110b1b(0x6e);})[_0x278bae(0x8b)](''),_0x405a32=_0x44238c||_0x91e5a6[0x0]?.['alias']||_0x278bae(0x8a);let _0x484d23=_0x19f5b2[_0x278bae(0x70)](/\{AppCode\}/g,_0x50a57c)['replace'](/\{ModelConfigs\}/g,_0x12348e)[_0x278bae(0x70)](/\{ExampleModelName\}/g,_0x405a32)[_0x278bae(0x70)](/\{ApiFileName\}/g,_0x57566e||_0x278bae(0x98))[_0x278bae(0x70)](/\{ConfigName\}/g,_0xdb6960||_0x278bae(0x72))['replace'](/\{ClientConfigParam\}/g,_0x5d9762||'')[_0x278bae(0x70)](/\{VarPrefix\}/g,_0x7b9a44||_0x278bae(0x9a))[_0x278bae(0x70)](/\{CreatedAt\}/g,_0x7d99ce);return _0x484d23;}static async['processTemplate'](_0x1b9ac7,_0xf8b44c,_0x2c03ce,_0x2a2378,_0x17c745=!![]){const _0x57bb93=a132_0x3d4cf4,_0x9ee78=Date['now']();try{_0x17c745&&logger[_0x57bb93(0x7b)](_0x57bb93(0xa0),_0x57bb93(0x8f),{'templatePath':_0x1b9ac7,'targetPath':_0xf8b44c,'pageName':_0x2c03ce,'templateName':_0x2a2378});await a132_0x545e31[_0x57bb93(0x77)][_0x57bb93(0x76)](_0xf8b44c,{'recursive':!![]}),await this[_0x57bb93(0x85)](_0x1b9ac7,_0xf8b44c,_0x2c03ce,_0x2a2378);if(_0x17c745){const _0xd664f4=Date[_0x57bb93(0x78)]()-_0x9ee78;logger['success'](_0x57bb93(0xa0),_0x57bb93(0x97),_0xd664f4,{'pageName':_0x2c03ce,'templateName':_0x2a2378});}}catch(_0x7df323){if(_0x17c745){const _0x427635=Date[_0x57bb93(0x78)]()-_0x9ee78;logger[_0x57bb93(0x71)](_0x57bb93(0xa0),_0x57bb93(0xa5),{'templatePath':_0x1b9ac7,'targetPath':_0xf8b44c,'pageName':_0x2c03ce,'templateName':_0x2a2378,'error':_0x7df323 instanceof Error?_0x7df323[_0x57bb93(0x93)]:String(_0x7df323),'duration':_0x427635});}throw _0x7df323;}}static async[a132_0x3d4cf4(0x85)](_0x24d753,_0x195181,_0x40ccaa,_0x37b0dd){const _0x1deec3=a132_0x3d4cf4,_0x3a5338=await a132_0x545e31[_0x1deec3(0x77)]['readdir'](_0x24d753,{'withFileTypes':!![]});for(const _0x435e2b of _0x3a5338){const _0x45bfb3=a132_0x7bbee5['join'](_0x24d753,_0x435e2b['name']);let _0x30c367=a132_0x7bbee5['join'](_0x195181,_0x435e2b['name']);_0x435e2b[_0x1deec3(0x92)][_0x1deec3(0x96)](_0x1deec3(0x6c))&&(_0x30c367=a132_0x7bbee5[_0x1deec3(0x8b)](_0x195181,_0x435e2b['name'][_0x1deec3(0x70)](/\.tpl$/,'')));if(_0x435e2b[_0x1deec3(0x6a)]())await a132_0x545e31[_0x1deec3(0x77)][_0x1deec3(0x76)](_0x30c367,{'recursive':!![]}),await this[_0x1deec3(0x85)](_0x45bfb3,_0x30c367,_0x40ccaa,_0x37b0dd);else _0x435e2b[_0x1deec3(0xa3)]()&&await this[_0x1deec3(0x8e)](_0x45bfb3,_0x30c367,_0x40ccaa,_0x37b0dd);}}static async['processFile'](_0x215c56,_0x270c69,_0x154b66,_0x4e8bb1){const _0x5b1125=a132_0x3d4cf4,_0x3f7938=a132_0x7bbee5[_0x5b1125(0x9e)](_0x215c56)['toLowerCase']();_0x215c56[_0x5b1125(0x96)](_0x5b1125(0x6c))&&(_0x270c69=_0x270c69[_0x5b1125(0x70)](/\.tpl$/,''));const _0x3d56b3=[_0x5b1125(0xa2),_0x5b1125(0xa4),'.jsx',_0x5b1125(0x9f),'.json',_0x5b1125(0x9d),_0x5b1125(0x6b),_0x5b1125(0x7a),_0x5b1125(0x6c)];if(_0x3d56b3['includes'](_0x3f7938)||_0x215c56[_0x5b1125(0x96)](_0x5b1125(0x6c))){const _0x323d92=await a132_0x545e31['promises'][_0x5b1125(0x73)](_0x215c56,'utf8'),_0x57b830=this[_0x5b1125(0x6f)](_0x323d92,_0x154b66,_0x4e8bb1);await a132_0x545e31[_0x5b1125(0x77)][_0x5b1125(0x87)](_0x270c69,_0x57b830,'utf8');}else await a132_0x545e31['promises'][_0x5b1125(0x9b)](_0x215c56,_0x270c69);}}function a132_0x1a65(){const _0x591dbe=['replaceApiContent','isDirectory','.css','.tpl','name:\x20\x22','\x20},','replaceContent','replace','error','default','readFile','charAt','toLocaleTimeString','mkdir','promises','now','toLocaleString','.scss','info','datasetCode:\x20\x22','toUpperCase','422037YBkTUR','push','pop','446570SOPiWz','tableName','toLowerCase','map','processDirectory','187iJJOEQ','writeFile','slice','split','YourModel','join','2-digit','326660XvXBXE','processFile','开始处理模板内容替换','16jdDAjl','182424GsBcBd','name','message','20pYrSXO','toComponentName','endsWith','模板内容替换完成','api','\x0a\x20\x20\x20\x20{\x20','LOVRABET','copyFile','alias','.md','extname','.js','template','161YKpHBu','.tsx','isFile','.ts','模板内容替换失败','26433HUOwil','numeric','toISOString','toLocaleDateString','1048435SyGudq','37040xbpFJN'];a132_0x1a65=function(){return _0x591dbe;};return a132_0x1a65();}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x59044c,_0xe6aeb0){var _0x5b985f=a133_0x2a1d,_0x3abb5b=_0x59044c();while(!![]){try{var _0x4a2242=parseInt(_0x5b985f(0xa9))/0x1*(parseInt(_0x5b985f(0xa2))/0x2)+parseInt(_0x5b985f(0xa8))/0x3+parseInt(_0x5b985f(0xa6))/0x4+parseInt(_0x5b985f(0xaa))/0x5*(-parseInt(_0x5b985f(0xa1))/0x6)+parseInt(_0x5b985f(0xa5))/0x7+parseInt(_0x5b985f(0xa7))/0x8*(-parseInt(_0x5b985f(0xa3))/0x9)+-parseInt(_0x5b985f(0xab))/0xa*(-parseInt(_0x5b985f(0xa4))/0xb);if(_0x4a2242===_0xe6aeb0)break;else _0x3abb5b['push'](_0x3abb5b['shift']());}catch(_0x12279c){_0x3abb5b['push'](_0x3abb5b['shift']());}}}(a133_0x16c9,0x30dd0));function a133_0x16c9(){var _0x4237b8=['192358HJwEDS','3289329VGIubH','10219oCwdCC','2533006OqxiNH','1574368blUFFK','8XCVHTy','238725GfxyoC','1JOvmYp','30710KuenYg','230uUzINU','378HYLwQI'];a133_0x16c9=function(){return _0x4237b8;};return a133_0x16c9();}function a133_0x2a1d(_0x51fd9b,_0xfe01bb){_0x51fd9b=_0x51fd9b-0xa1;var _0x16c9b2=a133_0x16c9();var _0x2a1d7e=_0x16c9b2[_0x51fd9b];return _0x2a1d7e;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a134_0x5627(){var _0x28dca9=['110139XRNxcM','1669997RKKzGM','10ODVZKu','457301ApitGb','12pxNfDj','3568OvfCGV','23409mTFtSc','2134562eHKzCp','23189630tSHddy','807642FAaTvn'];a134_0x5627=function(){return _0x28dca9;};return a134_0x5627();}(function(_0x4684f2,_0x1a688b){var _0x2a9b9a=a134_0x1aae,_0x42f370=_0x4684f2();while(!![]){try{var _0x3dfb4e=parseInt(_0x2a9b9a(0x14b))/0x1+-parseInt(_0x2a9b9a(0x14f))/0x2+parseInt(_0x2a9b9a(0x148))/0x3*(parseInt(_0x2a9b9a(0x14c))/0x4)+parseInt(_0x2a9b9a(0x14a))/0x5*(-parseInt(_0x2a9b9a(0x147))/0x6)+parseInt(_0x2a9b9a(0x149))/0x7+parseInt(_0x2a9b9a(0x14d))/0x8*(-parseInt(_0x2a9b9a(0x14e))/0x9)+parseInt(_0x2a9b9a(0x150))/0xa;if(_0x3dfb4e===_0x1a688b)break;else _0x42f370['push'](_0x42f370['shift']());}catch(_0x4764d9){_0x42f370['push'](_0x42f370['shift']());}}}(a134_0x5627,0x996d1));import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';function a134_0x1aae(_0xfe496b,_0x5760a2){_0xfe496b=_0xfe496b-0x147;var _0x5627a2=a134_0x5627();var _0x1aae64=_0x5627a2[_0xfe496b];return _0x1aae64;}export async function withActiveCookie(_0x4b4079,_0xf8d1f9){setActiveCookie(_0x4b4079);try{return await _0xf8d1f9();}finally{clearActiveCookie();}}
|
package/package.json
CHANGED
package/lib/commands/build.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a33_0x21dc(){const _0x1e33f9=['8hgEHzx','logger','411807MoHXsE','Build\x20project','5468916iUWFJw','3849705zazZMg','build','173367vIRLxB','245684NXOgDh','8101324HQRnwS','run','npm\x20run\x20build','.bin','1030HIklld','3loPECj','error','inherit','node_modules','stderr','项目构建成功','close','开始构建项目','15IUjZsi','项目构建失败','cwd','now','2440566ifcwHa','trim','success','info','npm\x20run\x20build\x20exited\x20with\x20code\x20','npm','项目构建出错','pipe'];a33_0x21dc=function(){return _0x1e33f9;};return a33_0x21dc();}const a33_0x47e2aa=a33_0x3190;(function(_0x533c75,_0x37a83e){const _0x100c07=a33_0x3190,_0x19f12c=_0x533c75();while(!![]){try{const _0x2d5a48=-parseInt(_0x100c07(0x1ad))/0x1*(parseInt(_0x100c07(0x1a7))/0x2)+-parseInt(_0x100c07(0x1a4))/0x3+-parseInt(_0x100c07(0x1a3))/0x4+parseInt(_0x100c07(0x1b5))/0x5*(parseInt(_0x100c07(0x1b9))/0x6)+-parseInt(_0x100c07(0x1a8))/0x7*(parseInt(_0x100c07(0x19f))/0x8)+-parseInt(_0x100c07(0x1a6))/0x9+parseInt(_0x100c07(0x1ac))/0xa*(parseInt(_0x100c07(0x1a1))/0xb);if(_0x2d5a48===_0x37a83e)break;else _0x19f12c['push'](_0x19f12c['shift']());}catch(_0x33b77f){_0x19f12c['push'](_0x19f12c['shift']());}}}(a33_0x21dc,0xd7045));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function runBuild(_0x23cdf2){return new Promise((_0x30a125,_0x3aba9d)=>{const _0x1dbc5c=a33_0x3190,_0x454ba7=Date[_0x1dbc5c(0x1b8)]();_0x23cdf2['logger'][_0x1dbc5c(0x1bc)](_0x1dbc5c(0x1a5),_0x1dbc5c(0x1b4),{'command':_0x1dbc5c(0x1aa)});let _0xb5311='';const _0x2a58e9=spawn(_0x1dbc5c(0x19c),[_0x1dbc5c(0x1a9),_0x1dbc5c(0x1a5)],{'stdio':[_0x1dbc5c(0x1af),_0x1dbc5c(0x1af),_0x1dbc5c(0x19e)],'shell':!![],'env':{...process.env,'PATH':''+join(process[_0x1dbc5c(0x1b7)](),_0x1dbc5c(0x1b0),_0x1dbc5c(0x1ab))+delimiter+process.env.PATH}});_0x2a58e9['stderr']?.['on']('data',_0x3c0cda=>{_0xb5311+=_0x3c0cda['toString']();}),_0x2a58e9['on'](_0x1dbc5c(0x1b3),_0x163651=>{const _0x290616=_0x1dbc5c,_0x1e109e=Date['now']()-_0x454ba7;if(_0x163651===0x0||_0x163651===null)_0x23cdf2[_0x290616(0x1a0)][_0x290616(0x1bb)]('build',_0x290616(0x1b2),_0x1e109e),_0x30a125();else{const _0x40d4be={'exitCode':_0x163651,'duration':_0x1e109e,'command':_0x290616(0x1aa),'cwd':process[_0x290616(0x1b7)]()};_0xb5311[_0x290616(0x1ba)]()&&(_0x40d4be[_0x290616(0x1b1)]=_0xb5311[_0x290616(0x1ba)]()),_0x23cdf2[_0x290616(0x1a0)]['error'](_0x290616(0x1a5),_0x290616(0x1b6),_0x40d4be),_0x3aba9d(new Error(_0x290616(0x1bd)+_0x163651));}}),_0x2a58e9['on'](_0x1dbc5c(0x1ae),_0x4e7a6f=>{const _0xcf9538=_0x1dbc5c,_0x3d9904=Date[_0xcf9538(0x1b8)]()-_0x454ba7;_0x23cdf2[_0xcf9538(0x1a0)][_0xcf9538(0x1ae)]('build',_0xcf9538(0x19d),{'error':_0x4e7a6f['message'],'duration':_0x3d9904,'stderr':_0xb5311[_0xcf9538(0x1ba)]()||undefined}),_0x3aba9d(_0x4e7a6f);});});}function a33_0x3190(_0x17ba53,_0x2c38fb){_0x17ba53=_0x17ba53-0x19c;const _0x21dc58=a33_0x21dc();let _0x3190f5=_0x21dc58[_0x17ba53];return _0x3190f5;}export const buildCommand={'name':a33_0x47e2aa(0x1a5),'description':a33_0x47e2aa(0x1a2),async 'run'(_0x386789,_0x389e8d,_0x4a1d83){await runBuild(_0x386789);}};
|
package/lib/commands/preview.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a67_0x24da83=a67_0x7cdc;(function(_0x8c262e,_0x109127){const _0x4978d7=a67_0x7cdc,_0x50e5dd=_0x8c262e();while(!![]){try{const _0x5d90fe=parseInt(_0x4978d7(0x158))/0x1+parseInt(_0x4978d7(0x15a))/0x2+-parseInt(_0x4978d7(0x167))/0x3+parseInt(_0x4978d7(0x154))/0x4*(-parseInt(_0x4978d7(0x15e))/0x5)+parseInt(_0x4978d7(0x155))/0x6+-parseInt(_0x4978d7(0x166))/0x7+parseInt(_0x4978d7(0x159))/0x8;if(_0x5d90fe===_0x109127)break;else _0x50e5dd['push'](_0x50e5dd['shift']());}catch(_0x401cb8){_0x50e5dd['push'](_0x50e5dd['shift']());}}}(a67_0x4ba8,0x5174a));import{delimiter,join}from'node:path';import{spawn}from'node:child_process';function runPreview(_0x2ed224){return new Promise((_0x12ac0f,_0x2acf6c)=>{const _0x1302c2=a67_0x7cdc,_0x5f1a7b=Date[_0x1302c2(0x16e)]();_0x2ed224['logger'][_0x1302c2(0x163)](_0x1302c2(0x164),_0x1302c2(0x169),{'command':_0x1302c2(0x15d)});let _0x1f1baa='';const _0x771da9=spawn(_0x1302c2(0x171),[_0x1302c2(0x164)],{'stdio':['inherit','inherit',_0x1302c2(0x165)],'shell':!![],'env':{...process.env,'PATH':''+join(process[_0x1302c2(0x16f)](),'node_modules',_0x1302c2(0x157))+delimiter+process.env.PATH}});_0x771da9['stderr']?.['on'](_0x1302c2(0x15b),_0x41f058=>{const _0x5a2977=_0x1302c2;_0x1f1baa+=_0x41f058[_0x5a2977(0x160)]();}),_0x771da9['on']('close',_0x9cec81=>{const _0x58cb44=_0x1302c2,_0x5d505c=Date[_0x58cb44(0x16e)]()-_0x5f1a7b;if(_0x9cec81===0x0||_0x9cec81===null)_0x2ed224[_0x58cb44(0x15c)][_0x58cb44(0x172)](_0x58cb44(0x164),'预览服务器启动成功',_0x5d505c),_0x12ac0f();else{const _0xa3c847={'exitCode':_0x9cec81,'duration':_0x5d505c,'command':'vite\x20preview','cwd':process[_0x58cb44(0x16f)]()};_0x1f1baa[_0x58cb44(0x153)]()&&(_0xa3c847[_0x58cb44(0x173)]=_0x1f1baa[_0x58cb44(0x153)]()),_0x2ed224[_0x58cb44(0x15c)][_0x58cb44(0x16a)]('preview',_0x58cb44(0x161),_0xa3c847),_0x2acf6c(new Error(_0x58cb44(0x16c)+_0x9cec81));}}),_0x771da9['on']('error',_0x14aadd=>{const _0x31180a=_0x1302c2,_0x5e9a26=Date[_0x31180a(0x16e)]()-_0x5f1a7b;_0x2ed224[_0x31180a(0x15c)][_0x31180a(0x16a)](_0x31180a(0x164),'预览服务器启动出错',{'error':_0x14aadd[_0x31180a(0x168)],'duration':_0x5e9a26,'stderr':_0x1f1baa[_0x31180a(0x153)]()||undefined}),_0x2acf6c(_0x14aadd);});});}function runBuildWatch(){return new Promise((_0x4cf98f,_0x5bf109)=>{const _0x40c054=a67_0x7cdc,_0x5edb7c=spawn('vite',[_0x40c054(0x170),_0x40c054(0x16b)],{'stdio':_0x40c054(0x162),'shell':!![],'env':{...process.env,'PATH':''+join(process[_0x40c054(0x16f)](),'node_modules',_0x40c054(0x157))+delimiter+process.env.PATH}});_0x5edb7c['on']('close',_0x5a3545=>{if(_0x5a3545===0x0||_0x5a3545===null)_0x4cf98f();else _0x5bf109(new Error('vite\x20build\x20--watch\x20exited\x20with\x20code\x20'+_0x5a3545));}),_0x5edb7c['on'](_0x40c054(0x16a),_0x5bf109);});}function a67_0x7cdc(_0xcc49c2,_0x2d8f8d){_0xcc49c2=_0xcc49c2-0x153;const _0x4ba815=a67_0x4ba8();let _0x7cdca9=_0x4ba815[_0xcc49c2];return _0x7cdca9;}function a67_0x4ba8(){const _0x3c122f=['2260344JOdwrK','all','.bin','456897vhuVFM','4240520whpWGH','518046boQVJU','data','logger','vite\x20preview','584560BPkAmd','Preview\x20project','toString','预览服务器启动失败','inherit','info','preview','pipe','3233741qPCUcR','1429104UyocfZ','message','启动预览服务器','error','--watch','vite\x20preview\x20exited\x20with\x20code\x20','watch','now','cwd','build','vite','success','stderr','执行预览命令','trim','12axuDtI'];a67_0x4ba8=function(){return _0x3c122f;};return a67_0x4ba8();}export const previewCommand={'name':'preview','description':a67_0x24da83(0x15f),async 'run'(_0x5eeab3,_0x1464b0,_0x9eb45e){const _0x4dbd4e=a67_0x24da83,_0x365b9d=_0x9eb45e[_0x4dbd4e(0x16d)];_0x5eeab3[_0x4dbd4e(0x15c)]['info'](_0x4dbd4e(0x164),_0x4dbd4e(0x174)+(_0x365b9d?'\x20(监听模式)':'')),_0x365b9d?await Promise[_0x4dbd4e(0x156)]([runBuildWatch(),runPreview(_0x5eeab3)]):await runPreview(_0x5eeab3);}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a69_0x1846(_0x56fc78,_0x54698a){_0x56fc78=_0x56fc78-0x1b5;const _0xfd368d=a69_0xfd36();let _0x184608=_0xfd368d[_0x56fc78];return _0x184608;}const a69_0x158a5e=a69_0x1846;(function(_0x502b4e,_0x2cf46b){const _0x52e669=a69_0x1846,_0x10e51c=_0x502b4e();while(!![]){try{const _0x191a11=-parseInt(_0x52e669(0x200))/0x1+parseInt(_0x52e669(0x1e6))/0x2*(-parseInt(_0x52e669(0x1e4))/0x3)+-parseInt(_0x52e669(0x1fc))/0x4*(parseInt(_0x52e669(0x1e2))/0x5)+parseInt(_0x52e669(0x1e3))/0x6+-parseInt(_0x52e669(0x1f0))/0x7*(-parseInt(_0x52e669(0x21f))/0x8)+parseInt(_0x52e669(0x1f2))/0x9+-parseInt(_0x52e669(0x1fe))/0xa*(-parseInt(_0x52e669(0x1bf))/0xb);if(_0x191a11===_0x2cf46b)break;else _0x10e51c['push'](_0x10e51c['shift']());}catch(_0x4e8758){_0x10e51c['push'](_0x10e51c['shift']());}}}(a69_0xfd36,0x4e25d));import a69_0x3c7f6e from'chalk';import a69_0xb25bcb from'ora';import{existsSync,readFileSync,renameSync,rmSync,statSync,unlinkSync,writeFileSync}from'node:fs';import{resolve}from'node:path';import{CONFIG_NAMES,NEW_CONFIG_NAME,readConfigFile,writeConfigFile}from'../context.js';import{CORE_IDE_CONFIGS}from'../utils/ai_config.js';import{runNpxSkillsAddGlobal,runNpxSkillsRemove}from'../skills/npx-skills-add.js';function a69_0xfd36(){const _0x28a949=['gray','2648xpUxPI','Remove\x20.lovrabet/','4107840PCpypA','Legacy\x20artifacts:','604395qEREBN','configMigration','detail','red','Some\x20steps\x20failed.\x20Check\x20the\x20summary\x20above\x20for\x20details.','info','.cursor/rules/lovrabet_rules.mdc','some','message','utf8','Clean\x20MCP\x20config','Proceed\x20with\x20upgrade?','\x20→\x20','parse','keys','done','succeed','not\x20found\x20(will\x20create)','\x20\x20Step\x20','isArray','inherit','green','.claude/skills/lovrabet','failed','Step\x203/6:\x20Legacy\x20artifacts\x20—\x20','fields','FAIL','\x20→\x20keys:\x20','Step\x201/6:\x20Config\x20migration\x20—\x20','error','isDirectory','4493336IHhooZ','Step\x202/6:\x20Removing\x20.lovrabet/\x20directory...','.cursor/mcp.json','cwd','MCP\x20config:','bold','filter','Config\x20migration','\x20\x20\x20\x20\x20\x20\x20','oldArtifacts','args','lovrabet/rabetbase\x20installed\x20globally','\x20\x20Action:\x20remove\x20entries\x20containing\x20@lovrabet/dataset-mcp-server','push','start','22THxJDJ','object','===\x20Upgrade\x20Analysis\x20===','status','lovrabet/rabetbase','log','yes','fail','Config\x20file:','values','oldPath','already\x20exists\x20(will\x20merge)','Step\x206/6:\x20Install\x20new\x20skill\x20—\x20','not\x20needed','Step\x202/6:\x20.lovrabet/\x20not\x20found,\x20skipped','length','needed','exit\x20','skipped','Step\x205/6:\x20Removing\x20old\x20skill...','Step\x202/6:\x20.lovrabet/\x20directory\x20removed','hasNewConfig','Upgrade\x20cancelled.','\x20\x20Action:\x20remove\x20old\x20lovrabet/lovrabet-skill,\x20add\x20lovrabet/rabetbase\x20--global','Upgrade\x20completed\x20successfully!','@lovrabet/dataset-mcp-server','includes','lovrabet/lovrabet-skill\x20removed','\x20(backup:\x20','Remove\x20old\x20skill','skipped\x20(no\x20legacy\x20config)','Install\x20new\x20skill','entries','string','.lovrabet','3310vhZLpw','307722dpiUkS','3ZWtUCZ','no\x20legacy\x20config\x20found','210774ZQgMam','Step\x204/6:\x20Cleaning\x20MCP\x20config...','join','FOUND','\x20\x20Action:\x20delete','Step\x202/6:\x20.lovrabet/\x20removal\x20failed\x20—\x20','\x20removed\x20(','needsSkillSwap','Step\x206/6:\x20Installing\x20new\x20skill...','cyan','7uVbQpj','stringify','302373huxexw','mcpServers','undefined','label','none\x20found','path','CANCEL','yellow','oldMcpConfig'];a69_0xfd36=function(){return _0x28a949;};return a69_0xfd36();}import{askConfirm}from'./menu/shared/inquirer.js';const LEGACY_CONFIG_NAMES=CONFIG_NAMES[a69_0x158a5e(0x1b6)](_0x300c3a=>_0x300c3a!==NEW_CONFIG_NAME);function collectIdeSkillFiles(_0x46f6e3){const _0x2865de=a69_0x158a5e,_0x454487=[];for(const _0x2918d9 of Object[_0x2865de(0x1c8)](CORE_IDE_CONFIGS)){if(_0x2918d9['files'])for(const _0x2d79e1 of _0x2918d9['files']){_0x454487['push'](resolve(_0x46f6e3,_0x2d79e1['path']));}}return _0x454487;}function analyse(_0x53ccf1){const _0x20fa92=a69_0x158a5e;let _0x4d03db=null;const _0x17f52a=resolve(_0x53ccf1,NEW_CONFIG_NAME),_0x5a2e99=existsSync(_0x17f52a);for(const _0x4f9765 of LEGACY_CONFIG_NAMES){const _0x1418fa=resolve(_0x53ccf1,_0x4f9765);if(existsSync(_0x1418fa)){const _0x35b673=readConfigFile(_0x1418fa),_0x1570fa=Object[_0x20fa92(0x20e)](_0x35b673)['filter'](_0x2a1353=>typeof _0x35b673[_0x2a1353]!==_0x20fa92(0x1f4));_0x4d03db={'oldPath':_0x1418fa,'hasNewConfig':_0x5a2e99,'fields':_0x1570fa};break;}}const _0x5c7817=[],_0x2cae08=resolve(_0x53ccf1,_0x20fa92(0x1e1));if(existsSync(_0x2cae08))_0x5c7817[_0x20fa92(0x1bd)](_0x2cae08);const _0x193942=resolve(_0x53ccf1,_0x20fa92(0x206));if(existsSync(_0x193942))_0x5c7817[_0x20fa92(0x1bd)](_0x193942);const _0x311cbf=resolve(_0x53ccf1,_0x20fa92(0x216));if(existsSync(_0x311cbf))_0x5c7817['push'](_0x311cbf);for(const _0x8838d4 of collectIdeSkillFiles(_0x53ccf1)){if(existsSync(_0x8838d4))_0x5c7817[_0x20fa92(0x1bd)](_0x8838d4);}let _0x3a931a=null;const _0x2faf5a=resolve(_0x53ccf1,_0x20fa92(0x221));if(existsSync(_0x2faf5a))try{const _0x363f16=JSON[_0x20fa92(0x20d)](readFileSync(_0x2faf5a,_0x20fa92(0x209)));if(_0x363f16?.[_0x20fa92(0x1f3)]&&typeof _0x363f16[_0x20fa92(0x1f3)]===_0x20fa92(0x1c0)){const _0x5ce430=[];for(const [_0x32168c,_0x351881]of Object[_0x20fa92(0x1df)](_0x363f16[_0x20fa92(0x1f3)])){const _0x54e2a5=_0x351881;_0x54e2a5?.[_0x20fa92(0x1ba)]&&Array[_0x20fa92(0x213)](_0x54e2a5[_0x20fa92(0x1ba)])&&_0x54e2a5[_0x20fa92(0x1ba)]['some'](_0x4610ae=>typeof _0x4610ae==='string'&&_0x4610ae[_0x20fa92(0x1d9)]('@lovrabet/dataset-mcp-server'))&&_0x5ce430[_0x20fa92(0x1bd)](_0x32168c);}_0x5ce430[_0x20fa92(0x1ce)]>0x0&&(_0x3a931a={'path':_0x2faf5a,'keys':_0x5ce430});}}catch{}const _0x497430=_0x5c7817[_0x20fa92(0x1ce)]>0x0||_0x4d03db!==null;return{'configMigration':_0x4d03db,'oldArtifacts':_0x5c7817,'oldMcpConfig':_0x3a931a,'needsSkillSwap':_0x497430};}function printReport(_0x1c3f5b){const _0x21564a=a69_0x158a5e,{configMigration:_0x4b49ce,oldArtifacts:_0x53a36b,oldMcpConfig:_0x12ecf7,needsSkillSwap:_0x2a222d}=_0x1c3f5b;console[_0x21564a(0x1c4)](''),console[_0x21564a(0x1c4)](a69_0x3c7f6e['bold'](_0x21564a(0x1c1))),console['log']('');_0x4b49ce?(console[_0x21564a(0x1c4)](a69_0x3c7f6e[_0x21564a(0x1ef)](_0x21564a(0x1c7))+('\x20\x20'+a69_0x3c7f6e[_0x21564a(0x1f9)](_0x4b49ce[_0x21564a(0x1c9)]))),console[_0x21564a(0x1c4)]('\x20\x20New\x20config\x20(.rabetbase.json):\x20'+(_0x4b49ce[_0x21564a(0x1d4)]?a69_0x3c7f6e['green'](_0x21564a(0x1ca)):a69_0x3c7f6e[_0x21564a(0x1fb)](_0x21564a(0x211)))),console['log']('\x20\x20Fields\x20to\x20migrate:\x20'+_0x4b49ce[_0x21564a(0x219)][_0x21564a(0x1e8)](',\x20')),console['log']('\x20\x20Action:\x20migrate\x20→\x20backup\x20old\x20as\x20.bak')):console[_0x21564a(0x1c4)](a69_0x3c7f6e[_0x21564a(0x1ef)]('Config\x20file:')+'\x20\x20'+a69_0x3c7f6e[_0x21564a(0x1fb)](_0x21564a(0x1e5)));console[_0x21564a(0x1c4)]('');if(_0x53a36b['length']>0x0){console[_0x21564a(0x1c4)](a69_0x3c7f6e['cyan'](_0x21564a(0x1ff)));for(const _0x1ebbb7 of _0x53a36b){console[_0x21564a(0x1c4)]('\x20\x20'+a69_0x3c7f6e[_0x21564a(0x203)](_0x21564a(0x1e9))+'\x20\x20'+_0x1ebbb7);}console['log'](_0x21564a(0x1ea));}else console['log'](a69_0x3c7f6e['cyan']('Legacy\x20artifacts:')+'\x20\x20'+a69_0x3c7f6e[_0x21564a(0x1fb)](_0x21564a(0x1f6)));console[_0x21564a(0x1c4)](''),_0x12ecf7?(console[_0x21564a(0x1c4)](a69_0x3c7f6e[_0x21564a(0x1ef)]('MCP\x20config:')+('\x20\x20'+a69_0x3c7f6e[_0x21564a(0x1f9)](_0x12ecf7[_0x21564a(0x1f7)])+_0x21564a(0x21b)+_0x12ecf7[_0x21564a(0x20e)][_0x21564a(0x1e8)](',\x20'))),console[_0x21564a(0x1c4)](_0x21564a(0x1bc))):console[_0x21564a(0x1c4)](a69_0x3c7f6e[_0x21564a(0x1ef)](_0x21564a(0x223))+'\x20\x20'+a69_0x3c7f6e['gray']('no\x20legacy\x20entry')),console[_0x21564a(0x1c4)](''),console[_0x21564a(0x1c4)](a69_0x3c7f6e[_0x21564a(0x1ef)]('Skill\x20swap:')+('\x20\x20'+(_0x2a222d?a69_0x3c7f6e[_0x21564a(0x1f9)](_0x21564a(0x1cf)):a69_0x3c7f6e[_0x21564a(0x215)](_0x21564a(0x1cc))))),_0x2a222d&&console[_0x21564a(0x1c4)](_0x21564a(0x1d6)),console[_0x21564a(0x1c4)]('');}function execConfigMigration(_0x88d9b5,_0x330cb7){const _0x5d4cb9=a69_0x158a5e,{configMigration:_0x3c78ba}=_0x88d9b5;if(!_0x3c78ba?.[_0x5d4cb9(0x1c9)])return{'step':0x1,'label':_0x5d4cb9(0x1b7),'ok':!![],'detail':_0x5d4cb9(0x1dd)};const _0x50ff5c=readConfigFile(_0x3c78ba[_0x5d4cb9(0x1c9)]),_0x28277d=resolve(_0x330cb7,NEW_CONFIG_NAME),_0x490afb=_0x3c78ba['hasNewConfig']?readConfigFile(_0x28277d):{};for(const [_0x27def9,_0x2e0204]of Object[_0x5d4cb9(0x1df)](_0x50ff5c)){!(_0x27def9 in _0x490afb)&&(_0x490afb[_0x27def9]=_0x2e0204);}writeConfigFile(_0x28277d,_0x490afb);const _0x38834e=_0x3c78ba['oldPath']+'.bak';return renameSync(_0x3c78ba[_0x5d4cb9(0x1c9)],_0x38834e),{'step':0x1,'label':'Config\x20migration','ok':!![],'detail':_0x3c78ba[_0x5d4cb9(0x1c9)]+_0x5d4cb9(0x20c)+_0x28277d+_0x5d4cb9(0x1db)+_0x38834e+')'};}function execRemoveOldArtifacts(_0x34c9b8){const _0x26abf0=a69_0x158a5e,_0x23fc70=[];for(const _0x3ed1ca of _0x34c9b8){try{if(!existsSync(_0x3ed1ca))continue;const _0xccba=tryStat(_0x3ed1ca);_0xccba?.[_0x26abf0(0x21e)]()?rmSync(_0x3ed1ca,{'recursive':!![],'force':!![]}):unlinkSync(_0x3ed1ca);}catch(_0x10ae60){_0x23fc70['push'](_0x3ed1ca+':\x20'+_0x10ae60[_0x26abf0(0x208)]);}}return{'step':0x3,'label':'Remove\x20legacy\x20artifacts','ok':_0x23fc70[_0x26abf0(0x1ce)]===0x0,'detail':_0x23fc70[_0x26abf0(0x1ce)]>0x0?_0x34c9b8[_0x26abf0(0x1ce)]-_0x23fc70[_0x26abf0(0x1ce)]+'/'+_0x34c9b8[_0x26abf0(0x1ce)]+_0x26abf0(0x1ec)+_0x23fc70[_0x26abf0(0x1e8)](';\x20')+')':_0x34c9b8[_0x26abf0(0x1ce)]+'\x20removed'};}function execCleanMcp(_0x3aaf56){const _0x15784d=a69_0x158a5e;if(!_0x3aaf56[_0x15784d(0x1fa)])return{'step':0x4,'label':'Clean\x20MCP\x20config','ok':!![],'detail':_0x15784d(0x1d1)};try{const _0x16d9db=readFileSync(_0x3aaf56['oldMcpConfig'][_0x15784d(0x1f7)],'utf8'),_0x1b8457=JSON[_0x15784d(0x20d)](_0x16d9db);if(_0x1b8457?.[_0x15784d(0x1f3)]&&typeof _0x1b8457['mcpServers']==='object'){const _0x5923d6=[];for(const [_0x736285,_0x5c46a5]of Object[_0x15784d(0x1df)](_0x1b8457[_0x15784d(0x1f3)])){_0x5c46a5?.[_0x15784d(0x1ba)]&&Array['isArray'](_0x5c46a5['args'])&&_0x5c46a5['args'][_0x15784d(0x207)](_0x4af0d8=>typeof _0x4af0d8===_0x15784d(0x1e0)&&_0x4af0d8[_0x15784d(0x1d9)](_0x15784d(0x1d8)))&&_0x5923d6[_0x15784d(0x1bd)](_0x736285);}for(const _0x52cbad of _0x5923d6){delete _0x1b8457[_0x15784d(0x1f3)][_0x52cbad];}return _0x5923d6['length']>0x0&&writeFileSync(_0x3aaf56['oldMcpConfig'][_0x15784d(0x1f7)],JSON[_0x15784d(0x1f1)](_0x1b8457,null,0x2)+'\x0a','utf8'),{'step':0x4,'label':_0x15784d(0x20a),'ok':!![],'detail':'removed\x20'+_0x5923d6['join'](',\x20')+'\x20from\x20'+_0x3aaf56[_0x15784d(0x1fa)][_0x15784d(0x1f7)]};}return{'step':0x4,'label':_0x15784d(0x20a),'ok':!![],'detail':'no\x20matching\x20entry\x20found'};}catch(_0x26e4b8){return{'step':0x4,'label':_0x15784d(0x20a),'ok':![],'detail':_0x26e4b8[_0x15784d(0x208)]};}}function execSkillsRemove(_0x4451b9){const _0x519c70=a69_0x158a5e,_0xe18623=runNpxSkillsRemove(_0x4451b9,{'stdio':_0x519c70(0x214)});return{'step':0x5,'label':_0x519c70(0x1dc),'ok':_0xe18623['ok'],'detail':_0xe18623['ok']?_0x519c70(0x1da):_0xe18623['error']??_0x519c70(0x1d0)+_0xe18623[_0x519c70(0x1c2)]};}function execSkillsAdd(_0x365b84){const _0x4132ff=a69_0x158a5e,_0x21bdb8=runNpxSkillsAddGlobal(_0x365b84,_0x4132ff(0x1c3),{'stdio':_0x4132ff(0x214)});return{'step':0x6,'label':_0x4132ff(0x1de),'ok':_0x21bdb8['ok'],'detail':_0x21bdb8['ok']?_0x4132ff(0x1bb):_0x21bdb8[_0x4132ff(0x21d)]??_0x4132ff(0x1d0)+_0x21bdb8[_0x4132ff(0x1c2)]};}function tryStat(_0x2f7fcd){try{return statSync(_0x2f7fcd);}catch{return undefined;}}function printSummary(_0x1697bf){const _0x508e62=a69_0x158a5e;console[_0x508e62(0x1c4)](''),console[_0x508e62(0x1c4)](a69_0x3c7f6e[_0x508e62(0x1b5)]('===\x20Upgrade\x20Summary\x20===')),console[_0x508e62(0x1c4)]('');for(const _0x12fed9 of _0x1697bf){const _0xe1c4f6=_0x12fed9['ok']?a69_0x3c7f6e[_0x508e62(0x215)]('OK'):a69_0x3c7f6e[_0x508e62(0x203)](_0x508e62(0x21a));console[_0x508e62(0x1c4)]('\x20\x20'+_0xe1c4f6+_0x508e62(0x212)+_0x12fed9['step']+':\x20'+_0x12fed9[_0x508e62(0x1f5)]);if(_0x12fed9[_0x508e62(0x202)])console[_0x508e62(0x1c4)](_0x508e62(0x1b8)+a69_0x3c7f6e[_0x508e62(0x1fb)](_0x12fed9['detail']));}console[_0x508e62(0x1c4)]('');}export async function upgradeApp(_0x113e5a,_0x2dce19){const _0x4173ba=a69_0x158a5e,_0x23f280=process[_0x4173ba(0x222)](),_0x2d782b=analyse(_0x23f280),_0x2cb5a6=!_0x2d782b[_0x4173ba(0x201)]&&_0x2d782b[_0x4173ba(0x1b9)]['length']===0x0&&!_0x2d782b[_0x4173ba(0x1fa)]&&!_0x2d782b[_0x4173ba(0x1ed)];if(_0x2cb5a6){console[_0x4173ba(0x1c4)](a69_0x3c7f6e[_0x4173ba(0x215)]('No\x20legacy\x20artifacts\x20found.\x20Your\x20project\x20is\x20already\x20up-to-date.'));return;}printReport(_0x2d782b);const _0x44a3c4=_0x2dce19[_0x4173ba(0x1c5)]||_0x2dce19['Y']||_0x113e5a;if(!_0x44a3c4)try{const _0x588fad=await askConfirm(_0x4173ba(0x20b));if(!_0x588fad){console[_0x4173ba(0x1c4)](a69_0x3c7f6e['gray']('Upgrade\x20cancelled.'));return;}}catch(_0x127d58){if(_0x127d58?.[_0x4173ba(0x208)]===_0x4173ba(0x1f8)){console['log'](a69_0x3c7f6e[_0x4173ba(0x1fb)](_0x4173ba(0x1d5)));return;}throw _0x127d58;}const _0x461f02=[],_0x5bd166=a69_0xb25bcb({'text':'Step\x201/6:\x20Migrating\x20config...','color':_0x4173ba(0x1ef)})[_0x4173ba(0x1be)](),_0x3d568e=execConfigMigration(_0x2d782b,_0x23f280);_0x461f02[_0x4173ba(0x1bd)](_0x3d568e),_0x5bd166[_0x3d568e['ok']?_0x4173ba(0x210):_0x4173ba(0x1c6)](_0x4173ba(0x21c)+(_0x3d568e[_0x4173ba(0x202)]??(_0x3d568e['ok']?'done':_0x4173ba(0x217))));const _0x56f738=resolve(_0x23f280,_0x4173ba(0x1e1)),_0x39444c=a69_0xb25bcb({'text':_0x4173ba(0x220),'color':_0x4173ba(0x1ef)})[_0x4173ba(0x1be)]();if(existsSync(_0x56f738))try{rmSync(_0x56f738,{'recursive':!![],'force':!![]}),_0x39444c[_0x4173ba(0x210)](_0x4173ba(0x1d3)),_0x461f02[_0x4173ba(0x1bd)]({'step':0x2,'label':_0x4173ba(0x1fd),'ok':!![]});}catch(_0xe9956f){_0x39444c[_0x4173ba(0x1c6)](_0x4173ba(0x1eb)+_0xe9956f[_0x4173ba(0x208)]),_0x461f02[_0x4173ba(0x1bd)]({'step':0x2,'label':_0x4173ba(0x1fd),'ok':![],'detail':_0xe9956f[_0x4173ba(0x208)]});}else _0x39444c[_0x4173ba(0x205)](_0x4173ba(0x1cd)),_0x461f02[_0x4173ba(0x1bd)]({'step':0x2,'label':'Remove\x20.lovrabet/','ok':!![],'detail':'skipped'});const _0x587f4b=a69_0xb25bcb({'text':'Step\x203/6:\x20Removing\x20legacy\x20IDE\x20skill\x20files...','color':_0x4173ba(0x1ef)})[_0x4173ba(0x1be)](),_0x48f80e=execRemoveOldArtifacts(_0x2d782b[_0x4173ba(0x1b9)]);_0x461f02['push'](_0x48f80e),_0x587f4b[_0x48f80e['ok']?_0x4173ba(0x210):'fail'](_0x4173ba(0x218)+(_0x48f80e['detail']??(_0x48f80e['ok']?_0x4173ba(0x20f):_0x4173ba(0x217))));const _0x49cb22=a69_0xb25bcb({'text':_0x4173ba(0x1e7),'color':_0x4173ba(0x1ef)})[_0x4173ba(0x1be)](),_0x3065a0=execCleanMcp(_0x2d782b);_0x461f02[_0x4173ba(0x1bd)](_0x3065a0),_0x49cb22[_0x3065a0['ok']?_0x4173ba(0x210):'fail']('Step\x204/6:\x20MCP\x20config\x20—\x20'+(_0x3065a0['detail']??(_0x3065a0['ok']?_0x4173ba(0x20f):_0x4173ba(0x217))));const _0x1a3ed1=a69_0xb25bcb({'text':_0x4173ba(0x1d2),'color':'cyan'})[_0x4173ba(0x1be)](),_0x43cd59=execSkillsRemove(_0x23f280);_0x461f02[_0x4173ba(0x1bd)](_0x43cd59),_0x1a3ed1[_0x43cd59['ok']?_0x4173ba(0x210):'fail']('Step\x205/6:\x20Remove\x20old\x20skill\x20—\x20'+(_0x43cd59['detail']??(_0x43cd59['ok']?_0x4173ba(0x20f):_0x4173ba(0x217))));const _0x5adc08=a69_0xb25bcb({'text':_0x4173ba(0x1ee),'color':_0x4173ba(0x1ef)})[_0x4173ba(0x1be)](),_0x450dff=execSkillsAdd(_0x23f280);_0x461f02[_0x4173ba(0x1bd)](_0x450dff),_0x5adc08[_0x450dff['ok']?_0x4173ba(0x210):_0x4173ba(0x1c6)](_0x4173ba(0x1cb)+(_0x450dff[_0x4173ba(0x202)]??(_0x450dff['ok']?_0x4173ba(0x20f):'failed'))),printSummary(_0x461f02);const _0x2e4801=_0x461f02[_0x4173ba(0x207)](_0x12789b=>!_0x12789b['ok']);_0x2e4801?console[_0x4173ba(0x1c4)](a69_0x3c7f6e[_0x4173ba(0x1f9)](_0x4173ba(0x204))):console['log'](a69_0x3c7f6e[_0x4173ba(0x215)](_0x4173ba(0x1d7)));}
|
package/lib/commands/start.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a79_0x1932af=a79_0x2067;function a79_0x2067(_0x25b731,_0x8a8f16){_0x25b731=_0x25b731-0x1e1;const _0x523cb6=a79_0x523c();let _0x20674c=_0x523cb6[_0x25b731];return _0x20674c;}(function(_0x421eeb,_0x56c0c0){const _0x177e3d=a79_0x2067,_0x25dbe2=_0x421eeb();while(!![]){try{const _0x3c7b3f=parseInt(_0x177e3d(0x1e3))/0x1+-parseInt(_0x177e3d(0x1e6))/0x2+parseInt(_0x177e3d(0x1f0))/0x3*(-parseInt(_0x177e3d(0x1e7))/0x4)+-parseInt(_0x177e3d(0x1ec))/0x5+parseInt(_0x177e3d(0x1e2))/0x6+-parseInt(_0x177e3d(0x1ee))/0x7+parseInt(_0x177e3d(0x1e1))/0x8;if(_0x3c7b3f===_0x56c0c0)break;else _0x25dbe2['push'](_0x25dbe2['shift']());}catch(_0x40d985){_0x25dbe2['push'](_0x25dbe2['shift']());}}}(a79_0x523c,0xd931b));import{execa}from'execa';function a79_0x523c(){const _0x15d587=['now','25930040inPeWm','6766338YDgTNK','1535791VymkSP','start','inherit','3170438ybyISI','4952zhntGu','info','Start\x20development\x20server','needsUpgrade','cwd','594190RWiUBz','启动开发服务器','11469829cnvsUk','vite','4053zYyVeB'];a79_0x523c=function(){return _0x15d587;};return a79_0x523c();}import{checkSdkVersion,printSdkUpgradeWarning}from'../utils/check-sdk-version.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';export async function runStart(_0x266ada){const _0x5958f5=a79_0x2067,_0xa66b16=Date[_0x5958f5(0x1f1)](),_0x2e9d49=_0x266ada||process[_0x5958f5(0x1eb)](),_0x308f72=await checkCliVersion();_0x308f72[_0x5958f5(0x1ea)]&&printCliUpgradeWarning(_0x308f72);const _0x1f4ee9=await checkSdkVersion(_0x2e9d49);_0x1f4ee9['needsUpgrade']&&printSdkUpgradeWarning(_0x1f4ee9);try{await execa(_0x5958f5(0x1ef),[],{'cwd':_0x2e9d49,'stdio':_0x5958f5(0x1e5),'preferLocal':!![],'localDir':_0x2e9d49,'env':{...process.env}});const _0x33b6c7=Date['now']()-_0xa66b16;void _0x33b6c7;}catch(_0x241a6a){throw _0x241a6a;}}export const startCommand={'name':a79_0x1932af(0x1e4),'description':a79_0x1932af(0x1e9),async 'run'(_0x24572a,_0x4079b0,_0x4ae3cc){const _0x4ea232=a79_0x1932af;_0x24572a['logger'][_0x4ea232(0x1e8)](_0x4ea232(0x1e4),_0x4ea232(0x1ed)),await runStart();}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a94_0x5347(_0x4c060e,_0x26f605){_0x4c060e=_0x4c060e-0x1ac;const _0x2b0842=a94_0x2b08();let _0x5347e2=_0x2b0842[_0x4c060e];return _0x5347e2;}(function(_0x2ec9d9,_0x525027){const _0x5451ac=a94_0x5347,_0x1e87af=_0x2ec9d9();while(!![]){try{const _0x4b5686=parseInt(_0x5451ac(0x1ca))/0x1+-parseInt(_0x5451ac(0x1b5))/0x2+-parseInt(_0x5451ac(0x1ba))/0x3+parseInt(_0x5451ac(0x1b7))/0x4*(parseInt(_0x5451ac(0x1ac))/0x5)+parseInt(_0x5451ac(0x1b2))/0x6*(parseInt(_0x5451ac(0x1bf))/0x7)+-parseInt(_0x5451ac(0x1c9))/0x8*(parseInt(_0x5451ac(0x1bb))/0x9)+-parseInt(_0x5451ac(0x1cb))/0xa*(-parseInt(_0x5451ac(0x1b8))/0xb);if(_0x4b5686===_0x525027)break;else _0x1e87af['push'](_0x1e87af['shift']());}catch(_0x529744){_0x1e87af['push'](_0x1e87af['shift']());}}}(a94_0x2b08,0x1ef6d));import{existsSync}from'node:fs';function a94_0x2b08(){const _0x2dd16f=['11485RqmvnL','\x22\x20already\x20exists','Must\x20start\x20with\x20a\x20letter/number\x20and\x20only\x20contain\x20letters,\x20numbers,\x20-\x20and\x20_','resolve','env','√\x20Login\x20status:\x20','294BCgNvM','Project\x20name\x20cannot\x20exceed\x2050\x20characters','cwd','428806nsZoBL','length','404JHjxEm','33mBqBHy','Logged\x20in','227943mIGotf','1170gUgPIM','test','log','green','7987pJOMOt','Directory\x20\x22','Project\x20name:','Not\x20set','cyan','trim','Login\x20failed','my-app','√\x20App\x20Code:\x20','production','1200YmIKjq','109006Palfoq','132670SnoYGr'];a94_0x2b08=function(){return _0x2dd16f;};return a94_0x2b08();}import a94_0x83ff1 from'node:path';import a94_0x5d5097 from'chalk';import{input,confirm}from'@inquirer/prompts';import{getIsSessionValid}from'../auth/is-session-valid.js';import{authServer}from'../auth/auth-server.js';import{readConfig}from'../utils/config.js';import{selectSingleAppcode}from'../commands/common/app-selector.js';export async function guidedCreateProject(_0x3b2c00,_0x47a3cd,_0x69494b){const _0x181886=a94_0x5347,_0xef629e=_0x181886(0x1c6),_0xc2ccb9=readConfig(),_0x21aa61=typeof _0xc2ccb9[_0x181886(0x1b0)]==='string'?_0xc2ccb9[_0x181886(0x1b0)]:undefined,_0x16b6e9=await input({'message':_0x181886(0x1c1),'default':_0xef629e,'validate':_0x1f7832=>{const _0x494ddc=_0x181886,_0x447c08=_0x1f7832[_0x494ddc(0x1c4)]()||_0xef629e;if(_0x447c08[_0x494ddc(0x1b6)]>0x32)return _0x494ddc(0x1b3);const _0x371070=/^[A-Za-z0-9][A-Za-z0-9_-]*$/;if(_0x447c08&&!_0x371070[_0x494ddc(0x1bc)](_0x447c08))return _0x494ddc(0x1ae);const _0x5bc859=a94_0x83ff1[_0x494ddc(0x1af)](process[_0x494ddc(0x1b4)](),_0x447c08);if(existsSync(_0x5bc859))return _0x494ddc(0x1c0)+_0x447c08+_0x494ddc(0x1ad);return!![];}});console[_0x181886(0x1bd)](a94_0x5d5097[_0x181886(0x1be)]('√\x20Project\x20Name:\x20'+a94_0x5d5097[_0x181886(0x1c3)](_0x16b6e9)));const _0x1f1eba=await selectSingleAppcode(_0x69494b);console['log'](a94_0x5d5097['green'](_0x181886(0x1c7)+a94_0x5d5097[_0x181886(0x1c3)](_0x1f1eba||_0x181886(0x1c2))));if(_0x1f1eba){const _0xa62e52=await getIsSessionValid();if(!_0xa62e52){const _0x574835=await confirm({'message':'No\x20valid\x20login\x20detected.\x20Login\x20first\x20to\x20pull\x20API\x20config?','default':!![]});if(_0x574835){const _0x3c4259=await authServer({'silent':!![]});console[_0x181886(0x1bd)](a94_0x5d5097[_0x181886(0x1be)](_0x181886(0x1b1)+a94_0x5d5097['cyan'](_0x3c4259?_0x181886(0x1b9):_0x181886(0x1c5))));}else console[_0x181886(0x1bd)](a94_0x5d5097['green'](_0x181886(0x1b1)+a94_0x5d5097[_0x181886(0x1c3)]('Skipped')));}await _0x3b2c00({'projectName':_0x16b6e9,'appCode':_0x1f1eba,'env':_0x47a3cd||_0x21aa61||_0x181886(0x1c8)});}else await _0x3b2c00({'projectName':_0x16b6e9,'env':_0x47a3cd||_0x21aa61||'production'});}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x4da4b5,_0xf62aee){const _0x505317=a95_0x2a77,_0x2aace1=_0x4da4b5();while(!![]){try{const _0x4b3186=parseInt(_0x505317(0x72))/0x1*(parseInt(_0x505317(0x76))/0x2)+-parseInt(_0x505317(0x6e))/0x3+parseInt(_0x505317(0x75))/0x4*(parseInt(_0x505317(0x70))/0x5)+parseInt(_0x505317(0x74))/0x6*(-parseInt(_0x505317(0x7a))/0x7)+parseInt(_0x505317(0x73))/0x8*(-parseInt(_0x505317(0x78))/0x9)+parseInt(_0x505317(0x6f))/0xa*(-parseInt(_0x505317(0x71))/0xb)+parseInt(_0x505317(0x77))/0xc*(parseInt(_0x505317(0x79))/0xd);if(_0x4b3186===_0xf62aee)break;else _0x2aace1['push'](_0x2aace1['shift']());}catch(_0xb71c7a){_0x2aace1['push'](_0x2aace1['shift']());}}}(a95_0x5e75,0x6368f));function a95_0x2a77(_0x523668,_0x1da3f0){_0x523668=_0x523668-0x6e;const _0x5e75b6=a95_0x5e75();let _0x2a77f5=_0x5e75b6[_0x523668];return _0x2a77f5;}export function formatElapsed(_0x2e09d0){const _0xc4099f=a95_0x2a77,_0x24c42e=Date['now']()-_0x2e09d0;if(_0x24c42e<0x3e8)return _0x24c42e+'ms';const _0x19d9d6=(_0x24c42e/0x3e8)[_0xc4099f(0x7c)](0x2),_0x474b5b=_0x19d9d6[_0xc4099f(0x7b)](/\.?0+$/u,'');return _0x474b5b+'s';}function a95_0x5e75(){const _0x3eb547=['10FkSNDL','10aaMHfn','3957987quEEml','4AhrHBd','72544rWYHNR','797736UjcUkg','1483252vRcOar','3094LSSLhS','565188vppMfU','369GDqhps','403egTYaK','28XXrIkr','replace','toFixed','1611813HxhQxU'];a95_0x5e75=function(){return _0x3eb547;};return a95_0x5e75();}
|
package/lib/create-app/main.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0xa0667f,_0x26c2e8){const _0x21df6c=a96_0x2adb,_0x2aff3f=_0xa0667f();while(!![]){try{const _0x555809=parseInt(_0x21df6c(0x16b))/0x1+-parseInt(_0x21df6c(0x14f))/0x2*(parseInt(_0x21df6c(0x18b))/0x3)+parseInt(_0x21df6c(0x192))/0x4*(parseInt(_0x21df6c(0x157))/0x5)+parseInt(_0x21df6c(0x178))/0x6+parseInt(_0x21df6c(0x184))/0x7*(parseInt(_0x21df6c(0x17f))/0x8)+-parseInt(_0x21df6c(0x179))/0x9*(-parseInt(_0x21df6c(0x19a))/0xa)+-parseInt(_0x21df6c(0x14b))/0xb;if(_0x555809===_0x26c2e8)break;else _0x2aff3f['push'](_0x2aff3f['shift']());}catch(_0x1ac460){_0x2aff3f['push'](_0x2aff3f['shift']());}}}(a96_0x4abc,0x2d820));import a96_0x90dcf2 from'path';import a96_0x5128cc from'fs';import{fileURLToPath}from'node:url';import a96_0x42b0cd from'chalk';import a96_0x266cd7 from'ora';import{guidedCreateProject}from'./enhanced-guided-create.js';import{fetchModelList}from'../api/fetch-model-list.js';import{generateApiFile}from'../api/generate-api-file.js';import{initEnv}from'../constant/env.js';function a96_0x2adb(_0x339105,_0x420cd3){_0x339105=_0x339105-0x13c;const _0x4abc47=a96_0x4abc();let _0x2adbd4=_0x4abc47[_0x339105];return _0x2adbd4;}import{readConfig}from'../utils/config.js';import{CLI_BIN_NAME}from'../constant/cli.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{copyProjectTemplate}from'./use-copy-project-template.js';import{installDependencies}from'./use-install-dependencies.js';import{formatProjectCode}from'./use-format-code.js';import{logger}from'../utils/logger.js';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';import{selectSingleAppcode}from'../commands/common/app-selector.js';export async function createApp(_0x4d13f9){const _0x37f01a=a96_0x2adb,_0x40206e=await checkCliVersion();_0x40206e['needsUpgrade']&&(printCliUpgradeWarning(_0x40206e),logger[_0x37f01a(0x15f)](_0x37f01a(0x148),_0x37f01a(0x166),{'currentVersion':_0x40206e[_0x37f01a(0x189)],'stableVersion':_0x40206e[_0x37f01a(0x188)],'needsUpgrade':_0x40206e['needsUpgrade']}));if(_0x4d13f9[_0x37f01a(0x144)]&&_0x4d13f9['appCode'])await runCreate({'projectName':_0x4d13f9['projectCode'],'appCode':_0x4d13f9['appCode'],'env':_0x4d13f9['env']},_0x4d13f9);else{if(_0x4d13f9[_0x37f01a(0x144)]){const _0x3c7ab3=await selectSingleAppcode(_0x4d13f9[_0x37f01a(0x155)]);await runCreate({'projectName':_0x4d13f9[_0x37f01a(0x144)],'appCode':_0x3c7ab3||undefined,'env':_0x4d13f9[_0x37f01a(0x17e)]},_0x4d13f9);}else await guidedCreateProject(_0x1d4f75=>runCreate(_0x1d4f75,_0x4d13f9),_0x4d13f9[_0x37f01a(0x17e)],_0x4d13f9[_0x37f01a(0x155)]);}}async function runCreate(_0x14db7f,_0x6c8db6){const _0x38cc30=a96_0x2adb;if(!_0x14db7f[_0x38cc30(0x13d)]||_0x14db7f[_0x38cc30(0x13d)][_0x38cc30(0x158)]()==='')throw new Error(_0x38cc30(0x13e));const _0x4cf9ab=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x4cf9ab[_0x38cc30(0x141)](_0x14db7f[_0x38cc30(0x13d)]))throw new Error('Invalid\x20characters\x20in\x20project\x20name.\x20Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters');if(_0x14db7f[_0x38cc30(0x13d)][_0x38cc30(0x13c)]>0x64)throw new Error(_0x38cc30(0x181));const _0x13cacc=a96_0x90dcf2[_0x38cc30(0x161)](process[_0x38cc30(0x185)](),_0x14db7f[_0x38cc30(0x13d)]);if(a96_0x5128cc[_0x38cc30(0x168)](_0x13cacc))throw new Error(_0x38cc30(0x164)+_0x14db7f[_0x38cc30(0x13d)]+_0x38cc30(0x13f));try{a96_0x5128cc[_0x38cc30(0x15b)](a96_0x90dcf2[_0x38cc30(0x16c)](_0x13cacc),a96_0x5128cc[_0x38cc30(0x156)]['W_OK']);}catch{throw new Error(_0x38cc30(0x159));}logger['setLogPath'](_0x13cacc),logger['info'](_0x38cc30(0x148),_0x38cc30(0x151)+_0x14db7f[_0x38cc30(0x13d)],{'projectDir':_0x13cacc,'appCode':_0x14db7f[_0x38cc30(0x15e)]}),console['log'](),console[_0x38cc30(0x14a)](a96_0x42b0cd[_0x38cc30(0x163)](_0x38cc30(0x160))+'Project\x20name:\x20'+a96_0x42b0cd[_0x38cc30(0x163)](_0x14db7f[_0x38cc30(0x13d)])+(_0x14db7f[_0x38cc30(0x15e)]?_0x38cc30(0x17b)+a96_0x42b0cd[_0x38cc30(0x170)](_0x14db7f['appCode']):''));try{await runTask(_0x38cc30(0x199),()=>copyProjectTemplate(_0x14db7f[_0x38cc30(0x13d)])),await updatePackageJsonName(_0x14db7f[_0x38cc30(0x13d)]),await runTask(_0x38cc30(0x16e),()=>installDependencies(_0x14db7f['projectName'])),await runTask(_0x38cc30(0x162),()=>formatProjectCode(_0x14db7f['projectName'])),await configureAppCode(_0x14db7f[_0x38cc30(0x13d)],_0x14db7f[_0x38cc30(0x15e)]||'',_0x14db7f[_0x38cc30(0x17e)]);let _0x3b9b7d=![];if(_0x14db7f[_0x38cc30(0x15e)]){console[_0x38cc30(0x14a)](_0x38cc30(0x173));const _0x569122=process[_0x38cc30(0x185)]();try{process['chdir'](_0x13cacc);const _0x21abcc=_0x14db7f[_0x38cc30(0x17e)]||_0x38cc30(0x17d);initEnv(_0x21abcc);const {configArray:_0x341279}=await fetchModelList(_0x14db7f[_0x38cc30(0x15e)],_0x6c8db6[_0x38cc30(0x155)]||''),_0x332acc=_0x38cc30(0x15c),_0x477c35=await generateApiFile(_0x341279,'',_0x14db7f[_0x38cc30(0x15e)],!![],_0x21abcc,_0x332acc);console['log'](_0x38cc30(0x171)+_0x341279[_0x38cc30(0x13c)]+_0x38cc30(0x18a)+_0x477c35[_0x38cc30(0x183)]+'\x20model(s)'),logger['info']('create',_0x38cc30(0x186)+_0x14db7f[_0x38cc30(0x15e)]);}catch(_0x428932){_0x3b9b7d=!![],console[_0x38cc30(0x14a)]('!\x20API\x20configuration\x20pull\x20error,\x20you\x20can\x20manually\x20run:\x20rabetbase\x20api\x20pull'),logger[_0x38cc30(0x176)](_0x38cc30(0x148),_0x38cc30(0x190),{'error':_0x428932 instanceof Error?_0x428932[_0x38cc30(0x16f)]:String(_0x428932)});}finally{process[_0x38cc30(0x18d)](_0x569122);}}logger[_0x38cc30(0x145)](_0x38cc30(0x148),_0x38cc30(0x177)+_0x14db7f['projectName']),console[_0x38cc30(0x14a)](),console['log'](a96_0x42b0cd[_0x38cc30(0x163)]('─'[_0x38cc30(0x193)](0x3c))),console['log'](a96_0x42b0cd['cyan'][_0x38cc30(0x143)](_0x38cc30(0x196))),console[_0x38cc30(0x14a)](),console[_0x38cc30(0x14a)](_0x38cc30(0x16a)+a96_0x42b0cd['cyan']['bold']('cd\x20'+_0x14db7f[_0x38cc30(0x13d)]+'\x20&&\x20'+CLI_BIN_NAME+_0x38cc30(0x140))),_0x3b9b7d&&console[_0x38cc30(0x14a)](_0x38cc30(0x194)+a96_0x42b0cd[_0x38cc30(0x170)][_0x38cc30(0x143)](CLI_BIN_NAME+'\x20api\x20pull')),console['log'](a96_0x42b0cd[_0x38cc30(0x163)]('─'['repeat'](0x3c)));}catch(_0x134852){logger[_0x38cc30(0x167)](_0x38cc30(0x148),_0x38cc30(0x197)+_0x14db7f['projectName'],{'error':_0x134852 instanceof Error?_0x134852[_0x38cc30(0x16f)]:String(_0x134852)});try{a96_0x5128cc[_0x38cc30(0x168)](_0x13cacc)&&(console[_0x38cc30(0x14a)](_0x38cc30(0x142)+_0x13cacc),a96_0x5128cc[_0x38cc30(0x198)](_0x13cacc,{'recursive':!![],'force':!![]}));}catch{logger['warn'](_0x38cc30(0x148),_0x38cc30(0x180)+_0x13cacc);}throw _0x134852;}}function a96_0x4abc(){const _0x2a4ce2=['Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters','version','modelCount','175nwNbEL','cwd','API\x20configuration\x20pulled:\x20','配置应用AppCode:\x20','stableVersion','currentVersion','\x20dataset(s),\x20generated\x20','432ojqgaC','1.0.0','chdir','stringify','*\x20Creating\x20configuration\x20file\x20for\x20project\x20','API\x20配置拉取异常','join','30644gZqTnj','repeat','\x20\x202.\x20Pull\x20API\x20configuration:\x20','utf8','🚀\x20Next\x20Steps:','项目创建失败:\x20','rmSync','Copy\x20project\x20files','20OIFQIz','length','projectName','Project\x20name\x20cannot\x20be\x20empty','\x20already\x20exists','\x20run\x20start','test','*\x20Cleaning\x20up\x20failed\x20project\x20directory:\x20','bold','projectCode','success','toLocaleString','*\x20Configuring\x20AppCode\x20for\x20project\x20','create','配置应用AppCode失败','log','7449530ASMnGP','更新\x20package.json\x20name','*\x20Updating\x20package.json\x20name\x20and\x20description\x20fields','start','4388VwmLRP','readFileSync','开始创建项目:\x20','gray','\x20Generated\x20by\x20rabetbase\x20cli\x20','√\x20Configuration\x20file\x20created,\x20you\x20can\x20configure\x20later\x20with\x20\x27','cookie','constants','185MDcVNV','trim','Cannot\x20create\x20project\x20in\x20current\x20directory,\x20please\x20check\x20directory\x20permissions','package.json','accessSync','./src/api/','√\x20Configuration\x20file\x20created,\x20AppCode:\x20','appCode','info','\x20√\x20','resolve','Format\x20code','green','Project\x20directory\x20','description','CLI\x20版本检查','error','existsSync','stop','\x20\x201.\x20Start\x20project:\x20','288505xYxYXo','dirname','fail','Install\x20dependencies','message','cyan','√\x20Pulled\x20','\x20config\x20set\x20appcode\x20<app-code>\x27','*\x20Pulling\x20API\x20configuration...','../..','parse','warn','项目创建完成:\x20','29898VHZSCD','1213407KlTFhQ','name','\x20|\x20AppCode:\x20','√\x20package.json\x20updated:\x20name=','production','env','106552MyjTxU','清理项目目录失败:\x20'];a96_0x4abc=function(){return _0x2a4ce2;};return a96_0x4abc();}async function runTask(_0x41c6a4,_0x24ca17){const _0x4c324f=a96_0x2adb,_0x24ef0d=a96_0x266cd7(_0x41c6a4+'...')[_0x4c324f(0x14e)]();try{const _0x25182c=await _0x24ca17();_0x24ef0d[_0x4c324f(0x169)](),console[_0x4c324f(0x14a)](''+a96_0x42b0cd[_0x4c324f(0x163)]('\x20√\x20')+_0x41c6a4+'\x20'+a96_0x42b0cd[_0x4c324f(0x152)]('['+_0x25182c+']'));}catch(_0x5730ef){_0x24ef0d[_0x4c324f(0x16d)](_0x41c6a4);throw _0x5730ef;}}async function updatePackageJsonName(_0x74911c){const _0x19cbbd=a96_0x2adb,_0x3ff378=a96_0x90dcf2[_0x19cbbd(0x161)](process[_0x19cbbd(0x185)](),_0x74911c),_0x308570=a96_0x90dcf2[_0x19cbbd(0x191)](_0x3ff378,'package.json');try{console[_0x19cbbd(0x14a)](_0x19cbbd(0x14d));const _0x24631e=fileURLToPath(import.meta.url),_0x3728cf=a96_0x90dcf2[_0x19cbbd(0x161)](a96_0x90dcf2[_0x19cbbd(0x16c)](_0x24631e),_0x19cbbd(0x174)),_0x1ff146=a96_0x90dcf2['join'](_0x3728cf,_0x19cbbd(0x15a));let _0x21ce29=_0x19cbbd(0x18c);try{const _0x398f6f=JSON[_0x19cbbd(0x175)](a96_0x5128cc[_0x19cbbd(0x150)](_0x1ff146,_0x19cbbd(0x195)));_0x21ce29=_0x398f6f[_0x19cbbd(0x182)]||_0x19cbbd(0x18c);}catch{}const _0x386198=a96_0x5128cc['readFileSync'](_0x308570,'utf8'),_0x359f59=JSON['parse'](_0x386198);_0x359f59[_0x19cbbd(0x17a)]=_0x74911c,_0x359f59[_0x19cbbd(0x165)]=_0x74911c+_0x19cbbd(0x153)+_0x21ce29,a96_0x5128cc['writeFileSync'](_0x308570,JSON[_0x19cbbd(0x18e)](_0x359f59,null,0x2)+'\x0a',_0x19cbbd(0x195)),console[_0x19cbbd(0x14a)](_0x19cbbd(0x17c)+_0x74911c),logger[_0x19cbbd(0x15f)](_0x19cbbd(0x148),_0x19cbbd(0x14c));}catch(_0x27236e){logger[_0x19cbbd(0x167)](_0x19cbbd(0x148),'更新\x20package.json\x20失败');throw _0x27236e;}}async function configureAppCode(_0x57fd41,_0x177328,_0x421c8a){const _0x340a20=a96_0x2adb,_0x2d3159=a96_0x90dcf2[_0x340a20(0x161)](process[_0x340a20(0x185)](),_0x57fd41),_0x1ace64=a96_0x90dcf2[_0x340a20(0x191)](_0x2d3159,NEW_CONFIG_NAME);try{_0x177328?console[_0x340a20(0x14a)](_0x340a20(0x147)+_0x57fd41+':\x20'+_0x177328):console[_0x340a20(0x14a)](_0x340a20(0x18f)+_0x57fd41);const _0x4fba3e=fileURLToPath(import.meta.url),_0x53ee9f=a96_0x90dcf2['resolve'](a96_0x90dcf2['dirname'](_0x4fba3e),_0x340a20(0x174)),_0x3408f1=a96_0x90dcf2['join'](_0x53ee9f,'package.json');let _0x1276e4='1.0.0';try{const _0x281292=JSON[_0x340a20(0x175)](a96_0x5128cc['readFileSync'](_0x3408f1,'utf8'));_0x1276e4=_0x281292[_0x340a20(0x182)]||_0x340a20(0x18c);}catch{}const _0x28fbc9=readConfig(),_0x29d6f4=typeof _0x28fbc9[_0x340a20(0x17e)]==='string'?_0x28fbc9['env']:undefined,{app:_0x53e03a,appcode:_0x2df9cf,..._0x413372}=_0x28fbc9,_0x311c0e={..._0x413372,'appcode':_0x177328||'','env':_0x421c8a||_0x29d6f4||_0x340a20(0x17d),'createdAt':new Date()[_0x340a20(0x146)](),'version':_0x1276e4};writeConfigFile(_0x1ace64,_0x311c0e),_0x177328?console[_0x340a20(0x14a)](_0x340a20(0x15d)+_0x177328):console['log'](_0x340a20(0x154)+CLI_BIN_NAME+_0x340a20(0x172)),logger['info'](_0x340a20(0x148),_0x340a20(0x187)+_0x177328);}catch(_0x52e756){logger[_0x340a20(0x167)]('create',_0x340a20(0x149));}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
function a97_0x4452(_0x311dcb,_0x294fec){_0x311dcb=_0x311dcb-0x193;const _0x15883a=a97_0x1588();let _0x44522c=_0x15883a[_0x311dcb];return _0x44522c;}(function(_0x3dcb93,_0x3881ae){const _0x13343d=a97_0x4452,_0xe680de=_0x3dcb93();while(!![]){try{const _0x5077cf=parseInt(_0x13343d(0x1bc))/0x1*(-parseInt(_0x13343d(0x1d3))/0x2)+parseInt(_0x13343d(0x196))/0x3*(-parseInt(_0x13343d(0x1ab))/0x4)+-parseInt(_0x13343d(0x1d0))/0x5+-parseInt(_0x13343d(0x1b3))/0x6*(parseInt(_0x13343d(0x1b9))/0x7)+parseInt(_0x13343d(0x1b0))/0x8+-parseInt(_0x13343d(0x194))/0x9+parseInt(_0x13343d(0x1b4))/0xa*(parseInt(_0x13343d(0x19d))/0xb);if(_0x5077cf===_0x3881ae)break;else _0xe680de['push'](_0xe680de['shift']());}catch(_0x20b1d3){_0xe680de['push'](_0xe680de['shift']());}}}(a97_0x1588,0x8cb7a));import a97_0x14f5cf from'path';import{fileURLToPath}from'url';import a97_0x2095ca from'fs/promises';import{existsSync}from'fs';import{CLI_BIN_NAME}from'../constant/cli.js';function a97_0x1588(){const _0x1f7265=['89092paoNjE','./src/api/','needsUpgrade','trim','*\x20Creating\x20project\x20','3188736rrGHMF','length','\x22\x20already\x20exists.','330vPEOLn','150KPijlD','\x20\x20rabetbase\x20run\x20start\x0a','\x20created\x20successfully!','Project\x20name\x20cannot\x20be\x20empty.','bun\x20run\x20format','99925yWNAVg','\x0a\x20\x20cd\x20','name','1mnhGjM','Project\x20directory\x20\x22','Project\x20name\x20is\x20too\x20long,\x20maximum\x20100\x20characters.','W_OK','Check\x20directory\x20permissions.','\x20api\x20pull`\x20manually\x20later.','bun','\x20\x20√\x20Pulled\x20','Use\x20a\x20different\x20project\x20name.','Project\x20name\x20contains\x20invalid\x20characters.','\x0a√\x20Project\x20','constants','utf-8','\x20\x20Installing\x20dependencies...','\x20model(s)','...','resolve','package.json','\x20\x20√\x20Code\x20formatted','validation','2800460uEsVfC','Not\x20allowed:\x20<\x20>\x20:\x20\x22\x20|\x20?\x20*\x20and\x20control\x20characters','Cannot\x20create\x20project\x20in\x20current\x20directory.','1315162JCKxoc','modelCount','1303722AxKttp','\x20\x20√\x20Dependency\x20install\x20skipped\x20(non-interactive)','123dKJStq','ignore','readFile','writeFile','dirname','join','parse','2374999QDDJkQ','log','\x20\x20!\x20API\x20pull\x20failed,\x20run\x20`','\x20dataset(s),\x20generated\x20','cwd','\x20\x20√\x20Configuration\x20file\x20created','\x20\x20Pulling\x20API\x20configuration...','toLocaleString','test','bun\x20--version','production','access','A\x20project\x20created\x20with\x20Lovrabet\x20CLI','chdir'];a97_0x1588=function(){return _0x1f7265;};return a97_0x1588();}import{exec,execSync}from'child_process';import{copyDirectory}from'../utils/copy-directory.js';import{promisify}from'util';import{checkCliVersion,printCliUpgradeWarning}from'../utils/cli-version-check.js';import{writeConfigFile,NEW_CONFIG_NAME}from'../context.js';import{readConfig}from'../utils/config.js';import{getCliVersion}from'../utils/version.js';import{CliErrors}from'../errors.js';import{fetchModelList}from'../api/fetch-model-list.js';import{generateApiFile}from'../api/generate-api-file.js';import{initEnv}from'../constant/env.js';const execAsync=promisify(exec);function getTemplateDir(){const _0x5ea9a8=a97_0x4452,_0x1b8033=fileURLToPath(import.meta.url),_0x45a64c=a97_0x14f5cf[_0x5ea9a8(0x19a)](_0x1b8033);return a97_0x14f5cf['resolve'](_0x45a64c,'../../templates/projects/sub-app-react-demo');}export async function createProjectNonInteractive(_0x4fa746,_0x59ae0c,_0xb22895,_0x224316){const _0x5e0a3c=a97_0x4452,_0x4e6dc6=await checkCliVersion();_0x4e6dc6[_0x5e0a3c(0x1ad)]&&printCliUpgradeWarning(_0x4e6dc6);if(!_0x4fa746||_0x4fa746[_0x5e0a3c(0x1ae)]()==='')throw CliErrors[_0x5e0a3c(0x1cf)](_0x5e0a3c(0x1b7));const _0x31175e=/[<>:"|?*\x00-\x1f\x7f]/;if(_0x31175e[_0x5e0a3c(0x1a5)](_0x4fa746))throw CliErrors[_0x5e0a3c(0x1cf)](_0x5e0a3c(0x1c5),_0x5e0a3c(0x1d1));if(_0x4fa746['length']>0x64)throw CliErrors[_0x5e0a3c(0x1cf)](_0x5e0a3c(0x1be));const _0x5ce153=a97_0x14f5cf['resolve'](process[_0x5e0a3c(0x1a1)](),_0x4fa746);if(existsSync(_0x5ce153))throw CliErrors['validation'](_0x5e0a3c(0x1bd)+_0x4fa746+_0x5e0a3c(0x1b2),_0x5e0a3c(0x1c4));try{const _0x49486b=a97_0x14f5cf[_0x5e0a3c(0x19a)](_0x5ce153);await a97_0x2095ca[_0x5e0a3c(0x1a8)](_0x49486b,a97_0x2095ca[_0x5e0a3c(0x1c7)][_0x5e0a3c(0x1bf)]);}catch{throw CliErrors[_0x5e0a3c(0x1cf)](_0x5e0a3c(0x1d2),_0x5e0a3c(0x1c0));}try{console[_0x5e0a3c(0x19e)](_0x5e0a3c(0x1af)+_0x4fa746+_0x5e0a3c(0x1cb));const _0x35e33f=getTemplateDir();await copyDirectory(_0x35e33f,_0x5ce153),console[_0x5e0a3c(0x19e)]('\x20\x20√\x20Project\x20template\x20created'),await updatePackageJsonName(_0x4fa746),console['log']('\x20\x20√\x20package.json\x20updated'),console[_0x5e0a3c(0x19e)](_0x5e0a3c(0x1c9)),console['log'](_0x5e0a3c(0x195)),await formatCode(_0x5ce153),console[_0x5e0a3c(0x19e)](_0x5e0a3c(0x1ce)),await configureProject(_0x4fa746,_0xb22895,_0x59ae0c),console[_0x5e0a3c(0x19e)](_0x5e0a3c(0x1a2)),_0xb22895&&await pullApiConfig(_0x5ce153,_0xb22895,_0x59ae0c,_0x224316),console[_0x5e0a3c(0x19e)](_0x5e0a3c(0x1c6)+_0x4fa746+_0x5e0a3c(0x1b6)),console['log'](_0x5e0a3c(0x1ba)+_0x4fa746),console['log'](_0x5e0a3c(0x1b5));}catch(_0x488712){try{existsSync(_0x5ce153)&&await a97_0x2095ca['rm'](_0x5ce153,{'recursive':!![],'force':!![]});}catch{}throw _0x488712;}}async function updatePackageJsonName(_0x24dec5){const _0x23e9ca=a97_0x4452,_0x2ce788=a97_0x14f5cf['resolve'](process['cwd'](),_0x24dec5),_0x3265ab=a97_0x14f5cf[_0x23e9ca(0x19b)](_0x2ce788,_0x23e9ca(0x1cd)),_0xb3ecb2=await a97_0x2095ca[_0x23e9ca(0x198)](_0x3265ab,_0x23e9ca(0x1c8)),_0x4984b4=JSON[_0x23e9ca(0x19c)](_0xb3ecb2);_0x4984b4[_0x23e9ca(0x1bb)]=_0x24dec5,_0x4984b4['description']=_0x23e9ca(0x1a9),await a97_0x2095ca[_0x23e9ca(0x199)](_0x3265ab,JSON['stringify'](_0x4984b4,null,0x2)+'\x0a');}function detectPackageManager(){const _0x38812e=a97_0x4452;try{return execSync(_0x38812e(0x1a6),{'stdio':_0x38812e(0x197)}),_0x38812e(0x1c2);}catch{return'npm';}}async function formatCode(_0x16f7d9){const _0x5bb7bf=a97_0x4452;try{await execAsync(_0x5bb7bf(0x1b8),{'cwd':_0x16f7d9});}catch{}}async function configureProject(_0x4bccaa,_0x5c1256,_0x52bda4){const _0x1281f6=a97_0x4452,_0x1fa448=a97_0x14f5cf[_0x1281f6(0x1cc)](process[_0x1281f6(0x1a1)](),_0x4bccaa),_0x405585=a97_0x14f5cf['join'](_0x1fa448,NEW_CONFIG_NAME),_0x479382=readConfig(),_0x2bccfd=typeof _0x479382['env']==='string'?_0x479382['env']:undefined,{app:_0x35e0e0,appcode:_0x4242fa,..._0x249780}=_0x479382,_0x21e6ef={..._0x249780,'appcode':_0x5c1256||'','env':_0x52bda4||_0x2bccfd||_0x1281f6(0x1a7),'createdAt':new Date()[_0x1281f6(0x1a4)](),'version':getCliVersion()};writeConfigFile(_0x405585,_0x21e6ef);}async function pullApiConfig(_0x359b66,_0x4bfc0d,_0x3b558e,_0x55b9d6){const _0x5e9d51=a97_0x4452,_0x2a44f6=process[_0x5e9d51(0x1a1)]();try{process['chdir'](_0x359b66);const _0x1b29ce=_0x3b558e||_0x5e9d51(0x1a7);initEnv(_0x1b29ce),console['log'](_0x5e9d51(0x1a3));const {configArray:_0x143240}=await fetchModelList(_0x4bfc0d,_0x55b9d6||''),_0x301494=await generateApiFile(_0x143240,'',_0x4bfc0d,!![],_0x1b29ce,_0x5e9d51(0x1ac));console[_0x5e9d51(0x19e)](_0x5e9d51(0x1c3)+_0x143240[_0x5e9d51(0x1b1)]+_0x5e9d51(0x1a0)+_0x301494[_0x5e9d51(0x193)]+_0x5e9d51(0x1ca));}catch(_0x4dd2af){console[_0x5e9d51(0x19e)](_0x5e9d51(0x19f)+CLI_BIN_NAME+_0x5e9d51(0x1c1));}finally{process[_0x5e9d51(0x1aa)](_0x2a44f6);}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a98_0x4c3172=a98_0x3337;(function(_0x39a080,_0xfe5567){const _0x5b70ba=a98_0x3337,_0x304947=_0x39a080();while(!![]){try{const _0xe65624=-parseInt(_0x5b70ba(0x1da))/0x1+-parseInt(_0x5b70ba(0x1e9))/0x2+-parseInt(_0x5b70ba(0x1dc))/0x3*(-parseInt(_0x5b70ba(0x1d4))/0x4)+parseInt(_0x5b70ba(0x1db))/0x5*(parseInt(_0x5b70ba(0x1e7))/0x6)+parseInt(_0x5b70ba(0x1e8))/0x7*(parseInt(_0x5b70ba(0x1e2))/0x8)+-parseInt(_0x5b70ba(0x1e5))/0x9*(-parseInt(_0x5b70ba(0x1ea))/0xa)+parseInt(_0x5b70ba(0x1d9))/0xb*(-parseInt(_0x5b70ba(0x1e6))/0xc);if(_0xe65624===_0xfe5567)break;else _0x304947['push'](_0x304947['shift']());}catch(_0x15d4c1){_0x304947['push'](_0x304947['shift']());}}}(a98_0x2fe3,0xc152e));import a98_0x2a4429 from'node:path';import{fileURLToPath}from'node:url';import{copyDirectory}from'../utils/copy-directory.js';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';const __dirname=a98_0x2a4429[a98_0x4c3172(0x1e4)](fileURLToPath(import.meta.url)),templateDir=a98_0x2a4429[a98_0x4c3172(0x1e1)](__dirname,a98_0x4c3172(0x1e3));export async function copyProjectTemplate(_0x542b9d){const _0x23fa79=a98_0x4c3172,_0x58f831=Date[_0x23fa79(0x1de)](),_0xf6f65e=a98_0x2a4429[_0x23fa79(0x1e1)](process[_0x23fa79(0x1df)](),_0x542b9d);try{logger[_0x23fa79(0x1e0)](_0x23fa79(0x1dd),_0x23fa79(0x1d7),{'projectCode':_0x542b9d,'templateDir':templateDir}),await copyDirectory(templateDir,_0xf6f65e);const _0x1dc8de=Date[_0x23fa79(0x1de)]()-_0x58f831;logger[_0x23fa79(0x1eb)](_0x23fa79(0x1dd),_0x23fa79(0x1d5),_0x1dc8de,{'projectCode':_0x542b9d});}catch(_0xb4044a){const _0x109c2d=Date[_0x23fa79(0x1de)]()-_0x58f831;logger[_0x23fa79(0x1d6)](_0x23fa79(0x1dd),'项目模板复制失败',{'projectCode':_0x542b9d,'error':_0xb4044a instanceof Error?_0xb4044a[_0x23fa79(0x1d8)]:String(_0xb4044a),'duration':_0x109c2d});throw _0xb4044a;}return formatElapsed(_0x58f831);}function a98_0x3337(_0x50d160,_0x113d7a){_0x50d160=_0x50d160-0x1d4;const _0x2fe3c1=a98_0x2fe3();let _0x333745=_0x2fe3c1[_0x50d160];return _0x333745;}function a98_0x2fe3(){const _0x14278d=['272738xtUvXH','7536410itrfuG','success','77460ixvMiv','项目模板复制完成','error','开始复制项目模板','message','11vlSheX','1321340rUTmPb','65xRsbrU','123tgtYrH','copy','now','cwd','info','resolve','6581304SaBYlu','../../templates/projects/sub-app-react-demo','dirname','9AwYUkm','10320972JqTVXV','341250HKrsFB','7JgAamG'];a98_0x2fe3=function(){return _0x14278d;};return a98_0x2fe3();}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x37407d,_0x37658b){const _0x59ed0e=a99_0x1425,_0x2eaa0e=_0x37407d();while(!![]){try{const _0x2cb0a6=parseInt(_0x59ed0e(0xe6))/0x1+-parseInt(_0x59ed0e(0xeb))/0x2*(-parseInt(_0x59ed0e(0xe5))/0x3)+parseInt(_0x59ed0e(0xda))/0x4*(-parseInt(_0x59ed0e(0xea))/0x5)+-parseInt(_0x59ed0e(0xde))/0x6*(parseInt(_0x59ed0e(0xe0))/0x7)+-parseInt(_0x59ed0e(0xef))/0x8*(-parseInt(_0x59ed0e(0xe3))/0x9)+-parseInt(_0x59ed0e(0xe1))/0xa+parseInt(_0x59ed0e(0xdd))/0xb;if(_0x2cb0a6===_0x37658b)break;else _0x2eaa0e['push'](_0x2eaa0e['shift']());}catch(_0x255c3d){_0x2eaa0e['push'](_0x2eaa0e['shift']());}}}(a99_0x2a52,0x6bc7a));import a99_0x158bb9 from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';function a99_0x2a52(){const _0x190839=['info','--write','245448CMNjJs','代码格式化完成','npx','2520428KkHQyT','resolve','format','484660rfQtvh','30viUsjj','cwd','790937FXFHgn','7609370opOnjV','success','243oBiRTk','prettier','190122EQWoup','701156GpNNdk','now','message','开始格式化代码','5yoFsoW','26oVvsFK','代码格式化失败'];a99_0x2a52=function(){return _0x190839;};return a99_0x2a52();}function a99_0x1425(_0x539359,_0x424a4f){_0x539359=_0x539359-0xda;const _0x2a5245=a99_0x2a52();let _0x14250b=_0x2a5245[_0x539359];return _0x14250b;}import{logger}from'../utils/logger.js';import{resolveNpmBin}from'../utils/platform.js';export async function formatProjectCode(_0x3c9cd0){const _0x2bd1b2=a99_0x1425,_0x45eacb=Date[_0x2bd1b2(0xe7)](),_0xf7e957=a99_0x158bb9[_0x2bd1b2(0xdb)](process[_0x2bd1b2(0xdf)](),_0x3c9cd0);try{logger[_0x2bd1b2(0xed)](_0x2bd1b2(0xdc),_0x2bd1b2(0xe9),{'projectCode':_0x3c9cd0}),await execa(resolveNpmBin(_0x2bd1b2(0xf1)),[_0x2bd1b2(0xe4),_0x2bd1b2(0xee),'.'],{'cwd':_0xf7e957});const _0x7cf527=Date[_0x2bd1b2(0xe7)]()-_0x45eacb;logger[_0x2bd1b2(0xe2)](_0x2bd1b2(0xdc),_0x2bd1b2(0xf0),_0x7cf527,{'projectCode':_0x3c9cd0});}catch(_0x15cbf0){const _0x3acf64=Date['now']()-_0x45eacb;logger['error'](_0x2bd1b2(0xdc),_0x2bd1b2(0xec),{'projectCode':_0x3c9cd0,'error':_0x15cbf0 instanceof Error?_0x15cbf0[_0x2bd1b2(0xe8)]:String(_0x15cbf0),'duration':_0x3acf64});throw _0x15cbf0;}return formatElapsed(_0x45eacb);}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x4aa595,_0x415757){const _0x450cea=a100_0x5513,_0x16f518=_0x4aa595();while(!![]){try{const _0x1db04f=parseInt(_0x450cea(0xd3))/0x1*(parseInt(_0x450cea(0xd8))/0x2)+parseInt(_0x450cea(0xca))/0x3+-parseInt(_0x450cea(0xd5))/0x4+parseInt(_0x450cea(0xdc))/0x5+parseInt(_0x450cea(0xcb))/0x6+parseInt(_0x450cea(0xdd))/0x7*(parseInt(_0x450cea(0xc9))/0x8)+-parseInt(_0x450cea(0xd2))/0x9;if(_0x1db04f===_0x415757)break;else _0x16f518['push'](_0x16f518['shift']());}catch(_0xe1f2c5){_0x16f518['push'](_0x16f518['shift']());}}}(a100_0x25d4,0xba15e));import a100_0x509b82 from'node:path';import{execa}from'execa';import{formatElapsed}from'./format-elapsed.js';import{logger}from'../utils/logger.js';function a100_0x5513(_0x209483,_0xb685ee){_0x209483=_0x209483-0xc9;const _0x25d438=a100_0x25d4();let _0x551359=_0x25d438[_0x209483];return _0x551359;}import{resolveNpmBin}from'../utils/platform.js';function a100_0x25d4(){const _0x5a719=['16357770GnhSTv','172sWfTAR','install','5412232cUHagF','error','success','10148IMiVWB','https://registry.npmmirror.com','resolve','依赖安装失败','4578230PMfVho','1044071kEKvpD','72ZyDFbB','1311606amvjXX','2189046TSvUyB','开始安装依赖','info','now','npm','--registry','依赖安装完成'];a100_0x25d4=function(){return _0x5a719;};return a100_0x25d4();}export async function installDependencies(_0x544544){const _0x4f6317=a100_0x5513,_0x42935f=Date[_0x4f6317(0xce)](),_0x3f9453=a100_0x509b82[_0x4f6317(0xda)](process['cwd'](),_0x544544);try{logger[_0x4f6317(0xcd)](_0x4f6317(0xd4),_0x4f6317(0xcc),{'projectCode':_0x544544,'registry':'https://registry.npmmirror.com'}),await execa(resolveNpmBin(_0x4f6317(0xcf)),[_0x4f6317(0xd4),_0x4f6317(0xd0),_0x4f6317(0xd9)],{'cwd':_0x3f9453});const _0x5d2f19=Date[_0x4f6317(0xce)]()-_0x42935f;logger[_0x4f6317(0xd7)]('install',_0x4f6317(0xd1),_0x5d2f19,{'projectCode':_0x544544});}catch(_0x32707f){const _0x1dea70=Date['now']()-_0x42935f;logger[_0x4f6317(0xd6)](_0x4f6317(0xd4),_0x4f6317(0xdb),{'projectCode':_0x544544,'error':_0x32707f instanceof Error?_0x32707f['message']:String(_0x32707f),'duration':_0x1dea70});throw _0x32707f;}return formatElapsed(_0x42935f);}
|
package/lib/init/main.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(_0x540941,_0x9c40a){const _0x481906=a111_0x1477,_0x17d605=_0x540941();while(!![]){try{const _0x191b08=-parseInt(_0x481906(0x65))/0x1*(parseInt(_0x481906(0x71))/0x2)+parseInt(_0x481906(0x91))/0x3+parseInt(_0x481906(0x7b))/0x4+-parseInt(_0x481906(0x8a))/0x5+-parseInt(_0x481906(0x69))/0x6+parseInt(_0x481906(0x66))/0x7+parseInt(_0x481906(0x75))/0x8*(parseInt(_0x481906(0x68))/0x9);if(_0x191b08===_0x9c40a)break;else _0x17d605['push'](_0x17d605['shift']());}catch(_0xa47095){_0x17d605['push'](_0x17d605['shift']());}}}(a111_0x2d28,0x7d148));import{readFileSync,existsSync,renameSync}from'node:fs';import{resolve,dirname,basename}from'node:path';import{fileURLToPath}from'node:url';import a111_0x157833 from'chalk';import{input,confirm}from'@inquirer/prompts';import{CLI_BIN_NAME}from'../constant/cli.js';import{logger}from'../utils/logger.js';import{readRawConfig,getProjectConfigPath,writeConfigFile,NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES}from'../context.js';function a111_0x1477(_0x37b9fe,_0x2f648b){_0x37b9fe=_0x37b9fe-0x64;const _0x2d28c4=a111_0x2d28();let _0x14770d=_0x2d28c4[_0x37b9fe];return _0x14770d;}import{validateAppcode}from'../commands/common/validate.js';export async function initConfig(_0x409306){const _0x533d3d=a111_0x1477,{appcode:_0x27aa88,env:_0x251114,autoYes:_0x4b7c5e}=_0x409306,_0x31e627=process[_0x533d3d(0x74)]();if(getProjectConfigPath())throw new Error('.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.\x20Nothing\x20to\x20do.');let _0x4d4c0a;for(const _0x267c4b of LEGACY_CONFIG_NAMES){const _0x2d7678=resolve(_0x31e627,_0x267c4b);if(existsSync(_0x2d7678)){_0x4d4c0a=_0x2d7678;break;}}if(_0x4d4c0a){let _0x2f9330={};try{_0x2f9330=JSON['parse'](readFileSync(_0x4d4c0a,_0x533d3d(0x7c)));}catch{}const _0x4344b2=basename(_0x4d4c0a),_0x2cc0f6=_0x2f9330?.['appcode']||_0x2f9330?.[_0x533d3d(0x7d)];let _0x51116b=_0x4b7c5e;!_0x4b7c5e&&(console[_0x533d3d(0x6c)](a111_0x157833[_0x533d3d(0x8d)](_0x533d3d(0x8f)+a111_0x157833[_0x533d3d(0x81)](_0x4344b2))),_0x2cc0f6&&console['log'](a111_0x157833['cyan'](_0x533d3d(0x70)+_0x2cc0f6)),_0x51116b=await confirm({'message':_0x533d3d(0x87)+a111_0x157833[_0x533d3d(0x81)](_0x533d3d(0x8b))+_0x533d3d(0x86),'default':!![]}));if(!_0x51116b){console[_0x533d3d(0x6c)](_0x533d3d(0x77)+CLI_BIN_NAME+'\x20project\x20init`\x20to\x20start\x20fresh.');return;}const _0x430e41=resolve(_0x31e627,NEW_CONFIG_NAME),_0x56089d=getCliVersionFromPkg(),_0x42b433=readRawConfig(),_0x1eac2b={..._0x42b433,..._0x2f9330,'version':_0x56089d,'migratedAt':new Date()[_0x533d3d(0x76)](),'migratedFrom':_0x4d4c0a};if(!_0x1eac2b[_0x533d3d(0x93)]&&!_0x1eac2b[_0x533d3d(0x7d)]){if(!_0x27aa88){const _0xfdbfc1=await askAppcode();_0x1eac2b[_0x533d3d(0x93)]=_0xfdbfc1;}else _0x1eac2b[_0x533d3d(0x93)]=_0x27aa88;}if(_0x1eac2b[_0x533d3d(0x6d)]&&typeof _0x1eac2b[_0x533d3d(0x6d)]!==_0x533d3d(0x83))delete _0x1eac2b[_0x533d3d(0x6d)];else!_0x1eac2b[_0x533d3d(0x6d)]&&(_0x1eac2b['env']=_0x42b433[_0x533d3d(0x6d)]||'production');writeConfigFile(_0x430e41,_0x1eac2b);const _0x382704=_0x4d4c0a+_0x533d3d(0x72);renameSync(_0x4d4c0a,_0x382704),logger['setLogPath'](_0x31e627),logger[_0x533d3d(0x7a)](_0x533d3d(0x88),_0x533d3d(0x6b),{'from':_0x4d4c0a,'to':_0x430e41,'appcode':_0x1eac2b[_0x533d3d(0x93)]||_0x1eac2b['app'],'env':_0x1eac2b[_0x533d3d(0x6d)]}),console['log'](a111_0x157833['green'](_0x533d3d(0x6a)+_0x4344b2+_0x533d3d(0x82))),console[_0x533d3d(0x6c)](a111_0x157833[_0x533d3d(0x8c)]('\x20\x20AppCode:\x20'+(_0x1eac2b['appcode']||_0x1eac2b[_0x533d3d(0x7d)]))),console['log'](a111_0x157833[_0x533d3d(0x89)](_0x533d3d(0x80)+_0x4344b2+_0x533d3d(0x72)));return;}const _0x498377=_0x27aa88||await askAppcode(),_0x341f1b=resolve(_0x31e627,NEW_CONFIG_NAME),_0x30244e=getCliVersionFromPkg(),_0x4bf111=readRawConfig(),_0x37c949=typeof _0x4bf111['env']===_0x533d3d(0x83)?_0x4bf111['env']:undefined,_0x3c9f45={'version':_0x30244e,'createdAt':new Date()[_0x533d3d(0x76)](),'appcode':_0x498377,'env':_0x251114||_0x37c949||_0x533d3d(0x8e)};writeConfigFile(_0x341f1b,_0x3c9f45),logger['setLogPath'](_0x31e627),logger[_0x533d3d(0x7a)](_0x533d3d(0x88),_0x533d3d(0x79),{'appcode':_0x3c9f45[_0x533d3d(0x93)],'env':_0x3c9f45[_0x533d3d(0x6d)],'version':_0x3c9f45['version'],'configPath':_0x341f1b}),console['log'](a111_0x157833[_0x533d3d(0x78)](_0x533d3d(0x7e))),console[_0x533d3d(0x6c)](a111_0x157833[_0x533d3d(0x8c)](_0x533d3d(0x90)+_0x498377)),console[_0x533d3d(0x6c)](_0x533d3d(0x7f)+CLI_BIN_NAME+_0x533d3d(0x6f)+CLI_BIN_NAME+_0x533d3d(0x6e));}function askAppcode(){const _0x9da946=a111_0x1477;return input({'message':_0x9da946(0x85),'validate':_0x4a0531=>{const _0x15258a=_0x9da946;if(!_0x4a0531['trim']())return _0x15258a(0x73);const {valid:_0x462b60,message:_0x69d522}=validateAppcode(_0x4a0531['trim']());return _0x462b60||_0x69d522||_0x15258a(0x67);}});}function a111_0x2d28(){const _0x73caa1=['App\x20Code\x20cannot\x20be\x20empty','cwd','1384EqsrLi','toLocaleString','Migration\x20cancelled.\x20Run\x20`','green','初始化项目配置文件成功','info','1885512fxIFgQ','utf8','app','✓\x20Successfully\x20initialized\x20.rabetbase.json\x20in\x20current\x20directory','\x20\x20You\x20can\x20now\x20use\x20commands\x20like\x20\x27','\x20\x20Old\x20file\x20backed\x20up\x20as\x20','bold','\x20→\x20.rabetbase.json','string','1.0.0','Please\x20enter\x20App\x20Code:','?\x20(Old\x20file\x20→\x20*.bak)','Upgrade\x20it\x20to\x20','init','gray','827035ijSiSw','.rabetbase.json','cyan','yellow','production','⚠\x20Found\x20legacy\x20configuration\x20file:\x20','\x20\x20AppCode:\x20','2908806BPNwzB','version','appcode','parse','1HhvPzk','4132527xPViTy','Invalid\x20App\x20Code','8649uEePPl','5320932jhmlbT','✓\x20Upgraded\x20','从旧配置文件升级成功','log','env','\x20api\x20pull\x27','\x20api\x20doc\x27\x20and\x20\x27','\x20\x20appcode:\x20','1266074bKuMye','.bak'];a111_0x2d28=function(){return _0x73caa1;};return a111_0x2d28();}function getCliVersionFromPkg(){const _0xa84ddf=a111_0x1477;try{const _0x485c7d=fileURLToPath(import.meta.url),_0x586950=resolve(dirname(_0x485c7d),'../..'),_0x1d60ae=JSON[_0xa84ddf(0x64)](readFileSync(resolve(_0x586950,'package.json'),_0xa84ddf(0x7c)));return _0x1d60ae[_0xa84ddf(0x92)]||_0xa84ddf(0x84);}catch{return'1.0.0';}}
|