@lovrabet/rabetbase-cli 2.1.6 → 2.1.7-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.js +1 -1
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/add.js +1 -1
- package/lib/commands/app/discover.js +1 -1
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app/use.js +1 -1
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/delete.js +1 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/link-create.js +1 -0
- package/lib/commands/dataset/link-delete.js +1 -0
- package/lib/commands/dataset/link-shared.js +1 -0
- package/lib/commands/dataset/link-update.js +1 -0
- package/lib/commands/dataset/links.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -0
- package/lib/commands/issue/report.js +1 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -0
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a170_0xcfaf86=a170_0x1cd2;(function(_0x511868,_0x58fb9b){const _0x10ea1b=a170_0x1cd2,_0x20ad8c=_0x511868();while(!![]){try{const _0x450889=-parseInt(_0x10ea1b(0xce))/0x1+-parseInt(_0x10ea1b(0xd6))/0x2+-parseInt(_0x10ea1b(0xc9))/0x3+-parseInt(_0x10ea1b(0xe0))/0x4+-parseInt(_0x10ea1b(0xcf))/0x5+-parseInt(_0x10ea1b(0xdd))/0x6*(parseInt(_0x10ea1b(0xe1))/0x7)+parseInt(_0x10ea1b(0xe5))/0x8;if(_0x450889===_0x58fb9b)break;else _0x20ad8c['push'](_0x20ad8c['shift']());}catch(_0x432344){_0x20ad8c['push'](_0x20ad8c['shift']());}}}(a170_0x4cf5,0x4b937));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI=a170_0xcfaf86(0xcc);export const NPX_SKILLS_SUBCOMMAND_ADD=a170_0xcfaf86(0xcb);export const NPX_SKILLS_FLAG_SKILL=a170_0xcfaf86(0xd3);export const RABETBASE_SKILL_SOURCE='lovrabet/rabetbase';function a170_0x1cd2(_0x59d0de,_0x553bdf){_0x59d0de=_0x59d0de-0xc9;const _0x4cf598=a170_0x4cf5();let _0x1cd2cc=_0x4cf598[_0x59d0de];return _0x1cd2cc;}function a170_0x4cf5(){const _0x276f38=['skill','--skill','join','trim','322222EKfOuk','lovrabet/lovrabet-skill','remove','pipe','stderr','Lovrabet','yes','78ZZveCz','exit\x20','npx','373608RsPmLb','32501WMHlwV','status','stdio','stdout','8822952GRpFXy','910290HtJXMo','inherit','add','skills','unknown','6139tneKGB','844345uviMhw','toString','log'];a170_0x4cf5=function(){return _0x276f38;};return a170_0x4cf5();}export const LEGACY_RABETBASE_SKILL_SOURCE=a170_0xcfaf86(0xd7);export const DEFAULT_RABETBASE_SKILL_NAME=a170_0xcfaf86(0xdb);export function buildNpxSkillsAddArgv(_0x514034=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x514034];}export const NPX_SKILLS_ADD_COMMAND_LINE=[a170_0xcfaf86(0xdf),...buildNpxSkillsAddArgv()][a170_0xcfaf86(0xd4)]('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a170_0xcfaf86(0xdf),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a170_0xcfaf86(0xd4)]('\x20');export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0x3895ce,_0x2b6bb3){const _0x300e34=a170_0xcfaf86;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x5760d5=_0x2b6bb3?.[_0x300e34(0xe3)]??'inherit',_0x429431=resolveNpmBin('npx'),_0x17b919=buildNpxSkillsAddArgv(_0x2b6bb3?.['skill']??DEFAULT_RABETBASE_SKILL_NAME),_0x57363c=['npx',..._0x17b919][_0x300e34(0xd4)]('\x20');console[_0x300e34(0xd1)]('*\x20'+_0x57363c);const _0x1755be=spawnSync(_0x429431,_0x17b919,{'cwd':_0x3895ce,'stdio':_0x5760d5,'env':process.env,'shell':![]}),_0x404f9b=_0x1755be['status'];if(_0x404f9b===0x0)return{'ok':!![],'status':0x0};let _0x259c72='exit\x20'+(_0x404f9b??_0x300e34(0xcd));if(_0x5760d5==='pipe'){const _0x22a854=_0x1755be[_0x300e34(0xda)]?_0x1755be['stderr'][_0x300e34(0xd0)]()[_0x300e34(0xd5)]():'',_0x3660d4=_0x1755be[_0x300e34(0xe4)]?_0x1755be[_0x300e34(0xe4)][_0x300e34(0xd0)]()[_0x300e34(0xd5)]():'';if(_0x22a854)_0x259c72=_0x22a854;else{if(_0x3660d4)_0x259c72=_0x3660d4;}}return{'ok':![],'status':_0x404f9b??null,'error':_0x259c72};}export function runNpxSkillsRemove(_0x5a1b13,_0x2d040,_0x28ce9b=LEGACY_RABETBASE_SKILL_SOURCE){const _0x4613d2=a170_0xcfaf86;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x586580=_0x2d040?.[_0x4613d2(0xe3)]??_0x4613d2(0xca),_0x4c7634=resolveNpmBin(_0x4613d2(0xdf)),_0x59e36e=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x4613d2(0xd8),_0x28ce9b,NPX_SKILLS_FLAG_SKILL,_0x2d040?.[_0x4613d2(0xd2)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x2d040?.[_0x4613d2(0xdc)]?['-y']:[]],_0x3c129f=[_0x4c7634,..._0x59e36e][_0x4613d2(0xd4)]('\x20');console[_0x4613d2(0xd1)]('*\x20'+_0x3c129f);const _0x25ab2c=spawnSync(_0x4c7634,_0x59e36e,{'cwd':_0x5a1b13,'stdio':_0x586580,'env':process.env,'shell':![]}),_0x4320a5=_0x25ab2c[_0x4613d2(0xe2)];if(_0x4320a5===0x0)return{'ok':!![],'status':0x0};let _0x5948e=_0x4613d2(0xde)+(_0x4320a5??_0x4613d2(0xcd));if(_0x586580==='pipe'){const _0x3525b3=_0x25ab2c[_0x4613d2(0xda)]?_0x25ab2c['stderr']['toString']()[_0x4613d2(0xd5)]():'',_0x16111d=_0x25ab2c[_0x4613d2(0xe4)]?_0x25ab2c[_0x4613d2(0xe4)][_0x4613d2(0xd0)]()[_0x4613d2(0xd5)]():'';if(_0x3525b3)_0x5948e=_0x3525b3;else{if(_0x16111d)_0x5948e=_0x16111d;}}return{'ok':![],'status':_0x4320a5??null,'error':_0x5948e};}export function runNpxSkillsAddGlobal(_0x3bdd71,_0x52afc6,_0x57975e){const _0x6168a0=a170_0xcfaf86;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x47c5ef=_0x57975e?.[_0x6168a0(0xe3)]??_0x6168a0(0xca),_0x280cd4=resolveNpmBin('npx'),_0x373691=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x52afc6,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x5296cf=['npx',NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x52afc6,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x6168a0(0xd4)]('\x20');console[_0x6168a0(0xd1)]('*\x20'+_0x5296cf);const _0x24b1e3=spawnSync(_0x280cd4,_0x373691,{'cwd':_0x3bdd71,'stdio':_0x47c5ef,'env':process.env,'shell':![]}),_0x20da8f=_0x24b1e3[_0x6168a0(0xe2)];if(_0x20da8f===0x0)return{'ok':!![],'status':0x0};let _0x2d4aaa='exit\x20'+(_0x20da8f??_0x6168a0(0xcd));if(_0x47c5ef===_0x6168a0(0xd9)){const _0x2937d8=_0x24b1e3['stderr']?_0x24b1e3[_0x6168a0(0xda)][_0x6168a0(0xd0)]()['trim']():'',_0x22f2ff=_0x24b1e3['stdout']?_0x24b1e3['stdout'][_0x6168a0(0xd0)]()['trim']():'';if(_0x2937d8)_0x2d4aaa=_0x2937d8;else{if(_0x22f2ff)_0x2d4aaa=_0x22f2ff;}}return{'ok':![],'status':_0x20da8f??null,'error':_0x2d4aaa};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a171_0x2ab1(_0x100370,_0xf31e86){_0x100370=_0x100370-0x154;const _0x16990e=a171_0x1699();let _0x2ab121=_0x16990e[_0x100370];return _0x2ab121;}function a171_0x1699(){const _0x4fbfb3=['544328cwrQkN','service','durationMs','some','35DRhOLG','message','5FHpFwc','6553017DMvdbW','298430xyMTcu','error','2191532qpzlCC','flags','[REDACTED]','56086IWIUMP','473646hbxSKH','462294IAthwo','command','stringify','test'];a171_0x1699=function(){return _0x4fbfb3;};return a171_0x1699();}(function(_0x301a31,_0x4babd9){const _0x3c952a=a171_0x2ab1,_0x3fed21=_0x301a31();while(!![]){try{const _0x5e0a23=parseInt(_0x3c952a(0x166))/0x1+-parseInt(_0x3c952a(0x158))/0x2+parseInt(_0x3c952a(0x15a))/0x3+parseInt(_0x3c952a(0x155))/0x4*(-parseInt(_0x3c952a(0x164))/0x5)+-parseInt(_0x3c952a(0x159))/0x6*(parseInt(_0x3c952a(0x162))/0x7)+parseInt(_0x3c952a(0x15e))/0x8+parseInt(_0x3c952a(0x165))/0x9;if(_0x5e0a23===_0x4babd9)break;else _0x3fed21['push'](_0x3fed21['shift']());}catch(_0x4232bd){_0x3fed21['push'](_0x3fed21['shift']());}}}(a171_0x1699,0x43e23));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';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];function isSensitiveKey(_0xaf2d72){const _0x3a48e2=a171_0x2ab1;return SENSITIVE_PATTERNS[_0x3a48e2(0x161)](_0x2828ad=>_0x2828ad[_0x3a48e2(0x15d)](_0xaf2d72));}function sanitizeFlags(_0x362d14){const _0x1105d6=a171_0x2ab1,_0x3357c8={};for(const [_0x102d09,_0x2c51d2]of Object['entries'](_0x362d14)){isSensitiveKey(_0x102d09)?_0x3357c8[_0x102d09]=_0x2c51d2!=null&&_0x2c51d2!==''?_0x1105d6(0x157):_0x2c51d2:_0x3357c8[_0x102d09]=_0x2c51d2;}return _0x3357c8;}export async function reportCommandTrace(_0x5cf36c){const _0x97df7a=a171_0x2ab1;try{const _0x4670bc=sanitizeFlags(_0x5cf36c[_0x97df7a(0x156)]);await sendCliTraceLog({'spanName':'rabetbase.command','logData':{'command.cli_version':getCliVersion(),'command.service':_0x5cf36c[_0x97df7a(0x15f)],'command.name':_0x5cf36c[_0x97df7a(0x15b)],'command.flags':JSON[_0x97df7a(0x15c)](_0x4670bc),..._0x5cf36c['durationMs']!=null?{'command.duration_ms':_0x5cf36c[_0x97df7a(0x160)]}:{},..._0x5cf36c[_0x97df7a(0x154)]?{'command.error':_0x5cf36c[_0x97df7a(0x154)]instanceof Error?_0x5cf36c[_0x97df7a(0x154)][_0x97df7a(0x163)]:String(_0x5cf36c[_0x97df7a(0x154)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x35b0ab,_0x2c1669){var _0x4ca979=a172_0x1016,_0x1a4917=_0x35b0ab();while(!![]){try{var _0x503dec=parseInt(_0x4ca979(0xe1))/0x1*(-parseInt(_0x4ca979(0xe0))/0x2)+parseInt(_0x4ca979(0xe2))/0x3*(parseInt(_0x4ca979(0xe5))/0x4)+-parseInt(_0x4ca979(0xea))/0x5+-parseInt(_0x4ca979(0xe6))/0x6+-parseInt(_0x4ca979(0xdf))/0x7+-parseInt(_0x4ca979(0xde))/0x8+parseInt(_0x4ca979(0xe7))/0x9;if(_0x503dec===_0x2c1669)break;else _0x1a4917['push'](_0x1a4917['shift']());}catch(_0x1f1c34){_0x1a4917['push'](_0x1a4917['shift']());}}}(a172_0x4cac,0x257df));function a172_0x4cac(){var _0xc5dedb=['1408360HmwAJH','540608xUdKLx','511770PhoRov','2RkNgQt','125117GvAght','176997UdFfvT','error','Failed\x20to\x20report\x20CLI\x20help\x20trace:','12bhCSrk','985488JYRmIa','6194637nRhcqV','service','cli.help'];a172_0x4cac=function(){return _0xc5dedb;};return a172_0x4cac();}function a172_0x1016(_0xcbfb8,_0x9992fb){_0xcbfb8=_0xcbfb8-0xde;var _0x4cac22=a172_0x4cac();var _0x10165e=_0x4cac22[_0xcbfb8];return _0x10165e;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x225e46,_0x3c768d){var _0x5c1ab9=a172_0x1016;try{await sendCliTraceLog({'spanName':_0x5c1ab9(0xe9),'logData':{'rabetbase.help.kind':_0x225e46,..._0x3c768d?.[_0x5c1ab9(0xe8)]&&{'rabetbase.help.service':_0x3c768d[_0x5c1ab9(0xe8)]}}});}catch(_0x99a58b){console[_0x5c1ab9(0xe3)](_0x5c1ab9(0xe4),_0x99a58b);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x232380,_0x271c3a){const _0x2d8a5f=a173_0x22af,_0x4e194d=_0x232380();while(!![]){try{const _0xb413f8=-parseInt(_0x2d8a5f(0x13c))/0x1+-parseInt(_0x2d8a5f(0x13b))/0x2+-parseInt(_0x2d8a5f(0x137))/0x3+-parseInt(_0x2d8a5f(0x13f))/0x4+-parseInt(_0x2d8a5f(0x13d))/0x5+-parseInt(_0x2d8a5f(0x139))/0x6+parseInt(_0x2d8a5f(0x141))/0x7*(parseInt(_0x2d8a5f(0x13a))/0x8);if(_0xb413f8===_0x271c3a)break;else _0x4e194d['push'](_0x4e194d['shift']());}catch(_0x58b610){_0x4e194d['push'](_0x4e194d['shift']());}}}(a173_0x350c,0x59a50));import a173_0x5eb673 from'node:os';function a173_0x22af(_0x14efc8,_0x591ce2){_0x14efc8=_0x14efc8-0x137;const _0x350c12=a173_0x350c();let _0x22afb0=_0x350c12[_0x14efc8];return _0x22afb0;}import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setTraceConfig,getOtelLoggerVersion}from'@lovrabet/otel-logger';function a173_0x350c(){const _0x1c944d=['1857165xWWfJU','userInfo','434220XnBpWY','daily','2786YXoimR','265749yWZUWn','nickname','2652720XDzoIr','47448gCGCTx','1066546TWtKxC','449390AyUBfW'];a173_0x350c=function(){return _0x1c944d;};return a173_0x350c();}import{NPM_PACKAGE_NAME}from'../constant/cli.js';let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x4aab62=a173_0x22af,_0x19975d=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0xb3e9e5=_0x19975d?.['user'];setTraceConfig({'otelLoggerVersion':getOtelLoggerVersion(),'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!=='unknown'?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x4aab62(0x140):'production'),'username':_0xb3e9e5?.['username']??a173_0x5eb673[_0x4aab62(0x13e)]()['username']??'rabetbase-cli',..._0xb3e9e5&&{'nickname':_0xb3e9e5[_0x4aab62(0x138)]}}),cliOtelTraceInitialized=!![];}return _0x19975d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a174_0xc42e(){const _0x30b5f6=['3080tAKOPx','1595iEBIKS','3715TOXTWZ','498723pvwkPq','17857fVPXXN','129036TSnYgf','then','47880ZcuLWq','exit','22vQDbsw','beforeExit','160296eEKanv','once','1116KzABcS','46841KtIYGC','603alMKgc','SIGTERM'];a174_0xc42e=function(){return _0x30b5f6;};return a174_0xc42e();}(function(_0x39634e,_0xdeab4f){const _0x229e1d=a174_0x31b5,_0x528ad7=_0x39634e();while(!![]){try{const _0x415217=parseInt(_0x229e1d(0x12d))/0x1*(-parseInt(_0x229e1d(0x139))/0x2)+-parseInt(_0x229e1d(0x133))/0x3+parseInt(_0x229e1d(0x130))/0x4*(-parseInt(_0x229e1d(0x132))/0x5)+-parseInt(_0x229e1d(0x12c))/0x6*(-parseInt(_0x229e1d(0x134))/0x7)+-parseInt(_0x229e1d(0x13b))/0x8+parseInt(_0x229e1d(0x12e))/0x9*(-parseInt(_0x229e1d(0x137))/0xa)+-parseInt(_0x229e1d(0x131))/0xb*(-parseInt(_0x229e1d(0x135))/0xc);if(_0x415217===_0xdeab4f)break;else _0x528ad7['push'](_0x528ad7['shift']());}catch(_0x45e250){_0x528ad7['push'](_0x528ad7['shift']());}}}(a174_0xc42e,0x6b3c4));import{shutdownTraces}from'@lovrabet/otel-logger';function a174_0x31b5(_0x5b959b,_0x4f370e){_0x5b959b=_0x5b959b-0x12c;const _0xc42ea2=a174_0xc42e();let _0x31b552=_0xc42ea2[_0x5b959b];return _0x31b552;}let shutdownPromise=null;export async function flushOtelNodeIfUsed(){if(shutdownPromise)return shutdownPromise;return shutdownPromise=((async()=>{try{await shutdownTraces();}catch{}})()),shutdownPromise;}export function registerOtelShutdownOnExit(){const _0xce1314=a174_0x31b5;process[_0xce1314(0x13c)](_0xce1314(0x13a),()=>{void flushOtelNodeIfUsed();});const _0x2c53b5=()=>{const _0x54e363=_0xce1314;void flushOtelNodeIfUsed()[_0x54e363(0x136)](()=>process[_0x54e363(0x138)](0x0));};process[_0xce1314(0x13c)]('SIGINT',_0x2c53b5),process['once'](_0xce1314(0x12f),_0x2c53b5);}export async function exitWithOtelShutdown(_0x12782f){const _0x48193f=a174_0x31b5;await flushOtelNodeIfUsed(),process[_0x48193f(0x138)](_0x12782f);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a175_0xf8ab46=a175_0x14e0;(function(_0x1af723,_0x402b6f){const _0x5c1e61=a175_0x14e0,_0x42d07f=_0x1af723();while(!![]){try{const _0x4e2cf7=-parseInt(_0x5c1e61(0xae))/0x1*(-parseInt(_0x5c1e61(0xad))/0x2)+parseInt(_0x5c1e61(0xaa))/0x3*(parseInt(_0x5c1e61(0xaf))/0x4)+parseInt(_0x5c1e61(0xac))/0x5+-parseInt(_0x5c1e61(0xb2))/0x6+parseInt(_0x5c1e61(0xa9))/0x7*(-parseInt(_0x5c1e61(0xab))/0x8)+-parseInt(_0x5c1e61(0xa8))/0x9*(-parseInt(_0x5c1e61(0xb5))/0xa)+parseInt(_0x5c1e61(0xb3))/0xb;if(_0x4e2cf7===_0x402b6f)break;else _0x42d07f['push'](_0x42d07f['shift']());}catch(_0x25c325){_0x42d07f['push'](_0x42d07f['shift']());}}}(a175_0x8e5a,0xcc35e));import{sendTraceLog}from'@lovrabet/otel-logger';function a175_0x8e5a(){const _0xd085cc=['version','21610lXhrWD','logData','4149dJLCly','51779kGSNLh','3POJXgR','1800ZYmGwI','2279850SVwSng','168494WePTgW','1SzGtBi','4093476eeWliR','spanName','rabetbase-cli','9204570bWgeDP','16225649ouFGzQ'];a175_0x8e5a=function(){return _0xd085cc;};return a175_0x8e5a();}import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';function a175_0x14e0(_0x4408a0,_0x16ab48){_0x4408a0=_0x4408a0-0xa8;const _0x8e5a5c=a175_0x8e5a();let _0x14e020=_0x8e5a5c[_0x4408a0];return _0x14e020;}const DEFAULT_TRACE_NAME=a175_0xf8ab46(0xb1);export async function sendCliTraceLog(_0x1dee25){const _0x25c0b8=a175_0xf8ab46;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x1dee25['traceName']??DEFAULT_TRACE_NAME,'version':_0x1dee25[_0x25c0b8(0xb4)]??getCliVersion(),'spanName':_0x1dee25[_0x25c0b8(0xb0)],'eventType':'manual','logData':_0x1dee25[_0x25c0b8(0xb6)],..._0x1dee25['traceparent']&&{'traceparent':_0x1dee25['traceparent']}});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const a176_0x40d46e=a176_0xd636;(function(_0x517c54,_0x48a918){const _0x25b81e=a176_0xd636,_0x5b0de7=_0x517c54();while(!![]){try{const _0x4fb64b=-parseInt(_0x25b81e(0x192))/0x1+parseInt(_0x25b81e(0x18d))/0x2*(parseInt(_0x25b81e(0x194))/0x3)+-parseInt(_0x25b81e(0x191))/0x4+parseInt(_0x25b81e(0x18f))/0x5+parseInt(_0x25b81e(0x195))/0x6*(parseInt(_0x25b81e(0x196))/0x7)+-parseInt(_0x25b81e(0x18c))/0x8*(-parseInt(_0x25b81e(0x193))/0x9)+-parseInt(_0x25b81e(0x190))/0xa;if(_0x4fb64b===_0x48a918)break;else _0x5b0de7['push'](_0x5b0de7['shift']());}catch(_0x1ead44){_0x5b0de7['push'](_0x5b0de7['shift']());}}}(a176_0x2809,0x4ad4b));function a176_0xd636(_0x5bdd5b,_0x5917c3){_0x5bdd5b=_0x5bdd5b-0x18b;const _0x280916=a176_0x2809();let _0xd6362c=_0x280916[_0x5bdd5b];return _0xd6362c;}import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';function a176_0x2809(){const _0x5a7b18=['117qHBnDd','24iqAtGW','344302jvgdUg','platform-issue-log-collect','5512MKFVZd','13788lLQkHO','title','1371255NwqVdN','1189570GQWsXC','1626784evxhKe','314900svOJDR','5319dnfcKy'];a176_0x2809=function(){return _0x5a7b18;};return a176_0x2809();}export const PLATFORM_ISSUE_TRACE_NAME=a176_0x40d46e(0x18b);export const PLATFORM_ISSUE_SPAN_NAME='issue.log.collect';export async function sendPlatformIssueCollectLog(_0x2610d3){const _0x3948ae=a176_0x40d46e;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x2610d3[_0x3948ae(0x18e)],'issue.description':_0x2610d3['description']}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a178_0x2320e2=a178_0x32a7;(function(_0x3bb68b,_0x4ca7bc){const _0x42c426=a178_0x32a7,_0x22a74e=_0x3bb68b();while(!![]){try{const _0x54f2b3=parseInt(_0x42c426(0x1e3))/0x1*(-parseInt(_0x42c426(0x20b))/0x2)+parseInt(_0x42c426(0x20e))/0x3*(-parseInt(_0x42c426(0x1ea))/0x4)+-parseInt(_0x42c426(0x1f7))/0x5+parseInt(_0x42c426(0x1f2))/0x6+-parseInt(_0x42c426(0x1f1))/0x7+parseInt(_0x42c426(0x1ff))/0x8+parseInt(_0x42c426(0x212))/0x9;if(_0x54f2b3===_0x4ca7bc)break;else _0x22a74e['push'](_0x22a74e['shift']());}catch(_0x2b44f5){_0x22a74e['push'](_0x22a74e['shift']());}}}(a178_0x37f3,0xe1224));function a178_0x37f3(){const _0x3a3dec=['SKILL.md.tpl','agent','Codex\x20IDE','7650976RhQrWQ','cline','Cursor\x20IDE','opencode','通用模板\x20-\x20兜底方案','Cline','.claude','.codebuddy','Antigravity\x20IDE','.trae/skills/lovrabet/SKILL.md','codebuddy','.cline/skills/lovrabet/SKILL.md','18zkRBda','file','Windsurf','48936ljnPyP','Codex','.windsurf/workflows/rabetbase.md','codex','42389064JLsLLW','.codex','Trae','.cursorrules','Qoder','.agent','trae','Antigravity','202889VWfgac','.trae','Claude\x20Code','.opencode','windsurf','.agent/skills/lovrabet/SKILL.md','OpenCode','332OvbXWN','antigravity','cursor','Qoder\x20IDE','.qoder','.windsurf','其他\x20(通用模板)','1364237FzuCac','1681536eYIXzd','Windsurf\x20IDE','.cursor','.cursor/skills/rabetbase.md','Cursor','8247940cOPYCh','Cline\x20IDE','claude','qoder','.cline'];a178_0x37f3=function(){return _0x3a3dec;};return a178_0x37f3();}export const CORE_IDE_CONFIGS={'cursor':{'name':a178_0x2320e2(0x1f6),'description':a178_0x2320e2(0x201),'folders':[a178_0x2320e2(0x215),a178_0x2320e2(0x1f4)],'files':[{'type':a178_0x2320e2(0x20c),'path':a178_0x2320e2(0x1f5),'template':'SKILL.md.tpl'}]},'windsurf':{'name':a178_0x2320e2(0x20d),'description':a178_0x2320e2(0x1f3),'folders':[a178_0x2320e2(0x1ef)],'files':[{'type':a178_0x2320e2(0x20c),'path':a178_0x2320e2(0x210),'template':a178_0x2320e2(0x1fc)}]},'claude':{'name':a178_0x2320e2(0x1e5),'description':'Claude\x20Code','folders':[a178_0x2320e2(0x205)],'files':[{'type':a178_0x2320e2(0x20c),'path':'.claude/skills/lovrabet/SKILL.md','template':a178_0x2320e2(0x1fc)}]},'cline':{'name':a178_0x2320e2(0x204),'description':a178_0x2320e2(0x1f8),'folders':[a178_0x2320e2(0x1fb)],'files':[{'type':a178_0x2320e2(0x20c),'path':a178_0x2320e2(0x20a),'template':a178_0x2320e2(0x1fc)}]},'codex':{'name':a178_0x2320e2(0x20f),'description':a178_0x2320e2(0x1fe),'folders':[a178_0x2320e2(0x213)],'files':[{'type':a178_0x2320e2(0x20c),'path':'.codex/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]},'opencode':{'name':a178_0x2320e2(0x1e9),'description':'OpenCode\x20IDE','folders':[a178_0x2320e2(0x1e6)],'files':[{'type':a178_0x2320e2(0x20c),'path':'.opencode/skills/lovrabet/SKILL.md','template':a178_0x2320e2(0x1fc)}]},'qoder':{'name':a178_0x2320e2(0x216),'description':a178_0x2320e2(0x1ed),'folders':[a178_0x2320e2(0x1ee)],'files':[{'type':a178_0x2320e2(0x20c),'path':'.qoder/rules/rabetbase.md','template':'SKILL.md.tpl'},{'type':a178_0x2320e2(0x20c),'path':'.qoder/skills/lovrabet/SKILL.md','template':a178_0x2320e2(0x1fc)}]},'codebuddy':{'name':'CodeBuddy','description':'CodeBuddy\x20IDE','folders':[a178_0x2320e2(0x206)],'files':[{'type':a178_0x2320e2(0x20c),'path':'.codebuddy/skills/lovrabet/SKILL.md','template':a178_0x2320e2(0x1fc)}]},'trae':{'name':a178_0x2320e2(0x214),'description':'Trae\x20IDE','folders':[a178_0x2320e2(0x1e4)],'files':[{'type':a178_0x2320e2(0x20c),'path':a178_0x2320e2(0x208),'template':a178_0x2320e2(0x1fc)}]}};export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a178_0x2320e2(0x1f0),'description':a178_0x2320e2(0x203),'folders':[a178_0x2320e2(0x217)],'files':[{'type':'file','path':a178_0x2320e2(0x1e8),'template':a178_0x2320e2(0x1fc)}]},'antigravity':{'name':a178_0x2320e2(0x219),'description':a178_0x2320e2(0x207),'folders':['.agent'],'files':[{'type':a178_0x2320e2(0x20c),'path':'.agent/skills/lovrabet/SKILL.md','template':a178_0x2320e2(0x1fc)}]}};export const CORE_IDE_LIST=[a178_0x2320e2(0x1f9),a178_0x2320e2(0x200),'codebuddy',a178_0x2320e2(0x211),a178_0x2320e2(0x1ec),a178_0x2320e2(0x202),'qoder',a178_0x2320e2(0x218),a178_0x2320e2(0x1e7)];function a178_0x32a7(_0x1b2e0d,_0x1bdc35){_0x1b2e0d=_0x1b2e0d-0x1e3;const _0x37f3dc=a178_0x37f3();let _0x32a722=_0x37f3dc[_0x1b2e0d];return _0x32a722;}export const IDE_LIST=[a178_0x2320e2(0x1eb),'claude',a178_0x2320e2(0x200),'codebuddy',a178_0x2320e2(0x211),a178_0x2320e2(0x1ec),'opencode','qoder',a178_0x2320e2(0x218),a178_0x2320e2(0x1e7),a178_0x2320e2(0x1fd)];export const ALL_CORE_IDES=[a178_0x2320e2(0x1ec),a178_0x2320e2(0x1e7),a178_0x2320e2(0x1f9),a178_0x2320e2(0x200),a178_0x2320e2(0x211),a178_0x2320e2(0x202),a178_0x2320e2(0x1fa),a178_0x2320e2(0x209),a178_0x2320e2(0x218)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2496aa,_0x2fecdd){const _0x2d8c22=a179_0x327f,_0x4956c3=_0x2496aa();while(!![]){try{const _0x4f97d7=-parseInt(_0x2d8c22(0x180))/0x1*(-parseInt(_0x2d8c22(0x17c))/0x2)+-parseInt(_0x2d8c22(0x186))/0x3*(-parseInt(_0x2d8c22(0x187))/0x4)+-parseInt(_0x2d8c22(0x17f))/0x5*(-parseInt(_0x2d8c22(0x17d))/0x6)+-parseInt(_0x2d8c22(0x184))/0x7+-parseInt(_0x2d8c22(0x185))/0x8+-parseInt(_0x2d8c22(0x181))/0x9*(parseInt(_0x2d8c22(0x182))/0xa)+-parseInt(_0x2d8c22(0x17e))/0xb*(-parseInt(_0x2d8c22(0x183))/0xc);if(_0x4f97d7===_0x2fecdd)break;else _0x4956c3['push'](_0x4956c3['shift']());}catch(_0x522641){_0x4956c3['push'](_0x4956c3['shift']());}}}(a179_0x28c3,0x9e7f2));function a179_0x327f(_0x3f1160,_0x471b98){_0x3f1160=_0x3f1160-0x17c;const _0x28c36f=a179_0x28c3();let _0x327f94=_0x28c36f[_0x3f1160];return _0x327f94;}import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a179_0x28c3(){const _0x393448=['474onlxdx','18228NtviuN','1390894dSTBqB','6PvYsNV','3014jufurZ','613895ZoeAhu','1wTcwop','9qswHmJ','3503630QHJbPt','46884UCKWHo','4709530kCoZzq','7491160ehrsNb'];a179_0x28c3=function(){return _0x393448;};return a179_0x28c3();}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(_0x1cafb2,_0x2bf40b){const _0x822430=a180_0x5e1d,_0x42a411=_0x1cafb2();while(!![]){try{const _0x4fac64=-parseInt(_0x822430(0x8f))/0x1+parseInt(_0x822430(0x9c))/0x2+-parseInt(_0x822430(0x91))/0x3+parseInt(_0x822430(0x98))/0x4*(parseInt(_0x822430(0x9a))/0x5)+-parseInt(_0x822430(0x96))/0x6*(parseInt(_0x822430(0x97))/0x7)+parseInt(_0x822430(0x95))/0x8+parseInt(_0x822430(0x93))/0x9*(parseInt(_0x822430(0x90))/0xa);if(_0x4fac64===_0x2bf40b)break;else _0x42a411['push'](_0x42a411['shift']());}catch(_0x5991dc){_0x42a411['push'](_0x42a411['shift']());}}}(a180_0x1804,0x5e256));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x24db14=a180_0x5e1d,_0x522895=getTemplateBaseUrl(),_0x24b561=[_0x522895+'/config.json',_0x522895+_0x24db14(0x92)];for(const _0x508ee4 of _0x24b561){try{const _0xd54a2f=await fetch(_0x508ee4,{'headers':{'Accept':'application/json'}});if(!_0xd54a2f['ok'])continue;const _0x195dc6=await _0xd54a2f[_0x24db14(0x9b)]();if(!_0x195dc6['cli']?.[_0x24db14(0x9d)]||!_0x195dc6[_0x24db14(0x99)]?.['node']?.[_0x24db14(0x9d)])continue;return _0x195dc6;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;let hasCachedConfig=![];function a180_0x5e1d(_0x4ed437,_0x23aa25){_0x4ed437=_0x4ed437-0x8f;const _0x1804c3=a180_0x1804();let _0x5e1d45=_0x1804c3[_0x4ed437];return _0x5e1d45;}export async function getCdnConfig(){const _0x300433=a180_0x5e1d,_0x250733=Date[_0x300433(0x94)]();if(hasCachedConfig){const _0xc22f7b=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x250733-cacheTime<_0xc22f7b)return cachedConfig;}const _0x54677b=await fetchCdnConfig();return cachedConfig=_0x54677b,cacheTime=_0x250733,hasCachedConfig=!![],_0x54677b;}function a180_0x1804(){const _0x2db1a0=['1141672YNBsWk','6nvtfge','3617782owGqAi','5104dydgso','sdk','2660nAxifC','json','890216jWrgLP','stableVersion','684960bKXclg','2023610jNXLJL','858972OKHelS','/config/index.json','27NmVeWl','now'];a180_0x1804=function(){return _0x2db1a0;};return a180_0x1804();}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a181_0x5e1de6=a181_0x4401;(function(_0xc8af81,_0x30b566){const _0xe1e572=a181_0x4401,_0x384abf=_0xc8af81();while(!![]){try{const _0x5f017b=parseInt(_0xe1e572(0x11a))/0x1+parseInt(_0xe1e572(0xf5))/0x2+-parseInt(_0xe1e572(0x103))/0x3*(parseInt(_0xe1e572(0xf6))/0x4)+parseInt(_0xe1e572(0x111))/0x5+-parseInt(_0xe1e572(0x108))/0x6*(parseInt(_0xe1e572(0x10e))/0x7)+parseInt(_0xe1e572(0xff))/0x8*(parseInt(_0xe1e572(0x112))/0x9)+parseInt(_0xe1e572(0x104))/0xa*(parseInt(_0xe1e572(0x10b))/0xb);if(_0x5f017b===_0x30b566)break;else _0x384abf['push'](_0x384abf['shift']());}catch(_0x5e7754){_0x384abf['push'](_0x384abf['shift']());}}}(a181_0x53a6,0x42fcf));import a181_0x4dad0a from'node:fs';function a181_0x4401(_0x7f0e1f,_0x3fb27d){_0x7f0e1f=_0x7f0e1f-0xf5;const _0x53a6c8=a181_0x53a6();let _0x44015c=_0x53a6c8[_0x7f0e1f];return _0x44015c;}import a181_0xb56511 from'node:path';import a181_0x161500 from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a181_0x5e1de6(0x106);function isNonNumericVersion(_0x4f0b2b){const _0x178d13=a181_0x5e1de6,_0x5e34a4=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x5e34a4[_0x178d13(0xf7)](_0x338146=>_0x338146['test'](_0x4f0b2b));}function getInstalledVersion(_0x20925d,_0x79345d){const _0x27ac5d=a181_0x5e1de6;try{const _0x1ca740=a181_0xb56511[_0x27ac5d(0x105)](_0x20925d,_0x27ac5d(0xfb),_0x79345d,_0x27ac5d(0x117));if(a181_0x4dad0a[_0x27ac5d(0x102)](_0x1ca740)){const _0x24481d=JSON['parse'](a181_0x4dad0a[_0x27ac5d(0x101)](_0x1ca740,_0x27ac5d(0x109)));return _0x24481d[_0x27ac5d(0x119)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x41c10b=a181_0x5e1de6;try{const _0x5aee52=await getCdnConfig();return _0x5aee52?.[_0x41c10b(0x113)]?.[_0x41c10b(0x114)]?.['stableVersion']||null;}catch{return null;}}async function getSdkPackageName(){const _0x26b6b3=a181_0x5e1de6;try{const _0x11faac=await getCdnConfig();return _0x11faac?.[_0x26b6b3(0x113)]?.[_0x26b6b3(0x114)]?.[_0x26b6b3(0x10c)]||_0x26b6b3(0x100);}catch{return _0x26b6b3(0x100);}}function a181_0x53a6(){const _0x502f98=['package.json','minVersion','version','185658MBmNlg','\x1b[33m','83882esbHpF','153812Ovlnlz','some','parse','dependencies','coerce','node_modules','stableVersion','\x20\x20\x20Upgrade\x20command:\x20','\x1b[1m','6456rqKgqX','@lovrabet/sdk','readFileSync','existsSync','15VEHqVc','20DgcwHe','join','1.2.0','utf8','10368gdWJIo','utf-8','devDependencies','240493kbgbVp','packageName','log','700cHjukr','\x1b[0m','all','613975cyENwv','2736mhkbhZ','sdk','node','npm\x20install\x20','\x20\x20\x20Stable\x20version:\x20'];a181_0x53a6=function(){return _0x502f98;};return a181_0x53a6();}export async function checkSdkVersion(_0xf9c71c){const _0x44ea03=a181_0x5e1de6,_0xd04fef=a181_0xb56511[_0x44ea03(0x105)](_0xf9c71c,'package.json'),[_0x580b02,_0x293db5]=await Promise[_0x44ea03(0x110)]([getSdkStableVersion(),getSdkPackageName()]),_0x31f27e=_0x580b02||FALLBACK_MIN_SDK_VERSION;if(!a181_0x4dad0a[_0x44ea03(0x102)](_0xd04fef))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x31f27e,'packageName':_0x293db5,'stableVersion':_0x580b02};try{const _0x181b88=JSON[_0x44ea03(0xf8)](a181_0x4dad0a[_0x44ea03(0x101)](_0xd04fef,_0x44ea03(0x107))),_0x1f52b4=_0x181b88[_0x44ea03(0xf9)]||{},_0x4b425d=_0x181b88[_0x44ea03(0x10a)]||{},_0x386a15=_0x1f52b4[_0x293db5]||_0x4b425d[_0x293db5];if(!_0x386a15)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x31f27e,'packageName':_0x293db5,'stableVersion':_0x580b02};let _0x3546b6=getInstalledVersion(_0xf9c71c,_0x293db5);!_0x3546b6&&(_0x3546b6=_0x386a15);if(isNonNumericVersion(_0x386a15))return{'installed':!![],'version':_0x3546b6,'needsUpgrade':![],'minVersion':_0x31f27e,'packageName':_0x293db5,'stableVersion':_0x580b02};const _0x1a1c67=a181_0x161500[_0x44ea03(0xfa)](_0x3546b6),_0x5da913=a181_0x161500[_0x44ea03(0xfa)](_0x31f27e),_0x2d60e7=_0x1a1c67&&_0x5da913?a181_0x161500['lt'](_0x1a1c67,_0x5da913):![];return{'installed':!![],'version':_0x3546b6,'needsUpgrade':_0x2d60e7,'minVersion':_0x31f27e,'packageName':_0x293db5,'stableVersion':_0x580b02};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x31f27e,'packageName':_0x293db5,'stableVersion':_0x580b02};}}export function checkSdkVersionSync(_0x5e6a44){const _0x285bb0=a181_0x5e1de6,_0x56ef68=a181_0xb56511[_0x285bb0(0x105)](_0x5e6a44,_0x285bb0(0x117)),_0x34f386=_0x285bb0(0x100);if(!a181_0x4dad0a[_0x285bb0(0x102)](_0x56ef68))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x34f386,'stableVersion':null};try{const _0x28290a=JSON[_0x285bb0(0xf8)](a181_0x4dad0a[_0x285bb0(0x101)](_0x56ef68,_0x285bb0(0x107))),_0x9e6804=_0x28290a[_0x285bb0(0xf9)]||{},_0x5ae941=_0x28290a[_0x285bb0(0x10a)]||{},_0x29ab76=_0x9e6804[_0x34f386]||_0x5ae941[_0x34f386];if(!_0x29ab76)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x34f386,'stableVersion':null};let _0x5c9393=getInstalledVersion(_0x5e6a44,_0x34f386);!_0x5c9393&&(_0x5c9393=_0x29ab76);if(isNonNumericVersion(_0x29ab76))return{'installed':!![],'version':_0x5c9393,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x34f386,'stableVersion':null};const _0x2b8d10=a181_0x161500[_0x285bb0(0xfa)](_0x5c9393),_0x488c27=_0x2b8d10?a181_0x161500['lt'](_0x2b8d10,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x5c9393,'needsUpgrade':_0x488c27,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x34f386,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x34f386,'stableVersion':null};}}export function printSdkUpgradeWarning(_0x32fda0){const _0x4802c2=a181_0x5e1de6;if(!_0x32fda0['needsUpgrade'])return;const _0x5108b6=_0x4802c2(0x11b),_0x377777=_0x4802c2(0x10f),_0x99457c=_0x4802c2(0xfe),_0x3d8984=_0x32fda0[_0x4802c2(0x10c)]||_0x4802c2(0x100),_0x137128=_0x32fda0[_0x4802c2(0xfc)]||_0x32fda0[_0x4802c2(0x118)],_0x116299=_0x4802c2(0x115)+_0x3d8984+'@'+(_0x137128||'latest');console[_0x4802c2(0x10d)](),console[_0x4802c2(0x10d)](''+_0x5108b6+_0x99457c+'↪\x20SDK\x20update\x20available'+_0x377777),console['log'](_0x5108b6+'\x20\x20\x20Current\x20version:\x20'+_0x3d8984+'@'+_0x32fda0[_0x4802c2(0x119)]+_0x377777),console[_0x4802c2(0x10d)](_0x5108b6+_0x4802c2(0x116)+_0x137128+_0x377777),console[_0x4802c2(0x10d)](_0x5108b6+_0x4802c2(0xfd)+_0x116299+_0x377777),console[_0x4802c2(0x10d)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4d1f1d,_0x4a1dfd){const _0x3f15ea=a182_0x3f0a,_0x32e30f=_0x4d1f1d();while(!![]){try{const _0x4f8b53=-parseInt(_0x3f15ea(0x201))/0x1*(parseInt(_0x3f15ea(0x1f5))/0x2)+parseInt(_0x3f15ea(0x1f9))/0x3*(parseInt(_0x3f15ea(0x1fe))/0x4)+parseInt(_0x3f15ea(0x1ff))/0x5+-parseInt(_0x3f15ea(0x1fd))/0x6*(-parseInt(_0x3f15ea(0x1e9))/0x7)+parseInt(_0x3f15ea(0x1f6))/0x8+-parseInt(_0x3f15ea(0x203))/0x9+-parseInt(_0x3f15ea(0x204))/0xa*(parseInt(_0x3f15ea(0x200))/0xb);if(_0x4f8b53===_0x4a1dfd)break;else _0x32e30f['push'](_0x32e30f['shift']());}catch(_0xe32aef){_0x32e30f['push'](_0x32e30f['shift']());}}}(a182_0x3dd6,0x8422a));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';import a182_0x2a5aad from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';function a182_0x3f0a(_0x584544,_0x4fc99e){_0x584544=_0x584544-0x1e9;const _0x3dd62d=a182_0x3dd6();let _0x3f0aff=_0x3dd62d[_0x584544];return _0x3f0aff;}export function getCliUpgradeCommand(_0x9bd13){const _0x1e867f=a182_0x3f0a,_0x41f3cb=_0x9bd13[_0x1e867f(0x1f2)]||'latest';return _0x1e867f(0x20a)+NPM_PACKAGE_NAME+'@'+_0x41f3cb;}function getCurrentCliVersion(){const _0x2ccda3=a182_0x3f0a;try{const _0x3a33eb=fileURLToPath(import.meta.url),_0x156a54=resolve(dirname(_0x3a33eb),_0x2ccda3(0x1f1)),_0x542d82=resolve(_0x156a54,_0x2ccda3(0x1ea)),_0x4f35df=JSON['parse'](readFileSync(_0x542d82,_0x2ccda3(0x210)));return _0x4f35df[_0x2ccda3(0x20d)]||_0x2ccda3(0x202);}catch{return _0x2ccda3(0x202);}}function a182_0x3dd6(){const _0x52b4bf=['2538000nDfAZW','33xKKnWn','167448BCowuJ','1.0.0','2873889LvsNsV','4340030BoEtTJ','\x20\x20\x20Recommended\x20stable:\x20','\x1b[33m','\x1b[1m','Current\x20version:\x20','\x20\x20\x20Minimum\x20required:\x20','npm\x20install\x20-g\x20','currentVersion','\x1b[31m','version','\x20\x20\x20Upgrade\x20command:\x20','minimumVersionMessage','utf-8','54509IoRJVZ','package.json','\x20\x20\x20Current\x20CLI\x20version:\x20','Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','log','\x20\x20\x20Stable\x20version:\x20','coerce','\x1b[0m','../..','stableVersion','upgradeMessage','↪\x20New\x20version\x20available','10QGkuQO','8128152SNHbRf','\x20\x20\x20','join','6JNlbOJ','filter','minimumVersion','belowMinimum','318ChrsHW','2126932lWecqT'];a182_0x3dd6=function(){return _0x52b4bf;};return a182_0x3dd6();}export async function checkCliVersion(){const _0x6104fb=a182_0x3f0a,_0x22eb74=getCurrentCliVersion(),_0x213ac9=await getCliVersionPolicy(),_0x46ce42=_0x213ac9?.[_0x6104fb(0x1f2)]||null,_0x3a80ee=_0x213ac9?.[_0x6104fb(0x1fb)]||null;let _0x37b816=![],_0x2a5da9=![];const _0x54016b=a182_0x2a5aad['coerce'](_0x22eb74);if(_0x54016b&&_0x46ce42)try{const _0x4eff59=a182_0x2a5aad['coerce'](_0x46ce42);if(_0x4eff59)_0x37b816=a182_0x2a5aad['lt'](_0x54016b,_0x4eff59);}catch{}if(_0x54016b&&_0x3a80ee)try{const _0x711fb3=a182_0x2a5aad[_0x6104fb(0x1ef)](_0x3a80ee);if(_0x711fb3)_0x2a5da9=a182_0x2a5aad['lt'](_0x54016b,_0x711fb3);}catch{}return _0x2a5da9&&(_0x37b816=!![]),{'currentVersion':_0x22eb74,'stableVersion':_0x46ce42,'minimumVersion':_0x3a80ee,'needsUpgrade':_0x37b816,'belowMinimum':_0x2a5da9,'isPreRelease':![],'upgradeMessage':_0x213ac9?.[_0x6104fb(0x1f3)],'minimumVersionMessage':_0x213ac9?.['minimumVersionMessage']};}export function printCliUpgradeWarning(_0x53702d){const _0xbf8761=a182_0x3f0a;if(!_0x53702d['needsUpgrade']&&!_0x53702d[_0xbf8761(0x1fc)])return;const _0x4e5589=_0xbf8761(0x20c),_0x270e69=_0xbf8761(0x206),_0x32404f=_0xbf8761(0x1f0),_0x292fc9=_0xbf8761(0x207),_0x5b7003=getCliUpgradeCommand(_0x53702d);console[_0xbf8761(0x1ed)](),_0x53702d[_0xbf8761(0x1fc)]?(console['log'](''+_0x4e5589+_0x292fc9+'↪\x20Critical\x20CLI\x20upgrade\x20required'+_0x32404f),console[_0xbf8761(0x1ed)](_0x4e5589+'\x20\x20\x20Current\x20CLI\x20version:\x20'+_0x53702d[_0xbf8761(0x20b)]+_0x32404f),_0x53702d[_0xbf8761(0x1fb)]&&console[_0xbf8761(0x1ed)](_0x4e5589+_0xbf8761(0x209)+_0x53702d[_0xbf8761(0x1fb)]+_0x32404f),_0x53702d['stableVersion']&&_0x53702d[_0xbf8761(0x1f2)]!==_0x53702d[_0xbf8761(0x1fb)]&&console[_0xbf8761(0x1ed)](_0x4e5589+_0xbf8761(0x205)+_0x53702d[_0xbf8761(0x1f2)]+_0x32404f),_0x53702d[_0xbf8761(0x20f)]&&console['log'](_0x4e5589+_0xbf8761(0x1f7)+_0x53702d[_0xbf8761(0x20f)]+_0x32404f),console[_0xbf8761(0x1ed)](_0x4e5589+'\x20\x20\x20Upgrade\x20command:\x20'+_0x5b7003+_0x32404f)):(console[_0xbf8761(0x1ed)](''+_0x270e69+_0x292fc9+_0xbf8761(0x1f4)+_0x32404f),console[_0xbf8761(0x1ed)](_0x270e69+_0xbf8761(0x1eb)+_0x53702d[_0xbf8761(0x20b)]+_0x32404f),console[_0xbf8761(0x1ed)](_0x270e69+_0xbf8761(0x1ee)+_0x53702d[_0xbf8761(0x1f2)]+_0x32404f),_0x53702d[_0xbf8761(0x1f3)]&&console[_0xbf8761(0x1ed)](_0x270e69+'\x20\x20\x20'+_0x53702d['upgradeMessage']+_0x32404f),console[_0xbf8761(0x1ed)](_0x270e69+_0xbf8761(0x20e)+_0x5b7003+_0x32404f)),console[_0xbf8761(0x1ed)]();}export function assertCliVersionSupported(_0x2671fe){const _0x3e2832=a182_0x3f0a;if(!_0x2671fe[_0x3e2832(0x1fc)])return;const _0x254766=[_0x2671fe[_0x3e2832(0x20f)],_0x3e2832(0x208)+_0x2671fe[_0x3e2832(0x20b)],_0x2671fe[_0x3e2832(0x1fb)]?'Minimum\x20required:\x20'+_0x2671fe['minimumVersion']:null,'Upgrade\x20command:\x20'+getCliUpgradeCommand(_0x2671fe)][_0x3e2832(0x1fa)](Boolean)[_0x3e2832(0x1f8)]('\x0a');throw CliErrors['validation'](_0x3e2832(0x1ec),_0x254766);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x362748,_0x3ec051){const _0x50b21f=a183_0xb491,_0x32eae7=_0x362748();while(!![]){try{const _0x19f9cb=-parseInt(_0x50b21f(0x1e0))/0x1+parseInt(_0x50b21f(0x1d6))/0x2*(parseInt(_0x50b21f(0x1dc))/0x3)+-parseInt(_0x50b21f(0x1de))/0x4*(-parseInt(_0x50b21f(0x1e6))/0x5)+-parseInt(_0x50b21f(0x1e1))/0x6+parseInt(_0x50b21f(0x1d5))/0x7*(parseInt(_0x50b21f(0x1e5))/0x8)+parseInt(_0x50b21f(0x1d1))/0x9*(parseInt(_0x50b21f(0x1d8))/0xa)+parseInt(_0x50b21f(0x1d9))/0xb*(-parseInt(_0x50b21f(0x1d4))/0xc);if(_0x19f9cb===_0x3ec051)break;else _0x32eae7['push'](_0x32eae7['shift']());}catch(_0x5268b5){_0x32eae7['push'](_0x32eae7['shift']());}}}(a183_0x21ae,0x5f854));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(_0x2561e9){const _0x498da1=a183_0xb491;return typeof _0x2561e9===_0x498da1(0x1e9)&&_0x2561e9[_0x498da1(0x1d3)]()[_0x498da1(0x1ea)]>0x0?_0x2561e9[_0x498da1(0x1d3)]():null;}function normalizeCliVersionPolicy(_0x348d29){const _0x51bd1a=a183_0xb491;if(!_0x348d29||typeof _0x348d29!==_0x51bd1a(0x1e4))return null;const _0x29a166=_0x348d29,_0x19dd7a=_0x29a166['cli']&&typeof _0x29a166['cli']===_0x51bd1a(0x1e4)?_0x29a166[_0x51bd1a(0x1d2)]:_0x29a166,_0x556761=pickString(_0x19dd7a[_0x51bd1a(0x1e2)])||pickString(_0x19dd7a[_0x51bd1a(0x1e7)])||pickString(_0x19dd7a[_0x51bd1a(0x1da)]),_0x5a67b6=pickString(_0x19dd7a[_0x51bd1a(0x1df)])||pickString(_0x19dd7a[_0x51bd1a(0x1dd)]);if(!_0x556761&&!_0x5a67b6)return null;return{'stableVersion':_0x556761,'minimumVersion':_0x5a67b6,'upgradeMessage':pickString(_0x19dd7a[_0x51bd1a(0x1e3)])||undefined,'minimumVersionMessage':pickString(_0x19dd7a[_0x51bd1a(0x1eb)])||undefined};}export async function fetchCliVersionPolicy(){const _0x216f31=a183_0xb491,_0x15cc14=new AbortController(),_0x11a7c2=setTimeout(()=>_0x15cc14[_0x216f31(0x1db)](),FETCH_TIMEOUT_MS);try{const _0x5689ad=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':'application/json'},'signal':_0x15cc14['signal']});if(!_0x5689ad['ok'])return null;const _0x4348f4=await _0x5689ad[_0x216f31(0x1d7)]();return normalizeCliVersionPolicy(_0x4348f4);}catch{return null;}finally{clearTimeout(_0x11a7c2);}}function a183_0xb491(_0x488041,_0x1ff1b2){_0x488041=_0x488041-0x1d1;const _0x21ae1f=a183_0x21ae();let _0xb491d8=_0x21ae1f[_0x488041];return _0xb491d8;}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x4d3396=a183_0xb491,_0x4168ad=Date[_0x4d3396(0x1e8)]();if(hasCachedPolicy){const _0x4c8621=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x4168ad-cacheTime<_0x4c8621)return cachedPolicy;}const _0x5b1c88=await fetchCliVersionPolicy();return cachedPolicy=_0x5b1c88,cacheTime=_0x4168ad,hasCachedPolicy=!![],_0x5b1c88;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}function a183_0x21ae(){const _0x46739f=['abort','3lwNKnZ','minVersion','878772dJwTEW','minimumVersion','2581szdKcW','1377654aHApQt','stableVersion','upgradeMessage','object','557528fUSOeY','5euhoyt','latestVersion','now','string','length','minimumVersionMessage','765xllqzb','cli','trim','10927344cpYyhY','56EFmzKo','941956mgsWEt','json','33630HiJBqa','11rWSlhr','recommendedVersion'];a183_0x21ae=function(){return _0x46739f;};return a183_0x21ae();}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x1a5d38=a184_0x4172;(function(_0x222586,_0x2f2f92){const _0x1dee6d=a184_0x4172,_0x12d8e1=_0x222586();while(!![]){try{const _0x2f8f4a=parseInt(_0x1dee6d(0x138))/0x1+parseInt(_0x1dee6d(0x139))/0x2*(parseInt(_0x1dee6d(0x130))/0x3)+-parseInt(_0x1dee6d(0x13a))/0x4+-parseInt(_0x1dee6d(0x133))/0x5+parseInt(_0x1dee6d(0x135))/0x6+parseInt(_0x1dee6d(0x136))/0x7*(-parseInt(_0x1dee6d(0x132))/0x8)+parseInt(_0x1dee6d(0x131))/0x9;if(_0x2f8f4a===_0x2f2f92)break;else _0x12d8e1['push'](_0x12d8e1['shift']());}catch(_0x1afc61){_0x12d8e1['push'](_0x12d8e1['shift']());}}}(a184_0x3270,0x94e7a));function a184_0x3270(){const _0xc82ad8=['4730580crKzIx','186aVXVYb','1920096IfPVBG','808EFtQes','3586885bfmawy','env','5853240HrnSIE','1337BuHqde','project','1026871VAYkpi','10112ITReFD'];a184_0x3270=function(){return _0xc82ad8;};return a184_0x3270();}import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a184_0x191015,getMultiAppConfigs as a184_0x20ad07,getTemplateBaseUrl as a184_0x2c92b8}from'../context.js';export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a184_0x4172(_0x137742,_0x54cc9d){_0x137742=_0x137742-0x130;const _0x327040=a184_0x3270();let _0x4172fa=_0x327040[_0x137742];return _0x4172fa;}export{isInProject}from'../context.js';export function readConfig(_0x4b4dc2){const _0x4102b3=a184_0x4172,_0x18c3d2=readRawConfig(_0x4b4dc2);return _0x18c3d2[_0x4102b3(0x134)]&&typeof _0x18c3d2[_0x4102b3(0x134)]==='string'&&initEnv(_0x18c3d2[_0x4102b3(0x134)]),_0x18c3d2;}export function getConfigAppCode(){return a184_0x191015();}export function getMultiAppConfigs(_0x5eca3f=a184_0x1a5d38(0x137)){return a184_0x20ad07(_0x5eca3f);}export function getTemplateBaseUrl(){return a184_0x2c92b8();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x496ef8,_0x42fee2){const _0x1844af=a185_0x3ecb,_0x3c0744=_0x496ef8();while(!![]){try{const _0xa30457=-parseInt(_0x1844af(0x193))/0x1+parseInt(_0x1844af(0x192))/0x2*(-parseInt(_0x1844af(0x18e))/0x3)+parseInt(_0x1844af(0x182))/0x4*(-parseInt(_0x1844af(0x191))/0x5)+parseInt(_0x1844af(0x18a))/0x6*(-parseInt(_0x1844af(0x189))/0x7)+parseInt(_0x1844af(0x18c))/0x8+-parseInt(_0x1844af(0x187))/0x9*(parseInt(_0x1844af(0x184))/0xa)+parseInt(_0x1844af(0x183))/0xb*(parseInt(_0x1844af(0x18b))/0xc);if(_0xa30457===_0x42fee2)break;else _0x3c0744['push'](_0x3c0744['shift']());}catch(_0x325b78){_0x3c0744['push'](_0x3c0744['shift']());}}}(a185_0x5548,0x94c50));import a185_0x2d7a30 from'node:path';import a185_0x55c241 from'node:fs';export async function copyDirectory(_0x4273a9,_0x110487){const _0xf291b2=a185_0x3ecb;try{const _0x2bfc63=a185_0x55c241['readdirSync'](_0x4273a9,{'withFileTypes':!![]});a185_0x55c241['mkdirSync'](_0x110487,{'recursive':!![]});for(const _0x44e961 of _0x2bfc63){const _0x9211a6=a185_0x2d7a30[_0xf291b2(0x18d)](_0x4273a9,_0x44e961['name']),_0x32e4dd=a185_0x2d7a30[_0xf291b2(0x18d)](_0x110487,_0x44e961[_0xf291b2(0x188)]);_0x44e961[_0xf291b2(0x185)]()?await copyDirectory(_0x9211a6,_0x32e4dd):a185_0x55c241[_0xf291b2(0x190)](_0x9211a6,_0x32e4dd);}}catch(_0x2c0b53){console[_0xf291b2(0x186)](_0xf291b2(0x18f),_0x2c0b53);}}function a185_0x3ecb(_0x4b66b1,_0xaff460){_0x4b66b1=_0x4b66b1-0x182;const _0x5548d2=a185_0x5548();let _0x3ecb4d=_0x5548d2[_0x4b66b1];return _0x3ecb4d;}function a185_0x5548(){const _0x30c55c=['copyFileSync','427755gQvmFn','27818ltBwev','127041omigTA','56hBWEtK','11kjAPOL','10oSuuZM','isDirectory','error','493767QHkwat','name','14woBABt','1607556MOtQbx','32331276HWtPHN','1426256eCtUdK','join','75sCcqov','复制目录时出错:'];a185_0x5548=function(){return _0x30c55c;};return a185_0x5548();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a186_0x47d2(_0x142376,_0x10e5d1){_0x142376=_0x142376-0xe9;const _0x25b1cf=a186_0x25b1();let _0x47d282=_0x25b1cf[_0x142376];return _0x47d282;}(function(_0x40ffca,_0x2bd3f7){const _0x658b15=a186_0x47d2,_0x11d057=_0x40ffca();while(!![]){try{const _0x45c483=parseInt(_0x658b15(0xe9))/0x1+-parseInt(_0x658b15(0xf0))/0x2+parseInt(_0x658b15(0xeb))/0x3+parseInt(_0x658b15(0xf3))/0x4*(parseInt(_0x658b15(0xed))/0x5)+parseInt(_0x658b15(0xf1))/0x6*(parseInt(_0x658b15(0xee))/0x7)+-parseInt(_0x658b15(0xef))/0x8*(-parseInt(_0x658b15(0xf7))/0x9)+-parseInt(_0x658b15(0xf5))/0xa;if(_0x45c483===_0x2bd3f7)break;else _0x11d057['push'](_0x11d057['shift']());}catch(_0x48af22){_0x11d057['push'](_0x11d057['shift']());}}}(a186_0x25b1,0xe4d21));function a186_0x25b1(){const _0x58e388=['string','410dOFGgC','7iSnlLA','1584KkaAOQ','2509880XwBNOE','5356866coLpfx','trim','70376JkDMav','number','14599120WzolEb','isFinite','40293hHPSes','35369hdFtDe','object','1184301TbUMNc'];a186_0x25b1=function(){return _0x58e388;};return a186_0x25b1();}function toFiniteNumber(_0x221e5c){const _0x3041c7=a186_0x47d2;if(typeof _0x221e5c===_0x3041c7(0xf4)&&Number[_0x3041c7(0xf6)](_0x221e5c))return _0x221e5c;if(typeof _0x221e5c===_0x3041c7(0xec)){const _0x1e5ba6=_0x221e5c[_0x3041c7(0xf2)]();if(!_0x1e5ba6)return undefined;const _0x22e9cf=Number(_0x1e5ba6);if(Number[_0x3041c7(0xf6)](_0x22e9cf))return _0x22e9cf;}return undefined;}export function normalizeEntityWithIdResponse(_0x2b1595){const _0x38e43f=a186_0x47d2,_0x2a9efd=toFiniteNumber(_0x2b1595);if(_0x2a9efd!==undefined)return{'id':_0x2a9efd,'entity':{'id':_0x2a9efd}};if(!_0x2b1595||typeof _0x2b1595!==_0x38e43f(0xea))return{'id':undefined,'entity':{}};const _0x485c22={..._0x2b1595},_0x339d9f=toFiniteNumber(_0x485c22['id']);return _0x339d9f!==undefined&&(_0x485c22['id']=_0x339d9f),{'id':_0x339d9f,'entity':_0x485c22};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x2564ee,_0x59e5d0){const _0x234e0c=a187_0x4595,_0x182dcc=_0x2564ee();while(!![]){try{const _0x3d7d31=-parseInt(_0x234e0c(0xb3))/0x1*(-parseInt(_0x234e0c(0xb2))/0x2)+parseInt(_0x234e0c(0xb5))/0x3*(-parseInt(_0x234e0c(0xb1))/0x4)+-parseInt(_0x234e0c(0xb0))/0x5*(-parseInt(_0x234e0c(0xb6))/0x6)+-parseInt(_0x234e0c(0xaf))/0x7+parseInt(_0x234e0c(0xb4))/0x8+parseInt(_0x234e0c(0xad))/0x9+-parseInt(_0x234e0c(0xae))/0xa;if(_0x3d7d31===_0x59e5d0)break;else _0x182dcc['push'](_0x182dcc['shift']());}catch(_0x548af2){_0x182dcc['push'](_0x182dcc['shift']());}}}(a187_0x4978,0xeae9e));function a187_0x4978(){const _0x3d8dc2=['285188flhChu','28606guPwiI','7XJyffJ','14945048lLkPKu','57cogePn','91734GJtkQR','16891821OgTZCV','3407340ixtiBL','10025134SlyqYD','80XnGhxO'];a187_0x4978=function(){return _0x3d8dc2;};return a187_0x4978();}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';export async function copyDir(_0x1d4ff2,_0x577d85){const _0x19e058=statSync(_0x1d4ff2);if(_0x19e058['isDirectory']()){!existsSync(_0x577d85)&&mkdirSync(_0x577d85,{'recursive':!![]});const _0x262420=readdirSync(_0x1d4ff2);for(const _0x11a204 of _0x262420){await copyDir(join(_0x1d4ff2,_0x11a204),join(_0x577d85,_0x11a204));}}else copyFileSync(_0x1d4ff2,_0x577d85);}function a187_0x4595(_0x229432,_0xbc93c7){_0x229432=_0x229432-0xad;const _0x49783f=a187_0x4978();let _0x45950b=_0x49783f[_0x229432];return _0x45950b;}export function ensureDir(_0x4ba946){!existsSync(_0x4ba946)&&mkdirSync(_0x4ba946,{'recursive':!![]});}export function pathExists(_0xfe655c){return existsSync(_0xfe655c);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x56eb7b=a188_0x2ef7;(function(_0x25e1a9,_0x32ed49){const _0x11629f=a188_0x2ef7,_0x3b0c04=_0x25e1a9();while(!![]){try{const _0x4805d7=-parseInt(_0x11629f(0x94))/0x1*(-parseInt(_0x11629f(0xa1))/0x2)+-parseInt(_0x11629f(0x95))/0x3*(-parseInt(_0x11629f(0x99))/0x4)+parseInt(_0x11629f(0xac))/0x5+-parseInt(_0x11629f(0xa2))/0x6+-parseInt(_0x11629f(0x89))/0x7+-parseInt(_0x11629f(0xa8))/0x8*(parseInt(_0x11629f(0x9c))/0x9)+-parseInt(_0x11629f(0x93))/0xa*(-parseInt(_0x11629f(0x88))/0xb);if(_0x4805d7===_0x32ed49)break;else _0x3b0c04['push'](_0x3b0c04['shift']());}catch(_0x1129a1){_0x3b0c04['push'](_0x3b0c04['shift']());}}}(a188_0x44f5,0x25b07));import{mkdirSync,writeFileSync}from'node:fs';import{dirname,join}from'node:path';function a188_0x44f5(){const _0x57ee25=['57NYKXYs','.md','utf-8','object','30556fAzERt','keys','join','10971DUjrxG','length','extendContent','content','\x0a\x0a>更新时间:','60962AEudLb','1427502RlNgvS','lastUpdated','CDN\x20数据中缺少\x20skillTemplate','application/json','statusText','skillTemplate','1144zpPMpV','title','entries','map','996775HlXogy','251691iHfNQa','525679hMRCrr','trimEnd','.lovrabet','push','replace','json','cache','path','guides','.lovrabet/skill/guides','10eSTZcE','9Fgplls'];a188_0x44f5=function(){return _0x57ee25;};return a188_0x44f5();}import{homedir}from'node:os';function a188_0x2ef7(_0x157828,_0x51b040){_0x157828=_0x157828-0x88;const _0x44f5a4=a188_0x44f5();let _0x2ef7b=_0x44f5a4[_0x157828];return _0x2ef7b;}import{getTemplateBaseUrl}from'../utils/config.js';function getGuidesCdnUrl(){const _0x105b0e=getTemplateBaseUrl();return _0x105b0e+'/skills/guides.json';}const CACHE_DIR=join(homedir(),a188_0x56eb7b(0x8b),a188_0x56eb7b(0x8f));export async function fetchGuidesFromCDN(){const _0x3fa96b=a188_0x56eb7b,_0x35f79=getGuidesCdnUrl(),_0xaf0d54=await fetch(_0x35f79,{'headers':{'Accept':_0x3fa96b(0xa5)}});if(!_0xaf0d54['ok'])throw new Error('CDN\x20请求失败:\x20'+_0xaf0d54['status']+'\x20'+_0xaf0d54[_0x3fa96b(0xa6)]);const _0x26cb14=await _0xaf0d54[_0x3fa96b(0x8e)]();if(!_0x26cb14[_0x3fa96b(0x91)]||typeof _0x26cb14[_0x3fa96b(0x91)]!==_0x3fa96b(0x98))throw new Error('CDN\x20返回数据格式错误');return _0x26cb14;}export function writeGuidesToProject(_0x385ee2,_0x1e092f,_0x5ad113=a188_0x56eb7b(0x92),_0xe427e1){const _0xf89125=a188_0x56eb7b,_0x4cc987=join(_0x1e092f,_0x5ad113);mkdirSync(_0x4cc987,{'recursive':!![]});for(const [_0x41d521,_0xf796af]of Object['entries'](_0x385ee2['guides'])){let _0x4a2a32=_0xf796af[_0xf89125(0x9f)];_0xf796af['lastUpdated']&&(_0x4a2a32=appendUpdateTime(_0x4a2a32,_0xf796af['lastUpdated'])),writeFileSync(join(_0x4cc987,_0x41d521+_0xf89125(0x96)),_0x4a2a32,_0xf89125(0x97));}}export function appendUpdateTime(_0x26dc59,_0x168f91){const _0x38bde9=a188_0x56eb7b;return _0x26dc59=_0x26dc59[_0x38bde9(0x8d)](/\n*>更新时间:.*$/m,''),_0x26dc59[_0x38bde9(0x8a)]()+(_0x38bde9(0xa0)+_0x168f91);}export function getSkillTemplate(_0x307ad0){return _0x307ad0['skillTemplate']?.['content']||'';}export function appendExtendContents(_0x2322c6,_0x479b27,_0x5c694b){const _0x4c77f9=a188_0x56eb7b,_0x20da08=[];for(const [,_0x361501]of Object[_0x4c77f9(0xaa)](_0x479b27[_0x4c77f9(0x91)])){_0x361501[_0x4c77f9(0x9e)]&&_0x20da08[_0x4c77f9(0x8c)](_0x361501[_0x4c77f9(0x9e)][_0x4c77f9(0x8a)]());}if(_0x20da08[_0x4c77f9(0x9d)]===0x0)return _0x2322c6;return _0x2322c6['trimEnd']()+'\x0a\x0a'+_0x20da08[_0x4c77f9(0x9b)]('\x0a\x0a')+'\x0a';}export function writeSkillFile(_0x1c65ad,_0x32ee2c,_0x411655){const _0x1a8986=a188_0x56eb7b,_0x4af0b5=getSkillTemplate(_0x1c65ad);if(!_0x4af0b5)throw new Error(_0x1a8986(0xa4));const _0x1f04b0=dirname(_0x32ee2c);mkdirSync(_0x1f04b0,{'recursive':!![]});let _0x2481e5=_0x4af0b5['replace'](/\{\{IDE_NAME\}\}/g,_0x411655);_0x2481e5=appendExtendContents(_0x2481e5,_0x1c65ad),_0x1c65ad[_0x1a8986(0xa7)]['lastUpdated']&&(_0x2481e5=appendUpdateTime(_0x2481e5,_0x1c65ad['skillTemplate'][_0x1a8986(0xa3)])),writeFileSync(_0x32ee2c,_0x2481e5,_0x1a8986(0x97));}export async function installGuides(_0x46c5cd){const _0x56333a=a188_0x56eb7b,_0x7690f7=await fetchGuidesFromCDN();return writeGuidesToProject(_0x7690f7,_0x46c5cd),Object[_0x56333a(0x9a)](_0x7690f7['guides'])[_0x56333a(0x9d)];}export function getGuidesSummary(_0x423ded){const _0x525f36=a188_0x56eb7b;return Object[_0x525f36(0xaa)](_0x423ded[_0x525f36(0x91)])[_0x525f36(0xab)](([_0x51c907,_0x245e1c])=>({'key':_0x51c907,'title':_0x245e1c[_0x525f36(0xa9)],'path':_0x245e1c[_0x525f36(0x90)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x36a45f,_0x3cd293){const _0x52ef0f=a189_0x3726,_0x1e8b75=_0x36a45f();while(!![]){try{const _0x591eb7=parseInt(_0x52ef0f(0x1b2))/0x1+-parseInt(_0x52ef0f(0x1ad))/0x2+-parseInt(_0x52ef0f(0x197))/0x3+parseInt(_0x52ef0f(0x19a))/0x4*(parseInt(_0x52ef0f(0x19c))/0x5)+parseInt(_0x52ef0f(0x1a3))/0x6+-parseInt(_0x52ef0f(0x199))/0x7+parseInt(_0x52ef0f(0x19f))/0x8;if(_0x591eb7===_0x3cd293)break;else _0x1e8b75['push'](_0x1e8b75['shift']());}catch(_0x3ca7a3){_0x1e8b75['push'](_0x1e8b75['shift']());}}}(a189_0x5adf,0xe125b));function a189_0x3726(_0x32164f,_0x559138){_0x32164f=_0x32164f-0x197;const _0x5adfc1=a189_0x5adf();let _0x37268b=_0x5adfc1[_0x32164f];return _0x37268b;}export async function httpRequest(_0x2db1f8,_0x593c21={}){const _0x79489c=a189_0x3726,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x593c21;let _0x64a2b1=null;for(let _0x5cb0b7=0x0;_0x5cb0b7<=retries;_0x5cb0b7++){try{const _0x2fa35a=new AbortController(),_0x43ee5e=setTimeout(()=>_0x2fa35a[_0x79489c(0x1b0)](),timeout),_0x413aa9=await fetch(_0x2db1f8,{'headers':headers,'signal':_0x2fa35a[_0x79489c(0x1a5)]});clearTimeout(_0x43ee5e);let _0x48f12c;const _0xc14d89=_0x413aa9[_0x79489c(0x1b1)][_0x79489c(0x1af)](_0x79489c(0x1ae));return _0xc14d89?.[_0x79489c(0x1ac)](_0x79489c(0x19e))?_0x48f12c=await _0x413aa9[_0x79489c(0x1a9)]():_0x48f12c=await _0x413aa9[_0x79489c(0x1a8)](),{'ok':_0x413aa9['ok'],'status':_0x413aa9[_0x79489c(0x1a1)],'statusText':_0x413aa9[_0x79489c(0x1a2)],'data':_0x48f12c,'headers':_0x413aa9[_0x79489c(0x1b1)],'url':_0x413aa9['url'],'text':()=>_0x413aa9[_0x79489c(0x1a8)]()};}catch(_0x5cfb0f){_0x64a2b1=_0x5cfb0f instanceof Error?_0x5cfb0f:new Error(String(_0x5cfb0f));if(_0x5cb0b7===retries)break;if(shouldRetry(_0x5cfb0f)){console[_0x79489c(0x1a4)]('*\x20请求失败,'+retryDelay+_0x79489c(0x198)+(_0x5cb0b7+0x1)+_0x79489c(0x1a0)),await sleep(retryDelay);continue;}else break;}}throw _0x64a2b1||new Error(_0x79489c(0x1a6));}function shouldRetry(_0x2f3ab5){const _0x207fde=a189_0x3726;if(_0x2f3ab5 instanceof Error){if(_0x2f3ab5['name']===_0x207fde(0x19b))return![];if(_0x2f3ab5[_0x207fde(0x19d)]===_0x207fde(0x1ab)&&_0x2f3ab5[_0x207fde(0x1aa)]['includes']('fetch'))return!![];if(_0x2f3ab5[_0x207fde(0x1aa)]['includes']('ECONNRESET'))return!![];if(_0x2f3ab5['message'][_0x207fde(0x1ac)](_0x207fde(0x1a7)))return![];}return![];}function sleep(_0x16edc8){return new Promise(_0x259001=>setTimeout(_0x259001,_0x16edc8));}function a189_0x5adf(){const _0x3ac76a=['3321636KETgrL','content-type','get','abort','headers','107983VyHKMD','577944fhskNJ','ms\x20后进行第\x20','11754302OSpBTU','334048VHRvYf','AbortError','5zJaLJG','name','application/json','34036304KrDtdc','\x20次重试...','status','statusText','52932BuPVWu','log','signal','Request\x20failed','ENOTFOUND','text','json','message','TypeError','includes'];a189_0x5adf=function(){return _0x3ac76a;};return a189_0x5adf();}export function validateUrl(_0x576a6f){try{return new URL(_0x576a6f),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a190_0xff8a(_0x7b7b20,_0x5e8912){_0x7b7b20=_0x7b7b20-0x166;const _0x3a531b=a190_0x3a53();let _0xff8a3a=_0x3a531b[_0x7b7b20];return _0xff8a3a;}(function(_0x4b5571,_0xaca53b){const _0x5dd097=a190_0xff8a,_0x26be31=_0x4b5571();while(!![]){try{const _0x51ae9a=-parseInt(_0x5dd097(0x168))/0x1*(-parseInt(_0x5dd097(0x16c))/0x2)+parseInt(_0x5dd097(0x16f))/0x3*(-parseInt(_0x5dd097(0x171))/0x4)+-parseInt(_0x5dd097(0x169))/0x5+parseInt(_0x5dd097(0x170))/0x6*(-parseInt(_0x5dd097(0x174))/0x7)+-parseInt(_0x5dd097(0x16e))/0x8+parseInt(_0x5dd097(0x16d))/0x9+parseInt(_0x5dd097(0x175))/0xa;if(_0x51ae9a===_0xaca53b)break;else _0x26be31['push'](_0x26be31['shift']());}catch(_0x373c78){_0x26be31['push'](_0x26be31['shift']());}}}(a190_0x3a53,0xadd6b));function env(_0x59b8f4){return process.env[`RABETBASE_${_0x59b8f4}`]||process.env[`LOVRABET_${_0x59b8f4}`]||undefined;}function a190_0x3a53(){const _0x58c013=['7527832ZnwUeK','3638091MdnVYd','114690OCMGOf','4zbdJqo','setRawMode','stdin','329dntTRi','26291680FPILQl','nonInteractive','true','332389ajHOrS','6313660TpeRDO','stdout','isTTY','8dlvPqh','9613188icVKnZ'];a190_0x3a53=function(){return _0x58c013;};return a190_0x3a53();}export function isNonInteractive(_0x3a5751){const _0x33c378=a190_0xff8a;return!!(_0x3a5751[_0x33c378(0x166)]||_0x3a5751['ci']||env('CI')===_0x33c378(0x167)||process.env.CI==='true'||!process[_0x33c378(0x16a)][_0x33c378(0x16b)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x5af866=a190_0xff8a;if(!process[_0x5af866(0x173)][_0x5af866(0x16b)])return![];try{const _0x1f1876=process[_0x5af866(0x173)]['isRaw'];return process[_0x5af866(0x173)]['setRawMode'](!![]),process[_0x5af866(0x173)][_0x5af866(0x172)](_0x1f1876??![]),!![];}catch{return![];}}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a191_0x54fa8b=a191_0xafcb;(function(_0x40c339,_0x164688){const _0x3e6c80=a191_0xafcb,_0x235216=_0x40c339();while(!![]){try{const _0x4c983b=-parseInt(_0x3e6c80(0x174))/0x1*(parseInt(_0x3e6c80(0x189))/0x2)+-parseInt(_0x3e6c80(0x177))/0x3*(parseInt(_0x3e6c80(0x182))/0x4)+-parseInt(_0x3e6c80(0x16f))/0x5+-parseInt(_0x3e6c80(0x15e))/0x6+-parseInt(_0x3e6c80(0x166))/0x7+-parseInt(_0x3e6c80(0x16e))/0x8*(-parseInt(_0x3e6c80(0x167))/0x9)+-parseInt(_0x3e6c80(0x18b))/0xa*(-parseInt(_0x3e6c80(0x184))/0xb);if(_0x4c983b===_0x164688)break;else _0x235216['push'](_0x235216['shift']());}catch(_0x5934ed){_0x235216['push'](_0x235216['shift']());}}}(a191_0x2839,0xc2e79));import a191_0x151a6f from'winston';import a191_0x21517e from'node:fs';function a191_0x2839(){const _0x3948b4=['readLogs','2ymIhto','logFilePath','red','2106666xteCCX','Failed\x20to\x20clear\x20logs:','Failed\x20to\x20read\x20logs:','currentRawCommand','details','errors','level','trim','mkdirSync','dirname','blue','4WHbosh','timestamp','143fJhvNp','warn','filter','createLogger','now','547654hpZCww','开始执行:\x20','2169950UrIYKO','unknown','完成:\x20','info','existsSync','getWinstonInstance','command','green','split','combine','813468lqyGjY','printf','error','success','transports','clear','rawCommand','setRawCommand','9467885eLyMLn','29817IVWQfp','clearLogs','format','winstonLogger','失败:\x20','readFileSync','message','2104hTbonj','779580HztdxC','utf8','logTask','writeFileSync'];a191_0x2839=function(){return _0x3948b4;};return a191_0x2839();}function a191_0xafcb(_0x373b3f,_0x13b40c){_0x373b3f=_0x373b3f-0x158;const _0x2839fd=a191_0x2839();let _0xafcb87=_0x2839fd[_0x373b3f];return _0xafcb87;}import a191_0x410890 from'node:path';class Logger{[a191_0x54fa8b(0x16a)];[a191_0x54fa8b(0x175)];[a191_0x54fa8b(0x17a)]='';constructor(){const _0x363b1d=a191_0x54fa8b;this[_0x363b1d(0x175)]='';}[a191_0x54fa8b(0x165)](_0x1d049e){this['currentRawCommand']=_0x1d049e;}['initWinstonLogger'](){const _0x4f9b59=a191_0x54fa8b,_0x45c4e1=a191_0x410890[_0x4f9b59(0x180)](this['logFilePath']);!a191_0x21517e[_0x4f9b59(0x158)](_0x45c4e1)&&a191_0x21517e[_0x4f9b59(0x17f)](_0x45c4e1,{'recursive':!![]});const _0x1c6b08=a191_0x151a6f[_0x4f9b59(0x169)][_0x4f9b59(0x15d)](a191_0x151a6f['format'][_0x4f9b59(0x183)](),a191_0x151a6f[_0x4f9b59(0x169)][_0x4f9b59(0x17c)]({'stack':!![]}),a191_0x151a6f[_0x4f9b59(0x169)][_0x4f9b59(0x15f)](_0x30c039=>{const _0x266766=_0x4f9b59,_0x17eb44={'timestamp':_0x30c039[_0x266766(0x183)]||new Date()['toISOString'](),'level':_0x30c039[_0x266766(0x17d)]||_0x266766(0x18e),'command':_0x30c039[_0x266766(0x15a)]||_0x266766(0x18c),'rawCommand':_0x30c039[_0x266766(0x164)]||this[_0x266766(0x17a)]||undefined,'message':_0x30c039[_0x266766(0x16d)]||'','duration':_0x30c039['duration']||undefined,'details':_0x30c039[_0x266766(0x17b)]||undefined};return JSON['stringify'](_0x17eb44);}));this[_0x4f9b59(0x16a)]=a191_0x151a6f[_0x4f9b59(0x187)]({'level':_0x4f9b59(0x18e),'format':_0x1c6b08,'transports':[new a191_0x151a6f[(_0x4f9b59(0x162))]['File']({'filename':this[_0x4f9b59(0x175)],'level':_0x4f9b59(0x18e)})],'silent':![]}),a191_0x151a6f['addColors']({'success':_0x4f9b59(0x15b),'error':_0x4f9b59(0x176),'warn':'yellow','info':_0x4f9b59(0x181)});}['setLogPath'](_0x5d9bc4){const _0x636392=a191_0x54fa8b;this[_0x636392(0x175)]=a191_0x410890['join'](_0x5d9bc4,'.lovrabet.log'),this['winstonLogger']&&this[_0x636392(0x16a)][_0x636392(0x163)](),this['initWinstonLogger']();}[a191_0x54fa8b(0x18e)](_0xa0090c,_0x28a594,_0x219842){const _0x11eab6=a191_0x54fa8b;if(!this[_0x11eab6(0x175)]||!this[_0x11eab6(0x16a)])return;this['winstonLogger'][_0x11eab6(0x18e)](_0x28a594,{'command':_0xa0090c,'details':_0x219842});}[a191_0x54fa8b(0x161)](_0x30b627,_0x331a61,_0x296a50,_0x3004bb){const _0x3addb6=a191_0x54fa8b;if(!this[_0x3addb6(0x175)]||!this['winstonLogger'])return;this[_0x3addb6(0x16a)]['log'](_0x3addb6(0x18e),_0x331a61,{'level':'success','command':_0x30b627,'duration':_0x296a50,'details':_0x3004bb});}['error'](_0x15e9ce,_0x58f43f,_0xdd14f){const _0x53b522=a191_0x54fa8b;if(!this[_0x53b522(0x175)]||!this[_0x53b522(0x16a)])return;this[_0x53b522(0x16a)][_0x53b522(0x160)](_0x58f43f,{'command':_0x15e9ce,'details':_0xdd14f});}[a191_0x54fa8b(0x185)](_0x224950,_0x48b034,_0x20fba0){if(!this['logFilePath']||!this['winstonLogger'])return;this['winstonLogger']['warn'](_0x48b034,{'command':_0x224950,'details':_0x20fba0});}async[a191_0x54fa8b(0x171)](_0x499447,_0x2acf48,_0x383c6c){const _0x4b8764=a191_0x54fa8b,_0x425b98=Date[_0x4b8764(0x188)]();this[_0x4b8764(0x18e)](_0x499447,_0x4b8764(0x18a)+_0x2acf48);try{const _0x292dba=await _0x383c6c(),_0x1822a3=Date[_0x4b8764(0x188)]()-_0x425b98;return this[_0x4b8764(0x161)](_0x499447,_0x4b8764(0x18d)+_0x2acf48,_0x1822a3),_0x292dba;}catch(_0x5c6c79){const _0x34603e=Date[_0x4b8764(0x188)]()-_0x425b98;this[_0x4b8764(0x160)](_0x499447,_0x4b8764(0x16b)+_0x2acf48,{'error':_0x5c6c79 instanceof Error?_0x5c6c79[_0x4b8764(0x16d)]:String(_0x5c6c79),'duration':_0x34603e});throw _0x5c6c79;}}[a191_0x54fa8b(0x173)](){const _0x3623a1=a191_0x54fa8b;try{if(!a191_0x21517e[_0x3623a1(0x158)](this[_0x3623a1(0x175)]))return[];const _0x5b58c0=a191_0x21517e[_0x3623a1(0x16c)](this[_0x3623a1(0x175)],_0x3623a1(0x170));return _0x5b58c0[_0x3623a1(0x15c)]('\x0a')[_0x3623a1(0x186)](_0x37c72e=>_0x37c72e[_0x3623a1(0x17e)]())['map'](_0x5f1ffe=>JSON['parse'](_0x5f1ffe));}catch(_0x1bd560){return console[_0x3623a1(0x185)](_0x3623a1(0x179),_0x1bd560),[];}}[a191_0x54fa8b(0x168)](){const _0x5ed054=a191_0x54fa8b;try{a191_0x21517e['existsSync'](this[_0x5ed054(0x175)])&&a191_0x21517e[_0x5ed054(0x172)](this[_0x5ed054(0x175)],'','utf8');}catch(_0x5b0073){console['warn'](_0x5ed054(0x178),_0x5b0073);}}[a191_0x54fa8b(0x159)](){const _0x4d7cd6=a191_0x54fa8b;return this[_0x4d7cd6(0x16a)];}}export const logger=new Logger();
|