@lovrabet/rabetbase-cli 2.3.2 → 2.3.3-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/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-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.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 -0
- 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/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/workspace/index.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-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a192_0x521fde=a192_0x1a91;(function(_0x387b39,_0x3f9dfd){const _0x3959fe=a192_0x1a91,_0x5a99ae=_0x387b39();while(!![]){try{const _0x248be3=-parseInt(_0x3959fe(0x1ad))/0x1+parseInt(_0x3959fe(0x1aa))/0x2+-parseInt(_0x3959fe(0x198))/0x3*(-parseInt(_0x3959fe(0x19a))/0x4)+parseInt(_0x3959fe(0x1a3))/0x5+-parseInt(_0x3959fe(0x197))/0x6+parseInt(_0x3959fe(0x1a4))/0x7+-parseInt(_0x3959fe(0x1b0))/0x8;if(_0x248be3===_0x3f9dfd)break;else _0x5a99ae['push'](_0x5a99ae['shift']());}catch(_0x5e0d34){_0x5a99ae['push'](_0x5a99ae['shift']());}}}(a192_0x472b,0x62395));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';function a192_0x1a91(_0x1b71f5,_0x4116ed){_0x1b71f5=_0x1b71f5-0x197;const _0x472b01=a192_0x472b();let _0x1a918f=_0x472b01[_0x1b71f5];return _0x1a918f;}export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI='skills';export const NPX_SKILLS_SUBCOMMAND_ADD=a192_0x521fde(0x1a0);export const NPX_SKILLS_FLAG_SKILL='--skill';export const RABETBASE_SKILL_SOURCE=a192_0x521fde(0x1ae);export const LEGACY_RABETBASE_SKILL_SOURCE='lovrabet/lovrabet-skill';export const DEFAULT_RABETBASE_SKILL_NAME=a192_0x521fde(0x1ab);function a192_0x472b(){const _0x5a0de8=['trim','join','inherit','add','status','toString','1758270aPpPBc','5345333LbzQVe','remove','stdout','push','skill','log','201072mJFtvp','Lovrabet','stdio','169918kQvnSX','lovrabet/rabetbase','yes','4092408ebIGrL','stderr','pipe','3879288xQcTSW','67113kNMIaT','exit\x20','92jFMjww','npx','unknown'];a192_0x472b=function(){return _0x5a0de8;};return a192_0x472b();}export function buildNpxSkillsAddArgv(_0x37fc32){const _0x4eaedd=a192_0x521fde,_0x385580=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE];return _0x37fc32&&_0x385580[_0x4eaedd(0x1a7)](NPX_SKILLS_FLAG_SKILL,_0x37fc32),_0x385580;}export const NPX_SKILLS_ADD_COMMAND_LINE=['npx',...buildNpxSkillsAddArgv()]['join']('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=['npx',NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a192_0x521fde(0x19e)]('\x20');export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x41350d,_0x3a16d6){const _0x2b2018=a192_0x521fde;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x220130=_0x3a16d6?.[_0x2b2018(0x1ac)]??_0x2b2018(0x19f),_0x14c426=resolveNpmBin(_0x2b2018(0x19b)),_0x3f4f2f=buildNpxSkillsAddArgv(_0x3a16d6?.[_0x2b2018(0x1a8)]),_0x4ebaa4=[_0x2b2018(0x19b),..._0x3f4f2f][_0x2b2018(0x19e)]('\x20');console[_0x2b2018(0x1a9)]('*\x20'+_0x4ebaa4);const _0xfabd17=spawnSync(_0x14c426,_0x3f4f2f,{'cwd':_0x41350d,'stdio':_0x220130,'env':process.env,'shell':![]}),_0x59c3c6=_0xfabd17[_0x2b2018(0x1a1)];if(_0x59c3c6===0x0)return{'ok':!![],'status':0x0};let _0x467cfe=_0x2b2018(0x199)+(_0x59c3c6??'unknown');if(_0x220130==='pipe'){const _0x1cbc57=_0xfabd17['stderr']?_0xfabd17[_0x2b2018(0x1b1)][_0x2b2018(0x1a2)]()[_0x2b2018(0x19d)]():'',_0x111b70=_0xfabd17[_0x2b2018(0x1a6)]?_0xfabd17[_0x2b2018(0x1a6)][_0x2b2018(0x1a2)]()[_0x2b2018(0x19d)]():'';if(_0x1cbc57)_0x467cfe=_0x1cbc57;else{if(_0x111b70)_0x467cfe=_0x111b70;}}return{'ok':![],'status':_0x59c3c6??null,'error':_0x467cfe};}export function runNpxSkillsRemove(_0x3208b2,_0x4297df,_0x169e68=LEGACY_RABETBASE_SKILL_SOURCE){const _0xf5a39d=a192_0x521fde;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x1ee7d8=_0x4297df?.['stdio']??_0xf5a39d(0x19f),_0x5b1fde=resolveNpmBin(_0xf5a39d(0x19b)),_0x32f140=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0xf5a39d(0x1a5),_0x169e68,NPX_SKILLS_FLAG_SKILL,_0x4297df?.[_0xf5a39d(0x1a8)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x4297df?.[_0xf5a39d(0x1af)]?['-y']:[]],_0x4446e2=[_0x5b1fde,..._0x32f140][_0xf5a39d(0x19e)]('\x20');console[_0xf5a39d(0x1a9)]('*\x20'+_0x4446e2);const _0x4f00e1=spawnSync(_0x5b1fde,_0x32f140,{'cwd':_0x3208b2,'stdio':_0x1ee7d8,'env':process.env,'shell':![]}),_0x5ef42a=_0x4f00e1[_0xf5a39d(0x1a1)];if(_0x5ef42a===0x0)return{'ok':!![],'status':0x0};let _0x4e560c=_0xf5a39d(0x199)+(_0x5ef42a??_0xf5a39d(0x19c));if(_0x1ee7d8==='pipe'){const _0x438aa4=_0x4f00e1['stderr']?_0x4f00e1[_0xf5a39d(0x1b1)][_0xf5a39d(0x1a2)]()[_0xf5a39d(0x19d)]():'',_0x74e5d7=_0x4f00e1[_0xf5a39d(0x1a6)]?_0x4f00e1[_0xf5a39d(0x1a6)][_0xf5a39d(0x1a2)]()[_0xf5a39d(0x19d)]():'';if(_0x438aa4)_0x4e560c=_0x438aa4;else{if(_0x74e5d7)_0x4e560c=_0x74e5d7;}}return{'ok':![],'status':_0x5ef42a??null,'error':_0x4e560c};}export function runNpxSkillsAddGlobal(_0x3954e4,_0x5bd578,_0x14ece5){const _0x2ff9ba=a192_0x521fde;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0xb66580=_0x14ece5?.[_0x2ff9ba(0x1ac)]??_0x2ff9ba(0x19f),_0x178850=resolveNpmBin(_0x2ff9ba(0x19b)),_0x2d2b78=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x5bd578,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x200372=['npx',NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x5bd578,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES]['join']('\x20');console[_0x2ff9ba(0x1a9)]('*\x20'+_0x200372);const _0x1eb97c=spawnSync(_0x178850,_0x2d2b78,{'cwd':_0x3954e4,'stdio':_0xb66580,'env':process.env,'shell':![]}),_0x32a8df=_0x1eb97c[_0x2ff9ba(0x1a1)];if(_0x32a8df===0x0)return{'ok':!![],'status':0x0};let _0x56ca45=_0x2ff9ba(0x199)+(_0x32a8df??_0x2ff9ba(0x19c));if(_0xb66580===_0x2ff9ba(0x1b2)){const _0x2a6a5f=_0x1eb97c[_0x2ff9ba(0x1b1)]?_0x1eb97c['stderr']['toString']()[_0x2ff9ba(0x19d)]():'',_0x5eb459=_0x1eb97c['stdout']?_0x1eb97c[_0x2ff9ba(0x1a6)][_0x2ff9ba(0x1a2)]()[_0x2ff9ba(0x19d)]():'';if(_0x2a6a5f)_0x56ca45=_0x2a6a5f;else{if(_0x5eb459)_0x56ca45=_0x5eb459;}}return{'ok':![],'status':_0x32a8df??null,'error':_0x56ca45};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x261d7d,_0x3bf46b){const _0x13a123=a193_0x46f9,_0x347650=_0x261d7d();while(!![]){try{const _0x3bd1d6=-parseInt(_0x13a123(0xa7))/0x1+-parseInt(_0x13a123(0xa9))/0x2*(-parseInt(_0x13a123(0xa2))/0x3)+parseInt(_0x13a123(0xa6))/0x4*(-parseInt(_0x13a123(0xa4))/0x5)+parseInt(_0x13a123(0xa5))/0x6+parseInt(_0x13a123(0xaa))/0x7*(parseInt(_0x13a123(0xa3))/0x8)+parseInt(_0x13a123(0x9e))/0x9+parseInt(_0x13a123(0x9f))/0xa;if(_0x3bd1d6===_0x3bf46b)break;else _0x347650['push'](_0x347650['shift']());}catch(_0x36c18a){_0x347650['push'](_0x347650['shift']());}}}(a193_0x4980,0x330d7));function a193_0x4980(){const _0x39a2cb=['message','command','15tqWyTv','11824jjhYBs','1845AOKDhT','895986DDINGm','3772gqSrpU','321078zKCMGJ','error','114732trfNzM','1694kQuAec','entries','[REDACTED]','flags','test','rabetbase.command','durationMs','some','674136LHVvak','94150qkgfDw'];a193_0x4980=function(){return _0x39a2cb;};return a193_0x4980();}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a193_0x46f9(_0x2c920e,_0x1e8de6){_0x2c920e=_0x2c920e-0x97;const _0x498057=a193_0x4980();let _0x46f9a6=_0x498057[_0x2c920e];return _0x46f9a6;}import{getCliVersion}from'../utils/version.js';const SENSITIVE_PATTERNS=[/cookie/i,/token/i,/password/i,/passwd/i,/secret/i,/auth/i,/session/i,/credential/i,/^value$/i];function isSensitiveKey(_0x5d4b49){const _0x180955=a193_0x46f9;return SENSITIVE_PATTERNS[_0x180955(0x9d)](_0x57ca0f=>_0x57ca0f[_0x180955(0x9a)](_0x5d4b49));}function sanitizeFlags(_0x1697f6){const _0x144e22=a193_0x46f9,_0x499832={};for(const [_0x5c82e3,_0x28920a]of Object[_0x144e22(0x97)](_0x1697f6)){isSensitiveKey(_0x5c82e3)?_0x499832[_0x5c82e3]=_0x28920a!=null&&_0x28920a!==''?_0x144e22(0x98):_0x28920a:_0x499832[_0x5c82e3]=_0x28920a;}return _0x499832;}export async function reportCommandTrace(_0x1e3790){const _0x5a795e=a193_0x46f9;try{const _0x509b06=sanitizeFlags(_0x1e3790[_0x5a795e(0x99)]);await sendCliTraceLog({'spanName':_0x5a795e(0x9b),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x1e3790['service'],'command.name':_0x1e3790[_0x5a795e(0xa1)],'command.flags':JSON['stringify'](_0x509b06),..._0x1e3790[_0x5a795e(0x9c)]!=null?{'command.duration_ms':_0x1e3790[_0x5a795e(0x9c)]}:{},..._0x1e3790[_0x5a795e(0xa8)]?{'command.error':_0x1e3790[_0x5a795e(0xa8)]instanceof Error?_0x1e3790[_0x5a795e(0xa8)][_0x5a795e(0xa0)]:String(_0x1e3790[_0x5a795e(0xa8)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x56260e,_0x13cdcf){var _0x17cdf8=a194_0x3487,_0x6abf95=_0x56260e();while(!![]){try{var _0x581ca1=parseInt(_0x17cdf8(0x1ca))/0x1+parseInt(_0x17cdf8(0x1c4))/0x2*(parseInt(_0x17cdf8(0x1c8))/0x3)+parseInt(_0x17cdf8(0x1c3))/0x4+-parseInt(_0x17cdf8(0x1c9))/0x5+parseInt(_0x17cdf8(0x1c6))/0x6+-parseInt(_0x17cdf8(0x1c7))/0x7+-parseInt(_0x17cdf8(0x1c5))/0x8*(parseInt(_0x17cdf8(0x1c2))/0x9);if(_0x581ca1===_0x13cdcf)break;else _0x6abf95['push'](_0x6abf95['shift']());}catch(_0xa9fc58){_0x6abf95['push'](_0x6abf95['shift']());}}}(a194_0x3db7,0x95939));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x3880e8,_0x135a96){var _0x358a82=a194_0x3487;try{await sendCliTraceLog({'spanName':'cli.help','logData':{'rabetbase.help.kind':_0x3880e8,..._0x135a96?.[_0x358a82(0x1cc)]&&{'rabetbase.help.service':_0x135a96['service']}}});}catch(_0x46e54d){console[_0x358a82(0x1cd)](_0x358a82(0x1cb),_0x46e54d);}}function a194_0x3487(_0x5d2fda,_0x59fe2c){_0x5d2fda=_0x5d2fda-0x1c2;var _0x3db720=a194_0x3db7();var _0x348704=_0x3db720[_0x5d2fda];return _0x348704;}function a194_0x3db7(){var _0x3c50cf=['2huMZmz','8QwcoPX','5830104AySKic','152299OebYSD','3656787eqpcjx','3947730iChxwS','370909vWTaDE','Failed\x20to\x20report\x20CLI\x20help\x20trace:','service','error','20036124BbCtON','4354728YJcHxW'];a194_0x3db7=function(){return _0x3c50cf;};return a194_0x3db7();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x253470,_0x31f1cb){const _0x1c2b45=a195_0x4d32,_0xfd35d5=_0x253470();while(!![]){try{const _0x5157de=parseInt(_0x1c2b45(0x11b))/0x1+parseInt(_0x1c2b45(0x11d))/0x2+parseInt(_0x1c2b45(0x110))/0x3*(-parseInt(_0x1c2b45(0x10d))/0x4)+parseInt(_0x1c2b45(0x115))/0x5+parseInt(_0x1c2b45(0x117))/0x6*(-parseInt(_0x1c2b45(0x119))/0x7)+-parseInt(_0x1c2b45(0x118))/0x8+parseInt(_0x1c2b45(0x111))/0x9*(parseInt(_0x1c2b45(0x10e))/0xa);if(_0x5157de===_0x31f1cb)break;else _0xfd35d5['push'](_0xfd35d5['shift']());}catch(_0x47feba){_0xfd35d5['push'](_0xfd35d5['shift']());}}}(a195_0x24ee,0x70b55));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=![];function a195_0x4d32(_0x343daa,_0xa02358){_0x343daa=_0x343daa-0x10d;const _0x24ee80=a195_0x24ee();let _0x4d32c4=_0x24ee80[_0x343daa];return _0x4d32c4;}export async function ensureCliOtelTraceConfig(){const _0x18e127=a195_0x4d32,_0x4b6402=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x1a0a35=_0x4b6402?.['user'];setServiceConfig({'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x18e127(0x116)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?'daily':_0x18e127(0x10f))}),setUserContext({'id':_0x1a0a35?.['id'],'username':_0x1a0a35?.[_0x18e127(0x112)],'nickname':_0x1a0a35?.[_0x18e127(0x11c)],'email':_0x1a0a35?.[_0x18e127(0x113)],'tenantCode':_0x1a0a35?.[_0x18e127(0x11a)][_0x18e127(0x114)],'appCode':getConfigAppCode()}),cliOtelTraceInitialized=!![];}return _0x4b6402;}function a195_0x24ee(){const _0x1c6420=['23796UADBJy','3472560ZRTwjT','1365VsbMnd','tenant','834096HKzpui','nickname','133988xerrnK','268eOgzJU','10ZbItMs','production','3903nyvfwk','5719383AHekqe','username','email','tenant_code','1098415okKTJt','unknown'];a195_0x24ee=function(){return _0x1c6420;};return a195_0x24ee();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a196_0x4a7d(){const _0x124c99=['2zkvrbz','348744QmycyK','23594300EwjzDm','SIGTERM','1838424bKxFJn','14LSwdVm','238674qNxsVA','5250753DxltXz','4367288mmRNjG','4932212riSEMl','then','10bzUgjL','once','beforeExit','exit','SIGINT'];a196_0x4a7d=function(){return _0x124c99;};return a196_0x4a7d();}function a196_0x5359(_0x34cddf,_0x230d83){_0x34cddf=_0x34cddf-0x164;const _0x4a7d25=a196_0x4a7d();let _0x535957=_0x4a7d25[_0x34cddf];return _0x535957;}(function(_0x268f56,_0x53fb3f){const _0x6739cb=a196_0x5359,_0x25a7e7=_0x268f56();while(!![]){try{const _0x331137=parseInt(_0x6739cb(0x16b))/0x1*(-parseInt(_0x6739cb(0x165))/0x2)+parseInt(_0x6739cb(0x169))/0x3+parseInt(_0x6739cb(0x16e))/0x4+-parseInt(_0x6739cb(0x170))/0x5*(parseInt(_0x6739cb(0x166))/0x6)+parseInt(_0x6739cb(0x16a))/0x7*(parseInt(_0x6739cb(0x16d))/0x8)+parseInt(_0x6739cb(0x16c))/0x9+-parseInt(_0x6739cb(0x167))/0xa;if(_0x331137===_0x53fb3f)break;else _0x25a7e7['push'](_0x25a7e7['shift']());}catch(_0x27e4e3){_0x25a7e7['push'](_0x25a7e7['shift']());}}}(a196_0x4a7d,0xc4f5c));import{shutdownTraces}from'@lovrabet/otel-logger';let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0x117e9e=a196_0x5359;process[_0x117e9e(0x171)](_0x117e9e(0x172),()=>{void flushOtelNodeIfUsed();});const _0x6fff11=()=>{const _0x3c7317=_0x117e9e;void flushOtelNodeIfUsed()[_0x3c7317(0x16f)](()=>process[_0x3c7317(0x173)](0x0));};process[_0x117e9e(0x171)](_0x117e9e(0x164),_0x6fff11),process[_0x117e9e(0x171)](_0x117e9e(0x168),_0x6fff11);}export async function exitWithOtelShutdown(_0x3315e3){const _0x571d24=a196_0x5359;await flushOtelNodeIfUsed(),process[_0x571d24(0x173)](_0x3315e3);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a197_0x548bfc=a197_0x4805;(function(_0x2181d5,_0x5bb569){const _0x35a9c7=a197_0x4805,_0x318149=_0x2181d5();while(!![]){try{const _0x393fad=parseInt(_0x35a9c7(0xec))/0x1*(parseInt(_0x35a9c7(0xdf))/0x2)+parseInt(_0x35a9c7(0xed))/0x3+parseInt(_0x35a9c7(0xde))/0x4+-parseInt(_0x35a9c7(0xeb))/0x5+parseInt(_0x35a9c7(0xe0))/0x6+-parseInt(_0x35a9c7(0xe2))/0x7+parseInt(_0x35a9c7(0xe9))/0x8*(-parseInt(_0x35a9c7(0xea))/0x9);if(_0x393fad===_0x5bb569)break;else _0x318149['push'](_0x318149['shift']());}catch(_0x413836){_0x318149['push'](_0x318149['shift']());}}}(a197_0x2abc,0x9df83));function a197_0x4805(_0xcc8b1e,_0x4f98ba){_0xcc8b1e=_0xcc8b1e-0xde;const _0x2abc45=a197_0x2abc();let _0x4805e7=_0x2abc45[_0xcc8b1e];return _0x4805e7;}import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';function a197_0x2abc(){const _0x1e6e8e=['5142908iVVjOL','26gRVSpO','4280400LISTqe','logData','2563113NhFinm','spanName','rabetbase-cli','traceparent','manual','traceName','version','7704248eBceXd','9XJpvrv','4805825qskQAB','29519LHPkWi','1663572uaIMEQ'];a197_0x2abc=function(){return _0x1e6e8e;};return a197_0x2abc();}const DEFAULT_TRACE_NAME=a197_0x548bfc(0xe4);export async function sendCliTraceLog(_0xb5cb65){const _0x2a6ef4=a197_0x548bfc;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0xb5cb65[_0x2a6ef4(0xe7)]??DEFAULT_TRACE_NAME,'version':_0xb5cb65[_0x2a6ef4(0xe8)]??getCliVersion(),'spanName':_0xb5cb65[_0x2a6ef4(0xe3)],'eventType':_0x2a6ef4(0xe6),'logData':_0xb5cb65[_0x2a6ef4(0xe1)],..._0xb5cb65['traceparent']&&{'traceparent':_0xb5cb65[_0x2a6ef4(0xe5)]}});}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a198_0x14be02=a198_0x27be;(function(_0x444db1,_0x2190a2){const _0x414bb6=a198_0x27be,_0x316e96=_0x444db1();while(!![]){try{const _0xffd6d6=-parseInt(_0x414bb6(0x110))/0x1+parseInt(_0x414bb6(0x10f))/0x2*(-parseInt(_0x414bb6(0x113))/0x3)+-parseInt(_0x414bb6(0x117))/0x4*(parseInt(_0x414bb6(0x10b))/0x5)+parseInt(_0x414bb6(0x11d))/0x6+parseInt(_0x414bb6(0x116))/0x7*(parseInt(_0x414bb6(0x112))/0x8)+parseInt(_0x414bb6(0x119))/0x9*(-parseInt(_0x414bb6(0x118))/0xa)+-parseInt(_0x414bb6(0x10e))/0xb*(-parseInt(_0x414bb6(0x10c))/0xc);if(_0xffd6d6===_0x2190a2)break;else _0x316e96['push'](_0x316e96['shift']());}catch(_0x483a78){_0x316e96['push'](_0x316e96['shift']());}}}(a198_0x9329,0xe9d7c));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a198_0x14be02(0x111);export const PLATFORM_ISSUE_SPAN_NAME=a198_0x14be02(0x11c);function a198_0x27be(_0x454b24,_0x135ae8){_0x454b24=_0x454b24-0x10b;const _0x9329f9=a198_0x9329();let _0x27be9e=_0x9329f9[_0x454b24];return _0x27be9e;}export async function sendPlatformIssueCollectLog(_0x36aa25){const _0x38c5f9=a198_0x14be02;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x36aa25[_0x38c5f9(0x10d)],'issue.description':_0x36aa25['description'],..._0x36aa25['sanitize']?{'issue.description_original_bytes':_0x36aa25[_0x38c5f9(0x11b)]['originalBytes'],'issue.description_truncated':_0x36aa25[_0x38c5f9(0x11b)][_0x38c5f9(0x114)],'issue.description_redactions':_0x36aa25['sanitize'][_0x38c5f9(0x11a)],'issue.description_redaction_kinds':_0x36aa25['sanitize'][_0x38c5f9(0x115)]['join'](',')}:{}}});}function a198_0x9329(){const _0x1abf92=['sanitize','issue.log.collect','7159872xkMCxF','53135QxjTfi','47871852yTRatI','title','11BAkbNS','1590134GQrgFT','1528070ZPYnUE','platform-issue-log-collect','8dyCkVp','6NylKiK','truncated','redactionKinds','8059541HDFCWN','252dfIWkW','15884710RZHfbn','9rLaoFN','redactionCount'];a198_0x9329=function(){return _0x1abf92;};return a198_0x9329();}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a200_0x462c87=a200_0x5ed2;(function(_0x46ad1e,_0x5813a0){const _0x5d7e40=a200_0x5ed2,_0x34a92b=_0x46ad1e();while(!![]){try{const _0x3501a5=parseInt(_0x5d7e40(0x162))/0x1+parseInt(_0x5d7e40(0x145))/0x2*(-parseInt(_0x5d7e40(0x160))/0x3)+-parseInt(_0x5d7e40(0x172))/0x4+parseInt(_0x5d7e40(0x14f))/0x5+-parseInt(_0x5d7e40(0x14e))/0x6*(-parseInt(_0x5d7e40(0x170))/0x7)+parseInt(_0x5d7e40(0x16c))/0x8+-parseInt(_0x5d7e40(0x144))/0x9*(parseInt(_0x5d7e40(0x150))/0xa);if(_0x3501a5===_0x5813a0)break;else _0x34a92b['push'](_0x34a92b['shift']());}catch(_0x3355f8){_0x34a92b['push'](_0x34a92b['shift']());}}}(a200_0x30b2,0x469d6));function a200_0x30b2(){const _0x550c2d=['.qoder','OpenCode\x20IDE','.codex','Cline\x20IDE','.qoder/skills/lovrabet/SKILL.md','opencode','qoder','.windsurf','.opencode','codebuddy','SKILL.md.tpl','antigravity','9gXqIfh','.windsurf/workflows/rabetbase.md','448586daflBi','cursor','Trae\x20IDE','claude','Claude\x20Code','.codebuddy','Qoder','Windsurf\x20IDE','通用模板\x20-\x20兜底方案','OpenCode','4504096CSYHaX','Antigravity\x20IDE','.agent/skills/lovrabet/SKILL.md','.cursor/skills/rabetbase.md','7eDWOcZ','codex','1497228JHYtAV','windsurf','.codex/skills/lovrabet/SKILL.md','Trae','Windsurf','agent','file','CodeBuddy\x20IDE','9VCqvYD','59274LTtgOk','Codex\x20IDE','.cline/skills/lovrabet/SKILL.md','cline','.agent','trae','Antigravity','CodeBuddy','.trae/skills/lovrabet/SKILL.md','3708pdZoby','1635625LOlqPM','5868850GzjuLR','.codebuddy/skills/lovrabet/SKILL.md','Codex','其他\x20(通用模板)'];a200_0x30b2=function(){return _0x550c2d;};return a200_0x30b2();}export const CORE_IDE_CONFIGS={'cursor':{'name':'Cursor','description':'Cursor\x20IDE','folders':['.cursorrules','.cursor'],'files':[{'type':a200_0x462c87(0x142),'path':a200_0x462c87(0x16f),'template':a200_0x462c87(0x15e)}]},'windsurf':{'name':a200_0x462c87(0x140),'description':a200_0x462c87(0x169),'folders':[a200_0x462c87(0x15b)],'files':[{'type':a200_0x462c87(0x142),'path':a200_0x462c87(0x161),'template':a200_0x462c87(0x15e)}]},'claude':{'name':a200_0x462c87(0x166),'description':a200_0x462c87(0x166),'folders':['.claude'],'files':[{'type':a200_0x462c87(0x142),'path':'.claude/skills/lovrabet/SKILL.md','template':a200_0x462c87(0x15e)}]},'cline':{'name':'Cline','description':a200_0x462c87(0x157),'folders':['.cline'],'files':[{'type':a200_0x462c87(0x142),'path':a200_0x462c87(0x147),'template':'SKILL.md.tpl'}]},'codex':{'name':a200_0x462c87(0x152),'description':a200_0x462c87(0x146),'folders':[a200_0x462c87(0x156)],'files':[{'type':a200_0x462c87(0x142),'path':a200_0x462c87(0x174),'template':a200_0x462c87(0x15e)}]},'opencode':{'name':a200_0x462c87(0x16b),'description':a200_0x462c87(0x155),'folders':[a200_0x462c87(0x15c)],'files':[{'type':a200_0x462c87(0x142),'path':'.opencode/skills/lovrabet/SKILL.md','template':a200_0x462c87(0x15e)}]},'qoder':{'name':a200_0x462c87(0x168),'description':'Qoder\x20IDE','folders':[a200_0x462c87(0x154)],'files':[{'type':a200_0x462c87(0x142),'path':'.qoder/rules/rabetbase.md','template':a200_0x462c87(0x15e)},{'type':'file','path':a200_0x462c87(0x158),'template':a200_0x462c87(0x15e)}]},'codebuddy':{'name':a200_0x462c87(0x14c),'description':a200_0x462c87(0x143),'folders':[a200_0x462c87(0x167)],'files':[{'type':a200_0x462c87(0x142),'path':a200_0x462c87(0x151),'template':a200_0x462c87(0x15e)}]},'trae':{'name':a200_0x462c87(0x13f),'description':a200_0x462c87(0x164),'folders':['.trae'],'files':[{'type':a200_0x462c87(0x142),'path':a200_0x462c87(0x14d),'template':a200_0x462c87(0x15e)}]}};function a200_0x5ed2(_0x5a80e7,_0x4af1f5){_0x5a80e7=_0x5a80e7-0x13f;const _0x30b249=a200_0x30b2();let _0x5ed283=_0x30b249[_0x5a80e7];return _0x5ed283;}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a200_0x462c87(0x153),'description':a200_0x462c87(0x16a),'folders':['.agent'],'files':[{'type':a200_0x462c87(0x142),'path':a200_0x462c87(0x16e),'template':a200_0x462c87(0x15e)}]},'antigravity':{'name':a200_0x462c87(0x14b),'description':a200_0x462c87(0x16d),'folders':[a200_0x462c87(0x149)],'files':[{'type':'file','path':'.agent/skills/lovrabet/SKILL.md','template':a200_0x462c87(0x15e)}]}};export const CORE_IDE_LIST=[a200_0x462c87(0x165),a200_0x462c87(0x148),a200_0x462c87(0x15d),a200_0x462c87(0x171),a200_0x462c87(0x163),a200_0x462c87(0x159),a200_0x462c87(0x15a),a200_0x462c87(0x14a),a200_0x462c87(0x173)];export const IDE_LIST=[a200_0x462c87(0x15f),a200_0x462c87(0x165),a200_0x462c87(0x148),a200_0x462c87(0x15d),'codex',a200_0x462c87(0x163),a200_0x462c87(0x159),a200_0x462c87(0x15a),'trae',a200_0x462c87(0x173),a200_0x462c87(0x141)];export const ALL_CORE_IDES=[a200_0x462c87(0x163),a200_0x462c87(0x173),a200_0x462c87(0x165),a200_0x462c87(0x148),a200_0x462c87(0x171),a200_0x462c87(0x159),a200_0x462c87(0x15a),a200_0x462c87(0x15d),a200_0x462c87(0x14a)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a201_0x32dd(_0x3c9012,_0x1eff86){_0x3c9012=_0x3c9012-0x1b4;const _0xa9f880=a201_0xa9f8();let _0x32dd99=_0xa9f880[_0x3c9012];return _0x32dd99;}function a201_0xa9f8(){const _0x402ec7=['2132gRyxpZ','1574ZEKxbf','755405EtzoEq','1760395aNQKRa','6124494rDzOaD','893123gBNhmV','130UHIuax','153UhpKOJ','12eSSrqx','1765464qaOKKm','572376nQnDsa'];a201_0xa9f8=function(){return _0x402ec7;};return a201_0xa9f8();}(function(_0x5916f2,_0x4430b2){const _0x4820fb=a201_0x32dd,_0x22c085=_0x5916f2();while(!![]){try{const _0x3aecb4=parseInt(_0x4820fb(0x1b8))/0x1*(parseInt(_0x4820fb(0x1b7))/0x2)+-parseInt(_0x4820fb(0x1b5))/0x3*(parseInt(_0x4820fb(0x1b4))/0x4)+-parseInt(_0x4820fb(0x1ba))/0x5+-parseInt(_0x4820fb(0x1bb))/0x6+parseInt(_0x4820fb(0x1b9))/0x7+parseInt(_0x4820fb(0x1b6))/0x8*(parseInt(_0x4820fb(0x1be))/0x9)+parseInt(_0x4820fb(0x1bd))/0xa*(parseInt(_0x4820fb(0x1bc))/0xb);if(_0x3aecb4===_0x4430b2)break;else _0x22c085['push'](_0x22c085['shift']());}catch(_0xac9b6c){_0x22c085['push'](_0x22c085['shift']());}}}(a201_0xa9f8,0xe0713));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';import{CliErrors}from'../errors.js';export const applyJqFilter=createJqFilter(CliErrors,{'bundledJqPaths':resolveBundledJqPaths()});
|
package/lib/utils/cdn-config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x539a81,_0x220384){const _0x3fc045=a202_0x533b,_0x5a531a=_0x539a81();while(!![]){try{const _0x126852=parseInt(_0x3fc045(0xae))/0x1*(parseInt(_0x3fc045(0xb0))/0x2)+-parseInt(_0x3fc045(0xb7))/0x3*(parseInt(_0x3fc045(0xb6))/0x4)+-parseInt(_0x3fc045(0xa9))/0x5+-parseInt(_0x3fc045(0xb9))/0x6+parseInt(_0x3fc045(0xb1))/0x7+-parseInt(_0x3fc045(0xac))/0x8+parseInt(_0x3fc045(0xb2))/0x9*(parseInt(_0x3fc045(0xb4))/0xa);if(_0x126852===_0x220384)break;else _0x5a531a['push'](_0x5a531a['shift']());}catch(_0xd3d3c5){_0x5a531a['push'](_0x5a531a['shift']());}}}(a202_0x3143,0x540a8));function a202_0x533b(_0x171d45,_0x8dce0d){_0x171d45=_0x171d45-0xa9;const _0x3143a8=a202_0x3143();let _0x533b8e=_0x3143a8[_0x171d45];return _0x533b8e;}import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x3c101f=a202_0x533b,_0x45db04=getTemplateBaseUrl(),_0x2e5545=[_0x45db04+'/config.json',_0x45db04+_0x3c101f(0xab)];for(const _0x56c6db of _0x2e5545){try{const _0x149f2a=await fetch(_0x56c6db,{'headers':{'Accept':_0x3c101f(0xad)}});if(!_0x149f2a['ok'])continue;const _0x16565c=await _0x149f2a[_0x3c101f(0xb5)]();if(!_0x16565c[_0x3c101f(0xaa)]?.['stableVersion']||!_0x16565c['sdk']?.[_0x3c101f(0xaf)]?.[_0x3c101f(0xb8)])continue;return _0x16565c;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;function a202_0x3143(){const _0x3f0fe7=['application/json','524211hMGGgt','node','2cCKcEw','3305946RoKxCO','3138606ZrtKdB','now','30cGiCen','json','2210856TFmjZM','3EKCWtL','stableVersion','2896242RgZMtY','2299735wPTJVq','cli','/config/index.json','1624728Pmojfk'];a202_0x3143=function(){return _0x3f0fe7;};return a202_0x3143();}const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];export async function getCdnConfig(){const _0x483bfb=a202_0x533b,_0xf38591=Date[_0x483bfb(0xb3)]();if(hasCachedConfig){const _0x572927=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0xf38591-cacheTime<_0x572927)return cachedConfig;}const _0x2eaca5=await fetchCdnConfig();return cachedConfig=_0x2eaca5,cacheTime=_0xf38591,hasCachedConfig=!![],_0x2eaca5;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a203_0x5cdd(){const _0x2acf06=['496824WgtMHc','stableVersion','node','packageName','\x1b[33m','npm\x20install\x20','devDependencies','651585qMIlTZ','existsSync','\x1b[0m','node_modules','\x1b[1m','164212erMZdC','needsUpgrade','readFileSync','\x20\x20\x20Current\x20version:\x20','@lovrabet/sdk','utf-8','package.json','parse','sdk','1126025qejqVt','73160CeEGFN','1617287HUikYO','all','69326fahLNv','dependencies','latest','join','coerce','\x20\x20\x20Upgrade\x20command:\x20','version','test','log','minVersion','utf8','1.2.0'];a203_0x5cdd=function(){return _0x2acf06;};return a203_0x5cdd();}const a203_0x7dab9a=a203_0x2f66;(function(_0x1d6f1c,_0x35671a){const _0x1b9d9e=a203_0x2f66,_0x239cdd=_0x1d6f1c();while(!![]){try{const _0x2c6678=parseInt(_0x1b9d9e(0xa2))/0x1+-parseInt(_0x1b9d9e(0x9f))/0x2+parseInt(_0x1b9d9e(0x90))/0x3+-parseInt(_0x1b9d9e(0x95))/0x4+parseInt(_0x1b9d9e(0x9e))/0x5+-parseInt(_0x1b9d9e(0x89))/0x6+-parseInt(_0x1b9d9e(0xa0))/0x7;if(_0x2c6678===_0x35671a)break;else _0x239cdd['push'](_0x239cdd['shift']());}catch(_0x3b2f41){_0x239cdd['push'](_0x239cdd['shift']());}}}(a203_0x5cdd,0x1d5b8));import a203_0x27e092 from'node:fs';import a203_0x44b31e from'node:path';import a203_0x4dc4f0 from'semver';function a203_0x2f66(_0x53a178,_0x2db90f){_0x53a178=_0x53a178-0x81;const _0x5cdd64=a203_0x5cdd();let _0x2f66a0=_0x5cdd64[_0x53a178];return _0x2f66a0;}import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a203_0x7dab9a(0x88);function isNonNumericVersion(_0x2b1b9b){const _0x2d794a=a203_0x7dab9a,_0x381fb7=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x381fb7['some'](_0x52c993=>_0x52c993[_0x2d794a(0x84)](_0x2b1b9b));}function getInstalledVersion(_0x40d668,_0x38a11c){const _0x1d2fd4=a203_0x7dab9a;try{const _0x341248=a203_0x44b31e[_0x1d2fd4(0xa5)](_0x40d668,_0x1d2fd4(0x93),_0x38a11c,_0x1d2fd4(0x9b));if(a203_0x27e092['existsSync'](_0x341248)){const _0x52a352=JSON[_0x1d2fd4(0x9c)](a203_0x27e092[_0x1d2fd4(0x97)](_0x341248,_0x1d2fd4(0x9a)));return _0x52a352['version']||null;}}catch{}return null;}async function getSdkStableVersion(){try{const _0xe8f1ab=await getCdnConfig();return _0xe8f1ab?.['sdk']?.['node']?.['stableVersion']||null;}catch{return null;}}async function getSdkPackageName(){const _0x4212ed=a203_0x7dab9a;try{const _0x2516fc=await getCdnConfig();return _0x2516fc?.[_0x4212ed(0x9d)]?.[_0x4212ed(0x8b)]?.[_0x4212ed(0x8c)]||'@lovrabet/sdk';}catch{return _0x4212ed(0x99);}}export async function checkSdkVersion(_0x15c2f6){const _0x4ecda7=a203_0x7dab9a,_0x583f7a=a203_0x44b31e['join'](_0x15c2f6,_0x4ecda7(0x9b)),[_0x26179d,_0x3e59d5]=await Promise[_0x4ecda7(0xa1)]([getSdkStableVersion(),getSdkPackageName()]),_0xc05d9=_0x26179d||FALLBACK_MIN_SDK_VERSION;if(!a203_0x27e092[_0x4ecda7(0x91)](_0x583f7a))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xc05d9,'packageName':_0x3e59d5,'stableVersion':_0x26179d};try{const _0x1c89cb=JSON[_0x4ecda7(0x9c)](a203_0x27e092[_0x4ecda7(0x97)](_0x583f7a,_0x4ecda7(0x87))),_0x4d3a50=_0x1c89cb[_0x4ecda7(0xa3)]||{},_0x1afaab=_0x1c89cb[_0x4ecda7(0x8f)]||{},_0x15d0da=_0x4d3a50[_0x3e59d5]||_0x1afaab[_0x3e59d5];if(!_0x15d0da)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xc05d9,'packageName':_0x3e59d5,'stableVersion':_0x26179d};let _0x4e1999=getInstalledVersion(_0x15c2f6,_0x3e59d5);!_0x4e1999&&(_0x4e1999=_0x15d0da);if(isNonNumericVersion(_0x15d0da))return{'installed':!![],'version':_0x4e1999,'needsUpgrade':![],'minVersion':_0xc05d9,'packageName':_0x3e59d5,'stableVersion':_0x26179d};const _0x166b96=a203_0x4dc4f0[_0x4ecda7(0x81)](_0x4e1999),_0x356702=a203_0x4dc4f0[_0x4ecda7(0x81)](_0xc05d9),_0x28a917=_0x166b96&&_0x356702?a203_0x4dc4f0['lt'](_0x166b96,_0x356702):![];return{'installed':!![],'version':_0x4e1999,'needsUpgrade':_0x28a917,'minVersion':_0xc05d9,'packageName':_0x3e59d5,'stableVersion':_0x26179d};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0xc05d9,'packageName':_0x3e59d5,'stableVersion':_0x26179d};}}export function checkSdkVersionSync(_0x211334){const _0x6a2d8a=a203_0x7dab9a,_0x512ed1=a203_0x44b31e['join'](_0x211334,_0x6a2d8a(0x9b)),_0x54887=_0x6a2d8a(0x99);if(!a203_0x27e092[_0x6a2d8a(0x91)](_0x512ed1))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x54887,'stableVersion':null};try{const _0x2ab0f5=JSON['parse'](a203_0x27e092[_0x6a2d8a(0x97)](_0x512ed1,_0x6a2d8a(0x87))),_0x4872df=_0x2ab0f5[_0x6a2d8a(0xa3)]||{},_0x1da6ea=_0x2ab0f5[_0x6a2d8a(0x8f)]||{},_0x49f633=_0x4872df[_0x54887]||_0x1da6ea[_0x54887];if(!_0x49f633)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x54887,'stableVersion':null};let _0x380e98=getInstalledVersion(_0x211334,_0x54887);!_0x380e98&&(_0x380e98=_0x49f633);if(isNonNumericVersion(_0x49f633))return{'installed':!![],'version':_0x380e98,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x54887,'stableVersion':null};const _0x5bff1f=a203_0x4dc4f0['coerce'](_0x380e98),_0x369be0=_0x5bff1f?a203_0x4dc4f0['lt'](_0x5bff1f,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x380e98,'needsUpgrade':_0x369be0,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x54887,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x54887,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x3e3abf){const _0xe158cc=a203_0x7dab9a;if(!_0x3e3abf[_0xe158cc(0x96)])return;const _0x185b37=_0xe158cc(0x8d),_0xc2a309=_0xe158cc(0x92),_0x5681c8=_0xe158cc(0x94),_0x1a4067=_0x3e3abf[_0xe158cc(0x8c)]||_0xe158cc(0x99),_0x5e7ca8=_0x3e3abf[_0xe158cc(0x8a)]||_0x3e3abf[_0xe158cc(0x86)],_0x14b6dd=_0xe158cc(0x8e)+_0x1a4067+'@'+(_0x5e7ca8||_0xe158cc(0xa4));console[_0xe158cc(0x85)](),console[_0xe158cc(0x85)](''+_0x185b37+_0x5681c8+'↪\x20SDK\x20update\x20available'+_0xc2a309),console[_0xe158cc(0x85)](_0x185b37+_0xe158cc(0x98)+_0x1a4067+'@'+_0x3e3abf[_0xe158cc(0x83)]+_0xc2a309),console[_0xe158cc(0x85)](_0x185b37+'\x20\x20\x20Stable\x20version:\x20'+_0x5e7ca8+_0xc2a309),console[_0xe158cc(0x85)](_0x185b37+_0xe158cc(0x82)+_0x14b6dd+_0xc2a309),console[_0xe158cc(0x85)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x396803,_0x1d28ea){const _0x3e8846=a204_0x48f8,_0x177898=_0x396803();while(!![]){try{const _0x29817c=-parseInt(_0x3e8846(0xdf))/0x1+-parseInt(_0x3e8846(0xeb))/0x2*(-parseInt(_0x3e8846(0xe9))/0x3)+parseInt(_0x3e8846(0xe2))/0x4+parseInt(_0x3e8846(0xfa))/0x5+-parseInt(_0x3e8846(0xe4))/0x6+parseInt(_0x3e8846(0xe1))/0x7*(parseInt(_0x3e8846(0xe5))/0x8)+-parseInt(_0x3e8846(0xf8))/0x9*(-parseInt(_0x3e8846(0xf1))/0xa);if(_0x29817c===_0x1d28ea)break;else _0x177898['push'](_0x177898['shift']());}catch(_0x3aee50){_0x177898['push'](_0x177898['shift']());}}}(a204_0x24a4,0xb1417));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';function a204_0x48f8(_0x26b7c9,_0x9e6c55){_0x26b7c9=_0x26b7c9-0xdd;const _0x24a466=a204_0x24a4();let _0x48f80c=_0x24a466[_0x26b7c9];return _0x48f80c;}import{fileURLToPath}from'node:url';import a204_0x5da06c from'semver';function a204_0x24a4(){const _0x2e9336=['6157245tOJkJy','npm\x20install\x20-g\x20','\x20\x20\x20Current\x20CLI\x20version:\x20','minimumVersion','package.json','coerce','join','\x1b[1m','961291QQUMUe','↪\x20Critical\x20CLI\x20upgrade\x20required','1337AgMHCS','4462104BcSKbD','\x20\x20\x20Stable\x20version:\x20','6439788HIGfRi','9304cjzYqf','minimumVersionMessage','\x20\x20\x20Minimum\x20supported:\x20','upgradeMessage','6WpXbTA','../..','38882bUDFwE','stableVersion','1.0.0','Upgrade\x20command:\x20','\x20\x20\x20','currentVersion','3340dTLIjl','\x1b[31m','\x20\x20\x20Upgrade\x20command:\x20','validation','parse','version','belowMinimum','4113eZDfMm','log'];a204_0x24a4=function(){return _0x2e9336;};return a204_0x24a4();}import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x1531f2){const _0xf9d413=a204_0x48f8,_0x46ed62=_0x1531f2['stableVersion']||'latest';return _0xf9d413(0xfb)+NPM_PACKAGE_NAME+'@'+_0x46ed62;}function getCurrentCliVersion(){const _0x5f0e1e=a204_0x48f8;try{const _0x47e7e5=fileURLToPath(import.meta.url),_0x5b52ea=resolve(dirname(_0x47e7e5),_0x5f0e1e(0xea)),_0x4307bc=resolve(_0x5b52ea,_0x5f0e1e(0xfe)),_0x1a932c=JSON[_0x5f0e1e(0xf5)](readFileSync(_0x4307bc,'utf-8'));return _0x1a932c[_0x5f0e1e(0xf6)]||_0x5f0e1e(0xed);}catch{return'1.0.0';}}export async function checkCliVersion(){const _0x3c6dd0=a204_0x48f8,_0xb8f120=getCurrentCliVersion(),_0x3758d4=await getCliVersionPolicy(),_0x44c7a2=_0x3758d4?.[_0x3c6dd0(0xec)]||null,_0x589a3e=_0x3758d4?.['minimumVersion']||null;let _0x5293a9=![],_0x267572=![];const _0x3880f9=a204_0x5da06c[_0x3c6dd0(0xff)](_0xb8f120);if(_0x3880f9&&_0x44c7a2)try{const _0x55bc89=a204_0x5da06c[_0x3c6dd0(0xff)](_0x44c7a2);if(_0x55bc89)_0x5293a9=a204_0x5da06c['lt'](_0x3880f9,_0x55bc89);}catch{}if(_0x3880f9&&_0x589a3e)try{const _0x324808=a204_0x5da06c[_0x3c6dd0(0xff)](_0x589a3e);if(_0x324808)_0x267572=a204_0x5da06c['lt'](_0x3880f9,_0x324808);}catch{}return _0x267572&&(_0x5293a9=!![]),{'currentVersion':_0xb8f120,'stableVersion':_0x44c7a2,'minimumVersion':_0x589a3e,'needsUpgrade':_0x5293a9,'belowMinimum':_0x267572,'isPreRelease':![],'upgradeMessage':_0x3758d4?.[_0x3c6dd0(0xe8)],'minimumVersionMessage':_0x3758d4?.[_0x3c6dd0(0xe6)]};}export function printCliUpgradeWarning(_0x48d2df){const _0x3a6827=a204_0x48f8;if(!_0x48d2df['needsUpgrade']&&!_0x48d2df['belowMinimum'])return;const _0x1ff0f5=_0x3a6827(0xf2),_0x55f68b='\x1b[33m',_0x361a8d='\x1b[0m',_0x107931=_0x3a6827(0xde),_0xa5692b=getCliUpgradeCommand(_0x48d2df);console[_0x3a6827(0xf9)](),_0x48d2df[_0x3a6827(0xf7)]?(console[_0x3a6827(0xf9)](''+_0x1ff0f5+_0x107931+_0x3a6827(0xe0)+_0x361a8d),console['log'](_0x1ff0f5+_0x3a6827(0xfc)+_0x48d2df[_0x3a6827(0xf0)]+_0x361a8d),_0x48d2df[_0x3a6827(0xfd)]&&console[_0x3a6827(0xf9)](_0x1ff0f5+_0x3a6827(0xe7)+_0x48d2df['minimumVersion']+_0x361a8d),_0x48d2df[_0x3a6827(0xec)]&&_0x48d2df[_0x3a6827(0xec)]!==_0x48d2df['minimumVersion']&&console[_0x3a6827(0xf9)](_0x1ff0f5+'\x20\x20\x20Recommended\x20stable:\x20'+_0x48d2df[_0x3a6827(0xec)]+_0x361a8d),_0x48d2df[_0x3a6827(0xe6)]&&console['log'](_0x1ff0f5+_0x3a6827(0xef)+_0x48d2df['minimumVersionMessage']+_0x361a8d),console[_0x3a6827(0xf9)](_0x1ff0f5+_0x3a6827(0xf3)+_0xa5692b+_0x361a8d)):(console['log'](''+_0x55f68b+_0x107931+'↪\x20New\x20version\x20available'+_0x361a8d),console[_0x3a6827(0xf9)](_0x55f68b+_0x3a6827(0xfc)+_0x48d2df[_0x3a6827(0xf0)]+_0x361a8d),console['log'](_0x55f68b+_0x3a6827(0xe3)+_0x48d2df[_0x3a6827(0xec)]+_0x361a8d),_0x48d2df[_0x3a6827(0xe8)]&&console['log'](_0x55f68b+_0x3a6827(0xef)+_0x48d2df['upgradeMessage']+_0x361a8d),console[_0x3a6827(0xf9)](_0x55f68b+_0x3a6827(0xf3)+_0xa5692b+_0x361a8d)),console[_0x3a6827(0xf9)]();}export function assertCliVersionSupported(_0x205e80){const _0x101e9a=a204_0x48f8;if(!_0x205e80[_0x101e9a(0xf7)])return;const _0x1dbccc=[_0x205e80[_0x101e9a(0xe6)],'Current\x20version:\x20'+_0x205e80[_0x101e9a(0xf0)],_0x205e80[_0x101e9a(0xfd)]?'Minimum\x20supported:\x20'+_0x205e80[_0x101e9a(0xfd)]:null,_0x101e9a(0xee)+getCliUpgradeCommand(_0x205e80)]['filter'](Boolean)[_0x101e9a(0xdd)]('\x0a');throw CliErrors[_0x101e9a(0xf4)]('Current\x20CLI\x20version\x20is\x20below\x20the\x20service\x20compatibility\x20support\x20line.',_0x1dbccc);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2b70a8,_0x5998ae){const _0x25dfd9=a205_0x4803,_0x57af8c=_0x2b70a8();while(!![]){try{const _0x409106=-parseInt(_0x25dfd9(0x148))/0x1+-parseInt(_0x25dfd9(0x140))/0x2*(parseInt(_0x25dfd9(0x13c))/0x3)+-parseInt(_0x25dfd9(0x143))/0x4*(-parseInt(_0x25dfd9(0x14f))/0x5)+-parseInt(_0x25dfd9(0x144))/0x6*(parseInt(_0x25dfd9(0x14d))/0x7)+-parseInt(_0x25dfd9(0x141))/0x8*(-parseInt(_0x25dfd9(0x13e))/0x9)+parseInt(_0x25dfd9(0x150))/0xa+parseInt(_0x25dfd9(0x152))/0xb;if(_0x409106===_0x5998ae)break;else _0x57af8c['push'](_0x57af8c['shift']());}catch(_0x50346c){_0x57af8c['push'](_0x57af8c['shift']());}}}(a205_0x4b74,0x86729));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 a205_0x4803(_0x3b934a,_0x3a393b){_0x3b934a=_0x3b934a-0x13c;const _0x4b74e3=a205_0x4b74();let _0x480341=_0x4b74e3[_0x3b934a];return _0x480341;}function pickString(_0xb32723){const _0x263c74=a205_0x4803;return typeof _0xb32723===_0x263c74(0x153)&&_0xb32723[_0x263c74(0x145)]()['length']>0x0?_0xb32723['trim']():null;}function a205_0x4b74(){const _0x3ab2dc=['string','476724APAowq','json','45CGngvd','minimumVersion','6uQCYJg','1451336aItoJZ','minVersion','4ICPKUd','1035726ZUsfAu','trim','stableVersion','minimumVersionMessage','588952asxJcf','now','application/json','object','recommendedVersion','28hVsccf','latestVersion','145165RsTYzu','769310eTeDiH','cli','14231888goZqxV'];a205_0x4b74=function(){return _0x3ab2dc;};return a205_0x4b74();}function normalizeCliVersionPolicy(_0x1705e4){const _0x6b95e9=a205_0x4803;if(!_0x1705e4||typeof _0x1705e4!==_0x6b95e9(0x14b))return null;const _0x2b0d7e=_0x1705e4,_0x466725=_0x2b0d7e[_0x6b95e9(0x151)]&&typeof _0x2b0d7e[_0x6b95e9(0x151)]===_0x6b95e9(0x14b)?_0x2b0d7e[_0x6b95e9(0x151)]:_0x2b0d7e,_0x42bf0a=pickString(_0x466725[_0x6b95e9(0x146)])||pickString(_0x466725[_0x6b95e9(0x14e)])||pickString(_0x466725[_0x6b95e9(0x14c)]),_0x69f9f4=pickString(_0x466725[_0x6b95e9(0x13f)])||pickString(_0x466725[_0x6b95e9(0x142)]);if(!_0x42bf0a&&!_0x69f9f4)return null;return{'stableVersion':_0x42bf0a,'minimumVersion':_0x69f9f4,'upgradeMessage':pickString(_0x466725['upgradeMessage'])||undefined,'minimumVersionMessage':pickString(_0x466725[_0x6b95e9(0x147)])||undefined};}export async function fetchCliVersionPolicy(){const _0x2106a6=a205_0x4803,_0x3ad864=new AbortController(),_0x29363c=setTimeout(()=>_0x3ad864['abort'](),FETCH_TIMEOUT_MS);try{const _0x76c6f6=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':_0x2106a6(0x14a)},'signal':_0x3ad864['signal']});if(!_0x76c6f6['ok'])return null;const _0x3219ad=await _0x76c6f6[_0x2106a6(0x13d)]();return normalizeCliVersionPolicy(_0x3219ad);}catch{return null;}finally{clearTimeout(_0x29363c);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x379173=a205_0x4803,_0x3bcaf5=Date[_0x379173(0x149)]();if(hasCachedPolicy){const _0x26c1f9=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x3bcaf5-cacheTime<_0x26c1f9)return cachedPolicy;}const _0x3f2484=await fetchCliVersionPolicy();return cachedPolicy=_0x3f2484,cacheTime=_0x3bcaf5,hasCachedPolicy=!![],_0x3f2484;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a206_0x4dae2a=a206_0x184e;(function(_0xbf8359,_0x3aa366){const _0x56a4a6=a206_0x184e,_0x1cc9f5=_0xbf8359();while(!![]){try{const _0x4d847a=-parseInt(_0x56a4a6(0xe5))/0x1+parseInt(_0x56a4a6(0xe7))/0x2+-parseInt(_0x56a4a6(0xe4))/0x3+parseInt(_0x56a4a6(0xe9))/0x4+-parseInt(_0x56a4a6(0xed))/0x5*(-parseInt(_0x56a4a6(0xec))/0x6)+-parseInt(_0x56a4a6(0xee))/0x7+parseInt(_0x56a4a6(0xea))/0x8;if(_0x4d847a===_0x3aa366)break;else _0x1cc9f5['push'](_0x1cc9f5['shift']());}catch(_0x5ec478){_0x1cc9f5['push'](_0x1cc9f5['shift']());}}}(a206_0x2835,0xbe3cb));function a206_0x184e(_0x390ab8,_0x346ae1){_0x390ab8=_0x390ab8-0xe4;const _0x28351a=a206_0x2835();let _0x184e38=_0x28351a[_0x390ab8];return _0x184e38;}function a206_0x2835(){const _0x13a8e6=['1755975QVJkTr','1011213VBPkYA','env','145222RfGYUP','project','3552028FzQHzk','6401744wkMbLU','string','61332MoeNfN','445vlECVj','2063915SiJmez'];a206_0x2835=function(){return _0x13a8e6;};return a206_0x2835();}import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a206_0x3fb7d9,getMultiAppConfigs as a206_0x269aad,getTemplateBaseUrl as a206_0x234edf}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';export{isInProject}from'../context.js';export function readConfig(_0x473dba){const _0x355787=a206_0x184e,_0xd2b9dc=readRawConfig(_0x473dba);return _0xd2b9dc[_0x355787(0xe6)]&&typeof _0xd2b9dc['env']===_0x355787(0xeb)&&initEnv(_0xd2b9dc[_0x355787(0xe6)]),_0xd2b9dc;}export function getConfigAppCode(){return a206_0x3fb7d9();}export function getMultiAppConfigs(_0x907310=a206_0x4dae2a(0xe8)){return a206_0x269aad(_0x907310);}export function getTemplateBaseUrl(){return a206_0x234edf();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a207_0x5b49(_0x437702,_0x49d87c){_0x437702=_0x437702-0x172;const _0x4907ff=a207_0x4907();let _0x5b498b=_0x4907ff[_0x437702];return _0x5b498b;}function a207_0x4907(){const _0x39db8f=['1930159UHcTra','mkdirSync','30339obcQkD','68VpwPDn','403950lKMiKv','name','1681070HCrbsz','811741BebZec','isDirectory','8CaxnfT','error','readdirSync','880476QunKgM','join','400930DNoAXg','复制目录时出错:','9TkyojP','copyFileSync','4LRYnMw'];a207_0x4907=function(){return _0x39db8f;};return a207_0x4907();}(function(_0x4d3103,_0x4e27e6){const _0x5011db=a207_0x5b49,_0x2480ac=_0x4d3103();while(!![]){try{const _0x240798=parseInt(_0x5011db(0x184))/0x1+-parseInt(_0x5011db(0x179))/0x2*(-parseInt(_0x5011db(0x178))/0x3)+parseInt(_0x5011db(0x175))/0x4*(-parseInt(_0x5011db(0x17c))/0x5)+parseInt(_0x5011db(0x182))/0x6+parseInt(_0x5011db(0x17d))/0x7*(-parseInt(_0x5011db(0x17f))/0x8)+parseInt(_0x5011db(0x173))/0x9*(-parseInt(_0x5011db(0x17a))/0xa)+-parseInt(_0x5011db(0x176))/0xb;if(_0x240798===_0x4e27e6)break;else _0x2480ac['push'](_0x2480ac['shift']());}catch(_0x5aadfb){_0x2480ac['push'](_0x2480ac['shift']());}}}(a207_0x4907,0x368f5));import a207_0x2e80ec from'node:path';import a207_0x443f27 from'node:fs';export async function copyDirectory(_0xab260a,_0x5841eb){const _0x1c1363=a207_0x5b49;try{const _0x3a443f=a207_0x443f27[_0x1c1363(0x181)](_0xab260a,{'withFileTypes':!![]});a207_0x443f27[_0x1c1363(0x177)](_0x5841eb,{'recursive':!![]});for(const _0x4f90a8 of _0x3a443f){const _0x1f8641=a207_0x2e80ec[_0x1c1363(0x183)](_0xab260a,_0x4f90a8[_0x1c1363(0x17b)]),_0x2dbd58=a207_0x2e80ec[_0x1c1363(0x183)](_0x5841eb,_0x4f90a8[_0x1c1363(0x17b)]);_0x4f90a8[_0x1c1363(0x17e)]()?await copyDirectory(_0x1f8641,_0x2dbd58):a207_0x443f27[_0x1c1363(0x174)](_0x1f8641,_0x2dbd58);}}catch(_0x581069){console[_0x1c1363(0x180)](_0x1c1363(0x172),_0x581069);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xa6909,_0x324e57){const _0x444022=a208_0x1f35,_0x53a935=_0xa6909();while(!![]){try{const _0x3775c4=-parseInt(_0x444022(0x116))/0x1+parseInt(_0x444022(0x114))/0x2+-parseInt(_0x444022(0x113))/0x3+parseInt(_0x444022(0x10e))/0x4*(-parseInt(_0x444022(0x117))/0x5)+-parseInt(_0x444022(0x115))/0x6+-parseInt(_0x444022(0x10c))/0x7*(parseInt(_0x444022(0x10d))/0x8)+parseInt(_0x444022(0x10f))/0x9*(parseInt(_0x444022(0x10b))/0xa);if(_0x3775c4===_0x324e57)break;else _0x53a935['push'](_0x53a935['shift']());}catch(_0x150840){_0x53a935['push'](_0x53a935['shift']());}}}(a208_0x1531,0xa009e));function toFiniteNumber(_0x5a1d83){const _0x12e710=a208_0x1f35;if(typeof _0x5a1d83==='number'&&Number[_0x12e710(0x111)](_0x5a1d83))return _0x5a1d83;if(typeof _0x5a1d83==='string'){const _0x40890a=_0x5a1d83[_0x12e710(0x110)]();if(!_0x40890a)return undefined;const _0x27b8bb=Number(_0x40890a);if(Number['isFinite'](_0x27b8bb))return _0x27b8bb;}return undefined;}export function normalizeEntityWithIdResponse(_0x1f2981){const _0x171f8e=a208_0x1f35,_0x461760=toFiniteNumber(_0x1f2981);if(_0x461760!==undefined)return{'id':_0x461760,'entity':{'id':_0x461760}};if(!_0x1f2981||typeof _0x1f2981!==_0x171f8e(0x112))return{'id':undefined,'entity':{}};const _0x3f8d6d={..._0x1f2981},_0x17873b=toFiniteNumber(_0x3f8d6d['id']);return _0x17873b!==undefined&&(_0x3f8d6d['id']=_0x17873b),{'id':_0x17873b,'entity':_0x3f8d6d};}function a208_0x1f35(_0x531094,_0x16d833){_0x531094=_0x531094-0x10b;const _0x153101=a208_0x1531();let _0x1f357f=_0x153101[_0x531094];return _0x1f357f;}function a208_0x1531(){const _0x5072bb=['18232ibMuxS','664SslbnI','33694965vUqsea','trim','isFinite','object','2930718TaIskp','509914kKuXsg','2946732CVQxEn','106329CWFNFL','16420wyBaCR','10AsVJmn','3759PrGyHi'];a208_0x1531=function(){return _0x5072bb;};return a208_0x1531();}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2ce99e,_0x60afec){const _0x14906e=a209_0x4b31,_0x3c9b06=_0x2ce99e();while(!![]){try{const _0x23851b=-parseInt(_0x14906e(0x6e))/0x1+parseInt(_0x14906e(0x6a))/0x2+-parseInt(_0x14906e(0x6c))/0x3*(parseInt(_0x14906e(0x6f))/0x4)+-parseInt(_0x14906e(0x65))/0x5*(-parseInt(_0x14906e(0x66))/0x6)+parseInt(_0x14906e(0x6d))/0x7*(-parseInt(_0x14906e(0x68))/0x8)+-parseInt(_0x14906e(0x69))/0x9+-parseInt(_0x14906e(0x67))/0xa*(-parseInt(_0x14906e(0x6b))/0xb);if(_0x23851b===_0x60afec)break;else _0x3c9b06['push'](_0x3c9b06['shift']());}catch(_0x52ceee){_0x3c9b06['push'](_0x3c9b06['shift']());}}}(a209_0x2079,0x32bae));function a209_0x4b31(_0x1c1db3,_0x406a6e){_0x1c1db3=_0x1c1db3-0x65;const _0x207969=a209_0x2079();let _0x4b319a=_0x207969[_0x1c1db3];return _0x4b319a;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x3d1f6f,_0x3ddca4){const _0x5258c8=statSync(_0x3d1f6f);if(_0x5258c8['isDirectory']()){!existsSync(_0x3ddca4)&&mkdirSync(_0x3ddca4,{'recursive':!![]});const _0x2e6755=readdirSync(_0x3d1f6f);for(const _0x46f6fd of _0x2e6755){await copyDir(join(_0x3d1f6f,_0x46f6fd),join(_0x3ddca4,_0x46f6fd));}}else copyFileSync(_0x3d1f6f,_0x3ddca4);}export function ensureDir(_0x53ce31){!existsSync(_0x53ce31)&&mkdirSync(_0x53ce31,{'recursive':!![]});}export function pathExists(_0x168355){return existsSync(_0x168355);}function a209_0x2079(){const _0x5a4c8e=['65oKRytv','124434DEjzEZ','150660xIkdHn','1408MlKXuX','1608966BTILff','199350pFDinF','198tngtXy','36VVFuRS','4151tYyqMu','62802NmZkeu','28912ZrHzom'];a209_0x2079=function(){return _0x5a4c8e;};return a209_0x2079();}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a210_0x59ca04=a210_0x1958;(function(_0x138b10,_0x38faf1){const _0x36420b=a210_0x1958,_0x2cc487=_0x138b10();while(!![]){try{const _0x4ef179=parseInt(_0x36420b(0x15e))/0x1*(parseInt(_0x36420b(0x16a))/0x2)+parseInt(_0x36420b(0x162))/0x3+parseInt(_0x36420b(0x173))/0x4+-parseInt(_0x36420b(0x16d))/0x5*(-parseInt(_0x36420b(0x174))/0x6)+parseInt(_0x36420b(0x15d))/0x7*(parseInt(_0x36420b(0x15c))/0x8)+-parseInt(_0x36420b(0x156))/0x9*(-parseInt(_0x36420b(0x170))/0xa)+-parseInt(_0x36420b(0x175))/0xb;if(_0x4ef179===_0x38faf1)break;else _0x2cc487['push'](_0x2cc487['shift']());}catch(_0x2aedbd){_0x2cc487['push'](_0x2cc487['shift']());}}}(a210_0x43b3,0x598b4));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 _0x3c1215=a210_0x1958,_0x58b8c0=getTemplateBaseUrl();return _0x58b8c0+_0x3c1215(0x154);}const CACHE_DIR=join(homedir(),'.lovrabet','cache');export async function fetchGuidesFromCDN(){const _0x3f66e0=a210_0x1958,_0x7a7003=getGuidesCdnUrl(),_0x43796e=await fetch(_0x7a7003,{'headers':{'Accept':'application/json'}});if(!_0x43796e['ok'])throw new Error(_0x3f66e0(0x166)+_0x43796e['status']+'\x20'+_0x43796e[_0x3f66e0(0x167)]);const _0x281065=await _0x43796e[_0x3f66e0(0x161)]();if(!_0x281065[_0x3f66e0(0x165)]||typeof _0x281065[_0x3f66e0(0x165)]!==_0x3f66e0(0x16b))throw new Error(_0x3f66e0(0x159));return _0x281065;}export function writeGuidesToProject(_0xf4887d,_0x2565cf,_0x1b191b=a210_0x59ca04(0x16c),_0x33214c){const _0x316c0e=a210_0x59ca04,_0x4f614e=join(_0x2565cf,_0x1b191b);mkdirSync(_0x4f614e,{'recursive':!![]});for(const [_0x56e4c2,_0x5c46b6]of Object[_0x316c0e(0x158)](_0xf4887d['guides'])){let _0x50cf06=_0x5c46b6[_0x316c0e(0x171)];_0x5c46b6[_0x316c0e(0x157)]&&(_0x50cf06=appendUpdateTime(_0x50cf06,_0x5c46b6[_0x316c0e(0x157)])),writeFileSync(join(_0x4f614e,_0x56e4c2+'.md'),_0x50cf06,'utf-8');}}export function appendUpdateTime(_0x502a2b,_0x114000){const _0x297c0b=a210_0x59ca04;return _0x502a2b=_0x502a2b[_0x297c0b(0x16e)](/\n*>更新时间:.*$/m,''),_0x502a2b[_0x297c0b(0x160)]()+(_0x297c0b(0x15a)+_0x114000);}export function getSkillTemplate(_0x1c92be){return _0x1c92be['skillTemplate']?.['content']||'';}function a210_0x1958(_0x1cafc2,_0x52b6e6){_0x1cafc2=_0x1cafc2-0x154;const _0x43b323=a210_0x43b3();let _0x1958b1=_0x43b323[_0x1cafc2];return _0x1958b1;}export function appendExtendContents(_0x3c8543,_0x386f46,_0x34885c){const _0x1a180c=a210_0x59ca04,_0x245553=[];for(const [,_0x4bc1a1]of Object['entries'](_0x386f46[_0x1a180c(0x165)])){_0x4bc1a1[_0x1a180c(0x15f)]&&_0x245553['push'](_0x4bc1a1['extendContent']['trimEnd']());}if(_0x245553['length']===0x0)return _0x3c8543;return _0x3c8543['trimEnd']()+'\x0a\x0a'+_0x245553[_0x1a180c(0x16f)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x6116c2,_0x5cb892,_0x24683f){const _0x332eef=a210_0x59ca04,_0x4cbe98=getSkillTemplate(_0x6116c2);if(!_0x4cbe98)throw new Error(_0x332eef(0x169));const _0x2d2544=dirname(_0x5cb892);mkdirSync(_0x2d2544,{'recursive':!![]});let _0x53b366=_0x4cbe98['replace'](/\{\{IDE_NAME\}\}/g,_0x24683f);_0x53b366=appendExtendContents(_0x53b366,_0x6116c2),_0x6116c2['skillTemplate']['lastUpdated']&&(_0x53b366=appendUpdateTime(_0x53b366,_0x6116c2[_0x332eef(0x172)][_0x332eef(0x157)])),writeFileSync(_0x5cb892,_0x53b366,'utf-8');}function a210_0x43b3(){const _0x326408=['trimEnd','json','856734BGDWbP','title','map','guides','CDN\x20请求失败:\x20','statusText','keys','CDN\x20数据中缺少\x20skillTemplate','110750PhDwbt','object','.lovrabet/skill/guides','5WpIrLg','replace','join','2490OWFazM','content','skillTemplate','648468yjehcb','4204110aDbhqu','17896582VPFYKb','/skills/guides.json','path','8235WXMimX','lastUpdated','entries','CDN\x20返回数据格式错误','\x0a\x0a>更新时间:','length','16atAOmW','1967504ELomnM','1OVigNt','extendContent'];a210_0x43b3=function(){return _0x326408;};return a210_0x43b3();}export async function installGuides(_0x1dc76a){const _0x3cffb3=a210_0x59ca04,_0x293074=await fetchGuidesFromCDN();return writeGuidesToProject(_0x293074,_0x1dc76a),Object[_0x3cffb3(0x168)](_0x293074['guides'])[_0x3cffb3(0x15b)];}export function getGuidesSummary(_0x56d700){const _0xfdca8=a210_0x59ca04;return Object[_0xfdca8(0x158)](_0x56d700[_0xfdca8(0x165)])[_0xfdca8(0x164)](([_0x18960d,_0x1af22f])=>({'key':_0x18960d,'title':_0x1af22f[_0xfdca8(0x163)],'path':_0x1af22f[_0xfdca8(0x155)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x50f090,_0x13f33f){const _0x342b25=a211_0x7920,_0x49668d=_0x50f090();while(!![]){try{const _0xf6e0af=parseInt(_0x342b25(0x136))/0x1*(parseInt(_0x342b25(0x133))/0x2)+parseInt(_0x342b25(0x14a))/0x3*(parseInt(_0x342b25(0x148))/0x4)+-parseInt(_0x342b25(0x130))/0x5+parseInt(_0x342b25(0x13f))/0x6*(-parseInt(_0x342b25(0x147))/0x7)+parseInt(_0x342b25(0x13b))/0x8*(parseInt(_0x342b25(0x12e))/0x9)+parseInt(_0x342b25(0x132))/0xa+parseInt(_0x342b25(0x13a))/0xb*(parseInt(_0x342b25(0x142))/0xc);if(_0xf6e0af===_0x13f33f)break;else _0x49668d['push'](_0x49668d['shift']());}catch(_0x40bb6a){_0x49668d['push'](_0x49668d['shift']());}}}(a211_0x3189,0x75999));export async function httpRequest(_0x1acab3,_0xef3377={}){const _0x2aa306=a211_0x7920,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0xef3377;let _0x45325f=null;for(let _0x32ec1d=0x0;_0x32ec1d<=retries;_0x32ec1d++){try{const _0x4adf6b=new AbortController(),_0x1737e8=setTimeout(()=>_0x4adf6b[_0x2aa306(0x13e)](),timeout),_0x3531bd=await fetch(_0x1acab3,{'headers':headers,'signal':_0x4adf6b[_0x2aa306(0x13c)]});clearTimeout(_0x1737e8);let _0x49c033;const _0x410160=_0x3531bd[_0x2aa306(0x143)][_0x2aa306(0x134)](_0x2aa306(0x12f));return _0x410160?.[_0x2aa306(0x138)](_0x2aa306(0x141))?_0x49c033=await _0x3531bd[_0x2aa306(0x146)]():_0x49c033=await _0x3531bd[_0x2aa306(0x13d)](),{'ok':_0x3531bd['ok'],'status':_0x3531bd['status'],'statusText':_0x3531bd['statusText'],'data':_0x49c033,'headers':_0x3531bd[_0x2aa306(0x143)],'url':_0x3531bd[_0x2aa306(0x145)],'text':()=>_0x3531bd[_0x2aa306(0x13d)]()};}catch(_0x4dfca2){_0x45325f=_0x4dfca2 instanceof Error?_0x4dfca2:new Error(String(_0x4dfca2));if(_0x32ec1d===retries)break;if(shouldRetry(_0x4dfca2)){console['log'](_0x2aa306(0x135)+retryDelay+_0x2aa306(0x140)+(_0x32ec1d+0x1)+_0x2aa306(0x144)),await sleep(retryDelay);continue;}else break;}}throw _0x45325f||new Error(_0x2aa306(0x137));}function shouldRetry(_0x30c4d7){const _0x35fe9a=a211_0x7920;if(_0x30c4d7 instanceof Error){if(_0x30c4d7[_0x35fe9a(0x139)]==='AbortError')return![];if(_0x30c4d7[_0x35fe9a(0x139)]==='TypeError'&&_0x30c4d7['message'][_0x35fe9a(0x138)](_0x35fe9a(0x14b)))return!![];if(_0x30c4d7[_0x35fe9a(0x131)][_0x35fe9a(0x138)](_0x35fe9a(0x149)))return!![];if(_0x30c4d7[_0x35fe9a(0x131)][_0x35fe9a(0x138)]('ENOTFOUND'))return![];}return![];}function sleep(_0x5d330f){return new Promise(_0x2b1b5b=>setTimeout(_0x2b1b5b,_0x5d330f));}export function validateUrl(_0x41271f){try{return new URL(_0x41271f),!![];}catch{return![];}}function a211_0x7920(_0x4ac7cb,_0x326aa4){_0x4ac7cb=_0x4ac7cb-0x12e;const _0x31894e=a211_0x3189();let _0x792023=_0x31894e[_0x4ac7cb];return _0x792023;}function a211_0x3189(){const _0xa5e6d0=['402708vzBqIs','ECONNRESET','12ObXBQT','fetch','9ZWLicI','content-type','3128515GtjvXw','message','1200130bRtqos','2FfYgFT','get','*\x20请求失败,','93038afZgzt','Request\x20failed','includes','name','23287QyRrwT','4663816qKVzVq','signal','text','abort','80322RUHOpm','ms\x20后进行第\x20','application/json','924wBxkDT','headers','\x20次重试...','url','json','133xPYgbt'];a211_0x3189=function(){return _0xa5e6d0;};return a211_0x3189();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1d1586,_0x2ce488){const _0x3ba784=a212_0x19da,_0xbfc01b=_0x1d1586();while(!![]){try{const _0xe2b987=parseInt(_0x3ba784(0x1fd))/0x1*(-parseInt(_0x3ba784(0x1fa))/0x2)+-parseInt(_0x3ba784(0x1f6))/0x3+parseInt(_0x3ba784(0x1f0))/0x4+-parseInt(_0x3ba784(0x1ee))/0x5*(-parseInt(_0x3ba784(0x1ff))/0x6)+-parseInt(_0x3ba784(0x1ef))/0x7*(parseInt(_0x3ba784(0x1f4))/0x8)+-parseInt(_0x3ba784(0x1fc))/0x9*(-parseInt(_0x3ba784(0x1f7))/0xa)+parseInt(_0x3ba784(0x1f9))/0xb*(parseInt(_0x3ba784(0x1fb))/0xc);if(_0xe2b987===_0x2ce488)break;else _0xbfc01b['push'](_0xbfc01b['shift']());}catch(_0x269516){_0xbfc01b['push'](_0xbfc01b['shift']());}}}(a212_0x35ab,0xd39a1));function env(_0x9079b9){return process.env[`RABETBASE_${_0x9079b9}`]||process.env[`LOVRABET_${_0x9079b9}`]||undefined;}export function isNonInteractive(_0x3d6889){const _0xc1fd7a=a212_0x19da;return!!(_0x3d6889[_0xc1fd7a(0x1f3)]||_0x3d6889['ci']||env('CI')===_0xc1fd7a(0x1f8)||process.env.CI===_0xc1fd7a(0x1f8)||!process['stdout'][_0xc1fd7a(0x1fe)]||!isStdinRawModeSupported());}function a212_0x19da(_0xa15c54,_0x15c205){_0xa15c54=_0xa15c54-0x1ee;const _0x35abe6=a212_0x35ab();let _0x19da13=_0x35abe6[_0xa15c54];return _0x19da13;}function isStdinRawModeSupported(){const _0x3c0c07=a212_0x19da;if(!process[_0x3c0c07(0x1f1)][_0x3c0c07(0x1fe)])return![];try{const _0x193bf4=process['stdin'][_0x3c0c07(0x1f5)];return process[_0x3c0c07(0x1f1)]['setRawMode'](!![]),process[_0x3c0c07(0x1f1)][_0x3c0c07(0x1f2)](_0x193bf4??![]),!![];}catch{return![];}}function a212_0x35ab(){const _0x25ce64=['6082494NmhuXx','5RfzpvP','41181esvisC','1600364wnopxS','stdin','setRawMode','nonInteractive','280zTqoEP','isRaw','1557849vmBKKV','50ZmmtRa','true','60346EWpRIq','868nHVLSD','996wBwgbD','341487mKZQCA','1076sPZlHY','isTTY'];a212_0x35ab=function(){return _0x25ce64;};return a212_0x35ab();}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a213_0x35ab(_0x2c06d8,_0x4887e2){_0x2c06d8=_0x2c06d8-0xee;const _0x54a952=a213_0x54a9();let _0x35abd6=_0x54a952[_0x2c06d8];return _0x35abd6;}const a213_0x5d34d7=a213_0x35ab;(function(_0x4709d4,_0x4cfdd7){const _0x30fb3b=a213_0x35ab,_0x43208e=_0x4709d4();while(!![]){try{const _0x54829e=parseInt(_0x30fb3b(0x124))/0x1*(-parseInt(_0x30fb3b(0x10f))/0x2)+parseInt(_0x30fb3b(0x108))/0x3*(parseInt(_0x30fb3b(0xf3))/0x4)+-parseInt(_0x30fb3b(0x11b))/0x5+-parseInt(_0x30fb3b(0x117))/0x6*(-parseInt(_0x30fb3b(0x102))/0x7)+-parseInt(_0x30fb3b(0x111))/0x8*(-parseInt(_0x30fb3b(0x10e))/0x9)+parseInt(_0x30fb3b(0x103))/0xa*(parseInt(_0x30fb3b(0x11d))/0xb)+parseInt(_0x30fb3b(0x10d))/0xc*(parseInt(_0x30fb3b(0x11a))/0xd);if(_0x54829e===_0x4cfdd7)break;else _0x43208e['push'](_0x43208e['shift']());}catch(_0x49a45f){_0x43208e['push'](_0x43208e['shift']());}}}(a213_0x54a9,0x78282));import a213_0x5deeec from'winston';import a213_0x4ade19 from'node:fs';import a213_0x234a54 from'node:path';class Logger{['winstonLogger'];['logFilePath'];[a213_0x5d34d7(0xf4)]='';constructor(){const _0x224af0=a213_0x5d34d7;this[_0x224af0(0x127)]='';}['setRawCommand'](_0x2191a4){const _0x5e2145=a213_0x5d34d7;this[_0x5e2145(0xf4)]=_0x2191a4;}[a213_0x5d34d7(0x113)](){const _0x5c4f95=a213_0x5d34d7,_0x5963d6=a213_0x234a54[_0x5c4f95(0x10b)](this[_0x5c4f95(0x127)]);!a213_0x4ade19[_0x5c4f95(0xf6)](_0x5963d6)&&a213_0x4ade19['mkdirSync'](_0x5963d6,{'recursive':!![]});const _0x4baed9=a213_0x5deeec[_0x5c4f95(0x107)][_0x5c4f95(0xf1)](a213_0x5deeec[_0x5c4f95(0x107)]['timestamp'](),a213_0x5deeec['format'][_0x5c4f95(0x112)]({'stack':!![]}),a213_0x5deeec[_0x5c4f95(0x107)]['printf'](_0x2aa080=>{const _0x2a995b=_0x5c4f95,_0xb07a59={'timestamp':_0x2aa080[_0x2a995b(0xfc)]||new Date()[_0x2a995b(0x10c)](),'level':_0x2aa080[_0x2a995b(0xfe)]||_0x2a995b(0x11f),'command':_0x2aa080['command']||_0x2a995b(0x106),'rawCommand':_0x2aa080[_0x2a995b(0x110)]||this['currentRawCommand']||undefined,'message':_0x2aa080['message']||'','duration':_0x2aa080[_0x2a995b(0x11e)]||undefined,'details':_0x2aa080['details']||undefined};return JSON[_0x2a995b(0xfb)](_0xb07a59);}));this[_0x5c4f95(0xf8)]=a213_0x5deeec[_0x5c4f95(0xf2)]({'level':'info','format':_0x4baed9,'transports':[new a213_0x5deeec[(_0x5c4f95(0x123))][(_0x5c4f95(0x118))]({'filename':this[_0x5c4f95(0x127)],'level':_0x5c4f95(0x11f)})],'silent':![]}),a213_0x5deeec[_0x5c4f95(0x121)]({'success':_0x5c4f95(0x10a),'error':_0x5c4f95(0x101),'warn':'yellow','info':'blue'});}[a213_0x5d34d7(0xee)](_0x2681a5){const _0x130485=a213_0x5d34d7;this[_0x130485(0x127)]=a213_0x234a54[_0x130485(0x120)](_0x2681a5,_0x130485(0xfd)),this['winstonLogger']&&this[_0x130485(0xf8)][_0x130485(0x114)](),this['initWinstonLogger']();}[a213_0x5d34d7(0x11f)](_0x1c22a7,_0x157829,_0xca7b2f){const _0x149abb=a213_0x5d34d7;if(!this[_0x149abb(0x127)]||!this[_0x149abb(0xf8)])return;this[_0x149abb(0xf8)][_0x149abb(0x11f)](_0x157829,{'command':_0x1c22a7,'details':_0xca7b2f});}[a213_0x5d34d7(0x126)](_0x2ceedf,_0x1b1053,_0x208dcb,_0x3e88fd){const _0x4a15ba=a213_0x5d34d7;if(!this[_0x4a15ba(0x127)]||!this[_0x4a15ba(0xf8)])return;this['winstonLogger'][_0x4a15ba(0x119)](_0x4a15ba(0x11f),_0x1b1053,{'level':_0x4a15ba(0x126),'command':_0x2ceedf,'duration':_0x208dcb,'details':_0x3e88fd});}['error'](_0xcb8066,_0x4530b5,_0xc44536){const _0x42270a=a213_0x5d34d7;if(!this[_0x42270a(0x127)]||!this['winstonLogger'])return;this[_0x42270a(0xf8)][_0x42270a(0x105)](_0x4530b5,{'command':_0xcb8066,'details':_0xc44536});}[a213_0x5d34d7(0x115)](_0x1cbcb2,_0x2d3356,_0x3fcfb8){const _0x194505=a213_0x5d34d7;if(!this[_0x194505(0x127)]||!this['winstonLogger'])return;this[_0x194505(0xf8)][_0x194505(0x115)](_0x2d3356,{'command':_0x1cbcb2,'details':_0x3fcfb8});}async[a213_0x5d34d7(0xf0)](_0x994470,_0x25f518,_0x35ae09){const _0x4b8130=a213_0x5d34d7,_0x341f7d=Date[_0x4b8130(0xef)]();this[_0x4b8130(0x11f)](_0x994470,'开始执行:\x20'+_0x25f518);try{const _0x38bea7=await _0x35ae09(),_0x53c8de=Date[_0x4b8130(0xef)]()-_0x341f7d;return this[_0x4b8130(0x126)](_0x994470,_0x4b8130(0x104)+_0x25f518,_0x53c8de),_0x38bea7;}catch(_0xe62d5a){const _0x522ef5=Date[_0x4b8130(0xef)]()-_0x341f7d;this[_0x4b8130(0x105)](_0x994470,'失败:\x20'+_0x25f518,{'error':_0xe62d5a instanceof Error?_0xe62d5a['message']:String(_0xe62d5a),'duration':_0x522ef5});throw _0xe62d5a;}}[a213_0x5d34d7(0xfa)](){const _0x303bcf=a213_0x5d34d7;try{if(!a213_0x4ade19[_0x303bcf(0xf6)](this[_0x303bcf(0x127)]))return[];const _0x15b53f=a213_0x4ade19['readFileSync'](this['logFilePath'],_0x303bcf(0x100));return _0x15b53f[_0x303bcf(0x125)]('\x0a')[_0x303bcf(0xff)](_0x4d59d1=>_0x4d59d1[_0x303bcf(0x109)]())['map'](_0x104a67=>JSON[_0x303bcf(0xf7)](_0x104a67));}catch(_0x3fcc24){return console[_0x303bcf(0x115)](_0x303bcf(0xf9),_0x3fcc24),[];}}[a213_0x5d34d7(0x11c)](){const _0x553cff=a213_0x5d34d7;try{a213_0x4ade19[_0x553cff(0xf6)](this[_0x553cff(0x127)])&&a213_0x4ade19[_0x553cff(0x122)](this[_0x553cff(0x127)],'',_0x553cff(0x100));}catch(_0x27c1e3){console[_0x553cff(0x115)](_0x553cff(0x116),_0x27c1e3);}}[a213_0x5d34d7(0xf5)](){const _0x25711d=a213_0x5d34d7;return this[_0x25711d(0xf8)];}}function a213_0x54a9(){const _0x47c9b0=['File','log','13gtuBEj','2086845vmIOkA','clearLogs','120461exEOBr','duration','info','join','addColors','writeFileSync','transports','2253LQgKne','split','success','logFilePath','setLogPath','now','logTask','combine','createLogger','16664ASgoqH','currentRawCommand','getWinstonInstance','existsSync','parse','winstonLogger','Failed\x20to\x20read\x20logs:','readLogs','stringify','timestamp','.lovrabet.log','level','filter','utf8','red','139433zRRsNj','360kKLYRE','完成:\x20','error','unknown','format','624sGvwJT','trim','green','dirname','toISOString','2922624zoeJAi','9RwOKGX','622RlXUFu','rawCommand','369128MNHdhC','errors','initWinstonLogger','clear','warn','Failed\x20to\x20clear\x20logs:','18WVAnkA'];a213_0x54a9=function(){return _0x47c9b0;};return a213_0x54a9();}export const logger=new Logger();
|