@lovrabet/rabetbase-cli 2.4.5-beta.1 → 2.4.5
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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.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-skill/index.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-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.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/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.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/generate.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-audit.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/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.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-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.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/file/index.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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.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/mutations.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/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.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/react/create.js +1 -1
- package/lib/commands/page/react/detail.js +1 -1
- package/lib/commands/page/react/list.js +1 -1
- package/lib/commands/page/react/publish.js +1 -1
- package/lib/commands/page/react/shared.js +1 -1
- package/lib/commands/page/react/syntax.js +1 -1
- package/lib/commands/page/react/template.js +1 -1
- package/lib/commands/page/react/update.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.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/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.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/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.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/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.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/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.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-index-auditor.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/error-output.js +1 -1
- package/lib/framework/explicit-yes.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.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.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/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 +1 -1
- package/skills/rabetbase/SKILL.md +1 -1
- package/skills/rabetbase.manifest.json +3 -3
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a272_0x1d25(_0x942cc4,_0x58207b){_0x942cc4=_0x942cc4-0x98;const _0x22c760=a272_0x22c7();let _0x1d2503=_0x22c760[_0x942cc4];return _0x1d2503;}const a272_0x55eafd=a272_0x1d25;function a272_0x22c7(){const _0x15f66a=['681014QhYDKo','Windsurf\x20IDE','SKILL.md.tpl','Claude\x20Code','9gBHoFJ','3265586UPTFBf','OpenCode\x20IDE','opencode','.trae','5139536DPnmrz','.codex','.cursorrules','5751697LvHYGG','codex','.claude/skills/lovrabet/SKILL.md','25000gFDGnF','file','Trae\x20IDE','.opencode','cline','trae','CodeBuddy','.agent','.qoder/rules/rabetbase.md','.codebuddy','.codebuddy/skills/lovrabet/SKILL.md','444TFFHDB','Trae','Antigravity\x20IDE','codebuddy','3667191AIYqMa','.qoder','.codex/skills/lovrabet/SKILL.md','.claude','cursor','OpenCode','通用模板\x20-\x20兜底方案','Qoder','Codex\x20IDE','claude','Antigravity','其他\x20(通用模板)','.windsurf','windsurf','Codex','.opencode/skills/lovrabet/SKILL.md','Qoder\x20IDE','57555KrZYeG','.cline/skills/lovrabet/SKILL.md','qoder','.agent/skills/lovrabet/SKILL.md'];a272_0x22c7=function(){return _0x15f66a;};return a272_0x22c7();}(function(_0x3ea94d,_0x133c9a){const _0x1398dd=a272_0x1d25,_0x1da889=_0x3ea94d();while(!![]){try{const _0x25005d=parseInt(_0x1398dd(0x98))/0x1+-parseInt(_0x1398dd(0x9d))/0x2+parseInt(_0x1398dd(0xb6))/0x3+parseInt(_0x1398dd(0xa7))/0x4+parseInt(_0x1398dd(0xc7))/0x5*(-parseInt(_0x1398dd(0xb2))/0x6)+parseInt(_0x1398dd(0xa4))/0x7+-parseInt(_0x1398dd(0xa1))/0x8*(-parseInt(_0x1398dd(0x9c))/0x9);if(_0x25005d===_0x133c9a)break;else _0x1da889['push'](_0x1da889['shift']());}catch(_0x36c72a){_0x1da889['push'](_0x1da889['shift']());}}}(a272_0x22c7,0xd914f));export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':'Cursor\x20IDE','folders':[a272_0x55eafd(0xa3),'.cursor'],'files':[{'type':'file','path':'.cursor/skills/rabetbase.md','template':a272_0x55eafd(0x9a)}]},'windsurf':{'name':'Windsurf','description':a272_0x55eafd(0x99),'folders':[a272_0x55eafd(0xc2)],'files':[{'type':a272_0x55eafd(0xa8),'path':'.windsurf/workflows/rabetbase.md','template':a272_0x55eafd(0x9a)}]},'claude':{'name':'Claude\x20Code','description':a272_0x55eafd(0x9b),'folders':[a272_0x55eafd(0xb9)],'files':[{'type':a272_0x55eafd(0xa8),'path':a272_0x55eafd(0xa6),'template':'SKILL.md.tpl'}]},'cline':{'name':'Cline','description':'Cline\x20IDE','folders':['.cline'],'files':[{'type':a272_0x55eafd(0xa8),'path':a272_0x55eafd(0xc8),'template':'SKILL.md.tpl'}]},'codex':{'name':a272_0x55eafd(0xc4),'description':a272_0x55eafd(0xbe),'folders':[a272_0x55eafd(0xa2)],'files':[{'type':a272_0x55eafd(0xa8),'path':a272_0x55eafd(0xb8),'template':a272_0x55eafd(0x9a)}]},'opencode':{'name':a272_0x55eafd(0xbb),'description':a272_0x55eafd(0x9e),'folders':[a272_0x55eafd(0xaa)],'files':[{'type':a272_0x55eafd(0xa8),'path':a272_0x55eafd(0xc5),'template':a272_0x55eafd(0x9a)}]},'qoder':{'name':a272_0x55eafd(0xbd),'description':a272_0x55eafd(0xc6),'folders':[a272_0x55eafd(0xb7)],'files':[{'type':a272_0x55eafd(0xa8),'path':a272_0x55eafd(0xaf),'template':a272_0x55eafd(0x9a)},{'type':'file','path':'.qoder/skills/lovrabet/SKILL.md','template':a272_0x55eafd(0x9a)}]},'codebuddy':{'name':a272_0x55eafd(0xad),'description':'CodeBuddy\x20IDE','folders':[a272_0x55eafd(0xb0)],'files':[{'type':a272_0x55eafd(0xa8),'path':a272_0x55eafd(0xb1),'template':a272_0x55eafd(0x9a)}]},'trae':{'name':a272_0x55eafd(0xb3),'description':a272_0x55eafd(0xa9),'folders':[a272_0x55eafd(0xa0)],'files':[{'type':a272_0x55eafd(0xa8),'path':'.trae/skills/lovrabet/SKILL.md','template':a272_0x55eafd(0x9a)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a272_0x55eafd(0xc1),'description':a272_0x55eafd(0xbc),'folders':[a272_0x55eafd(0xae)],'files':[{'type':a272_0x55eafd(0xa8),'path':a272_0x55eafd(0xca),'template':a272_0x55eafd(0x9a)}]},'antigravity':{'name':a272_0x55eafd(0xc0),'description':a272_0x55eafd(0xb4),'folders':['.agent'],'files':[{'type':a272_0x55eafd(0xa8),'path':a272_0x55eafd(0xca),'template':a272_0x55eafd(0x9a)}]}};export const CORE_IDE_LIST=[a272_0x55eafd(0xbf),a272_0x55eafd(0xab),'codebuddy',a272_0x55eafd(0xa5),'cursor','opencode',a272_0x55eafd(0xc9),'trae',a272_0x55eafd(0xc3)];export const IDE_LIST=['antigravity',a272_0x55eafd(0xbf),a272_0x55eafd(0xab),'codebuddy',a272_0x55eafd(0xa5),a272_0x55eafd(0xba),a272_0x55eafd(0x9f),a272_0x55eafd(0xc9),a272_0x55eafd(0xac),a272_0x55eafd(0xc3),'agent'];export const ALL_CORE_IDES=['cursor',a272_0x55eafd(0xc3),'claude',a272_0x55eafd(0xab),a272_0x55eafd(0xa5),a272_0x55eafd(0x9f),'qoder',a272_0x55eafd(0xb5),a272_0x55eafd(0xac)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2aba44,_0x43ba46){const _0x344249=a273_0x5651,_0x574f3d=_0x2aba44();while(!![]){try{const _0x3893ab=parseInt(_0x344249(0x167))/0x1*(-parseInt(_0x344249(0x16f))/0x2)+-parseInt(_0x344249(0x166))/0x3+-parseInt(_0x344249(0x168))/0x4+parseInt(_0x344249(0x169))/0x5+-parseInt(_0x344249(0x16d))/0x6*(-parseInt(_0x344249(0x16e))/0x7)+parseInt(_0x344249(0x16b))/0x8+-parseInt(_0x344249(0x16c))/0x9*(parseInt(_0x344249(0x16a))/0xa);if(_0x3893ab===_0x43ba46)break;else _0x574f3d['push'](_0x574f3d['shift']());}catch(_0x3f677d){_0x574f3d['push'](_0x574f3d['shift']());}}}(a273_0x36d4,0xbf03a));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';function a273_0x5651(_0x12f356,_0x24eb48){_0x12f356=_0x12f356-0x166;const _0x36d47e=a273_0x36d4();let _0x5651af=_0x36d47e[_0x12f356];return _0x5651af;}function a273_0x36d4(){const _0x6886b2=['25822kvTcJY','2272326vhgQcH','23iHpdEB','2997404VLlzqM','4358770YTbNGG','9190CcMVkm','11867376DqcpFj','1611ehdaMf','474558ctEqEi','35MjvWRk'];a273_0x36d4=function(){return _0x6886b2;};return a273_0x36d4();}export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1183b2,_0x2835f7){const _0x3b8908=a274_0x35ec,_0x2f0551=_0x1183b2();while(!![]){try{const _0x380488=-parseInt(_0x3b8908(0x16b))/0x1*(parseInt(_0x3b8908(0x176))/0x2)+-parseInt(_0x3b8908(0x16c))/0x3*(parseInt(_0x3b8908(0x169))/0x4)+parseInt(_0x3b8908(0x16d))/0x5*(-parseInt(_0x3b8908(0x175))/0x6)+parseInt(_0x3b8908(0x171))/0x7+parseInt(_0x3b8908(0x173))/0x8+-parseInt(_0x3b8908(0x172))/0x9*(parseInt(_0x3b8908(0x170))/0xa)+parseInt(_0x3b8908(0x16e))/0xb;if(_0x380488===_0x2835f7)break;else _0x2f0551['push'](_0x2f0551['shift']());}catch(_0x1a7dd0){_0x2f0551['push'](_0x2f0551['shift']());}}}(a274_0x1c30,0x6fcd0));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x2d18e7=a274_0x35ec,_0x260936=getTemplateBaseUrl(),_0x50a079=[_0x260936+'/config.json',_0x260936+'/config/index.json'];for(const _0x2b2614 of _0x50a079){try{const _0xb6489b=await fetch(_0x2b2614,{'headers':{'Accept':'application/json'}});if(!_0xb6489b['ok'])continue;const _0x9c90ff=await _0xb6489b[_0x2d18e7(0x174)]();if(!_0x9c90ff[_0x2d18e7(0x16a)]?.[_0x2d18e7(0x177)]||!_0x9c90ff[_0x2d18e7(0x16f)]?.[_0x2d18e7(0x178)]?.[_0x2d18e7(0x177)])continue;return _0x9c90ff;}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 _0x145c91=Date['now']();if(hasCachedConfig){const _0x5a2372=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x145c91-cacheTime<_0x5a2372)return cachedConfig;}const _0x193d0f=await fetchCdnConfig();return cachedConfig=_0x193d0f,cacheTime=_0x145c91,hasCachedConfig=!![],_0x193d0f;}function a274_0x35ec(_0x987003,_0x2782cd){_0x987003=_0x987003-0x169;const _0x1c30d5=a274_0x1c30();let _0x35ec24=_0x1c30d5[_0x987003];return _0x35ec24;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}function a274_0x1c30(){const _0x24374f=['2292892dygyYd','cli','37846QFKxoe','3RtxFZl','893630TdVSkR','24276560PTCbTW','sdk','1990vbNLWu','1638490GXOlJK','29709eOxEAc','6272320GrCqTE','json','30eXYlse','34iEfXto','stableVersion','node'];a274_0x1c30=function(){return _0x24374f;};return a274_0x1c30();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5a53d9,_0x5f0f57){const _0x280de2=a275_0x4b9f,_0x4365d7=_0x5a53d9();while(!![]){try{const _0x5de073=-parseInt(_0x280de2(0x15a))/0x1*(-parseInt(_0x280de2(0x154))/0x2)+parseInt(_0x280de2(0x16a))/0x3*(-parseInt(_0x280de2(0x169))/0x4)+parseInt(_0x280de2(0x163))/0x5*(parseInt(_0x280de2(0x153))/0x6)+parseInt(_0x280de2(0x157))/0x7*(-parseInt(_0x280de2(0x167))/0x8)+parseInt(_0x280de2(0x16c))/0x9+-parseInt(_0x280de2(0x15d))/0xa+parseInt(_0x280de2(0x16b))/0xb*(parseInt(_0x280de2(0x152))/0xc);if(_0x5de073===_0x5f0f57)break;else _0x4365d7['push'](_0x4365d7['shift']());}catch(_0x18c9fe){_0x4365d7['push'](_0x4365d7['shift']());}}}(a275_0x5e37,0xa934e));import a275_0x50fc06 from'node:fs';function a275_0x4b9f(_0x59b6fb,_0x1435ae){_0x59b6fb=_0x59b6fb-0x14b;const _0x5e3709=a275_0x5e37();let _0x4b9f65=_0x5e3709[_0x59b6fb];return _0x4b9f65;}import a275_0x379cea from'node:path';import a275_0x398e26 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION='1.2.0';function isNonNumericVersion(_0x536d53){const _0x5d6a52=a275_0x4b9f,_0x511250=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x511250[_0x5d6a52(0x151)](_0x4b3d3a=>_0x4b3d3a['test'](_0x536d53));}function getInstalledVersion(_0x112a83,_0x51b12b){const _0x4ad476=a275_0x4b9f;try{const _0x35378c=a275_0x379cea[_0x4ad476(0x164)](_0x112a83,'node_modules',_0x51b12b,_0x4ad476(0x16d));if(a275_0x50fc06[_0x4ad476(0x162)](_0x35378c)){const _0x1ed6c=JSON[_0x4ad476(0x14f)](a275_0x50fc06[_0x4ad476(0x168)](_0x35378c,_0x4ad476(0x15f)));return _0x1ed6c[_0x4ad476(0x15c)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x5b7308=a275_0x4b9f;try{const _0xce69bc=await getCdnConfig();return _0xce69bc?.['sdk']?.['node']?.[_0x5b7308(0x150)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x26d20e=a275_0x4b9f;try{const _0x1d70ce=await getCdnConfig();return _0x1d70ce?.[_0x26d20e(0x15b)]?.[_0x26d20e(0x160)]?.[_0x26d20e(0x166)]||_0x26d20e(0x161);}catch{return _0x26d20e(0x161);}}export async function checkSdkVersion(_0x2770fe){const _0x3da271=a275_0x4b9f,_0x595108=a275_0x379cea[_0x3da271(0x164)](_0x2770fe,_0x3da271(0x16d)),[_0x5b9a19,_0x5731d2]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x3dacaf=_0x5b9a19||FALLBACK_MIN_SDK_VERSION;if(!a275_0x50fc06[_0x3da271(0x162)](_0x595108))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3dacaf,'packageName':_0x5731d2,'stableVersion':_0x5b9a19};try{const _0x1a71d6=JSON['parse'](a275_0x50fc06[_0x3da271(0x168)](_0x595108,_0x3da271(0x14d))),_0x44043e=_0x1a71d6[_0x3da271(0x14c)]||{},_0x23b651=_0x1a71d6['devDependencies']||{},_0x495c5a=_0x44043e[_0x5731d2]||_0x23b651[_0x5731d2];if(!_0x495c5a)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3dacaf,'packageName':_0x5731d2,'stableVersion':_0x5b9a19};let _0x533c2d=getInstalledVersion(_0x2770fe,_0x5731d2);!_0x533c2d&&(_0x533c2d=_0x495c5a);if(isNonNumericVersion(_0x495c5a))return{'installed':!![],'version':_0x533c2d,'needsUpgrade':![],'minVersion':_0x3dacaf,'packageName':_0x5731d2,'stableVersion':_0x5b9a19};const _0x228767=a275_0x398e26[_0x3da271(0x14e)](_0x533c2d),_0x345a57=a275_0x398e26[_0x3da271(0x14e)](_0x3dacaf),_0x32f8c3=_0x228767&&_0x345a57?a275_0x398e26['lt'](_0x228767,_0x345a57):![];return{'installed':!![],'version':_0x533c2d,'needsUpgrade':_0x32f8c3,'minVersion':_0x3dacaf,'packageName':_0x5731d2,'stableVersion':_0x5b9a19};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x3dacaf,'packageName':_0x5731d2,'stableVersion':_0x5b9a19};}}export function checkSdkVersionSync(_0x123b2e){const _0x2f06fa=a275_0x4b9f,_0x2ce886=a275_0x379cea[_0x2f06fa(0x164)](_0x123b2e,_0x2f06fa(0x16d)),_0x3b4e12=_0x2f06fa(0x161);if(!a275_0x50fc06[_0x2f06fa(0x162)](_0x2ce886))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3b4e12,'stableVersion':null};try{const _0x33c081=JSON['parse'](a275_0x50fc06[_0x2f06fa(0x168)](_0x2ce886,'utf8')),_0x543e42=_0x33c081['dependencies']||{},_0x3e00ec=_0x33c081[_0x2f06fa(0x158)]||{},_0x44e6c1=_0x543e42[_0x3b4e12]||_0x3e00ec[_0x3b4e12];if(!_0x44e6c1)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3b4e12,'stableVersion':null};let _0x1eab96=getInstalledVersion(_0x123b2e,_0x3b4e12);!_0x1eab96&&(_0x1eab96=_0x44e6c1);if(isNonNumericVersion(_0x44e6c1))return{'installed':!![],'version':_0x1eab96,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3b4e12,'stableVersion':null};const _0x5db289=a275_0x398e26[_0x2f06fa(0x14e)](_0x1eab96),_0x3533c1=_0x5db289?a275_0x398e26['lt'](_0x5db289,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x1eab96,'needsUpgrade':_0x3533c1,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3b4e12,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3b4e12,'stableVersion':null};}}export function printSdkUpgradeWarning(_0xea78f5){const _0x415e26=a275_0x4b9f;if(!_0xea78f5['needsUpgrade'])return;const _0x1457ba=_0x415e26(0x14b),_0x1cdeb7='\x1b[0m',_0x8971aa=_0x415e26(0x16e),_0xcaa107=_0xea78f5[_0x415e26(0x166)]||'@lovrabet/sdk',_0x1b5584=_0xea78f5[_0x415e26(0x150)]||_0xea78f5['minVersion'],_0x129128=_0x415e26(0x156)+_0xcaa107+'@'+(_0x1b5584||'latest');console[_0x415e26(0x15e)](),console[_0x415e26(0x15e)](''+_0x1457ba+_0x8971aa+'↪\x20SDK\x20update\x20available'+_0x1cdeb7),console[_0x415e26(0x15e)](_0x1457ba+_0x415e26(0x159)+_0xcaa107+'@'+_0xea78f5['version']+_0x1cdeb7),console[_0x415e26(0x15e)](_0x1457ba+_0x415e26(0x165)+_0x1b5584+_0x1cdeb7),console[_0x415e26(0x15e)](_0x1457ba+_0x415e26(0x155)+_0x129128+_0x1cdeb7),console[_0x415e26(0x15e)]();}function a275_0x5e37(){const _0x5878b7=['\x20\x20\x20Stable\x20version:\x20','packageName','8XjnbGR','readFileSync','52TABhbP','7749xOaHsG','11icLlXX','5380776YJCrhJ','package.json','\x1b[1m','\x1b[33m','dependencies','utf8','coerce','parse','stableVersion','some','7122468LQVATg','113154vRhkUG','2094LAEBsN','\x20\x20\x20Upgrade\x20command:\x20','npm\x20install\x20','2574257nQeNkE','devDependencies','\x20\x20\x20Current\x20version:\x20','1075YlYHIS','sdk','version','12979640rSyMVl','log','utf-8','node','@lovrabet/sdk','existsSync','20XjSblT','join'];a275_0x5e37=function(){return _0x5878b7;};return a275_0x5e37();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1077c1,_0x2d5fcb){const _0x15c6f4=a276_0x3490,_0x4744dc=_0x1077c1();while(!![]){try{const _0x420311=-parseInt(_0x15c6f4(0xfc))/0x1+parseInt(_0x15c6f4(0xe8))/0x2+-parseInt(_0x15c6f4(0xf8))/0x3+-parseInt(_0x15c6f4(0xe7))/0x4*(-parseInt(_0x15c6f4(0xf2))/0x5)+parseInt(_0x15c6f4(0xf3))/0x6*(parseInt(_0x15c6f4(0xf4))/0x7)+-parseInt(_0x15c6f4(0xf6))/0x8+-parseInt(_0x15c6f4(0xfd))/0x9*(-parseInt(_0x15c6f4(0xe3))/0xa);if(_0x420311===_0x2d5fcb)break;else _0x4744dc['push'](_0x4744dc['shift']());}catch(_0x4213bf){_0x4744dc['push'](_0x4744dc['shift']());}}}(a276_0x5907,0x3a716));import{readFileSync}from'node:fs';function a276_0x5907(){const _0x18c359=['coerce','170iJHOta','1.0.0','minimumVersionMessage','\x20\x20\x20','44poePbb','800664iJHUMr','utf-8','currentVersion','\x20\x20\x20Stable\x20version:\x20','\x20\x20\x20Recommended\x20stable:\x20','stableVersion','upgradeMessage','log','\x20\x20\x20Current\x20CLI\x20version:\x20','filter','100690JOvyWy','678BabetD','6440CzdlLe','minimumVersion','576536IJXyRd','version','754941HavWIh','package.json','validation','latest','390259eFPmvy','120465VxyqpX','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','belowMinimum','\x1b[1m','\x1b[33m'];a276_0x5907=function(){return _0x18c359;};return a276_0x5907();}import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a276_0x42ceb1 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a276_0x3490(_0x341023,_0x278430){_0x341023=_0x341023-0xde;const _0x5907dd=a276_0x5907();let _0x34904a=_0x5907dd[_0x341023];return _0x34904a;}export function getCliUpgradeCommand(_0x2e594b){const _0x3ecf3b=a276_0x3490,_0x276a77=_0x2e594b[_0x3ecf3b(0xed)]||_0x3ecf3b(0xfb);return'npm\x20install\x20-g\x20'+NPM_PACKAGE_NAME+'@'+_0x276a77;}function getCurrentCliVersion(){const _0xcfbd35=a276_0x3490;try{const _0x460b90=fileURLToPath(import.meta.url),_0x1e8164=resolve(dirname(_0x460b90),'../..'),_0x24257b=resolve(_0x1e8164,_0xcfbd35(0xf9)),_0x2af56b=JSON['parse'](readFileSync(_0x24257b,_0xcfbd35(0xe9)));return _0x2af56b[_0xcfbd35(0xf7)]||_0xcfbd35(0xe4);}catch{return _0xcfbd35(0xe4);}}export async function checkCliVersion(){const _0x374864=a276_0x3490,_0x3dd3c7=getCurrentCliVersion(),_0x582929=await getCliVersionPolicy(),_0x2a5c8e=_0x582929?.['stableVersion']||null,_0x2bec78=_0x582929?.['minimumVersion']||null;let _0x3ed75f=![],_0x3e74d1=![];const _0x5271a8=a276_0x42ceb1[_0x374864(0xe2)](_0x3dd3c7);if(_0x5271a8&&_0x2a5c8e)try{const _0x59c2e8=a276_0x42ceb1[_0x374864(0xe2)](_0x2a5c8e);if(_0x59c2e8)_0x3ed75f=a276_0x42ceb1['lt'](_0x5271a8,_0x59c2e8);}catch{}if(_0x5271a8&&_0x2bec78)try{const _0x1999e8=a276_0x42ceb1[_0x374864(0xe2)](_0x2bec78);if(_0x1999e8)_0x3e74d1=a276_0x42ceb1['lt'](_0x5271a8,_0x1999e8);}catch{}return _0x3e74d1&&(_0x3ed75f=!![]),{'currentVersion':_0x3dd3c7,'stableVersion':_0x2a5c8e,'minimumVersion':_0x2bec78,'needsUpgrade':_0x3ed75f,'belowMinimum':_0x3e74d1,'isPreRelease':![],'upgradeMessage':_0x582929?.[_0x374864(0xee)],'minimumVersionMessage':_0x582929?.[_0x374864(0xe5)]};}export function printCliUpgradeWarning(_0x15c51d){const _0x43ca35=a276_0x3490;if(!_0x15c51d['needsUpgrade']&&!_0x15c51d['belowMinimum'])return;const _0x1e008d='\x1b[31m',_0x179e09=_0x43ca35(0xe1),_0x290e9f='\x1b[0m',_0x329014=_0x43ca35(0xe0),_0x44d91b=getCliUpgradeCommand(_0x15c51d);console['log'](),_0x15c51d[_0x43ca35(0xdf)]?(console[_0x43ca35(0xef)](''+_0x1e008d+_0x329014+'↪\x20Critical\x20CLI\x20upgrade\x20required'+_0x290e9f),console[_0x43ca35(0xef)](_0x1e008d+_0x43ca35(0xf0)+_0x15c51d[_0x43ca35(0xea)]+_0x290e9f),_0x15c51d[_0x43ca35(0xf5)]&&console['log'](_0x1e008d+'\x20\x20\x20Minimum\x20supported:\x20'+_0x15c51d[_0x43ca35(0xf5)]+_0x290e9f),_0x15c51d['stableVersion']&&_0x15c51d[_0x43ca35(0xed)]!==_0x15c51d[_0x43ca35(0xf5)]&&console[_0x43ca35(0xef)](_0x1e008d+_0x43ca35(0xec)+_0x15c51d[_0x43ca35(0xed)]+_0x290e9f),_0x15c51d['minimumVersionMessage']&&console[_0x43ca35(0xef)](_0x1e008d+_0x43ca35(0xe6)+_0x15c51d[_0x43ca35(0xe5)]+_0x290e9f),console['log'](_0x1e008d+'\x20\x20\x20Upgrade\x20command:\x20'+_0x44d91b+_0x290e9f)):(console['log'](''+_0x179e09+_0x329014+'↪\x20New\x20version\x20available'+_0x290e9f),console[_0x43ca35(0xef)](_0x179e09+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x15c51d[_0x43ca35(0xea)]+_0x290e9f),console[_0x43ca35(0xef)](_0x179e09+_0x43ca35(0xeb)+_0x15c51d[_0x43ca35(0xed)]+_0x290e9f),_0x15c51d[_0x43ca35(0xee)]&&console[_0x43ca35(0xef)](_0x179e09+'\x20\x20\x20'+_0x15c51d['upgradeMessage']+_0x290e9f),console[_0x43ca35(0xef)](_0x179e09+'\x20\x20\x20Upgrade\x20command:\x20'+_0x44d91b+_0x290e9f)),console['log']();}export function assertCliVersionSupported(_0x54d248){const _0x5cf589=a276_0x3490;if(!_0x54d248[_0x5cf589(0xdf)])return;const _0x5f2e94=[_0x54d248[_0x5cf589(0xe5)],'Current\x20version:\x20'+_0x54d248[_0x5cf589(0xea)],_0x54d248['minimumVersion']?'Minimum\x20supported:\x20'+_0x54d248[_0x5cf589(0xf5)]:null,'Upgrade\x20command:\x20'+getCliUpgradeCommand(_0x54d248)][_0x5cf589(0xf1)](Boolean)['join']('\x0a');throw CliErrors[_0x5cf589(0xfa)](_0x5cf589(0xde),_0x5f2e94);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5ab819,_0x54ef17){const _0x4624fa=a277_0x1be1,_0x4ed39b=_0x5ab819();while(!![]){try{const _0x2d3199=parseInt(_0x4624fa(0x105))/0x1+-parseInt(_0x4624fa(0x108))/0x2+-parseInt(_0x4624fa(0x109))/0x3*(parseInt(_0x4624fa(0x104))/0x4)+parseInt(_0x4624fa(0x101))/0x5+parseInt(_0x4624fa(0x112))/0x6+parseInt(_0x4624fa(0x10d))/0x7*(-parseInt(_0x4624fa(0x115))/0x8)+parseInt(_0x4624fa(0x102))/0x9;if(_0x2d3199===_0x54ef17)break;else _0x4ed39b['push'](_0x4ed39b['shift']());}catch(_0x43b7a1){_0x4ed39b['push'](_0x4ed39b['shift']());}}}(a277_0x35b7,0x86454));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(_0x9e8b92){const _0x4c82e2=a277_0x1be1;return typeof _0x9e8b92===_0x4c82e2(0x113)&&_0x9e8b92[_0x4c82e2(0x10c)]()[_0x4c82e2(0x111)]>0x0?_0x9e8b92[_0x4c82e2(0x10c)]():null;}function normalizeCliVersionPolicy(_0x1f99d8){const _0x1bd9c6=a277_0x1be1;if(!_0x1f99d8||typeof _0x1f99d8!==_0x1bd9c6(0x117))return null;const _0x2c63a4=_0x1f99d8,_0x418996=_0x2c63a4['cli']&&typeof _0x2c63a4[_0x1bd9c6(0x110)]===_0x1bd9c6(0x117)?_0x2c63a4[_0x1bd9c6(0x110)]:_0x2c63a4,_0x364e49=pickString(_0x418996[_0x1bd9c6(0x116)])||pickString(_0x418996[_0x1bd9c6(0x118)])||pickString(_0x418996[_0x1bd9c6(0x107)]),_0x4dfc3a=pickString(_0x418996[_0x1bd9c6(0x10a)])||pickString(_0x418996['minVersion']);if(!_0x364e49&&!_0x4dfc3a)return null;return{'stableVersion':_0x364e49,'minimumVersion':_0x4dfc3a,'upgradeMessage':pickString(_0x418996[_0x1bd9c6(0x10b)])||undefined,'minimumVersionMessage':pickString(_0x418996[_0x1bd9c6(0x106)])||undefined};}export async function fetchRabetbaseCdnConfig(){const _0x182816=a277_0x1be1,_0x4f0134=new AbortController(),_0x277ce2=setTimeout(()=>_0x4f0134['abort'](),FETCH_TIMEOUT_MS);try{const _0x59b314=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x182816(0x10f)},'signal':_0x4f0134[_0x182816(0x10e)]});if(!_0x59b314['ok'])return null;const _0x331b12=await _0x59b314[_0x182816(0x114)]();return _0x331b12&&typeof _0x331b12===_0x182816(0x117)?_0x331b12:null;}catch{return null;}finally{clearTimeout(_0x277ce2);}}function a277_0x1be1(_0xbcab80,_0x17267a){_0xbcab80=_0xbcab80-0x101;const _0x35b753=a277_0x35b7();let _0x1be1a5=_0x35b753[_0xbcab80];return _0x1be1a5;}function a277_0x35b7(){const _0x202e2a=['recommendedVersion','1855592hgCrup','3080265mTxcxi','minimumVersion','upgradeMessage','trim','4872eHFjHS','signal','application/json','cli','length','1330872nvmPVU','string','json','8792ATMPsL','stableVersion','object','latestVersion','3914275rLaiSM','18405522hEHGlL','now','4RvIugI','219702xLdyEo','minimumVersionMessage'];a277_0x35b7=function(){return _0x202e2a;};return a277_0x35b7();}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0xb8ab7f=a277_0x1be1,_0x349193=Date[_0xb8ab7f(0x103)]();if(hasCachedConfig){const _0x47af0f=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x349193-cacheTime<_0x47af0f)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x349193,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x45ddce,_0x542005){const _0x2ce848=a278_0x17a3,_0x4701f4=_0x45ddce();while(!![]){try{const _0x18294a=-parseInt(_0x2ce848(0x1e8))/0x1+-parseInt(_0x2ce848(0x1ed))/0x2*(parseInt(_0x2ce848(0x1e6))/0x3)+-parseInt(_0x2ce848(0x1f1))/0x4+parseInt(_0x2ce848(0x1e9))/0x5*(-parseInt(_0x2ce848(0x1f0))/0x6)+-parseInt(_0x2ce848(0x1ef))/0x7*(-parseInt(_0x2ce848(0x1e7))/0x8)+-parseInt(_0x2ce848(0x1eb))/0x9*(parseInt(_0x2ce848(0x1ea))/0xa)+parseInt(_0x2ce848(0x1e5))/0xb;if(_0x18294a===_0x542005)break;else _0x4701f4['push'](_0x4701f4['shift']());}catch(_0x143ade){_0x4701f4['push'](_0x4701f4['shift']());}}}(a278_0x267f,0xb34a5));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a278_0xcc354e,getMultiAppConfigs as a278_0x1be5a6,getTemplateBaseUrl as a278_0x584d47}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a278_0x17a3(_0x5c05bb,_0x50ebc0){_0x5c05bb=_0x5c05bb-0x1e5;const _0x267fcf=a278_0x267f();let _0x17a34e=_0x267fcf[_0x5c05bb];return _0x17a34e;}export{isInProject}from'../context.js';export function readConfig(_0x2682df){const _0x1129a0=a278_0x17a3,_0x4352fb=readRawConfig(_0x2682df);return _0x4352fb[_0x1129a0(0x1ee)]&&typeof _0x4352fb[_0x1129a0(0x1ee)]===_0x1129a0(0x1ec)&&initEnv(_0x4352fb[_0x1129a0(0x1ee)]),_0x4352fb;}function a278_0x267f(){const _0x154189=['173617uKXmBk','35EZmpiL','10gAGNlz','12867354GbzYwN','string','6yaDQFe','env','30758DffZQj','867978Uwejsy','1395716sskfNK','42193272YOttug','628614vtAMZh','896pgPHPF'];a278_0x267f=function(){return _0x154189;};return a278_0x267f();}export function getConfigAppCode(){return a278_0xcc354e();}export function getMultiAppConfigs(_0x48cc78='project'){return a278_0x1be5a6(_0x48cc78);}export function getTemplateBaseUrl(){return a278_0x584d47();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x16adf7,_0x1dccde){const _0x2279eb=a279_0x9fcc,_0x4c9f47=_0x16adf7();while(!![]){try{const _0xb4690b=parseInt(_0x2279eb(0xa3))/0x1*(-parseInt(_0x2279eb(0x9f))/0x2)+-parseInt(_0x2279eb(0xa5))/0x3*(-parseInt(_0x2279eb(0xa0))/0x4)+parseInt(_0x2279eb(0x9e))/0x5*(parseInt(_0x2279eb(0x9c))/0x6)+parseInt(_0x2279eb(0xa1))/0x7+-parseInt(_0x2279eb(0xa8))/0x8+parseInt(_0x2279eb(0x9a))/0x9*(-parseInt(_0x2279eb(0xa6))/0xa)+-parseInt(_0x2279eb(0xa2))/0xb;if(_0xb4690b===_0x1dccde)break;else _0x4c9f47['push'](_0x4c9f47['shift']());}catch(_0x305089){_0x4c9f47['push'](_0x4c9f47['shift']());}}}(a279_0xb96e,0xce28d));function toFiniteNumber(_0x3cd6b7){const _0x26ce88=a279_0x9fcc;if(typeof _0x3cd6b7===_0x26ce88(0xa4)&&Number[_0x26ce88(0xa7)](_0x3cd6b7))return _0x3cd6b7;if(typeof _0x3cd6b7===_0x26ce88(0x9b)){const _0x2b14ce=_0x3cd6b7[_0x26ce88(0x9d)]();if(!_0x2b14ce)return undefined;const _0x21873f=Number(_0x2b14ce);if(Number[_0x26ce88(0xa7)](_0x21873f))return _0x21873f;}return undefined;}export function normalizeEntityWithIdResponse(_0x3a8e97){const _0x29ffa6=a279_0x9fcc,_0x30935c=toFiniteNumber(_0x3a8e97);if(_0x30935c!==undefined)return{'id':_0x30935c,'entity':{'id':_0x30935c}};if(!_0x3a8e97||typeof _0x3a8e97!==_0x29ffa6(0x99))return{'id':undefined,'entity':{}};const _0x2da717={..._0x3a8e97},_0x3766e5=toFiniteNumber(_0x2da717['id']);return _0x3766e5!==undefined&&(_0x2da717['id']=_0x3766e5),{'id':_0x3766e5,'entity':_0x2da717};}function a279_0x9fcc(_0x496dc5,_0x41845e){_0x496dc5=_0x496dc5-0x99;const _0xb96e0=a279_0xb96e();let _0x9fcc80=_0xb96e0[_0x496dc5];return _0x9fcc80;}function a279_0xb96e(){const _0x577f1a=['3535384mcBtyA','object','175239RFDhas','string','300474DXwxjg','trim','70hFvZQM','25484FeHEZq','2581772ETowSP','10250359YgicDv','5176204GOBzKy','86kSUYQT','number','6XrllWt','310tLtZCS','isFinite'];a279_0xb96e=function(){return _0x577f1a;};return a279_0xb96e();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x27d6ee,_0x42d70a){const _0x5221f3=a280_0x1ec4,_0x5c8482=_0x27d6ee();while(!![]){try{const _0x2288f4=parseInt(_0x5221f3(0x1b7))/0x1*(parseInt(_0x5221f3(0x1c1))/0x2)+-parseInt(_0x5221f3(0x1bc))/0x3*(-parseInt(_0x5221f3(0x1b8))/0x4)+-parseInt(_0x5221f3(0x1bf))/0x5*(parseInt(_0x5221f3(0x1be))/0x6)+parseInt(_0x5221f3(0x1ba))/0x7+parseInt(_0x5221f3(0x1c2))/0x8*(parseInt(_0x5221f3(0x1bb))/0x9)+parseInt(_0x5221f3(0x1b9))/0xa*(parseInt(_0x5221f3(0x1b6))/0xb)+-parseInt(_0x5221f3(0x1c0))/0xc*(parseInt(_0x5221f3(0x1bd))/0xd);if(_0x2288f4===_0x42d70a)break;else _0x5c8482['push'](_0x5c8482['shift']());}catch(_0x448a58){_0x5c8482['push'](_0x5c8482['shift']());}}}(a280_0x3143,0x9fa83));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a280_0x1ec4(_0x28b9c8,_0x3c8ee5){_0x28b9c8=_0x28b9c8-0x1b6;const _0x3143a4=a280_0x3143();let _0x1ec4a0=_0x3143a4[_0x28b9c8];return _0x1ec4a0;}export async function copyDir(_0x575bee,_0x193ff0){const _0x14fb43=statSync(_0x575bee);if(_0x14fb43['isDirectory']()){!existsSync(_0x193ff0)&&mkdirSync(_0x193ff0,{'recursive':!![]});const _0x17d1b7=readdirSync(_0x575bee);for(const _0x269fa6 of _0x17d1b7){await copyDir(join(_0x575bee,_0x269fa6),join(_0x193ff0,_0x269fa6));}}else copyFileSync(_0x575bee,_0x193ff0);}function a280_0x3143(){const _0x21807f=['12cORnbe','1114205uMJtAl','3118044mrltzD','1903518pcpAqw','145352JXjLnF','143uMBysa','1jvTvHP','636kgfWmZ','401510ZVoSSc','5500110kCMbIF','423LyUTfr','15933IvAdFN','143jgOKHd'];a280_0x3143=function(){return _0x21807f;};return a280_0x3143();}export function ensureDir(_0x2f56a9){!existsSync(_0x2f56a9)&&mkdirSync(_0x2f56a9,{'recursive':!![]});}export function pathExists(_0x2d24f1){return existsSync(_0x2d24f1);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a281_0x1c3822=a281_0x1d28;(function(_0x2a9cf3,_0x131adb){const _0x4d60ad=a281_0x1d28,_0x1cb669=_0x2a9cf3();while(!![]){try{const _0x4ef703=parseInt(_0x4d60ad(0x155))/0x1+parseInt(_0x4d60ad(0x156))/0x2*(-parseInt(_0x4d60ad(0x15b))/0x3)+parseInt(_0x4d60ad(0x150))/0x4*(-parseInt(_0x4d60ad(0x13e))/0x5)+-parseInt(_0x4d60ad(0x145))/0x6+-parseInt(_0x4d60ad(0x154))/0x7*(parseInt(_0x4d60ad(0x147))/0x8)+-parseInt(_0x4d60ad(0x157))/0x9*(-parseInt(_0x4d60ad(0x143))/0xa)+parseInt(_0x4d60ad(0x15a))/0xb;if(_0x4ef703===_0x131adb)break;else _0x1cb669['push'](_0x1cb669['shift']());}catch(_0x5414e1){_0x1cb669['push'](_0x1cb669['shift']());}}}(a281_0x5d58,0x3cacc));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 _0xa51b11=a281_0x1d28,_0x2291bc=getTemplateBaseUrl();return _0x2291bc+_0xa51b11(0x148);}const CACHE_DIR=join(homedir(),'.lovrabet',a281_0x1c3822(0x15e));function a281_0x5d58(){const _0x17ee45=['application/json','json','lastUpdated','length','guides','176GerXNK','entries','map','push','8582VFZsNw','482829rjJlxi','20BkBfPA','2740005AMIMaf','utf-8','trimEnd','11372933PHqBBG','81897XsCihp','extendContent','.lovrabet/skill/guides','cache','44140gsOMnA','\x0a\x0a>更新时间:','content','path','.md','10GWeOrm','CDN\x20请求失败:\x20','2561766RrapHR','CDN\x20数据中缺少\x20skillTemplate','3160zKAVbL','/skills/guides.json','skillTemplate','status'];a281_0x5d58=function(){return _0x17ee45;};return a281_0x5d58();}export async function fetchGuidesFromCDN(){const _0x1b380c=a281_0x1c3822,_0x49d41c=getGuidesCdnUrl(),_0x5b5bb6=await fetch(_0x49d41c,{'headers':{'Accept':_0x1b380c(0x14b)}});if(!_0x5b5bb6['ok'])throw new Error(_0x1b380c(0x144)+_0x5b5bb6[_0x1b380c(0x14a)]+'\x20'+_0x5b5bb6['statusText']);const _0x3efdf9=await _0x5b5bb6[_0x1b380c(0x14c)]();if(!_0x3efdf9[_0x1b380c(0x14f)]||typeof _0x3efdf9['guides']!=='object')throw new Error('CDN\x20返回数据格式错误');return _0x3efdf9;}function a281_0x1d28(_0x5e4437,_0x3d35d2){_0x5e4437=_0x5e4437-0x13e;const _0x5d5815=a281_0x5d58();let _0x1d282d=_0x5d5815[_0x5e4437];return _0x1d282d;}export function writeGuidesToProject(_0xac10d3,_0x35a8eb,_0x5a6123=a281_0x1c3822(0x15d),_0x3e2e37){const _0x3fe838=a281_0x1c3822,_0x48a789=join(_0x35a8eb,_0x5a6123);mkdirSync(_0x48a789,{'recursive':!![]});for(const [_0x5782d4,_0x24d88e]of Object[_0x3fe838(0x151)](_0xac10d3['guides'])){let _0x19d497=_0x24d88e[_0x3fe838(0x140)];_0x24d88e[_0x3fe838(0x14d)]&&(_0x19d497=appendUpdateTime(_0x19d497,_0x24d88e['lastUpdated'])),writeFileSync(join(_0x48a789,_0x5782d4+_0x3fe838(0x142)),_0x19d497,_0x3fe838(0x158));}}export function appendUpdateTime(_0x446f22,_0x5c3524){const _0x525742=a281_0x1c3822;return _0x446f22=_0x446f22['replace'](/\n*>更新时间:.*$/m,''),_0x446f22[_0x525742(0x159)]()+(_0x525742(0x13f)+_0x5c3524);}export function getSkillTemplate(_0x382286){const _0x4eedc2=a281_0x1c3822;return _0x382286[_0x4eedc2(0x149)]?.[_0x4eedc2(0x140)]||'';}export function appendExtendContents(_0x3da246,_0x2f19da,_0x3ec2af){const _0x92aab2=a281_0x1c3822,_0x5808f0=[];for(const [,_0x9ca615]of Object[_0x92aab2(0x151)](_0x2f19da[_0x92aab2(0x14f)])){_0x9ca615[_0x92aab2(0x15c)]&&_0x5808f0[_0x92aab2(0x153)](_0x9ca615[_0x92aab2(0x15c)][_0x92aab2(0x159)]());}if(_0x5808f0[_0x92aab2(0x14e)]===0x0)return _0x3da246;return _0x3da246[_0x92aab2(0x159)]()+'\x0a\x0a'+_0x5808f0['join']('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x10c787,_0x444e88,_0x3b0165){const _0xbf395a=a281_0x1c3822,_0x2a35c6=getSkillTemplate(_0x10c787);if(!_0x2a35c6)throw new Error(_0xbf395a(0x146));const _0x3184f2=dirname(_0x444e88);mkdirSync(_0x3184f2,{'recursive':!![]});let _0x4fda29=_0x2a35c6['replace'](/\{\{IDE_NAME\}\}/g,_0x3b0165);_0x4fda29=appendExtendContents(_0x4fda29,_0x10c787),_0x10c787['skillTemplate']['lastUpdated']&&(_0x4fda29=appendUpdateTime(_0x4fda29,_0x10c787[_0xbf395a(0x149)]['lastUpdated'])),writeFileSync(_0x444e88,_0x4fda29,_0xbf395a(0x158));}export async function installGuides(_0x3c3b76){const _0x1ec0cd=a281_0x1c3822,_0x41e8b8=await fetchGuidesFromCDN();return writeGuidesToProject(_0x41e8b8,_0x3c3b76),Object['keys'](_0x41e8b8[_0x1ec0cd(0x14f)])[_0x1ec0cd(0x14e)];}export function getGuidesSummary(_0x1245cb){const _0x2673ee=a281_0x1c3822;return Object[_0x2673ee(0x151)](_0x1245cb['guides'])[_0x2673ee(0x152)](([_0x43953a,_0x531204])=>({'key':_0x43953a,'title':_0x531204['title'],'path':_0x531204[_0x2673ee(0x141)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d5872,_0x12f457){const _0x481579=a282_0x46d3,_0x45691d=_0x1d5872();while(!![]){try{const _0x3ae3f9=parseInt(_0x481579(0x1b4))/0x1+-parseInt(_0x481579(0x1aa))/0x2*(parseInt(_0x481579(0x1b2))/0x3)+-parseInt(_0x481579(0x198))/0x4*(-parseInt(_0x481579(0x1a9))/0x5)+-parseInt(_0x481579(0x199))/0x6+-parseInt(_0x481579(0x1a2))/0x7*(-parseInt(_0x481579(0x1ad))/0x8)+-parseInt(_0x481579(0x1a5))/0x9+-parseInt(_0x481579(0x1ac))/0xa*(parseInt(_0x481579(0x1a0))/0xb);if(_0x3ae3f9===_0x12f457)break;else _0x45691d['push'](_0x45691d['shift']());}catch(_0x423293){_0x45691d['push'](_0x45691d['shift']());}}}(a282_0x261a,0x2e7cc));export async function httpRequest(_0x1870fe,_0x2a8c88={}){const _0x4fec75=a282_0x46d3,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x2a8c88;let _0x401c91=null;for(let _0x1191bc=0x0;_0x1191bc<=retries;_0x1191bc++){try{const _0x54d7ad=new AbortController(),_0x2264bb=setTimeout(()=>_0x54d7ad[_0x4fec75(0x1a6)](),timeout),_0x2b3b8a=await fetch(_0x1870fe,{'headers':headers,'signal':_0x54d7ad['signal']});clearTimeout(_0x2264bb);let _0x3788c6;const _0x255076=_0x2b3b8a[_0x4fec75(0x19d)][_0x4fec75(0x19a)](_0x4fec75(0x19e));return _0x255076?.[_0x4fec75(0x1b1)]('application/json')?_0x3788c6=await _0x2b3b8a[_0x4fec75(0x1b3)]():_0x3788c6=await _0x2b3b8a[_0x4fec75(0x1a4)](),{'ok':_0x2b3b8a['ok'],'status':_0x2b3b8a[_0x4fec75(0x19c)],'statusText':_0x2b3b8a[_0x4fec75(0x1a7)],'data':_0x3788c6,'headers':_0x2b3b8a[_0x4fec75(0x19d)],'url':_0x2b3b8a[_0x4fec75(0x1a8)],'text':()=>_0x2b3b8a[_0x4fec75(0x1a4)]()};}catch(_0x3e16a6){_0x401c91=_0x3e16a6 instanceof Error?_0x3e16a6:new Error(String(_0x3e16a6));if(_0x1191bc===retries)break;if(shouldRetry(_0x3e16a6)){console[_0x4fec75(0x1af)](_0x4fec75(0x1ae)+retryDelay+_0x4fec75(0x1ab)+(_0x1191bc+0x1)+_0x4fec75(0x1a1)),await sleep(retryDelay);continue;}else break;}}throw _0x401c91||new Error(_0x4fec75(0x19b));}function shouldRetry(_0x2ed19a){const _0x3103fd=a282_0x46d3;if(_0x2ed19a instanceof Error){if(_0x2ed19a['name']===_0x3103fd(0x196))return![];if(_0x2ed19a[_0x3103fd(0x194)]===_0x3103fd(0x1b0)&&_0x2ed19a[_0x3103fd(0x1a3)][_0x3103fd(0x1b1)](_0x3103fd(0x197)))return!![];if(_0x2ed19a['message'][_0x3103fd(0x1b1)](_0x3103fd(0x195)))return!![];if(_0x2ed19a[_0x3103fd(0x1a3)][_0x3103fd(0x1b1)](_0x3103fd(0x19f)))return![];}return![];}function a282_0x46d3(_0x4b4a78,_0x5d6b67){_0x4b4a78=_0x4b4a78-0x194;const _0x261a3e=a282_0x261a();let _0x46d31c=_0x261a3e[_0x4b4a78];return _0x46d31c;}function a282_0x261a(){const _0x23840c=['757647xtvDnD','abort','statusText','url','3695QnLinb','2gQBsbO','ms\x20后进行第\x20','2377030mZiIfN','32616TsrPhb','*\x20请求失败,','log','TypeError','includes','354111rDZcow','json','310676UgYQIl','name','ECONNRESET','AbortError','fetch','1668vkVMow','1325358JLvHBb','get','Request\x20failed','status','headers','content-type','ENOTFOUND','11KHjsFL','\x20次重试...','399CJXPxa','message','text'];a282_0x261a=function(){return _0x23840c;};return a282_0x261a();}function sleep(_0x20bc52){return new Promise(_0x4287f6=>setTimeout(_0x4287f6,_0x20bc52));}export function validateUrl(_0x3f0294){try{return new URL(_0x3f0294),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x461e03,_0x5c6dd3){const _0x351832=a283_0x522e,_0x104993=_0x461e03();while(!![]){try{const _0x1753b1=-parseInt(_0x351832(0x196))/0x1+-parseInt(_0x351832(0x1a2))/0x2*(parseInt(_0x351832(0x19f))/0x3)+parseInt(_0x351832(0x197))/0x4+-parseInt(_0x351832(0x19b))/0x5*(-parseInt(_0x351832(0x19d))/0x6)+parseInt(_0x351832(0x193))/0x7*(parseInt(_0x351832(0x194))/0x8)+parseInt(_0x351832(0x19e))/0x9+-parseInt(_0x351832(0x1a1))/0xa;if(_0x1753b1===_0x5c6dd3)break;else _0x104993['push'](_0x104993['shift']());}catch(_0x2f537b){_0x104993['push'](_0x104993['shift']());}}}(a283_0x86f2,0xbeee1));function env(_0x2ac0db){return process.env[`RABETBASE_${_0x2ac0db}`]||process.env[`LOVRABET_${_0x2ac0db}`]||undefined;}function a283_0x522e(_0x266320,_0xd38ba8){_0x266320=_0x266320-0x192;const _0x86f2f=a283_0x86f2();let _0x522e51=_0x86f2f[_0x266320];return _0x522e51;}export function isNonInteractive(_0x52284e){const _0x264a69=a283_0x522e;return!!(_0x52284e[_0x264a69(0x192)]||_0x52284e['ci']||env('CI')===_0x264a69(0x195)||process.env.CI===_0x264a69(0x195)||!process[_0x264a69(0x1a0)]['isTTY']||!isStdinRawModeSupported());}function a283_0x86f2(){const _0x41acc9=['1639656lKzRFx','isTTY','isRaw','stdin','25rHcatU','setRawMode','1400004DCMqDj','9019584kBRHWq','201ZZtPQI','stdout','10008940NbgTyV','17002ckvNZI','nonInteractive','7DSptPq','7389456PGigLW','true','1149932xLpRQk'];a283_0x86f2=function(){return _0x41acc9;};return a283_0x86f2();}function isStdinRawModeSupported(){const _0x3ac798=a283_0x522e;if(!process[_0x3ac798(0x19a)][_0x3ac798(0x198)])return![];try{const _0x415313=process[_0x3ac798(0x19a)][_0x3ac798(0x199)];return process[_0x3ac798(0x19a)][_0x3ac798(0x19c)](!![]),process[_0x3ac798(0x19a)][_0x3ac798(0x19c)](_0x415313??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a284_0x31b047=a284_0x57cf;function a284_0x5f0d(){const _0x26071b=['909198zANMjw','5LvunFd','level','setRawCommand','success','red','3512957wzpwTG','error','File','transports','yellow','timestamp','combine','warn','format','2097788VsZcre','errors','stringify','addColors','Failed\x20to\x20clear\x20logs:','duration','toISOString','winstonLogger','3527721IQrlnF','split','now','1710bhiDXK','utf8','existsSync','失败:\x20','8rbvcok','readLogs','printf','Failed\x20to\x20read\x20logs:','logFilePath','initWinstonLogger','rawCommand','info','dirname','filter','setLogPath','58450GxJGeU','unknown','blue','logTask','log','mkdirSync','currentRawCommand','完成:\x20','开始执行:\x20','getWinstonInstance','details','4372960fhAKsc','817196IfnNgm','clear'];a284_0x5f0d=function(){return _0x26071b;};return a284_0x5f0d();}(function(_0x24c920,_0x516bde){const _0x5989f8=a284_0x57cf,_0x79f09c=_0x24c920();while(!![]){try{const _0xdb3f70=parseInt(_0x5989f8(0xa9))/0x1+-parseInt(_0x5989f8(0xba))/0x2+parseInt(_0x5989f8(0xc2))/0x3+-parseInt(_0x5989f8(0xdf))/0x4+parseInt(_0x5989f8(0xac))/0x5*(parseInt(_0x5989f8(0xab))/0x6)+-parseInt(_0x5989f8(0xb1))/0x7*(parseInt(_0x5989f8(0xc9))/0x8)+parseInt(_0x5989f8(0xc5))/0x9*(parseInt(_0x5989f8(0xd4))/0xa);if(_0xdb3f70===_0x516bde)break;else _0x79f09c['push'](_0x79f09c['shift']());}catch(_0x270cee){_0x79f09c['push'](_0x79f09c['shift']());}}}(a284_0x5f0d,0x95381));function a284_0x57cf(_0x14bb77,_0xaf68e5){_0x14bb77=_0x14bb77-0xa9;const _0x5f0d33=a284_0x5f0d();let _0x57cf7c=_0x5f0d33[_0x14bb77];return _0x57cf7c;}import a284_0x4ba0b0 from'winston';import a284_0x1c0096 from'node:fs';import a284_0x3fcc16 from'node:path';class Logger{['winstonLogger'];[a284_0x31b047(0xcd)];[a284_0x31b047(0xda)]='';constructor(){this['logFilePath']='';}[a284_0x31b047(0xae)](_0x6453e5){const _0x1892f2=a284_0x31b047;this[_0x1892f2(0xda)]=_0x6453e5;}[a284_0x31b047(0xce)](){const _0x5d81c3=a284_0x31b047,_0x3044ae=a284_0x3fcc16[_0x5d81c3(0xd1)](this[_0x5d81c3(0xcd)]);!a284_0x1c0096[_0x5d81c3(0xc7)](_0x3044ae)&&a284_0x1c0096[_0x5d81c3(0xd9)](_0x3044ae,{'recursive':!![]});const _0x5a5170=a284_0x4ba0b0[_0x5d81c3(0xb9)][_0x5d81c3(0xb7)](a284_0x4ba0b0['format'][_0x5d81c3(0xb6)](),a284_0x4ba0b0['format'][_0x5d81c3(0xbb)]({'stack':!![]}),a284_0x4ba0b0[_0x5d81c3(0xb9)][_0x5d81c3(0xcb)](_0x4d4cdc=>{const _0xd4cef8=_0x5d81c3,_0x1250e2={'timestamp':_0x4d4cdc['timestamp']||new Date()[_0xd4cef8(0xc0)](),'level':_0x4d4cdc[_0xd4cef8(0xad)]||_0xd4cef8(0xd0),'command':_0x4d4cdc['command']||_0xd4cef8(0xd5),'rawCommand':_0x4d4cdc[_0xd4cef8(0xcf)]||this[_0xd4cef8(0xda)]||undefined,'message':_0x4d4cdc['message']||'','duration':_0x4d4cdc[_0xd4cef8(0xbf)]||undefined,'details':_0x4d4cdc[_0xd4cef8(0xde)]||undefined};return JSON[_0xd4cef8(0xbc)](_0x1250e2);}));this[_0x5d81c3(0xc1)]=a284_0x4ba0b0['createLogger']({'level':_0x5d81c3(0xd0),'format':_0x5a5170,'transports':[new a284_0x4ba0b0[(_0x5d81c3(0xb4))][(_0x5d81c3(0xb3))]({'filename':this[_0x5d81c3(0xcd)],'level':_0x5d81c3(0xd0)})],'silent':![]}),a284_0x4ba0b0[_0x5d81c3(0xbd)]({'success':'green','error':_0x5d81c3(0xb0),'warn':_0x5d81c3(0xb5),'info':_0x5d81c3(0xd6)});}[a284_0x31b047(0xd3)](_0xfacad3){const _0x5a202e=a284_0x31b047;this[_0x5a202e(0xcd)]=a284_0x3fcc16['join'](_0xfacad3,'.lovrabet.log'),this[_0x5a202e(0xc1)]&&this['winstonLogger'][_0x5a202e(0xaa)](),this[_0x5a202e(0xce)]();}[a284_0x31b047(0xd0)](_0x5d9f87,_0x273cb3,_0x234d03){const _0x272ca5=a284_0x31b047;if(!this['logFilePath']||!this[_0x272ca5(0xc1)])return;this[_0x272ca5(0xc1)]['info'](_0x273cb3,{'command':_0x5d9f87,'details':_0x234d03});}[a284_0x31b047(0xaf)](_0x484602,_0x595a7b,_0x2d429b,_0x4ae76e){const _0x35e6be=a284_0x31b047;if(!this[_0x35e6be(0xcd)]||!this[_0x35e6be(0xc1)])return;this['winstonLogger'][_0x35e6be(0xd8)](_0x35e6be(0xd0),_0x595a7b,{'level':_0x35e6be(0xaf),'command':_0x484602,'duration':_0x2d429b,'details':_0x4ae76e});}[a284_0x31b047(0xb2)](_0x13b7e9,_0x7c775d,_0x1e18df){const _0x3007fb=a284_0x31b047;if(!this[_0x3007fb(0xcd)]||!this['winstonLogger'])return;this[_0x3007fb(0xc1)][_0x3007fb(0xb2)](_0x7c775d,{'command':_0x13b7e9,'details':_0x1e18df});}[a284_0x31b047(0xb8)](_0x364b68,_0x96beb7,_0x2f3d32){const _0x2db149=a284_0x31b047;if(!this[_0x2db149(0xcd)]||!this[_0x2db149(0xc1)])return;this['winstonLogger'][_0x2db149(0xb8)](_0x96beb7,{'command':_0x364b68,'details':_0x2f3d32});}async[a284_0x31b047(0xd7)](_0x393583,_0x2054a3,_0x242496){const _0x386703=a284_0x31b047,_0x530e7e=Date[_0x386703(0xc4)]();this[_0x386703(0xd0)](_0x393583,_0x386703(0xdc)+_0x2054a3);try{const _0x63ab40=await _0x242496(),_0x1c353f=Date[_0x386703(0xc4)]()-_0x530e7e;return this[_0x386703(0xaf)](_0x393583,_0x386703(0xdb)+_0x2054a3,_0x1c353f),_0x63ab40;}catch(_0x276934){const _0x2ded65=Date[_0x386703(0xc4)]()-_0x530e7e;this[_0x386703(0xb2)](_0x393583,_0x386703(0xc8)+_0x2054a3,{'error':_0x276934 instanceof Error?_0x276934['message']:String(_0x276934),'duration':_0x2ded65});throw _0x276934;}}[a284_0x31b047(0xca)](){const _0x4d048b=a284_0x31b047;try{if(!a284_0x1c0096[_0x4d048b(0xc7)](this['logFilePath']))return[];const _0x304d05=a284_0x1c0096['readFileSync'](this[_0x4d048b(0xcd)],_0x4d048b(0xc6));return _0x304d05[_0x4d048b(0xc3)]('\x0a')[_0x4d048b(0xd2)](_0x4c3d58=>_0x4c3d58['trim']())['map'](_0x2f091f=>JSON['parse'](_0x2f091f));}catch(_0x2f1c9b){return console[_0x4d048b(0xb8)](_0x4d048b(0xcc),_0x2f1c9b),[];}}['clearLogs'](){const _0x1eeec8=a284_0x31b047;try{a284_0x1c0096['existsSync'](this[_0x1eeec8(0xcd)])&&a284_0x1c0096['writeFileSync'](this['logFilePath'],'',_0x1eeec8(0xc6));}catch(_0x5568c6){console['warn'](_0x1eeec8(0xbe),_0x5568c6);}}[a284_0x31b047(0xdd)](){const _0x3a6a37=a284_0x31b047;return this[_0x3a6a37(0xc1)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ba250,_0x74687d){const _0x17752f=a285_0xe4b8,_0x32e12f=_0x1ba250();while(!![]){try{const _0xc6bf70=parseInt(_0x17752f(0x1b9))/0x1*(parseInt(_0x17752f(0x1b1))/0x2)+-parseInt(_0x17752f(0x1b7))/0x3+-parseInt(_0x17752f(0x1b2))/0x4*(-parseInt(_0x17752f(0x1b8))/0x5)+parseInt(_0x17752f(0x1bd))/0x6*(parseInt(_0x17752f(0x1b6))/0x7)+-parseInt(_0x17752f(0x1b3))/0x8*(parseInt(_0x17752f(0x1be))/0x9)+-parseInt(_0x17752f(0x1b4))/0xa*(-parseInt(_0x17752f(0x1ba))/0xb)+-parseInt(_0x17752f(0x1bc))/0xc;if(_0xc6bf70===_0x74687d)break;else _0x32e12f['push'](_0x32e12f['shift']());}catch(_0x3c134b){_0x32e12f['push'](_0x32e12f['shift']());}}}(a285_0x28f7,0xb8292));import{CliErrors}from'../errors.js';function a285_0xe4b8(_0x48c0ab,_0x29da77){_0x48c0ab=_0x48c0ab-0x1b1;const _0x28f708=a285_0x28f7();let _0xe4b8d3=_0x28f708[_0x48c0ab];return _0xe4b8d3;}export function parseJsonParams(_0x4ddc11){const _0x3db1b9=a285_0xe4b8;if(!_0x4ddc11)return undefined;let _0x454672;try{_0x454672=JSON['parse'](_0x4ddc11);}catch{throw CliErrors[_0x3db1b9(0x1bf)](_0x3db1b9(0x1bb)+_0x4ddc11);}if(!_0x454672||typeof _0x454672!==_0x3db1b9(0x1c0)||Array['isArray'](_0x454672))throw CliErrors[_0x3db1b9(0x1bf)]('--params\x20must\x20be\x20a\x20JSON\x20object',_0x3db1b9(0x1b5));return _0x454672;}function a285_0x28f7(){const _0x464f76=['913PYlmTq','Invalid\x20JSON\x20for\x20--params:\x20','16484076BvUxzs','204tvfqPt','111123ZvuTdM','validation','object','2743384PuDOwb','4GwZXVF','744jFrPbA','106360enVSTl','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','94101yTacBu','864012xpUJnb','4263640bsKkDI','1Utgsvs'];a285_0x28f7=function(){return _0x464f76;};return a285_0x28f7();}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a286_0x85a41f=a286_0x1fd8;(function(_0x3c7120,_0x4cada8){const _0x318afc=a286_0x1fd8,_0x15b5f7=_0x3c7120();while(!![]){try{const _0x5c8089=parseInt(_0x318afc(0xe2))/0x1*(-parseInt(_0x318afc(0xe4))/0x2)+parseInt(_0x318afc(0xde))/0x3*(-parseInt(_0x318afc(0xdd))/0x4)+parseInt(_0x318afc(0xd9))/0x5+parseInt(_0x318afc(0xdf))/0x6*(-parseInt(_0x318afc(0xd7))/0x7)+parseInt(_0x318afc(0xda))/0x8*(parseInt(_0x318afc(0xe1))/0x9)+parseInt(_0x318afc(0xe3))/0xa*(parseInt(_0x318afc(0xdb))/0xb)+-parseInt(_0x318afc(0xdc))/0xc*(parseInt(_0x318afc(0xe0))/0xd);if(_0x5c8089===_0x4cada8)break;else _0x15b5f7['push'](_0x15b5f7['shift']());}catch(_0x1b79a9){_0x15b5f7['push'](_0x15b5f7['shift']());}}}(a286_0x4edd,0xab249));function a286_0x1fd8(_0x53c211,_0xf092a1){_0x53c211=_0x53c211-0xd7;const _0x4eddcf=a286_0x4edd();let _0x1fd864=_0x4eddcf[_0x53c211];return _0x1fd864;}function a286_0x4edd(){const _0x106044=['4264316JKdDjr','3avHxpY','50766Eiuuxt','27287QTAtMV','540blabdq','2WgWcmk','7310pjiDNh','258326prFKEN','.cmd','105ksqOkK','platform','3752535ghnWWn','151888BVlhWw','16555riclpT','4788pLKprk'];a286_0x4edd=function(){return _0x106044;};return a286_0x4edd();}export const isWindows=process[a286_0x85a41f(0xd8)]==='win32';export function resolveNpmBin(_0x31349d){const _0x45bc41=a286_0x85a41f;return isWindows?_0x31349d+_0x45bc41(0xe5):_0x31349d;}
|
package/lib/utils/rules-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1e8136,_0x7e623b){const _0x5e6f83=a287_0x2661,_0x1bb59a=_0x1e8136();while(!![]){try{const _0xd0ab89=parseInt(_0x5e6f83(0x1e5))/0x1*(-parseInt(_0x5e6f83(0x1e9))/0x2)+-parseInt(_0x5e6f83(0x1e7))/0x3*(parseInt(_0x5e6f83(0x1e3))/0x4)+-parseInt(_0x5e6f83(0x1e1))/0x5*(-parseInt(_0x5e6f83(0x1e4))/0x6)+-parseInt(_0x5e6f83(0x1e6))/0x7+parseInt(_0x5e6f83(0x1da))/0x8+-parseInt(_0x5e6f83(0x1db))/0x9*(-parseInt(_0x5e6f83(0x1e2))/0xa)+-parseInt(_0x5e6f83(0x1ee))/0xb*(-parseInt(_0x5e6f83(0x1dc))/0xc);if(_0xd0ab89===_0x7e623b)break;else _0x1bb59a['push'](_0x1bb59a['shift']());}catch(_0x513719){_0x1bb59a['push'](_0x1bb59a['shift']());}}}(a287_0x5691,0x9eb66));import{existsSync,mkdirSync,readFileSync,writeFileSync}from'node:fs';import{dirname,join,resolve}from'node:path';import{fileURLToPath}from'node:url';function a287_0x5691(){const _0x3e3787=['1911102gUYMOA','string','2bhvfgb','本地模板文件不存在:\x20','CDN\x20请求失败:\x20','lovrabet_rules.mdc','utf-8','33XaKObR','lastUpdated','7944528iBTlFH','5126391dXPWSp','1767516XyQAFq','content','status','agents.md','statusText','5lfSrIh','10xQuFOI','4NZLUcR','1563162MPcJrA','752847NWypav','1575728ALneQu'];a287_0x5691=function(){return _0x3e3787;};return a287_0x5691();}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 _0x3aeebd=getTemplateBaseUrl();return _0x3aeebd+'/rules/rules.json';}const LOCAL_TEMPLATE_PATH=resolve(__dirname,'../../templates/rules/lovrabet_rules.mdc.tpl');export async function fetchRulesFromCDN(){const _0xa8aece=a287_0x2661,_0x4a5328=getRulesCdnUrl(),_0x942ade=await fetch(_0x4a5328,{'headers':{'Accept':'application/json'}});if(!_0x942ade['ok'])throw new Error(_0xa8aece(0x1eb)+_0x942ade[_0xa8aece(0x1de)]+'\x20'+_0x942ade[_0xa8aece(0x1e0)]);const _0x5d85ac=await _0x942ade['json']();if(!_0x5d85ac[_0xa8aece(0x1dd)]||typeof _0x5d85ac[_0xa8aece(0x1dd)]!==_0xa8aece(0x1e8))throw new Error('CDN\x20返回数据格式错误');return _0x5d85ac;}export async function getRulesContent(){const _0x33aa6e=a287_0x2661;try{const _0x34e0c4=await fetchRulesFromCDN();return _0x34e0c4[_0x33aa6e(0x1dd)];}catch{return readLocalTemplate();}}export function readLocalTemplate(){const _0x2a8c37=a287_0x2661;if(existsSync(LOCAL_TEMPLATE_PATH))return readFileSync(LOCAL_TEMPLATE_PATH,_0x2a8c37(0x1ed));throw new Error(_0x2a8c37(0x1ea)+LOCAL_TEMPLATE_PATH);}function a287_0x2661(_0x44d23e,_0x538718){_0x44d23e=_0x44d23e-0x1d9;const _0x5691cb=a287_0x5691();let _0x2661c5=_0x5691cb[_0x44d23e];return _0x2661c5;}export async function writeRulesFile(_0x45ca42){const _0x47419e=a287_0x2661,_0xe13f4f=await fetchRulesFromCDN()['catch'](()=>null);let _0x41fa68;_0xe13f4f?(_0x41fa68=_0xe13f4f[_0x47419e(0x1dd)],_0xe13f4f[_0x47419e(0x1d9)]&&(_0x41fa68=appendUpdateTime(_0x41fa68,_0xe13f4f[_0x47419e(0x1d9)]))):_0x41fa68=readLocalTemplate();const _0x879eb9=dirname(_0x45ca42);!existsSync(_0x879eb9)&&mkdirSync(_0x879eb9,{'recursive':!![]}),writeFileSync(_0x45ca42,_0x41fa68,_0x47419e(0x1ed));}export async function copyRulesToCursor(_0x27edb5){const _0x10cc8c=a287_0x2661,_0x505280=join(_0x27edb5,'.cursor/rules'),_0x35c4fe=join(_0x505280,_0x10cc8c(0x1ec));if(existsSync(_0x35c4fe))return![];return await writeRulesFile(_0x35c4fe),!![];}export async function copyRulesToAgentsMd(_0x2254ba){const _0x2e8c05=a287_0x2661,_0x51e83d=join(_0x2254ba,_0x2e8c05(0x1df));if(existsSync(_0x51e83d))return![];return await writeRulesFile(_0x51e83d),!![];}
|
package/lib/utils/sleep.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export function sleep(
|
|
1
|
+
export function sleep(_0x3d8ce1){return new Promise(_0x410dba=>setTimeout(_0x410dba,_0x3d8ce1));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a289_0x433a90=a289_0x41f5;(function(_0x112a2d,_0x48e317){const _0x1297c5=a289_0x41f5,_0x5be978=_0x112a2d();while(!![]){try{const _0x53c784=parseInt(_0x1297c5(0x17e))/0x1*(parseInt(_0x1297c5(0x167))/0x2)+-parseInt(_0x1297c5(0x164))/0x3*(parseInt(_0x1297c5(0x144))/0x4)+parseInt(_0x1297c5(0x175))/0x5*(parseInt(_0x1297c5(0x148))/0x6)+-parseInt(_0x1297c5(0x160))/0x7*(-parseInt(_0x1297c5(0x177))/0x8)+-parseInt(_0x1297c5(0x180))/0x9*(parseInt(_0x1297c5(0x181))/0xa)+parseInt(_0x1297c5(0x156))/0xb*(parseInt(_0x1297c5(0x176))/0xc)+parseInt(_0x1297c5(0x14e))/0xd*(parseInt(_0x1297c5(0x150))/0xe);if(_0x53c784===_0x48e317)break;else _0x5be978['push'](_0x5be978['shift']());}catch(_0x1b489f){_0x5be978['push'](_0x5be978['shift']());}}}(a289_0x367b,0x47353));import a289_0x4a3863 from'node:fs';import a289_0x9098b3 from'node:path';import{logger}from'../utils/logger.js';function a289_0x41f5(_0x1abb0f,_0x2d36b9){_0x1abb0f=_0x1abb0f-0x13b;const _0x367b88=a289_0x367b();let _0x41f551=_0x367b88[_0x1abb0f];return _0x41f551;}function a289_0x367b(){const _0x44e475=['toISOString','6746wtvJHL','.json','replaceContent','split','getFullYear','replace','success','promises','开始处理模板内容替换','alias:\x20\x22','getDate','replaceApiContent','name','join','1295QsphnG','335892EsbcpX','56hRHUSh','isFile','template','toUpperCase','writeFile','datasetCode:\x20\x22','getMinutes','50mRFDQW','info','2268927EOPMfq','10aVoOvR','mkdir','.css','toLowerCase','readFile','YourModel','now','slice','.ts','datasetCode','567244vDKhSb','.jsx','\x0a\x20\x20\x20\x20{\x20','includes','9726BXntYY','message','map','.tsx','.scss','.md','31655jhWTtH','tableName','238JzKXUE','processFile','.js','.tpl','toDisplayTitle','toComponentName','33QIyVee','padStart','pad','name:\x20\x22','error','endsWith','alias','getHours','formatLocalTimestamp','utf8','255346EDtGpH','copyFile','processDirectory','api','9RUkACR','pop'];a289_0x367b=function(){return _0x44e475;};return a289_0x367b();}import{getCliVersion}from'../utils/version.js';const CLI_VERSION=getCliVersion();export class TemplateReplacer{static[a289_0x433a90(0x158)](_0x5eea71){const _0x11105e=a289_0x433a90;return String(_0x5eea71)[_0x11105e(0x157)](0x2,'0');}static[a289_0x433a90(0x15e)](_0xe2738e){const _0x4823be=a289_0x433a90,_0x2db74a=_0xe2738e[_0x4823be(0x16b)](),_0x261127=this[_0x4823be(0x158)](_0xe2738e['getMonth']()+0x1),_0x4ee94f=this['pad'](_0xe2738e[_0x4823be(0x171)]()),_0x1b813d=this['pad'](_0xe2738e[_0x4823be(0x15d)]()),_0x409427=this['pad'](_0xe2738e[_0x4823be(0x17d)]()),_0x13e954=this[_0x4823be(0x158)](_0xe2738e['getSeconds']());return{'createdAt':_0x2db74a+'-'+_0x261127+'-'+_0x4ee94f+'\x20'+_0x1b813d+':'+_0x409427+':'+_0x13e954,'createdDate':_0x2db74a+'-'+_0x261127+'-'+_0x4ee94f,'createdTime':_0x1b813d+':'+_0x409427+':'+_0x13e954};}static[a289_0x433a90(0x155)](_0x2b1dd9){const _0x4c52e=a289_0x433a90,_0x1bffd7=_0x2b1dd9['split']('/')[_0x4c52e(0x165)]()||_0x2b1dd9;return _0x1bffd7[_0x4c52e(0x16a)]('-')[_0x4c52e(0x14a)](_0x59be06=>_0x59be06['charAt'](0x0)[_0x4c52e(0x17a)]()+_0x59be06['slice'](0x1)[_0x4c52e(0x13d)]())[_0x4c52e(0x174)]('');}static['toDisplayTitle'](_0x5b2d79){const _0x2b7fec=a289_0x433a90,_0xa910af=_0x5b2d79[_0x2b7fec(0x16a)]('/')[_0x2b7fec(0x165)]()||_0x5b2d79;return _0xa910af['split']('-')[_0x2b7fec(0x14a)](_0xf80fe6=>_0xf80fe6['charAt'](0x0)[_0x2b7fec(0x17a)]()+_0xf80fe6[_0x2b7fec(0x141)](0x1)[_0x2b7fec(0x13d)]())[_0x2b7fec(0x174)]('\x20');}static[a289_0x433a90(0x169)](_0x20f3ad,_0xb70529,_0x2900f8){const _0x1e8a73=a289_0x433a90,_0x365b81=this[_0x1e8a73(0x155)](_0xb70529),_0x252b28=this[_0x1e8a73(0x154)](_0xb70529),{createdAt:_0x1836d3,createdDate:_0x21cba3,createdTime:_0x1cb492}=this[_0x1e8a73(0x15e)](new Date());let _0x3a0528=_0x20f3ad[_0x1e8a73(0x16c)](/\{CliVersion\}/g,CLI_VERSION)['replace'](/\{ComponentName\}/g,_0x365b81)[_0x1e8a73(0x16c)](/\{DisplayTitle\}/g,_0x252b28)['replace'](/\{PageName\}/g,_0xb70529)[_0x1e8a73(0x16c)](/\{TemplateName\}/g,_0x2900f8)[_0x1e8a73(0x16c)](/\{CreatedAt\}/g,_0x1836d3)[_0x1e8a73(0x16c)](/\{CreatedDate\}/g,_0x21cba3)[_0x1e8a73(0x16c)](/\{CreatedTime\}/g,_0x1cb492);return _0x3a0528;}static[a289_0x433a90(0x172)](_0xf5c531,_0x4c9054,_0x7d4064,_0xa28496,_0x512ba1,_0x586040,_0x4c8d88,_0x59c236){const _0x1eec1a=a289_0x433a90,_0x47ed3a=new Date(),_0x523a16=_0x47ed3a[_0x1eec1a(0x166)](),_0xa5da6f=_0x7d4064['map'](_0x3d926d=>{const _0xea9ea5=_0x1eec1a,_0x20ce40=[_0xea9ea5(0x17c)+_0x3d926d[_0xea9ea5(0x143)]+'\x22','tableName:\x20\x22'+_0x3d926d[_0xea9ea5(0x14f)]+'\x22',_0xea9ea5(0x159)+_0x3d926d[_0xea9ea5(0x173)]+'\x22'];return _0x3d926d[_0xea9ea5(0x15c)]&&_0x20ce40['push'](_0xea9ea5(0x170)+_0x3d926d[_0xea9ea5(0x15c)]+'\x22'),_0xea9ea5(0x146)+_0x20ce40['join'](',\x20')+'\x20},';})['join'](''),_0x1f85ca=_0xa28496||_0x7d4064[0x0]?.[_0x1eec1a(0x15c)]||_0x1eec1a(0x13f);let _0x51f566=_0xf5c531['replace'](/\{AppCode\}/g,_0x4c9054)['replace'](/\{ModelConfigs\}/g,_0xa5da6f)['replace'](/\{ExampleModelName\}/g,_0x1f85ca)['replace'](/\{ApiFileName\}/g,_0x512ba1||_0x1eec1a(0x163))[_0x1eec1a(0x16c)](/\{ConfigName\}/g,_0x586040||'default')[_0x1eec1a(0x16c)](/\{ClientConfigParam\}/g,_0x4c8d88||'')[_0x1eec1a(0x16c)](/\{VarPrefix\}/g,_0x59c236||'LOVRABET')[_0x1eec1a(0x16c)](/\{CreatedAt\}/g,_0x523a16);return _0x51f566;}static async['processTemplate'](_0x43fc4d,_0x4636e0,_0x340c9e,_0x4e0a5b,_0x322cf1=!![]){const _0x462594=a289_0x433a90,_0x1ad73a=Date[_0x462594(0x140)]();try{_0x322cf1&&logger[_0x462594(0x17f)](_0x462594(0x179),_0x462594(0x16f),{'templatePath':_0x43fc4d,'targetPath':_0x4636e0,'pageName':_0x340c9e,'templateName':_0x4e0a5b});await a289_0x4a3863[_0x462594(0x16e)]['mkdir'](_0x4636e0,{'recursive':!![]}),await this['processDirectory'](_0x43fc4d,_0x4636e0,_0x340c9e,_0x4e0a5b);if(_0x322cf1){const _0x27d25a=Date[_0x462594(0x140)]()-_0x1ad73a;logger[_0x462594(0x16d)](_0x462594(0x179),'模板内容替换完成',_0x27d25a,{'pageName':_0x340c9e,'templateName':_0x4e0a5b});}}catch(_0xc9c8ee){if(_0x322cf1){const _0xe25ada=Date[_0x462594(0x140)]()-_0x1ad73a;logger[_0x462594(0x15a)](_0x462594(0x179),'模板内容替换失败',{'templatePath':_0x43fc4d,'targetPath':_0x4636e0,'pageName':_0x340c9e,'templateName':_0x4e0a5b,'error':_0xc9c8ee instanceof Error?_0xc9c8ee[_0x462594(0x149)]:String(_0xc9c8ee),'duration':_0xe25ada});}throw _0xc9c8ee;}}static async[a289_0x433a90(0x162)](_0x43c42f,_0x7fe9c7,_0x3fbd4c,_0xac66ae){const _0x29c3e3=a289_0x433a90,_0x4a26e2=await a289_0x4a3863[_0x29c3e3(0x16e)]['readdir'](_0x43c42f,{'withFileTypes':!![]});for(const _0x501d44 of _0x4a26e2){const _0x4cba12=a289_0x9098b3[_0x29c3e3(0x174)](_0x43c42f,_0x501d44['name']);let _0x2c2d4c=a289_0x9098b3[_0x29c3e3(0x174)](_0x7fe9c7,_0x501d44[_0x29c3e3(0x173)]);_0x501d44[_0x29c3e3(0x173)][_0x29c3e3(0x15b)](_0x29c3e3(0x153))&&(_0x2c2d4c=a289_0x9098b3[_0x29c3e3(0x174)](_0x7fe9c7,_0x501d44[_0x29c3e3(0x173)][_0x29c3e3(0x16c)](/\.tpl$/,'')));if(_0x501d44['isDirectory']())await a289_0x4a3863[_0x29c3e3(0x16e)][_0x29c3e3(0x13b)](_0x2c2d4c,{'recursive':!![]}),await this[_0x29c3e3(0x162)](_0x4cba12,_0x2c2d4c,_0x3fbd4c,_0xac66ae);else _0x501d44[_0x29c3e3(0x178)]()&&await this[_0x29c3e3(0x151)](_0x4cba12,_0x2c2d4c,_0x3fbd4c,_0xac66ae);}}static async[a289_0x433a90(0x151)](_0x47d330,_0x1d1212,_0x33bdf3,_0x1a4bdd){const _0x3f19cc=a289_0x433a90,_0x344e9a=a289_0x9098b3['extname'](_0x47d330)[_0x3f19cc(0x13d)]();_0x47d330[_0x3f19cc(0x15b)](_0x3f19cc(0x153))&&(_0x1d1212=_0x1d1212[_0x3f19cc(0x16c)](/\.tpl$/,''));const _0x41185e=[_0x3f19cc(0x14b),_0x3f19cc(0x142),_0x3f19cc(0x145),_0x3f19cc(0x152),_0x3f19cc(0x168),_0x3f19cc(0x14d),_0x3f19cc(0x13c),_0x3f19cc(0x14c),_0x3f19cc(0x153)];if(_0x41185e[_0x3f19cc(0x147)](_0x344e9a)||_0x47d330[_0x3f19cc(0x15b)]('.tpl')){const _0x41a603=await a289_0x4a3863[_0x3f19cc(0x16e)][_0x3f19cc(0x13e)](_0x47d330,_0x3f19cc(0x15f)),_0x5075dd=this[_0x3f19cc(0x169)](_0x41a603,_0x33bdf3,_0x1a4bdd);await a289_0x4a3863[_0x3f19cc(0x16e)][_0x3f19cc(0x17b)](_0x1d1212,_0x5075dd,'utf8');}else await a289_0x4a3863[_0x3f19cc(0x16e)][_0x3f19cc(0x161)](_0x47d330,_0x1d1212);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x107409,_0x1d40dc){const _0x2ef64e=a290_0x53a3,_0x44a63d=_0x107409();while(!![]){try{const _0x218f29=-parseInt(_0x2ef64e(0x1f8))/0x1*(parseInt(_0x2ef64e(0x208))/0x2)+parseInt(_0x2ef64e(0x1fc))/0x3+-parseInt(_0x2ef64e(0x203))/0x4+parseInt(_0x2ef64e(0x20f))/0x5*(parseInt(_0x2ef64e(0x1fb))/0x6)+parseInt(_0x2ef64e(0x200))/0x7+-parseInt(_0x2ef64e(0x20d))/0x8+parseInt(_0x2ef64e(0x204))/0x9;if(_0x218f29===_0x1d40dc)break;else _0x44a63d['push'](_0x44a63d['shift']());}catch(_0x509e66){_0x44a63d['push'](_0x44a63d['shift']());}}}(a290_0x59e0,0x60b5c));import{mkdir,readFile,writeFile}from'node:fs/promises';import{homedir}from'node:os';import{dirname,join}from'node:path';import a290_0x17950e from'semver';import{CLI_BIN_NAME,NPM_PACKAGE_NAME}from'../constant/cli.js';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{getCliVersion}from'../utils/version.js';const UPDATE_CHECK_TTL_MS=0xc*0x3c*0x3c*0x3e8,UPDATE_NOTICE_TTL_MS=0x18*0x3c*0x3c*0x3e8;function isUpdateNoticeDisabled(){const _0xdbf91d=a290_0x53a3,_0xefae71=process.env.RABETBASE_NO_UPDATE_NOTICE?.['trim']()[_0xdbf91d(0x1f5)]();return _0xefae71==='1'||_0xefae71===_0xdbf91d(0x210)||_0xefae71===_0xdbf91d(0x207);}function a290_0x59e0(){const _0xb70ad2=['13ppVapR','\x20available,\x20current\x20','\x20update','6kGseXN','967443cEdqGU','rabetbase-cli','valid','update-check.json','3175494AmAIIx',',\x20run:\x20','now','1826436XJzKdh','6633306qEvoDs','trim','/v/','yes','120374ZVvLXQ','stringify','object','stableVersion','checkedAt','5354000iiknco','gte','3956285MQYcLv','true','https://www.npmjs.com/package/','utf8','number','toLowerCase','latest','.cache'];a290_0x59e0=function(){return _0xb70ad2;};return a290_0x59e0();}function cacheRoot(){const _0x1a3c71=a290_0x53a3;return process.env.XDG_CACHE_HOME||process.env.LOCALAPPDATA||join(homedir(),_0x1a3c71(0x1f7));}export function getUpdateNoticeCachePath(){const _0x1b0119=a290_0x53a3;return join(cacheRoot(),_0x1b0119(0x1fd),_0x1b0119(0x1ff));}async function readUpdateNoticeCache(){const _0x1c22a1=a290_0x53a3;try{const _0x245005=await readFile(getUpdateNoticeCachePath(),_0x1c22a1(0x212)),_0x2d3c0f=JSON['parse'](_0x245005);if(!_0x2d3c0f||typeof _0x2d3c0f!==_0x1c22a1(0x20a))return{};return _0x2d3c0f;}catch{return{};}}async function writeUpdateNoticeCache(_0xab0d86){const _0x465656=a290_0x53a3;try{const _0x479197=getUpdateNoticeCachePath();await mkdir(dirname(_0x479197),{'recursive':!![]}),await writeFile(_0x479197,JSON[_0x465656(0x209)](_0xab0d86,null,0x2)+'\x0a',_0x465656(0x212));}catch{}}function a290_0x53a3(_0x49bf64,_0x2e9b46){_0x49bf64=_0x49bf64-0x1f4;const _0x59e032=a290_0x59e0();let _0x53a39d=_0x59e032[_0x49bf64];return _0x53a39d;}function isFreshCheck(_0x44fbb3,_0x4fc882){const _0x3ee912=a290_0x53a3;return typeof _0x44fbb3['checkedAt']===_0x3ee912(0x1f4)&&_0x4fc882-_0x44fbb3[_0x3ee912(0x20c)]<UPDATE_CHECK_TTL_MS;}function isRecentlyNotified(_0x40fb6c,_0xea2149,_0x30169c){const _0x2aef0a=a290_0x53a3;return _0x40fb6c['lastNotifiedVersion']===_0xea2149&&typeof _0x40fb6c['lastNotifiedAt']===_0x2aef0a(0x1f4)&&_0x30169c-_0x40fb6c['lastNotifiedAt']<UPDATE_NOTICE_TTL_MS;}export function buildNpmVersionUrl(_0x1457e8){const _0x794cf1=a290_0x53a3;return _0x794cf1(0x211)+NPM_PACKAGE_NAME+_0x794cf1(0x206)+_0x1457e8;}export async function resolveLatestUpdateNotice(){const _0x535910=a290_0x53a3;if(isUpdateNoticeDisabled())return null;try{const _0x59f028=Date[_0x535910(0x202)](),_0x1d5e99=getCliVersion(),_0x4acab6=await readUpdateNoticeCache();let _0x74be8=isFreshCheck(_0x4acab6,_0x59f028)?_0x4acab6[_0x535910(0x1f6)]?.[_0x535910(0x205)]():undefined;if(!_0x74be8&&!isFreshCheck(_0x4acab6,_0x59f028)){const _0x4ca10f=await getCliVersionPolicy();_0x74be8=_0x4ca10f?.[_0x535910(0x20b)]?.['trim']()||undefined,await writeUpdateNoticeCache({..._0x4acab6,'checkedAt':_0x59f028,'latest':_0x74be8,'failed':!_0x74be8});}if(!_0x74be8||!a290_0x17950e['valid'](_0x1d5e99)||!a290_0x17950e[_0x535910(0x1fe)](_0x74be8))return null;if(a290_0x17950e[_0x535910(0x20e)](_0x1d5e99,_0x74be8))return null;if(isRecentlyNotified(_0x4acab6,_0x74be8,_0x59f028))return null;const _0x444a21=CLI_BIN_NAME+_0x535910(0x1fa);return await writeUpdateNoticeCache({..._0x4acab6,'checkedAt':isFreshCheck(_0x4acab6,_0x59f028)?_0x4acab6[_0x535910(0x20c)]:_0x59f028,'latest':_0x74be8,'failed':![],'lastNotifiedVersion':_0x74be8,'lastNotifiedAt':_0x59f028}),{'command':_0x444a21,'current':_0x1d5e99,'latest':_0x74be8,'url':buildNpmVersionUrl(_0x74be8),'message':CLI_BIN_NAME+'\x20'+_0x74be8+_0x535910(0x1f9)+_0x1d5e99+_0x535910(0x201)+_0x444a21};}catch{return null;}}
|