@lovrabet/rabetbase-cli 2.5.1-beta.4 → 2.5.1-beta.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/README.md +75 -1
- 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/api/generate-sdk-config-file.d.ts +0 -1
- package/lib/api/generate-sdk-config-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.d.ts +2 -0
- 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/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +2 -0
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/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-restore.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/dataset/user-deleted-field-list.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/table-diff-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/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/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/search.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/menu/visibility-update.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/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.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/restore.js +1 -1
- package/lib/commands/page/shared.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.d.ts +1 -0
- 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/domain-routing-sync.d.ts +2 -0
- package/lib/commands/project/domain-routing-sync.js +1 -0
- 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/rule/get.d.ts +2 -0
- package/lib/commands/rule/get.js +1 -0
- package/lib/commands/rule/index.d.ts +2 -0
- package/lib/commands/rule/index.js +1 -0
- package/lib/commands/rule/list.d.ts +2 -0
- package/lib/commands/rule/list.js +1 -0
- package/lib/commands/rule/set.d.ts +2 -0
- package/lib/commands/rule/set.js +1 -0
- package/lib/commands/rule/shared.d.ts +43 -0
- package/lib/commands/rule/shared.js +1 -0
- 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/deployment-sync.js +1 -1
- package/lib/config/domain-config.d.ts +37 -1
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.d.ts +27 -0
- package/lib/config/project-domain-routing.js +1 -0
- package/lib/config/schema.d.ts +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.d.ts +10 -4
- 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/region.d.ts +4 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +43 -49
- package/lib/constant/routing-profile.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.d.ts +2 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +37 -0
- 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.d.ts +0 -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/generated/official-routing.d.ts +83 -0
- package/lib/generated/official-routing.js +1 -0
- package/lib/generated/routing-contract.d.ts +9 -0
- package/lib/generated/routing-contract.js +1 -0
- 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/types/index.d.ts +0 -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/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 -1
- package/skills/rabetbase/SKILL.md +16 -13
- package/skills/rabetbase/guides/sdk-client-generation.md +10 -8
- package/skills/rabetbase/references/rabetbase-api-pull.md +16 -11
- package/skills/rabetbase/references/rabetbase-config.md +4 -4
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -1
- package/skills/rabetbase/references/rabetbase-init.md +32 -8
- package/skills/rabetbase/references/rabetbase-kb.md +7 -8
- package/skills/rabetbase/references/rabetbase-project-create.md +33 -8
- package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +28 -0
- package/skills/rabetbase/references/rabetbase-rule.md +49 -0
- package/skills/rabetbase.manifest.json +5 -3
- package/lib/config/project-routing.d.ts +0 -30
- package/lib/config/project-routing.js +0 -1
- package/lib/core/kb-search-client.d.ts +0 -30
- package/lib/core/kb-search-client.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a283_0x14efab=a283_0x9e48;(function(_0x210a8b,_0x21b7b1){const _0x27c17e=a283_0x9e48,_0x28f1b5=_0x210a8b();while(!![]){try{const _0x23062e=-parseInt(_0x27c17e(0x18b))/0x1*(-parseInt(_0x27c17e(0x199))/0x2)+-parseInt(_0x27c17e(0x180))/0x3*(parseInt(_0x27c17e(0x18a))/0x4)+parseInt(_0x27c17e(0x18e))/0x5+parseInt(_0x27c17e(0x17a))/0x6+parseInt(_0x27c17e(0x18d))/0x7+-parseInt(_0x27c17e(0x179))/0x8+-parseInt(_0x27c17e(0x185))/0x9;if(_0x23062e===_0x21b7b1)break;else _0x28f1b5['push'](_0x28f1b5['shift']());}catch(_0x4a1784){_0x28f1b5['push'](_0x28f1b5['shift']());}}}(a283_0x4fcc,0x2348a));import{existsSync,readFileSync}from'node:fs';function a283_0x4fcc(){const _0x5876c3=['version','unverifiable','reason','76509qEUDEz','present','skills','not-recorded','home','864063YaVekp','utf8','SKILL.md','number','message','44uMiSGC','56WkWldV','object','1384026DMRNqi','629105VhpVAm','unusable','lockFile','includes','.agents','globalSkillsDirs','\x22\x20but\x20no\x20SKILL.md\x20was\x20found\x20in\x20known\x20layouts\x20','map','\x20is\x20unreadable:\x20','parse','recorded','4016oojfiO','181208UaEFwN','646356IcQCrc','\x20records\x20\x22','\x20has\x20no\x20skills\x20map'];a283_0x4fcc=function(){return _0x5876c3;};return a283_0x4fcc();}import{homedir}from'node:os';function a283_0x9e48(_0x3e47db,_0xdbb02a){_0x3e47db=_0x3e47db-0x179;const _0x4fcc30=a283_0x4fcc();let _0x9e48ed=_0x4fcc30[_0x3e47db];return _0x9e48ed;}import{join}from'node:path';export const SKILL_LOCK_RELATIVE_PATH=join(a283_0x14efab(0x192),'.skill-lock.json');export const GLOBAL_SKILLS_DIR_RELATIVE_PATHS=[join('.agents',a283_0x14efab(0x182)),join('.claude',a283_0x14efab(0x182))];const SUPPORTED_LOCK_VERSIONS=[0x3];function readLockLookup(_0xe68f5b,_0x5534d1){const _0x343508=a283_0x14efab;if(!existsSync(_0xe68f5b))return{'kind':_0x343508(0x183)};let _0x30ffb1;try{_0x30ffb1=JSON[_0x343508(0x197)](readFileSync(_0xe68f5b,_0x343508(0x186)));}catch(_0x5769a0){return{'kind':'unusable','reason':_0xe68f5b+_0x343508(0x196)+_0x5769a0[_0x343508(0x189)]};}const _0xb68535=_0x30ffb1;if(typeof _0xb68535?.[_0x343508(0x17d)]!==_0x343508(0x188)||!SUPPORTED_LOCK_VERSIONS[_0x343508(0x191)](_0xb68535[_0x343508(0x17d)]))return{'kind':_0x343508(0x18f),'reason':_0xe68f5b+'\x20uses\x20unsupported\x20version\x20'+String(_0xb68535?.['version'])};if(!_0xb68535['skills']||typeof _0xb68535[_0x343508(0x182)]!==_0x343508(0x18c))return{'kind':_0x343508(0x18f),'reason':_0xe68f5b+_0x343508(0x17c)};return _0xb68535[_0x343508(0x182)][_0x5534d1]?{'kind':'recorded'}:{'kind':_0x343508(0x183)};}export function resolveInstalledSkill(_0x56c66b,_0x4b80fa){const _0x23e93c=a283_0x14efab,_0x1d75e6=_0x4b80fa?.[_0x23e93c(0x184)]??homedir(),_0x560fb2=_0x4b80fa?.[_0x23e93c(0x193)]??GLOBAL_SKILLS_DIR_RELATIVE_PATHS[_0x23e93c(0x195)](_0x57a8b2=>join(_0x1d75e6,_0x57a8b2)),_0x10984e=_0x4b80fa?.[_0x23e93c(0x190)]??join(_0x1d75e6,SKILL_LOCK_RELATIVE_PATH),_0x460bda=_0x560fb2['map'](_0x12ffcc=>join(_0x12ffcc,_0x56c66b,_0x23e93c(0x187))),_0x10b4be=_0x460bda['find'](_0x533195=>existsSync(_0x533195));if(_0x10b4be)return{'state':_0x23e93c(0x181),'path':_0x10b4be};const _0x3ef123=readLockLookup(_0x10984e,_0x56c66b);if(_0x3ef123['kind']===_0x23e93c(0x18f))return{'state':_0x23e93c(0x17e),'reason':_0x3ef123[_0x23e93c(0x17f)]};if(_0x3ef123['kind']===_0x23e93c(0x198))return{'state':'unverifiable','reason':_0x10984e+_0x23e93c(0x17b)+_0x56c66b+_0x23e93c(0x194)+('('+_0x460bda['join'](',\x20')+')')};return{'state':'absent','checked':_0x460bda};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4d2a9a,_0x1a80ae){const _0x221a4a=a284_0x50b8,_0x40fb5a=_0x4d2a9a();while(!![]){try{const _0x397103=-parseInt(_0x221a4a(0x18b))/0x1+-parseInt(_0x221a4a(0x18a))/0x2*(-parseInt(_0x221a4a(0x18f))/0x3)+parseInt(_0x221a4a(0x197))/0x4*(-parseInt(_0x221a4a(0x190))/0x5)+-parseInt(_0x221a4a(0x188))/0x6+-parseInt(_0x221a4a(0x194))/0x7*(-parseInt(_0x221a4a(0x191))/0x8)+parseInt(_0x221a4a(0x193))/0x9+parseInt(_0x221a4a(0x195))/0xa;if(_0x397103===_0x1a80ae)break;else _0x40fb5a['push'](_0x40fb5a['shift']());}catch(_0x4ed412){_0x40fb5a['push'](_0x40fb5a['shift']());}}}(a284_0x3b49,0xaa645));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';import{getCliVersion}from'../utils/version.js';function a284_0x3b49(){const _0x39efe5=['message','2gvfOkA','686650FentRr','some','error','command','2341530IqqTrj','61635SkQMMT','6001544zePgpd','durationMs','1542303rssSHe','7KTAIXi','13508070YxQVGk','service','164MbSSeg','6977370HGFMva'];a284_0x3b49=function(){return _0x39efe5;};return a284_0x3b49();}const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x16f33c){const _0x5401a5=a284_0x50b8;return SENSITIVE_PATTERNS[_0x5401a5(0x18c)](_0x5a2753=>_0x5a2753['test'](_0x16f33c));}function sanitizeFlags(_0x53f059){const _0x5948a8={};for(const [_0x2b11e8,_0x20f1f7]of Object['entries'](_0x53f059)){isSensitiveKey(_0x2b11e8)?_0x5948a8[_0x2b11e8]=_0x20f1f7!=null&&_0x20f1f7!==''?'[REDACTED]':_0x20f1f7:_0x5948a8[_0x2b11e8]=_0x20f1f7;}return _0x5948a8;}function a284_0x50b8(_0xed6b60,_0xfa2c22){_0xed6b60=_0xed6b60-0x188;const _0x3b492e=a284_0x3b49();let _0x50b8fc=_0x3b492e[_0xed6b60];return _0x50b8fc;}export async function reportCommandTrace(_0x5281e0){const _0x14e07b=a284_0x50b8;try{const _0x5980e0=sanitizeFlags(_0x5281e0['flags']);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x5281e0[_0x14e07b(0x196)],'command.name':_0x5281e0[_0x14e07b(0x18e)],'command.flags':JSON['stringify'](_0x5980e0),..._0x5281e0[_0x14e07b(0x192)]!=null?{'command.duration_ms':_0x5281e0[_0x14e07b(0x192)]}:{},..._0x5281e0[_0x14e07b(0x18d)]?{'command.error':_0x5281e0[_0x14e07b(0x18d)]instanceof Error?_0x5281e0[_0x14e07b(0x18d)][_0x14e07b(0x189)]:String(_0x5281e0['error'])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a285_0x2316(){var _0x893d82=['670CxGkzd','370650rOywfc','423cEnkkg','555sLIwrd','1077FkdMLr','938860wktugN','error','800424ICRGqy','service','2268slDISv','Failed\x20to\x20report\x20CLI\x20help\x20trace:','12020xDUHlD','697056MRNlqP'];a285_0x2316=function(){return _0x893d82;};return a285_0x2316();}(function(_0x52d1df,_0x53484b){var _0x2f2508=a285_0x3aed,_0xef1fc1=_0x52d1df();while(!![]){try{var _0x38023d=parseInt(_0x2f2508(0x19e))/0x1*(parseInt(_0x2f2508(0x19b))/0x2)+-parseInt(_0x2f2508(0x19f))/0x3*(parseInt(_0x2f2508(0x1a4))/0x4)+parseInt(_0x2f2508(0x1a0))/0x5+parseInt(_0x2f2508(0x1a2))/0x6+-parseInt(_0x2f2508(0x19c))/0x7+-parseInt(_0x2f2508(0x1a7))/0x8+parseInt(_0x2f2508(0x19d))/0x9*(-parseInt(_0x2f2508(0x1a6))/0xa);if(_0x38023d===_0x53484b)break;else _0xef1fc1['push'](_0xef1fc1['shift']());}catch(_0x578e42){_0xef1fc1['push'](_0xef1fc1['shift']());}}}(a285_0x2316,0x1a1dc));function a285_0x3aed(_0x567f1b,_0x2bbb72){_0x567f1b=_0x567f1b-0x19b;var _0x231604=a285_0x2316();var _0x3aed3c=_0x231604[_0x567f1b];return _0x3aed3c;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x28cfaa,_0x163d01){var _0x75a086=a285_0x3aed;try{await sendCliTraceLog({'spanName':'cli.help','logData':{'rabetbase.help.kind':_0x28cfaa,..._0x163d01?.['service']&&{'rabetbase.help.service':_0x163d01[_0x75a086(0x1a3)]}}});}catch(_0x504efa){console[_0x75a086(0x1a1)](_0x75a086(0x1a5),_0x504efa);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x229576,_0x56362f){const _0x2bf5a1=a286_0x4e09,_0x142845=_0x229576();while(!![]){try{const _0x12b09b=-parseInt(_0x2bf5a1(0x185))/0x1+parseInt(_0x2bf5a1(0x188))/0x2*(-parseInt(_0x2bf5a1(0x18a))/0x3)+-parseInt(_0x2bf5a1(0x18c))/0x4*(-parseInt(_0x2bf5a1(0x187))/0x5)+-parseInt(_0x2bf5a1(0x181))/0x6*(parseInt(_0x2bf5a1(0x191))/0x7)+-parseInt(_0x2bf5a1(0x183))/0x8+parseInt(_0x2bf5a1(0x186))/0x9*(-parseInt(_0x2bf5a1(0x182))/0xa)+parseInt(_0x2bf5a1(0x180))/0xb;if(_0x12b09b===_0x56362f)break;else _0x142845['push'](_0x142845['shift']());}catch(_0xf333ae){_0x142845['push'](_0x142845['shift']());}}}(a286_0x26ad,0x890c4));import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setServiceConfig,setUserContext}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{getConfigAppCode}from'../utils/config.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x3ab04b=a286_0x4e09,_0x3a4367=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0xe134f2=_0x3a4367?.['user'];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x3ab04b(0x18b):_0x3ab04b(0x184))}),setUserContext({'id':_0xe134f2?.['id'],'username':_0xe134f2?.[_0x3ab04b(0x18e)],'nickname':_0xe134f2?.[_0x3ab04b(0x18d)],'email':_0xe134f2?.[_0x3ab04b(0x189)],'tenantCode':_0xe134f2?.[_0x3ab04b(0x18f)]?.[_0x3ab04b(0x190)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x3a4367;}function a286_0x4e09(_0xfad47b,_0x405910){_0xfad47b=_0xfad47b-0x180;const _0x26adc1=a286_0x26ad();let _0x4e09c8=_0x26adc1[_0xfad47b];return _0x4e09c8;}function a286_0x26ad(){const _0x252450=['15uBQTmW','2FwEOxV','email','777099wfgNdu','daily','1016212zkiSTp','nickname','username','tenant','tenant_code','7wnwVuy','25869679iNKmyO','320232QHbZqt','30EzQUeq','2385200neaDeX','production','1042810ixEnRL','2697705EaGoYo'];a286_0x26ad=function(){return _0x252450;};return a286_0x26ad();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e7b2c,_0x5da277){const _0xfe0e01=a287_0x1d35,_0x4dd5af=_0x3e7b2c();while(!![]){try{const _0x4156ef=parseInt(_0xfe0e01(0x1be))/0x1*(-parseInt(_0xfe0e01(0x1c3))/0x2)+-parseInt(_0xfe0e01(0x1bb))/0x3+-parseInt(_0xfe0e01(0x1c4))/0x4*(-parseInt(_0xfe0e01(0x1b8))/0x5)+-parseInt(_0xfe0e01(0x1c1))/0x6+-parseInt(_0xfe0e01(0x1b9))/0x7+parseInt(_0xfe0e01(0x1ba))/0x8+-parseInt(_0xfe0e01(0x1c6))/0x9*(-parseInt(_0xfe0e01(0x1bc))/0xa);if(_0x4156ef===_0x5da277)break;else _0x4dd5af['push'](_0x4dd5af['shift']());}catch(_0x12b4b0){_0x4dd5af['push'](_0x4dd5af['shift']());}}}(a287_0x4c7f,0x63e3a));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;function a287_0x1d35(_0x3bf700,_0x13f2c0){_0x3bf700=_0x3bf700-0x1b8;const _0x4c7fb1=a287_0x4c7f();let _0x1d3538=_0x4c7fb1[_0x3bf700];return _0x1d3538;}export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x4990de=a287_0x1d35;process['once'](_0x4990de(0x1bd),()=>{void flushOtelNodeIfUsed();});const _0x479b6a=()=>{void flushOtelNodeIfUsed()['then'](()=>process['exit'](0x0));};process[_0x4990de(0x1c2)](_0x4990de(0x1bf),_0x479b6a),process['once'](_0x4990de(0x1c0),_0x479b6a);}export async function exitWithOtelShutdown(_0x2561a5){const _0x201375=a287_0x1d35;await flushOtelNodeIfUsed(),process[_0x201375(0x1c5)](_0x2561a5);}function a287_0x4c7f(){const _0x291b98=['10MeivWo','4bxKoVx','exit','9deKjaY','3603020gTtmTD','3600247oDMsNj','2138448HnGqgJ','2312562QUenvJ','16389430UfghcQ','beforeExit','146191YBiGEb','SIGINT','SIGTERM','1209462crvygq','once'];a287_0x4c7f=function(){return _0x291b98;};return a287_0x4c7f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x516161,_0x4631dd){const _0x45c7d6=a288_0x1d99,_0x52f7b5=_0x516161();while(!![]){try{const _0x331a3b=parseInt(_0x45c7d6(0x8e))/0x1+parseInt(_0x45c7d6(0x91))/0x2+-parseInt(_0x45c7d6(0x90))/0x3+-parseInt(_0x45c7d6(0x8f))/0x4+parseInt(_0x45c7d6(0x97))/0x5+parseInt(_0x45c7d6(0x9a))/0x6+-parseInt(_0x45c7d6(0x98))/0x7*(parseInt(_0x45c7d6(0x94))/0x8);if(_0x331a3b===_0x4631dd)break;else _0x52f7b5['push'](_0x52f7b5['shift']());}catch(_0x380c58){_0x52f7b5['push'](_0x52f7b5['shift']());}}}(a288_0x2f61,0x476fe));import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';function a288_0x1d99(_0x5a8f3f,_0xe4d408){_0x5a8f3f=_0x5a8f3f-0x8e;const _0x2f617e=a288_0x2f61();let _0x1d9984=_0x2f617e[_0x5a8f3f];return _0x1d9984;}import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME='rabetbase-cli';function a288_0x2f61(){const _0x19f29f=['563486TuDnvD','traceparent','1386120KfhNoQ','575291KyztKE','1896508tbHDOo','1373049ugzqSJ','456078RlNpPS','manual','logData','8RtlCPy','traceName','spanName','1352820acDNdp'];a288_0x2f61=function(){return _0x19f29f;};return a288_0x2f61();}export async function sendCliTraceLog(_0x5591b9){const _0x4a7453=a288_0x1d99;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x5591b9[_0x4a7453(0x95)]??DEFAULT_TRACE_NAME,'version':_0x5591b9['version']??getCliVersion(),'spanName':_0x5591b9[_0x4a7453(0x96)],'eventType':_0x4a7453(0x92),'logData':_0x5591b9[_0x4a7453(0x93)],..._0x5591b9[_0x4a7453(0x99)]&&{'traceparent':_0x5591b9[_0x4a7453(0x99)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a289_0x9254(_0x23cb69,_0x27c852){_0x23cb69=_0x23cb69-0x162;const _0x58a3f7=a289_0x58a3();let _0x92543a=_0x58a3f7[_0x23cb69];return _0x92543a;}const a289_0x358b9f=a289_0x9254;(function(_0x1fb4b5,_0x5e6bb0){const _0x4017e7=a289_0x9254,_0x42df15=_0x1fb4b5();while(!![]){try{const _0x45f3bd=parseInt(_0x4017e7(0x16f))/0x1+parseInt(_0x4017e7(0x166))/0x2+parseInt(_0x4017e7(0x16a))/0x3+-parseInt(_0x4017e7(0x16b))/0x4+parseInt(_0x4017e7(0x162))/0x5+-parseInt(_0x4017e7(0x16d))/0x6+-parseInt(_0x4017e7(0x16c))/0x7;if(_0x45f3bd===_0x5e6bb0)break;else _0x42df15['push'](_0x42df15['shift']());}catch(_0xcf53f9){_0x42df15['push'](_0x42df15['shift']());}}}(a289_0x58a3,0x5d820));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME='platform-issue-log-collect';export const PLATFORM_ISSUE_SPAN_NAME=a289_0x358b9f(0x169);function a289_0x58a3(){const _0x3fa15f=['sanitize','redactionCount','title','1340462Fioyqj','description','originalBytes','issue.log.collect','1535088dVOWEL','534992gmIeHR','5445993AkfGZc','1499064ygYsDP','join','327706QmJwjo','174830EYxxxI'];a289_0x58a3=function(){return _0x3fa15f;};return a289_0x58a3();}export async function sendPlatformIssueCollectLog(_0x5e5eae){const _0xa2c0bb=a289_0x358b9f;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x5e5eae[_0xa2c0bb(0x165)],'issue.description':_0x5e5eae[_0xa2c0bb(0x167)],..._0x5e5eae[_0xa2c0bb(0x163)]?{'issue.description_original_bytes':_0x5e5eae['sanitize'][_0xa2c0bb(0x168)],'issue.description_truncated':_0x5e5eae[_0xa2c0bb(0x163)]['truncated'],'issue.description_redactions':_0x5e5eae[_0xa2c0bb(0x163)][_0xa2c0bb(0x164)],'issue.description_redaction_kinds':_0x5e5eae['sanitize']['redactionKinds'][_0xa2c0bb(0x16e)](',')}:{}}});}
|
package/lib/types/index.d.ts
CHANGED
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a291_0xaf022b=a291_0x3137;(function(_0xcbb397,_0x4e707c){const _0x5bdf55=a291_0x3137,_0x475ebb=_0xcbb397();while(!![]){try{const _0x442db0=parseInt(_0x5bdf55(0x1d9))/0x1*(parseInt(_0x5bdf55(0x1e6))/0x2)+parseInt(_0x5bdf55(0x1cf))/0x3+-parseInt(_0x5bdf55(0x1ef))/0x4+-parseInt(_0x5bdf55(0x1de))/0x5+parseInt(_0x5bdf55(0x1fa))/0x6+-parseInt(_0x5bdf55(0x1d7))/0x7*(parseInt(_0x5bdf55(0x1d8))/0x8)+parseInt(_0x5bdf55(0x1da))/0x9*(parseInt(_0x5bdf55(0x1f6))/0xa);if(_0x442db0===_0x4e707c)break;else _0x475ebb['push'](_0x475ebb['shift']());}catch(_0x519551){_0x475ebb['push'](_0x475ebb['shift']());}}}(a291_0xee6c,0xce208));export const CORE_IDE_CONFIGS={'cursor':{'name':a291_0xaf022b(0x1e3),'description':'Cursor\x20IDE','folders':[a291_0xaf022b(0x1dc),a291_0xaf022b(0x1d3)],'files':[{'type':a291_0xaf022b(0x1ed),'path':'.cursor/skills/rabetbase.md'}]},'windsurf':{'name':a291_0xaf022b(0x1ea),'description':a291_0xaf022b(0x1e1),'folders':[a291_0xaf022b(0x1f5)],'files':[{'type':a291_0xaf022b(0x1ed),'path':a291_0xaf022b(0x1ec)}]},'claude':{'name':'Claude\x20Code','description':a291_0xaf022b(0x1e4),'folders':[a291_0xaf022b(0x1db)],'files':[{'type':a291_0xaf022b(0x1ed),'path':a291_0xaf022b(0x1e2)}]},'cline':{'name':'Cline','description':a291_0xaf022b(0x1dd),'folders':['.cline'],'files':[{'type':a291_0xaf022b(0x1ed),'path':'.cline/skills/lovrabet/SKILL.md'}]},'codex':{'name':'Codex','description':'Codex\x20IDE','folders':['.codex'],'files':[{'type':a291_0xaf022b(0x1ed),'path':a291_0xaf022b(0x1d0)}]},'opencode':{'name':a291_0xaf022b(0x1f2),'description':a291_0xaf022b(0x1ff),'folders':[a291_0xaf022b(0x1f4)],'files':[{'type':a291_0xaf022b(0x1ed),'path':a291_0xaf022b(0x1e8)}]},'qoder':{'name':a291_0xaf022b(0x1d6),'description':a291_0xaf022b(0x1d5),'folders':[a291_0xaf022b(0x1f8)],'files':[{'type':'file','path':a291_0xaf022b(0x1eb)},{'type':a291_0xaf022b(0x1ed),'path':'.qoder/skills/lovrabet/SKILL.md'}]},'codebuddy':{'name':a291_0xaf022b(0x1fb),'description':'CodeBuddy\x20IDE','folders':['.codebuddy'],'files':[{'type':a291_0xaf022b(0x1ed),'path':a291_0xaf022b(0x1ee)}]},'trae':{'name':a291_0xaf022b(0x1d2),'description':'Trae\x20IDE','folders':['.trae'],'files':[{'type':a291_0xaf022b(0x1ed),'path':a291_0xaf022b(0x1f0)}]}};function a291_0x3137(_0x98bbac,_0x816d48){_0x98bbac=_0x98bbac-0x1cf;const _0xee6ce8=a291_0xee6c();let _0x3137ef=_0xee6ce8[_0x98bbac];return _0x3137ef;}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':'Other\x20(generic\x20template)','description':a291_0xaf022b(0x1fe),'folders':[a291_0xaf022b(0x1f3)],'files':[{'type':a291_0xaf022b(0x1ed),'path':a291_0xaf022b(0x1df)}]},'antigravity':{'name':a291_0xaf022b(0x1fd),'description':a291_0xaf022b(0x1d1),'folders':[a291_0xaf022b(0x1f3)],'files':[{'type':a291_0xaf022b(0x1ed),'path':a291_0xaf022b(0x1df)}]}};export const CORE_IDE_LIST=['claude',a291_0xaf022b(0x1d4),a291_0xaf022b(0x1e9),'codex','cursor',a291_0xaf022b(0x1f1),a291_0xaf022b(0x1e5),a291_0xaf022b(0x1e7),'windsurf'];export const IDE_LIST=['antigravity',a291_0xaf022b(0x1e0),a291_0xaf022b(0x1d4),a291_0xaf022b(0x1e9),a291_0xaf022b(0x1fc),'cursor',a291_0xaf022b(0x1f1),a291_0xaf022b(0x1e5),a291_0xaf022b(0x1e7),a291_0xaf022b(0x1f7),'agent'];function a291_0xee6c(){const _0x467b53=['Cline\x20IDE','5953785rXvPKQ','.agent/skills/lovrabet/SKILL.md','claude','Windsurf\x20IDE','.claude/skills/lovrabet/SKILL.md','Cursor','Claude\x20Code','qoder','2738798nmQwjO','trae','.opencode/skills/lovrabet/SKILL.md','codebuddy','Windsurf','.qoder/rules/rabetbase.md','.windsurf/workflows/rabetbase.md','file','.codebuddy/skills/lovrabet/SKILL.md','5217656OJItRT','.trae/skills/lovrabet/SKILL.md','opencode','OpenCode','.agent','.opencode','.windsurf','1410tSctHz','windsurf','.qoder','cursor','7199172clcsTO','CodeBuddy','codex','Antigravity','Generic\x20template\x20fallback','OpenCode\x20IDE','4651728SCttvz','.codex/skills/lovrabet/SKILL.md','Antigravity\x20IDE','Trae','.cursor','cline','Qoder\x20IDE','Qoder','1683731CctvPo','40PexCeU','1RjsieX','26955vOXEvC','.claude','.cursorrules'];a291_0xee6c=function(){return _0x467b53;};return a291_0xee6c();}export const ALL_CORE_IDES=[a291_0xaf022b(0x1f9),a291_0xaf022b(0x1f7),a291_0xaf022b(0x1e0),'cline','codex',a291_0xaf022b(0x1f1),a291_0xaf022b(0x1e5),a291_0xaf022b(0x1e9),'trae'];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x360845,_0x38fd02){const _0x4223ca=a292_0x2aac,_0x46bb1f=_0x360845();while(!![]){try{const _0x1a9b93=-parseInt(_0x4223ca(0xfe))/0x1*(-parseInt(_0x4223ca(0xff))/0x2)+-parseInt(_0x4223ca(0xfc))/0x3*(parseInt(_0x4223ca(0xf8))/0x4)+parseInt(_0x4223ca(0xf9))/0x5*(-parseInt(_0x4223ca(0xf7))/0x6)+-parseInt(_0x4223ca(0xf4))/0x7*(parseInt(_0x4223ca(0xfd))/0x8)+-parseInt(_0x4223ca(0xf5))/0x9+parseInt(_0x4223ca(0xf6))/0xa+parseInt(_0x4223ca(0xfb))/0xb*(parseInt(_0x4223ca(0xfa))/0xc);if(_0x1a9b93===_0x38fd02)break;else _0x46bb1f['push'](_0x46bb1f['shift']());}catch(_0x3236d8){_0x46bb1f['push'](_0x46bb1f['shift']());}}}(a292_0x4dfd,0xb94f8));function a292_0x2aac(_0x289a95,_0x5a899b){_0x289a95=_0x289a95-0xf4;const _0x4dfda4=a292_0x4dfd();let _0x2aac4d=_0x4dfda4[_0x289a95];return _0x2aac4d;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a292_0x4dfd(){const _0x318c52=['21aeAQtV','8ZioWSz','12514pDIdfY','116tIszBD','6773319GFLjQP','11875599psqUvI','2968700QYczHf','5421378GtLYYA','662668QhkPlF','5oANDTj','60xQnion','8990762RScVEg'];a292_0x4dfd=function(){return _0x318c52;};return a292_0x4dfd();}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(_0x392ad1,_0x389445){const _0x3e494b=a293_0xe8e5,_0x5881fb=_0x392ad1();while(!![]){try{const _0x52d7d7=parseInt(_0x3e494b(0x124))/0x1*(-parseInt(_0x3e494b(0x127))/0x2)+-parseInt(_0x3e494b(0x12b))/0x3*(-parseInt(_0x3e494b(0x11e))/0x4)+-parseInt(_0x3e494b(0x120))/0x5+-parseInt(_0x3e494b(0x11f))/0x6+-parseInt(_0x3e494b(0x129))/0x7+parseInt(_0x3e494b(0x12d))/0x8+-parseInt(_0x3e494b(0x12e))/0x9*(-parseInt(_0x3e494b(0x128))/0xa);if(_0x52d7d7===_0x389445)break;else _0x5881fb['push'](_0x5881fb['shift']());}catch(_0xe07273){_0x5881fb['push'](_0x5881fb['shift']());}}}(a293_0x4138,0xcf0b3));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x2406a8=a293_0xe8e5,_0x45c094=getTemplateBaseUrl(),_0x497a01=[_0x45c094+'/config.json',_0x45c094+_0x2406a8(0x12a)];for(const _0x30450c of _0x497a01){try{const _0x355174=await fetch(_0x30450c,{'headers':{'Accept':_0x2406a8(0x121)}});if(!_0x355174['ok'])continue;const _0x11e48a=await _0x355174[_0x2406a8(0x126)]();if(!_0x11e48a[_0x2406a8(0x123)]?.['stableVersion']||!_0x11e48a['sdk']?.[_0x2406a8(0x122)]?.[_0x2406a8(0x125)])continue;return _0x11e48a;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;function a293_0xe8e5(_0x59586b,_0x3d21f8){_0x59586b=_0x59586b-0x11e;const _0x4138c3=a293_0x4138();let _0xe8e5e4=_0x4138c3[_0x59586b];return _0xe8e5e4;}const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x36c5a7=a293_0xe8e5,_0x18c003=Date[_0x36c5a7(0x12c)]();if(hasCachedConfig){const _0x20d2cc=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x18c003-cacheTime<_0x20d2cc)return cachedConfig;}const _0x5aa484=await fetchCdnConfig();return cachedConfig=_0x5aa484,cacheTime=_0x18c003,hasCachedConfig=!![],_0x5aa484;}function a293_0x4138(){const _0x47ddec=['now','11726928hOxYTa','2004399HQWSNj','12KEKpXG','6843402kWRUbE','6920795zYovMY','application/json','node','cli','47947ZTekpL','stableVersion','json','54xgHECM','130zpJzhG','9669912IwdjJa','/config/index.json','1687653RNGGSz'];a293_0x4138=function(){return _0x47ddec;};return a293_0x4138();}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a294_0x56254a=a294_0x350e;(function(_0x379aee,_0x2c2794){const _0x524bd2=a294_0x350e,_0x465bdb=_0x379aee();while(!![]){try{const _0x546bb9=-parseInt(_0x524bd2(0x105))/0x1*(parseInt(_0x524bd2(0x114))/0x2)+-parseInt(_0x524bd2(0x109))/0x3+parseInt(_0x524bd2(0x107))/0x4+parseInt(_0x524bd2(0x116))/0x5+parseInt(_0x524bd2(0x11b))/0x6*(-parseInt(_0x524bd2(0x118))/0x7)+-parseInt(_0x524bd2(0x11d))/0x8*(parseInt(_0x524bd2(0x11e))/0x9)+parseInt(_0x524bd2(0x113))/0xa;if(_0x546bb9===_0x2c2794)break;else _0x465bdb['push'](_0x465bdb['shift']());}catch(_0x42f7fd){_0x465bdb['push'](_0x465bdb['shift']());}}}(a294_0x4b2f,0x323f9));import a294_0x26eb15 from'node:fs';import a294_0x44518e from'node:path';import a294_0x31f4ec from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a294_0x56254a(0x115);function isNonNumericVersion(_0x18a8e0){const _0x2d41c7=a294_0x56254a,_0x494021=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x494021[_0x2d41c7(0x11c)](_0x31af=>_0x31af[_0x2d41c7(0x103)](_0x18a8e0));}function a294_0x350e(_0x27d3f2,_0x44debe){_0x27d3f2=_0x27d3f2-0xfa;const _0x4b2f1d=a294_0x4b2f();let _0x350eb0=_0x4b2f1d[_0x27d3f2];return _0x350eb0;}function getInstalledVersion(_0x424528,_0x2a0715){const _0x3c5f4c=a294_0x56254a;try{const _0x5c154c=a294_0x44518e[_0x3c5f4c(0x121)](_0x424528,'node_modules',_0x2a0715,'package.json');if(a294_0x26eb15[_0x3c5f4c(0xfb)](_0x5c154c)){const _0x2c7aa4=JSON[_0x3c5f4c(0x117)](a294_0x26eb15['readFileSync'](_0x5c154c,_0x3c5f4c(0x10d)));return _0x2c7aa4['version']||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x1d8820=a294_0x56254a;try{const _0x54b1d4=await getCdnConfig();return _0x54b1d4?.[_0x1d8820(0x11a)]?.[_0x1d8820(0x112)]?.['stableVersion']||null;}catch{return null;}}async function getSdkPackageName(){const _0x3a3789=a294_0x56254a;try{const _0x4e802c=await getCdnConfig();return _0x4e802c?.['sdk']?.[_0x3a3789(0x112)]?.[_0x3a3789(0x11f)]||'@lovrabet/sdk';}catch{return _0x3a3789(0x10a);}}export async function checkSdkVersion(_0x2e4815){const _0x2a015d=a294_0x56254a,_0x1d5988=a294_0x44518e[_0x2a015d(0x121)](_0x2e4815,'package.json'),[_0x4b94c4,_0x4c06f8]=await Promise[_0x2a015d(0xfa)]([getSdkStableVersion(),getSdkPackageName()]),_0x129d32=_0x4b94c4||FALLBACK_MIN_SDK_VERSION;if(!a294_0x26eb15['existsSync'](_0x1d5988))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x129d32,'packageName':_0x4c06f8,'stableVersion':_0x4b94c4};try{const _0x55c543=JSON[_0x2a015d(0x117)](a294_0x26eb15['readFileSync'](_0x1d5988,_0x2a015d(0x106))),_0x4894c3=_0x55c543[_0x2a015d(0x10b)]||{},_0x5eb4dd=_0x55c543[_0x2a015d(0x102)]||{},_0xb7bcf9=_0x4894c3[_0x4c06f8]||_0x5eb4dd[_0x4c06f8];if(!_0xb7bcf9)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x129d32,'packageName':_0x4c06f8,'stableVersion':_0x4b94c4};let _0x5e70ea=getInstalledVersion(_0x2e4815,_0x4c06f8);!_0x5e70ea&&(_0x5e70ea=_0xb7bcf9);if(isNonNumericVersion(_0xb7bcf9))return{'installed':!![],'version':_0x5e70ea,'needsUpgrade':![],'minVersion':_0x129d32,'packageName':_0x4c06f8,'stableVersion':_0x4b94c4};const _0x43f2f8=a294_0x31f4ec['coerce'](_0x5e70ea),_0x31d18d=a294_0x31f4ec[_0x2a015d(0x10e)](_0x129d32),_0x4ef6fc=_0x43f2f8&&_0x31d18d?a294_0x31f4ec['lt'](_0x43f2f8,_0x31d18d):![];return{'installed':!![],'version':_0x5e70ea,'needsUpgrade':_0x4ef6fc,'minVersion':_0x129d32,'packageName':_0x4c06f8,'stableVersion':_0x4b94c4};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x129d32,'packageName':_0x4c06f8,'stableVersion':_0x4b94c4};}}function a294_0x4b2f(){const _0x407b7c=['2429928TxBfqS','9lsUgwY','packageName','\x20\x20\x20Stable\x20version:\x20','join','all','existsSync','\x1b[33m','↪\x20SDK\x20update\x20available','version','readFileSync','minVersion','latest','devDependencies','test','\x20\x20\x20Upgrade\x20command:\x20','8MrQyPV','utf8','1208908qBSGMd','package.json','831888CvFuDd','@lovrabet/sdk','dependencies','\x1b[0m','utf-8','coerce','\x20\x20\x20Current\x20version:\x20','npm\x20install\x20','log','node','9847390Cqndoy','51406NoPyFa','1.2.0','359010MfoWne','parse','35AkeHNK','stableVersion','sdk','439548rCThlu','some'];a294_0x4b2f=function(){return _0x407b7c;};return a294_0x4b2f();}export function checkSdkVersionSync(_0x5e65f2){const _0xa4dd59=a294_0x56254a,_0xce179e=a294_0x44518e[_0xa4dd59(0x121)](_0x5e65f2,_0xa4dd59(0x108)),_0x3f8a6a=_0xa4dd59(0x10a);if(!a294_0x26eb15[_0xa4dd59(0xfb)](_0xce179e))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3f8a6a,'stableVersion':null};try{const _0x4497a6=JSON[_0xa4dd59(0x117)](a294_0x26eb15[_0xa4dd59(0xff)](_0xce179e,_0xa4dd59(0x106))),_0x38773a=_0x4497a6[_0xa4dd59(0x10b)]||{},_0x251e98=_0x4497a6[_0xa4dd59(0x102)]||{},_0xe049d9=_0x38773a[_0x3f8a6a]||_0x251e98[_0x3f8a6a];if(!_0xe049d9)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3f8a6a,'stableVersion':null};let _0x4e5820=getInstalledVersion(_0x5e65f2,_0x3f8a6a);!_0x4e5820&&(_0x4e5820=_0xe049d9);if(isNonNumericVersion(_0xe049d9))return{'installed':!![],'version':_0x4e5820,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3f8a6a,'stableVersion':null};const _0x483567=a294_0x31f4ec[_0xa4dd59(0x10e)](_0x4e5820),_0x4b31bc=_0x483567?a294_0x31f4ec['lt'](_0x483567,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x4e5820,'needsUpgrade':_0x4b31bc,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3f8a6a,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x3f8a6a,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x10601d){const _0x4684e6=a294_0x56254a;if(!_0x10601d['needsUpgrade'])return;const _0x95ba93=_0x4684e6(0xfc),_0x401014=_0x4684e6(0x10c),_0x13db93='\x1b[1m',_0x35d088=_0x10601d[_0x4684e6(0x11f)]||'@lovrabet/sdk',_0x4a706b=_0x10601d[_0x4684e6(0x119)]||_0x10601d[_0x4684e6(0x100)],_0x24e077=_0x4684e6(0x110)+_0x35d088+'@'+(_0x4a706b||_0x4684e6(0x101));console['log'](),console[_0x4684e6(0x111)](''+_0x95ba93+_0x13db93+_0x4684e6(0xfd)+_0x401014),console['log'](_0x95ba93+_0x4684e6(0x10f)+_0x35d088+'@'+_0x10601d[_0x4684e6(0xfe)]+_0x401014),console[_0x4684e6(0x111)](_0x95ba93+_0x4684e6(0x120)+_0x4a706b+_0x401014),console[_0x4684e6(0x111)](_0x95ba93+_0x4684e6(0x104)+_0x24e077+_0x401014),console[_0x4684e6(0x111)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x17ab59,_0x2396aa){const _0x59b1b5=a295_0x460e,_0x170cc1=_0x17ab59();while(!![]){try{const _0x4a9bd3=-parseInt(_0x59b1b5(0x16e))/0x1*(-parseInt(_0x59b1b5(0x189))/0x2)+-parseInt(_0x59b1b5(0x170))/0x3+parseInt(_0x59b1b5(0x176))/0x4*(parseInt(_0x59b1b5(0x191))/0x5)+-parseInt(_0x59b1b5(0x17e))/0x6+parseInt(_0x59b1b5(0x188))/0x7+-parseInt(_0x59b1b5(0x187))/0x8*(parseInt(_0x59b1b5(0x177))/0x9)+parseInt(_0x59b1b5(0x192))/0xa;if(_0x4a9bd3===_0x2396aa)break;else _0x170cc1['push'](_0x170cc1['shift']());}catch(_0x487ec4){_0x170cc1['push'](_0x170cc1['shift']());}}}(a295_0x5511,0x9b47d));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';function a295_0x460e(_0x3fca89,_0x39b15a){_0x3fca89=_0x3fca89-0x16e;const _0x55111e=a295_0x5511();let _0x460e6e=_0x55111e[_0x3fca89];return _0x460e6e;}import{fileURLToPath}from'node:url';import a295_0x2ccb49 from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a295_0x5511(){const _0xf6ad5=['join','↪\x20Critical\x20CLI\x20upgrade\x20required','\x1b[33m','coerce','1984akPPzI','1540315lrKcrS','37240gyutZX','stableVersion','Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.','\x1b[31m','\x20\x20\x20Stable\x20version:\x20','filter','belowMinimum','minimumVersion','3240qIjZyq','20248720keNxUX','npm\x20install\x20-g\x20','needsUpgrade','Upgrade\x20command:\x20','↪\x20New\x20version\x20available','6bbvdGY','log','2119437AlBMKZ','\x20\x20\x20Current\x20CLI\x20version:\x20','Minimum\x20supported:\x20','upgradeMessage','package.json','minimumVersionMessage','5516qnYzOH','29466ixrvwJ','utf-8','version','latest','currentVersion','validation','parse','6574614PYBWAV','1.0.0','\x20\x20\x20Minimum\x20supported:\x20','\x20\x20\x20Upgrade\x20command:\x20','\x20\x20\x20'];a295_0x5511=function(){return _0xf6ad5;};return a295_0x5511();}import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x5b768b){const _0x3370b2=a295_0x460e,_0x11d8c5=_0x5b768b[_0x3370b2(0x18a)]||_0x3370b2(0x17a);return _0x3370b2(0x193)+NPM_PACKAGE_NAME+'@'+_0x11d8c5;}function getCurrentCliVersion(){const _0x43e438=a295_0x460e;try{const _0x1fa73a=fileURLToPath(import.meta.url),_0x15d8e7=resolve(dirname(_0x1fa73a),'../..'),_0x3e6022=resolve(_0x15d8e7,_0x43e438(0x174)),_0x5d28d5=JSON[_0x43e438(0x17d)](readFileSync(_0x3e6022,_0x43e438(0x178)));return _0x5d28d5[_0x43e438(0x179)]||'1.0.0';}catch{return _0x43e438(0x17f);}}export async function checkCliVersion(){const _0x589117=a295_0x460e,_0x561117=getCurrentCliVersion(),_0x48a812=await getCliVersionPolicy(),_0x3698f6=_0x48a812?.['stableVersion']||null,_0x446b21=_0x48a812?.[_0x589117(0x190)]||null;let _0xd31667=![],_0x264ac2=![];const _0x4e1fd9=a295_0x2ccb49['coerce'](_0x561117);if(_0x4e1fd9&&_0x3698f6)try{const _0xdc8de8=a295_0x2ccb49[_0x589117(0x186)](_0x3698f6);if(_0xdc8de8)_0xd31667=a295_0x2ccb49['lt'](_0x4e1fd9,_0xdc8de8);}catch{}if(_0x4e1fd9&&_0x446b21)try{const _0x47bc05=a295_0x2ccb49[_0x589117(0x186)](_0x446b21);if(_0x47bc05)_0x264ac2=a295_0x2ccb49['lt'](_0x4e1fd9,_0x47bc05);}catch{}return _0x264ac2&&(_0xd31667=!![]),{'currentVersion':_0x561117,'stableVersion':_0x3698f6,'minimumVersion':_0x446b21,'needsUpgrade':_0xd31667,'belowMinimum':_0x264ac2,'isPreRelease':![],'upgradeMessage':_0x48a812?.[_0x589117(0x173)],'minimumVersionMessage':_0x48a812?.['minimumVersionMessage']};}export function printCliUpgradeWarning(_0x3fb9f6){const _0x34e2c1=a295_0x460e;if(!_0x3fb9f6[_0x34e2c1(0x194)]&&!_0x3fb9f6[_0x34e2c1(0x18f)])return;const _0x4d3efa=_0x34e2c1(0x18c),_0x330e48=_0x34e2c1(0x185),_0x41b425='\x1b[0m',_0x24a59d='\x1b[1m',_0x173afb=getCliUpgradeCommand(_0x3fb9f6);console['log'](),_0x3fb9f6[_0x34e2c1(0x18f)]?(console['log'](''+_0x4d3efa+_0x24a59d+_0x34e2c1(0x184)+_0x41b425),console['log'](_0x4d3efa+_0x34e2c1(0x171)+_0x3fb9f6[_0x34e2c1(0x17b)]+_0x41b425),_0x3fb9f6['minimumVersion']&&console[_0x34e2c1(0x16f)](_0x4d3efa+_0x34e2c1(0x180)+_0x3fb9f6['minimumVersion']+_0x41b425),_0x3fb9f6['stableVersion']&&_0x3fb9f6[_0x34e2c1(0x18a)]!==_0x3fb9f6[_0x34e2c1(0x190)]&&console['log'](_0x4d3efa+'\x20\x20\x20Recommended\x20stable:\x20'+_0x3fb9f6[_0x34e2c1(0x18a)]+_0x41b425),_0x3fb9f6[_0x34e2c1(0x175)]&&console[_0x34e2c1(0x16f)](_0x4d3efa+_0x34e2c1(0x182)+_0x3fb9f6[_0x34e2c1(0x175)]+_0x41b425),console[_0x34e2c1(0x16f)](_0x4d3efa+_0x34e2c1(0x181)+_0x173afb+_0x41b425)):(console['log'](''+_0x330e48+_0x24a59d+_0x34e2c1(0x196)+_0x41b425),console[_0x34e2c1(0x16f)](_0x330e48+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x3fb9f6['currentVersion']+_0x41b425),console[_0x34e2c1(0x16f)](_0x330e48+_0x34e2c1(0x18d)+_0x3fb9f6[_0x34e2c1(0x18a)]+_0x41b425),_0x3fb9f6[_0x34e2c1(0x173)]&&console[_0x34e2c1(0x16f)](_0x330e48+_0x34e2c1(0x182)+_0x3fb9f6[_0x34e2c1(0x173)]+_0x41b425),console[_0x34e2c1(0x16f)](_0x330e48+_0x34e2c1(0x181)+_0x173afb+_0x41b425)),console[_0x34e2c1(0x16f)]();}export function assertCliVersionSupported(_0x24c333){const _0x2cbc40=a295_0x460e;if(!_0x24c333[_0x2cbc40(0x18f)])return;const _0x49fa01=[_0x24c333[_0x2cbc40(0x175)],'Current\x20version:\x20'+_0x24c333[_0x2cbc40(0x17b)],_0x24c333[_0x2cbc40(0x190)]?_0x2cbc40(0x172)+_0x24c333[_0x2cbc40(0x190)]:null,_0x2cbc40(0x195)+getCliUpgradeCommand(_0x24c333)][_0x2cbc40(0x18e)](Boolean)[_0x2cbc40(0x183)]('\x0a');throw CliErrors[_0x2cbc40(0x17c)](_0x2cbc40(0x18b),_0x49fa01);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x404beb,_0x740aee){const _0x37724d=a296_0xa609,_0x34d8f0=_0x404beb();while(!![]){try{const _0x329793=parseInt(_0x37724d(0x133))/0x1*(parseInt(_0x37724d(0x123))/0x2)+parseInt(_0x37724d(0x137))/0x3*(-parseInt(_0x37724d(0x129))/0x4)+-parseInt(_0x37724d(0x120))/0x5+-parseInt(_0x37724d(0x12c))/0x6*(parseInt(_0x37724d(0x12f))/0x7)+parseInt(_0x37724d(0x128))/0x8*(-parseInt(_0x37724d(0x136))/0x9)+-parseInt(_0x37724d(0x138))/0xa+parseInt(_0x37724d(0x139))/0xb;if(_0x329793===_0x740aee)break;else _0x34d8f0['push'](_0x34d8f0['shift']());}catch(_0x1df1f3){_0x34d8f0['push'](_0x34d8f0['shift']());}}}(a296_0x5296,0xdad46));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(_0x472f3c){const _0x36e277=a296_0xa609;return typeof _0x472f3c===_0x36e277(0x126)&&_0x472f3c['trim']()[_0x36e277(0x130)]>0x0?_0x472f3c[_0x36e277(0x135)]():null;}function normalizeCliVersionPolicy(_0x2904fd){const _0x2a597a=a296_0xa609;if(!_0x2904fd||typeof _0x2904fd!==_0x2a597a(0x125))return null;const _0x4035e8=_0x2904fd,_0x529dbe=_0x4035e8[_0x2a597a(0x12e)]&&typeof _0x4035e8[_0x2a597a(0x12e)]===_0x2a597a(0x125)?_0x4035e8[_0x2a597a(0x12e)]:_0x4035e8,_0x45fca4=pickString(_0x529dbe[_0x2a597a(0x12a)])||pickString(_0x529dbe[_0x2a597a(0x13a)])||pickString(_0x529dbe[_0x2a597a(0x122)]),_0x1a7896=pickString(_0x529dbe[_0x2a597a(0x121)])||pickString(_0x529dbe[_0x2a597a(0x131)]);if(!_0x45fca4&&!_0x1a7896)return null;return{'stableVersion':_0x45fca4,'minimumVersion':_0x1a7896,'upgradeMessage':pickString(_0x529dbe[_0x2a597a(0x12b)])||undefined,'minimumVersionMessage':pickString(_0x529dbe[_0x2a597a(0x12d)])||undefined};}function a296_0xa609(_0xa967fb,_0x14be83){_0xa967fb=_0xa967fb-0x120;const _0x5296c4=a296_0x5296();let _0xa6090a=_0x5296c4[_0xa967fb];return _0xa6090a;}export async function fetchRabetbaseCdnConfig(){const _0x11aabc=a296_0xa609,_0x4eabd6=new AbortController(),_0xfacdb1=setTimeout(()=>_0x4eabd6[_0x11aabc(0x127)](),FETCH_TIMEOUT_MS);try{const _0x1b7755=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x11aabc(0x124)},'signal':_0x4eabd6[_0x11aabc(0x132)]});if(!_0x1b7755['ok'])return null;const _0xd235d2=await _0x1b7755[_0x11aabc(0x134)]();return _0xd235d2&&typeof _0xd235d2===_0x11aabc(0x125)?_0xd235d2:null;}catch{return null;}finally{clearTimeout(_0xfacdb1);}}export async function fetchCliVersionPolicy(){return normalizeCliVersionPolicy(await fetchRabetbaseCdnConfig());}let cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];export async function getRabetbaseCdnConfig(){const _0x2376fd=Date['now']();if(hasCachedConfig){const _0x59376d=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x2376fd-cacheTime<_0x59376d)return cachedConfig;}return cachedConfig=await fetchRabetbaseCdnConfig(),cacheTime=_0x2376fd,hasCachedConfig=!![],cachedConfig;}export async function getCliVersionPolicy(){return normalizeCliVersionPolicy(await getRabetbaseCdnConfig());}function a296_0x5296(){const _0x4869dc=['6TVMGro','application/json','object','string','abort','248PLZRSq','44aYyqtY','stableVersion','upgradeMessage','18SERJZi','minimumVersionMessage','cli','2271969BwFlDQ','length','minVersion','signal','86888llFpAD','json','trim','296145ofoMli','104808WmLpNo','16361370UYDZjA','58467431WSjltR','latestVersion','3326850PECfWY','minimumVersion','recommendedVersion'];a296_0x5296=function(){return _0x4869dc;};return a296_0x5296();}export function clearCliVersionPolicyCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a297_0x72061a=a297_0x34f3;(function(_0x469127,_0x3bf084){const _0x4a41d3=a297_0x34f3,_0x5cbdb4=_0x469127();while(!![]){try{const _0x37f98a=-parseInt(_0x4a41d3(0x1e0))/0x1+-parseInt(_0x4a41d3(0x1e2))/0x2*(-parseInt(_0x4a41d3(0x1e4))/0x3)+parseInt(_0x4a41d3(0x1e7))/0x4+parseInt(_0x4a41d3(0x1e1))/0x5+parseInt(_0x4a41d3(0x1df))/0x6+parseInt(_0x4a41d3(0x1e8))/0x7+parseInt(_0x4a41d3(0x1e5))/0x8*(-parseInt(_0x4a41d3(0x1de))/0x9);if(_0x37f98a===_0x3bf084)break;else _0x5cbdb4['push'](_0x5cbdb4['shift']());}catch(_0x5a0c70){_0x5cbdb4['push'](_0x5cbdb4['shift']());}}}(a297_0x14c1,0x93123));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a297_0x894b11,getMultiAppConfigs as a297_0x3a0640,getTemplateBaseUrl as a297_0x1ecc99}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a297_0x34f3(_0x125cfa,_0xf89d9d){_0x125cfa=_0x125cfa-0x1de;const _0x14c146=a297_0x14c1();let _0x34f35b=_0x14c146[_0x125cfa];return _0x34f35b;}export{isInProject}from'../context.js';export function readConfig(_0x5091a8){const _0x56d29d=a297_0x34f3,_0x3377f5=readRawConfig(_0x5091a8);return _0x3377f5[_0x56d29d(0x1e6)]&&typeof _0x3377f5[_0x56d29d(0x1e6)]==='string'&&initEnv(_0x3377f5[_0x56d29d(0x1e6)]),_0x3377f5;}export function getConfigAppCode(){return a297_0x894b11();}function a297_0x14c1(){const _0x3c3ac3=['env','665596NlbLSZ','7868714ZpVHno','564282IRLeBc','5117268cBaRNN','858493jJAmyg','780120NeUZSN','2hatuwq','project','493983JNggqe','128cRyBuw'];a297_0x14c1=function(){return _0x3c3ac3;};return a297_0x14c1();}export function getMultiAppConfigs(_0x3715dd=a297_0x72061a(0x1e3)){return a297_0x3a0640(_0x3715dd);}export function getTemplateBaseUrl(){return a297_0x1ecc99();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x122067,_0x4d7dbc){const _0x4863a8=a298_0x525a,_0x5ef928=_0x122067();while(!![]){try{const _0x215ad7=-parseInt(_0x4863a8(0x15b))/0x1+parseInt(_0x4863a8(0x152))/0x2+-parseInt(_0x4863a8(0x155))/0x3*(parseInt(_0x4863a8(0x15d))/0x4)+parseInt(_0x4863a8(0x150))/0x5+parseInt(_0x4863a8(0x157))/0x6*(parseInt(_0x4863a8(0x153))/0x7)+parseInt(_0x4863a8(0x15c))/0x8+-parseInt(_0x4863a8(0x154))/0x9;if(_0x215ad7===_0x4d7dbc)break;else _0x5ef928['push'](_0x5ef928['shift']());}catch(_0x2939b2){_0x5ef928['push'](_0x5ef928['shift']());}}}(a298_0xdf3e,0x6ef0d));function a298_0x525a(_0x4e5004,_0x589997){_0x4e5004=_0x4e5004-0x150;const _0xdf3ea5=a298_0xdf3e();let _0x525afc=_0xdf3ea5[_0x4e5004];return _0x525afc;}function toFiniteNumber(_0x5ed0d2){const _0x5ea840=a298_0x525a;if(typeof _0x5ed0d2===_0x5ea840(0x15a)&&Number[_0x5ea840(0x159)](_0x5ed0d2))return _0x5ed0d2;if(typeof _0x5ed0d2===_0x5ea840(0x156)){const _0x13fdee=_0x5ed0d2[_0x5ea840(0x158)]();if(!_0x13fdee)return undefined;const _0x331771=Number(_0x13fdee);if(Number[_0x5ea840(0x159)](_0x331771))return _0x331771;}return undefined;}export function normalizeEntityWithIdResponse(_0x12b7dd){const _0x2be228=a298_0x525a,_0x195769=toFiniteNumber(_0x12b7dd);if(_0x195769!==undefined)return{'id':_0x195769,'entity':{'id':_0x195769}};if(!_0x12b7dd||typeof _0x12b7dd!==_0x2be228(0x151))return{'id':undefined,'entity':{}};const _0x308cd1={..._0x12b7dd},_0x183c5d=toFiniteNumber(_0x308cd1['id']);return _0x183c5d!==undefined&&(_0x308cd1['id']=_0x183c5d),{'id':_0x183c5d,'entity':_0x308cd1};}function a298_0xdf3e(){const _0x50f530=['60sqsITQ','4185410ijHVya','object','1060598QcOlKi','7xUsDYF','9743895PiLTWY','49947FZtNLG','string','2103942xITpLc','trim','isFinite','number','70418loHqNB','1113464slyjPo'];a298_0xdf3e=function(){return _0x50f530;};return a298_0xdf3e();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a299_0x406b(_0x645ce0,_0x42f087){_0x645ce0=_0x645ce0-0x115;const _0x125077=a299_0x1250();let _0x406b4c=_0x125077[_0x645ce0];return _0x406b4c;}(function(_0x16df03,_0x485207){const _0x116389=a299_0x406b,_0x5d9be8=_0x16df03();while(!![]){try{const _0x148c0a=-parseInt(_0x116389(0x11f))/0x1+parseInt(_0x116389(0x11c))/0x2*(parseInt(_0x116389(0x117))/0x3)+parseInt(_0x116389(0x115))/0x4+parseInt(_0x116389(0x11e))/0x5*(parseInt(_0x116389(0x11d))/0x6)+parseInt(_0x116389(0x11b))/0x7+parseInt(_0x116389(0x118))/0x8*(-parseInt(_0x116389(0x116))/0x9)+-parseInt(_0x116389(0x11a))/0xa;if(_0x148c0a===_0x485207)break;else _0x5d9be8['push'](_0x5d9be8['shift']());}catch(_0x440f35){_0x5d9be8['push'](_0x5d9be8['shift']());}}}(a299_0x1250,0x6581a));import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a299_0x1250(){const _0x540d73=['2Xxrkdz','114ZdDHOU','97855EWfXSt','290219qKhzfY','141388OVeFLx','99dTMlvx','2235084QQNmLd','39144FBDFpG','isDirectory','11775390kDJPFj','5495889NxpnGN'];a299_0x1250=function(){return _0x540d73;};return a299_0x1250();}export async function copyDir(_0x52efb8,_0x44f700){const _0x25a32b=a299_0x406b,_0x46c74d=statSync(_0x52efb8);if(_0x46c74d[_0x25a32b(0x119)]()){!existsSync(_0x44f700)&&mkdirSync(_0x44f700,{'recursive':!![]});const _0x3b6a65=readdirSync(_0x52efb8);for(const _0x10a8ff of _0x3b6a65){await copyDir(join(_0x52efb8,_0x10a8ff),join(_0x44f700,_0x10a8ff));}}else copyFileSync(_0x52efb8,_0x44f700);}export function ensureDir(_0x3f40e6){!existsSync(_0x3f40e6)&&mkdirSync(_0x3f40e6,{'recursive':!![]});}export function pathExists(_0x32fb8f){return existsSync(_0x32fb8f);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a300_0x16c3eb=a300_0x39e8;(function(_0x223875,_0x3e0c18){const _0x1d0588=a300_0x39e8,_0x565118=_0x223875();while(!![]){try{const _0x35537d=parseInt(_0x1d0588(0x1d2))/0x1*(-parseInt(_0x1d0588(0x1d5))/0x2)+-parseInt(_0x1d0588(0x1c5))/0x3+parseInt(_0x1d0588(0x1d1))/0x4*(parseInt(_0x1d0588(0x1c0))/0x5)+-parseInt(_0x1d0588(0x1cc))/0x6*(parseInt(_0x1d0588(0x1c2))/0x7)+parseInt(_0x1d0588(0x1d4))/0x8+-parseInt(_0x1d0588(0x1d3))/0x9*(-parseInt(_0x1d0588(0x1c6))/0xa)+-parseInt(_0x1d0588(0x1c7))/0xb*(-parseInt(_0x1d0588(0x1da))/0xc);if(_0x35537d===_0x3e0c18)break;else _0x565118['push'](_0x565118['shift']());}catch(_0xd44a0e){_0x565118['push'](_0x565118['shift']());}}}(a300_0x3472,0x63d09));import{mkdirSync,writeFileSync}from'node:fs';function a300_0x39e8(_0x53ff41,_0x4ffc99){_0x53ff41=_0x53ff41-0x1bc;const _0x34721f=a300_0x3472();let _0x39e848=_0x34721f[_0x53ff41];return _0x39e848;}import{dirname,join}from'node:path';import{homedir}from'node:os';import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x58742c=a300_0x39e8,_0xbabd70=getTemplateBaseUrl();return _0xbabd70+_0x58742c(0x1d0);}const CACHE_DIR=join(homedir(),a300_0x16c3eb(0x1dd),a300_0x16c3eb(0x1d9));export async function fetchGuidesFromCDN(){const _0x46cc33=a300_0x16c3eb,_0x2a7154=getGuidesCdnUrl(),_0x3f3975=await fetch(_0x2a7154,{'headers':{'Accept':_0x46cc33(0x1c9)}});if(!_0x3f3975['ok'])throw new Error('CDN\x20request\x20failed:\x20'+_0x3f3975[_0x46cc33(0x1bd)]+'\x20'+_0x3f3975['statusText']);const _0x507d1e=await _0x3f3975[_0x46cc33(0x1c4)]();if(!_0x507d1e['guides']||typeof _0x507d1e['guides']!==_0x46cc33(0x1be))throw new Error(_0x46cc33(0x1db));return _0x507d1e;}export function writeGuidesToProject(_0x5cf235,_0x5ca436,_0x43937a='.lovrabet/skill/guides',_0x3a68fa){const _0x5b98ef=a300_0x16c3eb,_0x1528b3=join(_0x5ca436,_0x43937a);mkdirSync(_0x1528b3,{'recursive':!![]});for(const [_0x18f918,_0x1b8021]of Object[_0x5b98ef(0x1cf)](_0x5cf235[_0x5b98ef(0x1bf)])){let _0x139d37=_0x1b8021[_0x5b98ef(0x1ce)];_0x1b8021[_0x5b98ef(0x1c3)]&&(_0x139d37=appendUpdateTime(_0x139d37,_0x1b8021[_0x5b98ef(0x1c3)])),writeFileSync(join(_0x1528b3,_0x18f918+'.md'),_0x139d37,_0x5b98ef(0x1ca));}}function a300_0x3472(){const _0x1c25e2=['/skills/guides.json','260GglDeU','10GosKlR','111114pPgRjc','2622560hDpQEC','39686bLuULH','map','trimEnd','extendContent','cache','36HuYhND','CDN\x20returned\x20invalid\x20data','length','.lovrabet','join','CDN\x20data\x20is\x20missing\x20skillTemplate','status','object','guides','54055FjqTZQ','title','3833137NejRlC','lastUpdated','json','698571PxEiXy','70bxHZOU','992794wFrPkP','skillTemplate','application/json','utf-8','keys','6MHkeRY','replace','content','entries'];a300_0x3472=function(){return _0x1c25e2;};return a300_0x3472();}export function appendUpdateTime(_0x1c9212,_0x33cb1e){const _0x1be08e=a300_0x16c3eb;return _0x1c9212=_0x1c9212[_0x1be08e(0x1cd)](/\n*>更新时间:.*$/m,''),_0x1c9212[_0x1be08e(0x1d7)]()+('\x0a\x0a>更新时间:'+_0x33cb1e);}export function getSkillTemplate(_0x4c8aa3){const _0x33cfc4=a300_0x16c3eb;return _0x4c8aa3[_0x33cfc4(0x1c8)]?.[_0x33cfc4(0x1ce)]||'';}export function appendExtendContents(_0x5ac36a,_0x30ebed,_0x2e2744){const _0x23b755=a300_0x16c3eb,_0x449087=[];for(const [,_0x514ae9]of Object[_0x23b755(0x1cf)](_0x30ebed['guides'])){_0x514ae9[_0x23b755(0x1d8)]&&_0x449087['push'](_0x514ae9[_0x23b755(0x1d8)][_0x23b755(0x1d7)]());}if(_0x449087[_0x23b755(0x1dc)]===0x0)return _0x5ac36a;return _0x5ac36a['trimEnd']()+'\x0a\x0a'+_0x449087[_0x23b755(0x1de)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x2249d1,_0x5b30e8,_0xacd90d){const _0x274470=a300_0x16c3eb,_0x4ac39c=getSkillTemplate(_0x2249d1);if(!_0x4ac39c)throw new Error(_0x274470(0x1bc));const _0xbe2cab=dirname(_0x5b30e8);mkdirSync(_0xbe2cab,{'recursive':!![]});let _0x522a51=_0x4ac39c[_0x274470(0x1cd)](/\{\{IDE_NAME\}\}/g,_0xacd90d);_0x522a51=appendExtendContents(_0x522a51,_0x2249d1),_0x2249d1[_0x274470(0x1c8)]['lastUpdated']&&(_0x522a51=appendUpdateTime(_0x522a51,_0x2249d1[_0x274470(0x1c8)][_0x274470(0x1c3)])),writeFileSync(_0x5b30e8,_0x522a51,_0x274470(0x1ca));}export async function installGuides(_0x3edadb){const _0x540fd5=a300_0x16c3eb,_0x1c3500=await fetchGuidesFromCDN();return writeGuidesToProject(_0x1c3500,_0x3edadb),Object[_0x540fd5(0x1cb)](_0x1c3500[_0x540fd5(0x1bf)])[_0x540fd5(0x1dc)];}export function getGuidesSummary(_0x2b7c82){const _0x2c5092=a300_0x16c3eb;return Object[_0x2c5092(0x1cf)](_0x2b7c82[_0x2c5092(0x1bf)])[_0x2c5092(0x1d6)](([_0x22beec,_0x41599e])=>({'key':_0x22beec,'title':_0x41599e[_0x2c5092(0x1c1)],'path':_0x41599e['path']}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4c0526,_0x384f42){const _0x593b8e=a301_0x482c,_0x4d03e0=_0x4c0526();while(!![]){try{const _0x53d5a5=parseInt(_0x593b8e(0xa2))/0x1*(-parseInt(_0x593b8e(0xa1))/0x2)+parseInt(_0x593b8e(0xb1))/0x3+-parseInt(_0x593b8e(0xab))/0x4+-parseInt(_0x593b8e(0xa7))/0x5+parseInt(_0x593b8e(0x9b))/0x6*(-parseInt(_0x593b8e(0xb2))/0x7)+parseInt(_0x593b8e(0xb8))/0x8*(-parseInt(_0x593b8e(0xaf))/0x9)+parseInt(_0x593b8e(0x9f))/0xa;if(_0x53d5a5===_0x384f42)break;else _0x4d03e0['push'](_0x4d03e0['shift']());}catch(_0x6dd168){_0x4d03e0['push'](_0x4d03e0['shift']());}}}(a301_0x130f,0xbab5b));function a301_0x130f(){const _0x4cfff9=['signal','6qSfCaN','headers','TypeError','application/json','50030690BqgxOk','json','2ZNUcAX','1129094CfXUjb','content-type','name','\x20in\x20','fetch','2582285DxmtcE','includes','*\x20Request\x20failed;\x20retry\x20','status','3195016KiFjxB','abort','ms...','AbortError','54yOEGft','url','480846EtgrtH','9317357etXBco','Request\x20failed','text','log','ECONNRESET','message','830976cuBZAj'];a301_0x130f=function(){return _0x4cfff9;};return a301_0x130f();}function a301_0x482c(_0x38cb72,_0x160c00){_0x38cb72=_0x38cb72-0x9a;const _0x130f20=a301_0x130f();let _0x482c1e=_0x130f20[_0x38cb72];return _0x482c1e;}export async function httpRequest(_0x2f1206,_0xbad56e={}){const _0x1fd899=a301_0x482c,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0xbad56e;let _0x448ef5=null;for(let _0x3c3370=0x0;_0x3c3370<=retries;_0x3c3370++){try{const _0x42fd42=new AbortController(),_0xe6c5c6=setTimeout(()=>_0x42fd42[_0x1fd899(0xac)](),timeout),_0x6342e6=await fetch(_0x2f1206,{'headers':headers,'signal':_0x42fd42[_0x1fd899(0x9a)]});clearTimeout(_0xe6c5c6);let _0x433e53;const _0x1307a2=_0x6342e6[_0x1fd899(0x9c)]['get'](_0x1fd899(0xa3));return _0x1307a2?.['includes'](_0x1fd899(0x9e))?_0x433e53=await _0x6342e6[_0x1fd899(0xa0)]():_0x433e53=await _0x6342e6['text'](),{'ok':_0x6342e6['ok'],'status':_0x6342e6[_0x1fd899(0xaa)],'statusText':_0x6342e6['statusText'],'data':_0x433e53,'headers':_0x6342e6[_0x1fd899(0x9c)],'url':_0x6342e6[_0x1fd899(0xb0)],'text':()=>_0x6342e6[_0x1fd899(0xb4)]()};}catch(_0x2a0e9f){_0x448ef5=_0x2a0e9f instanceof Error?_0x2a0e9f:new Error(String(_0x2a0e9f));if(_0x3c3370===retries)break;if(shouldRetry(_0x2a0e9f)){console[_0x1fd899(0xb5)](_0x1fd899(0xa9)+(_0x3c3370+0x1)+_0x1fd899(0xa5)+retryDelay+_0x1fd899(0xad)),await sleep(retryDelay);continue;}else break;}}throw _0x448ef5||new Error(_0x1fd899(0xb3));}function shouldRetry(_0x4d949f){const _0x92e348=a301_0x482c;if(_0x4d949f instanceof Error){if(_0x4d949f['name']===_0x92e348(0xae))return![];if(_0x4d949f[_0x92e348(0xa4)]===_0x92e348(0x9d)&&_0x4d949f[_0x92e348(0xb7)][_0x92e348(0xa8)](_0x92e348(0xa6)))return!![];if(_0x4d949f['message'][_0x92e348(0xa8)](_0x92e348(0xb6)))return!![];if(_0x4d949f[_0x92e348(0xb7)][_0x92e348(0xa8)]('ENOTFOUND'))return![];}return![];}function sleep(_0x45359a){return new Promise(_0xb5ee71=>setTimeout(_0xb5ee71,_0x45359a));}export function validateUrl(_0x404c25){try{return new URL(_0x404c25),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a302_0x5b96(){const _0x102be1=['setRawMode','382844qdjEjV','isTTY','15752TXWwzE','433696agqrTN','stdin','4391296mXaxef','isRaw','1021806XNofzM','true','1436645ZykqqQ','1846896xKveSV','nonInteractive'];a302_0x5b96=function(){return _0x102be1;};return a302_0x5b96();}(function(_0x4538de,_0x2b32d4){const _0x5da2e5=a302_0xa88f,_0x5693db=_0x4538de();while(!![]){try{const _0x3a6b7c=parseInt(_0x5da2e5(0x181))/0x1+-parseInt(_0x5da2e5(0x182))/0x2+-parseInt(_0x5da2e5(0x186))/0x3+parseInt(_0x5da2e5(0x18c))/0x4+-parseInt(_0x5da2e5(0x188))/0x5+parseInt(_0x5da2e5(0x189))/0x6+parseInt(_0x5da2e5(0x184))/0x7;if(_0x3a6b7c===_0x2b32d4)break;else _0x5693db['push'](_0x5693db['shift']());}catch(_0x37869b){_0x5693db['push'](_0x5693db['shift']());}}}(a302_0x5b96,0x31464));function a302_0xa88f(_0x5c4678,_0x1dbc00){_0x5c4678=_0x5c4678-0x180;const _0x5b9699=a302_0x5b96();let _0xa88f75=_0x5b9699[_0x5c4678];return _0xa88f75;}function env(_0x4d9a8d){return process.env[`RABETBASE_${_0x4d9a8d}`]||process.env[`LOVRABET_${_0x4d9a8d}`]||undefined;}export function isNonInteractive(_0x49dcef){const _0x23b7ca=a302_0xa88f;return!!(_0x49dcef[_0x23b7ca(0x18a)]||_0x49dcef['ci']||env('CI')===_0x23b7ca(0x187)||process.env.CI==='true'||!process['stdout'][_0x23b7ca(0x180)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x18337d=a302_0xa88f;if(!process[_0x18337d(0x183)][_0x18337d(0x180)])return![];try{const _0xbef75a=process['stdin'][_0x18337d(0x185)];return process[_0x18337d(0x183)]['setRawMode'](!![]),process[_0x18337d(0x183)][_0x18337d(0x18b)](_0xbef75a??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a303_0x227146=a303_0x4ef5;(function(_0x5aad52,_0x513a10){const _0xa10aab=a303_0x4ef5,_0x31a37d=_0x5aad52();while(!![]){try{const _0x24580e=parseInt(_0xa10aab(0x168))/0x1+-parseInt(_0xa10aab(0x174))/0x2+parseInt(_0xa10aab(0x17f))/0x3*(-parseInt(_0xa10aab(0x19b))/0x4)+-parseInt(_0xa10aab(0x188))/0x5*(-parseInt(_0xa10aab(0x17a))/0x6)+-parseInt(_0xa10aab(0x197))/0x7*(-parseInt(_0xa10aab(0x17d))/0x8)+-parseInt(_0xa10aab(0x172))/0x9+parseInt(_0xa10aab(0x19e))/0xa;if(_0x24580e===_0x513a10)break;else _0x31a37d['push'](_0x31a37d['shift']());}catch(_0x3d04de){_0x31a37d['push'](_0x31a37d['shift']());}}}(a303_0x115b,0xdcbfe));import a303_0x93a879 from'winston';import a303_0x4ec974 from'node:fs';function a303_0x115b(){const _0x4349aa=['trim','utf8','success','748tkNxHT','stringify','logFilePath','26540660XQdhwY','transports','toISOString','182873JEHyJD','yellow','Failed\x20to\x20read\x20logs:','info','Failed\x20to\x20clear\x20logs:','message','logTask','existsSync','timestamp','command','14987448eJBdcj','setRawCommand','2350078UDqkcP','format','File','join','printf','readFileSync','135132ofgpEI','getWinstonInstance','unknown','16tkJTaN','mkdirSync','8736zrdExA','.lovrabet.log','rawCommand','warn','initWinstonLogger','combine','now','Starting:\x20','clear','10PNrXVw','Failed:\x20','red','log','addColors','winstonLogger','split','currentRawCommand','createLogger','error','setLogPath','duration','level','details','parse','4924717FRfQIQ'];a303_0x115b=function(){return _0x4349aa;};return a303_0x115b();}function a303_0x4ef5(_0x8d8eb5,_0x59476c){_0x8d8eb5=_0x8d8eb5-0x168;const _0x115b82=a303_0x115b();let _0x4ef5df=_0x115b82[_0x8d8eb5];return _0x4ef5df;}import a303_0x3100fd from'node:path';class Logger{[a303_0x227146(0x18d)];[a303_0x227146(0x19d)];['currentRawCommand']='';constructor(){const _0x5da08a=a303_0x227146;this[_0x5da08a(0x19d)]='';}[a303_0x227146(0x173)](_0x1d083e){const _0x2c7651=a303_0x227146;this[_0x2c7651(0x18f)]=_0x1d083e;}[a303_0x227146(0x183)](){const _0x1745d0=a303_0x227146,_0x3aef7e=a303_0x3100fd['dirname'](this[_0x1745d0(0x19d)]);!a303_0x4ec974['existsSync'](_0x3aef7e)&&a303_0x4ec974[_0x1745d0(0x17e)](_0x3aef7e,{'recursive':!![]});const _0x17ea93=a303_0x93a879['format'][_0x1745d0(0x184)](a303_0x93a879[_0x1745d0(0x175)][_0x1745d0(0x170)](),a303_0x93a879[_0x1745d0(0x175)]['errors']({'stack':!![]}),a303_0x93a879['format'][_0x1745d0(0x178)](_0x191942=>{const _0x1b819e=_0x1745d0,_0x1c176d={'timestamp':_0x191942[_0x1b819e(0x170)]||new Date()[_0x1b819e(0x1a0)](),'level':_0x191942[_0x1b819e(0x194)]||_0x1b819e(0x16b),'command':_0x191942[_0x1b819e(0x171)]||_0x1b819e(0x17c),'rawCommand':_0x191942[_0x1b819e(0x181)]||this[_0x1b819e(0x18f)]||undefined,'message':_0x191942[_0x1b819e(0x16d)]||'','duration':_0x191942[_0x1b819e(0x193)]||undefined,'details':_0x191942[_0x1b819e(0x195)]||undefined};return JSON[_0x1b819e(0x19c)](_0x1c176d);}));this[_0x1745d0(0x18d)]=a303_0x93a879[_0x1745d0(0x190)]({'level':'info','format':_0x17ea93,'transports':[new a303_0x93a879[(_0x1745d0(0x19f))][(_0x1745d0(0x176))]({'filename':this[_0x1745d0(0x19d)],'level':_0x1745d0(0x16b)})],'silent':![]}),a303_0x93a879[_0x1745d0(0x18c)]({'success':'green','error':_0x1745d0(0x18a),'warn':_0x1745d0(0x169),'info':'blue'});}[a303_0x227146(0x192)](_0x2db36c){const _0x25f39b=a303_0x227146;this[_0x25f39b(0x19d)]=a303_0x3100fd[_0x25f39b(0x177)](_0x2db36c,_0x25f39b(0x180)),this[_0x25f39b(0x18d)]&&this[_0x25f39b(0x18d)][_0x25f39b(0x187)](),this['initWinstonLogger']();}[a303_0x227146(0x16b)](_0x217976,_0x3c80a9,_0x46cbf7){const _0x5e983a=a303_0x227146;if(!this[_0x5e983a(0x19d)]||!this[_0x5e983a(0x18d)])return;this[_0x5e983a(0x18d)][_0x5e983a(0x16b)](_0x3c80a9,{'command':_0x217976,'details':_0x46cbf7});}[a303_0x227146(0x19a)](_0x5cecf5,_0x3c1ea7,_0x3e4a64,_0x225377){const _0x16b8f5=a303_0x227146;if(!this[_0x16b8f5(0x19d)]||!this[_0x16b8f5(0x18d)])return;this['winstonLogger'][_0x16b8f5(0x18b)](_0x16b8f5(0x16b),_0x3c1ea7,{'level':_0x16b8f5(0x19a),'command':_0x5cecf5,'duration':_0x3e4a64,'details':_0x225377});}['error'](_0x3915fc,_0x2c3faf,_0x47800d){const _0x563e3a=a303_0x227146;if(!this['logFilePath']||!this[_0x563e3a(0x18d)])return;this[_0x563e3a(0x18d)][_0x563e3a(0x191)](_0x2c3faf,{'command':_0x3915fc,'details':_0x47800d});}[a303_0x227146(0x182)](_0x28b2fc,_0x41abda,_0x18f54f){const _0x36e5ca=a303_0x227146;if(!this['logFilePath']||!this[_0x36e5ca(0x18d)])return;this['winstonLogger'][_0x36e5ca(0x182)](_0x41abda,{'command':_0x28b2fc,'details':_0x18f54f});}async[a303_0x227146(0x16e)](_0x2ff6b1,_0x3314bc,_0x432160){const _0x3a0d44=a303_0x227146,_0x91e5df=Date[_0x3a0d44(0x185)]();this[_0x3a0d44(0x16b)](_0x2ff6b1,_0x3a0d44(0x186)+_0x3314bc);try{const _0x48f7ad=await _0x432160(),_0x2c2e4f=Date['now']()-_0x91e5df;return this[_0x3a0d44(0x19a)](_0x2ff6b1,'Completed:\x20'+_0x3314bc,_0x2c2e4f),_0x48f7ad;}catch(_0x4e3e2b){const _0x4f6da9=Date[_0x3a0d44(0x185)]()-_0x91e5df;this[_0x3a0d44(0x191)](_0x2ff6b1,_0x3a0d44(0x189)+_0x3314bc,{'error':_0x4e3e2b instanceof Error?_0x4e3e2b['message']:String(_0x4e3e2b),'duration':_0x4f6da9});throw _0x4e3e2b;}}['readLogs'](){const _0x39bba6=a303_0x227146;try{if(!a303_0x4ec974[_0x39bba6(0x16f)](this[_0x39bba6(0x19d)]))return[];const _0x408e89=a303_0x4ec974[_0x39bba6(0x179)](this[_0x39bba6(0x19d)],_0x39bba6(0x199));return _0x408e89[_0x39bba6(0x18e)]('\x0a')['filter'](_0x591a78=>_0x591a78[_0x39bba6(0x198)]())['map'](_0x5f0fa7=>JSON[_0x39bba6(0x196)](_0x5f0fa7));}catch(_0x54d56b){return console['warn'](_0x39bba6(0x16a),_0x54d56b),[];}}['clearLogs'](){const _0x11378f=a303_0x227146;try{a303_0x4ec974[_0x11378f(0x16f)](this['logFilePath'])&&a303_0x4ec974['writeFileSync'](this[_0x11378f(0x19d)],'',_0x11378f(0x199));}catch(_0x545b66){console[_0x11378f(0x182)](_0x11378f(0x16c),_0x545b66);}}[a303_0x227146(0x17b)](){const _0x173721=a303_0x227146;return this[_0x173721(0x18d)];}}export const logger=new Logger();
|
package/lib/utils/params.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x43bfd3,_0xa1a40e){const _0x153432=a304_0x3757,_0x4626b8=_0x43bfd3();while(!![]){try{const _0x5ade65=parseInt(_0x153432(0x1df))/0x1*(-parseInt(_0x153432(0x1dc))/0x2)+-parseInt(_0x153432(0x1d3))/0x3*(-parseInt(_0x153432(0x1d2))/0x4)+parseInt(_0x153432(0x1d6))/0x5*(parseInt(_0x153432(0x1d9))/0x6)+parseInt(_0x153432(0x1de))/0x7+-parseInt(_0x153432(0x1e0))/0x8+parseInt(_0x153432(0x1d7))/0x9+parseInt(_0x153432(0x1da))/0xa*(-parseInt(_0x153432(0x1d5))/0xb);if(_0x5ade65===_0xa1a40e)break;else _0x4626b8['push'](_0x4626b8['shift']());}catch(_0x3893a3){_0x4626b8['push'](_0x4626b8['shift']());}}}(a304_0x4831,0xae976));import{CliErrors}from'../errors.js';function a304_0x4831(){const _0x59dc3f=['5958078ucEwKL','3612UeNiPl','9521664owdodS','validation','12876oXUotA','663suXjgl','isArray','1174877QTaXec','235DPiIgH','1288575CXWXag','--params\x20must\x20be\x20a\x20JSON\x20object','151230zjkPFb','30ULswOi','Example:\x20--params\x20\x27{\x22id\x22:123}\x27','368zOGtBU','parse'];a304_0x4831=function(){return _0x59dc3f;};return a304_0x4831();}function a304_0x3757(_0x15a02f,_0x9debe1){_0x15a02f=_0x15a02f-0x1d1;const _0x483107=a304_0x4831();let _0x375742=_0x483107[_0x15a02f];return _0x375742;}export function parseJsonParams(_0xda5442){const _0x1d62f8=a304_0x3757;if(!_0xda5442)return undefined;let _0x2b36ae;try{_0x2b36ae=JSON[_0x1d62f8(0x1dd)](_0xda5442);}catch{throw CliErrors[_0x1d62f8(0x1d1)]('Invalid\x20JSON\x20for\x20--params:\x20'+_0xda5442);}if(!_0x2b36ae||typeof _0x2b36ae!=='object'||Array[_0x1d62f8(0x1d4)](_0x2b36ae))throw CliErrors[_0x1d62f8(0x1d1)](_0x1d62f8(0x1d8),_0x1d62f8(0x1db));return _0x2b36ae;}
|
package/lib/utils/platform.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a305_0x3686(_0x57f62e,_0x33953a){_0x57f62e=_0x57f62e-0x131;const _0xf89080=a305_0xf890();let _0x36865e=_0xf89080[_0x57f62e];return _0x36865e;}const a305_0x283903=a305_0x3686;(function(_0x185a87,_0x199e50){const _0x4908c4=a305_0x3686,_0x18fa1f=_0x185a87();while(!![]){try{const _0xb16439=-parseInt(_0x4908c4(0x134))/0x1+-parseInt(_0x4908c4(0x137))/0x2+-parseInt(_0x4908c4(0x138))/0x3*(parseInt(_0x4908c4(0x13b))/0x4)+-parseInt(_0x4908c4(0x136))/0x5+parseInt(_0x4908c4(0x135))/0x6*(parseInt(_0x4908c4(0x131))/0x7)+parseInt(_0x4908c4(0x132))/0x8*(parseInt(_0x4908c4(0x13c))/0x9)+parseInt(_0x4908c4(0x139))/0xa;if(_0xb16439===_0x199e50)break;else _0x18fa1f['push'](_0x18fa1f['shift']());}catch(_0x291fc0){_0x18fa1f['push'](_0x18fa1f['shift']());}}}(a305_0xf890,0xd0622));function a305_0xf890(){const _0x2a12b4=['99768NWafsF','platform','1189905ZwCXKy','24yHjhVF','5183410ROaUjD','147648LSUqCf','137721nKkhep','18780690mvbaAh','win32','68McmRSX','585mEfAXd','.cmd','2179947zCoavn'];a305_0xf890=function(){return _0x2a12b4;};return a305_0xf890();}export const isWindows=process[a305_0x283903(0x133)]===a305_0x283903(0x13a);export function resolveNpmBin(_0x2bf386){const _0x4f3e59=a305_0x283903;return isWindows?_0x2bf386+_0x4f3e59(0x13d):_0x2bf386;}
|