@lovrabet/rabetbase-cli 2.2.4-beta.3 → 2.2.4-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 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.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/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.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/relation-audit.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/update-notice.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 -2
- package/templates/projects/sub-app-react-demo/src/vite-env.d.ts +1 -1
- package/templates/rules/lovrabet_rules.mdc.tpl +3 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
const a183_0xa62da6=a183_0x4123;(function(_0x3d5abc,_0x2e0301){const _0x3dd9c1=a183_0x4123,_0x218064=_0x3d5abc();while(!![]){try{const _0xe3eb32=parseInt(_0x3dd9c1(0x11d))/0x1+parseInt(_0x3dd9c1(0x110))/0x2+-parseInt(_0x3dd9c1(0x113))/0x3*(-parseInt(_0x3dd9c1(0x114))/0x4)+parseInt(_0x3dd9c1(0x115))/0x5+-parseInt(_0x3dd9c1(0x117))/0x6+-parseInt(_0x3dd9c1(0x119))/0x7+-parseInt(_0x3dd9c1(0x11a))/0x8;if(_0xe3eb32===_0x2e0301)break;else _0x218064['push'](_0x218064['shift']());}catch(_0x54ec86){_0x218064['push'](_0x218064['shift']());}}}(a183_0x2388,0x48f5c));function a183_0x4123(_0x1f66f3,_0x2a0a17){_0x1f66f3=_0x1f66f3-0x10f;const _0x2388f5=a183_0x2388();let _0x41233b=_0x2388f5[_0x1f66f3];return _0x41233b;}function a183_0x2388(){const _0x4d1057=['72244zopifq','logData','1066146epEGEN','version','rabetbase-cli','3UJcBqM','2094032DyHeaG','687040rPYDMf','manual','1697496lqltcs','spanName','4104828jnUWPa','784552MydSpH','traceparent','traceName'];a183_0x2388=function(){return _0x4d1057;};return a183_0x2388();}import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME=a183_0xa62da6(0x112);export async function sendCliTraceLog(_0x43de50){const _0x47928a=a183_0xa62da6;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x43de50[_0x47928a(0x11c)]??DEFAULT_TRACE_NAME,'version':_0x43de50[_0x47928a(0x111)]??getCliVersion(),'spanName':_0x43de50[_0x47928a(0x118)],'eventType':_0x47928a(0x116),'logData':_0x43de50[_0x47928a(0x10f)],..._0x43de50[_0x47928a(0x11b)]&&{'traceparent':_0x43de50[_0x47928a(0x11b)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x29cb37=a184_0x30c5;function a184_0x30c5(_0x47b91d,_0x4679d7){_0x47b91d=_0x47b91d-0x75;const _0x59a71d=a184_0x59a7();let _0x30c52b=_0x59a71d[_0x47b91d];return _0x30c52b;}(function(_0x4928ce,_0x439e28){const _0x539396=a184_0x30c5,_0x520440=_0x4928ce();while(!![]){try{const _0x35641f=-parseInt(_0x539396(0x86))/0x1*(parseInt(_0x539396(0x7c))/0x2)+-parseInt(_0x539396(0x84))/0x3*(-parseInt(_0x539396(0x7f))/0x4)+-parseInt(_0x539396(0x87))/0x5*(-parseInt(_0x539396(0x85))/0x6)+parseInt(_0x539396(0x78))/0x7*(parseInt(_0x539396(0x7b))/0x8)+-parseInt(_0x539396(0x7d))/0x9*(-parseInt(_0x539396(0x77))/0xa)+-parseInt(_0x539396(0x7e))/0xb+-parseInt(_0x539396(0x82))/0xc;if(_0x35641f===_0x439e28)break;else _0x520440['push'](_0x520440['shift']());}catch(_0x34e0ec){_0x520440['push'](_0x520440['shift']());}}}(a184_0x59a7,0xe2f1f));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a184_0x29cb37(0x75);export const PLATFORM_ISSUE_SPAN_NAME=a184_0x29cb37(0x80);export async function sendPlatformIssueCollectLog(_0x65d357){const _0x40b2b3=a184_0x29cb37;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x65d357[_0x40b2b3(0x83)],'issue.description':_0x65d357[_0x40b2b3(0x88)],..._0x65d357['sanitize']?{'issue.description_original_bytes':_0x65d357[_0x40b2b3(0x79)]['originalBytes'],'issue.description_truncated':_0x65d357['sanitize'][_0x40b2b3(0x81)],'issue.description_redactions':_0x65d357['sanitize']['redactionCount'],'issue.description_redaction_kinds':_0x65d357['sanitize'][_0x40b2b3(0x76)][_0x40b2b3(0x7a)](',')}:{}}});}function a184_0x59a7(){const _0x452110=['13383LZPcJP','17287864HCtMBM','197564vzQZCt','issue.log.collect','truncated','28569024vKPTRz','title','93jLJzDL','33450teKkWk','145570HVwBvD','1605ysvXMW','description','platform-issue-log-collect','redactionKinds','10580CzsxsB','7nfHPlr','sanitize','join','1068568VIPOwB','2QiWwKP'];a184_0x59a7=function(){return _0x452110;};return a184_0x59a7();}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a186_0x258be4=a186_0x5622;(function(_0x8be292,_0x5eb890){const _0x3079e9=a186_0x5622,_0x35edad=_0x8be292();while(!![]){try{const _0x2c2d5b=-parseInt(_0x3079e9(0x1ff))/0x1+-parseInt(_0x3079e9(0x1fc))/0x2*(-parseInt(_0x3079e9(0x1dc))/0x3)+-parseInt(_0x3079e9(0x1e4))/0x4+parseInt(_0x3079e9(0x1e2))/0x5*(-parseInt(_0x3079e9(0x1de))/0x6)+parseInt(_0x3079e9(0x1fd))/0x7+parseInt(_0x3079e9(0x202))/0x8+-parseInt(_0x3079e9(0x1f0))/0x9*(-parseInt(_0x3079e9(0x1ed))/0xa);if(_0x2c2d5b===_0x5eb890)break;else _0x35edad['push'](_0x35edad['shift']());}catch(_0x4eab9e){_0x35edad['push'](_0x35edad['shift']());}}}(a186_0x1e35,0x7833d));export const CORE_IDE_CONFIGS={'cursor':{'name':a186_0x258be4(0x1f5),'description':a186_0x258be4(0x209),'folders':['.cursorrules',a186_0x258be4(0x1ec)],'files':[{'type':a186_0x258be4(0x1f9),'path':a186_0x258be4(0x1e7),'template':a186_0x258be4(0x1e1)}]},'windsurf':{'name':a186_0x258be4(0x1f1),'description':'Windsurf\x20IDE','folders':[a186_0x258be4(0x1eb)],'files':[{'type':a186_0x258be4(0x1f9),'path':a186_0x258be4(0x20c),'template':a186_0x258be4(0x1e1)}]},'claude':{'name':'Claude\x20Code','description':a186_0x258be4(0x1e9),'folders':['.claude'],'files':[{'type':'file','path':a186_0x258be4(0x205),'template':a186_0x258be4(0x1e1)}]},'cline':{'name':a186_0x258be4(0x1ea),'description':'Cline\x20IDE','folders':['.cline'],'files':[{'type':'file','path':'.cline/skills/lovrabet/SKILL.md','template':a186_0x258be4(0x1e1)}]},'codex':{'name':'Codex','description':a186_0x258be4(0x1ee),'folders':[a186_0x258be4(0x208)],'files':[{'type':a186_0x258be4(0x1f9),'path':a186_0x258be4(0x206),'template':'SKILL.md.tpl'}]},'opencode':{'name':a186_0x258be4(0x1f4),'description':a186_0x258be4(0x207),'folders':['.opencode'],'files':[{'type':'file','path':'.opencode/skills/lovrabet/SKILL.md','template':a186_0x258be4(0x1e1)}]},'qoder':{'name':a186_0x258be4(0x200),'description':a186_0x258be4(0x204),'folders':[a186_0x258be4(0x1e5)],'files':[{'type':'file','path':a186_0x258be4(0x20d),'template':a186_0x258be4(0x1e1)},{'type':a186_0x258be4(0x1f9),'path':a186_0x258be4(0x1f6),'template':a186_0x258be4(0x1e1)}]},'codebuddy':{'name':a186_0x258be4(0x203),'description':a186_0x258be4(0x1e8),'folders':[a186_0x258be4(0x1fe)],'files':[{'type':a186_0x258be4(0x1f9),'path':a186_0x258be4(0x1fa),'template':a186_0x258be4(0x1e1)}]},'trae':{'name':'Trae','description':a186_0x258be4(0x20a),'folders':[a186_0x258be4(0x1fb)],'files':[{'type':a186_0x258be4(0x1f9),'path':a186_0x258be4(0x1f3),'template':a186_0x258be4(0x1e1)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':'其他\x20(通用模板)','description':'通用模板\x20-\x20兜底方案','folders':[a186_0x258be4(0x1ef)],'files':[{'type':a186_0x258be4(0x1f9),'path':a186_0x258be4(0x1e3),'template':a186_0x258be4(0x1e1)}]},'antigravity':{'name':a186_0x258be4(0x20e),'description':'Antigravity\x20IDE','folders':[a186_0x258be4(0x1ef)],'files':[{'type':a186_0x258be4(0x1f9),'path':a186_0x258be4(0x1e3),'template':a186_0x258be4(0x1e1)}]}};function a186_0x1e35(){const _0x4a1bcf=['3110644tfUhya','.qoder','cline','.cursor/skills/rabetbase.md','CodeBuddy\x20IDE','Claude\x20Code','Cline','.windsurf','.cursor','740360OKlLOI','Codex\x20IDE','.agent','198DCmglB','Windsurf','antigravity','.trae/skills/lovrabet/SKILL.md','OpenCode','Cursor','.qoder/skills/lovrabet/SKILL.md','claude','codex','file','.codebuddy/skills/lovrabet/SKILL.md','.trae','88474dCYFes','1692474pvqCOo','.codebuddy','214357WocUyK','Qoder','windsurf','2376896AmqVqE','CodeBuddy','Qoder\x20IDE','.claude/skills/lovrabet/SKILL.md','.codex/skills/lovrabet/SKILL.md','OpenCode\x20IDE','.codex','Cursor\x20IDE','Trae\x20IDE','qoder','.windsurf/workflows/rabetbase.md','.qoder/rules/rabetbase.md','Antigravity','opencode','3ShnMSL','codebuddy','24qbwFIk','trae','cursor','SKILL.md.tpl','909445gkFrwD','.agent/skills/lovrabet/SKILL.md'];a186_0x1e35=function(){return _0x4a1bcf;};return a186_0x1e35();}export const CORE_IDE_LIST=['claude',a186_0x258be4(0x1e6),a186_0x258be4(0x1dd),a186_0x258be4(0x1f8),a186_0x258be4(0x1e0),a186_0x258be4(0x1db),'qoder',a186_0x258be4(0x1df),'windsurf'];function a186_0x5622(_0x5c5f31,_0x1d86ee){_0x5c5f31=_0x5c5f31-0x1db;const _0x1e3526=a186_0x1e35();let _0x5622ea=_0x1e3526[_0x5c5f31];return _0x5622ea;}export const IDE_LIST=[a186_0x258be4(0x1f2),a186_0x258be4(0x1f7),'cline','codebuddy',a186_0x258be4(0x1f8),a186_0x258be4(0x1e0),a186_0x258be4(0x1db),a186_0x258be4(0x20b),a186_0x258be4(0x1df),a186_0x258be4(0x201),'agent'];export const ALL_CORE_IDES=['cursor','windsurf',a186_0x258be4(0x1f7),a186_0x258be4(0x1e6),a186_0x258be4(0x1f8),a186_0x258be4(0x1db),a186_0x258be4(0x20b),a186_0x258be4(0x1dd),'trae'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x361557,_0x22ccac){const _0x4da8c0=a187_0x2cef,_0x1c0847=_0x361557();while(!![]){try{const _0x158423=parseInt(_0x4da8c0(0x155))/0x1+parseInt(_0x4da8c0(0x15a))/0x2*(parseInt(_0x4da8c0(0x154))/0x3)+parseInt(_0x4da8c0(0x158))/0x4+parseInt(_0x4da8c0(0x153))/0x5*(-parseInt(_0x4da8c0(0x159))/0x6)+parseInt(_0x4da8c0(0x156))/0x7*(parseInt(_0x4da8c0(0x15b))/0x8)+-parseInt(_0x4da8c0(0x151))/0x9*(parseInt(_0x4da8c0(0x150))/0xa)+-parseInt(_0x4da8c0(0x152))/0xb*(-parseInt(_0x4da8c0(0x157))/0xc);if(_0x158423===_0x22ccac)break;else _0x1c0847['push'](_0x1c0847['shift']());}catch(_0x1a7a2e){_0x1c0847['push'](_0x1c0847['shift']());}}}(a187_0x4a8b,0x1bf95));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a187_0x2cef(_0x4e7527,_0x7dc9d9){_0x4e7527=_0x4e7527-0x150;const _0x4a8b77=a187_0x4a8b();let _0x2cef49=_0x4a8b77[_0x4e7527];return _0x2cef49;}function a187_0x4a8b(){const _0x29adf4=['11314GbLwNj','112HfyRyJ','80170wuQRpa','99VgfaLt','223586JMfVpo','5vcyQLb','21Fkqejw','121903aFVHkc','26985zwqimW','12XkUFew','255844gDALZF','581946aXGhhk'];a187_0x4a8b=function(){return _0x29adf4;};return a187_0x4a8b();}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(_0x45b294,_0x531268){const _0x1a44c8=a188_0x31c9,_0x10e4d0=_0x45b294();while(!![]){try{const _0x2d72e7=-parseInt(_0x1a44c8(0x180))/0x1+-parseInt(_0x1a44c8(0x17b))/0x2+parseInt(_0x1a44c8(0x177))/0x3+-parseInt(_0x1a44c8(0x17d))/0x4*(-parseInt(_0x1a44c8(0x17f))/0x5)+parseInt(_0x1a44c8(0x182))/0x6*(-parseInt(_0x1a44c8(0x17a))/0x7)+parseInt(_0x1a44c8(0x17e))/0x8+parseInt(_0x1a44c8(0x17c))/0x9*(parseInt(_0x1a44c8(0x176))/0xa);if(_0x2d72e7===_0x531268)break;else _0x10e4d0['push'](_0x10e4d0['shift']());}catch(_0x49caf9){_0x10e4d0['push'](_0x10e4d0['shift']());}}}(a188_0x4252,0x785a7));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x3e9e27=a188_0x31c9,_0x4d60f1=getTemplateBaseUrl(),_0x1d5ad9=[_0x4d60f1+_0x3e9e27(0x181),_0x4d60f1+_0x3e9e27(0x184)];for(const _0x48627c of _0x1d5ad9){try{const _0x295ddc=await fetch(_0x48627c,{'headers':{'Accept':_0x3e9e27(0x185)}});if(!_0x295ddc['ok'])continue;const _0x41836c=await _0x295ddc['json']();if(!_0x41836c[_0x3e9e27(0x186)]?.[_0x3e9e27(0x183)]||!_0x41836c[_0x3e9e27(0x179)]?.[_0x3e9e27(0x178)]?.[_0x3e9e27(0x183)])continue;return _0x41836c;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;function a188_0x4252(){const _0x24ed19=['cli','9533170fczKFy','444060izQadC','node','sdk','21faeJmQ','828176AGWRZF','9nEmwUB','8244YVrTSP','9464kShTJI','1105iVuCaN','431139URJpXe','/config.json','439614pYIjOS','stableVersion','/config/index.json','application/json'];a188_0x4252=function(){return _0x24ed19;};return a188_0x4252();}function a188_0x31c9(_0x2f924e,_0x7870e4){_0x2f924e=_0x2f924e-0x176;const _0x4252ed=a188_0x4252();let _0x31c948=_0x4252ed[_0x2f924e];return _0x31c948;}let hasCachedConfig=![];export async function getCdnConfig(){const _0x267f81=Date['now']();if(hasCachedConfig){const _0x368f54=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x267f81-cacheTime<_0x368f54)return cachedConfig;}const _0x1b0d07=await fetchCdnConfig();return cachedConfig=_0x1b0d07,cacheTime=_0x267f81,hasCachedConfig=!![],_0x1b0d07;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x274690,_0x528f9f){const _0x412386=a189_0x2578,_0x427f2e=_0x274690();while(!![]){try{const _0x6e441c=parseInt(_0x412386(0xe6))/0x1+-parseInt(_0x412386(0xd0))/0x2*(parseInt(_0x412386(0xdf))/0x3)+-parseInt(_0x412386(0xe1))/0x4*(-parseInt(_0x412386(0xd6))/0x5)+-parseInt(_0x412386(0xd8))/0x6+-parseInt(_0x412386(0xdd))/0x7*(-parseInt(_0x412386(0xe5))/0x8)+-parseInt(_0x412386(0xee))/0x9+parseInt(_0x412386(0xed))/0xa*(-parseInt(_0x412386(0xe4))/0xb);if(_0x6e441c===_0x528f9f)break;else _0x427f2e['push'](_0x427f2e['shift']());}catch(_0x2017ef){_0x427f2e['push'](_0x427f2e['shift']());}}}(a189_0x5fec,0xbf211));import a189_0x3f9a8f from'node:fs';import a189_0x49876d from'node:path';function a189_0x5fec(){const _0x49991c=['@lovrabet/sdk','\x20\x20\x20Stable\x20version:\x20','↪\x20SDK\x20update\x20available','test','minVersion','coerce','10YGGZNp','1937196PJeoPP','utf8','\x20\x20\x20Upgrade\x20command:\x20','sdk','parse','\x1b[33m','readFileSync','version','join','dependencies','2GWOZQA','some','\x20\x20\x20Current\x20version:\x20','\x1b[1m','node','stableVersion','5ffDgAS','latest','4415106qVjZuv','\x1b[0m','package.json','existsSync','devDependencies','12971TJhuvH','node_modules','3414606kIVzeg','packageName','3748180gdVTOI','log','all','50380nHchbO','2104UCxiwd','1452358GQuzFd'];a189_0x5fec=function(){return _0x49991c;};return a189_0x5fec();}import a189_0x68cb44 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';function a189_0x2578(_0x5c587f,_0x3999e4){_0x5c587f=_0x5c587f-0xce;const _0x5fec16=a189_0x5fec();let _0x2578cb=_0x5fec16[_0x5c587f];return _0x2578cb;}const FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0x462939){const _0x4f06f3=a189_0x2578,_0x5e7b53=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x5e7b53[_0x4f06f3(0xd1)](_0x9566c9=>_0x9566c9[_0x4f06f3(0xea)](_0x462939));}function getInstalledVersion(_0x36291,_0x1e68e7){const _0x58ecbf=a189_0x2578;try{const _0x2918e5=a189_0x49876d['join'](_0x36291,_0x58ecbf(0xde),_0x1e68e7,_0x58ecbf(0xda));if(a189_0x3f9a8f[_0x58ecbf(0xdb)](_0x2918e5)){const _0x159fee=JSON[_0x58ecbf(0xf2)](a189_0x3f9a8f[_0x58ecbf(0xf4)](_0x2918e5,'utf-8'));return _0x159fee['version']||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x4e49ed=a189_0x2578;try{const _0x523288=await getCdnConfig();return _0x523288?.[_0x4e49ed(0xf1)]?.[_0x4e49ed(0xd4)]?.[_0x4e49ed(0xd5)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x33f9e3=a189_0x2578;try{const _0x4e1882=await getCdnConfig();return _0x4e1882?.[_0x33f9e3(0xf1)]?.[_0x33f9e3(0xd4)]?.[_0x33f9e3(0xe0)]||_0x33f9e3(0xe7);}catch{return _0x33f9e3(0xe7);}}export async function checkSdkVersion(_0x425605){const _0x58f816=a189_0x2578,_0x3f3393=a189_0x49876d['join'](_0x425605,_0x58f816(0xda)),[_0x3e0546,_0x20fc5e]=await Promise[_0x58f816(0xe3)]([getSdkStableVersion(),getSdkPackageName()]),_0x49ccd1=_0x3e0546||FALLBACK_MIN_SDK_VERSION;if(!a189_0x3f9a8f['existsSync'](_0x3f3393))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x49ccd1,'packageName':_0x20fc5e,'stableVersion':_0x3e0546};try{const _0x5e96bb=JSON[_0x58f816(0xf2)](a189_0x3f9a8f[_0x58f816(0xf4)](_0x3f3393,_0x58f816(0xef))),_0x3f5b08=_0x5e96bb[_0x58f816(0xcf)]||{},_0x2f6299=_0x5e96bb[_0x58f816(0xdc)]||{},_0x221520=_0x3f5b08[_0x20fc5e]||_0x2f6299[_0x20fc5e];if(!_0x221520)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x49ccd1,'packageName':_0x20fc5e,'stableVersion':_0x3e0546};let _0x5f1d11=getInstalledVersion(_0x425605,_0x20fc5e);!_0x5f1d11&&(_0x5f1d11=_0x221520);if(isNonNumericVersion(_0x221520))return{'installed':!![],'version':_0x5f1d11,'needsUpgrade':![],'minVersion':_0x49ccd1,'packageName':_0x20fc5e,'stableVersion':_0x3e0546};const _0x57e713=a189_0x68cb44[_0x58f816(0xec)](_0x5f1d11),_0x38751a=a189_0x68cb44['coerce'](_0x49ccd1),_0x387807=_0x57e713&&_0x38751a?a189_0x68cb44['lt'](_0x57e713,_0x38751a):![];return{'installed':!![],'version':_0x5f1d11,'needsUpgrade':_0x387807,'minVersion':_0x49ccd1,'packageName':_0x20fc5e,'stableVersion':_0x3e0546};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x49ccd1,'packageName':_0x20fc5e,'stableVersion':_0x3e0546};}}export function checkSdkVersionSync(_0x4a7fc4){const _0x11183b=a189_0x2578,_0x3bf3ff=a189_0x49876d[_0x11183b(0xce)](_0x4a7fc4,_0x11183b(0xda)),_0x13ee54=_0x11183b(0xe7);if(!a189_0x3f9a8f['existsSync'](_0x3bf3ff))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x13ee54,'stableVersion':null};try{const _0x422a9a=JSON[_0x11183b(0xf2)](a189_0x3f9a8f[_0x11183b(0xf4)](_0x3bf3ff,_0x11183b(0xef))),_0x20905f=_0x422a9a['dependencies']||{},_0x17757f=_0x422a9a[_0x11183b(0xdc)]||{},_0x48afda=_0x20905f[_0x13ee54]||_0x17757f[_0x13ee54];if(!_0x48afda)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x13ee54,'stableVersion':null};let _0x129538=getInstalledVersion(_0x4a7fc4,_0x13ee54);!_0x129538&&(_0x129538=_0x48afda);if(isNonNumericVersion(_0x48afda))return{'installed':!![],'version':_0x129538,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x13ee54,'stableVersion':null};const _0x1f50d6=a189_0x68cb44['coerce'](_0x129538),_0x47591f=_0x1f50d6?a189_0x68cb44['lt'](_0x1f50d6,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x129538,'needsUpgrade':_0x47591f,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x13ee54,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x13ee54,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x1044b2){const _0x4cf056=a189_0x2578;if(!_0x1044b2['needsUpgrade'])return;const _0x367a3f=_0x4cf056(0xf3),_0x47560a=_0x4cf056(0xd9),_0x4a017b=_0x4cf056(0xd3),_0x567685=_0x1044b2[_0x4cf056(0xe0)]||_0x4cf056(0xe7),_0x56b417=_0x1044b2[_0x4cf056(0xd5)]||_0x1044b2[_0x4cf056(0xeb)],_0x1e04b5='npm\x20install\x20'+_0x567685+'@'+(_0x56b417||_0x4cf056(0xd7));console[_0x4cf056(0xe2)](),console[_0x4cf056(0xe2)](''+_0x367a3f+_0x4a017b+_0x4cf056(0xe9)+_0x47560a),console[_0x4cf056(0xe2)](_0x367a3f+_0x4cf056(0xd2)+_0x567685+'@'+_0x1044b2[_0x4cf056(0xf5)]+_0x47560a),console[_0x4cf056(0xe2)](_0x367a3f+_0x4cf056(0xe8)+_0x56b417+_0x47560a),console['log'](_0x367a3f+_0x4cf056(0xf0)+_0x1e04b5+_0x47560a),console['log']();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36bee,_0x1785c8){const _0x2c2b23=a190_0x4103,_0x3dde6a=_0x36bee();while(!![]){try{const _0x42c77b=parseInt(_0x2c2b23(0x16d))/0x1+parseInt(_0x2c2b23(0x157))/0x2+parseInt(_0x2c2b23(0x16b))/0x3+-parseInt(_0x2c2b23(0x168))/0x4+-parseInt(_0x2c2b23(0x16c))/0x5*(-parseInt(_0x2c2b23(0x14e))/0x6)+parseInt(_0x2c2b23(0x15d))/0x7*(-parseInt(_0x2c2b23(0x161))/0x8)+parseInt(_0x2c2b23(0x164))/0x9*(-parseInt(_0x2c2b23(0x166))/0xa);if(_0x42c77b===_0x1785c8)break;else _0x3dde6a['push'](_0x3dde6a['shift']());}catch(_0x1406ee){_0x3dde6a['push'](_0x3dde6a['shift']());}}}(a190_0x2229,0x39a1e));function a190_0x4103(_0x58727b,_0x1ed81d){_0x58727b=_0x58727b-0x147;const _0x2229b1=a190_0x2229();let _0x410315=_0x2229b1[_0x58727b];return _0x410315;}import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a190_0x2bb182 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(_0x25a8ed){const _0x932a33=a190_0x4103,_0x3ee32a=_0x25a8ed[_0x932a33(0x170)]||_0x932a33(0x14d);return _0x932a33(0x163)+NPM_PACKAGE_NAME+'@'+_0x3ee32a;}function getCurrentCliVersion(){const _0x7eb61a=a190_0x4103;try{const _0x328b36=fileURLToPath(import.meta.url),_0x487174=resolve(dirname(_0x328b36),_0x7eb61a(0x14a)),_0x322508=resolve(_0x487174,_0x7eb61a(0x150)),_0x2c38e8=JSON[_0x7eb61a(0x156)](readFileSync(_0x322508,_0x7eb61a(0x14b)));return _0x2c38e8[_0x7eb61a(0x15b)]||_0x7eb61a(0x16a);}catch{return _0x7eb61a(0x16a);}}export async function checkCliVersion(){const _0x1b05d8=a190_0x4103,_0x12e4cd=getCurrentCliVersion(),_0x1ec396=await getCliVersionPolicy(),_0x4b55c5=_0x1ec396?.['stableVersion']||null,_0x1c32dd=_0x1ec396?.[_0x1b05d8(0x15e)]||null;let _0x32d036=![],_0x566dc2=![];const _0x250f27=a190_0x2bb182['coerce'](_0x12e4cd);if(_0x250f27&&_0x4b55c5)try{const _0x4a08ad=a190_0x2bb182[_0x1b05d8(0x14f)](_0x4b55c5);if(_0x4a08ad)_0x32d036=a190_0x2bb182['lt'](_0x250f27,_0x4a08ad);}catch{}if(_0x250f27&&_0x1c32dd)try{const _0x23b71a=a190_0x2bb182['coerce'](_0x1c32dd);if(_0x23b71a)_0x566dc2=a190_0x2bb182['lt'](_0x250f27,_0x23b71a);}catch{}return _0x566dc2&&(_0x32d036=!![]),{'currentVersion':_0x12e4cd,'stableVersion':_0x4b55c5,'minimumVersion':_0x1c32dd,'needsUpgrade':_0x32d036,'belowMinimum':_0x566dc2,'isPreRelease':![],'upgradeMessage':_0x1ec396?.[_0x1b05d8(0x153)],'minimumVersionMessage':_0x1ec396?.[_0x1b05d8(0x158)]};}function a190_0x2229(){const _0x2a3771=['validation','117544nykDmp','Minimum\x20supported:\x20','npm\x20install\x20-g\x20','27STeYej','join','3408290gnvwIK','\x20\x20\x20Current\x20CLI\x20version:\x20','733104iomjmy','Current\x20version:\x20','1.0.0','1410120WKsZMC','160IKNYzm','415973xqCwyY','log','\x1b[31m','stableVersion','\x1b[1m','needsUpgrade','↪\x20Critical\x20CLI\x20upgrade\x20required','../..','utf-8','\x1b[33m','latest','62256odXztz','coerce','package.json','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','belowMinimum','upgradeMessage','\x20\x20\x20Upgrade\x20command:\x20','currentVersion','parse','653262Umjepj','minimumVersionMessage','\x20\x20\x20','\x20\x20\x20Minimum\x20supported:\x20','version','filter','49YGnBrv','minimumVersion','↪\x20New\x20version\x20available'];a190_0x2229=function(){return _0x2a3771;};return a190_0x2229();}export function printCliUpgradeWarning(_0x2aa67f){const _0x5b07e1=a190_0x4103;if(!_0x2aa67f[_0x5b07e1(0x148)]&&!_0x2aa67f[_0x5b07e1(0x152)])return;const _0x9c500c=_0x5b07e1(0x16f),_0x1bf5db=_0x5b07e1(0x14c),_0x2db7dc='\x1b[0m',_0x17a4f7=_0x5b07e1(0x147),_0x28603c=getCliUpgradeCommand(_0x2aa67f);console[_0x5b07e1(0x16e)](),_0x2aa67f[_0x5b07e1(0x152)]?(console[_0x5b07e1(0x16e)](''+_0x9c500c+_0x17a4f7+_0x5b07e1(0x149)+_0x2db7dc),console[_0x5b07e1(0x16e)](_0x9c500c+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x2aa67f[_0x5b07e1(0x155)]+_0x2db7dc),_0x2aa67f[_0x5b07e1(0x15e)]&&console[_0x5b07e1(0x16e)](_0x9c500c+_0x5b07e1(0x15a)+_0x2aa67f['minimumVersion']+_0x2db7dc),_0x2aa67f[_0x5b07e1(0x170)]&&_0x2aa67f[_0x5b07e1(0x170)]!==_0x2aa67f[_0x5b07e1(0x15e)]&&console[_0x5b07e1(0x16e)](_0x9c500c+'\x20\x20\x20Recommended\x20stable:\x20'+_0x2aa67f[_0x5b07e1(0x170)]+_0x2db7dc),_0x2aa67f[_0x5b07e1(0x158)]&&console[_0x5b07e1(0x16e)](_0x9c500c+'\x20\x20\x20'+_0x2aa67f[_0x5b07e1(0x158)]+_0x2db7dc),console[_0x5b07e1(0x16e)](_0x9c500c+'\x20\x20\x20Upgrade\x20command:\x20'+_0x28603c+_0x2db7dc)):(console[_0x5b07e1(0x16e)](''+_0x1bf5db+_0x17a4f7+_0x5b07e1(0x15f)+_0x2db7dc),console[_0x5b07e1(0x16e)](_0x1bf5db+_0x5b07e1(0x167)+_0x2aa67f[_0x5b07e1(0x155)]+_0x2db7dc),console[_0x5b07e1(0x16e)](_0x1bf5db+'\x20\x20\x20Stable\x20version:\x20'+_0x2aa67f[_0x5b07e1(0x170)]+_0x2db7dc),_0x2aa67f[_0x5b07e1(0x153)]&&console[_0x5b07e1(0x16e)](_0x1bf5db+_0x5b07e1(0x159)+_0x2aa67f[_0x5b07e1(0x153)]+_0x2db7dc),console[_0x5b07e1(0x16e)](_0x1bf5db+_0x5b07e1(0x154)+_0x28603c+_0x2db7dc)),console[_0x5b07e1(0x16e)]();}export function assertCliVersionSupported(_0x282a89){const _0x35e8b0=a190_0x4103;if(!_0x282a89['belowMinimum'])return;const _0x498576=[_0x282a89[_0x35e8b0(0x158)],_0x35e8b0(0x169)+_0x282a89[_0x35e8b0(0x155)],_0x282a89[_0x35e8b0(0x15e)]?_0x35e8b0(0x162)+_0x282a89[_0x35e8b0(0x15e)]:null,'Upgrade\x20command:\x20'+getCliUpgradeCommand(_0x282a89)][_0x35e8b0(0x15c)](Boolean)[_0x35e8b0(0x165)]('\x0a');throw CliErrors[_0x35e8b0(0x160)](_0x35e8b0(0x151),_0x498576);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a35de,_0x7cb0ac){const _0x57c02c=a191_0x2c85,_0x27835b=_0x3a35de();while(!![]){try{const _0x24a256=-parseInt(_0x57c02c(0x122))/0x1*(-parseInt(_0x57c02c(0x118))/0x2)+-parseInt(_0x57c02c(0x125))/0x3+-parseInt(_0x57c02c(0x11d))/0x4*(parseInt(_0x57c02c(0x11c))/0x5)+parseInt(_0x57c02c(0x11b))/0x6+parseInt(_0x57c02c(0x119))/0x7+parseInt(_0x57c02c(0x12b))/0x8+-parseInt(_0x57c02c(0x129))/0x9;if(_0x24a256===_0x7cb0ac)break;else _0x27835b['push'](_0x27835b['shift']());}catch(_0x416114){_0x27835b['push'](_0x27835b['shift']());}}}(a191_0x3554,0xc63cb));function a191_0x3554(){const _0x5d5819=['2481402zmxhSe','latestVersion','807588zhbOxR','4366455aDSsoV','4dQoxLU','minimumVersion','cli','signal','recommendedVersion','148jNSYgb','abort','application/json','940485qwgUju','now','object','string','8667612jGefxo','trim','7673224tAOfkG','json','20454rJgVGR'];a191_0x3554=function(){return _0x5d5819;};return a191_0x3554();}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(_0x2ed702){const _0x3fcaf=a191_0x2c85;return typeof _0x2ed702===_0x3fcaf(0x128)&&_0x2ed702[_0x3fcaf(0x12a)]()['length']>0x0?_0x2ed702[_0x3fcaf(0x12a)]():null;}function normalizeCliVersionPolicy(_0x4124da){const _0x4cf547=a191_0x2c85;if(!_0x4124da||typeof _0x4124da!=='object')return null;const _0x5c7753=_0x4124da,_0x493a35=_0x5c7753[_0x4cf547(0x11f)]&&typeof _0x5c7753['cli']===_0x4cf547(0x127)?_0x5c7753[_0x4cf547(0x11f)]:_0x5c7753,_0x9742c3=pickString(_0x493a35['stableVersion'])||pickString(_0x493a35[_0x4cf547(0x11a)])||pickString(_0x493a35[_0x4cf547(0x121)]),_0x5902ef=pickString(_0x493a35[_0x4cf547(0x11e)])||pickString(_0x493a35['minVersion']);if(!_0x9742c3&&!_0x5902ef)return null;return{'stableVersion':_0x9742c3,'minimumVersion':_0x5902ef,'upgradeMessage':pickString(_0x493a35['upgradeMessage'])||undefined,'minimumVersionMessage':pickString(_0x493a35['minimumVersionMessage'])||undefined};}export async function fetchCliVersionPolicy(){const _0x5633c1=a191_0x2c85,_0x42e19e=new AbortController(),_0x5a8732=setTimeout(()=>_0x42e19e[_0x5633c1(0x123)](),FETCH_TIMEOUT_MS);try{const _0x267a3b=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x5633c1(0x124)},'signal':_0x42e19e[_0x5633c1(0x120)]});if(!_0x267a3b['ok'])return null;const _0x5b1f3e=await _0x267a3b[_0x5633c1(0x117)]();return normalizeCliVersionPolicy(_0x5b1f3e);}catch{return null;}finally{clearTimeout(_0x5a8732);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x25dd9b=a191_0x2c85,_0x4531e5=Date[_0x25dd9b(0x126)]();if(hasCachedPolicy){const _0x32da3f=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x4531e5-cacheTime<_0x32da3f)return cachedPolicy;}const _0x237989=await fetchCliVersionPolicy();return cachedPolicy=_0x237989,cacheTime=_0x4531e5,hasCachedPolicy=!![],_0x237989;}function a191_0x2c85(_0x4c7cc1,_0x563809){_0x4c7cc1=_0x4c7cc1-0x117;const _0x35546c=a191_0x3554();let _0x2c8516=_0x35546c[_0x4c7cc1];return _0x2c8516;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x26bee4,_0x31cfec){const _0x126106=a192_0x15ed,_0x3b030e=_0x26bee4();while(!![]){try{const _0x56990e=parseInt(_0x126106(0x140))/0x1*(parseInt(_0x126106(0x142))/0x2)+-parseInt(_0x126106(0x145))/0x3*(parseInt(_0x126106(0x13d))/0x4)+-parseInt(_0x126106(0x143))/0x5+parseInt(_0x126106(0x13c))/0x6+parseInt(_0x126106(0x141))/0x7+-parseInt(_0x126106(0x144))/0x8+parseInt(_0x126106(0x13b))/0x9*(parseInt(_0x126106(0x13e))/0xa);if(_0x56990e===_0x31cfec)break;else _0x3b030e['push'](_0x3b030e['shift']());}catch(_0x562889){_0x3b030e['push'](_0x3b030e['shift']());}}}(a192_0x2e5b,0x70c53));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a192_0x2c23f6,getMultiAppConfigs as a192_0x53809b,getTemplateBaseUrl as a192_0x47c2d2}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0xa2aa27){const _0x3db484=a192_0x15ed,_0x5af068=readRawConfig(_0xa2aa27);return _0x5af068[_0x3db484(0x13f)]&&typeof _0x5af068[_0x3db484(0x13f)]===_0x3db484(0x13a)&&initEnv(_0x5af068[_0x3db484(0x13f)]),_0x5af068;}export function getConfigAppCode(){return a192_0x2c23f6();}function a192_0x2e5b(){const _0x150be2=['827659mqpuJv','26poVKIs','3075170FNtBHe','477416bOlliJ','9RqGEHX','string','9171mpHviO','3788166jSOQWs','360376UKXvgW','4360KSEPmg','env','16386YmJboI'];a192_0x2e5b=function(){return _0x150be2;};return a192_0x2e5b();}function a192_0x15ed(_0x29149f,_0x380dac){_0x29149f=_0x29149f-0x13a;const _0x2e5bc0=a192_0x2e5b();let _0x15ed6c=_0x2e5bc0[_0x29149f];return _0x15ed6c;}export function getMultiAppConfigs(_0x421779='project'){return a192_0x53809b(_0x421779);}export function getTemplateBaseUrl(){return a192_0x47c2d2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a193_0x128c(){const _0x15b0a8=['error','name','isDirectory','3335991mNDoPG','7915464AuxWAD','24225399MrfRRH','86471ZZLDiI','4SKiCSo','mkdirSync','110339SQcGxM','readdirSync','835SxxcYm','复制目录时出错:','join','2607014YuxTDp','39354SsmnPo'];a193_0x128c=function(){return _0x15b0a8;};return a193_0x128c();}(function(_0x1008d0,_0x35ee85){const _0x822f7a=a193_0x49e1,_0x36af15=_0x1008d0();while(!![]){try{const _0x1149f6=parseInt(_0x822f7a(0x87))/0x1+parseInt(_0x822f7a(0x7c))/0x2+parseInt(_0x822f7a(0x81))/0x3*(-parseInt(_0x822f7a(0x85))/0x4)+parseInt(_0x822f7a(0x89))/0x5*(-parseInt(_0x822f7a(0x7d))/0x6)+-parseInt(_0x822f7a(0x84))/0x7+-parseInt(_0x822f7a(0x82))/0x8+parseInt(_0x822f7a(0x83))/0x9;if(_0x1149f6===_0x35ee85)break;else _0x36af15['push'](_0x36af15['shift']());}catch(_0x4aeb80){_0x36af15['push'](_0x36af15['shift']());}}}(a193_0x128c,0xdada5));function a193_0x49e1(_0x248571,_0x1c1fe8){_0x248571=_0x248571-0x7b;const _0x128cc0=a193_0x128c();let _0x49e1ab=_0x128cc0[_0x248571];return _0x49e1ab;}import a193_0x47dffe from'node:path';import a193_0x477cb2 from'node:fs';export async function copyDirectory(_0x177d56,_0x239b88){const _0x124dff=a193_0x49e1;try{const _0x263e67=a193_0x477cb2[_0x124dff(0x88)](_0x177d56,{'withFileTypes':!![]});a193_0x477cb2[_0x124dff(0x86)](_0x239b88,{'recursive':!![]});for(const _0x3dc8df of _0x263e67){const _0x215da2=a193_0x47dffe[_0x124dff(0x7b)](_0x177d56,_0x3dc8df[_0x124dff(0x7f)]),_0x32399b=a193_0x47dffe['join'](_0x239b88,_0x3dc8df[_0x124dff(0x7f)]);_0x3dc8df[_0x124dff(0x80)]()?await copyDirectory(_0x215da2,_0x32399b):a193_0x477cb2['copyFileSync'](_0x215da2,_0x32399b);}}catch(_0x9ee9d4){console[_0x124dff(0x7e)](_0x124dff(0x8a),_0x9ee9d4);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x54e36f,_0x306a63){const _0x3349ea=a194_0x1dc1,_0x320014=_0x54e36f();while(!![]){try{const _0x3bbe1a=-parseInt(_0x3349ea(0x197))/0x1*(parseInt(_0x3349ea(0x19c))/0x2)+-parseInt(_0x3349ea(0x1a4))/0x3+parseInt(_0x3349ea(0x1a1))/0x4*(-parseInt(_0x3349ea(0x1a3))/0x5)+parseInt(_0x3349ea(0x199))/0x6*(-parseInt(_0x3349ea(0x19f))/0x7)+-parseInt(_0x3349ea(0x198))/0x8*(parseInt(_0x3349ea(0x19d))/0x9)+-parseInt(_0x3349ea(0x1a2))/0xa*(parseInt(_0x3349ea(0x19a))/0xb)+parseInt(_0x3349ea(0x196))/0xc;if(_0x3bbe1a===_0x306a63)break;else _0x320014['push'](_0x320014['shift']());}catch(_0x299f2e){_0x320014['push'](_0x320014['shift']());}}}(a194_0x2c2c,0x645cd));function toFiniteNumber(_0x476298){const _0x88eafd=a194_0x1dc1;if(typeof _0x476298==='number'&&Number['isFinite'](_0x476298))return _0x476298;if(typeof _0x476298===_0x88eafd(0x19b)){const _0x1a6a21=_0x476298['trim']();if(!_0x1a6a21)return undefined;const _0x390de9=Number(_0x1a6a21);if(Number[_0x88eafd(0x19e)](_0x390de9))return _0x390de9;}return undefined;}export function normalizeEntityWithIdResponse(_0x198412){const _0x432480=a194_0x1dc1,_0xcb8561=toFiniteNumber(_0x198412);if(_0xcb8561!==undefined)return{'id':_0xcb8561,'entity':{'id':_0xcb8561}};if(!_0x198412||typeof _0x198412!==_0x432480(0x1a0))return{'id':undefined,'entity':{}};const _0x47168c={..._0x198412},_0x217a8f=toFiniteNumber(_0x47168c['id']);return _0x217a8f!==undefined&&(_0x47168c['id']=_0x217a8f),{'id':_0x217a8f,'entity':_0x47168c};}function a194_0x1dc1(_0xf1eeee,_0x439296){_0xf1eeee=_0xf1eeee-0x196;const _0x2c2c38=a194_0x2c2c();let _0x1dc1a4=_0x2c2c38[_0xf1eeee];return _0x1dc1a4;}function a194_0x2c2c(){const _0x4e04f0=['29322180jsyrDT','1MLpVJM','8gMJDDo','6HtwGwA','2506262fBHpcJ','string','1060978vtrWfJ','416088ePDyXd','isFinite','1171506fQlXZd','object','303332hzCsbs','20ZVFOAU','5tTymhz','2270502rNOpNA'];a194_0x2c2c=function(){return _0x4e04f0;};return a194_0x2c2c();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x528152,_0x102abe){const _0x2bd50d=a195_0x1fe4,_0x358786=_0x528152();while(!![]){try{const _0x599f51=parseInt(_0x2bd50d(0x149))/0x1+-parseInt(_0x2bd50d(0x13f))/0x2+-parseInt(_0x2bd50d(0x143))/0x3+parseInt(_0x2bd50d(0x145))/0x4*(parseInt(_0x2bd50d(0x140))/0x5)+-parseInt(_0x2bd50d(0x147))/0x6*(-parseInt(_0x2bd50d(0x148))/0x7)+parseInt(_0x2bd50d(0x141))/0x8*(parseInt(_0x2bd50d(0x142))/0x9)+parseInt(_0x2bd50d(0x146))/0xa*(parseInt(_0x2bd50d(0x13e))/0xb);if(_0x599f51===_0x102abe)break;else _0x358786['push'](_0x358786['shift']());}catch(_0xe48668){_0x358786['push'](_0x358786['shift']());}}}(a195_0xd994,0xc7dd7));function a195_0x1fe4(_0x14cee4,_0x3cf69e){_0x14cee4=_0x14cee4-0x13e;const _0xd994cd=a195_0xd994();let _0x1fe48d=_0xd994cd[_0x14cee4];return _0x1fe48d;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x45d311,_0x1f6ce9){const _0x565480=a195_0x1fe4,_0x42e9da=statSync(_0x45d311);if(_0x42e9da[_0x565480(0x144)]()){!existsSync(_0x1f6ce9)&&mkdirSync(_0x1f6ce9,{'recursive':!![]});const _0x297064=readdirSync(_0x45d311);for(const _0x59ff7b of _0x297064){await copyDir(join(_0x45d311,_0x59ff7b),join(_0x1f6ce9,_0x59ff7b));}}else copyFileSync(_0x45d311,_0x1f6ce9);}export function ensureDir(_0x135adf){!existsSync(_0x135adf)&&mkdirSync(_0x135adf,{'recursive':!![]});}function a195_0xd994(){const _0x20e3c0=['967408AoqWrH','5nSRYiM','393728ZwFfFh','81UdwSLX','3547482JuvdCC','isDirectory','3273812jQYIPO','1078190Fdzxgk','402744THlrEx','21GSegaZ','698619akgidT','33vATAVx'];a195_0xd994=function(){return _0x20e3c0;};return a195_0xd994();}export function pathExists(_0x196310){return existsSync(_0x196310);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a196_0x21d036=a196_0x2ddd;(function(_0x175a29,_0x16ae3c){const _0x11f73c=a196_0x2ddd,_0x4d2e0e=_0x175a29();while(!![]){try{const _0x404b9a=-parseInt(_0x11f73c(0x109))/0x1*(-parseInt(_0x11f73c(0x110))/0x2)+parseInt(_0x11f73c(0x117))/0x3*(-parseInt(_0x11f73c(0x119))/0x4)+parseInt(_0x11f73c(0x10c))/0x5*(parseInt(_0x11f73c(0x126))/0x6)+-parseInt(_0x11f73c(0x120))/0x7*(parseInt(_0x11f73c(0x10b))/0x8)+parseInt(_0x11f73c(0x128))/0x9*(-parseInt(_0x11f73c(0x113))/0xa)+parseInt(_0x11f73c(0x10a))/0xb+parseInt(_0x11f73c(0x107))/0xc;if(_0x404b9a===_0x16ae3c)break;else _0x4d2e0e['push'](_0x4d2e0e['shift']());}catch(_0x3a74b5){_0x4d2e0e['push'](_0x4d2e0e['shift']());}}}(a196_0xa3ce,0xbf812));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 _0x2df5f4=a196_0x2ddd,_0xa30d03=getTemplateBaseUrl();return _0xa30d03+_0x2df5f4(0x124);}const CACHE_DIR=join(homedir(),a196_0x21d036(0x111),a196_0x21d036(0x112));export async function fetchGuidesFromCDN(){const _0x52d964=a196_0x21d036,_0x2b60fe=getGuidesCdnUrl(),_0x1f4b8c=await fetch(_0x2b60fe,{'headers':{'Accept':_0x52d964(0x116)}});if(!_0x1f4b8c['ok'])throw new Error(_0x52d964(0x11d)+_0x1f4b8c['status']+'\x20'+_0x1f4b8c['statusText']);const _0x45420e=await _0x1f4b8c[_0x52d964(0x10e)]();if(!_0x45420e[_0x52d964(0x10d)]||typeof _0x45420e[_0x52d964(0x10d)]!==_0x52d964(0x10f))throw new Error('CDN\x20返回数据格式错误');return _0x45420e;}export function writeGuidesToProject(_0x25f344,_0x3efd2b,_0x499499=a196_0x21d036(0x129),_0x511e38){const _0x33cbfd=a196_0x21d036,_0x10011a=join(_0x3efd2b,_0x499499);mkdirSync(_0x10011a,{'recursive':!![]});for(const [_0x2d1ecc,_0x2a10af]of Object[_0x33cbfd(0x108)](_0x25f344[_0x33cbfd(0x10d)])){let _0x3be39b=_0x2a10af['content'];_0x2a10af[_0x33cbfd(0x118)]&&(_0x3be39b=appendUpdateTime(_0x3be39b,_0x2a10af[_0x33cbfd(0x118)])),writeFileSync(join(_0x10011a,_0x2d1ecc+_0x33cbfd(0x114)),_0x3be39b,_0x33cbfd(0x125));}}export function appendUpdateTime(_0x509ecd,_0x3930f6){const _0x314d32=a196_0x21d036;return _0x509ecd=_0x509ecd['replace'](/\n*>更新时间:.*$/m,''),_0x509ecd['trimEnd']()+(_0x314d32(0x11a)+_0x3930f6);}function a196_0xa3ce(){const _0x4dca71=['path','application/json','7629JOzMqY','lastUpdated','1244kQNhnc','\x0a\x0a>更新时间:','content','length','CDN\x20请求失败:\x20','trimEnd','title','7KCIngC','replace','push','skillTemplate','/skills/guides.json','utf-8','112734LXjcmB','extendContent','369738VSxqXC','.lovrabet/skill/guides','keys','23245404eSizIA','entries','3QiXPxn','5156657RJXSaS','9206984TxcKSy','65FjgRJq','guides','json','object','214986joDRmW','.lovrabet','cache','60QQiRwl','.md'];a196_0xa3ce=function(){return _0x4dca71;};return a196_0xa3ce();}export function getSkillTemplate(_0x3e9223){const _0xfcf7b5=a196_0x21d036;return _0x3e9223['skillTemplate']?.[_0xfcf7b5(0x11b)]||'';}export function appendExtendContents(_0x27b4f9,_0x425a3b,_0xcfb789){const _0x29edb6=a196_0x21d036,_0x53ceb1=[];for(const [,_0x297eba]of Object[_0x29edb6(0x108)](_0x425a3b[_0x29edb6(0x10d)])){_0x297eba['extendContent']&&_0x53ceb1[_0x29edb6(0x122)](_0x297eba[_0x29edb6(0x127)][_0x29edb6(0x11e)]());}if(_0x53ceb1[_0x29edb6(0x11c)]===0x0)return _0x27b4f9;return _0x27b4f9[_0x29edb6(0x11e)]()+'\x0a\x0a'+_0x53ceb1['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0xecab16,_0x3d746e,_0x3d21e1){const _0x27c5ad=a196_0x21d036,_0x25d529=getSkillTemplate(_0xecab16);if(!_0x25d529)throw new Error('CDN\x20数据中缺少\x20skillTemplate');const _0x37dcb5=dirname(_0x3d746e);mkdirSync(_0x37dcb5,{'recursive':!![]});let _0x1efe8a=_0x25d529[_0x27c5ad(0x121)](/\{\{IDE_NAME\}\}/g,_0x3d21e1);_0x1efe8a=appendExtendContents(_0x1efe8a,_0xecab16),_0xecab16['skillTemplate'][_0x27c5ad(0x118)]&&(_0x1efe8a=appendUpdateTime(_0x1efe8a,_0xecab16[_0x27c5ad(0x123)][_0x27c5ad(0x118)])),writeFileSync(_0x3d746e,_0x1efe8a,_0x27c5ad(0x125));}export async function installGuides(_0x3cde3a){const _0x42462a=a196_0x21d036,_0x3f6b31=await fetchGuidesFromCDN();return writeGuidesToProject(_0x3f6b31,_0x3cde3a),Object[_0x42462a(0x12a)](_0x3f6b31['guides'])[_0x42462a(0x11c)];}function a196_0x2ddd(_0xbbc7e6,_0x463356){_0xbbc7e6=_0xbbc7e6-0x107;const _0xa3ce1e=a196_0xa3ce();let _0x2ddd38=_0xa3ce1e[_0xbbc7e6];return _0x2ddd38;}export function getGuidesSummary(_0x538747){const _0x270068=a196_0x21d036;return Object['entries'](_0x538747[_0x270068(0x10d)])['map'](([_0x2cd877,_0x18b82e])=>({'key':_0x2cd877,'title':_0x18b82e[_0x270068(0x11f)],'path':_0x18b82e[_0x270068(0x115)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x32c1b0,_0x2c4718){const _0x54c686=a197_0x48af,_0x21c82f=_0x32c1b0();while(!![]){try{const _0x41c2d7=parseInt(_0x54c686(0x179))/0x1*(parseInt(_0x54c686(0x186))/0x2)+parseInt(_0x54c686(0x17a))/0x3+parseInt(_0x54c686(0x17e))/0x4+parseInt(_0x54c686(0x178))/0x5+-parseInt(_0x54c686(0x17c))/0x6+-parseInt(_0x54c686(0x193))/0x7+parseInt(_0x54c686(0x190))/0x8;if(_0x41c2d7===_0x2c4718)break;else _0x21c82f['push'](_0x21c82f['shift']());}catch(_0xe665a5){_0x21c82f['push'](_0x21c82f['shift']());}}}(a197_0x5814,0xcfc0c));export async function httpRequest(_0xfe93cd,_0x282158={}){const _0x543a28=a197_0x48af,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x282158;let _0x3c0871=null;for(let _0x3005f9=0x0;_0x3005f9<=retries;_0x3005f9++){try{const _0x3e238b=new AbortController(),_0x151de3=setTimeout(()=>_0x3e238b[_0x543a28(0x18c)](),timeout),_0x3a7e5d=await fetch(_0xfe93cd,{'headers':headers,'signal':_0x3e238b[_0x543a28(0x185)]});clearTimeout(_0x151de3);let _0x7e600;const _0x392de9=_0x3a7e5d[_0x543a28(0x18a)][_0x543a28(0x17b)]('content-type');return _0x392de9?.['includes'](_0x543a28(0x192))?_0x7e600=await _0x3a7e5d[_0x543a28(0x17f)]():_0x7e600=await _0x3a7e5d[_0x543a28(0x177)](),{'ok':_0x3a7e5d['ok'],'status':_0x3a7e5d['status'],'statusText':_0x3a7e5d[_0x543a28(0x18b)],'data':_0x7e600,'headers':_0x3a7e5d[_0x543a28(0x18a)],'url':_0x3a7e5d[_0x543a28(0x18e)],'text':()=>_0x3a7e5d[_0x543a28(0x177)]()};}catch(_0x176ca6){_0x3c0871=_0x176ca6 instanceof Error?_0x176ca6:new Error(String(_0x176ca6));if(_0x3005f9===retries)break;if(shouldRetry(_0x176ca6)){console[_0x543a28(0x18d)](_0x543a28(0x189)+retryDelay+_0x543a28(0x182)+(_0x3005f9+0x1)+_0x543a28(0x181)),await sleep(retryDelay);continue;}else break;}}throw _0x3c0871||new Error(_0x543a28(0x183));}function shouldRetry(_0x1c6e21){const _0x209fd5=a197_0x48af;if(_0x1c6e21 instanceof Error){if(_0x1c6e21[_0x209fd5(0x184)]===_0x209fd5(0x187))return![];if(_0x1c6e21['name']==='TypeError'&&_0x1c6e21['message']['includes'](_0x209fd5(0x17d)))return!![];if(_0x1c6e21[_0x209fd5(0x18f)][_0x209fd5(0x191)](_0x209fd5(0x180)))return!![];if(_0x1c6e21[_0x209fd5(0x18f)][_0x209fd5(0x191)](_0x209fd5(0x188)))return![];}return![];}function a197_0x5814(){const _0x18bca6=['*\x20请求失败,','headers','statusText','abort','log','url','message','3134880XAYQvg','includes','application/json','7513632MflQFP','text','416565hLSqMj','22ZqUVwJ','3212460Dtpnvn','get','9813834eDUPtF','fetch','2888816YeWPSQ','json','ECONNRESET','\x20次重试...','ms\x20后进行第\x20','Request\x20failed','name','signal','117434zVginb','AbortError','ENOTFOUND'];a197_0x5814=function(){return _0x18bca6;};return a197_0x5814();}function a197_0x48af(_0x7b89a8,_0x19f4d8){_0x7b89a8=_0x7b89a8-0x177;const _0x581487=a197_0x5814();let _0x48afb7=_0x581487[_0x7b89a8];return _0x48afb7;}function sleep(_0x7ebcbf){return new Promise(_0x3d66fe=>setTimeout(_0x3d66fe,_0x7ebcbf));}export function validateUrl(_0x3d5d1f){try{return new URL(_0x3d5d1f),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a198_0x2ea5(_0xf0f62b,_0x1ea5fe){_0xf0f62b=_0xf0f62b-0x78;const _0x1c45af=a198_0x1c45();let _0x2ea5fb=_0x1c45af[_0xf0f62b];return _0x2ea5fb;}(function(_0x3c48f9,_0x14988a){const _0x259121=a198_0x2ea5,_0x215aed=_0x3c48f9();while(!![]){try{const _0x1aff0f=-parseInt(_0x259121(0x86))/0x1+-parseInt(_0x259121(0x7c))/0x2*(-parseInt(_0x259121(0x78))/0x3)+-parseInt(_0x259121(0x81))/0x4*(parseInt(_0x259121(0x80))/0x5)+parseInt(_0x259121(0x87))/0x6+parseInt(_0x259121(0x85))/0x7*(-parseInt(_0x259121(0x88))/0x8)+parseInt(_0x259121(0x84))/0x9*(-parseInt(_0x259121(0x79))/0xa)+-parseInt(_0x259121(0x82))/0xb*(-parseInt(_0x259121(0x89))/0xc);if(_0x1aff0f===_0x14988a)break;else _0x215aed['push'](_0x215aed['shift']());}catch(_0xc53072){_0x215aed['push'](_0x215aed['shift']());}}}(a198_0x1c45,0x67a6d));function env(_0x28f200){return process.env[`RABETBASE_${_0x28f200}`]||process.env[`LOVRABET_${_0x28f200}`]||undefined;}export function isNonInteractive(_0x339b92){const _0x361a52=a198_0x2ea5;return!!(_0x339b92[_0x361a52(0x7e)]||_0x339b92['ci']||env('CI')===_0x361a52(0x8a)||process.env.CI===_0x361a52(0x8a)||!process[_0x361a52(0x7b)][_0x361a52(0x83)]||!isStdinRawModeSupported());}function a198_0x1c45(){const _0x520a16=['8455QRDHdW','668EzPARz','11mrRMml','isTTY','8649WVIDiy','430241UPcIcE','404017lrSnHe','2986242qmQZEa','32FdUpYN','5555652FhEssD','true','1505565rGblXz','1100DUNclw','isRaw','stdout','2ltgZZW','setRawMode','nonInteractive','stdin'];a198_0x1c45=function(){return _0x520a16;};return a198_0x1c45();}function isStdinRawModeSupported(){const _0x14f0bf=a198_0x2ea5;if(!process[_0x14f0bf(0x7f)]['isTTY'])return![];try{const _0x14dd94=process[_0x14f0bf(0x7f)][_0x14f0bf(0x7a)];return process[_0x14f0bf(0x7f)][_0x14f0bf(0x7d)](!![]),process[_0x14f0bf(0x7f)][_0x14f0bf(0x7d)](_0x14dd94??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a199_0x3dcc(_0x560a02,_0x49d691){_0x560a02=_0x560a02-0x16a;const _0x3032be=a199_0x3032();let _0x3dccc6=_0x3032be[_0x560a02];return _0x3dccc6;}const a199_0x35f5e4=a199_0x3dcc;(function(_0x338d60,_0x1e63ff){const _0xc73160=a199_0x3dcc,_0x4760b4=_0x338d60();while(!![]){try{const _0x57f7c0=parseInt(_0xc73160(0x1a0))/0x1*(-parseInt(_0xc73160(0x184))/0x2)+parseInt(_0xc73160(0x17b))/0x3+parseInt(_0xc73160(0x19f))/0x4*(-parseInt(_0xc73160(0x193))/0x5)+-parseInt(_0xc73160(0x17d))/0x6*(parseInt(_0xc73160(0x175))/0x7)+parseInt(_0xc73160(0x180))/0x8+parseInt(_0xc73160(0x19c))/0x9+parseInt(_0xc73160(0x18e))/0xa*(-parseInt(_0xc73160(0x19e))/0xb);if(_0x57f7c0===_0x1e63ff)break;else _0x4760b4['push'](_0x4760b4['shift']());}catch(_0x1e630e){_0x4760b4['push'](_0x4760b4['shift']());}}}(a199_0x3032,0x29ea0));import a199_0x7ca10a from'winston';import a199_0x1a6b1c from'node:fs';import a199_0x206066 from'node:path';class Logger{[a199_0x35f5e4(0x181)];[a199_0x35f5e4(0x188)];[a199_0x35f5e4(0x192)]='';constructor(){const _0x9a936c=a199_0x35f5e4;this[_0x9a936c(0x188)]='';}['setRawCommand'](_0x2fcf59){this['currentRawCommand']=_0x2fcf59;}['initWinstonLogger'](){const _0x56fe7d=a199_0x35f5e4,_0x2e7e34=a199_0x206066['dirname'](this[_0x56fe7d(0x188)]);!a199_0x1a6b1c['existsSync'](_0x2e7e34)&&a199_0x1a6b1c[_0x56fe7d(0x16a)](_0x2e7e34,{'recursive':!![]});const _0x4c766f=a199_0x7ca10a[_0x56fe7d(0x1a1)][_0x56fe7d(0x18c)](a199_0x7ca10a['format'][_0x56fe7d(0x16f)](),a199_0x7ca10a['format'][_0x56fe7d(0x191)]({'stack':!![]}),a199_0x7ca10a[_0x56fe7d(0x1a1)][_0x56fe7d(0x176)](_0x575fe6=>{const _0x17b787=_0x56fe7d,_0x182458={'timestamp':_0x575fe6[_0x17b787(0x16f)]||new Date()[_0x17b787(0x172)](),'level':_0x575fe6[_0x17b787(0x195)]||'info','command':_0x575fe6[_0x17b787(0x18a)]||_0x17b787(0x18d),'rawCommand':_0x575fe6[_0x17b787(0x187)]||this['currentRawCommand']||undefined,'message':_0x575fe6['message']||'','duration':_0x575fe6[_0x17b787(0x170)]||undefined,'details':_0x575fe6[_0x17b787(0x179)]||undefined};return JSON['stringify'](_0x182458);}));this[_0x56fe7d(0x181)]=a199_0x7ca10a['createLogger']({'level':_0x56fe7d(0x171),'format':_0x4c766f,'transports':[new a199_0x7ca10a[(_0x56fe7d(0x190))][(_0x56fe7d(0x16d))]({'filename':this[_0x56fe7d(0x188)],'level':_0x56fe7d(0x171)})],'silent':![]}),a199_0x7ca10a[_0x56fe7d(0x182)]({'success':_0x56fe7d(0x19a),'error':_0x56fe7d(0x16b),'warn':_0x56fe7d(0x173),'info':_0x56fe7d(0x16e)});}[a199_0x35f5e4(0x174)](_0x5e99ea){const _0x287b26=a199_0x35f5e4;this['logFilePath']=a199_0x206066[_0x287b26(0x177)](_0x5e99ea,_0x287b26(0x16c)),this[_0x287b26(0x181)]&&this[_0x287b26(0x181)]['clear'](),this['initWinstonLogger']();}[a199_0x35f5e4(0x171)](_0x18341e,_0xaefb86,_0x10bee8){const _0x1f8c18=a199_0x35f5e4;if(!this[_0x1f8c18(0x188)]||!this['winstonLogger'])return;this['winstonLogger'][_0x1f8c18(0x171)](_0xaefb86,{'command':_0x18341e,'details':_0x10bee8});}[a199_0x35f5e4(0x17c)](_0x586fee,_0x352bc5,_0x27b7b3,_0x218e89){const _0x427114=a199_0x35f5e4;if(!this[_0x427114(0x188)]||!this['winstonLogger'])return;this[_0x427114(0x181)]['log'](_0x427114(0x171),_0x352bc5,{'level':'success','command':_0x586fee,'duration':_0x27b7b3,'details':_0x218e89});}[a199_0x35f5e4(0x198)](_0x2e365a,_0x4cefba,_0x403c68){if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger']['error'](_0x4cefba,{'command':_0x2e365a,'details':_0x403c68});}['warn'](_0x253f77,_0x23eced,_0x4cf7e2){const _0x32b0b0=a199_0x35f5e4;if(!this['logFilePath']||!this['winstonLogger'])return;this[_0x32b0b0(0x181)][_0x32b0b0(0x17a)](_0x23eced,{'command':_0x253f77,'details':_0x4cf7e2});}async[a199_0x35f5e4(0x199)](_0x5ab971,_0x4fcbc6,_0x41c133){const _0x3524df=a199_0x35f5e4,_0x544c73=Date[_0x3524df(0x18b)]();this[_0x3524df(0x171)](_0x5ab971,_0x3524df(0x197)+_0x4fcbc6);try{const _0x3f77a3=await _0x41c133(),_0x1d37da=Date[_0x3524df(0x18b)]()-_0x544c73;return this[_0x3524df(0x17c)](_0x5ab971,'完成:\x20'+_0x4fcbc6,_0x1d37da),_0x3f77a3;}catch(_0x30329b){const _0x2a81c4=Date[_0x3524df(0x18b)]()-_0x544c73;this[_0x3524df(0x198)](_0x5ab971,'失败:\x20'+_0x4fcbc6,{'error':_0x30329b instanceof Error?_0x30329b[_0x3524df(0x19d)]:String(_0x30329b),'duration':_0x2a81c4});throw _0x30329b;}}['readLogs'](){const _0x319ad9=a199_0x35f5e4;try{if(!a199_0x1a6b1c['existsSync'](this[_0x319ad9(0x188)]))return[];const _0x1faf55=a199_0x1a6b1c[_0x319ad9(0x189)](this[_0x319ad9(0x188)],_0x319ad9(0x183));return _0x1faf55['split']('\x0a')[_0x319ad9(0x17e)](_0x31c189=>_0x31c189[_0x319ad9(0x196)]())[_0x319ad9(0x18f)](_0x500191=>JSON['parse'](_0x500191));}catch(_0x1de491){return console[_0x319ad9(0x17a)](_0x319ad9(0x194),_0x1de491),[];}}[a199_0x35f5e4(0x17f)](){const _0xdcf0e8=a199_0x35f5e4;try{a199_0x1a6b1c[_0xdcf0e8(0x185)](this['logFilePath'])&&a199_0x1a6b1c[_0xdcf0e8(0x19b)](this[_0xdcf0e8(0x188)],'','utf8');}catch(_0x2cf362){console['warn'](_0xdcf0e8(0x178),_0x2cf362);}}[a199_0x35f5e4(0x186)](){const _0x2e5610=a199_0x35f5e4;return this[_0x2e5610(0x181)];}}export const logger=new Logger();function a199_0x3032(){const _0x2dedd0=['command','now','combine','unknown','43150UZOVtJ','map','transports','errors','currentRawCommand','51405asCUeH','Failed\x20to\x20read\x20logs:','level','trim','开始执行:\x20','error','logTask','green','writeFileSync','2161080mpZyvN','message','275Eyaygn','12HJjiZR','149636hdXyUT','format','mkdirSync','red','.lovrabet.log','File','blue','timestamp','duration','info','toISOString','yellow','setLogPath','900221CdXSCC','printf','join','Failed\x20to\x20clear\x20logs:','details','warn','714477JWUkkU','success','6FidRPz','filter','clearLogs','882864ADRegV','winstonLogger','addColors','utf8','2mgVRUd','existsSync','getWinstonInstance','rawCommand','logFilePath','readFileSync'];a199_0x3032=function(){return _0x2dedd0;};return a199_0x3032();}
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a200_0x5bc9(_0x282688,_0x1b08bf){_0x282688=_0x282688-0x13d;const _0x127cfd=a200_0x127c();let _0x5bc92d=_0x127cfd[_0x282688];return _0x5bc92d;}(function(_0x5899c6,_0x1b887e){const _0x2475ef=a200_0x5bc9,_0x473aed=_0x5899c6();while(!![]){try{const _0x14e074=parseInt(_0x2475ef(0x146))/0x1+-parseInt(_0x2475ef(0x149))/0x2+-parseInt(_0x2475ef(0x145))/0x3+parseInt(_0x2475ef(0x14c))/0x4*(parseInt(_0x2475ef(0x144))/0x5)+-parseInt(_0x2475ef(0x147))/0x6*(-parseInt(_0x2475ef(0x13e))/0x7)+parseInt(_0x2475ef(0x13d))/0x8+parseInt(_0x2475ef(0x148))/0x9*(-parseInt(_0x2475ef(0x14a))/0xa);if(_0x14e074===_0x1b887e)break;else _0x473aed['push'](_0x473aed['shift']());}catch(_0x4bd68f){_0x473aed['push'](_0x473aed['shift']());}}}(a200_0x127c,0x28b40));import{CliErrors}from'../errors.js';function a200_0x127c(){const _0x671e07=['validation','4yubcgL','1932168XMlRjb','9814XfFaCd','object','isArray','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','--params\x20must\x20be\x20a\x20JSON\x20object','parse','1289665oqHJgT','846645TUbYvq','6990YTWyue','18UJOJKu','386658Phtsxw','37506nAhWmF','10PJwYxn'];a200_0x127c=function(){return _0x671e07;};return a200_0x127c();}export function parseJsonParams(_0x5dc9a4){const _0x1b83d5=a200_0x5bc9;if(!_0x5dc9a4)return undefined;let _0x4e5741;try{_0x4e5741=JSON[_0x1b83d5(0x143)](_0x5dc9a4);}catch{throw CliErrors['validation']('Invalid\x20JSON\x20for\x20--params:\x20'+_0x5dc9a4);}if(!_0x4e5741||typeof _0x4e5741!==_0x1b83d5(0x13f)||Array[_0x1b83d5(0x140)](_0x4e5741))throw CliErrors[_0x1b83d5(0x14b)](_0x1b83d5(0x142),_0x1b83d5(0x141));return _0x4e5741;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a201_0x2df2(_0x4e40ed,_0x4b0d8d){_0x4e40ed=_0x4e40ed-0x97;const _0x11f1a5=a201_0x11f1();let _0x2df245=_0x11f1a5[_0x4e40ed];return _0x2df245;}const a201_0x34ae98=a201_0x2df2;function a201_0x11f1(){const _0x149d9e=['1868298zOVQef','2331816klGxfx','90teJGxW','3503340pToQuD','.cmd','platform','681522CEhmkD','102436FrKSwW','9vUDEfb','152940lZHjTY','1565690enkiGk','12PnBfRB'];a201_0x11f1=function(){return _0x149d9e;};return a201_0x11f1();}(function(_0xe73adc,_0x188ef5){const _0x38e949=a201_0x2df2,_0x236b85=_0xe73adc();while(!![]){try{const _0x234098=parseInt(_0x38e949(0x9a))/0x1+parseInt(_0x38e949(0x9f))/0x2*(-parseInt(_0x38e949(0x9d))/0x3)+parseInt(_0x38e949(0x9b))/0x4*(parseInt(_0x38e949(0xa2))/0x5)+-parseInt(_0x38e949(0xa0))/0x6+-parseInt(_0x38e949(0x9e))/0x7+parseInt(_0x38e949(0xa1))/0x8*(-parseInt(_0x38e949(0x9c))/0x9)+parseInt(_0x38e949(0x97))/0xa;if(_0x234098===_0x188ef5)break;else _0x236b85['push'](_0x236b85['shift']());}catch(_0x8d1ac0){_0x236b85['push'](_0x236b85['shift']());}}}(a201_0x11f1,0x57fd8));export const isWindows=process[a201_0x34ae98(0x99)]==='win32';export function resolveNpmBin(_0x3a2969){const _0x301ca5=a201_0x34ae98;return isWindows?_0x3a2969+_0x301ca5(0x98):_0x3a2969;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a202_0x2879(){const _0x33aa87=['932QSFFsr','utf-8','catch','1816skPGBS','3018665PzLfxI','CDN\x20返回数据格式错误','content','CDN\x20请求失败:\x20','834084gOhXaH','6SHdfKH','lastUpdated','string','97972UDqvTK','json','3237TUDBzn','../../templates/rules/lovrabet_rules.mdc.tpl','status','agents.md','303468kwqHFH','3299850ABdlrJ','24498nIDVjt'];a202_0x2879=function(){return _0x33aa87;};return a202_0x2879();}const a202_0x21f542=a202_0x39c4;(function(_0x15192d,_0x5be187){const _0x248324=a202_0x39c4,_0xd5c64d=_0x15192d();while(!![]){try{const _0x407acc=parseInt(_0x248324(0xd5))/0x1+-parseInt(_0x248324(0xd8))/0x2*(parseInt(_0x248324(0xe6))/0x3)+parseInt(_0x248324(0xe0))/0x4+parseInt(_0x248324(0xdc))/0x5*(-parseInt(_0x248324(0xe1))/0x6)+-parseInt(_0x248324(0xe4))/0x7+-parseInt(_0x248324(0xdb))/0x8*(-parseInt(_0x248324(0xd7))/0x9)+parseInt(_0x248324(0xd6))/0xa;if(_0x407acc===_0x5be187)break;else _0xd5c64d['push'](_0xd5c64d['shift']());}catch(_0x97f68a){_0xd5c64d['push'](_0xd5c64d['shift']());}}}(a202_0x2879,0x52d7d));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';import{appendUpdateTime}from'../utils/guides-cdn.js';function a202_0x39c4(_0x224ac4,_0x229aae){_0x224ac4=_0x224ac4-0xd5;const _0x28793c=a202_0x2879();let _0x39c40a=_0x28793c[_0x224ac4];return _0x39c40a;}const __filename=fileURLToPath(import.meta.url),__dirname=dirname(__filename);function getRulesCdnUrl(){const _0x33c7fa=getTemplateBaseUrl();return _0x33c7fa+'/rules/rules.json';}const LOCAL_TEMPLATE_PATH=resolve(__dirname,a202_0x21f542(0xe7));export async function fetchRulesFromCDN(){const _0x53a1f7=a202_0x21f542,_0x13f78f=getRulesCdnUrl(),_0x18e10e=await fetch(_0x13f78f,{'headers':{'Accept':'application/json'}});if(!_0x18e10e['ok'])throw new Error(_0x53a1f7(0xdf)+_0x18e10e[_0x53a1f7(0xe8)]+'\x20'+_0x18e10e['statusText']);const _0x3dcc86=await _0x18e10e[_0x53a1f7(0xe5)]();if(!_0x3dcc86[_0x53a1f7(0xde)]||typeof _0x3dcc86[_0x53a1f7(0xde)]!==_0x53a1f7(0xe3))throw new Error(_0x53a1f7(0xdd));return _0x3dcc86;}export async function getRulesContent(){const _0x1be869=a202_0x21f542;try{const _0x1a90e7=await fetchRulesFromCDN();return _0x1a90e7[_0x1be869(0xde)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x55ade1=a202_0x21f542;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x55ade1(0xd9));throw new Error('本地模板文件不存在:\x20'+LOCAL_TEMPLATE_PATH);}export async function writeRulesFile(_0x2f24f2){const _0x54a5f7=a202_0x21f542,_0x3cc50d=await fetchRulesFromCDN()[_0x54a5f7(0xda)](()=>null);let _0x4038d0;_0x3cc50d?(_0x4038d0=_0x3cc50d[_0x54a5f7(0xde)],_0x3cc50d['lastUpdated']&&(_0x4038d0=appendUpdateTime(_0x4038d0,_0x3cc50d[_0x54a5f7(0xe2)]))):_0x4038d0=readLocalTemplate();const _0x4111d8=dirname(_0x2f24f2);!existsSync(_0x4111d8)&&mkdirSync(_0x4111d8,{'recursive':!![]}),writeFileSync(_0x2f24f2,_0x4038d0,_0x54a5f7(0xd9));}export async function copyRulesToCursor(_0x2086d7){const _0x27f750=join(_0x2086d7,'.cursor/rules'),_0x390732=join(_0x27f750,'lovrabet_rules.mdc');if(existsSync(_0x390732))return![];return await writeRulesFile(_0x390732),!![];}export async function copyRulesToAgentsMd(_0xa7301a){const _0xbed2d6=a202_0x21f542,_0x2c8258=join(_0xa7301a,_0xbed2d6(0xe9));if(existsSync(_0x2c8258))return![];return await writeRulesFile(_0x2c8258),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x531741){return new Promise(_0x418371=>setTimeout(_0x418371,_0x531741));}
|