@lovrabet/rabetbase-cli 2.1.10-beta.2 → 2.1.10-beta.4
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/capability.js +1 -0
- 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 +1 -2
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a180_0x428791=a180_0x20d8;function a180_0x4cb4(){const _0x8c48be=['.codex/skills/lovrabet/SKILL.md','agent','cursor','trae','21roYEcX','通用模板\x20-\x20兜底方案','889438rzOmpg','cline','claude','SKILL.md.tpl','Windsurf','CodeBuddy','.qoder','28494uoHeuY','.qoder/rules/rabetbase.md','695ZiUCom','.codex','.cline/skills/lovrabet/SKILL.md','Codex','Qoder','.cursorrules','.cursor','475060hxDjAR','OpenCode','Codex\x20IDE','.trae/skills/lovrabet/SKILL.md','Qoder\x20IDE','.agent/skills/lovrabet/SKILL.md','Cursor','Cline\x20IDE','Trae\x20IDE','.claude','Claude\x20Code','.qoder/skills/lovrabet/SKILL.md','3278768ILlQeH','codebuddy','file','.codebuddy','.agent','antigravity','18205569cpCpfT','3144240OfRlzM','.codebuddy/skills/lovrabet/SKILL.md','632288EMrNmR','qoder','windsurf','.opencode/skills/lovrabet/SKILL.md','OpenCode\x20IDE','.cursor/skills/rabetbase.md','其他\x20(通用模板)','.trae','.opencode','10TQjaJC','Antigravity','Trae','Cursor\x20IDE','opencode','codex'];a180_0x4cb4=function(){return _0x8c48be;};return a180_0x4cb4();}function a180_0x20d8(_0x29b340,_0x218623){_0x29b340=_0x29b340-0x1ec;const _0x4cb4b9=a180_0x4cb4();let _0x20d806=_0x4cb4b9[_0x29b340];return _0x20d806;}(function(_0x4b0dd1,_0x40018e){const _0x2cc004=a180_0x20d8,_0xaa6794=_0x4b0dd1();while(!![]){try{const _0x5b5c48=parseInt(_0x2cc004(0x224))/0x1+parseInt(_0x2cc004(0x1fa))/0x2+parseInt(_0x2cc004(0x20d))/0x3+parseInt(_0x2cc004(0x206))/0x4+-parseInt(_0x2cc004(0x1f3))/0x5*(parseInt(_0x2cc004(0x1f1))/0x6)+parseInt(_0x2cc004(0x222))/0x7*(parseInt(_0x2cc004(0x20f))/0x8)+-parseInt(_0x2cc004(0x20c))/0x9*(parseInt(_0x2cc004(0x218))/0xa);if(_0x5b5c48===_0x40018e)break;else _0xaa6794['push'](_0xaa6794['shift']());}catch(_0x3cbce6){_0xaa6794['push'](_0xaa6794['shift']());}}}(a180_0x4cb4,0x86020));export const CORE_IDE_CONFIGS={'cursor':{'name':a180_0x428791(0x200),'description':a180_0x428791(0x21b),'folders':[a180_0x428791(0x1f8),a180_0x428791(0x1f9)],'files':[{'type':'file','path':a180_0x428791(0x214),'template':a180_0x428791(0x1ed)}]},'windsurf':{'name':a180_0x428791(0x1ee),'description':'Windsurf\x20IDE','folders':['.windsurf'],'files':[{'type':a180_0x428791(0x208),'path':'.windsurf/workflows/rabetbase.md','template':a180_0x428791(0x1ed)}]},'claude':{'name':a180_0x428791(0x204),'description':a180_0x428791(0x204),'folders':[a180_0x428791(0x203)],'files':[{'type':a180_0x428791(0x208),'path':'.claude/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]},'cline':{'name':'Cline','description':a180_0x428791(0x201),'folders':['.cline'],'files':[{'type':a180_0x428791(0x208),'path':a180_0x428791(0x1f5),'template':a180_0x428791(0x1ed)}]},'codex':{'name':a180_0x428791(0x1f6),'description':a180_0x428791(0x1fc),'folders':[a180_0x428791(0x1f4)],'files':[{'type':a180_0x428791(0x208),'path':a180_0x428791(0x21e),'template':a180_0x428791(0x1ed)}]},'opencode':{'name':a180_0x428791(0x1fb),'description':a180_0x428791(0x213),'folders':[a180_0x428791(0x217)],'files':[{'type':'file','path':a180_0x428791(0x212),'template':a180_0x428791(0x1ed)}]},'qoder':{'name':a180_0x428791(0x1f7),'description':a180_0x428791(0x1fe),'folders':[a180_0x428791(0x1f0)],'files':[{'type':a180_0x428791(0x208),'path':a180_0x428791(0x1f2),'template':a180_0x428791(0x1ed)},{'type':a180_0x428791(0x208),'path':a180_0x428791(0x205),'template':'SKILL.md.tpl'}]},'codebuddy':{'name':a180_0x428791(0x1ef),'description':'CodeBuddy\x20IDE','folders':[a180_0x428791(0x209)],'files':[{'type':a180_0x428791(0x208),'path':a180_0x428791(0x20e),'template':a180_0x428791(0x1ed)}]},'trae':{'name':a180_0x428791(0x21a),'description':a180_0x428791(0x202),'folders':[a180_0x428791(0x216)],'files':[{'type':a180_0x428791(0x208),'path':a180_0x428791(0x1fd),'template':'SKILL.md.tpl'}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a180_0x428791(0x215),'description':a180_0x428791(0x223),'folders':[a180_0x428791(0x20a)],'files':[{'type':a180_0x428791(0x208),'path':'.agent/skills/lovrabet/SKILL.md','template':a180_0x428791(0x1ed)}]},'antigravity':{'name':a180_0x428791(0x219),'description':'Antigravity\x20IDE','folders':[a180_0x428791(0x20a)],'files':[{'type':a180_0x428791(0x208),'path':a180_0x428791(0x1ff),'template':a180_0x428791(0x1ed)}]}};export const CORE_IDE_LIST=[a180_0x428791(0x1ec),'cline',a180_0x428791(0x207),a180_0x428791(0x21d),a180_0x428791(0x220),a180_0x428791(0x21c),a180_0x428791(0x210),'trae','windsurf'];export const IDE_LIST=[a180_0x428791(0x20b),a180_0x428791(0x1ec),a180_0x428791(0x225),'codebuddy','codex','cursor',a180_0x428791(0x21c),'qoder',a180_0x428791(0x221),'windsurf',a180_0x428791(0x21f)];export const ALL_CORE_IDES=[a180_0x428791(0x220),a180_0x428791(0x211),a180_0x428791(0x1ec),a180_0x428791(0x225),a180_0x428791(0x21d),'opencode',a180_0x428791(0x210),a180_0x428791(0x207),a180_0x428791(0x221)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a181_0x5596(_0xeef099,_0x1894c7){_0xeef099=_0xeef099-0x10c;const _0xbac73e=a181_0xbac7();let _0x559624=_0xbac73e[_0xeef099];return _0x559624;}(function(_0x18280c,_0x5483b4){const _0x401f9f=a181_0x5596,_0x7cba7b=_0x18280c();while(!![]){try{const _0x4b17bc=parseInt(_0x401f9f(0x113))/0x1+parseInt(_0x401f9f(0x10d))/0x2+parseInt(_0x401f9f(0x10e))/0x3*(-parseInt(_0x401f9f(0x10f))/0x4)+parseInt(_0x401f9f(0x114))/0x5+-parseInt(_0x401f9f(0x111))/0x6+-parseInt(_0x401f9f(0x112))/0x7+-parseInt(_0x401f9f(0x10c))/0x8*(-parseInt(_0x401f9f(0x110))/0x9);if(_0x4b17bc===_0x5483b4)break;else _0x7cba7b['push'](_0x7cba7b['shift']());}catch(_0x372ea6){_0x7cba7b['push'](_0x7cba7b['shift']());}}}(a181_0xbac7,0xcf8ab));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a181_0xbac7(){const _0x1b3541=['225IBIhuh','8521650HjHNny','10593065WWQwfh','1503768ORHugk','711840CwgmcM','696184mNmUSw','1100248GJouDl','1503MZfWKm','4696AhjWqq'];a181_0xbac7=function(){return _0x1b3541;};return a181_0xbac7();}import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16c5c6,_0x527564){const _0x379e40=a182_0x3a84,_0x2d7f41=_0x16c5c6();while(!![]){try{const _0x2cdd0c=parseInt(_0x379e40(0x163))/0x1+-parseInt(_0x379e40(0x167))/0x2*(-parseInt(_0x379e40(0x16a))/0x3)+parseInt(_0x379e40(0x165))/0x4*(-parseInt(_0x379e40(0x166))/0x5)+parseInt(_0x379e40(0x15f))/0x6*(parseInt(_0x379e40(0x16b))/0x7)+parseInt(_0x379e40(0x164))/0x8+-parseInt(_0x379e40(0x169))/0x9+-parseInt(_0x379e40(0x161))/0xa;if(_0x2cdd0c===_0x527564)break;else _0x2d7f41['push'](_0x2d7f41['shift']());}catch(_0x34b8de){_0x2d7f41['push'](_0x2d7f41['shift']());}}}(a182_0x5c80,0x6ba00));import{getTemplateBaseUrl}from'../utils/config.js';function a182_0x5c80(){const _0xa5b8ff=['721zOHENZ','application/json','now','/config.json','node','json','50454LlUjmg','cli','799030NZNCMZ','/config/index.json','562997KsAEIV','5058856qjMXgM','1856iBssPv','8750dPxmlI','242154shxyiE','stableVersion','7648407ZFTbLz','3iJzAJP'];a182_0x5c80=function(){return _0xa5b8ff;};return a182_0x5c80();}export async function fetchCdnConfig(){const _0x14e949=a182_0x3a84,_0x4cc0f3=getTemplateBaseUrl(),_0x53c16f=[_0x4cc0f3+_0x14e949(0x15c),_0x4cc0f3+_0x14e949(0x162)];for(const _0x5f1c1e of _0x53c16f){try{const _0x3c232e=await fetch(_0x5f1c1e,{'headers':{'Accept':_0x14e949(0x16c)}});if(!_0x3c232e['ok'])continue;const _0x276b28=await _0x3c232e[_0x14e949(0x15e)]();if(!_0x276b28[_0x14e949(0x160)]?.[_0x14e949(0x168)]||!_0x276b28['sdk']?.[_0x14e949(0x15d)]?.[_0x14e949(0x168)])continue;return _0x276b28;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x312803=a182_0x3a84,_0x202498=Date[_0x312803(0x16d)]();if(hasCachedConfig){const _0xcb65c6=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x202498-cacheTime<_0xcb65c6)return cachedConfig;}const _0x4311c7=await fetchCdnConfig();return cachedConfig=_0x4311c7,cacheTime=_0x202498,hasCachedConfig=!![],_0x4311c7;}function a182_0x3a84(_0x573c84,_0x139589){_0x573c84=_0x573c84-0x15c;const _0x5c80e0=a182_0x5c80();let _0x3a84ce=_0x5c80e0[_0x573c84];return _0x3a84ce;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a183_0x27d93e=a183_0x9e61;(function(_0x48d1c7,_0x4958fa){const _0x24e226=a183_0x9e61,_0xd70a92=_0x48d1c7();while(!![]){try{const _0x594a67=parseInt(_0x24e226(0x144))/0x1*(-parseInt(_0x24e226(0x145))/0x2)+-parseInt(_0x24e226(0x160))/0x3*(parseInt(_0x24e226(0x169))/0x4)+parseInt(_0x24e226(0x158))/0x5+parseInt(_0x24e226(0x153))/0x6*(-parseInt(_0x24e226(0x14c))/0x7)+parseInt(_0x24e226(0x146))/0x8*(parseInt(_0x24e226(0x14e))/0x9)+parseInt(_0x24e226(0x15e))/0xa*(parseInt(_0x24e226(0x166))/0xb)+-parseInt(_0x24e226(0x162))/0xc;if(_0x594a67===_0x4958fa)break;else _0xd70a92['push'](_0xd70a92['shift']());}catch(_0x5bc472){_0xd70a92['push'](_0xd70a92['shift']());}}}(a183_0x5c48,0x9197b));import a183_0x2d4ea0 from'node:fs';import a183_0x29f2a0 from'node:path';import a183_0x2ceb9e from'semver';function a183_0x5c48(){const _0x1a464b=['259vYYZtH','↪\x20SDK\x20update\x20available','4940343TTgWRS','join','npm\x20install\x20','\x20\x20\x20Upgrade\x20command:\x20','log','28806rWiBvF','sdk','utf-8','dependencies','parse','1091530TDhpIb','node','needsUpgrade','readFileSync','existsSync','\x1b[1m','1091560LqASxz','devDependencies','3ufZBRc','package.json','11243304xKVsHx','\x20\x20\x20Stable\x20version:\x20','version','1.2.0','110FdAUKR','stableVersion','all','1179036TnCQbB','minVersion','\x1b[33m','@lovrabet/sdk','402035WTxRpv','2eugwhh','16JGSBEj','node_modules','\x20\x20\x20Current\x20version:\x20','packageName','some','coerce'];a183_0x5c48=function(){return _0x1a464b;};return a183_0x5c48();}import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a183_0x27d93e(0x165);function isNonNumericVersion(_0x1b0e49){const _0x1e88d2=a183_0x27d93e,_0xedf7c=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0xedf7c[_0x1e88d2(0x14a)](_0x3c3463=>_0x3c3463['test'](_0x1b0e49));}function getInstalledVersion(_0x6794c9,_0x457244){const _0x3e8c7e=a183_0x27d93e;try{const _0x31e14f=a183_0x29f2a0[_0x3e8c7e(0x14f)](_0x6794c9,_0x3e8c7e(0x147),_0x457244,_0x3e8c7e(0x161));if(a183_0x2d4ea0[_0x3e8c7e(0x15c)](_0x31e14f)){const _0x4a60c2=JSON[_0x3e8c7e(0x157)](a183_0x2d4ea0[_0x3e8c7e(0x15b)](_0x31e14f,_0x3e8c7e(0x155)));return _0x4a60c2[_0x3e8c7e(0x164)]||null;}}catch{}return null;}function a183_0x9e61(_0x271577,_0x3e8191){_0x271577=_0x271577-0x143;const _0x5c48dd=a183_0x5c48();let _0x9e61da=_0x5c48dd[_0x271577];return _0x9e61da;}async function getSdkStableVersion(){const _0x32acf1=a183_0x27d93e;try{const _0x27424f=await getCdnConfig();return _0x27424f?.['sdk']?.[_0x32acf1(0x159)]?.[_0x32acf1(0x167)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x56d723=a183_0x27d93e;try{const _0x10039c=await getCdnConfig();return _0x10039c?.[_0x56d723(0x154)]?.['node']?.[_0x56d723(0x149)]||_0x56d723(0x143);}catch{return _0x56d723(0x143);}}export async function checkSdkVersion(_0x13c0e7){const _0xd4ccf4=a183_0x27d93e,_0x219bf1=a183_0x29f2a0[_0xd4ccf4(0x14f)](_0x13c0e7,'package.json'),[_0x27be2a,_0x51da7b]=await Promise[_0xd4ccf4(0x168)]([getSdkStableVersion(),getSdkPackageName()]),_0x2fa660=_0x27be2a||FALLBACK_MIN_SDK_VERSION;if(!a183_0x2d4ea0[_0xd4ccf4(0x15c)](_0x219bf1))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2fa660,'packageName':_0x51da7b,'stableVersion':_0x27be2a};try{const _0x50981b=JSON[_0xd4ccf4(0x157)](a183_0x2d4ea0['readFileSync'](_0x219bf1,'utf8')),_0x4a4994=_0x50981b[_0xd4ccf4(0x156)]||{},_0x332a81=_0x50981b[_0xd4ccf4(0x15f)]||{},_0x5c6f76=_0x4a4994[_0x51da7b]||_0x332a81[_0x51da7b];if(!_0x5c6f76)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2fa660,'packageName':_0x51da7b,'stableVersion':_0x27be2a};let _0x3fbf08=getInstalledVersion(_0x13c0e7,_0x51da7b);!_0x3fbf08&&(_0x3fbf08=_0x5c6f76);if(isNonNumericVersion(_0x5c6f76))return{'installed':!![],'version':_0x3fbf08,'needsUpgrade':![],'minVersion':_0x2fa660,'packageName':_0x51da7b,'stableVersion':_0x27be2a};const _0x53f0c3=a183_0x2ceb9e[_0xd4ccf4(0x14b)](_0x3fbf08),_0x151bc7=a183_0x2ceb9e[_0xd4ccf4(0x14b)](_0x2fa660),_0x219cb1=_0x53f0c3&&_0x151bc7?a183_0x2ceb9e['lt'](_0x53f0c3,_0x151bc7):![];return{'installed':!![],'version':_0x3fbf08,'needsUpgrade':_0x219cb1,'minVersion':_0x2fa660,'packageName':_0x51da7b,'stableVersion':_0x27be2a};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2fa660,'packageName':_0x51da7b,'stableVersion':_0x27be2a};}}export function checkSdkVersionSync(_0x1a940c){const _0x5e8512=a183_0x27d93e,_0x2c747d=a183_0x29f2a0[_0x5e8512(0x14f)](_0x1a940c,_0x5e8512(0x161)),_0x303193='@lovrabet/sdk';if(!a183_0x2d4ea0[_0x5e8512(0x15c)](_0x2c747d))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x303193,'stableVersion':null};try{const _0x3b0f2b=JSON[_0x5e8512(0x157)](a183_0x2d4ea0[_0x5e8512(0x15b)](_0x2c747d,'utf8')),_0x38eb4f=_0x3b0f2b[_0x5e8512(0x156)]||{},_0x39a210=_0x3b0f2b['devDependencies']||{},_0x1f26a7=_0x38eb4f[_0x303193]||_0x39a210[_0x303193];if(!_0x1f26a7)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x303193,'stableVersion':null};let _0x216824=getInstalledVersion(_0x1a940c,_0x303193);!_0x216824&&(_0x216824=_0x1f26a7);if(isNonNumericVersion(_0x1f26a7))return{'installed':!![],'version':_0x216824,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x303193,'stableVersion':null};const _0x29373d=a183_0x2ceb9e[_0x5e8512(0x14b)](_0x216824),_0x322a73=_0x29373d?a183_0x2ceb9e['lt'](_0x29373d,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x216824,'needsUpgrade':_0x322a73,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x303193,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x303193,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x305d7e){const _0x53227d=a183_0x27d93e;if(!_0x305d7e[_0x53227d(0x15a)])return;const _0x4af7a8=_0x53227d(0x16b),_0x453a6d='\x1b[0m',_0x35b142=_0x53227d(0x15d),_0x5b6381=_0x305d7e[_0x53227d(0x149)]||_0x53227d(0x143),_0x54ca6b=_0x305d7e[_0x53227d(0x167)]||_0x305d7e[_0x53227d(0x16a)],_0x2bd6b6=_0x53227d(0x150)+_0x5b6381+'@'+(_0x54ca6b||'latest');console[_0x53227d(0x152)](),console['log'](''+_0x4af7a8+_0x35b142+_0x53227d(0x14d)+_0x453a6d),console['log'](_0x4af7a8+_0x53227d(0x148)+_0x5b6381+'@'+_0x305d7e[_0x53227d(0x164)]+_0x453a6d),console[_0x53227d(0x152)](_0x4af7a8+_0x53227d(0x163)+_0x54ca6b+_0x453a6d),console[_0x53227d(0x152)](_0x4af7a8+_0x53227d(0x151)+_0x2bd6b6+_0x453a6d),console[_0x53227d(0x152)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x37f98c,_0x309346){const _0x4215a9=a184_0x4514,_0x1e95e5=_0x37f98c();while(!![]){try{const _0x3e8d69=parseInt(_0x4215a9(0x136))/0x1+parseInt(_0x4215a9(0x147))/0x2+parseInt(_0x4215a9(0x13f))/0x3+parseInt(_0x4215a9(0x12c))/0x4+-parseInt(_0x4215a9(0x125))/0x5*(-parseInt(_0x4215a9(0x13a))/0x6)+-parseInt(_0x4215a9(0x145))/0x7+-parseInt(_0x4215a9(0x14a))/0x8*(parseInt(_0x4215a9(0x13d))/0x9);if(_0x3e8d69===_0x309346)break;else _0x1e95e5['push'](_0x1e95e5['shift']());}catch(_0x11b380){_0x1e95e5['push'](_0x1e95e5['shift']());}}}(a184_0x14ad,0xd834b));import{readFileSync}from'node:fs';function a184_0x4514(_0x7e2419,_0x177419){_0x7e2419=_0x7e2419-0x125;const _0x14adfb=a184_0x14ad();let _0x45147a=_0x14adfb[_0x7e2419];return _0x45147a;}import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a184_0x30dca7 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a184_0x14ad(){const _0x4b3e51=['\x20\x20\x20Current\x20CLI\x20version:\x20','minimumVersionMessage','belowMinimum','187166iddTqy','\x1b[0m','1684534yoKwvl','log','upgradeMessage','1096PnsKRU','482005TgRzmb','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','\x1b[33m','utf-8','npm\x20install\x20-g\x20','Current\x20version:\x20','↪\x20New\x20version\x20available','6329496chrQOt','parse','minimumVersion','↪\x20Critical\x20CLI\x20upgrade\x20required','filter','\x20\x20\x20Minimum\x20required:\x20','coerce','1.0.0','join','\x20\x20\x20Recommended\x20stable:\x20','1748195IlmbCY','\x20\x20\x20','version','Upgrade\x20command:\x20','90atlavk','stableVersion','needsUpgrade','419427yocpOz','currentVersion','5034231PwQdsb','\x20\x20\x20Upgrade\x20command:\x20','\x20\x20\x20Stable\x20version:\x20'];a184_0x14ad=function(){return _0x4b3e51;};return a184_0x14ad();}import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x12b0e2){const _0x2a3a62=a184_0x4514,_0x3297f9=_0x12b0e2[_0x2a3a62(0x13b)]||'latest';return _0x2a3a62(0x129)+NPM_PACKAGE_NAME+'@'+_0x3297f9;}function getCurrentCliVersion(){const _0x3405ac=a184_0x4514;try{const _0x251379=fileURLToPath(import.meta.url),_0x3f187d=resolve(dirname(_0x251379),'../..'),_0x22e7c2=resolve(_0x3f187d,'package.json'),_0x8dc925=JSON[_0x3405ac(0x12d)](readFileSync(_0x22e7c2,_0x3405ac(0x128)));return _0x8dc925[_0x3405ac(0x138)]||_0x3405ac(0x133);}catch{return _0x3405ac(0x133);}}export async function checkCliVersion(){const _0x2242e6=a184_0x4514,_0x4890ef=getCurrentCliVersion(),_0x472786=await getCliVersionPolicy(),_0xbe0b8f=_0x472786?.[_0x2242e6(0x13b)]||null,_0x17f849=_0x472786?.[_0x2242e6(0x12e)]||null;let _0x5ccaf0=![],_0x2e638b=![];const _0x1ce031=a184_0x30dca7['coerce'](_0x4890ef);if(_0x1ce031&&_0xbe0b8f)try{const _0x2e229d=a184_0x30dca7[_0x2242e6(0x132)](_0xbe0b8f);if(_0x2e229d)_0x5ccaf0=a184_0x30dca7['lt'](_0x1ce031,_0x2e229d);}catch{}if(_0x1ce031&&_0x17f849)try{const _0x141155=a184_0x30dca7['coerce'](_0x17f849);if(_0x141155)_0x2e638b=a184_0x30dca7['lt'](_0x1ce031,_0x141155);}catch{}return _0x2e638b&&(_0x5ccaf0=!![]),{'currentVersion':_0x4890ef,'stableVersion':_0xbe0b8f,'minimumVersion':_0x17f849,'needsUpgrade':_0x5ccaf0,'belowMinimum':_0x2e638b,'isPreRelease':![],'upgradeMessage':_0x472786?.[_0x2242e6(0x149)],'minimumVersionMessage':_0x472786?.[_0x2242e6(0x143)]};}export function printCliUpgradeWarning(_0x1f96eb){const _0x56b49f=a184_0x4514;if(!_0x1f96eb[_0x56b49f(0x13c)]&&!_0x1f96eb[_0x56b49f(0x144)])return;const _0xbc3e44='\x1b[31m',_0x31e265=_0x56b49f(0x127),_0x163d93=_0x56b49f(0x146),_0x5e674d='\x1b[1m',_0x24bbb1=getCliUpgradeCommand(_0x1f96eb);console[_0x56b49f(0x148)](),_0x1f96eb[_0x56b49f(0x144)]?(console[_0x56b49f(0x148)](''+_0xbc3e44+_0x5e674d+_0x56b49f(0x12f)+_0x163d93),console[_0x56b49f(0x148)](_0xbc3e44+_0x56b49f(0x142)+_0x1f96eb[_0x56b49f(0x13e)]+_0x163d93),_0x1f96eb['minimumVersion']&&console['log'](_0xbc3e44+_0x56b49f(0x131)+_0x1f96eb['minimumVersion']+_0x163d93),_0x1f96eb['stableVersion']&&_0x1f96eb[_0x56b49f(0x13b)]!==_0x1f96eb[_0x56b49f(0x12e)]&&console[_0x56b49f(0x148)](_0xbc3e44+_0x56b49f(0x135)+_0x1f96eb['stableVersion']+_0x163d93),_0x1f96eb[_0x56b49f(0x143)]&&console[_0x56b49f(0x148)](_0xbc3e44+'\x20\x20\x20'+_0x1f96eb[_0x56b49f(0x143)]+_0x163d93),console['log'](_0xbc3e44+_0x56b49f(0x140)+_0x24bbb1+_0x163d93)):(console[_0x56b49f(0x148)](''+_0x31e265+_0x5e674d+_0x56b49f(0x12b)+_0x163d93),console[_0x56b49f(0x148)](_0x31e265+_0x56b49f(0x142)+_0x1f96eb['currentVersion']+_0x163d93),console[_0x56b49f(0x148)](_0x31e265+_0x56b49f(0x141)+_0x1f96eb[_0x56b49f(0x13b)]+_0x163d93),_0x1f96eb[_0x56b49f(0x149)]&&console[_0x56b49f(0x148)](_0x31e265+_0x56b49f(0x137)+_0x1f96eb['upgradeMessage']+_0x163d93),console[_0x56b49f(0x148)](_0x31e265+'\x20\x20\x20Upgrade\x20command:\x20'+_0x24bbb1+_0x163d93)),console[_0x56b49f(0x148)]();}export function assertCliVersionSupported(_0x4f11e5){const _0x45a8fb=a184_0x4514;if(!_0x4f11e5[_0x45a8fb(0x144)])return;const _0x3940bb=[_0x4f11e5[_0x45a8fb(0x143)],_0x45a8fb(0x12a)+_0x4f11e5['currentVersion'],_0x4f11e5[_0x45a8fb(0x12e)]?'Minimum\x20required:\x20'+_0x4f11e5[_0x45a8fb(0x12e)]:null,_0x45a8fb(0x139)+getCliUpgradeCommand(_0x4f11e5)][_0x45a8fb(0x130)](Boolean)[_0x45a8fb(0x134)]('\x0a');throw CliErrors['validation'](_0x45a8fb(0x126),_0x3940bb);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0xf12e36,_0x488f17){const _0x56418a=a185_0x3ef0,_0x324411=_0xf12e36();while(!![]){try{const _0xd88baf=parseInt(_0x56418a(0x137))/0x1+parseInt(_0x56418a(0x13b))/0x2*(-parseInt(_0x56418a(0x138))/0x3)+parseInt(_0x56418a(0x130))/0x4+-parseInt(_0x56418a(0x127))/0x5*(parseInt(_0x56418a(0x12a))/0x6)+parseInt(_0x56418a(0x12b))/0x7+parseInt(_0x56418a(0x128))/0x8+parseInt(_0x56418a(0x13d))/0x9*(-parseInt(_0x56418a(0x12f))/0xa);if(_0xd88baf===_0x488f17)break;else _0x324411['push'](_0x324411['shift']());}catch(_0xb7c713){_0x324411['push'](_0x324411['shift']());}}}(a185_0x59df,0x798ba));import{CLI_VERSION_POLICY_URL}from'../constant/cdn.js';function a185_0x3ef0(_0x20bed2,_0x2e6370){_0x20bed2=_0x20bed2-0x125;const _0x59dfca=a185_0x59df();let _0x3ef0d8=_0x59dfca[_0x20bed2];return _0x3ef0d8;}const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8,FETCH_TIMEOUT_MS=0xbb8;function pickString(_0x33678f){const _0x3b7b41=a185_0x3ef0;return typeof _0x33678f===_0x3b7b41(0x12d)&&_0x33678f[_0x3b7b41(0x13a)]()[_0x3b7b41(0x135)]>0x0?_0x33678f[_0x3b7b41(0x13a)]():null;}function normalizeCliVersionPolicy(_0x2b2ed6){const _0x6cadbf=a185_0x3ef0;if(!_0x2b2ed6||typeof _0x2b2ed6!==_0x6cadbf(0x133))return null;const _0x4abc2c=_0x2b2ed6,_0x319abc=_0x4abc2c[_0x6cadbf(0x129)]&&typeof _0x4abc2c[_0x6cadbf(0x129)]===_0x6cadbf(0x133)?_0x4abc2c[_0x6cadbf(0x129)]:_0x4abc2c,_0x496fb5=pickString(_0x319abc[_0x6cadbf(0x139)])||pickString(_0x319abc['latestVersion'])||pickString(_0x319abc[_0x6cadbf(0x131)]),_0x2e4379=pickString(_0x319abc[_0x6cadbf(0x12e)])||pickString(_0x319abc['minVersion']);if(!_0x496fb5&&!_0x2e4379)return null;return{'stableVersion':_0x496fb5,'minimumVersion':_0x2e4379,'upgradeMessage':pickString(_0x319abc[_0x6cadbf(0x134)])||undefined,'minimumVersionMessage':pickString(_0x319abc[_0x6cadbf(0x125)])||undefined};}export async function fetchCliVersionPolicy(){const _0x140b9d=a185_0x3ef0,_0x1c8865=new AbortController(),_0x5af3b5=setTimeout(()=>_0x1c8865[_0x140b9d(0x132)](),FETCH_TIMEOUT_MS);try{const _0x2b042f=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x140b9d(0x136)},'signal':_0x1c8865[_0x140b9d(0x13c)]});if(!_0x2b042f['ok'])return null;const _0xed2b3f=await _0x2b042f[_0x140b9d(0x12c)]();return normalizeCliVersionPolicy(_0xed2b3f);}catch{return null;}finally{clearTimeout(_0x5af3b5);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];function a185_0x59df(){const _0x273d37=['10wHNrhf','2977604ZrtpmR','recommendedVersion','abort','object','upgradeMessage','length','application/json','629206JFjugY','1411341McbDPa','stableVersion','trim','2njPlhH','signal','12950541PydcRP','minimumVersionMessage','now','1321480SWGbbM','5723648BaqfTJ','cli','6qraIHp','4077353fezkNe','json','string','minimumVersion'];a185_0x59df=function(){return _0x273d37;};return a185_0x59df();}export async function getCliVersionPolicy(){const _0x4337f6=a185_0x3ef0,_0x6f3b78=Date[_0x4337f6(0x126)]();if(hasCachedPolicy){const _0x41639a=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x6f3b78-cacheTime<_0x41639a)return cachedPolicy;}const _0x16fe04=await fetchCliVersionPolicy();return cachedPolicy=_0x16fe04,cacheTime=_0x6f3b78,hasCachedPolicy=!![],_0x16fe04;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1890a6,_0x5d755b){const _0xc2938f=a186_0x3af4,_0x5a8dd1=_0x1890a6();while(!![]){try{const _0x3ffeb7=parseInt(_0xc2938f(0x182))/0x1*(parseInt(_0xc2938f(0x17d))/0x2)+parseInt(_0xc2938f(0x17f))/0x3*(-parseInt(_0xc2938f(0x17c))/0x4)+-parseInt(_0xc2938f(0x180))/0x5+parseInt(_0xc2938f(0x181))/0x6+parseInt(_0xc2938f(0x17e))/0x7+parseInt(_0xc2938f(0x17b))/0x8+-parseInt(_0xc2938f(0x184))/0x9;if(_0x3ffeb7===_0x5d755b)break;else _0x5a8dd1['push'](_0x5a8dd1['shift']());}catch(_0x29e6cb){_0x5a8dd1['push'](_0x5a8dd1['shift']());}}}(a186_0x3bce,0x4081c));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a186_0x114d7e,getMultiAppConfigs as a186_0x507c97,getTemplateBaseUrl as a186_0x22f132}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a186_0x3bce(){const _0x334ee1=['5868774iHADtd','2094896bgfiIf','18516GDsmAV','111560KTJpUz','3194989lgFqPe','51DwdMHK','2575735LiubNg','1739022yCnUOq','9ORitCN','env'];a186_0x3bce=function(){return _0x334ee1;};return a186_0x3bce();}export{isInProject}from'../context.js';export function readConfig(_0x54e939){const _0x41bbb1=a186_0x3af4,_0x328281=readRawConfig(_0x54e939);return _0x328281[_0x41bbb1(0x183)]&&typeof _0x328281[_0x41bbb1(0x183)]==='string'&&initEnv(_0x328281[_0x41bbb1(0x183)]),_0x328281;}function a186_0x3af4(_0x22ab14,_0x25ae3b){_0x22ab14=_0x22ab14-0x17b;const _0x3bce29=a186_0x3bce();let _0x3af4d5=_0x3bce29[_0x22ab14];return _0x3af4d5;}export function getConfigAppCode(){return a186_0x114d7e();}export function getMultiAppConfigs(_0x507a3e='project'){return a186_0x507c97(_0x507a3e);}export function getTemplateBaseUrl(){return a186_0x22f132();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xbda995,_0x42859b){const _0x4261b0=a187_0xa761,_0xdcc907=_0xbda995();while(!![]){try{const _0x4db189=-parseInt(_0x4261b0(0x189))/0x1*(parseInt(_0x4261b0(0x18d))/0x2)+parseInt(_0x4261b0(0x190))/0x3+-parseInt(_0x4261b0(0x18e))/0x4+-parseInt(_0x4261b0(0x192))/0x5*(parseInt(_0x4261b0(0x191))/0x6)+-parseInt(_0x4261b0(0x18c))/0x7*(parseInt(_0x4261b0(0x186))/0x8)+-parseInt(_0x4261b0(0x193))/0x9*(-parseInt(_0x4261b0(0x194))/0xa)+-parseInt(_0x4261b0(0x18f))/0xb*(-parseInt(_0x4261b0(0x196))/0xc);if(_0x4db189===_0x42859b)break;else _0xdcc907['push'](_0xdcc907['shift']());}catch(_0x436edf){_0xdcc907['push'](_0xdcc907['shift']());}}}(a187_0x4ef6,0x7c11d));function a187_0xa761(_0x57c40f,_0x1b2f8e){_0x57c40f=_0x57c40f-0x184;const _0x4ef69b=a187_0x4ef6();let _0xa7611c=_0x4ef69b[_0x57c40f];return _0xa7611c;}import a187_0x4ee663 from'node:path';function a187_0x4ef6(){const _0x46d172=['join','609rHzFfd','263566fuzVQy','1292432HbjdsJ','22UkMdUw','1122681DqRGHR','3954iJkqAK','365KGPrBR','99cFjvpA','706330xXZCsA','isDirectory','6102708kDmGjY','复制目录时出错:','error','70048AQfQYQ','mkdirSync','name','4PqSvJm','copyFileSync'];a187_0x4ef6=function(){return _0x46d172;};return a187_0x4ef6();}import a187_0x4b0c05 from'node:fs';export async function copyDirectory(_0x56589b,_0x120d3a){const _0x3383a0=a187_0xa761;try{const _0x38e2fe=a187_0x4b0c05['readdirSync'](_0x56589b,{'withFileTypes':!![]});a187_0x4b0c05[_0x3383a0(0x187)](_0x120d3a,{'recursive':!![]});for(const _0x4dda8f of _0x38e2fe){const _0x3086fd=a187_0x4ee663[_0x3383a0(0x18b)](_0x56589b,_0x4dda8f[_0x3383a0(0x188)]),_0x2def79=a187_0x4ee663['join'](_0x120d3a,_0x4dda8f['name']);_0x4dda8f[_0x3383a0(0x195)]()?await copyDirectory(_0x3086fd,_0x2def79):a187_0x4b0c05[_0x3383a0(0x18a)](_0x3086fd,_0x2def79);}}catch(_0x460d65){console[_0x3383a0(0x185)](_0x3383a0(0x184),_0x460d65);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14eb88,_0x4aa92f){const _0x34557c=a188_0x280c,_0x144f70=_0x14eb88();while(!![]){try{const _0x4b9c21=-parseInt(_0x34557c(0x1b2))/0x1+-parseInt(_0x34557c(0x1b9))/0x2*(parseInt(_0x34557c(0x1b0))/0x3)+parseInt(_0x34557c(0x1b8))/0x4*(-parseInt(_0x34557c(0x1bb))/0x5)+-parseInt(_0x34557c(0x1b1))/0x6+-parseInt(_0x34557c(0x1bd))/0x7*(parseInt(_0x34557c(0x1ba))/0x8)+-parseInt(_0x34557c(0x1b4))/0x9+-parseInt(_0x34557c(0x1b3))/0xa*(-parseInt(_0x34557c(0x1b6))/0xb);if(_0x4b9c21===_0x4aa92f)break;else _0x144f70['push'](_0x144f70['shift']());}catch(_0x44618c){_0x144f70['push'](_0x144f70['shift']());}}}(a188_0x284e,0x71191));function a188_0x280c(_0x4c29cf,_0x324121){_0x4c29cf=_0x4c29cf-0x1b0;const _0x284e05=a188_0x284e();let _0x280c8f=_0x284e05[_0x4c29cf];return _0x280c8f;}function a188_0x284e(){const _0x108977=['number','139601gtbikn','string','4jarFnC','2dmibGx','16qDmLaj','794140bnpcif','object','2907002nNyLeJ','1695531YfZvwx','1159860kJGKHW','276378IvnWQs','2420bhQzTV','5253372qhiEaS'];a188_0x284e=function(){return _0x108977;};return a188_0x284e();}function toFiniteNumber(_0x3ba628){const _0xc018a9=a188_0x280c;if(typeof _0x3ba628===_0xc018a9(0x1b5)&&Number['isFinite'](_0x3ba628))return _0x3ba628;if(typeof _0x3ba628===_0xc018a9(0x1b7)){const _0x346306=_0x3ba628['trim']();if(!_0x346306)return undefined;const _0x5dc378=Number(_0x346306);if(Number['isFinite'](_0x5dc378))return _0x5dc378;}return undefined;}export function normalizeEntityWithIdResponse(_0x1ade68){const _0x2411da=a188_0x280c,_0x5d5f36=toFiniteNumber(_0x1ade68);if(_0x5d5f36!==undefined)return{'id':_0x5d5f36,'entity':{'id':_0x5d5f36}};if(!_0x1ade68||typeof _0x1ade68!==_0x2411da(0x1bc))return{'id':undefined,'entity':{}};const _0x3d45bb={..._0x1ade68},_0x3b0063=toFiniteNumber(_0x3d45bb['id']);return _0x3b0063!==undefined&&(_0x3d45bb['id']=_0x3b0063),{'id':_0x3b0063,'entity':_0x3d45bb};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2bab16,_0x494a06){const _0x21f64d=a189_0x32d0,_0x1b4a76=_0x2bab16();while(!![]){try{const _0x550d25=-parseInt(_0x21f64d(0xce))/0x1+parseInt(_0x21f64d(0xc8))/0x2*(-parseInt(_0x21f64d(0xcc))/0x3)+-parseInt(_0x21f64d(0xd0))/0x4*(-parseInt(_0x21f64d(0xcb))/0x5)+-parseInt(_0x21f64d(0xcd))/0x6+parseInt(_0x21f64d(0xcf))/0x7*(-parseInt(_0x21f64d(0xca))/0x8)+parseInt(_0x21f64d(0xd1))/0x9+parseInt(_0x21f64d(0xd2))/0xa*(parseInt(_0x21f64d(0xd3))/0xb);if(_0x550d25===_0x494a06)break;else _0x1b4a76['push'](_0x1b4a76['shift']());}catch(_0x137152){_0x1b4a76['push'](_0x1b4a76['shift']());}}}(a189_0x5861,0x5eff5));function a189_0x32d0(_0x3249aa,_0x368e92){_0x3249aa=_0x3249aa-0xc8;const _0x586128=a189_0x5861();let _0x32d082=_0x586128[_0x3249aa];return _0x32d082;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x520eaa,_0x3d9a65){const _0x20029b=a189_0x32d0,_0x293b4b=statSync(_0x520eaa);if(_0x293b4b[_0x20029b(0xc9)]()){!existsSync(_0x3d9a65)&&mkdirSync(_0x3d9a65,{'recursive':!![]});const _0x5b95f2=readdirSync(_0x520eaa);for(const _0x3841f3 of _0x5b95f2){await copyDir(join(_0x520eaa,_0x3841f3),join(_0x3d9a65,_0x3841f3));}}else copyFileSync(_0x520eaa,_0x3d9a65);}export function ensureDir(_0x2e85bb){!existsSync(_0x2e85bb)&&mkdirSync(_0x2e85bb,{'recursive':!![]});}function a189_0x5861(){const _0x19c4c0=['10PbAIGj','16751779nBNQNG','2tEVnBu','isDirectory','881864uvoPFl','19835zXCJsx','1889994HDTyCA','4515312wjyTNm','727191HoyhPz','14QkYWPx','700wJNjQm','4519818Npytjl'];a189_0x5861=function(){return _0x19c4c0;};return a189_0x5861();}export function pathExists(_0x50b82a){return existsSync(_0x50b82a);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a190_0x32f11e=a190_0x46df;function a190_0x596b(){const _0x1931fa=['77640oJSwDS','\x0a\x0a>更新时间:','length','guides','31722330CgyBgE','.lovrabet','cache','replace','join','trimEnd','/skills/guides.json','3323488yqICoo','status','extendContent','1429173lHSjvp','1490105xekeMD','CDN\x20数据中缺少\x20skillTemplate','184TODGsZ','CDN\x20请求失败:\x20','7332288nctdQg','application/json','skillTemplate','object','lastUpdated','64fHYSRB','2eRGqNy','utf-8','path','.lovrabet/skill/guides','7560780ezSIEN','map','push','.md','entries'];a190_0x596b=function(){return _0x1931fa;};return a190_0x596b();}function a190_0x46df(_0x416637,_0x24eef0){_0x416637=_0x416637-0x1c8;const _0x596bab=a190_0x596b();let _0x46df9c=_0x596bab[_0x416637];return _0x46df9c;}(function(_0x462e2d,_0x5c46c9){const _0x157b8c=a190_0x46df,_0x56d77b=_0x462e2d();while(!![]){try{const _0x3d6f5d=parseInt(_0x157b8c(0x1dc))/0x1*(-parseInt(_0x157b8c(0x1e6))/0x2)+parseInt(_0x157b8c(0x1cd))/0x3*(parseInt(_0x157b8c(0x1de))/0x4)+-parseInt(_0x157b8c(0x1c8))/0x5+parseInt(_0x157b8c(0x1e0))/0x6+-parseInt(_0x157b8c(0x1d8))/0x7+-parseInt(_0x157b8c(0x1e5))/0x8*(parseInt(_0x157b8c(0x1db))/0x9)+parseInt(_0x157b8c(0x1d1))/0xa;if(_0x3d6f5d===_0x5c46c9)break;else _0x56d77b['push'](_0x56d77b['shift']());}catch(_0x3d38c6){_0x56d77b['push'](_0x56d77b['shift']());}}}(a190_0x596b,0xcc6dc));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 _0x5a7586=a190_0x46df,_0x2d3d6f=getTemplateBaseUrl();return _0x2d3d6f+_0x5a7586(0x1d7);}const CACHE_DIR=join(homedir(),a190_0x32f11e(0x1d2),a190_0x32f11e(0x1d3));export async function fetchGuidesFromCDN(){const _0x3839d6=a190_0x32f11e,_0xf6f36b=getGuidesCdnUrl(),_0x4ef941=await fetch(_0xf6f36b,{'headers':{'Accept':_0x3839d6(0x1e1)}});if(!_0x4ef941['ok'])throw new Error(_0x3839d6(0x1df)+_0x4ef941[_0x3839d6(0x1d9)]+'\x20'+_0x4ef941['statusText']);const _0x114a8b=await _0x4ef941['json']();if(!_0x114a8b['guides']||typeof _0x114a8b[_0x3839d6(0x1d0)]!==_0x3839d6(0x1e3))throw new Error('CDN\x20返回数据格式错误');return _0x114a8b;}export function writeGuidesToProject(_0x2c80a4,_0x366b7e,_0x1cacc2=a190_0x32f11e(0x1e9),_0x37fefd){const _0x8fd598=a190_0x32f11e,_0x3ea4b7=join(_0x366b7e,_0x1cacc2);mkdirSync(_0x3ea4b7,{'recursive':!![]});for(const [_0x3a9705,_0x49995a]of Object[_0x8fd598(0x1cc)](_0x2c80a4[_0x8fd598(0x1d0)])){let _0x59aeca=_0x49995a['content'];_0x49995a[_0x8fd598(0x1e4)]&&(_0x59aeca=appendUpdateTime(_0x59aeca,_0x49995a['lastUpdated'])),writeFileSync(join(_0x3ea4b7,_0x3a9705+_0x8fd598(0x1cb)),_0x59aeca,_0x8fd598(0x1e7));}}export function appendUpdateTime(_0x19e69b,_0x3e84ca){const _0x4d2d73=a190_0x32f11e;return _0x19e69b=_0x19e69b[_0x4d2d73(0x1d4)](/\n*>更新时间:.*$/m,''),_0x19e69b['trimEnd']()+(_0x4d2d73(0x1ce)+_0x3e84ca);}export function getSkillTemplate(_0x2ecc55){return _0x2ecc55['skillTemplate']?.['content']||'';}export function appendExtendContents(_0x4f2396,_0x5a5755,_0x2811a0){const _0x4610d0=a190_0x32f11e,_0xbf2c2d=[];for(const [,_0x1c2579]of Object[_0x4610d0(0x1cc)](_0x5a5755[_0x4610d0(0x1d0)])){_0x1c2579[_0x4610d0(0x1da)]&&_0xbf2c2d[_0x4610d0(0x1ca)](_0x1c2579[_0x4610d0(0x1da)][_0x4610d0(0x1d6)]());}if(_0xbf2c2d['length']===0x0)return _0x4f2396;return _0x4f2396[_0x4610d0(0x1d6)]()+'\x0a\x0a'+_0xbf2c2d[_0x4610d0(0x1d5)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x394276,_0x4ba38a,_0x2b47ee){const _0x3ee895=a190_0x32f11e,_0x47ade1=getSkillTemplate(_0x394276);if(!_0x47ade1)throw new Error(_0x3ee895(0x1dd));const _0x20947b=dirname(_0x4ba38a);mkdirSync(_0x20947b,{'recursive':!![]});let _0x27067e=_0x47ade1[_0x3ee895(0x1d4)](/\{\{IDE_NAME\}\}/g,_0x2b47ee);_0x27067e=appendExtendContents(_0x27067e,_0x394276),_0x394276[_0x3ee895(0x1e2)][_0x3ee895(0x1e4)]&&(_0x27067e=appendUpdateTime(_0x27067e,_0x394276[_0x3ee895(0x1e2)][_0x3ee895(0x1e4)])),writeFileSync(_0x4ba38a,_0x27067e,_0x3ee895(0x1e7));}export async function installGuides(_0x322a98){const _0x1417d7=a190_0x32f11e,_0x1b9d18=await fetchGuidesFromCDN();return writeGuidesToProject(_0x1b9d18,_0x322a98),Object['keys'](_0x1b9d18['guides'])[_0x1417d7(0x1cf)];}export function getGuidesSummary(_0x1f1df8){const _0x5c6925=a190_0x32f11e;return Object[_0x5c6925(0x1cc)](_0x1f1df8[_0x5c6925(0x1d0)])[_0x5c6925(0x1c9)](([_0x554202,_0x86bd3f])=>({'key':_0x554202,'title':_0x86bd3f['title'],'path':_0x86bd3f[_0x5c6925(0x1e8)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x9069c3,_0x3c6e52){const _0x1e1789=a191_0x28c9,_0xa03ece=_0x9069c3();while(!![]){try{const _0xd7b003=-parseInt(_0x1e1789(0xc8))/0x1*(parseInt(_0x1e1789(0xc5))/0x2)+-parseInt(_0x1e1789(0xca))/0x3*(-parseInt(_0x1e1789(0xb2))/0x4)+parseInt(_0x1e1789(0xc4))/0x5*(parseInt(_0x1e1789(0xb5))/0x6)+parseInt(_0x1e1789(0xc0))/0x7+parseInt(_0x1e1789(0xb8))/0x8+parseInt(_0x1e1789(0xb3))/0x9*(parseInt(_0x1e1789(0xbd))/0xa)+-parseInt(_0x1e1789(0xbc))/0xb*(parseInt(_0x1e1789(0xc6))/0xc);if(_0xd7b003===_0x3c6e52)break;else _0xa03ece['push'](_0xa03ece['shift']());}catch(_0x16eb0d){_0xa03ece['push'](_0xa03ece['shift']());}}}(a191_0x523d,0xad1d5));function a191_0x28c9(_0x476ebb,_0x5eec33){_0x476ebb=_0x476ebb-0xaf;const _0x523d08=a191_0x523d();let _0x28c9d0=_0x523d08[_0x476ebb];return _0x28c9d0;}export async function httpRequest(_0x5849ae,_0x32c6bd={}){const _0x404028=a191_0x28c9,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x32c6bd;let _0x499693=null;for(let _0x5662e5=0x0;_0x5662e5<=retries;_0x5662e5++){try{const _0x332e9f=new AbortController(),_0x2f3553=setTimeout(()=>_0x332e9f['abort'](),timeout),_0x4aae66=await fetch(_0x5849ae,{'headers':headers,'signal':_0x332e9f[_0x404028(0xba)]});clearTimeout(_0x2f3553);let _0x5ce16c;const _0x2d6213=_0x4aae66[_0x404028(0xb9)][_0x404028(0xbf)]('content-type');return _0x2d6213?.[_0x404028(0xc1)](_0x404028(0xb6))?_0x5ce16c=await _0x4aae66['json']():_0x5ce16c=await _0x4aae66['text'](),{'ok':_0x4aae66['ok'],'status':_0x4aae66[_0x404028(0xcb)],'statusText':_0x4aae66[_0x404028(0xaf)],'data':_0x5ce16c,'headers':_0x4aae66['headers'],'url':_0x4aae66[_0x404028(0xbb)],'text':()=>_0x4aae66[_0x404028(0xb7)]()};}catch(_0x3be2ce){_0x499693=_0x3be2ce instanceof Error?_0x3be2ce:new Error(String(_0x3be2ce));if(_0x5662e5===retries)break;if(shouldRetry(_0x3be2ce)){console['log'](_0x404028(0xc2)+retryDelay+_0x404028(0xb4)+(_0x5662e5+0x1)+'\x20次重试...'),await sleep(retryDelay);continue;}else break;}}throw _0x499693||new Error(_0x404028(0xc3));}function shouldRetry(_0x37f8bc){const _0x348cbb=a191_0x28c9;if(_0x37f8bc instanceof Error){if(_0x37f8bc[_0x348cbb(0xc7)]===_0x348cbb(0xb1))return![];if(_0x37f8bc['name']===_0x348cbb(0xb0)&&_0x37f8bc['message'][_0x348cbb(0xc1)](_0x348cbb(0xc9)))return!![];if(_0x37f8bc['message'][_0x348cbb(0xc1)]('ECONNRESET'))return!![];if(_0x37f8bc[_0x348cbb(0xbe)][_0x348cbb(0xc1)]('ENOTFOUND'))return![];}return![];}function sleep(_0x2b1e7c){return new Promise(_0x3c129b=>setTimeout(_0x3c129b,_0x2b1e7c));}export function validateUrl(_0x53d47d){try{return new URL(_0x53d47d),!![];}catch{return![];}}function a191_0x523d(){const _0x32e9c5=['signal','url','11HxUxRj','6610mudYEv','message','get','5946584AitcLE','includes','*\x20请求失败,','Request\x20failed','5ecWaes','12XGxKgg','27066828tSUTVU','name','127742yzadNh','fetch','1175658vKyGES','status','statusText','TypeError','AbortError','4ibfrnf','12897GYrPQZ','ms\x20后进行第\x20','2264910tPwmsa','application/json','text','9320016gWxtdn','headers'];a191_0x523d=function(){return _0x32e9c5;};return a191_0x523d();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x443505,_0x4abd43){const _0x518510=a192_0x45c7,_0x47ff3b=_0x443505();while(!![]){try{const _0x515bba=parseInt(_0x518510(0xbc))/0x1+parseInt(_0x518510(0xb0))/0x2+parseInt(_0x518510(0xb2))/0x3*(-parseInt(_0x518510(0xb3))/0x4)+-parseInt(_0x518510(0xaf))/0x5*(parseInt(_0x518510(0xba))/0x6)+parseInt(_0x518510(0xbd))/0x7+-parseInt(_0x518510(0xb4))/0x8*(-parseInt(_0x518510(0xb8))/0x9)+parseInt(_0x518510(0xb9))/0xa*(parseInt(_0x518510(0xb1))/0xb);if(_0x515bba===_0x4abd43)break;else _0x47ff3b['push'](_0x47ff3b['shift']());}catch(_0x5cb871){_0x47ff3b['push'](_0x47ff3b['shift']());}}}(a192_0xd12c,0x3f8f2));function a192_0x45c7(_0x491cc6,_0x1207c5){_0x491cc6=_0x491cc6-0xae;const _0xd12ce7=a192_0xd12c();let _0x45c700=_0xd12ce7[_0x491cc6];return _0x45c700;}function env(_0x375c9d){return process.env[`RABETBASE_${_0x375c9d}`]||process.env[`LOVRABET_${_0x375c9d}`]||undefined;}export function isNonInteractive(_0x23fe56){const _0x2b9921=a192_0x45c7;return!!(_0x23fe56['nonInteractive']||_0x23fe56['ci']||env('CI')===_0x2b9921(0xbe)||process.env.CI===_0x2b9921(0xbe)||!process[_0x2b9921(0xb5)][_0x2b9921(0xae)]||!isStdinRawModeSupported());}function a192_0xd12c(){const _0x4d63dc=['20kvXRkx','733182tZqCHL','323125CrGIAF','1077MGtVso','5724BAzFKF','233576pyDwbm','stdout','isRaw','stdin','36IxTJqJ','80xcpOft','334590ligGWw','setRawMode','33190YtxDGs','1718906WPiWTo','true','isTTY'];a192_0xd12c=function(){return _0x4d63dc;};return a192_0xd12c();}function isStdinRawModeSupported(){const _0x2575f6=a192_0x45c7;if(!process[_0x2575f6(0xb7)][_0x2575f6(0xae)])return![];try{const _0x2829e6=process[_0x2575f6(0xb7)][_0x2575f6(0xb6)];return process[_0x2575f6(0xb7)][_0x2575f6(0xbb)](!![]),process[_0x2575f6(0xb7)]['setRawMode'](_0x2829e6??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a193_0x15ef(){const _0x260d86=['开始执行:\x20','utf8','split','12kmDeui','.lovrabet.log','transports','combine','428980utHdNF','logFilePath','format','88CJZKwV','createLogger','929284JbJToz','join','dirname','message','rawCommand','log','timestamp','13410TKPdSR','326694CdGEBa','warn','24241bRDWwe','getWinstonInstance','existsSync','Failed\x20to\x20read\x20logs:','red','map','errors','File','toISOString','duration','initWinstonLogger','logTask','843981kJJXcF','yellow','addColors','green','readFileSync','level','success','blue','command','currentRawCommand','1730008YXzNyo','info','11034QTKKym','writeFileSync','now','stringify','unknown','error','Failed\x20to\x20clear\x20logs:','clearLogs','winstonLogger'];a193_0x15ef=function(){return _0x260d86;};return a193_0x15ef();}const a193_0x11b9ea=a193_0x381e;(function(_0x5d13cd,_0x8123a1){const _0x5e49da=a193_0x381e,_0x57888c=_0x5d13cd();while(!![]){try{const _0x29f811=-parseInt(_0x5e49da(0x1cf))/0x1+-parseInt(_0x5e49da(0x1c7))/0x2+-parseInt(_0x5e49da(0x1dd))/0x3+-parseInt(_0x5e49da(0x1e7))/0x4+parseInt(_0x5e49da(0x1c2))/0x5*(parseInt(_0x5e49da(0x1be))/0x6)+-parseInt(_0x5e49da(0x1d1))/0x7*(parseInt(_0x5e49da(0x1c5))/0x8)+-parseInt(_0x5e49da(0x1e9))/0x9*(-parseInt(_0x5e49da(0x1ce))/0xa);if(_0x29f811===_0x8123a1)break;else _0x57888c['push'](_0x57888c['shift']());}catch(_0x19a2a3){_0x57888c['push'](_0x57888c['shift']());}}}(a193_0x15ef,0x42810));function a193_0x381e(_0x440432,_0x440a35){_0x440432=_0x440432-0x1b3;const _0x15ef73=a193_0x15ef();let _0x381ed8=_0x15ef73[_0x440432];return _0x381ed8;}import a193_0x226fe2 from'winston';import a193_0xb56740 from'node:fs';import a193_0x1339a6 from'node:path';class Logger{['winstonLogger'];['logFilePath'];[a193_0x11b9ea(0x1e6)]='';constructor(){this['logFilePath']='';}['setRawCommand'](_0x462d85){this['currentRawCommand']=_0x462d85;}[a193_0x11b9ea(0x1db)](){const _0x1706c7=a193_0x11b9ea,_0x3703ff=a193_0x1339a6[_0x1706c7(0x1c9)](this[_0x1706c7(0x1c3)]);!a193_0xb56740[_0x1706c7(0x1d3)](_0x3703ff)&&a193_0xb56740['mkdirSync'](_0x3703ff,{'recursive':!![]});const _0x2893de=a193_0x226fe2[_0x1706c7(0x1c4)][_0x1706c7(0x1c1)](a193_0x226fe2[_0x1706c7(0x1c4)][_0x1706c7(0x1cd)](),a193_0x226fe2[_0x1706c7(0x1c4)][_0x1706c7(0x1d7)]({'stack':!![]}),a193_0x226fe2[_0x1706c7(0x1c4)]['printf'](_0x17ec79=>{const _0x5773fe=_0x1706c7,_0x2a01d5={'timestamp':_0x17ec79[_0x5773fe(0x1cd)]||new Date()[_0x5773fe(0x1d9)](),'level':_0x17ec79[_0x5773fe(0x1e2)]||'info','command':_0x17ec79[_0x5773fe(0x1e5)]||_0x5773fe(0x1b6),'rawCommand':_0x17ec79[_0x5773fe(0x1cb)]||this[_0x5773fe(0x1e6)]||undefined,'message':_0x17ec79[_0x5773fe(0x1ca)]||'','duration':_0x17ec79[_0x5773fe(0x1da)]||undefined,'details':_0x17ec79['details']||undefined};return JSON[_0x5773fe(0x1b5)](_0x2a01d5);}));this[_0x1706c7(0x1ba)]=a193_0x226fe2[_0x1706c7(0x1c6)]({'level':_0x1706c7(0x1e8),'format':_0x2893de,'transports':[new a193_0x226fe2[(_0x1706c7(0x1c0))][(_0x1706c7(0x1d8))]({'filename':this[_0x1706c7(0x1c3)],'level':_0x1706c7(0x1e8)})],'silent':![]}),a193_0x226fe2[_0x1706c7(0x1df)]({'success':_0x1706c7(0x1e0),'error':_0x1706c7(0x1d5),'warn':_0x1706c7(0x1de),'info':_0x1706c7(0x1e4)});}['setLogPath'](_0x506077){const _0x239eab=a193_0x11b9ea;this[_0x239eab(0x1c3)]=a193_0x1339a6[_0x239eab(0x1c8)](_0x506077,_0x239eab(0x1bf)),this[_0x239eab(0x1ba)]&&this['winstonLogger']['clear'](),this[_0x239eab(0x1db)]();}[a193_0x11b9ea(0x1e8)](_0x3dcce1,_0x3a9967,_0x41b420){const _0x5dde58=a193_0x11b9ea;if(!this[_0x5dde58(0x1c3)]||!this[_0x5dde58(0x1ba)])return;this[_0x5dde58(0x1ba)][_0x5dde58(0x1e8)](_0x3a9967,{'command':_0x3dcce1,'details':_0x41b420});}[a193_0x11b9ea(0x1e3)](_0x3d2399,_0x1edfec,_0x38ee1b,_0x27bcf){const _0x1a1728=a193_0x11b9ea;if(!this[_0x1a1728(0x1c3)]||!this[_0x1a1728(0x1ba)])return;this['winstonLogger'][_0x1a1728(0x1cc)]('info',_0x1edfec,{'level':'success','command':_0x3d2399,'duration':_0x38ee1b,'details':_0x27bcf});}[a193_0x11b9ea(0x1b7)](_0x486289,_0x5151b6,_0x2e5e5c){const _0x173834=a193_0x11b9ea;if(!this['logFilePath']||!this[_0x173834(0x1ba)])return;this[_0x173834(0x1ba)][_0x173834(0x1b7)](_0x5151b6,{'command':_0x486289,'details':_0x2e5e5c});}[a193_0x11b9ea(0x1d0)](_0x1aefc8,_0x2438a8,_0x5ca326){const _0x57f727=a193_0x11b9ea;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x57f727(0x1ba)][_0x57f727(0x1d0)](_0x2438a8,{'command':_0x1aefc8,'details':_0x5ca326});}async[a193_0x11b9ea(0x1dc)](_0x5bd30f,_0x433912,_0x39960b){const _0x2ac189=a193_0x11b9ea,_0x31f657=Date[_0x2ac189(0x1b4)]();this['info'](_0x5bd30f,_0x2ac189(0x1bb)+_0x433912);try{const _0x4654c6=await _0x39960b(),_0x16ae85=Date['now']()-_0x31f657;return this['success'](_0x5bd30f,'完成:\x20'+_0x433912,_0x16ae85),_0x4654c6;}catch(_0x526c21){const _0x381c9f=Date[_0x2ac189(0x1b4)]()-_0x31f657;this['error'](_0x5bd30f,'失败:\x20'+_0x433912,{'error':_0x526c21 instanceof Error?_0x526c21['message']:String(_0x526c21),'duration':_0x381c9f});throw _0x526c21;}}['readLogs'](){const _0x4e9647=a193_0x11b9ea;try{if(!a193_0xb56740['existsSync'](this['logFilePath']))return[];const _0x5569f6=a193_0xb56740[_0x4e9647(0x1e1)](this[_0x4e9647(0x1c3)],_0x4e9647(0x1bc));return _0x5569f6[_0x4e9647(0x1bd)]('\x0a')['filter'](_0x12b473=>_0x12b473['trim']())[_0x4e9647(0x1d6)](_0x2d45c5=>JSON['parse'](_0x2d45c5));}catch(_0x4484f6){return console[_0x4e9647(0x1d0)](_0x4e9647(0x1d4),_0x4484f6),[];}}[a193_0x11b9ea(0x1b9)](){const _0x419bac=a193_0x11b9ea;try{a193_0xb56740[_0x419bac(0x1d3)](this[_0x419bac(0x1c3)])&&a193_0xb56740[_0x419bac(0x1b3)](this[_0x419bac(0x1c3)],'',_0x419bac(0x1bc));}catch(_0x2dc114){console[_0x419bac(0x1d0)](_0x419bac(0x1b8),_0x2dc114);}}[a193_0x11b9ea(0x1d2)](){return this['winstonLogger'];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a194_0x9292(_0x393a3a,_0x327985){_0x393a3a=_0x393a3a-0x137;const _0x318958=a194_0x3189();let _0x92925=_0x318958[_0x393a3a];return _0x92925;}(function(_0x200b1b,_0x3a17d9){const _0x24ebcb=a194_0x9292,_0x1460e8=_0x200b1b();while(!![]){try{const _0x3cf9b9=-parseInt(_0x24ebcb(0x13d))/0x1*(-parseInt(_0x24ebcb(0x13b))/0x2)+parseInt(_0x24ebcb(0x138))/0x3*(parseInt(_0x24ebcb(0x139))/0x4)+-parseInt(_0x24ebcb(0x13e))/0x5+-parseInt(_0x24ebcb(0x149))/0x6*(parseInt(_0x24ebcb(0x145))/0x7)+-parseInt(_0x24ebcb(0x140))/0x8*(-parseInt(_0x24ebcb(0x148))/0x9)+parseInt(_0x24ebcb(0x13c))/0xa*(parseInt(_0x24ebcb(0x141))/0xb)+parseInt(_0x24ebcb(0x142))/0xc*(-parseInt(_0x24ebcb(0x147))/0xd);if(_0x3cf9b9===_0x3a17d9)break;else _0x1460e8['push'](_0x1460e8['shift']());}catch(_0x5b7212){_0x1460e8['push'](_0x1460e8['shift']());}}}(a194_0x3189,0x32477));function a194_0x3189(){const _0x2cab79=['validation','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','182viqSOm','object','234JyUXya','249903SwGsBh','26454GbOLzR','parse','975309TOpvVD','4CyTGMo','isArray','2AEXJBu','356030tDHnfA','405389xiTkYZ','266060YakRYN','Invalid\x20JSON\x20for\x20--params:\x20','32CWWCRI','55TMWGYr','430524FAuJBq'];a194_0x3189=function(){return _0x2cab79;};return a194_0x3189();}import{CliErrors}from'../errors.js';export function parseJsonParams(_0x3f1c99){const _0x5d908b=a194_0x9292;if(!_0x3f1c99)return undefined;let _0x4c3977;try{_0x4c3977=JSON[_0x5d908b(0x137)](_0x3f1c99);}catch{throw CliErrors[_0x5d908b(0x143)](_0x5d908b(0x13f)+_0x3f1c99);}if(!_0x4c3977||typeof _0x4c3977!==_0x5d908b(0x146)||Array[_0x5d908b(0x13a)](_0x4c3977))throw CliErrors['validation']('--params\x20must\x20be\x20a\x20JSON\x20object',_0x5d908b(0x144));return _0x4c3977;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a195_0x54d7(){const _0x42f053=['63WwyAJe','256380XWtSvD','5hVUMTE','303208PUBOLQ','367947XDpMdL','3367250sBwjml','213648prWfAK','559984lmdWuw','104562CEUzog','9VuEjPD'];a195_0x54d7=function(){return _0x42f053;};return a195_0x54d7();}(function(_0x1fc9dd,_0x32a92a){const _0x4f0523=a195_0x39d2,_0x2db97d=_0x1fc9dd();while(!![]){try{const _0x463bdd=-parseInt(_0x4f0523(0x151))/0x1+parseInt(_0x4f0523(0x14c))/0x2*(-parseInt(_0x4f0523(0x14f))/0x3)+-parseInt(_0x4f0523(0x149))/0x4+-parseInt(_0x4f0523(0x152))/0x5*(parseInt(_0x4f0523(0x14e))/0x6)+-parseInt(_0x4f0523(0x150))/0x7*(-parseInt(_0x4f0523(0x14d))/0x8)+parseInt(_0x4f0523(0x14a))/0x9+parseInt(_0x4f0523(0x14b))/0xa;if(_0x463bdd===_0x32a92a)break;else _0x2db97d['push'](_0x2db97d['shift']());}catch(_0x5df9ea){_0x2db97d['push'](_0x2db97d['shift']());}}}(a195_0x54d7,0x52665));function a195_0x39d2(_0x40d484,_0x252397){_0x40d484=_0x40d484-0x149;const _0x54d74f=a195_0x54d7();let _0x39d280=_0x54d74f[_0x40d484];return _0x39d280;}export const isWindows=process['platform']==='win32';export function resolveNpmBin(_0xb1084d){return isWindows?_0xb1084d+'.cmd':_0xb1084d;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a196_0x654647=a196_0x159d;(function(_0x5ab5ae,_0x5c03ed){const _0x5c8863=a196_0x159d,_0x1ea538=_0x5ab5ae();while(!![]){try{const _0x7fc52=-parseInt(_0x5c8863(0x1d8))/0x1+parseInt(_0x5c8863(0x1d0))/0x2*(parseInt(_0x5c8863(0x1cf))/0x3)+-parseInt(_0x5c8863(0x1d9))/0x4*(parseInt(_0x5c8863(0x1da))/0x5)+parseInt(_0x5c8863(0x1e0))/0x6+-parseInt(_0x5c8863(0x1dd))/0x7+parseInt(_0x5c8863(0x1ce))/0x8+parseInt(_0x5c8863(0x1e2))/0x9*(parseInt(_0x5c8863(0x1e1))/0xa);if(_0x7fc52===_0x5c03ed)break;else _0x1ea538['push'](_0x1ea538['shift']());}catch(_0x2367fc){_0x1ea538['push'](_0x1ea538['shift']());}}}(a196_0xa852,0x6aff8));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';function a196_0x159d(_0x5b51f4,_0x27f248){_0x5b51f4=_0x5b51f4-0x1cc;const _0xa852c8=a196_0xa852();let _0x159da5=_0xa852c8[_0x5b51f4];return _0x159da5;}import{getTemplateBaseUrl}from'../utils/config.js';import{appendUpdateTime}from'../utils/guides-cdn.js';const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x40c13f=getTemplateBaseUrl();return _0x40c13f+'/rules/rules.json';}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a196_0x654647(0x1d5));function a196_0xa852(){const _0x2641fe=['../../templates/rules/lovrabet_rules.mdc.tpl','statusText','application/json','125075rHycKL','92wvshzC','100985seefrF','lastUpdated','lovrabet_rules.mdc','5976250nmKyIm','content','.cursor/rules','1090416WlMsXP','60DPhwrd','1142019PJPYwG','CDN\x20请求失败:\x20','CDN\x20返回数据格式错误','6357632bBnbkV','3sbgJtw','287668FulqHc','json','status','catch','utf-8'];a196_0xa852=function(){return _0x2641fe;};return a196_0xa852();}export async function fetchRulesFromCDN(){const _0x39f8ca=a196_0x654647,_0x295f13=getRulesCdnUrl(),_0x34510c=await fetch(_0x295f13,{'headers':{'Accept':_0x39f8ca(0x1d7)}});if(!_0x34510c['ok'])throw new Error(_0x39f8ca(0x1cc)+_0x34510c[_0x39f8ca(0x1d2)]+'\x20'+_0x34510c[_0x39f8ca(0x1d6)]);const _0x20c661=await _0x34510c[_0x39f8ca(0x1d1)]();if(!_0x20c661['content']||typeof _0x20c661[_0x39f8ca(0x1de)]!=='string')throw new Error(_0x39f8ca(0x1cd));return _0x20c661;}export async function getRulesContent(){const _0xfe6aec=a196_0x654647;try{const _0x3fc1cb=await fetchRulesFromCDN();return _0x3fc1cb[_0xfe6aec(0x1de)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x2113ab=a196_0x654647;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x2113ab(0x1d4));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x4bdade){const _0x246637=a196_0x654647,_0x7f53b0=await fetchRulesFromCDN()[_0x246637(0x1d3)](()=>null);let _0x2732ee;_0x7f53b0?(_0x2732ee=_0x7f53b0[_0x246637(0x1de)],_0x7f53b0[_0x246637(0x1db)]&&(_0x2732ee=appendUpdateTime(_0x2732ee,_0x7f53b0[_0x246637(0x1db)]))):_0x2732ee=readLocalTemplate();const _0x2be107=dirname(_0x4bdade);!existsSync(_0x2be107)&&mkdirSync(_0x2be107,{'recursive':!![]}),writeFileSync(_0x4bdade,_0x2732ee,'utf-8');}export async function copyRulesToCursor(_0x258d3a){const _0x5cc288=a196_0x654647,_0x5186bd=join(_0x258d3a,_0x5cc288(0x1df)),_0x40e071=join(_0x5186bd,_0x5cc288(0x1dc));if(existsSync(_0x40e071))return![];return await writeRulesFile(_0x40e071),!![];}export async function copyRulesToAgentsMd(_0x1a65ba){const _0x5333b9=join(_0x1a65ba,'agents.md');if(existsSync(_0x5333b9))return![];return await writeRulesFile(_0x5333b9),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x3fb7cd){return new Promise(_0x3fb33e=>setTimeout(_0x3fb33e,_0x3fb7cd));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a198_0x408d9b=a198_0x2bf0;function a198_0x2551(){const _0x3ff523=['82723LEUZqY','promises','6FDagkf','676431GwmgpV','toComponentName','split','isDirectory','processFile','name','toISOString','.ts','template','includes','tableName:\x20\x22','getSeconds','processTemplate','padStart','api','alias','charAt','4YeDndw','now','.md','isFile','name:\x20\x22','endsWith','pad','mkdir','getFullYear','模板内容替换失败','1852417ObWcgy','getDate','6671478iqEBkj','模板内容替换完成','extname','readdir','push','toLowerCase','toUpperCase','.css','map','utf8','1325016QIXmWd','alias:\x20\x22','replaceContent','9bXLJFX','slice','replaceApiContent','\x0a\x20\x20\x20\x20{\x20','toDisplayTitle','error','.json','tableName','info','writeFile','129670TAwCEn','replace','getMinutes','readFile','LOVRABET','success','.tpl','pop','datasetCode:\x20\x22','2iuWPan','\x20},','join','message','810150tXywPf'];a198_0x2551=function(){return _0x3ff523;};return a198_0x2551();}(function(_0x49ade1,_0x461eff){const _0x29184a=a198_0x2bf0,_0x4e8366=_0x49ade1();while(!![]){try{const _0x5dd311=-parseInt(_0x29184a(0x149))/0x1*(parseInt(_0x29184a(0x189))/0x2)+-parseInt(_0x29184a(0x14c))/0x3*(-parseInt(_0x29184a(0x15d))/0x4)+parseInt(_0x29184a(0x148))/0x5*(-parseInt(_0x29184a(0x14b))/0x6)+-parseInt(_0x29184a(0x167))/0x7+-parseInt(_0x29184a(0x173))/0x8+parseInt(_0x29184a(0x176))/0x9*(parseInt(_0x29184a(0x180))/0xa)+parseInt(_0x29184a(0x169))/0xb;if(_0x5dd311===_0x461eff)break;else _0x4e8366['push'](_0x4e8366['shift']());}catch(_0x4e843f){_0x4e8366['push'](_0x4e8366['shift']());}}}(a198_0x2551,0x297cb));import a198_0x241e8c from'node:fs';import a198_0x31978e from'node:path';import{logger}from'../utils/logger.js';function a198_0x2bf0(_0x415e6a,_0x2caba3){_0x415e6a=_0x415e6a-0x145;const _0x2551f0=a198_0x2551();let _0x2bf01d=_0x2551f0[_0x415e6a];return _0x2bf01d;}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a198_0x408d9b(0x163)](_0x437567){const _0xc515c7=a198_0x408d9b;return String(_0x437567)[_0xc515c7(0x159)](0x2,'0');}static['formatLocalTimestamp'](_0x4b34f3){const _0x3bea0c=a198_0x408d9b,_0xc0e9fb=_0x4b34f3[_0x3bea0c(0x165)](),_0x366ac9=this[_0x3bea0c(0x163)](_0x4b34f3['getMonth']()+0x1),_0x1fdb40=this[_0x3bea0c(0x163)](_0x4b34f3[_0x3bea0c(0x168)]()),_0x52dd4e=this['pad'](_0x4b34f3['getHours']()),_0x480714=this[_0x3bea0c(0x163)](_0x4b34f3[_0x3bea0c(0x182)]()),_0x119224=this[_0x3bea0c(0x163)](_0x4b34f3[_0x3bea0c(0x157)]());return{'createdAt':_0xc0e9fb+'-'+_0x366ac9+'-'+_0x1fdb40+'\x20'+_0x52dd4e+':'+_0x480714+':'+_0x119224,'createdDate':_0xc0e9fb+'-'+_0x366ac9+'-'+_0x1fdb40,'createdTime':_0x52dd4e+':'+_0x480714+':'+_0x119224};}static['toComponentName'](_0x145d25){const _0x38db7a=a198_0x408d9b,_0x306f29=_0x145d25['split']('/')[_0x38db7a(0x187)]()||_0x145d25;return _0x306f29[_0x38db7a(0x14e)]('-')['map'](_0x1c10e3=>_0x1c10e3['charAt'](0x0)[_0x38db7a(0x16f)]()+_0x1c10e3[_0x38db7a(0x177)](0x1)[_0x38db7a(0x16e)]())[_0x38db7a(0x146)]('');}static[a198_0x408d9b(0x17a)](_0x43a868){const _0x2d7cd6=a198_0x408d9b,_0x2717e3=_0x43a868['split']('/')[_0x2d7cd6(0x187)]()||_0x43a868;return _0x2717e3[_0x2d7cd6(0x14e)]('-')[_0x2d7cd6(0x171)](_0x2e35ad=>_0x2e35ad[_0x2d7cd6(0x15c)](0x0)['toUpperCase']()+_0x2e35ad[_0x2d7cd6(0x177)](0x1)['toLowerCase']())['join']('\x20');}static[a198_0x408d9b(0x175)](_0x55b0e3,_0x22eaa5,_0x20b4a6){const _0x3c86dd=a198_0x408d9b,_0x4b73a8=this[_0x3c86dd(0x14d)](_0x22eaa5),_0x5ca969=this[_0x3c86dd(0x17a)](_0x22eaa5),{createdAt:_0xae5220,createdDate:_0x2ec3e7,createdTime:_0x370f35}=this['formatLocalTimestamp'](new Date());let _0x12d0ac=_0x55b0e3['replace'](/\{CliVersion\}/g,CLI_VERSION)[_0x3c86dd(0x181)](/\{ComponentName\}/g,_0x4b73a8)[_0x3c86dd(0x181)](/\{DisplayTitle\}/g,_0x5ca969)[_0x3c86dd(0x181)](/\{PageName\}/g,_0x22eaa5)[_0x3c86dd(0x181)](/\{TemplateName\}/g,_0x20b4a6)[_0x3c86dd(0x181)](/\{CreatedAt\}/g,_0xae5220)[_0x3c86dd(0x181)](/\{CreatedDate\}/g,_0x2ec3e7)[_0x3c86dd(0x181)](/\{CreatedTime\}/g,_0x370f35);return _0x12d0ac;}static[a198_0x408d9b(0x178)](_0x4e9fa9,_0x3b8880,_0x58fbc2,_0x17cbcc,_0x537c9e,_0x20d28b,_0x512713,_0x10eb8a){const _0x1d39dc=a198_0x408d9b,_0x16e585=new Date(),_0x5b1e0c=_0x16e585[_0x1d39dc(0x152)](),_0x6657a8=_0x58fbc2[_0x1d39dc(0x171)](_0x2744e7=>{const _0x2807c0=_0x1d39dc,_0x2e63ae=[_0x2807c0(0x188)+_0x2744e7['datasetCode']+'\x22',_0x2807c0(0x156)+_0x2744e7[_0x2807c0(0x17d)]+'\x22',_0x2807c0(0x161)+_0x2744e7[_0x2807c0(0x151)]+'\x22'];return _0x2744e7[_0x2807c0(0x15b)]&&_0x2e63ae[_0x2807c0(0x16d)](_0x2807c0(0x174)+_0x2744e7[_0x2807c0(0x15b)]+'\x22'),_0x2807c0(0x179)+_0x2e63ae[_0x2807c0(0x146)](',\x20')+_0x2807c0(0x145);})[_0x1d39dc(0x146)](''),_0x567946=_0x17cbcc||_0x58fbc2[0x0]?.[_0x1d39dc(0x15b)]||'YourModel';let _0x1e3da9=_0x4e9fa9[_0x1d39dc(0x181)](/\{AppCode\}/g,_0x3b8880)[_0x1d39dc(0x181)](/\{ModelConfigs\}/g,_0x6657a8)['replace'](/\{ExampleModelName\}/g,_0x567946)[_0x1d39dc(0x181)](/\{ApiFileName\}/g,_0x537c9e||_0x1d39dc(0x15a))[_0x1d39dc(0x181)](/\{ConfigName\}/g,_0x20d28b||'default')[_0x1d39dc(0x181)](/\{ClientConfigParam\}/g,_0x512713||'')[_0x1d39dc(0x181)](/\{VarPrefix\}/g,_0x10eb8a||_0x1d39dc(0x184))[_0x1d39dc(0x181)](/\{CreatedAt\}/g,_0x5b1e0c);return _0x1e3da9;}static async[a198_0x408d9b(0x158)](_0x5edbb6,_0x3b0c4a,_0x5b6187,_0x480490,_0x3ddee2=!![]){const _0x57b34d=a198_0x408d9b,_0x3b8710=Date['now']();try{_0x3ddee2&&logger[_0x57b34d(0x17e)](_0x57b34d(0x154),'开始处理模板内容替换',{'templatePath':_0x5edbb6,'targetPath':_0x3b0c4a,'pageName':_0x5b6187,'templateName':_0x480490});await a198_0x241e8c[_0x57b34d(0x14a)][_0x57b34d(0x164)](_0x3b0c4a,{'recursive':!![]}),await this['processDirectory'](_0x5edbb6,_0x3b0c4a,_0x5b6187,_0x480490);if(_0x3ddee2){const _0x2cf226=Date[_0x57b34d(0x15e)]()-_0x3b8710;logger[_0x57b34d(0x185)]('template',_0x57b34d(0x16a),_0x2cf226,{'pageName':_0x5b6187,'templateName':_0x480490});}}catch(_0x117135){if(_0x3ddee2){const _0x372c04=Date[_0x57b34d(0x15e)]()-_0x3b8710;logger[_0x57b34d(0x17b)](_0x57b34d(0x154),_0x57b34d(0x166),{'templatePath':_0x5edbb6,'targetPath':_0x3b0c4a,'pageName':_0x5b6187,'templateName':_0x480490,'error':_0x117135 instanceof Error?_0x117135[_0x57b34d(0x147)]:String(_0x117135),'duration':_0x372c04});}throw _0x117135;}}static async['processDirectory'](_0x2a65eb,_0x167db8,_0x1d0dc5,_0x5f3662){const _0x27d8ea=a198_0x408d9b,_0x48b483=await a198_0x241e8c[_0x27d8ea(0x14a)][_0x27d8ea(0x16c)](_0x2a65eb,{'withFileTypes':!![]});for(const _0x39a358 of _0x48b483){const _0x5bba30=a198_0x31978e[_0x27d8ea(0x146)](_0x2a65eb,_0x39a358['name']);let _0x31a6d9=a198_0x31978e['join'](_0x167db8,_0x39a358['name']);_0x39a358[_0x27d8ea(0x151)][_0x27d8ea(0x162)](_0x27d8ea(0x186))&&(_0x31a6d9=a198_0x31978e[_0x27d8ea(0x146)](_0x167db8,_0x39a358['name']['replace'](/\.tpl$/,'')));if(_0x39a358[_0x27d8ea(0x14f)]())await a198_0x241e8c['promises'][_0x27d8ea(0x164)](_0x31a6d9,{'recursive':!![]}),await this['processDirectory'](_0x5bba30,_0x31a6d9,_0x1d0dc5,_0x5f3662);else _0x39a358[_0x27d8ea(0x160)]()&&await this[_0x27d8ea(0x150)](_0x5bba30,_0x31a6d9,_0x1d0dc5,_0x5f3662);}}static async[a198_0x408d9b(0x150)](_0x4c45c0,_0x5da08c,_0x17b038,_0x177cf6){const _0x381be6=a198_0x408d9b,_0x1bab10=a198_0x31978e[_0x381be6(0x16b)](_0x4c45c0)[_0x381be6(0x16e)]();_0x4c45c0[_0x381be6(0x162)](_0x381be6(0x186))&&(_0x5da08c=_0x5da08c[_0x381be6(0x181)](/\.tpl$/,''));const _0x359fc8=['.tsx',_0x381be6(0x153),'.jsx','.js',_0x381be6(0x17c),_0x381be6(0x15f),_0x381be6(0x170),'.scss',_0x381be6(0x186)];if(_0x359fc8[_0x381be6(0x155)](_0x1bab10)||_0x4c45c0[_0x381be6(0x162)](_0x381be6(0x186))){const _0x5a822c=await a198_0x241e8c['promises'][_0x381be6(0x183)](_0x4c45c0,_0x381be6(0x172)),_0x39e441=this[_0x381be6(0x175)](_0x5a822c,_0x17b038,_0x177cf6);await a198_0x241e8c['promises'][_0x381be6(0x17f)](_0x5da08c,_0x39e441,_0x381be6(0x172));}else await a198_0x241e8c[_0x381be6(0x14a)]['copyFile'](_0x4c45c0,_0x5da08c);}}
|
package/lib/utils/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a199_0x2fc6(_0x1cd0aa,_0x5675e7){_0x1cd0aa=_0x1cd0aa-0x100;var _0x45144a=a199_0x4514();var _0x2fc601=_0x45144a[_0x1cd0aa];return _0x2fc601;}(function(_0x2888d4,_0x4aa4f8){var _0x1a4520=a199_0x2fc6,_0x5344f0=_0x2888d4();while(!![]){try{var _0x302dcc=parseInt(_0x1a4520(0x102))/0x1*(parseInt(_0x1a4520(0x103))/0x2)+-parseInt(_0x1a4520(0x108))/0x3*(-parseInt(_0x1a4520(0x107))/0x4)+-parseInt(_0x1a4520(0x104))/0x5*(parseInt(_0x1a4520(0x101))/0x6)+-parseInt(_0x1a4520(0x109))/0x7+-parseInt(_0x1a4520(0x106))/0x8+-parseInt(_0x1a4520(0x105))/0x9+-parseInt(_0x1a4520(0x100))/0xa*(-parseInt(_0x1a4520(0x10a))/0xb);if(_0x302dcc===_0x4aa4f8)break;else _0x5344f0['push'](_0x5344f0['shift']());}catch(_0x38b761){_0x5344f0['push'](_0x5344f0['shift']());}}}(a199_0x4514,0xcdcbb));import{VERSION}from'../generated/build-info.js';export function getCliVersion(){return VERSION;}function a199_0x4514(){var _0x49ef02=['23420jQvxXZ','6172722iMbpuJ','9qEiJYs','259382yfSpGk','5oixhES','634671OLPTVq','1993488ZWFofH','4AclToa','563097rSDDFb','3997203cVLUMG','6611BKjcDn'];a199_0x4514=function(){return _0x49ef02;};return a199_0x4514();}
|