@lovrabet/rabetbase-cli 2.0.10 → 2.0.11
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 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.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/constant/paths.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/build-all-flags.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/schema-export.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/apply-jq-filter.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/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36d548,_0x215c5b){const _0x457264=a129_0x4531,_0x1ac43d=_0x36d548();while(!![]){try{const _0xd6bf94=-parseInt(_0x457264(0x133))/0x1+-parseInt(_0x457264(0x136))/0x2+parseInt(_0x457264(0x130))/0x3+parseInt(_0x457264(0x137))/0x4+-parseInt(_0x457264(0x135))/0x5*(parseInt(_0x457264(0x131))/0x6)+-parseInt(_0x457264(0x132))/0x7*(-parseInt(_0x457264(0x12f))/0x8)+parseInt(_0x457264(0x134))/0x9;if(_0xd6bf94===_0x215c5b)break;else _0x1ac43d['push'](_0x1ac43d['shift']());}catch(_0x130998){_0x1ac43d['push'](_0x1ac43d['shift']());}}}(a129_0x55b4,0x319de));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a129_0x4531(_0x468e12,_0x4f6afd){_0x468e12=_0x468e12-0x12f;const _0x55b4a0=a129_0x55b4();let _0x4531b5=_0x55b4a0[_0x468e12];return _0x4531b5;}export async function copyDir(_0x20f6b7,_0x260cce){const _0x2f96ad=statSync(_0x20f6b7);if(_0x2f96ad['isDirectory']()){!existsSync(_0x260cce)&&mkdirSync(_0x260cce,{'recursive':!![]});const _0x1a9d1d=readdirSync(_0x20f6b7);for(const _0x3b2d7e of _0x1a9d1d){await copyDir(join(_0x20f6b7,_0x3b2d7e),join(_0x260cce,_0x3b2d7e));}}else copyFileSync(_0x20f6b7,_0x260cce);}function a129_0x55b4(){const _0x2debfa=['1708416WEwIsk','15qmphKT','535788XQYbgG','1596292MymIeV','5944BrYyIF','167955dAozXf','31266CFLXLj','1484myQVSe','315641OipKeL'];a129_0x55b4=function(){return _0x2debfa;};return a129_0x55b4();}export function ensureDir(_0x4ddf77){!existsSync(_0x4ddf77)&&mkdirSync(_0x4ddf77,{'recursive':!![]});}export function pathExists(_0x5ab459){return existsSync(_0x5ab459);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a130_0x33f606=a130_0x5c00;(function(_0x490898,_0xd5dec0){const _0x4cbfbd=a130_0x5c00,_0x57a43e=_0x490898();while(!![]){try{const _0x4fe23e=parseInt(_0x4cbfbd(0x110))/0x1+parseInt(_0x4cbfbd(0xf7))/0x2*(parseInt(_0x4cbfbd(0x10b))/0x3)+parseInt(_0x4cbfbd(0xfc))/0x4*(-parseInt(_0x4cbfbd(0x105))/0x5)+parseInt(_0x4cbfbd(0x10f))/0x6*(-parseInt(_0x4cbfbd(0x103))/0x7)+parseInt(_0x4cbfbd(0x111))/0x8*(parseInt(_0x4cbfbd(0x112))/0x9)+parseInt(_0x4cbfbd(0x10c))/0xa+-parseInt(_0x4cbfbd(0xfa))/0xb;if(_0x4fe23e===_0xd5dec0)break;else _0x57a43e['push'](_0x57a43e['shift']());}catch(_0xbf48be){_0x57a43e['push'](_0x57a43e['shift']());}}}(a130_0x3daf,0xd43a5));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function a130_0x3daf(){const _0x4c4592=['206200zYZziC','333AbHWYs','replace','map','application/json','guides','.lovrabet','content','CDN\x20请求失败:\x20','.md','utf-8','620038fBxvAN','CDN\x20返回数据格式错误','json','8542424tttEKE','length','4mxFwSa','/skills/guides.json','skillTemplate','title','status','join','push','21wcQupT','CDN\x20数据中缺少\x20skillTemplate','7372965isBHaG','extendContent','entries','cache','lastUpdated','\x0a\x0a>更新时间:','3okmAke','10171290jOfupN','trimEnd','.lovrabet/skill/guides','219894OqhGvO','949586ejQvwB'];a130_0x3daf=function(){return _0x4c4592;};return a130_0x3daf();}function getGuidesCdnUrl(){const _0x20977e=a130_0x5c00,_0x2075eb=getTemplateBaseUrl();return _0x2075eb+_0x20977e(0xfd);}const CACHE_DIR=join(homedir(),a130_0x33f606(0xf2),a130_0x33f606(0x108));export async function fetchGuidesFromCDN(){const _0x268371=a130_0x33f606,_0x12418c=getGuidesCdnUrl(),_0x657d6a=await fetch(_0x12418c,{'headers':{'Accept':_0x268371(0xf0)}});if(!_0x657d6a['ok'])throw new Error(_0x268371(0xf4)+_0x657d6a[_0x268371(0x100)]+'\x20'+_0x657d6a['statusText']);const _0x28bdb3=await _0x657d6a[_0x268371(0xf9)]();if(!_0x28bdb3[_0x268371(0xf1)]||typeof _0x28bdb3['guides']!=='object')throw new Error(_0x268371(0xf8));return _0x28bdb3;}export function writeGuidesToProject(_0x300033,_0x12feca,_0x4898e8=a130_0x33f606(0x10e),_0x49c22c){const _0x37ac37=a130_0x33f606,_0x4090ba=join(_0x12feca,_0x4898e8);mkdirSync(_0x4090ba,{'recursive':!![]});for(const [_0x31b709,_0x2cb0e4]of Object[_0x37ac37(0x107)](_0x300033[_0x37ac37(0xf1)])){let _0x1899e3=_0x2cb0e4[_0x37ac37(0xf3)];_0x2cb0e4[_0x37ac37(0x109)]&&(_0x1899e3=appendUpdateTime(_0x1899e3,_0x2cb0e4[_0x37ac37(0x109)])),writeFileSync(join(_0x4090ba,_0x31b709+_0x37ac37(0xf5)),_0x1899e3,_0x37ac37(0xf6));}}function a130_0x5c00(_0x832a6d,_0x1c2ef9){_0x832a6d=_0x832a6d-0xf0;const _0x3daf0b=a130_0x3daf();let _0x5c00f6=_0x3daf0b[_0x832a6d];return _0x5c00f6;}export function appendUpdateTime(_0x5e17b3,_0x1cb3f2){const _0x3e2aba=a130_0x33f606;return _0x5e17b3=_0x5e17b3['replace'](/\n*>更新时间:.*$/m,''),_0x5e17b3['trimEnd']()+(_0x3e2aba(0x10a)+_0x1cb3f2);}export function getSkillTemplate(_0x4c688e){const _0x1e7e10=a130_0x33f606;return _0x4c688e[_0x1e7e10(0xfe)]?.[_0x1e7e10(0xf3)]||'';}export function appendExtendContents(_0x21fcfc,_0x21bb13,_0xfb55dc){const _0x5d0421=a130_0x33f606,_0x2ec679=[];for(const [,_0x525dec]of Object['entries'](_0x21bb13[_0x5d0421(0xf1)])){_0x525dec[_0x5d0421(0x106)]&&_0x2ec679[_0x5d0421(0x102)](_0x525dec['extendContent'][_0x5d0421(0x10d)]());}if(_0x2ec679[_0x5d0421(0xfb)]===0x0)return _0x21fcfc;return _0x21fcfc['trimEnd']()+'\x0a\x0a'+_0x2ec679[_0x5d0421(0x101)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x49c68d,_0x3a1be9,_0x200c76){const _0x1d5185=a130_0x33f606,_0x2b923f=getSkillTemplate(_0x49c68d);if(!_0x2b923f)throw new Error(_0x1d5185(0x104));const _0x3331b8=dirname(_0x3a1be9);mkdirSync(_0x3331b8,{'recursive':!![]});let _0x48f34a=_0x2b923f[_0x1d5185(0x113)](/\{\{IDE_NAME\}\}/g,_0x200c76);_0x48f34a=appendExtendContents(_0x48f34a,_0x49c68d),_0x49c68d[_0x1d5185(0xfe)][_0x1d5185(0x109)]&&(_0x48f34a=appendUpdateTime(_0x48f34a,_0x49c68d['skillTemplate'][_0x1d5185(0x109)])),writeFileSync(_0x3a1be9,_0x48f34a,_0x1d5185(0xf6));}export async function installGuides(_0x2d3b68){const _0x10d4b6=a130_0x33f606,_0x538688=await fetchGuidesFromCDN();return writeGuidesToProject(_0x538688,_0x2d3b68),Object['keys'](_0x538688['guides'])[_0x10d4b6(0xfb)];}export function getGuidesSummary(_0x2fc53b){const _0x27bf05=a130_0x33f606;return Object[_0x27bf05(0x107)](_0x2fc53b[_0x27bf05(0xf1)])[_0x27bf05(0x114)](([_0x4a1aa0,_0x658a04])=>({'key':_0x4a1aa0,'title':_0x658a04[_0x27bf05(0xff)],'path':_0x658a04['path']}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a131_0x4412(){const _0xfd550c=['ms\x20后进行第\x20','fetch','application/json','840wJtoiF','8oCLliL','abort','\x20次重试...','2840544MnsLZG','Request\x20failed','headers','77135gleEln','json','statusText','529670zrlcNH','includes','6209nHEfvJ','status','ECONNRESET','*\x20请求失败,','message','120846LJOxZI','1461825Hwfbqc','text','5562963ePvRbJ','name','12pMMDKU','TypeError','get','3642vzVCie'];a131_0x4412=function(){return _0xfd550c;};return a131_0x4412();}(function(_0x27d815,_0x2131e2){const _0x3778e5=a131_0x10bf,_0x5a9383=_0x27d815();while(!![]){try{const _0xf1a2e5=parseInt(_0x3778e5(0x81))/0x1*(-parseInt(_0x3778e5(0x90))/0x2)+parseInt(_0x3778e5(0x8c))/0x3+-parseInt(_0x3778e5(0x98))/0x4*(-parseInt(_0x3778e5(0x84))/0x5)+-parseInt(_0x3778e5(0x93))/0x6*(parseInt(_0x3778e5(0x86))/0x7)+parseInt(_0x3778e5(0x9b))/0x8+-parseInt(_0x3778e5(0x8e))/0x9+parseInt(_0x3778e5(0x97))/0xa*(parseInt(_0x3778e5(0x8b))/0xb);if(_0xf1a2e5===_0x2131e2)break;else _0x5a9383['push'](_0x5a9383['shift']());}catch(_0x40d26e){_0x5a9383['push'](_0x5a9383['shift']());}}}(a131_0x4412,0x5754d));export async function httpRequest(_0x4f1df7,_0x4283d7={}){const _0x5018fe=a131_0x10bf,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x4283d7;let _0x10b010=null;for(let _0x17c935=0x0;_0x17c935<=retries;_0x17c935++){try{const _0xb9f20e=new AbortController(),_0xba7c2b=setTimeout(()=>_0xb9f20e[_0x5018fe(0x99)](),timeout),_0x315daa=await fetch(_0x4f1df7,{'headers':headers,'signal':_0xb9f20e['signal']});clearTimeout(_0xba7c2b);let _0x4f5644;const _0x5b06db=_0x315daa[_0x5018fe(0x80)][_0x5018fe(0x92)]('content-type');return _0x5b06db?.[_0x5018fe(0x85)](_0x5018fe(0x96))?_0x4f5644=await _0x315daa[_0x5018fe(0x82)]():_0x4f5644=await _0x315daa[_0x5018fe(0x8d)](),{'ok':_0x315daa['ok'],'status':_0x315daa[_0x5018fe(0x87)],'statusText':_0x315daa[_0x5018fe(0x83)],'data':_0x4f5644,'headers':_0x315daa[_0x5018fe(0x80)],'url':_0x315daa['url'],'text':()=>_0x315daa[_0x5018fe(0x8d)]()};}catch(_0x21baa8){_0x10b010=_0x21baa8 instanceof Error?_0x21baa8:new Error(String(_0x21baa8));if(_0x17c935===retries)break;if(shouldRetry(_0x21baa8)){console['log'](_0x5018fe(0x89)+retryDelay+_0x5018fe(0x94)+(_0x17c935+0x1)+_0x5018fe(0x9a)),await sleep(retryDelay);continue;}else break;}}throw _0x10b010||new Error(_0x5018fe(0x7f));}function shouldRetry(_0x3e0104){const _0x1cc80f=a131_0x10bf;if(_0x3e0104 instanceof Error){if(_0x3e0104['name']==='AbortError')return![];if(_0x3e0104[_0x1cc80f(0x8f)]===_0x1cc80f(0x91)&&_0x3e0104[_0x1cc80f(0x8a)][_0x1cc80f(0x85)](_0x1cc80f(0x95)))return!![];if(_0x3e0104[_0x1cc80f(0x8a)][_0x1cc80f(0x85)](_0x1cc80f(0x88)))return!![];if(_0x3e0104[_0x1cc80f(0x8a)][_0x1cc80f(0x85)]('ENOTFOUND'))return![];}return![];}function a131_0x10bf(_0x3184fc,_0x1c8a94){_0x3184fc=_0x3184fc-0x7f;const _0x4412da=a131_0x4412();let _0x10bf13=_0x4412da[_0x3184fc];return _0x10bf13;}function sleep(_0x2fcf4d){return new Promise(_0x1b0c50=>setTimeout(_0x1b0c50,_0x2fcf4d));}export function validateUrl(_0x5a800c){try{return new URL(_0x5a800c),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xd67785,_0x102776){const _0x13e082=a132_0x57fa,_0x5a177e=_0xd67785();while(!![]){try{const _0x8f9968=-parseInt(_0x13e082(0x1df))/0x1+parseInt(_0x13e082(0x1db))/0x2*(parseInt(_0x13e082(0x1e3))/0x3)+parseInt(_0x13e082(0x1e7))/0x4*(-parseInt(_0x13e082(0x1dc))/0x5)+parseInt(_0x13e082(0x1dd))/0x6*(parseInt(_0x13e082(0x1e0))/0x7)+-parseInt(_0x13e082(0x1de))/0x8*(parseInt(_0x13e082(0x1e9))/0x9)+parseInt(_0x13e082(0x1e8))/0xa+parseInt(_0x13e082(0x1e1))/0xb;if(_0x8f9968===_0x102776)break;else _0x5a177e['push'](_0x5a177e['shift']());}catch(_0x88623b){_0x5a177e['push'](_0x5a177e['shift']());}}}(a132_0x3bf4,0xb1390));function env(_0x4b6697){return process.env[`RABETBASE_${_0x4b6697}`]||process.env[`LOVRABET_${_0x4b6697}`]||undefined;}function a132_0x3bf4(){const _0x3d37f2=['747728lgQNlz','235108yxIdJz','63PgTXux','3182674wxBLEW','stdout','19866fcHzlS','true','isTTY','setRawMode','9136YwStTr','9041870AkkKAm','117yhIHSf','stdin','292lsVuGS','1340NszaqF','418566yNrmYh'];a132_0x3bf4=function(){return _0x3d37f2;};return a132_0x3bf4();}function a132_0x57fa(_0xf6e715,_0x21550c){_0xf6e715=_0xf6e715-0x1da;const _0x3bf47f=a132_0x3bf4();let _0x57fad8=_0x3bf47f[_0xf6e715];return _0x57fad8;}export function isNonInteractive(_0x5984da){const _0x3a93da=a132_0x57fa;return!!(_0x5984da['nonInteractive']||_0x5984da['ci']||env('CI')===_0x3a93da(0x1e4)||process.env.CI===_0x3a93da(0x1e4)||!process[_0x3a93da(0x1e2)][_0x3a93da(0x1e5)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x531ecb=a132_0x57fa;if(!process[_0x531ecb(0x1da)][_0x531ecb(0x1e5)])return![];try{const _0x23faa6=process[_0x531ecb(0x1da)]['isRaw'];return process['stdin'][_0x531ecb(0x1e6)](!![]),process[_0x531ecb(0x1da)][_0x531ecb(0x1e6)](_0x23faa6??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a133_0x158dc6=a133_0x36d9;(function(_0x1224e2,_0x1d9614){const _0x80ed2=a133_0x36d9,_0x28574f=_0x1224e2();while(!![]){try{const _0x4e2aa0=parseInt(_0x80ed2(0x1d7))/0x1*(parseInt(_0x80ed2(0x1c5))/0x2)+-parseInt(_0x80ed2(0x1dd))/0x3+parseInt(_0x80ed2(0x1b3))/0x4+parseInt(_0x80ed2(0x1e3))/0x5*(-parseInt(_0x80ed2(0x1e1))/0x6)+-parseInt(_0x80ed2(0x1b4))/0x7+-parseInt(_0x80ed2(0x1c2))/0x8*(-parseInt(_0x80ed2(0x1b8))/0x9)+parseInt(_0x80ed2(0x1cd))/0xa*(parseInt(_0x80ed2(0x1c4))/0xb);if(_0x4e2aa0===_0x1d9614)break;else _0x28574f['push'](_0x28574f['shift']());}catch(_0x54033e){_0x28574f['push'](_0x28574f['shift']());}}}(a133_0x5051,0xdbba4));import a133_0x1e97b5 from'winston';function a133_0x36d9(_0x2b7f0c,_0x3df114){_0x2b7f0c=_0x2b7f0c-0x1ae;const _0x505183=a133_0x5051();let _0x36d920=_0x505183[_0x2b7f0c];return _0x36d920;}import a133_0x5089dc from'node:fs';import a133_0x1db3bd from'node:path';function a133_0x5051(){const _0x109410=['logFilePath','10016420SfEQEq','mkdirSync','split','join','writeFileSync','format','toISOString','green','info','开始执行:\x20','1895whbLiC','details','blue','printf','stringify','rawCommand','3238353yhOYzw','readFileSync','red','initWinstonLogger','1434006IKPeOX','完成:\x20','5lBrsBD','parse','filter','logTask','message','setLogPath','log','getWinstonInstance','success','3172164zZnjSA','11909373TJWNxq','duration','clearLogs','yellow','81HjxRrc','map','timestamp','existsSync','readLogs','.lovrabet.log','utf8','warn','level','transports','674504pyeFEo','Failed\x20to\x20read\x20logs:','11wipLlb','1442HLwgBU','clear','now','winstonLogger','File','dirname','command'];a133_0x5051=function(){return _0x109410;};return a133_0x5051();}class Logger{[a133_0x158dc6(0x1c8)];['logFilePath'];['currentRawCommand']='';constructor(){const _0x5baf9a=a133_0x158dc6;this[_0x5baf9a(0x1cc)]='';}['setRawCommand'](_0x18247e){this['currentRawCommand']=_0x18247e;}[a133_0x158dc6(0x1e0)](){const _0x371ce7=a133_0x158dc6,_0x2b98d5=a133_0x1db3bd[_0x371ce7(0x1ca)](this[_0x371ce7(0x1cc)]);!a133_0x5089dc['existsSync'](_0x2b98d5)&&a133_0x5089dc[_0x371ce7(0x1ce)](_0x2b98d5,{'recursive':!![]});const _0x3a1ed2=a133_0x1e97b5['format']['combine'](a133_0x1e97b5[_0x371ce7(0x1d2)][_0x371ce7(0x1ba)](),a133_0x1e97b5[_0x371ce7(0x1d2)]['errors']({'stack':!![]}),a133_0x1e97b5['format'][_0x371ce7(0x1da)](_0x130e46=>{const _0x477ac5=_0x371ce7,_0x33e051={'timestamp':_0x130e46[_0x477ac5(0x1ba)]||new Date()[_0x477ac5(0x1d3)](),'level':_0x130e46[_0x477ac5(0x1c0)]||_0x477ac5(0x1d5),'command':_0x130e46[_0x477ac5(0x1cb)]||'unknown','rawCommand':_0x130e46[_0x477ac5(0x1dc)]||this['currentRawCommand']||undefined,'message':_0x130e46['message']||'','duration':_0x130e46[_0x477ac5(0x1b5)]||undefined,'details':_0x130e46[_0x477ac5(0x1d8)]||undefined};return JSON[_0x477ac5(0x1db)](_0x33e051);}));this[_0x371ce7(0x1c8)]=a133_0x1e97b5['createLogger']({'level':_0x371ce7(0x1d5),'format':_0x3a1ed2,'transports':[new a133_0x1e97b5[(_0x371ce7(0x1c1))][(_0x371ce7(0x1c9))]({'filename':this['logFilePath'],'level':_0x371ce7(0x1d5)})],'silent':![]}),a133_0x1e97b5['addColors']({'success':_0x371ce7(0x1d4),'error':_0x371ce7(0x1df),'warn':_0x371ce7(0x1b7),'info':_0x371ce7(0x1d9)});}[a133_0x158dc6(0x1af)](_0x5c3cc4){const _0x3438b0=a133_0x158dc6;this['logFilePath']=a133_0x1db3bd[_0x3438b0(0x1d0)](_0x5c3cc4,_0x3438b0(0x1bd)),this[_0x3438b0(0x1c8)]&&this[_0x3438b0(0x1c8)][_0x3438b0(0x1c6)](),this[_0x3438b0(0x1e0)]();}['info'](_0x5265e6,_0x255cce,_0x56a454){const _0x2c4cb3=a133_0x158dc6;if(!this[_0x2c4cb3(0x1cc)]||!this['winstonLogger'])return;this[_0x2c4cb3(0x1c8)]['info'](_0x255cce,{'command':_0x5265e6,'details':_0x56a454});}[a133_0x158dc6(0x1b2)](_0x3bdae2,_0x62f24e,_0x581ba3,_0x131420){const _0x232641=a133_0x158dc6;if(!this[_0x232641(0x1cc)]||!this[_0x232641(0x1c8)])return;this[_0x232641(0x1c8)][_0x232641(0x1b0)](_0x232641(0x1d5),_0x62f24e,{'level':'success','command':_0x3bdae2,'duration':_0x581ba3,'details':_0x131420});}['error'](_0x2e8ddd,_0x443fe2,_0x195870){const _0x5f55e3=a133_0x158dc6;if(!this[_0x5f55e3(0x1cc)]||!this[_0x5f55e3(0x1c8)])return;this[_0x5f55e3(0x1c8)]['error'](_0x443fe2,{'command':_0x2e8ddd,'details':_0x195870});}['warn'](_0x562e3a,_0x3a2633,_0x5b434e){const _0x6de04c=a133_0x158dc6;if(!this[_0x6de04c(0x1cc)]||!this[_0x6de04c(0x1c8)])return;this[_0x6de04c(0x1c8)][_0x6de04c(0x1bf)](_0x3a2633,{'command':_0x562e3a,'details':_0x5b434e});}async[a133_0x158dc6(0x1e6)](_0x3288f9,_0x5b38d0,_0x2110ee){const _0x20962b=a133_0x158dc6,_0x35ce03=Date[_0x20962b(0x1c7)]();this[_0x20962b(0x1d5)](_0x3288f9,_0x20962b(0x1d6)+_0x5b38d0);try{const _0x588878=await _0x2110ee(),_0x5ab686=Date[_0x20962b(0x1c7)]()-_0x35ce03;return this[_0x20962b(0x1b2)](_0x3288f9,_0x20962b(0x1e2)+_0x5b38d0,_0x5ab686),_0x588878;}catch(_0x220a00){const _0x1c64d7=Date[_0x20962b(0x1c7)]()-_0x35ce03;this['error'](_0x3288f9,'失败:\x20'+_0x5b38d0,{'error':_0x220a00 instanceof Error?_0x220a00[_0x20962b(0x1ae)]:String(_0x220a00),'duration':_0x1c64d7});throw _0x220a00;}}[a133_0x158dc6(0x1bc)](){const _0x6858a2=a133_0x158dc6;try{if(!a133_0x5089dc[_0x6858a2(0x1bb)](this['logFilePath']))return[];const _0x1fb4b5=a133_0x5089dc[_0x6858a2(0x1de)](this[_0x6858a2(0x1cc)],_0x6858a2(0x1be));return _0x1fb4b5[_0x6858a2(0x1cf)]('\x0a')[_0x6858a2(0x1e5)](_0x31b1b4=>_0x31b1b4['trim']())[_0x6858a2(0x1b9)](_0x4162bc=>JSON[_0x6858a2(0x1e4)](_0x4162bc));}catch(_0x414a8e){return console[_0x6858a2(0x1bf)](_0x6858a2(0x1c3),_0x414a8e),[];}}[a133_0x158dc6(0x1b6)](){const _0x162822=a133_0x158dc6;try{a133_0x5089dc[_0x162822(0x1bb)](this['logFilePath'])&&a133_0x5089dc[_0x162822(0x1d1)](this[_0x162822(0x1cc)],'','utf8');}catch(_0x125aba){console[_0x162822(0x1bf)]('Failed\x20to\x20clear\x20logs:',_0x125aba);}}[a133_0x158dc6(0x1b1)](){const _0x48799c=a133_0x158dc6;return this[_0x48799c(0x1c8)];}}export const logger=new Logger();
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a134_0x30333c=a134_0x1a1e;function a134_0x1ac4(){const _0x3c5fbc=['2168280Fqvanf','13164PzSmns','1286740JlsWTb','6694VDaTIY','1386DaVcIz','win32','468112uVCDco','platform','3729790JQnsse','72cfqSwA','597pjPDoo','.cmd','190161nUDsGD'];a134_0x1ac4=function(){return _0x3c5fbc;};return a134_0x1ac4();}(function(_0x1df61b,_0x2b902b){const _0x2ccbec=a134_0x1a1e,_0x63cbaa=_0x1df61b();while(!![]){try{const _0xbef98a=-parseInt(_0x2ccbec(0x1cb))/0x1+parseInt(_0x2ccbec(0x1c8))/0x2*(parseInt(_0x2ccbec(0x1cf))/0x3)+parseInt(_0x2ccbec(0x1d4))/0x4+-parseInt(_0x2ccbec(0x1d2))/0x5+-parseInt(_0x2ccbec(0x1d3))/0x6*(-parseInt(_0x2ccbec(0x1c9))/0x7)+-parseInt(_0x2ccbec(0x1ce))/0x8*(-parseInt(_0x2ccbec(0x1d1))/0x9)+-parseInt(_0x2ccbec(0x1cd))/0xa;if(_0xbef98a===_0x2b902b)break;else _0x63cbaa['push'](_0x63cbaa['shift']());}catch(_0x3753de){_0x63cbaa['push'](_0x63cbaa['shift']());}}}(a134_0x1ac4,0x5269c));function a134_0x1a1e(_0x11b059,_0x53d093){_0x11b059=_0x11b059-0x1c8;const _0x1ac4a9=a134_0x1ac4();let _0x1a1e7e=_0x1ac4a9[_0x11b059];return _0x1a1e7e;}export const isWindows=process[a134_0x30333c(0x1cc)]===a134_0x30333c(0x1ca);export function resolveNpmBin(_0x4b6aca){const _0x393540=a134_0x30333c;return isWindows?_0x4b6aca+_0x393540(0x1d0):_0x4b6aca;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a135_0x5c4fee=a135_0x1353;function a135_0x50c8(){const _0x520177=['application/json','2354816QjMpBD','8790010OZBkqg','status','75216nRuxqX','/rules/rules.json','agents.md','lastUpdated','19260zogtQz','2296336cOoqYE','1708KJSSZK','9bqMxMV','1795036tVLYDg','catch','content','../../templates/rules/lovrabet_rules.mdc.tpl','string','statusText','.cursor/rules','json','941151PWzery','15FdbGkb'];a135_0x50c8=function(){return _0x520177;};return a135_0x50c8();}(function(_0x2cd681,_0x465066){const _0xc5336f=a135_0x1353,_0x187c4e=_0x2cd681();while(!![]){try{const _0x67ca98=parseInt(_0xc5336f(0x1d4))/0x1+-parseInt(_0xc5336f(0x1df))/0x2+-parseInt(_0xc5336f(0x1da))/0x3+-parseInt(_0xc5336f(0x1e2))/0x4*(-parseInt(_0xc5336f(0x1d5))/0x5)+parseInt(_0xc5336f(0x1de))/0x6*(parseInt(_0xc5336f(0x1e0))/0x7)+-parseInt(_0xc5336f(0x1d7))/0x8+parseInt(_0xc5336f(0x1e1))/0x9*(-parseInt(_0xc5336f(0x1d8))/0xa);if(_0x67ca98===_0x465066)break;else _0x187c4e['push'](_0x187c4e['shift']());}catch(_0x110b41){_0x187c4e['push'](_0x187c4e['shift']());}}}(a135_0x50c8,0xb0c6b));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';import{getTemplateBaseUrl}from'../utils/config.js';function a135_0x1353(_0x5ee69a,_0x5958d0){_0x5ee69a=_0x5ee69a-0x1cd;const _0x50c868=a135_0x50c8();let _0x135355=_0x50c868[_0x5ee69a];return _0x135355;}import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x1f39e2=a135_0x1353,_0x473cf0=getTemplateBaseUrl();return _0x473cf0+_0x1f39e2(0x1db);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a135_0x5c4fee(0x1cf));export async function fetchRulesFromCDN(){const _0x12c1be=a135_0x5c4fee,_0x3fb971=getRulesCdnUrl(),_0x546525=await fetch(_0x3fb971,{'headers':{'Accept':_0x12c1be(0x1d6)}});if(!_0x546525['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x546525[_0x12c1be(0x1d9)]+'\x20'+_0x546525[_0x12c1be(0x1d1)]);const _0x25fc1a=await _0x546525[_0x12c1be(0x1d3)]();if(!_0x25fc1a['content']||typeof _0x25fc1a[_0x12c1be(0x1ce)]!==_0x12c1be(0x1d0))throw new Error('CDN\x20返回数据格式错误');return _0x25fc1a;}export async function getRulesContent(){try{const _0x39247b=await fetchRulesFromCDN();return _0x39247b['content'];}catch{return readLocalTemplate();}}export function readLocalTemplate(){if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,'utf-8');throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x27efec){const _0x43e770=a135_0x5c4fee,_0x524c5f=await fetchRulesFromCDN()[_0x43e770(0x1cd)](()=>null);let _0x57ea36;_0x524c5f?(_0x57ea36=_0x524c5f[_0x43e770(0x1ce)],_0x524c5f[_0x43e770(0x1dd)]&&(_0x57ea36=appendUpdateTime(_0x57ea36,_0x524c5f[_0x43e770(0x1dd)]))):_0x57ea36=readLocalTemplate();const _0x14297d=dirname(_0x27efec);!existsSync(_0x14297d)&&mkdirSync(_0x14297d,{'recursive':!![]}),writeFileSync(_0x27efec,_0x57ea36,'utf-8');}export async function copyRulesToCursor(_0x5262b9){const _0x1e20e7=a135_0x5c4fee,_0x56e354=join(_0x5262b9,_0x1e20e7(0x1d2)),_0x3b44d6=join(_0x56e354,'lovrabet_rules.mdc');if(existsSync(_0x3b44d6))return![];return await writeRulesFile(_0x3b44d6),!![];}export async function copyRulesToAgentsMd(_0x4c2833){const _0x243746=a135_0x5c4fee,_0x1b1490=join(_0x4c2833,_0x243746(0x1dc));if(existsSync(_0x1b1490))return![];return await writeRulesFile(_0x1b1490),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x227ea9){return new Promise(_0x19e471=>setTimeout(_0x19e471,_0x227ea9));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a137_0xbe56(_0x58e409,_0x3ef99d){_0x58e409=_0x58e409-0xab;const _0x563db5=a137_0x563d();let _0xbe5647=_0x563db5[_0x58e409];return _0xbe5647;}const a137_0x446f6c=a137_0xbe56;(function(_0x741062,_0x5ab263){const _0x16371a=a137_0xbe56,_0x5b5b9d=_0x741062();while(!![]){try{const _0x26c45c=parseInt(_0x16371a(0xd3))/0x1+-parseInt(_0x16371a(0xb7))/0x2*(parseInt(_0x16371a(0xc5))/0x3)+parseInt(_0x16371a(0xcc))/0x4*(-parseInt(_0x16371a(0xbd))/0x5)+-parseInt(_0x16371a(0xb8))/0x6*(-parseInt(_0x16371a(0xb9))/0x7)+-parseInt(_0x16371a(0xc7))/0x8*(parseInt(_0x16371a(0xeb))/0x9)+-parseInt(_0x16371a(0xb6))/0xa+parseInt(_0x16371a(0xbc))/0xb;if(_0x26c45c===_0x5ab263)break;else _0x5b5b9d['push'](_0x5b5b9d['shift']());}catch(_0x2cb861){_0x5b5b9d['push'](_0x5b5b9d['shift']());}}}(a137_0x563d,0xcf1d4));import a137_0x25d2e5 from'node:fs';import a137_0x1171f9 from'node:path';import{logger}from'../utils/logger.js';function a137_0x563d(){const _0x44462c=['toLowerCase','51406388JRZXZG','5858315GLsqof','error','.json','alias:\x20\x22','extname','\x0a\x20\x20\x20\x20{\x20','replaceApiContent','endsWith','6411AZDteD','toUpperCase','24RwiPmr','promises','LOVRABET','toLocaleString','.md','4VdhLUG','utf8','default','.scss','YourModel','isDirectory','replace','40903XVlCKH','datasetCode','readFile','slice','tableName','processFile','toLocaleDateString','datasetCode:\x20\x22','join','toDisplayTitle','push','name:\x20\x22','alias','map','toComponentName','mkdir','.tsx','processDirectory','template','2-digit','name','开始处理模板内容替换','now','info','750033DalZXQ','\x20},','toLocaleTimeString','.tpl','includes','copyFile','processTemplate','numeric','toISOString','success','.ts','pop','charAt','13854440rdeDBe','1114ZXWPKq','228rjWhmb','24234qzNKvw','split'];a137_0x563d=function(){return _0x44462c;};return a137_0x563d();}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a137_0x446f6c(0xe1)](_0x1f0fcf){const _0x179cfd=a137_0x446f6c,_0xf692bc=_0x1f0fcf[_0x179cfd(0xba)]('/')[_0x179cfd(0xb4)]()||_0x1f0fcf;return _0xf692bc['split']('-')[_0x179cfd(0xe0)](_0x311391=>_0x311391['charAt'](0x0)['toUpperCase']()+_0x311391[_0x179cfd(0xd6)](0x1)[_0x179cfd(0xbb)]())['join']('');}static[a137_0x446f6c(0xdc)](_0x3f4eb6){const _0x3f801d=a137_0x446f6c,_0x337b2e=_0x3f4eb6[_0x3f801d(0xba)]('/')['pop']()||_0x3f4eb6;return _0x337b2e[_0x3f801d(0xba)]('-')[_0x3f801d(0xe0)](_0x22a4ce=>_0x22a4ce[_0x3f801d(0xb5)](0x0)[_0x3f801d(0xc6)]()+_0x22a4ce['slice'](0x1)['toLowerCase']())['join']('\x20');}static['replaceContent'](_0x423c1d,_0x402e86,_0xa3a2c6){const _0x2d1451=a137_0x446f6c,_0x40c417=this[_0x2d1451(0xe1)](_0x402e86),_0x210d5a=this[_0x2d1451(0xdc)](_0x402e86),_0x2a1c0e=new Date(),_0x40f7e7=_0x2a1c0e[_0x2d1451(0xca)](undefined,{'year':_0x2d1451(0xb0),'month':_0x2d1451(0xe6),'day':_0x2d1451(0xe6),'hour':'2-digit','minute':_0x2d1451(0xe6),'second':_0x2d1451(0xe6),'hour12':![]})[_0x2d1451(0xd2)](/\//g,'-'),_0x474367=_0x2a1c0e[_0x2d1451(0xd9)](undefined,{'year':'numeric','month':_0x2d1451(0xe6),'day':_0x2d1451(0xe6)})[_0x2d1451(0xd2)](/\//g,'-'),_0x1acf5f=_0x2a1c0e[_0x2d1451(0xab)](undefined,{'hour12':![]});let _0x470860=_0x423c1d['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x2d1451(0xd2)](/\{ComponentName\}/g,_0x40c417)[_0x2d1451(0xd2)](/\{DisplayTitle\}/g,_0x210d5a)[_0x2d1451(0xd2)](/\{PageName\}/g,_0x402e86)[_0x2d1451(0xd2)](/\{TemplateName\}/g,_0xa3a2c6)[_0x2d1451(0xd2)](/\{CreatedAt\}/g,_0x40f7e7)['replace'](/\{CreatedDate\}/g,_0x474367)[_0x2d1451(0xd2)](/\{CreatedTime\}/g,_0x1acf5f);return _0x470860;}static[a137_0x446f6c(0xc3)](_0x20109a,_0x4c2478,_0x275870,_0x5217b3,_0x4bfe6a,_0x1f5c07,_0x240118,_0x5df4a6){const _0x54cdf2=a137_0x446f6c,_0x2c10c5=new Date(),_0x184dc7=_0x2c10c5[_0x54cdf2(0xb1)](),_0x51dcb2=_0x275870[_0x54cdf2(0xe0)](_0x44efdb=>{const _0x4ba0e9=_0x54cdf2,_0x1683e9=[_0x4ba0e9(0xda)+_0x44efdb[_0x4ba0e9(0xd4)]+'\x22','tableName:\x20\x22'+_0x44efdb[_0x4ba0e9(0xd7)]+'\x22',_0x4ba0e9(0xde)+_0x44efdb[_0x4ba0e9(0xe7)]+'\x22'];return _0x44efdb[_0x4ba0e9(0xdf)]&&_0x1683e9[_0x4ba0e9(0xdd)](_0x4ba0e9(0xc0)+_0x44efdb[_0x4ba0e9(0xdf)]+'\x22'),_0x4ba0e9(0xc2)+_0x1683e9[_0x4ba0e9(0xdb)](',\x20')+_0x4ba0e9(0xec);})[_0x54cdf2(0xdb)](''),_0x523eab=_0x5217b3||_0x275870[0x0]?.[_0x54cdf2(0xdf)]||_0x54cdf2(0xd0);let _0x4ef032=_0x20109a[_0x54cdf2(0xd2)](/\{AppCode\}/g,_0x4c2478)[_0x54cdf2(0xd2)](/\{ModelConfigs\}/g,_0x51dcb2)['replace'](/\{ExampleModelName\}/g,_0x523eab)['replace'](/\{ApiFileName\}/g,_0x4bfe6a||'api')['replace'](/\{ConfigName\}/g,_0x1f5c07||_0x54cdf2(0xce))[_0x54cdf2(0xd2)](/\{ClientConfigParam\}/g,_0x240118||'')[_0x54cdf2(0xd2)](/\{VarPrefix\}/g,_0x5df4a6||_0x54cdf2(0xc9))[_0x54cdf2(0xd2)](/\{CreatedAt\}/g,_0x184dc7);return _0x4ef032;}static async[a137_0x446f6c(0xaf)](_0x41d8fd,_0x538d77,_0xf3b129,_0x23b3c4,_0x535ef6=!![]){const _0x53167e=a137_0x446f6c,_0xb6afcc=Date[_0x53167e(0xe9)]();try{_0x535ef6&&logger[_0x53167e(0xea)]('template',_0x53167e(0xe8),{'templatePath':_0x41d8fd,'targetPath':_0x538d77,'pageName':_0xf3b129,'templateName':_0x23b3c4});await a137_0x25d2e5[_0x53167e(0xc8)][_0x53167e(0xe2)](_0x538d77,{'recursive':!![]}),await this[_0x53167e(0xe4)](_0x41d8fd,_0x538d77,_0xf3b129,_0x23b3c4);if(_0x535ef6){const _0x341c86=Date[_0x53167e(0xe9)]()-_0xb6afcc;logger[_0x53167e(0xb2)](_0x53167e(0xe5),'模板内容替换完成',_0x341c86,{'pageName':_0xf3b129,'templateName':_0x23b3c4});}}catch(_0x1a9504){if(_0x535ef6){const _0x1a2bd0=Date[_0x53167e(0xe9)]()-_0xb6afcc;logger[_0x53167e(0xbe)](_0x53167e(0xe5),'模板内容替换失败',{'templatePath':_0x41d8fd,'targetPath':_0x538d77,'pageName':_0xf3b129,'templateName':_0x23b3c4,'error':_0x1a9504 instanceof Error?_0x1a9504['message']:String(_0x1a9504),'duration':_0x1a2bd0});}throw _0x1a9504;}}static async[a137_0x446f6c(0xe4)](_0x1f2915,_0x25bb52,_0x24fc45,_0x8f9248){const _0x301a4a=a137_0x446f6c,_0x2ffb71=await a137_0x25d2e5[_0x301a4a(0xc8)]['readdir'](_0x1f2915,{'withFileTypes':!![]});for(const _0x2ac891 of _0x2ffb71){const _0x73e57f=a137_0x1171f9[_0x301a4a(0xdb)](_0x1f2915,_0x2ac891[_0x301a4a(0xe7)]);let _0x13784d=a137_0x1171f9[_0x301a4a(0xdb)](_0x25bb52,_0x2ac891[_0x301a4a(0xe7)]);_0x2ac891[_0x301a4a(0xe7)][_0x301a4a(0xc4)](_0x301a4a(0xac))&&(_0x13784d=a137_0x1171f9['join'](_0x25bb52,_0x2ac891['name']['replace'](/\.tpl$/,'')));if(_0x2ac891[_0x301a4a(0xd1)]())await a137_0x25d2e5['promises']['mkdir'](_0x13784d,{'recursive':!![]}),await this[_0x301a4a(0xe4)](_0x73e57f,_0x13784d,_0x24fc45,_0x8f9248);else _0x2ac891['isFile']()&&await this[_0x301a4a(0xd8)](_0x73e57f,_0x13784d,_0x24fc45,_0x8f9248);}}static async['processFile'](_0x32f414,_0xd09552,_0x14067c,_0x2c23f4){const _0x53dd41=a137_0x446f6c,_0x353fd7=a137_0x1171f9[_0x53dd41(0xc1)](_0x32f414)['toLowerCase']();_0x32f414[_0x53dd41(0xc4)](_0x53dd41(0xac))&&(_0xd09552=_0xd09552['replace'](/\.tpl$/,''));const _0x54b36b=[_0x53dd41(0xe3),_0x53dd41(0xb3),'.jsx','.js',_0x53dd41(0xbf),_0x53dd41(0xcb),'.css',_0x53dd41(0xcf),_0x53dd41(0xac)];if(_0x54b36b[_0x53dd41(0xad)](_0x353fd7)||_0x32f414[_0x53dd41(0xc4)](_0x53dd41(0xac))){const _0x2c11b7=await a137_0x25d2e5[_0x53dd41(0xc8)][_0x53dd41(0xd5)](_0x32f414,_0x53dd41(0xcd)),_0x3c3b69=this['replaceContent'](_0x2c11b7,_0x14067c,_0x2c23f4);await a137_0x25d2e5['promises']['writeFile'](_0xd09552,_0x3c3b69,_0x53dd41(0xcd));}else await a137_0x25d2e5[_0x53dd41(0xc8)][_0x53dd41(0xae)](_0x32f414,_0xd09552);}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17d687,_0x3458d7){var _0x557b62=a138_0x9214,_0x52861d=_0x17d687();while(!![]){try{var _0x5431b7=-parseInt(_0x557b62(0xbd))/0x1+-parseInt(_0x557b62(0xb4))/0x2*(parseInt(_0x557b62(0xb9))/0x3)+-parseInt(_0x557b62(0xb8))/0x4+-parseInt(_0x557b62(0xb3))/0x5*(-parseInt(_0x557b62(0xba))/0x6)+parseInt(_0x557b62(0xbb))/0x7*(parseInt(_0x557b62(0xb6))/0x8)+-parseInt(_0x557b62(0xbc))/0x9*(-parseInt(_0x557b62(0xb5))/0xa)+parseInt(_0x557b62(0xb7))/0xb;if(_0x5431b7===_0x3458d7)break;else _0x52861d['push'](_0x52861d['shift']());}catch(_0x23b4b6){_0x52861d['push'](_0x52861d['shift']());}}}(a138_0x35f6,0x24cf4));function a138_0x35f6(){var _0x51a4fa=['15550cLPttn','256XYddKj','2979515xwckGL','452884JZWVGB','3qcWgZz','1068mQLpNd','63532SFkXMu','504YJyXIQ','226185hbZolt','1325CEUfmy','410738cJdlIP'];a138_0x35f6=function(){return _0x51a4fa;};return a138_0x35f6();}function a138_0x9214(_0x30b4d2,_0x47793c){_0x30b4d2=_0x30b4d2-0xb3;var _0x35f66f=a138_0x35f6();var _0x9214e4=_0x35f66f[_0x30b4d2];return _0x9214e4;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3d32af,_0x1c92b6){var _0x3168dc=a139_0x27b1,_0xd60676=_0x3d32af();while(!![]){try{var _0x4bab6a=parseInt(_0x3168dc(0x18f))/0x1*(-parseInt(_0x3168dc(0x18e))/0x2)+-parseInt(_0x3168dc(0x18d))/0x3*(-parseInt(_0x3168dc(0x191))/0x4)+-parseInt(_0x3168dc(0x193))/0x5+-parseInt(_0x3168dc(0x18c))/0x6*(parseInt(_0x3168dc(0x190))/0x7)+parseInt(_0x3168dc(0x18b))/0x8*(-parseInt(_0x3168dc(0x189))/0x9)+-parseInt(_0x3168dc(0x188))/0xa+-parseInt(_0x3168dc(0x192))/0xb*(-parseInt(_0x3168dc(0x18a))/0xc);if(_0x4bab6a===_0x1c92b6)break;else _0xd60676['push'](_0xd60676['shift']());}catch(_0x2270d2){_0xd60676['push'](_0xd60676['shift']());}}}(a139_0x5d81,0xe29dd));function a139_0x27b1(_0xbb1e53,_0x2f48dd){_0xbb1e53=_0xbb1e53-0x188;var _0x5d8165=a139_0x5d81();var _0x27b17f=_0x5d8165[_0xbb1e53];return _0x27b17f;}import{setActiveCookie,clearActiveCookie}from'../core/api-client.js';export async function withActiveCookie(_0x54ae8f,_0x550184){setActiveCookie(_0x54ae8f);try{return await _0x550184();}finally{clearActiveCookie();}}function a139_0x5d81(){var _0x1be954=['1305044MrZYxE','11DsGcFm','290505GdyJmf','10332080dbLNgF','882TqSgGd','37544700DAutxu','83272vcZpZE','90xTbbyJ','6RhrJGi','190gWwQRQ','718PcMsWj','314265aCrfnr'];a139_0x5d81=function(){return _0x1be954;};return a139_0x5d81();}
|