@lovrabet/rabetbase-cli 2.1.10-beta.0 → 2.1.10-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/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/login-success-html.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/generate.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/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.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/create.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/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/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -1
- package/lib/commands/dataset/link-delete.js +1 -1
- package/lib/commands/dataset/link-shared.js +1 -1
- package/lib/commands/dataset/link-update.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/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/report.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/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.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/create.js +1 -1
- package/lib/commands/sql/delete.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/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.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/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.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-alias.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/telemetry/send-platform-issue-collect-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/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.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/params.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/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a179_0x4546a8=a179_0x4bf8;function a179_0x4bf8(_0x2441d7,_0x13f275){_0x2441d7=_0x2441d7-0x1dd;const _0x45e3c5=a179_0x45e3();let _0x4bf8b8=_0x45e3c5[_0x2441d7];return _0x4bf8b8;}(function(_0x2ba4de,_0x48d3b2){const _0x513b3f=a179_0x4bf8,_0x305018=_0x2ba4de();while(!![]){try{const _0x54290c=-parseInt(_0x513b3f(0x1fc))/0x1*(-parseInt(_0x513b3f(0x202))/0x2)+-parseInt(_0x513b3f(0x1f2))/0x3+-parseInt(_0x513b3f(0x20e))/0x4+parseInt(_0x513b3f(0x1f8))/0x5*(parseInt(_0x513b3f(0x1ff))/0x6)+-parseInt(_0x513b3f(0x20a))/0x7+parseInt(_0x513b3f(0x1ed))/0x8+parseInt(_0x513b3f(0x1e4))/0x9;if(_0x54290c===_0x48d3b2)break;else _0x305018['push'](_0x305018['shift']());}catch(_0x82a298){_0x305018['push'](_0x305018['shift']());}}}(a179_0x45e3,0x672fe));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':a179_0x4546a8(0x211),'folders':[a179_0x4546a8(0x201),a179_0x4546a8(0x1f4)],'files':[{'type':a179_0x4546a8(0x1e6),'path':a179_0x4546a8(0x1e0),'template':a179_0x4546a8(0x204)}]},'windsurf':{'name':'Windsurf','description':a179_0x4546a8(0x1f5),'folders':[a179_0x4546a8(0x1e2)],'files':[{'type':a179_0x4546a8(0x1e6),'path':a179_0x4546a8(0x212),'template':a179_0x4546a8(0x204)}]},'claude':{'name':a179_0x4546a8(0x207),'description':a179_0x4546a8(0x207),'folders':['.claude'],'files':[{'type':a179_0x4546a8(0x1e6),'path':'.claude/skills/lovrabet/SKILL.md','template':a179_0x4546a8(0x204)}]},'cline':{'name':a179_0x4546a8(0x1ee),'description':a179_0x4546a8(0x1e8),'folders':[a179_0x4546a8(0x206)],'files':[{'type':a179_0x4546a8(0x1e6),'path':a179_0x4546a8(0x1e7),'template':a179_0x4546a8(0x204)}]},'codex':{'name':a179_0x4546a8(0x208),'description':'Codex\x20IDE','folders':[a179_0x4546a8(0x1f9)],'files':[{'type':a179_0x4546a8(0x1e6),'path':a179_0x4546a8(0x1ec),'template':a179_0x4546a8(0x204)}]},'opencode':{'name':a179_0x4546a8(0x1df),'description':'OpenCode\x20IDE','folders':[a179_0x4546a8(0x1e3)],'files':[{'type':a179_0x4546a8(0x1e6),'path':a179_0x4546a8(0x1fe),'template':a179_0x4546a8(0x204)}]},'qoder':{'name':a179_0x4546a8(0x1e9),'description':'Qoder\x20IDE','folders':['.qoder'],'files':[{'type':a179_0x4546a8(0x1e6),'path':a179_0x4546a8(0x200),'template':a179_0x4546a8(0x204)},{'type':a179_0x4546a8(0x1e6),'path':a179_0x4546a8(0x20b),'template':'SKILL.md.tpl'}]},'codebuddy':{'name':a179_0x4546a8(0x20d),'description':a179_0x4546a8(0x205),'folders':[a179_0x4546a8(0x210)],'files':[{'type':a179_0x4546a8(0x1e6),'path':a179_0x4546a8(0x1ef),'template':a179_0x4546a8(0x204)}]},'trae':{'name':a179_0x4546a8(0x1eb),'description':'Trae\x20IDE','folders':[a179_0x4546a8(0x1ea)],'files':[{'type':a179_0x4546a8(0x1e6),'path':a179_0x4546a8(0x1f7),'template':a179_0x4546a8(0x204)}]}};function a179_0x45e3(){const _0x1f79b9=['2529645RlmETd','Antigravity\x20IDE','.cursor','Windsurf\x20IDE','qoder','.trae/skills/lovrabet/SKILL.md','948035eKJnJO','.codex','cursor','antigravity','1dVjkZq','windsurf','.opencode/skills/lovrabet/SKILL.md','24SymOav','.qoder/rules/rabetbase.md','.cursorrules','1386646yNLaWq','trae','SKILL.md.tpl','CodeBuddy\x20IDE','.cline','Claude\x20Code','Codex','codex','5505836WGIPYa','.qoder/skills/lovrabet/SKILL.md','agent','CodeBuddy','494904WcTwlB','cline','.codebuddy','Cursor\x20IDE','.windsurf/workflows/rabetbase.md','.agent','opencode','OpenCode','.cursor/skills/rabetbase.md','claude','.windsurf','.opencode','6208902sjZzrC','.agent/skills/lovrabet/SKILL.md','file','.cline/skills/lovrabet/SKILL.md','Cline\x20IDE','Qoder','.trae','Trae','.codex/skills/lovrabet/SKILL.md','276112UsVhOF','Cline','.codebuddy/skills/lovrabet/SKILL.md','通用模板\x20-\x20兜底方案','codebuddy'];a179_0x45e3=function(){return _0x1f79b9;};return a179_0x45e3();}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':'其他\x20(通用模板)','description':a179_0x4546a8(0x1f0),'folders':[a179_0x4546a8(0x1dd)],'files':[{'type':a179_0x4546a8(0x1e6),'path':a179_0x4546a8(0x1e5),'template':a179_0x4546a8(0x204)}]},'antigravity':{'name':'Antigravity','description':a179_0x4546a8(0x1f3),'folders':[a179_0x4546a8(0x1dd)],'files':[{'type':'file','path':a179_0x4546a8(0x1e5),'template':a179_0x4546a8(0x204)}]}};export const CORE_IDE_LIST=[a179_0x4546a8(0x1e1),'cline',a179_0x4546a8(0x1f1),'codex',a179_0x4546a8(0x1fa),a179_0x4546a8(0x1de),'qoder',a179_0x4546a8(0x203),a179_0x4546a8(0x1fd)];export const IDE_LIST=[a179_0x4546a8(0x1fb),a179_0x4546a8(0x1e1),a179_0x4546a8(0x20f),a179_0x4546a8(0x1f1),a179_0x4546a8(0x209),'cursor',a179_0x4546a8(0x1de),a179_0x4546a8(0x1f6),a179_0x4546a8(0x203),a179_0x4546a8(0x1fd),a179_0x4546a8(0x20c)];export const ALL_CORE_IDES=['cursor','windsurf',a179_0x4546a8(0x1e1),'cline',a179_0x4546a8(0x209),'opencode','qoder',a179_0x4546a8(0x1f1),a179_0x4546a8(0x203)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a180_0x192e(_0xb1a6b5,_0x50e1af){_0xb1a6b5=_0xb1a6b5-0x1b2;const _0x5b1241=a180_0x5b12();let _0x192ec3=_0x5b1241[_0xb1a6b5];return _0x192ec3;}(function(_0x3628fa,_0x2ff31c){const _0x2878f5=a180_0x192e,_0x3582c7=_0x3628fa();while(!![]){try{const _0x5bdfb6=parseInt(_0x2878f5(0x1b6))/0x1+parseInt(_0x2878f5(0x1b8))/0x2*(-parseInt(_0x2878f5(0x1b2))/0x3)+parseInt(_0x2878f5(0x1b3))/0x4*(-parseInt(_0x2878f5(0x1b9))/0x5)+parseInt(_0x2878f5(0x1ba))/0x6+-parseInt(_0x2878f5(0x1b5))/0x7+-parseInt(_0x2878f5(0x1b7))/0x8+parseInt(_0x2878f5(0x1b4))/0x9;if(_0x5bdfb6===_0x2ff31c)break;else _0x3582c7['push'](_0x3582c7['shift']());}catch(_0x46e3fc){_0x3582c7['push'](_0x3582c7['shift']());}}}(a180_0x5b12,0xe6892));function a180_0x5b12(){const _0x471fb7=['1842774jnZapB','105ppmqey','10864716rVlELi','3EWEAwo','95580gaFnlC','5913630mbtWyL','1540679FJiIEX','203208djFpXD','668088qlwRKk'];a180_0x5b12=function(){return _0x471fb7;};return a180_0x5b12();}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x57a77f,_0x58fc44){const _0x412000=a181_0x5daa,_0x40c289=_0x57a77f();while(!![]){try{const _0x2bcf42=-parseInt(_0x412000(0x96))/0x1*(parseInt(_0x412000(0x91))/0x2)+-parseInt(_0x412000(0x92))/0x3*(-parseInt(_0x412000(0x93))/0x4)+parseInt(_0x412000(0x94))/0x5+-parseInt(_0x412000(0x8b))/0x6*(parseInt(_0x412000(0x85))/0x7)+parseInt(_0x412000(0x90))/0x8+parseInt(_0x412000(0x8e))/0x9+-parseInt(_0x412000(0x95))/0xa*(parseInt(_0x412000(0x88))/0xb);if(_0x2bcf42===_0x58fc44)break;else _0x40c289['push'](_0x40c289['shift']());}catch(_0x5ef98d){_0x40c289['push'](_0x40c289['shift']());}}}(a181_0x2770,0xd6f06));import{getTemplateBaseUrl}from'../utils/config.js';function a181_0x2770(){const _0x4d1a1b=['73073hHOJEN','now','/config.json','429LwZQDe','json','sdk','870DObThj','application/json','stableVersion','14544423AewEUJ','node','3748672tBqTlL','5626mkbIYV','93lnWenG','109588RSxNLv','7357940wDTWRZ','417670kCjana','136XSPAlt'];a181_0x2770=function(){return _0x4d1a1b;};return a181_0x2770();}export async function fetchCdnConfig(){const _0xa645a=a181_0x5daa,_0x296552=getTemplateBaseUrl(),_0x500f3a=[_0x296552+_0xa645a(0x87),_0x296552+'/config/index.json'];for(const _0x424cd3 of _0x500f3a){try{const _0x1dece5=await fetch(_0x424cd3,{'headers':{'Accept':_0xa645a(0x8c)}});if(!_0x1dece5['ok'])continue;const _0xd682a=await _0x1dece5[_0xa645a(0x89)]();if(!_0xd682a['cli']?.[_0xa645a(0x8d)]||!_0xd682a[_0xa645a(0x8a)]?.[_0xa645a(0x8f)]?.[_0xa645a(0x8d)])continue;return _0xd682a;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];function a181_0x5daa(_0x46c79d,_0x447b35){_0x46c79d=_0x46c79d-0x85;const _0x27704=a181_0x2770();let _0x5daadc=_0x27704[_0x46c79d];return _0x5daadc;}export async function getCdnConfig(){const _0x58b512=a181_0x5daa,_0x17047e=Date[_0x58b512(0x86)]();if(hasCachedConfig){const _0x287ad7=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x17047e-cacheTime<_0x287ad7)return cachedConfig;}const _0x103599=await fetchCdnConfig();return cachedConfig=_0x103599,cacheTime=_0x17047e,hasCachedConfig=!![],_0x103599;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a182_0x4746cc=a182_0x5616;(function(_0x5b3a7d,_0x3cef33){const _0x3a6845=a182_0x5616,_0xdba27e=_0x5b3a7d();while(!![]){try{const _0x4aa15c=parseInt(_0x3a6845(0x185))/0x1*(-parseInt(_0x3a6845(0x18d))/0x2)+parseInt(_0x3a6845(0x19c))/0x3*(parseInt(_0x3a6845(0x19e))/0x4)+-parseInt(_0x3a6845(0x181))/0x5+-parseInt(_0x3a6845(0x183))/0x6+parseInt(_0x3a6845(0x199))/0x7+-parseInt(_0x3a6845(0x192))/0x8*(parseInt(_0x3a6845(0x18a))/0x9)+-parseInt(_0x3a6845(0x17c))/0xa*(-parseInt(_0x3a6845(0x188))/0xb);if(_0x4aa15c===_0x3cef33)break;else _0xdba27e['push'](_0xdba27e['shift']());}catch(_0x13f02a){_0xdba27e['push'](_0xdba27e['shift']());}}}(a182_0x373b,0x20090));function a182_0x5616(_0x5595ac,_0x44bdb9){_0x5595ac=_0x5595ac-0x17a;const _0x373b6e=a182_0x373b();let _0x5616e2=_0x373b6e[_0x5595ac];return _0x5616e2;}import a182_0x256c4c from'node:fs';function a182_0x373b(){const _0x1f3756=['\x1b[1m','1184838yZBUEf','stableVersion','9463tglYpa','package.json','devDependencies','451xxnAXo','sdk','90dMlfIi','\x1b[33m','@lovrabet/sdk','32XNfygq','parse','readFileSync','\x20\x20\x20Current\x20version:\x20','utf-8','58080AEhYow','test','all','join','↪\x20SDK\x20update\x20available','minVersion','utf8','51982OvrQHg','dependencies','1.2.0','18402UIhnaf','node','132FPCNkz','existsSync','version','log','npm\x20install\x20','114980JVLzYs','\x20\x20\x20Upgrade\x20command:\x20','packageName','coerce','\x20\x20\x20Stable\x20version:\x20','642845zVbRiJ'];a182_0x373b=function(){return _0x1f3756;};return a182_0x373b();}import a182_0x58cd9e from'node:path';import a182_0x24b8a8 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a182_0x4746cc(0x19b);function isNonNumericVersion(_0x27cf5e){const _0x2a6ca5=a182_0x4746cc,_0x7e5f05=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x7e5f05['some'](_0x2adda2=>_0x2adda2[_0x2a6ca5(0x193)](_0x27cf5e));}function getInstalledVersion(_0x4128a3,_0x19bcdd){const _0x4f6ea2=a182_0x4746cc;try{const _0x122079=a182_0x58cd9e[_0x4f6ea2(0x195)](_0x4128a3,'node_modules',_0x19bcdd,_0x4f6ea2(0x186));if(a182_0x256c4c['existsSync'](_0x122079)){const _0x4fd7e3=JSON[_0x4f6ea2(0x18e)](a182_0x256c4c[_0x4f6ea2(0x18f)](_0x122079,_0x4f6ea2(0x191)));return _0x4fd7e3[_0x4f6ea2(0x1a0)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x4b3af3=a182_0x4746cc;try{const _0x26a02e=await getCdnConfig();return _0x26a02e?.[_0x4b3af3(0x189)]?.[_0x4b3af3(0x19d)]?.[_0x4b3af3(0x184)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x55ba5d=a182_0x4746cc;try{const _0x13c2f5=await getCdnConfig();return _0x13c2f5?.['sdk']?.[_0x55ba5d(0x19d)]?.[_0x55ba5d(0x17e)]||'@lovrabet/sdk';}catch{return'@lovrabet/sdk';}}export async function checkSdkVersion(_0x5545ea){const _0x386618=a182_0x4746cc,_0xeb608a=a182_0x58cd9e[_0x386618(0x195)](_0x5545ea,_0x386618(0x186)),[_0x3758df,_0x4231e9]=await Promise[_0x386618(0x194)]([getSdkStableVersion(),getSdkPackageName()]),_0x1cd5be=_0x3758df||FALLBACK_MIN_SDK_VERSION;if(!a182_0x256c4c[_0x386618(0x19f)](_0xeb608a))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1cd5be,'packageName':_0x4231e9,'stableVersion':_0x3758df};try{const _0x3706a5=JSON[_0x386618(0x18e)](a182_0x256c4c[_0x386618(0x18f)](_0xeb608a,_0x386618(0x198))),_0x464c31=_0x3706a5['dependencies']||{},_0x260475=_0x3706a5[_0x386618(0x187)]||{},_0x3196de=_0x464c31[_0x4231e9]||_0x260475[_0x4231e9];if(!_0x3196de)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1cd5be,'packageName':_0x4231e9,'stableVersion':_0x3758df};let _0x5293ad=getInstalledVersion(_0x5545ea,_0x4231e9);!_0x5293ad&&(_0x5293ad=_0x3196de);if(isNonNumericVersion(_0x3196de))return{'installed':!![],'version':_0x5293ad,'needsUpgrade':![],'minVersion':_0x1cd5be,'packageName':_0x4231e9,'stableVersion':_0x3758df};const _0x38c42c=a182_0x24b8a8[_0x386618(0x17f)](_0x5293ad),_0x33659e=a182_0x24b8a8[_0x386618(0x17f)](_0x1cd5be),_0x4ee99b=_0x38c42c&&_0x33659e?a182_0x24b8a8['lt'](_0x38c42c,_0x33659e):![];return{'installed':!![],'version':_0x5293ad,'needsUpgrade':_0x4ee99b,'minVersion':_0x1cd5be,'packageName':_0x4231e9,'stableVersion':_0x3758df};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x1cd5be,'packageName':_0x4231e9,'stableVersion':_0x3758df};}}export function checkSdkVersionSync(_0x1541f9){const _0x3ad44e=a182_0x4746cc,_0x2794c8=a182_0x58cd9e[_0x3ad44e(0x195)](_0x1541f9,_0x3ad44e(0x186)),_0x5d63d5='@lovrabet/sdk';if(!a182_0x256c4c[_0x3ad44e(0x19f)](_0x2794c8))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5d63d5,'stableVersion':null};try{const _0x3442a5=JSON[_0x3ad44e(0x18e)](a182_0x256c4c[_0x3ad44e(0x18f)](_0x2794c8,_0x3ad44e(0x198))),_0x5c0483=_0x3442a5[_0x3ad44e(0x19a)]||{},_0x3e5d09=_0x3442a5[_0x3ad44e(0x187)]||{},_0xcfa56c=_0x5c0483[_0x5d63d5]||_0x3e5d09[_0x5d63d5];if(!_0xcfa56c)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5d63d5,'stableVersion':null};let _0xa59a24=getInstalledVersion(_0x1541f9,_0x5d63d5);!_0xa59a24&&(_0xa59a24=_0xcfa56c);if(isNonNumericVersion(_0xcfa56c))return{'installed':!![],'version':_0xa59a24,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5d63d5,'stableVersion':null};const _0x38f520=a182_0x24b8a8[_0x3ad44e(0x17f)](_0xa59a24),_0x5cd06e=_0x38f520?a182_0x24b8a8['lt'](_0x38f520,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0xa59a24,'needsUpgrade':_0x5cd06e,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5d63d5,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x5d63d5,'stableVersion':null};}}export function printSdkUpgradeWarning(_0xde1bc3){const _0x370f58=a182_0x4746cc;if(!_0xde1bc3['needsUpgrade'])return;const _0x15d38a=_0x370f58(0x18b),_0x2d1f96='\x1b[0m',_0x28ea69=_0x370f58(0x182),_0x32405e=_0xde1bc3[_0x370f58(0x17e)]||_0x370f58(0x18c),_0x120f30=_0xde1bc3[_0x370f58(0x184)]||_0xde1bc3[_0x370f58(0x197)],_0x2ae106=_0x370f58(0x17b)+_0x32405e+'@'+(_0x120f30||'latest');console[_0x370f58(0x17a)](),console[_0x370f58(0x17a)](''+_0x15d38a+_0x28ea69+_0x370f58(0x196)+_0x2d1f96),console[_0x370f58(0x17a)](_0x15d38a+_0x370f58(0x190)+_0x32405e+'@'+_0xde1bc3[_0x370f58(0x1a0)]+_0x2d1f96),console['log'](_0x15d38a+_0x370f58(0x180)+_0x120f30+_0x2d1f96),console[_0x370f58(0x17a)](_0x15d38a+_0x370f58(0x17d)+_0x2ae106+_0x2d1f96),console['log']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1f19a1,_0x4ed082){const _0x598953=a183_0x5d13,_0x17eba1=_0x1f19a1();while(!![]){try{const _0x5c9db9=-parseInt(_0x598953(0xb9))/0x1*(-parseInt(_0x598953(0xb4))/0x2)+-parseInt(_0x598953(0xd1))/0x3*(parseInt(_0x598953(0xc5))/0x4)+-parseInt(_0x598953(0xc9))/0x5+parseInt(_0x598953(0xbf))/0x6+-parseInt(_0x598953(0xac))/0x7*(-parseInt(_0x598953(0xcf))/0x8)+parseInt(_0x598953(0xb3))/0x9*(parseInt(_0x598953(0xcc))/0xa)+-parseInt(_0x598953(0xc3))/0xb*(parseInt(_0x598953(0xb5))/0xc);if(_0x5c9db9===_0x4ed082)break;else _0x17eba1['push'](_0x17eba1['shift']());}catch(_0x236e4f){_0x17eba1['push'](_0x17eba1['shift']());}}}(a183_0x20e3,0x6550c));function a183_0x20e3(){const _0x444235=['currentVersion','825070CnyFqx','utf-8','Minimum\x20required:\x20','1524010WTrrxb','filter','latest','5576vJhmNL','↪\x20New\x20version\x20available','73155MFXeEr','coerce','join','1.0.0','2569Ctssur','↪\x20Critical\x20CLI\x20upgrade\x20required','package.json','\x20\x20\x20','\x20\x20\x20Recommended\x20stable:\x20','\x20\x20\x20Minimum\x20required:\x20','../..','45ESfppk','74qamqlp','914220CAdhkW','npm\x20install\x20-g\x20','\x20\x20\x20Upgrade\x20command:\x20','\x1b[0m','15938JQZcIg','minimumVersion','belowMinimum','Upgrade\x20command:\x20','upgradeMessage','\x1b[33m','3599622AcEGGz','validation','log','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','154KEaOBm','parse','92cnxKuj','minimumVersionMessage','stableVersion'];a183_0x20e3=function(){return _0x444235;};return a183_0x20e3();}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';function a183_0x5d13(_0x2dfaf3,_0x368954){_0x2dfaf3=_0x2dfaf3-0xaa;const _0x20e3c1=a183_0x20e3();let _0x5d133b=_0x20e3c1[_0x2dfaf3];return _0x5d133b;}import{fileURLToPath}from'node:url';import a183_0x3e90d0 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x44ed58){const _0x12563f=a183_0x5d13,_0x58ec96=_0x44ed58[_0x12563f(0xc7)]||_0x12563f(0xce);return _0x12563f(0xb6)+NPM_PACKAGE_NAME+'@'+_0x58ec96;}function getCurrentCliVersion(){const _0x425a30=a183_0x5d13;try{const _0x20ce39=fileURLToPath(import.meta.url),_0xc1ad72=resolve(dirname(_0x20ce39),_0x425a30(0xb2)),_0x1ab07f=resolve(_0xc1ad72,_0x425a30(0xae)),_0x5d70c8=JSON[_0x425a30(0xc4)](readFileSync(_0x1ab07f,_0x425a30(0xca)));return _0x5d70c8['version']||_0x425a30(0xab);}catch{return _0x425a30(0xab);}}export async function checkCliVersion(){const _0x14c367=a183_0x5d13,_0x1f85be=getCurrentCliVersion(),_0x2f2aac=await getCliVersionPolicy(),_0x170b79=_0x2f2aac?.[_0x14c367(0xc7)]||null,_0x3401dd=_0x2f2aac?.[_0x14c367(0xba)]||null;let _0x11c027=![],_0x5a42dd=![];const _0xcde9e=a183_0x3e90d0['coerce'](_0x1f85be);if(_0xcde9e&&_0x170b79)try{const _0x1f3729=a183_0x3e90d0[_0x14c367(0xd2)](_0x170b79);if(_0x1f3729)_0x11c027=a183_0x3e90d0['lt'](_0xcde9e,_0x1f3729);}catch{}if(_0xcde9e&&_0x3401dd)try{const _0x31053c=a183_0x3e90d0[_0x14c367(0xd2)](_0x3401dd);if(_0x31053c)_0x5a42dd=a183_0x3e90d0['lt'](_0xcde9e,_0x31053c);}catch{}return _0x5a42dd&&(_0x11c027=!![]),{'currentVersion':_0x1f85be,'stableVersion':_0x170b79,'minimumVersion':_0x3401dd,'needsUpgrade':_0x11c027,'belowMinimum':_0x5a42dd,'isPreRelease':![],'upgradeMessage':_0x2f2aac?.[_0x14c367(0xbd)],'minimumVersionMessage':_0x2f2aac?.[_0x14c367(0xc6)]};}export function printCliUpgradeWarning(_0x27d3ad){const _0x3f4234=a183_0x5d13;if(!_0x27d3ad['needsUpgrade']&&!_0x27d3ad[_0x3f4234(0xbb)])return;const _0x4ff6db='\x1b[31m',_0x24266a=_0x3f4234(0xbe),_0x130468=_0x3f4234(0xb8),_0x35ac0b='\x1b[1m',_0x48c034=getCliUpgradeCommand(_0x27d3ad);console[_0x3f4234(0xc1)](),_0x27d3ad[_0x3f4234(0xbb)]?(console[_0x3f4234(0xc1)](''+_0x4ff6db+_0x35ac0b+_0x3f4234(0xad)+_0x130468),console['log'](_0x4ff6db+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x27d3ad[_0x3f4234(0xc8)]+_0x130468),_0x27d3ad[_0x3f4234(0xba)]&&console['log'](_0x4ff6db+_0x3f4234(0xb1)+_0x27d3ad[_0x3f4234(0xba)]+_0x130468),_0x27d3ad[_0x3f4234(0xc7)]&&_0x27d3ad[_0x3f4234(0xc7)]!==_0x27d3ad[_0x3f4234(0xba)]&&console[_0x3f4234(0xc1)](_0x4ff6db+_0x3f4234(0xb0)+_0x27d3ad[_0x3f4234(0xc7)]+_0x130468),_0x27d3ad['minimumVersionMessage']&&console[_0x3f4234(0xc1)](_0x4ff6db+_0x3f4234(0xaf)+_0x27d3ad['minimumVersionMessage']+_0x130468),console[_0x3f4234(0xc1)](_0x4ff6db+_0x3f4234(0xb7)+_0x48c034+_0x130468)):(console[_0x3f4234(0xc1)](''+_0x24266a+_0x35ac0b+_0x3f4234(0xd0)+_0x130468),console[_0x3f4234(0xc1)](_0x24266a+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x27d3ad[_0x3f4234(0xc8)]+_0x130468),console['log'](_0x24266a+'\x20\x20\x20Stable\x20version:\x20'+_0x27d3ad['stableVersion']+_0x130468),_0x27d3ad[_0x3f4234(0xbd)]&&console[_0x3f4234(0xc1)](_0x24266a+_0x3f4234(0xaf)+_0x27d3ad[_0x3f4234(0xbd)]+_0x130468),console[_0x3f4234(0xc1)](_0x24266a+_0x3f4234(0xb7)+_0x48c034+_0x130468)),console[_0x3f4234(0xc1)]();}export function assertCliVersionSupported(_0x47f56b){const _0x19f935=a183_0x5d13;if(!_0x47f56b[_0x19f935(0xbb)])return;const _0x1ac8e7=[_0x47f56b[_0x19f935(0xc6)],'Current\x20version:\x20'+_0x47f56b[_0x19f935(0xc8)],_0x47f56b['minimumVersion']?_0x19f935(0xcb)+_0x47f56b[_0x19f935(0xba)]:null,_0x19f935(0xbc)+getCliUpgradeCommand(_0x47f56b)][_0x19f935(0xcd)](Boolean)[_0x19f935(0xaa)]('\x0a');throw CliErrors[_0x19f935(0xc0)](_0x19f935(0xc2),_0x1ac8e7);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a184_0x456a(){const _0x4b087e=['minimumVersion','3810180EPtLcV','object','10vvwHQj','1105064mFIFHe','json','1645919IrvuVo','recommendedVersion','signal','9NaWCtt','186906tQoGlD','string','3582544kuOnfQ','68649NnuuEE','cli','now','length','9BoqMGr','minVersion','1926282OWXDPZ','stableVersion','36SzQCSb'];a184_0x456a=function(){return _0x4b087e;};return a184_0x456a();}(function(_0x10e5db,_0x3d56fa){const _0x19bbc0=a184_0x5d6e,_0x57ebb0=_0x10e5db();while(!![]){try{const _0x155ede=parseInt(_0x19bbc0(0x1f3))/0x1*(-parseInt(_0x19bbc0(0x1de))/0x2)+parseInt(_0x19bbc0(0x1e1))/0x3*(-parseInt(_0x19bbc0(0x1e9))/0x4)+parseInt(_0x19bbc0(0x1ed))/0x5*(parseInt(_0x19bbc0(0x1e7))/0x6)+parseInt(_0x19bbc0(0x1e0))/0x7+parseInt(_0x19bbc0(0x1ee))/0x8*(-parseInt(_0x19bbc0(0x1e5))/0x9)+parseInt(_0x19bbc0(0x1eb))/0xa+parseInt(_0x19bbc0(0x1f0))/0xb;if(_0x155ede===_0x3d56fa)break;else _0x57ebb0['push'](_0x57ebb0['shift']());}catch(_0xe9204b){_0x57ebb0['push'](_0x57ebb0['shift']());}}}(a184_0x456a,0x79eb0));import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function pickString(_0x4289a1){const _0x3e4d87=a184_0x5d6e;return typeof _0x4289a1===_0x3e4d87(0x1df)&&_0x4289a1['trim']()[_0x3e4d87(0x1e4)]>0x0?_0x4289a1['trim']():null;}function a184_0x5d6e(_0x41ce29,_0x21f7ba){_0x41ce29=_0x41ce29-0x1de;const _0x456ac8=a184_0x456a();let _0x5d6ed7=_0x456ac8[_0x41ce29];return _0x5d6ed7;}function normalizeCliVersionPolicy(_0x4bfdc2){const _0xe0ae93=a184_0x5d6e;if(!_0x4bfdc2||typeof _0x4bfdc2!==_0xe0ae93(0x1ec))return null;const _0x3766a7=_0x4bfdc2,_0xd84ab6=_0x3766a7[_0xe0ae93(0x1e2)]&&typeof _0x3766a7[_0xe0ae93(0x1e2)]===_0xe0ae93(0x1ec)?_0x3766a7[_0xe0ae93(0x1e2)]:_0x3766a7,_0x496cb2=pickString(_0xd84ab6[_0xe0ae93(0x1e8)])||pickString(_0xd84ab6['latestVersion'])||pickString(_0xd84ab6[_0xe0ae93(0x1f1)]),_0x2919f6=pickString(_0xd84ab6[_0xe0ae93(0x1ea)])||pickString(_0xd84ab6[_0xe0ae93(0x1e6)]);if(!_0x496cb2&&!_0x2919f6)return null;return{'stableVersion':_0x496cb2,'minimumVersion':_0x2919f6,'upgradeMessage':pickString(_0xd84ab6['upgradeMessage'])||undefined,'minimumVersionMessage':pickString(_0xd84ab6['minimumVersionMessage'])||undefined};}export async function fetchCliVersionPolicy(){const _0x2bfccd=a184_0x5d6e,_0x568a1c=new AbortController(),_0x5681ca=setTimeout(()=>_0x568a1c['abort'](),FETCH_TIMEOUT_MS);try{const _0x4477a7=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':'application/json'},'signal':_0x568a1c[_0x2bfccd(0x1f2)]});if(!_0x4477a7['ok'])return null;const _0x46b008=await _0x4477a7[_0x2bfccd(0x1ef)]();return normalizeCliVersionPolicy(_0x46b008);}catch{return null;}finally{clearTimeout(_0x5681ca);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x3141a0=a184_0x5d6e,_0x2a20a5=Date[_0x3141a0(0x1e3)]();if(hasCachedPolicy){const _0x1ec755=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2a20a5-cacheTime<_0x1ec755)return cachedPolicy;}const _0x1c2bc0=await fetchCliVersionPolicy();return cachedPolicy=_0x1c2bc0,cacheTime=_0x2a20a5,hasCachedPolicy=!![],_0x1c2bc0;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a185_0xe2f892=a185_0x30c9;(function(_0x4c5bb7,_0x4d5f5c){const _0x2bbc1=a185_0x30c9,_0x530f66=_0x4c5bb7();while(!![]){try{const _0x54983d=-parseInt(_0x2bbc1(0x15d))/0x1*(parseInt(_0x2bbc1(0x168))/0x2)+parseInt(_0x2bbc1(0x15c))/0x3+-parseInt(_0x2bbc1(0x161))/0x4+-parseInt(_0x2bbc1(0x167))/0x5*(-parseInt(_0x2bbc1(0x163))/0x6)+-parseInt(_0x2bbc1(0x15e))/0x7*(-parseInt(_0x2bbc1(0x165))/0x8)+-parseInt(_0x2bbc1(0x162))/0x9*(parseInt(_0x2bbc1(0x160))/0xa)+parseInt(_0x2bbc1(0x164))/0xb;if(_0x54983d===_0x4d5f5c)break;else _0x530f66['push'](_0x530f66['shift']());}catch(_0xe0993){_0x530f66['push'](_0x530f66['shift']());}}}(a185_0x49f3,0x2c19e));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a185_0x1d54c2,getMultiAppConfigs as a185_0x1644dd,getTemplateBaseUrl as a185_0x121767}from'../context.js';function a185_0x30c9(_0x15486c,_0xe29f63){_0x15486c=_0x15486c-0x15c;const _0x49f321=a185_0x49f3();let _0x30c9bf=_0x49f321[_0x15486c];return _0x30c9bf;}function a185_0x49f3(){const _0x56d048=['4663890lhvVvK','120qsUTaw','string','483355wbwEQC','4NnEQjG','620163QGeUxU','171604GoCSek','55797hDybhF','project','50HYQFwA','813424stpIIL','215541XlsawN','6Hcpntb'];a185_0x49f3=function(){return _0x56d048;};return a185_0x49f3();}export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x2d1589){const _0x4b5a48=a185_0x30c9,_0x500385=readRawConfig(_0x2d1589);return _0x500385['env']&&typeof _0x500385['env']===_0x4b5a48(0x166)&&initEnv(_0x500385['env']),_0x500385;}export function getConfigAppCode(){return a185_0x1d54c2();}export function getMultiAppConfigs(_0x9ded6b=a185_0xe2f892(0x15f)){return a185_0x1644dd(_0x9ded6b);}export function getTemplateBaseUrl(){return a185_0x121767();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2019cc,_0x5d693d){const _0x515081=a186_0x2182,_0x4f5583=_0x2019cc();while(!![]){try{const _0x5670cb=-parseInt(_0x515081(0x157))/0x1*(parseInt(_0x515081(0x15d))/0x2)+parseInt(_0x515081(0x155))/0x3*(-parseInt(_0x515081(0x15c))/0x4)+parseInt(_0x515081(0x153))/0x5+parseInt(_0x515081(0x15a))/0x6+parseInt(_0x515081(0x160))/0x7+parseInt(_0x515081(0x154))/0x8*(-parseInt(_0x515081(0x161))/0x9)+parseInt(_0x515081(0x15e))/0xa;if(_0x5670cb===_0x5d693d)break;else _0x4f5583['push'](_0x4f5583['shift']());}catch(_0x344af2){_0x4f5583['push'](_0x4f5583['shift']());}}}(a186_0x54c8,0x788d1));import a186_0x4a49b2 from'node:path';function a186_0x2182(_0x12fb10,_0x49c1fc){_0x12fb10=_0x12fb10-0x153;const _0x54c845=a186_0x54c8();let _0x2182a5=_0x54c845[_0x12fb10];return _0x2182a5;}function a186_0x54c8(){const _0x3a922b=['1qfWZXt','mkdirSync','name','772932srtvFg','join','2216hvRuDL','1236798wlDdnL','7089730cxEEyz','error','6608756gqujzu','12861Geilvw','1929810UsglLT','1720QIctqv','4053foHPWP','复制目录时出错:'];a186_0x54c8=function(){return _0x3a922b;};return a186_0x54c8();}import a186_0x3a87b3 from'node:fs';export async function copyDirectory(_0x1c56f7,_0x2749fc){const _0x5bcd6c=a186_0x2182;try{const _0xe51038=a186_0x3a87b3['readdirSync'](_0x1c56f7,{'withFileTypes':!![]});a186_0x3a87b3[_0x5bcd6c(0x158)](_0x2749fc,{'recursive':!![]});for(const _0x26362f of _0xe51038){const _0x1f1f41=a186_0x4a49b2[_0x5bcd6c(0x15b)](_0x1c56f7,_0x26362f[_0x5bcd6c(0x159)]),_0x3f67b4=a186_0x4a49b2[_0x5bcd6c(0x15b)](_0x2749fc,_0x26362f['name']);_0x26362f['isDirectory']()?await copyDirectory(_0x1f1f41,_0x3f67b4):a186_0x3a87b3['copyFileSync'](_0x1f1f41,_0x3f67b4);}}catch(_0x1338b3){console[_0x5bcd6c(0x15f)](_0x5bcd6c(0x156),_0x1338b3);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x3aaeb4,_0x3b352d){const _0x5dbd7d=a187_0x2bd2,_0x52c9f7=_0x3aaeb4();while(!![]){try{const _0x226828=parseInt(_0x5dbd7d(0xe8))/0x1*(-parseInt(_0x5dbd7d(0xea))/0x2)+parseInt(_0x5dbd7d(0xdf))/0x3*(parseInt(_0x5dbd7d(0xe3))/0x4)+parseInt(_0x5dbd7d(0xde))/0x5*(-parseInt(_0x5dbd7d(0xe0))/0x6)+-parseInt(_0x5dbd7d(0xe1))/0x7*(parseInt(_0x5dbd7d(0xdb))/0x8)+-parseInt(_0x5dbd7d(0xeb))/0x9+-parseInt(_0x5dbd7d(0xdd))/0xa*(parseInt(_0x5dbd7d(0xe4))/0xb)+-parseInt(_0x5dbd7d(0xe9))/0xc*(-parseInt(_0x5dbd7d(0xe6))/0xd);if(_0x226828===_0x3b352d)break;else _0x52c9f7['push'](_0x52c9f7['shift']());}catch(_0x27f0af){_0x52c9f7['push'](_0x52c9f7['shift']());}}}(a187_0x426e,0x6d70f));function toFiniteNumber(_0x37de47){const _0x4ce83f=a187_0x2bd2;if(typeof _0x37de47===_0x4ce83f(0xe7)&&Number['isFinite'](_0x37de47))return _0x37de47;if(typeof _0x37de47===_0x4ce83f(0xe5)){const _0x1db532=_0x37de47[_0x4ce83f(0xe2)]();if(!_0x1db532)return undefined;const _0x27154e=Number(_0x1db532);if(Number['isFinite'](_0x27154e))return _0x27154e;}return undefined;}function a187_0x426e(){const _0x2c7794=['5BILJOR','54EyRdMc','2072634yCYgEI','1057kiAkCJ','trim','190600hTMEKb','7323283pHLffY','string','31786833mLHgvh','number','6NxCtsS','12qoPMik','234976gGrLyS','7907211ARSKhR','13768dwvEIE','object','10VFrWlV'];a187_0x426e=function(){return _0x2c7794;};return a187_0x426e();}function a187_0x2bd2(_0x73773,_0x46c81a){_0x73773=_0x73773-0xdb;const _0x426e07=a187_0x426e();let _0x2bd299=_0x426e07[_0x73773];return _0x2bd299;}export function normalizeEntityWithIdResponse(_0x37403c){const _0x6c860c=a187_0x2bd2,_0x70d787=toFiniteNumber(_0x37403c);if(_0x70d787!==undefined)return{'id':_0x70d787,'entity':{'id':_0x70d787}};if(!_0x37403c||typeof _0x37403c!==_0x6c860c(0xdc))return{'id':undefined,'entity':{}};const _0x3825e4={..._0x37403c},_0x29c466=toFiniteNumber(_0x3825e4['id']);return _0x29c466!==undefined&&(_0x3825e4['id']=_0x29c466),{'id':_0x29c466,'entity':_0x3825e4};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a188_0x52c0(_0x4cd37b,_0x268efd){_0x4cd37b=_0x4cd37b-0xf8;const _0x2cfe61=a188_0x2cfe();let _0x52c019=_0x2cfe61[_0x4cd37b];return _0x52c019;}(function(_0x4d5b02,_0x17bfcb){const _0x18d012=a188_0x52c0,_0x3cdf99=_0x4d5b02();while(!![]){try{const _0x57fe06=-parseInt(_0x18d012(0xfc))/0x1*(-parseInt(_0x18d012(0x101))/0x2)+-parseInt(_0x18d012(0xf9))/0x3+parseInt(_0x18d012(0x103))/0x4*(parseInt(_0x18d012(0xfa))/0x5)+parseInt(_0x18d012(0xf8))/0x6*(-parseInt(_0x18d012(0xfb))/0x7)+-parseInt(_0x18d012(0xfe))/0x8+-parseInt(_0x18d012(0xff))/0x9*(parseInt(_0x18d012(0x102))/0xa)+parseInt(_0x18d012(0x100))/0xb;if(_0x57fe06===_0x17bfcb)break;else _0x3cdf99['push'](_0x3cdf99['shift']());}catch(_0x52545e){_0x3cdf99['push'](_0x3cdf99['shift']());}}}(a188_0x2cfe,0x39b49));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x58a409,_0x28dcfc){const _0x5e7ec7=a188_0x52c0,_0x3e6787=statSync(_0x58a409);if(_0x3e6787[_0x5e7ec7(0xfd)]()){!existsSync(_0x28dcfc)&&mkdirSync(_0x28dcfc,{'recursive':!![]});const _0x300db2=readdirSync(_0x58a409);for(const _0x10a0e7 of _0x300db2){await copyDir(join(_0x58a409,_0x10a0e7),join(_0x28dcfc,_0x10a0e7));}}else copyFileSync(_0x58a409,_0x28dcfc);}export function ensureDir(_0x3a96c7){!existsSync(_0x3a96c7)&&mkdirSync(_0x3a96c7,{'recursive':!![]});}function a188_0x2cfe(){const _0x13672f=['1280916MKBvMm','150pVwPsa','1659rOmrjE','123903JmSgVY','isDirectory','1108864CUyAsb','45VXCCza','11028699wVASyL','2cWVgIE','668060azRbEJ','4832yFbwVA','678VKwyBm'];a188_0x2cfe=function(){return _0x13672f;};return a188_0x2cfe();}export function pathExists(_0x449dcd){return existsSync(_0x449dcd);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a189_0xa167c5=a189_0x1f11;(function(_0x21d486,_0x1aeb41){const _0x577bd6=a189_0x1f11,_0x2bf6eb=_0x21d486();while(!![]){try{const _0x18d460=parseInt(_0x577bd6(0xe2))/0x1+parseInt(_0x577bd6(0xcd))/0x2*(parseInt(_0x577bd6(0xd4))/0x3)+parseInt(_0x577bd6(0xe0))/0x4*(-parseInt(_0x577bd6(0xdc))/0x5)+parseInt(_0x577bd6(0xd7))/0x6+-parseInt(_0x577bd6(0xc9))/0x7*(-parseInt(_0x577bd6(0xd5))/0x8)+-parseInt(_0x577bd6(0xe1))/0x9+-parseInt(_0x577bd6(0xc1))/0xa;if(_0x18d460===_0x1aeb41)break;else _0x2bf6eb['push'](_0x2bf6eb['shift']());}catch(_0x3e2dee){_0x2bf6eb['push'](_0x2bf6eb['shift']());}}}(a189_0x216e,0x382ea));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x183e4f=getTemplateBaseUrl();return _0x183e4f+'/skills/guides.json';}const CACHE_DIR=join(homedir(),a189_0xa167c5(0xdb),a189_0xa167c5(0xd8));export async function fetchGuidesFromCDN(){const _0x317d2f=a189_0xa167c5,_0xb345eb=getGuidesCdnUrl(),_0x1d46b7=await fetch(_0xb345eb,{'headers':{'Accept':_0x317d2f(0xc6)}});if(!_0x1d46b7['ok'])throw new Error(_0x317d2f(0xd3)+_0x1d46b7[_0x317d2f(0xc3)]+'\x20'+_0x1d46b7[_0x317d2f(0xd9)]);const _0x1ff0b2=await _0x1d46b7[_0x317d2f(0xd6)]();if(!_0x1ff0b2[_0x317d2f(0xcc)]||typeof _0x1ff0b2['guides']!==_0x317d2f(0xc8))throw new Error('CDN\x20返回数据格式错误');return _0x1ff0b2;}export function writeGuidesToProject(_0x1e2266,_0x148b04,_0x4b56f0=a189_0xa167c5(0xdf),_0x30e2c0){const _0x44ca33=a189_0xa167c5,_0x4919f3=join(_0x148b04,_0x4b56f0);mkdirSync(_0x4919f3,{'recursive':!![]});for(const [_0x17e172,_0x4b225a]of Object[_0x44ca33(0xda)](_0x1e2266['guides'])){let _0x3aa2ee=_0x4b225a[_0x44ca33(0xc7)];_0x4b225a['lastUpdated']&&(_0x3aa2ee=appendUpdateTime(_0x3aa2ee,_0x4b225a[_0x44ca33(0xdd)])),writeFileSync(join(_0x4919f3,_0x17e172+_0x44ca33(0xce)),_0x3aa2ee,_0x44ca33(0xd2));}}export function appendUpdateTime(_0x485c53,_0x17dc1f){const _0x56cf52=a189_0xa167c5;return _0x485c53=_0x485c53[_0x56cf52(0xd0)](/\n*>更新时间:.*$/m,''),_0x485c53[_0x56cf52(0xcb)]()+(_0x56cf52(0xc4)+_0x17dc1f);}export function getSkillTemplate(_0x314110){const _0x471760=a189_0xa167c5;return _0x314110[_0x471760(0xc0)]?.[_0x471760(0xc7)]||'';}export function appendExtendContents(_0x3392e7,_0x66d8d6,_0x260815){const _0x19dc91=a189_0xa167c5,_0x3391e6=[];for(const [,_0x1bb77a]of Object[_0x19dc91(0xda)](_0x66d8d6[_0x19dc91(0xcc)])){_0x1bb77a[_0x19dc91(0xde)]&&_0x3391e6[_0x19dc91(0xd1)](_0x1bb77a['extendContent'][_0x19dc91(0xcb)]());}if(_0x3391e6[_0x19dc91(0xc2)]===0x0)return _0x3392e7;return _0x3392e7[_0x19dc91(0xcb)]()+'\x0a\x0a'+_0x3391e6[_0x19dc91(0xca)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x1b13dc,_0x590e18,_0x5ba5ce){const _0x866802=a189_0xa167c5,_0x235872=getSkillTemplate(_0x1b13dc);if(!_0x235872)throw new Error('CDN\x20数据中缺少\x20skillTemplate');const _0x113d58=dirname(_0x590e18);mkdirSync(_0x113d58,{'recursive':!![]});let _0x1407af=_0x235872[_0x866802(0xd0)](/\{\{IDE_NAME\}\}/g,_0x5ba5ce);_0x1407af=appendExtendContents(_0x1407af,_0x1b13dc),_0x1b13dc['skillTemplate'][_0x866802(0xdd)]&&(_0x1407af=appendUpdateTime(_0x1407af,_0x1b13dc[_0x866802(0xc0)][_0x866802(0xdd)])),writeFileSync(_0x590e18,_0x1407af,_0x866802(0xd2));}function a189_0x1f11(_0x475d9f,_0x5e583d){_0x475d9f=_0x475d9f-0xc0;const _0x216e11=a189_0x216e();let _0x1f1128=_0x216e11[_0x475d9f];return _0x1f1128;}export async function installGuides(_0x58ea1b){const _0x483365=a189_0xa167c5,_0x354323=await fetchGuidesFromCDN();return writeGuidesToProject(_0x354323,_0x58ea1b),Object[_0x483365(0xcf)](_0x354323[_0x483365(0xcc)])['length'];}function a189_0x216e(){const _0x1f4af8=['extendContent','.lovrabet/skill/guides','1612pLtPlq','1575873bdwNEp','287759pyDDjH','skillTemplate','5946060IhEaSJ','length','status','\x0a\x0a>更新时间:','map','application/json','content','object','2149vpobYO','join','trimEnd','guides','2TqhcmK','.md','keys','replace','push','utf-8','CDN\x20请求失败:\x20','962811ibHLjE','6208ZLjhBS','json','2680104wutXai','cache','statusText','entries','.lovrabet','3645FbNApI','lastUpdated'];a189_0x216e=function(){return _0x1f4af8;};return a189_0x216e();}export function getGuidesSummary(_0x42e046){const _0x180322=a189_0xa167c5;return Object['entries'](_0x42e046[_0x180322(0xcc)])[_0x180322(0xc5)](([_0x5d26a4,_0x37a00f])=>({'key':_0x5d26a4,'title':_0x37a00f['title'],'path':_0x37a00f['path']}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x33c2e6,_0x434a8f){const _0x28a154=a190_0x166a,_0x44eb03=_0x33c2e6();while(!![]){try{const _0x308877=-parseInt(_0x28a154(0xc3))/0x1*(parseInt(_0x28a154(0xc6))/0x2)+parseInt(_0x28a154(0xbe))/0x3+-parseInt(_0x28a154(0xb3))/0x4*(-parseInt(_0x28a154(0xba))/0x5)+-parseInt(_0x28a154(0xb5))/0x6*(-parseInt(_0x28a154(0xb2))/0x7)+parseInt(_0x28a154(0xc8))/0x8*(parseInt(_0x28a154(0xcd))/0x9)+-parseInt(_0x28a154(0xc5))/0xa*(-parseInt(_0x28a154(0xd1))/0xb)+parseInt(_0x28a154(0xb8))/0xc*(-parseInt(_0x28a154(0xbc))/0xd);if(_0x308877===_0x434a8f)break;else _0x44eb03['push'](_0x44eb03['shift']());}catch(_0x18c9ee){_0x44eb03['push'](_0x44eb03['shift']());}}}(a190_0x50ad,0xa7e70));function a190_0x166a(_0x3e8aec,_0x16028b){_0x3e8aec=_0x3e8aec-0xb2;const _0x50adf5=a190_0x50ad();let _0x166a8d=_0x50adf5[_0x3e8aec];return _0x166a8d;}export async function httpRequest(_0x737dbd,_0xf5b046={}){const _0x1e0363=a190_0x166a,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0xf5b046;let _0x1d3803=null;for(let _0x1cb38a=0x0;_0x1cb38a<=retries;_0x1cb38a++){try{const _0x406fde=new AbortController(),_0x19dd6b=setTimeout(()=>_0x406fde[_0x1e0363(0xb7)](),timeout),_0x781037=await fetch(_0x737dbd,{'headers':headers,'signal':_0x406fde[_0x1e0363(0xc0)]});clearTimeout(_0x19dd6b);let _0x6ba6dd;const _0x5f0f33=_0x781037['headers'][_0x1e0363(0xcf)](_0x1e0363(0xbb));return _0x5f0f33?.[_0x1e0363(0xb6)](_0x1e0363(0xbd))?_0x6ba6dd=await _0x781037[_0x1e0363(0xcc)]():_0x6ba6dd=await _0x781037[_0x1e0363(0xd0)](),{'ok':_0x781037['ok'],'status':_0x781037[_0x1e0363(0xc2)],'statusText':_0x781037['statusText'],'data':_0x6ba6dd,'headers':_0x781037[_0x1e0363(0xb4)],'url':_0x781037[_0x1e0363(0xce)],'text':()=>_0x781037[_0x1e0363(0xd0)]()};}catch(_0x9c1914){_0x1d3803=_0x9c1914 instanceof Error?_0x9c1914:new Error(String(_0x9c1914));if(_0x1cb38a===retries)break;if(shouldRetry(_0x9c1914)){console[_0x1e0363(0xcb)](_0x1e0363(0xc9)+retryDelay+_0x1e0363(0xd2)+(_0x1cb38a+0x1)+_0x1e0363(0xca)),await sleep(retryDelay);continue;}else break;}}throw _0x1d3803||new Error('Request\x20failed');}function shouldRetry(_0x23445e){const _0x456ef1=a190_0x166a;if(_0x23445e instanceof Error){if(_0x23445e[_0x456ef1(0xbf)]==='AbortError')return![];if(_0x23445e['name']===_0x456ef1(0xc7)&&_0x23445e['message']['includes'](_0x456ef1(0xb9)))return!![];if(_0x23445e[_0x456ef1(0xc4)]['includes'](_0x456ef1(0xc1)))return!![];if(_0x23445e[_0x456ef1(0xc4)]['includes']('ENOTFOUND'))return![];}return![];}function sleep(_0x2f86dc){return new Promise(_0x43cc96=>setTimeout(_0x43cc96,_0x2f86dc));}function a190_0x50ad(){const _0x31a54c=['8lHYOcl','headers','12XVRrph','includes','abort','852AJOHod','fetch','1374645uGpxXf','content-type','275041ACOfSd','application/json','1454673tuDixG','name','signal','ECONNRESET','status','972463xTeCSc','message','70bIGGiC','2pTQMmO','TypeError','104OiEmgQ','*\x20请求失败,','\x20次重试...','log','json','419598wdMAgA','url','get','text','1106281YRhHHw','ms\x20后进行第\x20','2861271oabJnQ'];a190_0x50ad=function(){return _0x31a54c;};return a190_0x50ad();}export function validateUrl(_0x8772c6){try{return new URL(_0x8772c6),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4205a8,_0x7a83f){const _0x5b9f5d=a191_0x5320,_0x512842=_0x4205a8();while(!![]){try{const _0x1bdf85=parseInt(_0x5b9f5d(0x1ba))/0x1*(-parseInt(_0x5b9f5d(0x1b6))/0x2)+parseInt(_0x5b9f5d(0x1bf))/0x3+-parseInt(_0x5b9f5d(0x1c1))/0x4+parseInt(_0x5b9f5d(0x1be))/0x5*(parseInt(_0x5b9f5d(0x1b9))/0x6)+parseInt(_0x5b9f5d(0x1c0))/0x7+-parseInt(_0x5b9f5d(0x1c2))/0x8+parseInt(_0x5b9f5d(0x1bd))/0x9*(parseInt(_0x5b9f5d(0x1bb))/0xa);if(_0x1bdf85===_0x7a83f)break;else _0x512842['push'](_0x512842['shift']());}catch(_0x3d954d){_0x512842['push'](_0x512842['shift']());}}}(a191_0x11cd,0x3de36));function env(_0x44e319){return process.env[`RABETBASE_${_0x44e319}`]||process.env[`LOVRABET_${_0x44e319}`]||undefined;}function a191_0x5320(_0x8e330f,_0x271f49){_0x8e330f=_0x8e330f-0x1b4;const _0x11cdee=a191_0x11cd();let _0x532053=_0x11cdee[_0x8e330f];return _0x532053;}export function isNonInteractive(_0x372cbb){const _0x4582a0=a191_0x5320;return!!(_0x372cbb[_0x4582a0(0x1b8)]||_0x372cbb['ci']||env('CI')==='true'||process.env.CI==='true'||!process[_0x4582a0(0x1b5)]['isTTY']||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x308446=a191_0x5320;if(!process[_0x308446(0x1c3)][_0x308446(0x1b7)])return![];try{const _0x51c8f9=process['stdin'][_0x308446(0x1b4)];return process[_0x308446(0x1c3)]['setRawMode'](!![]),process[_0x308446(0x1c3)][_0x308446(0x1bc)](_0x51c8f9??![]),!![];}catch{return![];}}function a191_0x11cd(){const _0x465620=['4160020RoyBsU','setRawMode','18aYBfsq','649505UFSzAa','637551CBJcUF','1429806VLxbVS','1781424hECIbf','4018808giWvam','stdin','isRaw','stdout','18682msaocj','isTTY','nonInteractive','6YZHqFK','19GTHIlZ'];a191_0x11cd=function(){return _0x465620;};return a191_0x11cd();}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x40c2c3=a192_0x2417;(function(_0x1e5273,_0x37e921){const _0x3f8dc5=a192_0x2417,_0x49dab1=_0x1e5273();while(!![]){try{const _0x1fb0a4=-parseInt(_0x3f8dc5(0x179))/0x1+-parseInt(_0x3f8dc5(0x153))/0x2*(parseInt(_0x3f8dc5(0x14a))/0x3)+parseInt(_0x3f8dc5(0x160))/0x4*(-parseInt(_0x3f8dc5(0x171))/0x5)+parseInt(_0x3f8dc5(0x17a))/0x6+-parseInt(_0x3f8dc5(0x17d))/0x7*(parseInt(_0x3f8dc5(0x15d))/0x8)+parseInt(_0x3f8dc5(0x17e))/0x9+parseInt(_0x3f8dc5(0x168))/0xa;if(_0x1fb0a4===_0x37e921)break;else _0x49dab1['push'](_0x49dab1['shift']());}catch(_0x49811f){_0x49dab1['push'](_0x49dab1['shift']());}}}(a192_0x1165,0x8ff09));import a192_0x41df6b from'winston';function a192_0x2417(_0x356687,_0x27e87e){_0x356687=_0x356687-0x149;const _0x11653a=a192_0x1165();let _0x241755=_0x11653a[_0x356687];return _0x241755;}import a192_0x12e43b from'node:fs';import a192_0x387368 from'node:path';function a192_0x1165(){const _0x1a1fef=['join','writeFileSync','success','getWinstonInstance','clear','winstonLogger','blue','error','200BFoBck','existsSync','Failed\x20to\x20clear\x20logs:','8crnfTB','clearLogs','green','parse','initWinstonLogger','split','stringify','trim','18170820WRYMkh','createLogger','map','setLogPath','utf8','mkdirSync','errors','message','readLogs','1520030JgGwdl','command','warn','now','format','info','timestamp','logTask','769307GXdQGl','4987800KmjDwZ','开始执行:\x20','currentRawCommand','3409rJCtRa','1965474VMmBbL','combine','unknown','rawCommand','dirname','2663091qVOCCt','完成:\x20','log','logFilePath','readFileSync','.lovrabet.log','失败:\x20','yellow','printf','2TVODin','File'];a192_0x1165=function(){return _0x1a1fef;};return a192_0x1165();}class Logger{[a192_0x40c2c3(0x15a)];[a192_0x40c2c3(0x14d)];[a192_0x40c2c3(0x17c)]='';constructor(){const _0x5dc559=a192_0x40c2c3;this[_0x5dc559(0x14d)]='';}['setRawCommand'](_0x203e4e){const _0x5b0eeb=a192_0x40c2c3;this[_0x5b0eeb(0x17c)]=_0x203e4e;}[a192_0x40c2c3(0x164)](){const _0x1a22e8=a192_0x40c2c3,_0x30ff47=a192_0x387368[_0x1a22e8(0x149)](this[_0x1a22e8(0x14d)]);!a192_0x12e43b[_0x1a22e8(0x15e)](_0x30ff47)&&a192_0x12e43b[_0x1a22e8(0x16d)](_0x30ff47,{'recursive':!![]});const _0x4bb7fd=a192_0x41df6b['format'][_0x1a22e8(0x17f)](a192_0x41df6b['format']['timestamp'](),a192_0x41df6b[_0x1a22e8(0x175)][_0x1a22e8(0x16e)]({'stack':!![]}),a192_0x41df6b[_0x1a22e8(0x175)][_0x1a22e8(0x152)](_0x55a2cc=>{const _0x82ed64=_0x1a22e8,_0x459a78={'timestamp':_0x55a2cc[_0x82ed64(0x177)]||new Date()['toISOString'](),'level':_0x55a2cc['level']||_0x82ed64(0x176),'command':_0x55a2cc[_0x82ed64(0x172)]||_0x82ed64(0x180),'rawCommand':_0x55a2cc[_0x82ed64(0x181)]||this[_0x82ed64(0x17c)]||undefined,'message':_0x55a2cc[_0x82ed64(0x16f)]||'','duration':_0x55a2cc['duration']||undefined,'details':_0x55a2cc['details']||undefined};return JSON[_0x82ed64(0x166)](_0x459a78);}));this['winstonLogger']=a192_0x41df6b[_0x1a22e8(0x169)]({'level':_0x1a22e8(0x176),'format':_0x4bb7fd,'transports':[new a192_0x41df6b['transports'][(_0x1a22e8(0x154))]({'filename':this[_0x1a22e8(0x14d)],'level':'info'})],'silent':![]}),a192_0x41df6b['addColors']({'success':_0x1a22e8(0x162),'error':'red','warn':_0x1a22e8(0x151),'info':_0x1a22e8(0x15b)});}[a192_0x40c2c3(0x16b)](_0x35b0d2){const _0x2d137a=a192_0x40c2c3;this[_0x2d137a(0x14d)]=a192_0x387368[_0x2d137a(0x155)](_0x35b0d2,_0x2d137a(0x14f)),this[_0x2d137a(0x15a)]&&this['winstonLogger'][_0x2d137a(0x159)](),this[_0x2d137a(0x164)]();}[a192_0x40c2c3(0x176)](_0x36aa27,_0x39d1a1,_0x335792){const _0x47a6ce=a192_0x40c2c3;if(!this[_0x47a6ce(0x14d)]||!this[_0x47a6ce(0x15a)])return;this[_0x47a6ce(0x15a)][_0x47a6ce(0x176)](_0x39d1a1,{'command':_0x36aa27,'details':_0x335792});}[a192_0x40c2c3(0x157)](_0x2508fc,_0x4409d3,_0xa927ca,_0x151fca){const _0x5e9d6f=a192_0x40c2c3;if(!this['logFilePath']||!this[_0x5e9d6f(0x15a)])return;this['winstonLogger'][_0x5e9d6f(0x14c)](_0x5e9d6f(0x176),_0x4409d3,{'level':_0x5e9d6f(0x157),'command':_0x2508fc,'duration':_0xa927ca,'details':_0x151fca});}[a192_0x40c2c3(0x15c)](_0xc1206,_0x218ed7,_0x1ad00a){const _0x753bd7=a192_0x40c2c3;if(!this[_0x753bd7(0x14d)]||!this[_0x753bd7(0x15a)])return;this[_0x753bd7(0x15a)][_0x753bd7(0x15c)](_0x218ed7,{'command':_0xc1206,'details':_0x1ad00a});}[a192_0x40c2c3(0x173)](_0x36aa68,_0x25cd8b,_0x667eb3){const _0x2bda7e=a192_0x40c2c3;if(!this[_0x2bda7e(0x14d)]||!this['winstonLogger'])return;this[_0x2bda7e(0x15a)][_0x2bda7e(0x173)](_0x25cd8b,{'command':_0x36aa68,'details':_0x667eb3});}async[a192_0x40c2c3(0x178)](_0x4c18ff,_0x291545,_0x40ea23){const _0x28770b=a192_0x40c2c3,_0xa0853a=Date['now']();this[_0x28770b(0x176)](_0x4c18ff,_0x28770b(0x17b)+_0x291545);try{const _0x3cda3e=await _0x40ea23(),_0x3190d5=Date[_0x28770b(0x174)]()-_0xa0853a;return this[_0x28770b(0x157)](_0x4c18ff,_0x28770b(0x14b)+_0x291545,_0x3190d5),_0x3cda3e;}catch(_0x18bb48){const _0x11d092=Date[_0x28770b(0x174)]()-_0xa0853a;this[_0x28770b(0x15c)](_0x4c18ff,_0x28770b(0x150)+_0x291545,{'error':_0x18bb48 instanceof Error?_0x18bb48[_0x28770b(0x16f)]:String(_0x18bb48),'duration':_0x11d092});throw _0x18bb48;}}[a192_0x40c2c3(0x170)](){const _0x32883f=a192_0x40c2c3;try{if(!a192_0x12e43b['existsSync'](this['logFilePath']))return[];const _0x1537fb=a192_0x12e43b[_0x32883f(0x14e)](this[_0x32883f(0x14d)],_0x32883f(0x16c));return _0x1537fb[_0x32883f(0x165)]('\x0a')['filter'](_0x228a0e=>_0x228a0e[_0x32883f(0x167)]())[_0x32883f(0x16a)](_0x235836=>JSON[_0x32883f(0x163)](_0x235836));}catch(_0x54c2f3){return console[_0x32883f(0x173)]('Failed\x20to\x20read\x20logs:',_0x54c2f3),[];}}[a192_0x40c2c3(0x161)](){const _0x31426b=a192_0x40c2c3;try{a192_0x12e43b['existsSync'](this[_0x31426b(0x14d)])&&a192_0x12e43b[_0x31426b(0x156)](this['logFilePath'],'',_0x31426b(0x16c));}catch(_0x372b04){console[_0x31426b(0x173)](_0x31426b(0x15f),_0x372b04);}}[a192_0x40c2c3(0x158)](){const _0x18df50=a192_0x40c2c3;return this[_0x18df50(0x15a)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x159876,_0xb2c8be){const _0x59f41f=a193_0x40f0,_0x2e67c4=_0x159876();while(!![]){try{const _0x361300=-parseInt(_0x59f41f(0x1cb))/0x1*(-parseInt(_0x59f41f(0x1c1))/0x2)+-parseInt(_0x59f41f(0x1c4))/0x3*(parseInt(_0x59f41f(0x1ca))/0x4)+parseInt(_0x59f41f(0x1c7))/0x5+parseInt(_0x59f41f(0x1c9))/0x6+parseInt(_0x59f41f(0x1c3))/0x7*(-parseInt(_0x59f41f(0x1c5))/0x8)+-parseInt(_0x59f41f(0x1c8))/0x9*(parseInt(_0x59f41f(0x1bf))/0xa)+parseInt(_0x59f41f(0x1c2))/0xb;if(_0x361300===_0xb2c8be)break;else _0x2e67c4['push'](_0x2e67c4['shift']());}catch(_0x35710b){_0x2e67c4['push'](_0x2e67c4['shift']());}}}(a193_0x4341,0xbbe51));function a193_0x40f0(_0x285662,_0x3a3770){_0x285662=_0x285662-0x1bd;const _0x43419e=a193_0x4341();let _0x40f0be=_0x43419e[_0x285662];return _0x40f0be;}function a193_0x4341(){const _0x157f35=['Example:\x20--params\x20\x27{\x22id\x22:123}\x27','675090vBaVIe','--params\x20must\x20be\x20a\x20JSON\x20object','85236ZffCME','4415543jGLXWK','749Rctqev','180375hTexqT','75496lGsLhb','Invalid\x20JSON\x20for\x20--params:\x20','3792645keMjVc','54oghPIp','6261522CLDANN','92VZNFcM','32hKBfVi','parse','object','isArray'];a193_0x4341=function(){return _0x157f35;};return a193_0x4341();}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x16a98d){const _0x359e21=a193_0x40f0;if(!_0x16a98d)return undefined;let _0x3003d4;try{_0x3003d4=JSON[_0x359e21(0x1cc)](_0x16a98d);}catch{throw CliErrors['validation'](_0x359e21(0x1c6)+_0x16a98d);}if(!_0x3003d4||typeof _0x3003d4!==_0x359e21(0x1cd)||Array[_0x359e21(0x1bd)](_0x3003d4))throw CliErrors['validation'](_0x359e21(0x1c0),_0x359e21(0x1be));return _0x3003d4;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a194_0x294e(){const _0x1fc840=['.cmd','402408LGrsiB','platform','53695480bZiJRf','5743992mgGbAt','70pLYwDZ','44976ZYQUDX','5113976VcRkkc','3820911CBYBrQ','23zSmLyB','win32','95582KXCsoU','1251gPLhIR'];a194_0x294e=function(){return _0x1fc840;};return a194_0x294e();}const a194_0x3e6c62=a194_0x5060;function a194_0x5060(_0x142f64,_0x3547b2){_0x142f64=_0x142f64-0x17a;const _0x294e7e=a194_0x294e();let _0x50601a=_0x294e7e[_0x142f64];return _0x50601a;}(function(_0x4b7de8,_0x5954cc){const _0x44a53b=a194_0x5060,_0x1ea4b7=_0x4b7de8();while(!![]){try{const _0x5d9bfb=-parseInt(_0x44a53b(0x17e))/0x1*(parseInt(_0x44a53b(0x180))/0x2)+-parseInt(_0x44a53b(0x17d))/0x3+-parseInt(_0x44a53b(0x186))/0x4+-parseInt(_0x44a53b(0x17a))/0x5*(-parseInt(_0x44a53b(0x183))/0x6)+-parseInt(_0x44a53b(0x17c))/0x7+-parseInt(_0x44a53b(0x17b))/0x8*(parseInt(_0x44a53b(0x181))/0x9)+parseInt(_0x44a53b(0x185))/0xa;if(_0x5d9bfb===_0x5954cc)break;else _0x1ea4b7['push'](_0x1ea4b7['shift']());}catch(_0x3841a9){_0x1ea4b7['push'](_0x1ea4b7['shift']());}}}(a194_0x294e,0xf11fe));export const isWindows=process[a194_0x3e6c62(0x184)]===a194_0x3e6c62(0x17f);export function resolveNpmBin(_0x52a755){const _0x46bc7a=a194_0x3e6c62;return isWindows?_0x52a755+_0x46bc7a(0x182):_0x52a755;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a195_0x404289=a195_0x45d4;(function(_0x463416,_0x3a4d73){const _0x44f57f=a195_0x45d4,_0x3aecea=_0x463416();while(!![]){try{const _0x10ab50=parseInt(_0x44f57f(0x161))/0x1+-parseInt(_0x44f57f(0x15a))/0x2+-parseInt(_0x44f57f(0x15d))/0x3+-parseInt(_0x44f57f(0x15c))/0x4+-parseInt(_0x44f57f(0x151))/0x5+-parseInt(_0x44f57f(0x155))/0x6*(-parseInt(_0x44f57f(0x158))/0x7)+parseInt(_0x44f57f(0x14e))/0x8*(-parseInt(_0x44f57f(0x15f))/0x9);if(_0x10ab50===_0x3a4d73)break;else _0x3aecea['push'](_0x3aecea['shift']());}catch(_0x682243){_0x3aecea['push'](_0x3aecea['shift']());}}}(a195_0x4e7c,0xa31c7));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 a195_0x45d4(_0x88b324,_0x4c0b4f){_0x88b324=_0x88b324-0x14c;const _0x4e7c72=a195_0x4e7c();let _0x45d4b5=_0x4e7c72[_0x88b324];return _0x45d4b5;}import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x3bc182=a195_0x45d4,_0x590ddc=getTemplateBaseUrl();return _0x590ddc+_0x3bc182(0x157);}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a195_0x404289(0x154));export async function fetchRulesFromCDN(){const _0x44832f=a195_0x404289,_0x474628=getRulesCdnUrl(),_0x44ce5e=await fetch(_0x474628,{'headers':{'Accept':_0x44832f(0x159)}});if(!_0x44ce5e['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x44ce5e['status']+'\x20'+_0x44ce5e[_0x44832f(0x160)]);const _0xc11386=await _0x44ce5e[_0x44832f(0x153)]();if(!_0xc11386[_0x44832f(0x150)]||typeof _0xc11386[_0x44832f(0x150)]!=='string')throw new Error(_0x44832f(0x14f));return _0xc11386;}function a195_0x4e7c(){const _0x3440cb=['content','777950GHAlfd','lovrabet_rules.mdc','json','../../templates/rules/lovrabet_rules.mdc.tpl','522bZWGCv','agents.md','/rules/rules.json','103754gxLmcg','application/json','102352HyEZbp','lastUpdated','3610728tPMAIJ','912630NmEqpG','本地模板文件不存在:\x20','25227wXZUNd','statusText','1013684snUVRI','.cursor/rules','utf-8','632KeFIyf','CDN\x20返回数据格式错误'];a195_0x4e7c=function(){return _0x3440cb;};return a195_0x4e7c();}export async function getRulesContent(){try{const _0x15f2b1=await fetchRulesFromCDN();return _0x15f2b1['content'];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x3dc0c3=a195_0x404289;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x3dc0c3(0x14d));throw new Error(_0x3dc0c3(0x15e)+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x59af97){const _0x211a5f=a195_0x404289,_0xf50d9b=await fetchRulesFromCDN()['catch'](()=>null);let _0xaa653d;_0xf50d9b?(_0xaa653d=_0xf50d9b[_0x211a5f(0x150)],_0xf50d9b[_0x211a5f(0x15b)]&&(_0xaa653d=appendUpdateTime(_0xaa653d,_0xf50d9b[_0x211a5f(0x15b)]))):_0xaa653d=readLocalTemplate();const _0x3b77cb=dirname(_0x59af97);!existsSync(_0x3b77cb)&&mkdirSync(_0x3b77cb,{'recursive':!![]}),writeFileSync(_0x59af97,_0xaa653d,_0x211a5f(0x14d));}export async function copyRulesToCursor(_0x2f01da){const _0xfabb5=a195_0x404289,_0x5106ac=join(_0x2f01da,_0xfabb5(0x14c)),_0x14b7f7=join(_0x5106ac,_0xfabb5(0x152));if(existsSync(_0x14b7f7))return![];return await writeRulesFile(_0x14b7f7),!![];}export async function copyRulesToAgentsMd(_0x22c32f){const _0x1ad3b5=a195_0x404289,_0x2d54bf=join(_0x22c32f,_0x1ad3b5(0x156));if(existsSync(_0x2d54bf))return![];return await writeRulesFile(_0x2d54bf),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x3ec12b){return new Promise(_0x443b9f=>setTimeout(_0x443b9f,_0x3ec12b));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a197_0x5101(){const _0x307d24=['38299480ZNXzPY','toUpperCase','toLowerCase','promises','processDirectory','readFile','info','.js','datasetCode','getSeconds','message','replaceApiContent','pop','getMonth','toISOString','.scss','readdir','3690oVlWmr','getHours','error','16XDwubP','slice','toDisplayTitle','pad','map','isFile','processTemplate','.css','extname','replaceContent','toComponentName','开始处理模板内容替换','isDirectory','replace','writeFile','split','alias','LOVRABET','processFile','endsWith','YourModel','template','push','.tpl','success','模板内容替换失败','mkdir','\x0a\x20\x20\x20\x20{\x20','alias:\x20\x22','default','charAt','includes','945185umPppv','10332048UegKOx','padStart','getFullYear','202IHmQmq','.md','getMinutes','join','8099FGCGHD','tableName:\x20\x22','formatLocalTimestamp','.json','977563iSGKRr','now','8520489pVTOLN','getDate','utf8','9198cAEEjd','name'];a197_0x5101=function(){return _0x307d24;};return a197_0x5101();}const a197_0x4f4d2e=a197_0x50b5;(function(_0x349d59,_0x2a540e){const _0x43a123=a197_0x50b5,_0x5ead6f=_0x349d59();while(!![]){try{const _0x15ae77=-parseInt(_0x43a123(0x192))/0x1+parseInt(_0x43a123(0x18a))/0x2*(-parseInt(_0x43a123(0x197))/0x3)+parseInt(_0x43a123(0x1ad))/0x4*(-parseInt(_0x43a123(0x186))/0x5)+parseInt(_0x43a123(0x1aa))/0x6*(-parseInt(_0x43a123(0x18e))/0x7)+-parseInt(_0x43a123(0x187))/0x8+parseInt(_0x43a123(0x194))/0x9+parseInt(_0x43a123(0x199))/0xa;if(_0x15ae77===_0x2a540e)break;else _0x5ead6f['push'](_0x5ead6f['shift']());}catch(_0x5563bd){_0x5ead6f['push'](_0x5ead6f['shift']());}}}(a197_0x5101,0xb2477));import a197_0x1bc338 from'node:fs';import a197_0x536ae9 from'node:path';function a197_0x50b5(_0x5dc41b,_0x1388cd){_0x5dc41b=_0x5dc41b-0x174;const _0x510163=a197_0x5101();let _0x50b5b6=_0x510163[_0x5dc41b];return _0x50b5b6;}import{logger}from'../utils/logger.js';import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a197_0x4f4d2e(0x1b0)](_0x3a596f){const _0x5f5dea=a197_0x4f4d2e;return String(_0x3a596f)[_0x5f5dea(0x188)](0x2,'0');}static[a197_0x4f4d2e(0x190)](_0x5454f4){const _0x13926b=a197_0x4f4d2e,_0x326830=_0x5454f4[_0x13926b(0x189)](),_0x244569=this[_0x13926b(0x1b0)](_0x5454f4[_0x13926b(0x1a6)]()+0x1),_0x4202a8=this['pad'](_0x5454f4[_0x13926b(0x195)]()),_0x3d0d9b=this[_0x13926b(0x1b0)](_0x5454f4[_0x13926b(0x1ab)]()),_0x37c5a5=this['pad'](_0x5454f4[_0x13926b(0x18c)]()),_0x4e5ddd=this[_0x13926b(0x1b0)](_0x5454f4[_0x13926b(0x1a2)]());return{'createdAt':_0x326830+'-'+_0x244569+'-'+_0x4202a8+'\x20'+_0x3d0d9b+':'+_0x37c5a5+':'+_0x4e5ddd,'createdDate':_0x326830+'-'+_0x244569+'-'+_0x4202a8,'createdTime':_0x3d0d9b+':'+_0x37c5a5+':'+_0x4e5ddd};}static['toComponentName'](_0x38bc4b){const _0x414f18=a197_0x4f4d2e,_0x51af86=_0x38bc4b[_0x414f18(0x175)]('/')[_0x414f18(0x1a5)]()||_0x38bc4b;return _0x51af86[_0x414f18(0x175)]('-')[_0x414f18(0x1b1)](_0x421ad0=>_0x421ad0[_0x414f18(0x184)](0x0)['toUpperCase']()+_0x421ad0[_0x414f18(0x1ae)](0x1)[_0x414f18(0x19b)]())['join']('');}static[a197_0x4f4d2e(0x1af)](_0xb629f5){const _0xa05c5f=a197_0x4f4d2e,_0x37bbaa=_0xb629f5[_0xa05c5f(0x175)]('/')[_0xa05c5f(0x1a5)]()||_0xb629f5;return _0x37bbaa['split']('-')[_0xa05c5f(0x1b1)](_0x565e22=>_0x565e22[_0xa05c5f(0x184)](0x0)[_0xa05c5f(0x19a)]()+_0x565e22[_0xa05c5f(0x1ae)](0x1)[_0xa05c5f(0x19b)]())[_0xa05c5f(0x18d)]('\x20');}static[a197_0x4f4d2e(0x1b6)](_0x390412,_0x4f550a,_0x3c77bb){const _0xc2eff8=a197_0x4f4d2e,_0x40af21=this[_0xc2eff8(0x1b7)](_0x4f550a),_0x21d34b=this[_0xc2eff8(0x1af)](_0x4f550a),{createdAt:_0xcad623,createdDate:_0x38075e,createdTime:_0x130bd6}=this[_0xc2eff8(0x190)](new Date());let _0x2a4b1d=_0x390412[_0xc2eff8(0x1ba)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x40af21)[_0xc2eff8(0x1ba)](/\{DisplayTitle\}/g,_0x21d34b)['replace'](/\{PageName\}/g,_0x4f550a)[_0xc2eff8(0x1ba)](/\{TemplateName\}/g,_0x3c77bb)[_0xc2eff8(0x1ba)](/\{CreatedAt\}/g,_0xcad623)[_0xc2eff8(0x1ba)](/\{CreatedDate\}/g,_0x38075e)[_0xc2eff8(0x1ba)](/\{CreatedTime\}/g,_0x130bd6);return _0x2a4b1d;}static[a197_0x4f4d2e(0x1a4)](_0x4cb8dd,_0x4bbe40,_0x20d428,_0x218d0d,_0x14c79c,_0x12f38b,_0x4269ea,_0x21be44){const _0x5df155=a197_0x4f4d2e,_0x4e0d18=new Date(),_0x5924e2=_0x4e0d18[_0x5df155(0x1a7)](),_0x5c5853=_0x20d428[_0x5df155(0x1b1)](_0x38c68d=>{const _0x3f68b3=_0x5df155,_0x4d1ed9=['datasetCode:\x20\x22'+_0x38c68d[_0x3f68b3(0x1a1)]+'\x22',_0x3f68b3(0x18f)+_0x38c68d['tableName']+'\x22','name:\x20\x22'+_0x38c68d['name']+'\x22'];return _0x38c68d[_0x3f68b3(0x176)]&&_0x4d1ed9[_0x3f68b3(0x17c)](_0x3f68b3(0x182)+_0x38c68d[_0x3f68b3(0x176)]+'\x22'),_0x3f68b3(0x181)+_0x4d1ed9['join'](',\x20')+'\x20},';})['join'](''),_0x50aa8b=_0x218d0d||_0x20d428[0x0]?.['alias']||_0x5df155(0x17a);let _0x172366=_0x4cb8dd[_0x5df155(0x1ba)](/\{AppCode\}/g,_0x4bbe40)['replace'](/\{ModelConfigs\}/g,_0x5c5853)[_0x5df155(0x1ba)](/\{ExampleModelName\}/g,_0x50aa8b)[_0x5df155(0x1ba)](/\{ApiFileName\}/g,_0x14c79c||'api')[_0x5df155(0x1ba)](/\{ConfigName\}/g,_0x12f38b||_0x5df155(0x183))[_0x5df155(0x1ba)](/\{ClientConfigParam\}/g,_0x4269ea||'')['replace'](/\{VarPrefix\}/g,_0x21be44||_0x5df155(0x177))[_0x5df155(0x1ba)](/\{CreatedAt\}/g,_0x5924e2);return _0x172366;}static async[a197_0x4f4d2e(0x1b3)](_0x55b8a7,_0x85278b,_0x52d9e6,_0x32b832,_0x11e8ca=!![]){const _0x2b2b49=a197_0x4f4d2e,_0x14a32b=Date['now']();try{_0x11e8ca&&logger[_0x2b2b49(0x19f)](_0x2b2b49(0x17b),_0x2b2b49(0x1b8),{'templatePath':_0x55b8a7,'targetPath':_0x85278b,'pageName':_0x52d9e6,'templateName':_0x32b832});await a197_0x1bc338['promises'][_0x2b2b49(0x180)](_0x85278b,{'recursive':!![]}),await this[_0x2b2b49(0x19d)](_0x55b8a7,_0x85278b,_0x52d9e6,_0x32b832);if(_0x11e8ca){const _0x2b8538=Date[_0x2b2b49(0x193)]()-_0x14a32b;logger[_0x2b2b49(0x17e)](_0x2b2b49(0x17b),'模板内容替换完成',_0x2b8538,{'pageName':_0x52d9e6,'templateName':_0x32b832});}}catch(_0x35a015){if(_0x11e8ca){const _0x2c0ec5=Date['now']()-_0x14a32b;logger[_0x2b2b49(0x1ac)](_0x2b2b49(0x17b),_0x2b2b49(0x17f),{'templatePath':_0x55b8a7,'targetPath':_0x85278b,'pageName':_0x52d9e6,'templateName':_0x32b832,'error':_0x35a015 instanceof Error?_0x35a015[_0x2b2b49(0x1a3)]:String(_0x35a015),'duration':_0x2c0ec5});}throw _0x35a015;}}static async[a197_0x4f4d2e(0x19d)](_0x1f8a33,_0x5dda01,_0x2501b1,_0x3226c0){const _0x3b4a62=a197_0x4f4d2e,_0x3f7b34=await a197_0x1bc338[_0x3b4a62(0x19c)][_0x3b4a62(0x1a9)](_0x1f8a33,{'withFileTypes':!![]});for(const _0x15d5db of _0x3f7b34){const _0x29f132=a197_0x536ae9[_0x3b4a62(0x18d)](_0x1f8a33,_0x15d5db[_0x3b4a62(0x198)]);let _0x28ac3d=a197_0x536ae9[_0x3b4a62(0x18d)](_0x5dda01,_0x15d5db[_0x3b4a62(0x198)]);_0x15d5db[_0x3b4a62(0x198)][_0x3b4a62(0x179)]('.tpl')&&(_0x28ac3d=a197_0x536ae9[_0x3b4a62(0x18d)](_0x5dda01,_0x15d5db[_0x3b4a62(0x198)][_0x3b4a62(0x1ba)](/\.tpl$/,'')));if(_0x15d5db[_0x3b4a62(0x1b9)]())await a197_0x1bc338['promises']['mkdir'](_0x28ac3d,{'recursive':!![]}),await this[_0x3b4a62(0x19d)](_0x29f132,_0x28ac3d,_0x2501b1,_0x3226c0);else _0x15d5db[_0x3b4a62(0x1b2)]()&&await this[_0x3b4a62(0x178)](_0x29f132,_0x28ac3d,_0x2501b1,_0x3226c0);}}static async[a197_0x4f4d2e(0x178)](_0x2483de,_0x3c82bc,_0x15ba1a,_0x1f3af2){const _0x1a0b2b=a197_0x4f4d2e,_0x40840c=a197_0x536ae9[_0x1a0b2b(0x1b5)](_0x2483de)[_0x1a0b2b(0x19b)]();_0x2483de[_0x1a0b2b(0x179)](_0x1a0b2b(0x17d))&&(_0x3c82bc=_0x3c82bc[_0x1a0b2b(0x1ba)](/\.tpl$/,''));const _0x35598d=['.tsx','.ts','.jsx',_0x1a0b2b(0x1a0),_0x1a0b2b(0x191),_0x1a0b2b(0x18b),_0x1a0b2b(0x1b4),_0x1a0b2b(0x1a8),'.tpl'];if(_0x35598d[_0x1a0b2b(0x185)](_0x40840c)||_0x2483de['endsWith'](_0x1a0b2b(0x17d))){const _0x1eb1a7=await a197_0x1bc338[_0x1a0b2b(0x19c)][_0x1a0b2b(0x19e)](_0x2483de,_0x1a0b2b(0x196)),_0x181904=this[_0x1a0b2b(0x1b6)](_0x1eb1a7,_0x15ba1a,_0x1f3af2);await a197_0x1bc338[_0x1a0b2b(0x19c)][_0x1a0b2b(0x174)](_0x3c82bc,_0x181904,_0x1a0b2b(0x196));}else await a197_0x1bc338['promises']['copyFile'](_0x2483de,_0x3c82bc);}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x10d24d,_0x1e9b49){var _0x3cc8c1=a198_0x2717,_0x16a901=_0x10d24d();while(!![]){try{var _0x7574e0=-parseInt(_0x3cc8c1(0x149))/0x1+-parseInt(_0x3cc8c1(0x143))/0x2*(parseInt(_0x3cc8c1(0x145))/0x3)+parseInt(_0x3cc8c1(0x14b))/0x4*(parseInt(_0x3cc8c1(0x142))/0x5)+parseInt(_0x3cc8c1(0x14a))/0x6+-parseInt(_0x3cc8c1(0x148))/0x7+parseInt(_0x3cc8c1(0x147))/0x8+parseInt(_0x3cc8c1(0x146))/0x9*(parseInt(_0x3cc8c1(0x144))/0xa);if(_0x7574e0===_0x1e9b49)break;else _0x16a901['push'](_0x16a901['shift']());}catch(_0x15a0ea){_0x16a901['push'](_0x16a901['shift']());}}}(a198_0x5731,0x44411));function a198_0x5731(){var _0x334e4d=['2bFaniR','1001870VrrdiK','750504yGWKiT','36PPeZLX','3137664Swegcu','3519341jXwJfW','502684nKLfAR','2525718EJNyqa','51404NHomws','125GzhFST'];a198_0x5731=function(){return _0x334e4d;};return a198_0x5731();}function a198_0x2717(_0x21f5fb,_0x5cfc5d){_0x21f5fb=_0x21f5fb-0x142;var _0x5731a3=a198_0x5731();var _0x27173f=_0x5731a3[_0x21f5fb];return _0x27173f;}import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}
|