@lovrabet/rabetbase-cli 2.1.6 → 2.1.7-beta.10
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
- package/templates/projects/sub-app-react-demo/README.md +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a170_0x599531=a170_0x1dee;(function(_0x301ae4,_0x1a13e9){const _0x5950b5=a170_0x1dee,_0x1fb03f=_0x301ae4();while(!![]){try{const _0x29b851=-parseInt(_0x5950b5(0x77))/0x1*(-parseInt(_0x5950b5(0x70))/0x2)+-parseInt(_0x5950b5(0x6f))/0x3*(parseInt(_0x5950b5(0x6b))/0x4)+-parseInt(_0x5950b5(0x82))/0x5*(parseInt(_0x5950b5(0x7c))/0x6)+parseInt(_0x5950b5(0x84))/0x7*(parseInt(_0x5950b5(0x79))/0x8)+parseInt(_0x5950b5(0x83))/0x9+parseInt(_0x5950b5(0x75))/0xa*(-parseInt(_0x5950b5(0x69))/0xb)+parseInt(_0x5950b5(0x68))/0xc;if(_0x29b851===_0x1a13e9)break;else _0x1fb03f['push'](_0x1fb03f['shift']());}catch(_0x33128a){_0x1fb03f['push'](_0x1fb03f['shift']());}}}(a170_0x2f85,0x79265));import{spawnSync}from'node:child_process';import{resolveNpmBin}from'../utils/platform.js';function a170_0x1dee(_0x542528,_0x13c6d9){_0x542528=_0x542528-0x68;const _0x2f8530=a170_0x2f85();let _0x1deef4=_0x2f8530[_0x542528];return _0x1deef4;}export const NPX_FLAG_YES='-y';export const SKILLS_FLAG_GLOBAL='-g';function a170_0x2f85(){const _0x1e96a1=['skills','inherit','toString','unknown','10EkkFHu','Lovrabet','1TcZOfU','stdio','1273384OPtHLo','exit\x20','skill','35838fGktPB','lovrabet/lovrabet-skill','join','stdout','log','trim','825pXVuoW','3331773dOlEYy','35ZObyOO','yes','npx','stderr','5473980EumFyo','4519460KrFlnV','remove','124XKOIKH','pipe','status','add','69606NsHEqm','1979338QEJuWk'];a170_0x2f85=function(){return _0x1e96a1;};return a170_0x2f85();}export const SKILLS_FLAG_YES='-y';export const NPX_SKILLS_CLI=a170_0x599531(0x71);export const NPX_SKILLS_SUBCOMMAND_ADD=a170_0x599531(0x6e);export const NPX_SKILLS_FLAG_SKILL='--skill';export const RABETBASE_SKILL_SOURCE='lovrabet/rabetbase';export const LEGACY_RABETBASE_SKILL_SOURCE=a170_0x599531(0x7d);export const DEFAULT_RABETBASE_SKILL_NAME=a170_0x599531(0x76);export function buildNpxSkillsAddArgv(_0x17063a=DEFAULT_RABETBASE_SKILL_NAME){return[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,NPX_SKILLS_FLAG_SKILL,_0x17063a];}export const NPX_SKILLS_ADD_COMMAND_LINE=['npx',...buildNpxSkillsAddArgv()]['join']('\x20');export const NPX_SKILLS_ADD_GLOBAL_COMMAND_LINE=[a170_0x599531(0x86),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,RABETBASE_SKILL_SOURCE,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][a170_0x599531(0x7e)]('\x20');export function shouldSkipNpxSkillsAdd(){return process.env.RABETBASE_SKIP_NPX_SKILLS==='1';}export function runNpxSkillsAdd(_0xdd45b9,_0x60a06f){const _0x26c695=a170_0x599531;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x3ca2e2=_0x60a06f?.[_0x26c695(0x78)]??_0x26c695(0x72),_0x36f27c=resolveNpmBin('npx'),_0x48beb4=buildNpxSkillsAddArgv(_0x60a06f?.['skill']??DEFAULT_RABETBASE_SKILL_NAME),_0x475baa=['npx',..._0x48beb4][_0x26c695(0x7e)]('\x20');console['log']('*\x20'+_0x475baa);const _0x3110c4=spawnSync(_0x36f27c,_0x48beb4,{'cwd':_0xdd45b9,'stdio':_0x3ca2e2,'env':process.env,'shell':![]}),_0x22fa2b=_0x3110c4[_0x26c695(0x6d)];if(_0x22fa2b===0x0)return{'ok':!![],'status':0x0};let _0x11e661=_0x26c695(0x7a)+(_0x22fa2b??_0x26c695(0x74));if(_0x3ca2e2===_0x26c695(0x6c)){const _0x3ffa6b=_0x3110c4[_0x26c695(0x87)]?_0x3110c4[_0x26c695(0x87)][_0x26c695(0x73)]()[_0x26c695(0x81)]():'',_0x1f0b92=_0x3110c4[_0x26c695(0x7f)]?_0x3110c4[_0x26c695(0x7f)][_0x26c695(0x73)]()[_0x26c695(0x81)]():'';if(_0x3ffa6b)_0x11e661=_0x3ffa6b;else{if(_0x1f0b92)_0x11e661=_0x1f0b92;}}return{'ok':![],'status':_0x22fa2b??null,'error':_0x11e661};}export function runNpxSkillsRemove(_0x3a348b,_0x54a5f2,_0xbc293a=LEGACY_RABETBASE_SKILL_SOURCE){const _0x3ec1a5=a170_0x599531;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x30905f=_0x54a5f2?.[_0x3ec1a5(0x78)]??_0x3ec1a5(0x72),_0x529976=resolveNpmBin(_0x3ec1a5(0x86)),_0x313bb5=[NPX_FLAG_YES,NPX_SKILLS_CLI,_0x3ec1a5(0x6a),_0xbc293a,NPX_SKILLS_FLAG_SKILL,_0x54a5f2?.[_0x3ec1a5(0x7b)]??DEFAULT_RABETBASE_SKILL_NAME,..._0x54a5f2?.[_0x3ec1a5(0x85)]?['-y']:[]],_0x5ed249=[_0x529976,..._0x313bb5][_0x3ec1a5(0x7e)]('\x20');console['log']('*\x20'+_0x5ed249);const _0x307784=spawnSync(_0x529976,_0x313bb5,{'cwd':_0x3a348b,'stdio':_0x30905f,'env':process.env,'shell':![]}),_0x5d9845=_0x307784[_0x3ec1a5(0x6d)];if(_0x5d9845===0x0)return{'ok':!![],'status':0x0};let _0x32b986=_0x3ec1a5(0x7a)+(_0x5d9845??_0x3ec1a5(0x74));if(_0x30905f===_0x3ec1a5(0x6c)){const _0xc7a028=_0x307784[_0x3ec1a5(0x87)]?_0x307784['stderr']['toString']()[_0x3ec1a5(0x81)]():'',_0x301621=_0x307784[_0x3ec1a5(0x7f)]?_0x307784['stdout'][_0x3ec1a5(0x73)]()[_0x3ec1a5(0x81)]():'';if(_0xc7a028)_0x32b986=_0xc7a028;else{if(_0x301621)_0x32b986=_0x301621;}}return{'ok':![],'status':_0x5d9845??null,'error':_0x32b986};}export function runNpxSkillsAddGlobal(_0x34b036,_0x3f179a,_0x1afe38){const _0x23695f=a170_0x599531;if(shouldSkipNpxSkillsAdd())return{'ok':!![],'status':0x0,'skipped':!![]};const _0x4208d8=_0x1afe38?.[_0x23695f(0x78)]??_0x23695f(0x72),_0x30370c=resolveNpmBin(_0x23695f(0x86)),_0x16831c=[NPX_FLAG_YES,NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3f179a,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES],_0x255041=[_0x23695f(0x86),NPX_SKILLS_CLI,NPX_SKILLS_SUBCOMMAND_ADD,_0x3f179a,SKILLS_FLAG_GLOBAL,SKILLS_FLAG_YES][_0x23695f(0x7e)]('\x20');console[_0x23695f(0x80)]('*\x20'+_0x255041);const _0x381a56=spawnSync(_0x30370c,_0x16831c,{'cwd':_0x34b036,'stdio':_0x4208d8,'env':process.env,'shell':![]}),_0x330653=_0x381a56['status'];if(_0x330653===0x0)return{'ok':!![],'status':0x0};let _0x5683bd=_0x23695f(0x7a)+(_0x330653??'unknown');if(_0x4208d8===_0x23695f(0x6c)){const _0x104a07=_0x381a56[_0x23695f(0x87)]?_0x381a56['stderr'][_0x23695f(0x73)]()[_0x23695f(0x81)]():'',_0x2dc4b6=_0x381a56[_0x23695f(0x7f)]?_0x381a56[_0x23695f(0x7f)][_0x23695f(0x73)]()[_0x23695f(0x81)]():'';if(_0x104a07)_0x5683bd=_0x104a07;else{if(_0x2dc4b6)_0x5683bd=_0x2dc4b6;}}return{'ok':![],'status':_0x330653??null,'error':_0x5683bd};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a171_0x11e8(){const _0x5e0c5b=['rabetbase.command','error','stringify','6981870PgTOZw','19614672VXCqWo','durationMs','2081900Ampszj','entries','[REDACTED]','9209255hdjYlI','667220xsKNDG','361002kgHSJA','flags','service','command','300009UINbvB'];a171_0x11e8=function(){return _0x5e0c5b;};return a171_0x11e8();}(function(_0x440d8c,_0xf0c7e4){const _0x12005a=a171_0x2e4f,_0xb7c3c1=_0x440d8c();while(!![]){try{const _0x434d63=-parseInt(_0x12005a(0x77))/0x1+parseInt(_0x12005a(0x72))/0x2+-parseInt(_0x12005a(0x7b))/0x3+parseInt(_0x12005a(0x76))/0x4+parseInt(_0x12005a(0x75))/0x5+parseInt(_0x12005a(0x6f))/0x6+-parseInt(_0x12005a(0x70))/0x7;if(_0x434d63===_0xf0c7e4)break;else _0xb7c3c1['push'](_0xb7c3c1['shift']());}catch(_0x1013e8){_0xb7c3c1['push'](_0xb7c3c1['shift']());}}}(a171_0x11e8,0xe7f86));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(_0x5ceaa8){return SENSITIVE_PATTERNS['some'](_0x59497a=>_0x59497a['test'](_0x5ceaa8));}function a171_0x2e4f(_0x241ff4,_0x4b93d0){_0x241ff4=_0x241ff4-0x6f;const _0x11e831=a171_0x11e8();let _0x2e4fa9=_0x11e831[_0x241ff4];return _0x2e4fa9;}function sanitizeFlags(_0x10d7b4){const _0x2095fd=a171_0x2e4f,_0x26e039={};for(const [_0x387530,_0x7dbe68]of Object[_0x2095fd(0x73)](_0x10d7b4)){isSensitiveKey(_0x387530)?_0x26e039[_0x387530]=_0x7dbe68!=null&&_0x7dbe68!==''?_0x2095fd(0x74):_0x7dbe68:_0x26e039[_0x387530]=_0x7dbe68;}return _0x26e039;}export async function reportCommandTrace(_0x52b657){const _0x1a9d8b=a171_0x2e4f;try{const _0x2033cd=sanitizeFlags(_0x52b657[_0x1a9d8b(0x78)]);await sendCliTraceLog({'spanName':_0x1a9d8b(0x7c),'logData':{'command.cli_version':getCliVersion(),'command.service':_0x52b657[_0x1a9d8b(0x79)],'command.name':_0x52b657[_0x1a9d8b(0x7a)],'command.flags':JSON[_0x1a9d8b(0x7e)](_0x2033cd),..._0x52b657['durationMs']!=null?{'command.duration_ms':_0x52b657[_0x1a9d8b(0x71)]}:{},..._0x52b657['error']?{'command.error':_0x52b657['error']instanceof Error?_0x52b657[_0x1a9d8b(0x7d)]['message']:String(_0x52b657[_0x1a9d8b(0x7d)])}:{}}});}catch{}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5c8c9d,_0x213644){var _0x5dfec4=a172_0x46fe,_0x35259e=_0x5c8c9d();while(!![]){try{var _0x129439=parseInt(_0x5dfec4(0x1e6))/0x1+parseInt(_0x5dfec4(0x1ed))/0x2+parseInt(_0x5dfec4(0x1ee))/0x3*(parseInt(_0x5dfec4(0x1e9))/0x4)+parseInt(_0x5dfec4(0x1e7))/0x5*(-parseInt(_0x5dfec4(0x1e1))/0x6)+-parseInt(_0x5dfec4(0x1e4))/0x7+parseInt(_0x5dfec4(0x1ec))/0x8+parseInt(_0x5dfec4(0x1e3))/0x9*(parseInt(_0x5dfec4(0x1ea))/0xa);if(_0x129439===_0x213644)break;else _0x35259e['push'](_0x35259e['shift']());}catch(_0x4ad263){_0x35259e['push'](_0x35259e['shift']());}}}(a172_0x1e8e,0x39319));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export async function reportCliHelpTrace(_0x5a105f,_0x748acf){var _0x1c111a=a172_0x46fe;try{await sendCliTraceLog({'spanName':_0x1c111a(0x1e8),'logData':{'rabetbase.help.kind':_0x5a105f,..._0x748acf?.[_0x1c111a(0x1eb)]&&{'rabetbase.help.service':_0x748acf[_0x1c111a(0x1eb)]}}});}catch(_0x5e62be){console[_0x1c111a(0x1e5)](_0x1c111a(0x1e2),_0x5e62be);}}function a172_0x46fe(_0x479397,_0x37260e){_0x479397=_0x479397-0x1e1;var _0x1e8ec8=a172_0x1e8e();var _0x46fe70=_0x1e8ec8[_0x479397];return _0x46fe70;}function a172_0x1e8e(){var _0x17acef=['679922bJQmIZ','303762JzFtrX','1690908gfLbbJ','Failed\x20to\x20report\x20CLI\x20help\x20trace:','12024XikCHR','1988273mAcCNl','error','91679yBCuEh','5blYfrM','cli.help','4TzrjlR','1540RHYEPm','service','491872zrmjvJ'];a172_0x1e8e=function(){return _0x17acef;};return a172_0x1e8e();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x1a4949,_0x1e9e74){const _0x16c934=a173_0x3f0f,_0x4d534e=_0x1a4949();while(!![]){try{const _0x2fc72d=-parseInt(_0x16c934(0x128))/0x1*(parseInt(_0x16c934(0x12a))/0x2)+-parseInt(_0x16c934(0x127))/0x3*(-parseInt(_0x16c934(0x129))/0x4)+parseInt(_0x16c934(0x124))/0x5+-parseInt(_0x16c934(0x123))/0x6*(parseInt(_0x16c934(0x125))/0x7)+parseInt(_0x16c934(0x12d))/0x8*(parseInt(_0x16c934(0x11d))/0x9)+-parseInt(_0x16c934(0x120))/0xa+-parseInt(_0x16c934(0x12f))/0xb*(-parseInt(_0x16c934(0x121))/0xc);if(_0x2fc72d===_0x1e9e74)break;else _0x4d534e['push'](_0x4d534e['shift']());}catch(_0x4488e2){_0x4d534e['push'](_0x4d534e['shift']());}}}(a173_0x33c7,0x60399));function a173_0x33c7(){const _0x4b44a9=['4379280legSEv','36MyMBHV','daily','12XuYXNB','1251225dfASbF','889567mciUuA','username','288sIqmZq','2287laPQFl','13556BtzOfy','162YhAEdE','user','production','12608RRZMmk','nickname','373021LxbZLg','3393cNUCPP','rabetbase-cli','unknown'];a173_0x33c7=function(){return _0x4b44a9;};return a173_0x33c7();}import a173_0x559a8f from'node:os';import{VERSION,GIT_COMMIT}from'../generated/build-info.js';import{getSessionUserInfo}from'../auth/get-session-user.js';import{setTraceConfig,getOtelLoggerVersion}from'@lovrabet/otel-logger';import{NPM_PACKAGE_NAME}from'../constant/cli.js';function a173_0x3f0f(_0x84a268,_0x4c1c32){_0x84a268=_0x84a268-0x11d;const _0x33c731=a173_0x33c7();let _0x3f0f4d=_0x33c731[_0x84a268];return _0x3f0f4d;}let cliOtelTraceInitialized=![];export async function ensureCliOtelTraceConfig(){const _0x4646f5=a173_0x3f0f,_0x1f2229=await getSessionUserInfo();if(!cliOtelTraceInitialized){const _0x1a61ca=_0x1f2229?.[_0x4646f5(0x12b)];setTraceConfig({'otelLoggerVersion':getOtelLoggerVersion(),'serviceName':NPM_PACKAGE_NAME,'serviceVersion':GIT_COMMIT!==_0x4646f5(0x11f)?VERSION+'+'+GIT_COMMIT:VERSION,'serviceEnv':process.env.RABETBASE_ENV??(process.env.RABETBASE_E2E_DAILY==='1'?_0x4646f5(0x122):_0x4646f5(0x12c)),'username':_0x1a61ca?.['username']??a173_0x559a8f['userInfo']()[_0x4646f5(0x126)]??_0x4646f5(0x11e),..._0x1a61ca&&{'nickname':_0x1a61ca[_0x4646f5(0x12e)]}}),cliOtelTraceInitialized=!![];}return _0x1f2229;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x463839,_0x28258a){const _0x149531=a174_0x37c7,_0x4c0173=_0x463839();while(!![]){try{const _0x1a0e20=-parseInt(_0x149531(0x14c))/0x1*(parseInt(_0x149531(0x14b))/0x2)+parseInt(_0x149531(0x146))/0x3+parseInt(_0x149531(0x143))/0x4+-parseInt(_0x149531(0x145))/0x5+-parseInt(_0x149531(0x148))/0x6+parseInt(_0x149531(0x149))/0x7+-parseInt(_0x149531(0x144))/0x8*(-parseInt(_0x149531(0x14d))/0x9);if(_0x1a0e20===_0x28258a)break;else _0x4c0173['push'](_0x4c0173['shift']());}catch(_0x1cc67c){_0x4c0173['push'](_0x4c0173['shift']());}}}(a174_0x30d9,0x3c809));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 _0x304cd5=a174_0x37c7;process[_0x304cd5(0x147)]('beforeExit',()=>{void flushOtelNodeIfUsed();});const _0x17f05a=()=>{const _0x1d1820=_0x304cd5;void flushOtelNodeIfUsed()[_0x1d1820(0x14e)](()=>process[_0x1d1820(0x14a)](0x0));};process[_0x304cd5(0x147)]('SIGINT',_0x17f05a),process[_0x304cd5(0x147)]('SIGTERM',_0x17f05a);}function a174_0x30d9(){const _0x5b5cb3=['then','1427992MmrZWV','2162928YUYgfQ','2378330FYWQCo','782145UNucMu','once','1749444nuEtwD','2434432JKKXWA','exit','34JFsyIo','28892RzxStc','18FywAYh'];a174_0x30d9=function(){return _0x5b5cb3;};return a174_0x30d9();}function a174_0x37c7(_0x4662a4,_0x581b12){_0x4662a4=_0x4662a4-0x143;const _0x30d957=a174_0x30d9();let _0x37c7cd=_0x30d957[_0x4662a4];return _0x37c7cd;}export async function exitWithOtelShutdown(_0x4fc5db){await flushOtelNodeIfUsed(),process['exit'](_0x4fc5db);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a175_0x4f50d4=a175_0x2b13;function a175_0x2b13(_0x1a910e,_0x36f643){_0x1a910e=_0x1a910e-0x97;const _0x171a7e=a175_0x171a();let _0x2b1365=_0x171a7e[_0x1a910e];return _0x2b1365;}(function(_0x309e6a,_0x7e9d7e){const _0x1f2392=a175_0x2b13,_0xebc9b2=_0x309e6a();while(!![]){try{const _0x48be3a=parseInt(_0x1f2392(0x99))/0x1+parseInt(_0x1f2392(0xa2))/0x2+-parseInt(_0x1f2392(0x9d))/0x3*(-parseInt(_0x1f2392(0xa0))/0x4)+parseInt(_0x1f2392(0x9f))/0x5*(-parseInt(_0x1f2392(0xa3))/0x6)+parseInt(_0x1f2392(0xa4))/0x7*(-parseInt(_0x1f2392(0x97))/0x8)+parseInt(_0x1f2392(0xa6))/0x9+-parseInt(_0x1f2392(0x9e))/0xa;if(_0x48be3a===_0x7e9d7e)break;else _0xebc9b2['push'](_0xebc9b2['shift']());}catch(_0x3edf0d){_0xebc9b2['push'](_0xebc9b2['shift']());}}}(a175_0x171a,0x2425a));function a175_0x171a(){const _0x38ef97=['6ssiXfL','1632770DKDkqX','3040KKZTOu','94580CkQCbA','spanName','351882yHWApR','1878aORNHF','42flMPia','manual','2213091dyfcUy','329704rMelYp','version','279787ZGefDY','rabetbase-cli','traceName','traceparent'];a175_0x171a=function(){return _0x38ef97;};return a175_0x171a();}import{sendTraceLog}from'@lovrabet/otel-logger';import{ensureCliOtelTraceConfig}from'../telemetry/ensure-cli-otel-config.js';import{getCliVersion}from'../utils/version.js';const DEFAULT_TRACE_NAME=a175_0x4f50d4(0x9a);export async function sendCliTraceLog(_0x143f43){const _0x4f18d2=a175_0x4f50d4;await ensureCliOtelTraceConfig(),sendTraceLog({'traceName':_0x143f43[_0x4f18d2(0x9b)]??DEFAULT_TRACE_NAME,'version':_0x143f43[_0x4f18d2(0x98)]??getCliVersion(),'spanName':_0x143f43[_0x4f18d2(0xa1)],'eventType':_0x4f18d2(0xa5),'logData':_0x143f43['logData'],..._0x143f43[_0x4f18d2(0x9c)]&&{'traceparent':_0x143f43[_0x4f18d2(0x9c)]}});}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
function a176_0x2f1a(){const _0x2a23dc=['title','1857096OSUYxt','851906KnORhU','1532xSmgCG','description','20515vDhQbd','7MXdbRf','907640xMPovB','platform-issue-log-collect','1434fDIfZW','63NfdxTG','issue.log.collect','3206269pWprXA','48yWiWtQ','653740adZfjd','2901ZTselo'];a176_0x2f1a=function(){return _0x2a23dc;};return a176_0x2f1a();}function a176_0x1b68(_0x9a37a0,_0x385760){_0x9a37a0=_0x9a37a0-0x12a;const _0x2f1a78=a176_0x2f1a();let _0x1b68e8=_0x2f1a78[_0x9a37a0];return _0x1b68e8;}const a176_0x2b6e89=a176_0x1b68;(function(_0x12d338,_0x3da874){const _0x2c28fc=a176_0x1b68,_0x1b95fc=_0x12d338();while(!![]){try{const _0x55c38f=-parseInt(_0x2c28fc(0x12c))/0x1+-parseInt(_0x2c28fc(0x12b))/0x2+-parseInt(_0x2c28fc(0x139))/0x3*(parseInt(_0x2c28fc(0x12d))/0x4)+-parseInt(_0x2c28fc(0x12f))/0x5*(-parseInt(_0x2c28fc(0x133))/0x6)+-parseInt(_0x2c28fc(0x130))/0x7*(-parseInt(_0x2c28fc(0x131))/0x8)+-parseInt(_0x2c28fc(0x134))/0x9*(-parseInt(_0x2c28fc(0x138))/0xa)+-parseInt(_0x2c28fc(0x136))/0xb*(-parseInt(_0x2c28fc(0x137))/0xc);if(_0x55c38f===_0x3da874)break;else _0x1b95fc['push'](_0x1b95fc['shift']());}catch(_0x2c8f08){_0x1b95fc['push'](_0x1b95fc['shift']());}}}(a176_0x2f1a,0x8a607));import{sendCliTraceLog}from'../telemetry/send-cli-trace-log.js';export const PLATFORM_ISSUE_TRACE_NAME=a176_0x2b6e89(0x132);export const PLATFORM_ISSUE_SPAN_NAME=a176_0x2b6e89(0x135);export async function sendPlatformIssueCollectLog(_0xb4bb6b){const _0x3cee78=a176_0x2b6e89;await sendCliTraceLog({'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0xb4bb6b[_0x3cee78(0x12a)],'issue.description':_0xb4bb6b[_0x3cee78(0x12e)]}});}
|
package/lib/utils/ai_config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a178_0x4f69(_0x42b929,_0x49825d){_0x42b929=_0x42b929-0x1b1;const _0x489226=a178_0x4892();let _0x4f69b1=_0x489226[_0x42b929];return _0x4f69b1;}const a178_0x59be8d=a178_0x4f69;(function(_0x9aa5a5,_0xf8913a){const _0x20921f=a178_0x4f69,_0x4edad8=_0x9aa5a5();while(!![]){try{const _0x26e380=-parseInt(_0x20921f(0x1c1))/0x1+parseInt(_0x20921f(0x1ba))/0x2*(-parseInt(_0x20921f(0x1da))/0x3)+-parseInt(_0x20921f(0x1b3))/0x4*(parseInt(_0x20921f(0x1c5))/0x5)+parseInt(_0x20921f(0x1de))/0x6*(-parseInt(_0x20921f(0x1d3))/0x7)+parseInt(_0x20921f(0x1e6))/0x8*(-parseInt(_0x20921f(0x1cd))/0x9)+-parseInt(_0x20921f(0x1b2))/0xa*(parseInt(_0x20921f(0x1d2))/0xb)+parseInt(_0x20921f(0x1c0))/0xc;if(_0x26e380===_0xf8913a)break;else _0x4edad8['push'](_0x4edad8['shift']());}catch(_0x298f0d){_0x4edad8['push'](_0x4edad8['shift']());}}}(a178_0x4892,0xb5842));export const CORE_IDE_CONFIGS={'cursor':{'name':a178_0x59be8d(0x1d9),'description':a178_0x59be8d(0x1b4),'folders':['.cursorrules',a178_0x59be8d(0x1dc)],'files':[{'type':a178_0x59be8d(0x1bc),'path':a178_0x59be8d(0x1d0),'template':a178_0x59be8d(0x1bf)}]},'windsurf':{'name':'Windsurf','description':a178_0x59be8d(0x1e5),'folders':[a178_0x59be8d(0x1c8)],'files':[{'type':a178_0x59be8d(0x1bc),'path':a178_0x59be8d(0x1c9),'template':a178_0x59be8d(0x1bf)}]},'claude':{'name':'Claude\x20Code','description':'Claude\x20Code','folders':['.claude'],'files':[{'type':'file','path':a178_0x59be8d(0x1cf),'template':'SKILL.md.tpl'}]},'cline':{'name':'Cline','description':a178_0x59be8d(0x1e1),'folders':['.cline'],'files':[{'type':'file','path':a178_0x59be8d(0x1c7),'template':a178_0x59be8d(0x1bf)}]},'codex':{'name':'Codex','description':a178_0x59be8d(0x1c3),'folders':[a178_0x59be8d(0x1e4)],'files':[{'type':a178_0x59be8d(0x1bc),'path':a178_0x59be8d(0x1db),'template':a178_0x59be8d(0x1bf)}]},'opencode':{'name':a178_0x59be8d(0x1c4),'description':'OpenCode\x20IDE','folders':[a178_0x59be8d(0x1ca)],'files':[{'type':a178_0x59be8d(0x1bc),'path':a178_0x59be8d(0x1bd),'template':a178_0x59be8d(0x1bf)}]},'qoder':{'name':a178_0x59be8d(0x1cc),'description':'Qoder\x20IDE','folders':['.qoder'],'files':[{'type':a178_0x59be8d(0x1bc),'path':a178_0x59be8d(0x1ce),'template':a178_0x59be8d(0x1bf)},{'type':a178_0x59be8d(0x1bc),'path':a178_0x59be8d(0x1b9),'template':a178_0x59be8d(0x1bf)}]},'codebuddy':{'name':a178_0x59be8d(0x1b5),'description':a178_0x59be8d(0x1e2),'folders':[a178_0x59be8d(0x1be)],'files':[{'type':a178_0x59be8d(0x1bc),'path':a178_0x59be8d(0x1b1),'template':a178_0x59be8d(0x1bf)}]},'trae':{'name':a178_0x59be8d(0x1d1),'description':a178_0x59be8d(0x1d8),'folders':[a178_0x59be8d(0x1e7)],'files':[{'type':a178_0x59be8d(0x1bc),'path':'.trae/skills/lovrabet/SKILL.md','template':'SKILL.md.tpl'}]}};function a178_0x4892(){const _0x3f9bce=['336666dxFAVB','codebuddy','file','.opencode/skills/lovrabet/SKILL.md','.codebuddy','SKILL.md.tpl','67105884Clhqfz','1030782JRCeKn','windsurf','Codex\x20IDE','OpenCode','20cZlJRS','cline','.cline/skills/lovrabet/SKILL.md','.windsurf','.windsurf/workflows/rabetbase.md','.opencode','antigravity','Qoder','63jcJoFI','.qoder/rules/rabetbase.md','.claude/skills/lovrabet/SKILL.md','.cursor/skills/rabetbase.md','Trae','1772903gLfIue','161VaHuGR','opencode','qoder','codex','其他\x20(通用模板)','Trae\x20IDE','Cursor','15BDbcFf','.codex/skills/lovrabet/SKILL.md','.cursor','trae','258282plkldu','Antigravity','.agent/skills/lovrabet/SKILL.md','Cline\x20IDE','CodeBuddy\x20IDE','cursor','.codex','Windsurf\x20IDE','1100144jJLhYT','.trae','通用模板\x20-\x20兜底方案','.codebuddy/skills/lovrabet/SKILL.md','10CRkGpm','862340EGDRCC','Cursor\x20IDE','CodeBuddy','Antigravity\x20IDE','.agent','claude','.qoder/skills/lovrabet/SKILL.md'];a178_0x4892=function(){return _0x3f9bce;};return a178_0x4892();}export const IDE_CONFIGS={...CORE_IDE_CONFIGS,'agent':{'name':a178_0x59be8d(0x1d7),'description':a178_0x59be8d(0x1e8),'folders':['.agent'],'files':[{'type':a178_0x59be8d(0x1bc),'path':'.agent/skills/lovrabet/SKILL.md','template':a178_0x59be8d(0x1bf)}]},'antigravity':{'name':a178_0x59be8d(0x1df),'description':a178_0x59be8d(0x1b6),'folders':[a178_0x59be8d(0x1b7)],'files':[{'type':a178_0x59be8d(0x1bc),'path':a178_0x59be8d(0x1e0),'template':a178_0x59be8d(0x1bf)}]}};export const CORE_IDE_LIST=[a178_0x59be8d(0x1b8),a178_0x59be8d(0x1c6),'codebuddy','codex',a178_0x59be8d(0x1e3),a178_0x59be8d(0x1d4),a178_0x59be8d(0x1d5),a178_0x59be8d(0x1dd),a178_0x59be8d(0x1c2)];export const IDE_LIST=[a178_0x59be8d(0x1cb),a178_0x59be8d(0x1b8),a178_0x59be8d(0x1c6),a178_0x59be8d(0x1bb),a178_0x59be8d(0x1d6),a178_0x59be8d(0x1e3),'opencode','qoder',a178_0x59be8d(0x1dd),'windsurf','agent'];export const ALL_CORE_IDES=[a178_0x59be8d(0x1e3),a178_0x59be8d(0x1c2),a178_0x59be8d(0x1b8),'cline',a178_0x59be8d(0x1d6),a178_0x59be8d(0x1d4),a178_0x59be8d(0x1d5),'codebuddy',a178_0x59be8d(0x1dd)];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1d99c6,_0x5596a6){const _0x45f482=a179_0x2e86,_0x156208=_0x1d99c6();while(!![]){try{const _0x56eaee=-parseInt(_0x45f482(0x1d3))/0x1*(-parseInt(_0x45f482(0x1da))/0x2)+parseInt(_0x45f482(0x1d5))/0x3+parseInt(_0x45f482(0x1dc))/0x4*(-parseInt(_0x45f482(0x1d4))/0x5)+-parseInt(_0x45f482(0x1d7))/0x6*(-parseInt(_0x45f482(0x1db))/0x7)+-parseInt(_0x45f482(0x1d2))/0x8*(parseInt(_0x45f482(0x1d9))/0x9)+parseInt(_0x45f482(0x1d1))/0xa+-parseInt(_0x45f482(0x1d6))/0xb*(-parseInt(_0x45f482(0x1d8))/0xc);if(_0x56eaee===_0x5596a6)break;else _0x156208['push'](_0x156208['shift']());}catch(_0x32eac2){_0x156208['push'](_0x156208['shift']());}}}(a179_0x1810,0x37040));import{createJqFilter,resolveBundledJqPaths}from'@lovrabet/cli-framework';function a179_0x1810(){const _0x2184e2=['260JRovYL','14MdqHQo','6580PZKPdm','1023690fHSefY','24kqwsil','1046WxAKZD','995wHTOQX','945810QfsGHk','826727xbApxu','90432vgNslp','12caZpxA','318663scZjPu'];a179_0x1810=function(){return _0x2184e2;};return a179_0x1810();}function a179_0x2e86(_0x2af3dc,_0x1abd18){_0x2af3dc=_0x2af3dc-0x1d1;const _0x181025=a179_0x1810();let _0x2e86e2=_0x181025[_0x2af3dc];return _0x2e86e2;}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(_0x54ad52,_0x17d100){const _0xb27a37=a180_0x1b85,_0x436244=_0x54ad52();while(!![]){try{const _0x334b98=-parseInt(_0xb27a37(0x18b))/0x1*(parseInt(_0xb27a37(0x192))/0x2)+parseInt(_0xb27a37(0x195))/0x3+-parseInt(_0xb27a37(0x197))/0x4*(parseInt(_0xb27a37(0x189))/0x5)+-parseInt(_0xb27a37(0x18e))/0x6+parseInt(_0xb27a37(0x18c))/0x7*(-parseInt(_0xb27a37(0x196))/0x8)+-parseInt(_0xb27a37(0x193))/0x9+parseInt(_0xb27a37(0x198))/0xa*(parseInt(_0xb27a37(0x18d))/0xb);if(_0x334b98===_0x17d100)break;else _0x436244['push'](_0x436244['shift']());}catch(_0x4217d0){_0x436244['push'](_0x436244['shift']());}}}(a180_0x220c,0x295ec));import{getTemplateBaseUrl}from'../utils/config.js';export async function fetchCdnConfig(){const _0x3f2aed=a180_0x1b85,_0x5655f2=getTemplateBaseUrl(),_0x12d966=[_0x5655f2+'/config.json',_0x5655f2+_0x3f2aed(0x191)];for(const _0xcb0f85 of _0x12d966){try{const _0x4dd494=await fetch(_0xcb0f85,{'headers':{'Accept':'application/json'}});if(!_0x4dd494['ok'])continue;const _0x4e017f=await _0x4dd494['json']();if(!_0x4e017f['cli']?.['stableVersion']||!_0x4e017f[_0x3f2aed(0x190)]?.[_0x3f2aed(0x194)]?.[_0x3f2aed(0x18a)])continue;return _0x4e017f;}catch{}}return null;}let cachedConfig=null,cacheTime=0x0;const CACHE_TTL=0x5*0x3c*0x3e8,FAILURE_CACHE_TTL=0x3c*0x3e8;function a180_0x1b85(_0x4d904d,_0x1c050b){_0x4d904d=_0x4d904d-0x189;const _0x220cb8=a180_0x220c();let _0x1b859f=_0x220cb8[_0x4d904d];return _0x1b859f;}let hasCachedConfig=![];export async function getCdnConfig(){const _0x310e3f=a180_0x1b85,_0x511e37=Date[_0x310e3f(0x18f)]();if(hasCachedConfig){const _0xde279=cachedConfig?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x511e37-cacheTime<_0xde279)return cachedConfig;}const _0x1860d1=await fetchCdnConfig();return cachedConfig=_0x1860d1,cacheTime=_0x511e37,hasCachedConfig=!![],_0x1860d1;}export function clearCdnConfigCache(){cachedConfig=null,cacheTime=0x0,hasCachedConfig=![];}function a180_0x220c(){const _0x374109=['sdk','/config/index.json','210794Jtnvtw','1126845GWMgfa','node','650661oxGxMo','190704xpOVvz','244752WIaRUh','7377740KIjjPy','20mjMPbp','stableVersion','1zGGlJu','21NeuZrM','11oJhSVf','1430046ATPGBz','now'];a180_0x220c=function(){return _0x374109;};return a180_0x220c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a181_0x495e62=a181_0x194b;(function(_0x304f4f,_0x354a50){const _0x1e9b25=a181_0x194b,_0x4d4a6d=_0x304f4f();while(!![]){try{const _0xeebd43=-parseInt(_0x1e9b25(0x14a))/0x1+-parseInt(_0x1e9b25(0x14f))/0x2*(-parseInt(_0x1e9b25(0x155))/0x3)+-parseInt(_0x1e9b25(0x140))/0x4*(-parseInt(_0x1e9b25(0x146))/0x5)+-parseInt(_0x1e9b25(0x159))/0x6*(-parseInt(_0x1e9b25(0x13c))/0x7)+-parseInt(_0x1e9b25(0x152))/0x8*(-parseInt(_0x1e9b25(0x157))/0x9)+parseInt(_0x1e9b25(0x13d))/0xa*(parseInt(_0x1e9b25(0x14c))/0xb)+-parseInt(_0x1e9b25(0x150))/0xc;if(_0xeebd43===_0x354a50)break;else _0x4d4a6d['push'](_0x4d4a6d['shift']());}catch(_0x54ada9){_0x4d4a6d['push'](_0x4d4a6d['shift']());}}}(a181_0x1df3,0xaecb5));import a181_0x5608b5 from'node:fs';import a181_0x492ee9 from'node:path';import a181_0x1bb5cc from'semver';import{getCdnConfig}from'../utils/cdn-config.js';const FALLBACK_MIN_SDK_VERSION=a181_0x495e62(0x143);function isNonNumericVersion(_0x2d066d){const _0xe359e0=a181_0x495e62,_0x20329f=[/^latest$/i,/^beta$/i,/^alpha$/i,/^canary$/i,/^\*$/,/^x$/];return _0x20329f['some'](_0x361638=>_0x361638[_0xe359e0(0x145)](_0x2d066d));}function getInstalledVersion(_0x155523,_0x3c1af5){const _0xabe010=a181_0x495e62;try{const _0x6383e5=a181_0x492ee9[_0xabe010(0x14b)](_0x155523,_0xabe010(0x148),_0x3c1af5,_0xabe010(0x13f));if(a181_0x5608b5[_0xabe010(0x15b)](_0x6383e5)){const _0xb7dc6b=JSON[_0xabe010(0x13b)](a181_0x5608b5[_0xabe010(0x142)](_0x6383e5,_0xabe010(0x13e)));return _0xb7dc6b[_0xabe010(0x138)]||null;}}catch{}return null;}async function getSdkStableVersion(){const _0x5deff8=a181_0x495e62;try{const _0x3abc86=await getCdnConfig();return _0x3abc86?.[_0x5deff8(0x144)]?.[_0x5deff8(0x149)]?.[_0x5deff8(0x137)]||null;}catch{return null;}}async function getSdkPackageName(){const _0x51528f=a181_0x495e62;try{const _0x3432d7=await getCdnConfig();return _0x3432d7?.[_0x51528f(0x144)]?.[_0x51528f(0x149)]?.[_0x51528f(0x154)]||_0x51528f(0x136);}catch{return'@lovrabet/sdk';}}function a181_0x194b(_0x277e7d,_0x58afde){_0x277e7d=_0x277e7d-0x136;const _0x1df329=a181_0x1df3();let _0x194bf3=_0x1df329[_0x277e7d];return _0x194bf3;}export async function checkSdkVersion(_0x2f0e74){const _0x4d60aa=a181_0x495e62,_0x30abee=a181_0x492ee9[_0x4d60aa(0x14b)](_0x2f0e74,'package.json'),[_0x4a04ba,_0x2e07d4]=await Promise['all']([getSdkStableVersion(),getSdkPackageName()]),_0x2ee5d0=_0x4a04ba||FALLBACK_MIN_SDK_VERSION;if(!a181_0x5608b5[_0x4d60aa(0x15b)](_0x30abee))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2ee5d0,'packageName':_0x2e07d4,'stableVersion':_0x4a04ba};try{const _0x4776d4=JSON['parse'](a181_0x5608b5['readFileSync'](_0x30abee,'utf8')),_0x22ee05=_0x4776d4[_0x4d60aa(0x13a)]||{},_0x1fc3ea=_0x4776d4['devDependencies']||{},_0x340690=_0x22ee05[_0x2e07d4]||_0x1fc3ea[_0x2e07d4];if(!_0x340690)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2ee5d0,'packageName':_0x2e07d4,'stableVersion':_0x4a04ba};let _0x453ba4=getInstalledVersion(_0x2f0e74,_0x2e07d4);!_0x453ba4&&(_0x453ba4=_0x340690);if(isNonNumericVersion(_0x340690))return{'installed':!![],'version':_0x453ba4,'needsUpgrade':![],'minVersion':_0x2ee5d0,'packageName':_0x2e07d4,'stableVersion':_0x4a04ba};const _0x11c4e0=a181_0x1bb5cc[_0x4d60aa(0x139)](_0x453ba4),_0x4686b6=a181_0x1bb5cc[_0x4d60aa(0x139)](_0x2ee5d0),_0x5eff6c=_0x11c4e0&&_0x4686b6?a181_0x1bb5cc['lt'](_0x11c4e0,_0x4686b6):![];return{'installed':!![],'version':_0x453ba4,'needsUpgrade':_0x5eff6c,'minVersion':_0x2ee5d0,'packageName':_0x2e07d4,'stableVersion':_0x4a04ba};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':_0x2ee5d0,'packageName':_0x2e07d4,'stableVersion':_0x4a04ba};}}export function checkSdkVersionSync(_0x83efd2){const _0x3bed55=a181_0x495e62,_0x3aced3=a181_0x492ee9[_0x3bed55(0x14b)](_0x83efd2,'package.json'),_0x596ec8=_0x3bed55(0x136);if(!a181_0x5608b5[_0x3bed55(0x15b)](_0x3aced3))return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x596ec8,'stableVersion':null};try{const _0x258332=JSON[_0x3bed55(0x13b)](a181_0x5608b5[_0x3bed55(0x142)](_0x3aced3,_0x3bed55(0x14e))),_0x4cbb5a=_0x258332[_0x3bed55(0x13a)]||{},_0x25cb5e=_0x258332[_0x3bed55(0x151)]||{},_0x4b9418=_0x4cbb5a[_0x596ec8]||_0x25cb5e[_0x596ec8];if(!_0x4b9418)return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x596ec8,'stableVersion':null};let _0x5683b2=getInstalledVersion(_0x83efd2,_0x596ec8);!_0x5683b2&&(_0x5683b2=_0x4b9418);if(isNonNumericVersion(_0x4b9418))return{'installed':!![],'version':_0x5683b2,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x596ec8,'stableVersion':null};const _0x4f4d62=a181_0x1bb5cc['coerce'](_0x5683b2),_0x7d867d=_0x4f4d62?a181_0x1bb5cc['lt'](_0x4f4d62,FALLBACK_MIN_SDK_VERSION):![];return{'installed':!![],'version':_0x5683b2,'needsUpgrade':_0x7d867d,'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x596ec8,'stableVersion':null};}catch{return{'installed':![],'version':null,'needsUpgrade':![],'minVersion':FALLBACK_MIN_SDK_VERSION,'packageName':_0x596ec8,'stableVersion':null};}}function a181_0x1df3(){const _0x312632=['node','451279BQEHmE','join','11GfXTmQ','needsUpgrade','utf8','2xNEudS','30318684DcQlqy','devDependencies','678088ydozUt','↪\x20SDK\x20update\x20available','packageName','4005993TfEpJY','log','18dzkcrx','\x1b[33m','120wYcAij','\x20\x20\x20Current\x20version:\x20','existsSync','\x1b[0m','@lovrabet/sdk','stableVersion','version','coerce','dependencies','parse','26614FWLFiY','12349460RiBfEs','utf-8','package.json','3511816HffZum','\x1b[1m','readFileSync','1.2.0','sdk','test','5ZDArYZ','latest','node_modules'];a181_0x1df3=function(){return _0x312632;};return a181_0x1df3();}export function printSdkUpgradeWarning(_0x110382){const _0x4479c9=a181_0x495e62;if(!_0x110382[_0x4479c9(0x14d)])return;const _0x35818c=_0x4479c9(0x158),_0x201d32=_0x4479c9(0x15c),_0x421c18=_0x4479c9(0x141),_0x430e59=_0x110382[_0x4479c9(0x154)]||_0x4479c9(0x136),_0x294ea2=_0x110382[_0x4479c9(0x137)]||_0x110382['minVersion'],_0x5bafd3='npm\x20install\x20'+_0x430e59+'@'+(_0x294ea2||_0x4479c9(0x147));console[_0x4479c9(0x156)](),console[_0x4479c9(0x156)](''+_0x35818c+_0x421c18+_0x4479c9(0x153)+_0x201d32),console[_0x4479c9(0x156)](_0x35818c+_0x4479c9(0x15a)+_0x430e59+'@'+_0x110382['version']+_0x201d32),console[_0x4479c9(0x156)](_0x35818c+'\x20\x20\x20Stable\x20version:\x20'+_0x294ea2+_0x201d32),console[_0x4479c9(0x156)](_0x35818c+'\x20\x20\x20Upgrade\x20command:\x20'+_0x5bafd3+_0x201d32),console[_0x4479c9(0x156)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x55caf8,_0xed010){const _0x17d2b6=a182_0xb89f,_0x244dbe=_0x55caf8();while(!![]){try{const _0x3b21d0=parseInt(_0x17d2b6(0x158))/0x1*(-parseInt(_0x17d2b6(0x157))/0x2)+-parseInt(_0x17d2b6(0x146))/0x3+-parseInt(_0x17d2b6(0x14c))/0x4+parseInt(_0x17d2b6(0x15d))/0x5*(-parseInt(_0x17d2b6(0x13c))/0x6)+parseInt(_0x17d2b6(0x159))/0x7*(parseInt(_0x17d2b6(0x139))/0x8)+-parseInt(_0x17d2b6(0x14a))/0x9*(parseInt(_0x17d2b6(0x156))/0xa)+-parseInt(_0x17d2b6(0x14f))/0xb*(-parseInt(_0x17d2b6(0x151))/0xc);if(_0x3b21d0===_0xed010)break;else _0x244dbe['push'](_0x244dbe['shift']());}catch(_0x4d2d51){_0x244dbe['push'](_0x244dbe['shift']());}}}(a182_0x46ba,0x3afb6));import{readFileSync}from'node:fs';import{resolve,dirname}from'node:path';import{fileURLToPath}from'node:url';function a182_0xb89f(_0x1373c5,_0x3b0713){_0x1373c5=_0x1373c5-0x132;const _0x46bae4=a182_0x46ba();let _0xb89f1=_0x46bae4[_0x1373c5];return _0xb89f1;}import a182_0xefc7cd from'semver';import{getCliVersionPolicy}from'../utils/cli-version-policy.js';import{NPM_PACKAGE_NAME}from'../constant/cli.js';import{CliErrors}from'../errors.js';export function getCliUpgradeCommand(_0x202dec){const _0x33d3cf=a182_0xb89f,_0x318625=_0x202dec[_0x33d3cf(0x13d)]||_0x33d3cf(0x13b);return _0x33d3cf(0x133)+NPM_PACKAGE_NAME+'@'+_0x318625;}function getCurrentCliVersion(){const _0x41d04c=a182_0xb89f;try{const _0x310ece=fileURLToPath(import.meta.url),_0x195ce8=resolve(dirname(_0x310ece),_0x41d04c(0x150)),_0x4b99ba=resolve(_0x195ce8,_0x41d04c(0x15a)),_0x32a678=JSON[_0x41d04c(0x142)](readFileSync(_0x4b99ba,_0x41d04c(0x14e)));return _0x32a678[_0x41d04c(0x148)]||'1.0.0';}catch{return _0x41d04c(0x149);}}export async function checkCliVersion(){const _0x1d7c80=a182_0xb89f,_0x3b8d87=getCurrentCliVersion(),_0x38652b=await getCliVersionPolicy(),_0x142cec=_0x38652b?.[_0x1d7c80(0x13d)]||null,_0x16dd21=_0x38652b?.['minimumVersion']||null;let _0x21c64b=![],_0x482b7f=![];const _0x523c9b=a182_0xefc7cd[_0x1d7c80(0x14d)](_0x3b8d87);if(_0x523c9b&&_0x142cec)try{const _0xeb0620=a182_0xefc7cd[_0x1d7c80(0x14d)](_0x142cec);if(_0xeb0620)_0x21c64b=a182_0xefc7cd['lt'](_0x523c9b,_0xeb0620);}catch{}if(_0x523c9b&&_0x16dd21)try{const _0x35aee2=a182_0xefc7cd[_0x1d7c80(0x14d)](_0x16dd21);if(_0x35aee2)_0x482b7f=a182_0xefc7cd['lt'](_0x523c9b,_0x35aee2);}catch{}return _0x482b7f&&(_0x21c64b=!![]),{'currentVersion':_0x3b8d87,'stableVersion':_0x142cec,'minimumVersion':_0x16dd21,'needsUpgrade':_0x21c64b,'belowMinimum':_0x482b7f,'isPreRelease':![],'upgradeMessage':_0x38652b?.[_0x1d7c80(0x138)],'minimumVersionMessage':_0x38652b?.[_0x1d7c80(0x152)]};}function a182_0x46ba(){const _0x3eef5f=['Current\x20CLI\x20version\x20is\x20below\x20the\x20minimum\x20supported\x20version.','currentVersion','\x20\x20\x20Stable\x20version:\x20','Upgrade\x20command:\x20','parse','Current\x20version:\x20','minimumVersion','\x1b[0m','300963bNFEJQ','\x20\x20\x20Minimum\x20required:\x20','version','1.0.0','351243BbZptt','join','243444vVxQgL','coerce','utf-8','11PrCxhN','../..','8967576CHxmCP','minimumVersionMessage','belowMinimum','needsUpgrade','\x20\x20\x20Upgrade\x20command:\x20','50xdQgSy','295734fwirLX','1ZBZXJu','7rLkkDx','package.json','log','\x1b[31m','270805wBrCjI','\x20\x20\x20Current\x20CLI\x20version:\x20','npm\x20install\x20-g\x20','↪\x20Critical\x20CLI\x20upgrade\x20required','\x20\x20\x20','\x20\x20\x20Recommended\x20stable:\x20','filter','upgradeMessage','421096GDUGem','↪\x20New\x20version\x20available','latest','6APriwk','stableVersion'];a182_0x46ba=function(){return _0x3eef5f;};return a182_0x46ba();}export function printCliUpgradeWarning(_0x24c636){const _0x355969=a182_0xb89f;if(!_0x24c636[_0x355969(0x154)]&&!_0x24c636[_0x355969(0x153)])return;const _0x161fec=_0x355969(0x15c),_0x1e9d99='\x1b[33m',_0xd6571=_0x355969(0x145),_0x5e708b='\x1b[1m',_0x35c33d=getCliUpgradeCommand(_0x24c636);console[_0x355969(0x15b)](),_0x24c636[_0x355969(0x153)]?(console['log'](''+_0x161fec+_0x5e708b+_0x355969(0x134)+_0xd6571),console[_0x355969(0x15b)](_0x161fec+_0x355969(0x132)+_0x24c636['currentVersion']+_0xd6571),_0x24c636[_0x355969(0x144)]&&console['log'](_0x161fec+_0x355969(0x147)+_0x24c636[_0x355969(0x144)]+_0xd6571),_0x24c636[_0x355969(0x13d)]&&_0x24c636[_0x355969(0x13d)]!==_0x24c636['minimumVersion']&&console['log'](_0x161fec+_0x355969(0x136)+_0x24c636[_0x355969(0x13d)]+_0xd6571),_0x24c636[_0x355969(0x152)]&&console['log'](_0x161fec+_0x355969(0x135)+_0x24c636[_0x355969(0x152)]+_0xd6571),console[_0x355969(0x15b)](_0x161fec+_0x355969(0x155)+_0x35c33d+_0xd6571)):(console[_0x355969(0x15b)](''+_0x1e9d99+_0x5e708b+_0x355969(0x13a)+_0xd6571),console['log'](_0x1e9d99+_0x355969(0x132)+_0x24c636[_0x355969(0x13f)]+_0xd6571),console['log'](_0x1e9d99+_0x355969(0x140)+_0x24c636[_0x355969(0x13d)]+_0xd6571),_0x24c636[_0x355969(0x138)]&&console[_0x355969(0x15b)](_0x1e9d99+_0x355969(0x135)+_0x24c636[_0x355969(0x138)]+_0xd6571),console[_0x355969(0x15b)](_0x1e9d99+_0x355969(0x155)+_0x35c33d+_0xd6571)),console[_0x355969(0x15b)]();}export function assertCliVersionSupported(_0x3da23b){const _0x24923=a182_0xb89f;if(!_0x3da23b[_0x24923(0x153)])return;const _0xdba443=[_0x3da23b[_0x24923(0x152)],_0x24923(0x143)+_0x3da23b['currentVersion'],_0x3da23b[_0x24923(0x144)]?'Minimum\x20required:\x20'+_0x3da23b[_0x24923(0x144)]:null,_0x24923(0x141)+getCliUpgradeCommand(_0x3da23b)][_0x24923(0x137)](Boolean)[_0x24923(0x14b)]('\x0a');throw CliErrors['validation'](_0x24923(0x13e),_0xdba443);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x5ce9bb,_0x26cb03){const _0x47dff9=a183_0x50fc,_0x14727e=_0x5ce9bb();while(!![]){try{const _0x5bf0ed=parseInt(_0x47dff9(0x132))/0x1+parseInt(_0x47dff9(0x140))/0x2+parseInt(_0x47dff9(0x13c))/0x3*(-parseInt(_0x47dff9(0x139))/0x4)+-parseInt(_0x47dff9(0x142))/0x5*(parseInt(_0x47dff9(0x12d))/0x6)+-parseInt(_0x47dff9(0x141))/0x7*(-parseInt(_0x47dff9(0x134))/0x8)+parseInt(_0x47dff9(0x13b))/0x9*(parseInt(_0x47dff9(0x130))/0xa)+-parseInt(_0x47dff9(0x136))/0xb*(parseInt(_0x47dff9(0x13f))/0xc);if(_0x5bf0ed===_0x26cb03)break;else _0x14727e['push'](_0x14727e['shift']());}catch(_0x523252){_0x14727e['push'](_0x14727e['shift']());}}}(a183_0x3262,0x51dbf));function a183_0x3262(){const _0x46e131=['signal','1336PFbNtw','string','21615plMJwS','json','minimumVersion','544772jHqAIw','latestVersion','3006UAQcYR','9vTnHGm','abort','now','2340SaaqLV','555138JAsVXE','20489liCijw','795595kfpBdQ','minimumVersionMessage','upgradeMessage','18reKebl','trim','cli','17020tgeBdA','object','269560ZXyFjP'];a183_0x3262=function(){return _0x46e131;};return a183_0x3262();}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(_0x1b7f5d){const _0x59d9b1=a183_0x50fc;return typeof _0x1b7f5d===_0x59d9b1(0x135)&&_0x1b7f5d[_0x59d9b1(0x12e)]()['length']>0x0?_0x1b7f5d[_0x59d9b1(0x12e)]():null;}function normalizeCliVersionPolicy(_0x10a8e5){const _0x377140=a183_0x50fc;if(!_0x10a8e5||typeof _0x10a8e5!==_0x377140(0x131))return null;const _0x289d82=_0x10a8e5,_0x39abd3=_0x289d82[_0x377140(0x12f)]&&typeof _0x289d82[_0x377140(0x12f)]===_0x377140(0x131)?_0x289d82[_0x377140(0x12f)]:_0x289d82,_0x5a19c6=pickString(_0x39abd3['stableVersion'])||pickString(_0x39abd3[_0x377140(0x13a)])||pickString(_0x39abd3['recommendedVersion']),_0x597203=pickString(_0x39abd3[_0x377140(0x138)])||pickString(_0x39abd3['minVersion']);if(!_0x5a19c6&&!_0x597203)return null;return{'stableVersion':_0x5a19c6,'minimumVersion':_0x597203,'upgradeMessage':pickString(_0x39abd3[_0x377140(0x12c)])||undefined,'minimumVersionMessage':pickString(_0x39abd3[_0x377140(0x143)])||undefined};}function a183_0x50fc(_0xde6725,_0x38bba1){_0xde6725=_0xde6725-0x12c;const _0x3262f9=a183_0x3262();let _0x50fcec=_0x3262f9[_0xde6725];return _0x50fcec;}export async function fetchCliVersionPolicy(){const _0x244f80=a183_0x50fc,_0x2acb97=new AbortController(),_0x185e50=setTimeout(()=>_0x2acb97[_0x244f80(0x13d)](),FETCH_TIMEOUT_MS);try{const _0x39958a=await fetch(CLI_VERSION_POLICY_URL,{'headers':{'Accept':'application/json'},'signal':_0x2acb97[_0x244f80(0x133)]});if(!_0x39958a['ok'])return null;const _0x489191=await _0x39958a[_0x244f80(0x137)]();return normalizeCliVersionPolicy(_0x489191);}catch{return null;}finally{clearTimeout(_0x185e50);}}let cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];export async function getCliVersionPolicy(){const _0x56e5fc=a183_0x50fc,_0x25dbd8=Date[_0x56e5fc(0x13e)]();if(hasCachedPolicy){const _0xfc47d2=cachedPolicy?CACHE_TTL:FAILURE_CACHE_TTL;if(_0x25dbd8-cacheTime<_0xfc47d2)return cachedPolicy;}const _0x1cd480=await fetchCliVersionPolicy();return cachedPolicy=_0x1cd480,cacheTime=_0x25dbd8,hasCachedPolicy=!![],_0x1cd480;}export function clearCliVersionPolicyCache(){cachedPolicy=null,cacheTime=0x0,hasCachedPolicy=![];}
|
package/lib/utils/config.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a184_0x3427c1=a184_0x4789;(function(_0x2f80b3,_0x1b0136){const _0x4acac4=a184_0x4789,_0xe4e720=_0x2f80b3();while(!![]){try{const _0x27f45c=parseInt(_0x4acac4(0xce))/0x1*(parseInt(_0x4acac4(0xcf))/0x2)+-parseInt(_0x4acac4(0xc8))/0x3*(-parseInt(_0x4acac4(0xd0))/0x4)+-parseInt(_0x4acac4(0xd1))/0x5+parseInt(_0x4acac4(0xc9))/0x6+parseInt(_0x4acac4(0xca))/0x7+parseInt(_0x4acac4(0xcd))/0x8+parseInt(_0x4acac4(0xc7))/0x9*(-parseInt(_0x4acac4(0xd2))/0xa);if(_0x27f45c===_0x1b0136)break;else _0xe4e720['push'](_0xe4e720['shift']());}catch(_0x2a7c74){_0xe4e720['push'](_0xe4e720['shift']());}}}(a184_0x9dab,0x6918a));import{initEnv}from'../constant/env.js';import{readRawConfig,getConfigAppCode as a184_0x58fc01,getMultiAppConfigs as a184_0x2077e4,getTemplateBaseUrl as a184_0x43cefa}from'../context.js';function a184_0x9dab(){const _0x2347c1=['30845OzUeif','100ZtDbhn','project','2515059xLjxbE','9wCwxXQ','4682322XkOmAn','4115307eLLpMz','string','env','5146440ZbWBew','671442ZVwZba','2WTInuX','730824eZzERs'];a184_0x9dab=function(){return _0x2347c1;};return a184_0x9dab();}export{getProjectConfigPath,getGlobalConfigPath}from'../context.js';function a184_0x4789(_0x2e68b9,_0x3727b2){_0x2e68b9=_0x2e68b9-0xc7;const _0x9dab50=a184_0x9dab();let _0x4789c2=_0x9dab50[_0x2e68b9];return _0x4789c2;}export{isInProject}from'../context.js';export function readConfig(_0x508c2c){const _0x14652e=a184_0x4789,_0x29267a=readRawConfig(_0x508c2c);return _0x29267a[_0x14652e(0xcc)]&&typeof _0x29267a[_0x14652e(0xcc)]===_0x14652e(0xcb)&&initEnv(_0x29267a[_0x14652e(0xcc)]),_0x29267a;}export function getConfigAppCode(){return a184_0x58fc01();}export function getMultiAppConfigs(_0x233bf4=a184_0x3427c1(0xd3)){return a184_0x2077e4(_0x233bf4);}export function getTemplateBaseUrl(){return a184_0x43cefa();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x122070,_0x59e149){const _0x21b43d=a185_0x456d,_0x5bacf8=_0x122070();while(!![]){try{const _0x2a6dfc=-parseInt(_0x21b43d(0x149))/0x1+parseInt(_0x21b43d(0x140))/0x2+parseInt(_0x21b43d(0x14c))/0x3+-parseInt(_0x21b43d(0x143))/0x4*(parseInt(_0x21b43d(0x142))/0x5)+-parseInt(_0x21b43d(0x148))/0x6+-parseInt(_0x21b43d(0x13f))/0x7*(parseInt(_0x21b43d(0x147))/0x8)+parseInt(_0x21b43d(0x144))/0x9*(parseInt(_0x21b43d(0x141))/0xa);if(_0x2a6dfc===_0x59e149)break;else _0x5bacf8['push'](_0x5bacf8['shift']());}catch(_0x534b7a){_0x5bacf8['push'](_0x5bacf8['shift']());}}}(a185_0x11ef,0x210ef));function a185_0x11ef(){const _0x362550=['mkdirSync','join','4064pIpDha','456810ZcuNbx','245731ENlpug','error','copyFileSync','95274OfphwV','readdirSync','name','复制目录时出错:','1008dVzgBq','62514DdKWPw','10GHhNfC','75915EfJmYP','28cTrlcA','5163219mxRzbc'];a185_0x11ef=function(){return _0x362550;};return a185_0x11ef();}import a185_0x3502a5 from'node:path';function a185_0x456d(_0x4186b3,_0xcbb6b1){_0x4186b3=_0x4186b3-0x13f;const _0x11efd9=a185_0x11ef();let _0x456d70=_0x11efd9[_0x4186b3];return _0x456d70;}import a185_0x1988e4 from'node:fs';export async function copyDirectory(_0xecb7,_0xb8abc){const _0x59f0b4=a185_0x456d;try{const _0xd620e0=a185_0x1988e4[_0x59f0b4(0x14d)](_0xecb7,{'withFileTypes':!![]});a185_0x1988e4[_0x59f0b4(0x145)](_0xb8abc,{'recursive':!![]});for(const _0xe669f9 of _0xd620e0){const _0x4cf2b5=a185_0x3502a5[_0x59f0b4(0x146)](_0xecb7,_0xe669f9[_0x59f0b4(0x14e)]),_0x474e4c=a185_0x3502a5[_0x59f0b4(0x146)](_0xb8abc,_0xe669f9[_0x59f0b4(0x14e)]);_0xe669f9['isDirectory']()?await copyDirectory(_0x4cf2b5,_0x474e4c):a185_0x1988e4[_0x59f0b4(0x14b)](_0x4cf2b5,_0x474e4c);}}catch(_0x40ba8c){console[_0x59f0b4(0x14a)](_0x59f0b4(0x14f),_0x40ba8c);}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a186_0x3576(){const _0x3f7344=['449784BuXquC','4476283hLZrft','23446Rrvuuq','12FfXevk','string','isFinite','number','10668592DMKoyQ','7439895ofRnCe','2773197QHRpOj','234dfxlMd','trim','6574008HoxFWs'];a186_0x3576=function(){return _0x3f7344;};return a186_0x3576();}(function(_0x10b69a,_0x18b7a4){const _0x13301f=a186_0x3b34,_0x59398a=_0x10b69a();while(!![]){try{const _0xa1660=parseInt(_0x13301f(0x1ef))/0x1+parseInt(_0x13301f(0x1f1))/0x2*(parseInt(_0x13301f(0x1f9))/0x3)+-parseInt(_0x13301f(0x1fb))/0x4+parseInt(_0x13301f(0x1f7))/0x5+parseInt(_0x13301f(0x1f2))/0x6*(parseInt(_0x13301f(0x1f0))/0x7)+-parseInt(_0x13301f(0x1f6))/0x8+-parseInt(_0x13301f(0x1f8))/0x9;if(_0xa1660===_0x18b7a4)break;else _0x59398a['push'](_0x59398a['shift']());}catch(_0x5b3bee){_0x59398a['push'](_0x59398a['shift']());}}}(a186_0x3576,0xce83e));function toFiniteNumber(_0x13f968){const _0x472a5a=a186_0x3b34;if(typeof _0x13f968===_0x472a5a(0x1f5)&&Number['isFinite'](_0x13f968))return _0x13f968;if(typeof _0x13f968===_0x472a5a(0x1f3)){const _0x83f0f7=_0x13f968[_0x472a5a(0x1fa)]();if(!_0x83f0f7)return undefined;const _0x57b346=Number(_0x83f0f7);if(Number[_0x472a5a(0x1f4)](_0x57b346))return _0x57b346;}return undefined;}function a186_0x3b34(_0x323a4b,_0x2cf7a2){_0x323a4b=_0x323a4b-0x1ef;const _0x35760b=a186_0x3576();let _0x3b34f7=_0x35760b[_0x323a4b];return _0x3b34f7;}export function normalizeEntityWithIdResponse(_0x485ea7){const _0x910f2b=toFiniteNumber(_0x485ea7);if(_0x910f2b!==undefined)return{'id':_0x910f2b,'entity':{'id':_0x910f2b}};if(!_0x485ea7||typeof _0x485ea7!=='object')return{'id':undefined,'entity':{}};const _0x5ba05b={..._0x485ea7},_0x230fc9=toFiniteNumber(_0x5ba05b['id']);return _0x230fc9!==undefined&&(_0x5ba05b['id']=_0x230fc9),{'id':_0x230fc9,'entity':_0x5ba05b};}
|
package/lib/utils/file-utils.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x55280f,_0x10c7a5){const _0x46d1e8=a187_0x4211,_0x58ba35=_0x55280f();while(!![]){try{const _0x455201=-parseInt(_0x46d1e8(0x93))/0x1+-parseInt(_0x46d1e8(0x9a))/0x2*(-parseInt(_0x46d1e8(0x92))/0x3)+-parseInt(_0x46d1e8(0x97))/0x4+-parseInt(_0x46d1e8(0x96))/0x5+parseInt(_0x46d1e8(0x98))/0x6+parseInt(_0x46d1e8(0x95))/0x7*(parseInt(_0x46d1e8(0x99))/0x8)+parseInt(_0x46d1e8(0x9b))/0x9;if(_0x455201===_0x10c7a5)break;else _0x58ba35['push'](_0x58ba35['shift']());}catch(_0x2f6b76){_0x58ba35['push'](_0x58ba35['shift']());}}}(a187_0x5e57,0x80eb0));function a187_0x4211(_0x1030ce,_0x1829fd){_0x1030ce=_0x1030ce-0x92;const _0x5e57dd=a187_0x5e57();let _0x421103=_0x5e57dd[_0x1030ce];return _0x421103;}import{existsSync,mkdirSync,copyFileSync,readdirSync,statSync}from'node:fs';import{join}from'node:path';function a187_0x5e57(){const _0xebad9e=['2335716oCSsvS','139596gopiiP','352825tnGZtY','isDirectory','14mWSFLJ','304230zwyFEl','3441828MCdVzs','2348268hmDQlZ','1068664wBbFcZ','38GSzGBK'];a187_0x5e57=function(){return _0xebad9e;};return a187_0x5e57();}export async function copyDir(_0x842fa7,_0x34f398){const _0x4ba483=a187_0x4211,_0x1165a1=statSync(_0x842fa7);if(_0x1165a1[_0x4ba483(0x94)]()){!existsSync(_0x34f398)&&mkdirSync(_0x34f398,{'recursive':!![]});const _0x141c9a=readdirSync(_0x842fa7);for(const _0x36c0a3 of _0x141c9a){await copyDir(join(_0x842fa7,_0x36c0a3),join(_0x34f398,_0x36c0a3));}}else copyFileSync(_0x842fa7,_0x34f398);}export function ensureDir(_0x5d52aa){!existsSync(_0x5d52aa)&&mkdirSync(_0x5d52aa,{'recursive':!![]});}export function pathExists(_0x2d3be8){return existsSync(_0x2d3be8);}
|
package/lib/utils/guides-cdn.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a188_0x2b61dc=a188_0x33be;(function(_0x911f71,_0x58d6c3){const _0x86cd59=a188_0x33be,_0x4877f5=_0x911f71();while(!![]){try{const _0x45d343=parseInt(_0x86cd59(0x193))/0x1*(-parseInt(_0x86cd59(0x195))/0x2)+parseInt(_0x86cd59(0x18f))/0x3*(parseInt(_0x86cd59(0x183))/0x4)+-parseInt(_0x86cd59(0x19a))/0x5+-parseInt(_0x86cd59(0x18e))/0x6*(-parseInt(_0x86cd59(0x181))/0x7)+parseInt(_0x86cd59(0x17b))/0x8*(-parseInt(_0x86cd59(0x182))/0x9)+parseInt(_0x86cd59(0x185))/0xa+-parseInt(_0x86cd59(0x18c))/0xb*(parseInt(_0x86cd59(0x17d))/0xc);if(_0x45d343===_0x58d6c3)break;else _0x4877f5['push'](_0x4877f5['shift']());}catch(_0x10feb7){_0x4877f5['push'](_0x4877f5['shift']());}}}(a188_0x3b82,0x5f246));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 _0x4239aa=a188_0x33be,_0x74c90c=getTemplateBaseUrl();return _0x74c90c+_0x4239aa(0x179);}const CACHE_DIR=join(homedir(),a188_0x2b61dc(0x184),a188_0x2b61dc(0x196));export async function fetchGuidesFromCDN(){const _0x5a2819=a188_0x2b61dc,_0x1182ba=getGuidesCdnUrl(),_0x1433d1=await fetch(_0x1182ba,{'headers':{'Accept':_0x5a2819(0x192)}});if(!_0x1433d1['ok'])throw new Error('CDN\x20请求失败:\x20'+_0x1433d1[_0x5a2819(0x17f)]+'\x20'+_0x1433d1['statusText']);const _0x46706b=await _0x1433d1[_0x5a2819(0x18d)]();if(!_0x46706b[_0x5a2819(0x188)]||typeof _0x46706b[_0x5a2819(0x188)]!==_0x5a2819(0x189))throw new Error(_0x5a2819(0x17e));return _0x46706b;}export function writeGuidesToProject(_0x1d46de,_0x2cba52,_0x414cc9='.lovrabet/skill/guides',_0x566ecf){const _0xdf1ab3=a188_0x2b61dc,_0x207891=join(_0x2cba52,_0x414cc9);mkdirSync(_0x207891,{'recursive':!![]});for(const [_0x560d65,_0x5561ca]of Object[_0xdf1ab3(0x190)](_0x1d46de[_0xdf1ab3(0x188)])){let _0x3756e7=_0x5561ca[_0xdf1ab3(0x191)];_0x5561ca[_0xdf1ab3(0x198)]&&(_0x3756e7=appendUpdateTime(_0x3756e7,_0x5561ca['lastUpdated'])),writeFileSync(join(_0x207891,_0x560d65+'.md'),_0x3756e7,'utf-8');}}export function appendUpdateTime(_0x50ff41,_0x1072e3){const _0x6b2a4c=a188_0x2b61dc;return _0x50ff41=_0x50ff41[_0x6b2a4c(0x199)](/\n*>更新时间:.*$/m,''),_0x50ff41[_0x6b2a4c(0x19b)]()+('\x0a\x0a>更新时间:'+_0x1072e3);}export function getSkillTemplate(_0x5c7a32){const _0x372959=a188_0x2b61dc;return _0x5c7a32[_0x372959(0x17a)]?.[_0x372959(0x191)]||'';}function a188_0x33be(_0x192fb3,_0x2a17ac){_0x192fb3=_0x192fb3-0x179;const _0x3b820=a188_0x3b82();let _0x33be76=_0x3b820[_0x192fb3];return _0x33be76;}export function appendExtendContents(_0x338210,_0x24ab93,_0x41f866){const _0x3da966=a188_0x2b61dc,_0x2eb817=[];for(const [,_0x59721b]of Object[_0x3da966(0x190)](_0x24ab93['guides'])){_0x59721b[_0x3da966(0x18a)]&&_0x2eb817[_0x3da966(0x197)](_0x59721b[_0x3da966(0x18a)]['trimEnd']());}if(_0x2eb817[_0x3da966(0x180)]===0x0)return _0x338210;return _0x338210[_0x3da966(0x19b)]()+'\x0a\x0a'+_0x2eb817[_0x3da966(0x194)]('\x0a\x0a')+'\x0a';}function a188_0x3b82(){const _0x38ff62=['status','length','1019186umchGr','6406002sIkSpT','8GEGLbg','.lovrabet','6526460DnXuAJ','CDN\x20数据中缺少\x20skillTemplate','title','guides','object','extendContent','map','11eLwWnt','json','6QxbKVi','1105080lPKCcK','entries','content','application/json','207327StQeLJ','join','2qRnvkh','cache','push','lastUpdated','replace','1018505PUtBVM','trimEnd','/skills/guides.json','skillTemplate','8IOVxPb','path','269472RXOKdJ','CDN\x20返回数据格式错误'];a188_0x3b82=function(){return _0x38ff62;};return a188_0x3b82();}export function writeSkillFile(_0x4b1109,_0x20f2e4,_0xa17ac0){const _0x164308=a188_0x2b61dc,_0x6ef645=getSkillTemplate(_0x4b1109);if(!_0x6ef645)throw new Error(_0x164308(0x186));const _0x58054e=dirname(_0x20f2e4);mkdirSync(_0x58054e,{'recursive':!![]});let _0x250c62=_0x6ef645['replace'](/\{\{IDE_NAME\}\}/g,_0xa17ac0);_0x250c62=appendExtendContents(_0x250c62,_0x4b1109),_0x4b1109[_0x164308(0x17a)][_0x164308(0x198)]&&(_0x250c62=appendUpdateTime(_0x250c62,_0x4b1109[_0x164308(0x17a)][_0x164308(0x198)])),writeFileSync(_0x20f2e4,_0x250c62,'utf-8');}export async function installGuides(_0x455cc0){const _0x493718=a188_0x2b61dc,_0x585271=await fetchGuidesFromCDN();return writeGuidesToProject(_0x585271,_0x455cc0),Object['keys'](_0x585271[_0x493718(0x188)])[_0x493718(0x180)];}export function getGuidesSummary(_0x4d9702){const _0x1ff565=a188_0x2b61dc;return Object[_0x1ff565(0x190)](_0x4d9702[_0x1ff565(0x188)])[_0x1ff565(0x18b)](([_0x22cc43,_0x597ceb])=>({'key':_0x22cc43,'title':_0x597ceb[_0x1ff565(0x187)],'path':_0x597ceb[_0x1ff565(0x17c)]}));}
|
package/lib/utils/http-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x21a9ee,_0x3287e7){const _0x6fc08b=a189_0x4dcd,_0x41050e=_0x21a9ee();while(!![]){try{const _0xc5c32c=-parseInt(_0x6fc08b(0x82))/0x1*(-parseInt(_0x6fc08b(0x73))/0x2)+parseInt(_0x6fc08b(0x7d))/0x3+parseInt(_0x6fc08b(0x76))/0x4*(-parseInt(_0x6fc08b(0x78))/0x5)+-parseInt(_0x6fc08b(0x86))/0x6+-parseInt(_0x6fc08b(0x84))/0x7+parseInt(_0x6fc08b(0x88))/0x8+parseInt(_0x6fc08b(0x87))/0x9*(-parseInt(_0x6fc08b(0x7b))/0xa);if(_0xc5c32c===_0x3287e7)break;else _0x41050e['push'](_0x41050e['shift']());}catch(_0xef65c0){_0x41050e['push'](_0x41050e['shift']());}}}(a189_0x5d64,0xb8060));export async function httpRequest(_0x8ab62,_0x3f5c48={}){const _0x45450d=a189_0x4dcd,{timeout:timeout=0x7530,retries:retries=0x3,retryDelay:retryDelay=0x3e8,headers:headers={}}=_0x3f5c48;let _0x5596ff=null;for(let _0x54ac56=0x0;_0x54ac56<=retries;_0x54ac56++){try{const _0x4a0f14=new AbortController(),_0x5b9da6=setTimeout(()=>_0x4a0f14['abort'](),timeout),_0x479542=await fetch(_0x8ab62,{'headers':headers,'signal':_0x4a0f14[_0x45450d(0x81)]});clearTimeout(_0x5b9da6);let _0x5168ee;const _0x4cead5=_0x479542['headers'][_0x45450d(0x7f)](_0x45450d(0x8d));return _0x4cead5?.[_0x45450d(0x83)](_0x45450d(0x77))?_0x5168ee=await _0x479542[_0x45450d(0x80)]():_0x5168ee=await _0x479542[_0x45450d(0x8e)](),{'ok':_0x479542['ok'],'status':_0x479542[_0x45450d(0x8b)],'statusText':_0x479542[_0x45450d(0x75)],'data':_0x5168ee,'headers':_0x479542[_0x45450d(0x85)],'url':_0x479542[_0x45450d(0x8c)],'text':()=>_0x479542[_0x45450d(0x8e)]()};}catch(_0x15512e){_0x5596ff=_0x15512e instanceof Error?_0x15512e:new Error(String(_0x15512e));if(_0x54ac56===retries)break;if(shouldRetry(_0x15512e)){console['log']('*\x20请求失败,'+retryDelay+_0x45450d(0x7e)+(_0x54ac56+0x1)+_0x45450d(0x7a)),await sleep(retryDelay);continue;}else break;}}throw _0x5596ff||new Error(_0x45450d(0x89));}function a189_0x5d64(){const _0x1fafa0=['message','\x20次重试...','50mYwaDg','ECONNRESET','1929261XykDwU','ms\x20后进行第\x20','get','json','signal','1BNUFSo','includes','308231ALpqrs','headers','761190NqNFhq','2350116uqOsqM','10744520OOPsla','Request\x20failed','TypeError','status','url','content-type','text','1583922zrljIy','ENOTFOUND','statusText','438268ZvjTYS','application/json','25UVStcI'];a189_0x5d64=function(){return _0x1fafa0;};return a189_0x5d64();}function a189_0x4dcd(_0x17bb11,_0x1a8312){_0x17bb11=_0x17bb11-0x73;const _0x5d64b9=a189_0x5d64();let _0x4dcd0b=_0x5d64b9[_0x17bb11];return _0x4dcd0b;}function shouldRetry(_0x491d1b){const _0x224b74=a189_0x4dcd;if(_0x491d1b instanceof Error){if(_0x491d1b['name']==='AbortError')return![];if(_0x491d1b['name']===_0x224b74(0x8a)&&_0x491d1b[_0x224b74(0x79)][_0x224b74(0x83)]('fetch'))return!![];if(_0x491d1b[_0x224b74(0x79)][_0x224b74(0x83)](_0x224b74(0x7c)))return!![];if(_0x491d1b[_0x224b74(0x79)][_0x224b74(0x83)](_0x224b74(0x74)))return![];}return![];}function sleep(_0x3c5f66){return new Promise(_0x12f3c7=>setTimeout(_0x12f3c7,_0x3c5f66));}export function validateUrl(_0x286bab){try{return new URL(_0x286bab),!![];}catch{return![];}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3cc7d9,_0xf0c29d){const _0xb8e1ad=a190_0x2ad1,_0xa5cb0b=_0x3cc7d9();while(!![]){try{const _0xaf74d3=-parseInt(_0xb8e1ad(0xa7))/0x1*(parseInt(_0xb8e1ad(0x9c))/0x2)+-parseInt(_0xb8e1ad(0x9d))/0x3*(parseInt(_0xb8e1ad(0x97))/0x4)+parseInt(_0xb8e1ad(0x9b))/0x5*(-parseInt(_0xb8e1ad(0xa6))/0x6)+parseInt(_0xb8e1ad(0xa4))/0x7*(-parseInt(_0xb8e1ad(0x98))/0x8)+parseInt(_0xb8e1ad(0xa1))/0x9+-parseInt(_0xb8e1ad(0xa0))/0xa+parseInt(_0xb8e1ad(0x99))/0xb*(parseInt(_0xb8e1ad(0xa2))/0xc);if(_0xaf74d3===_0xf0c29d)break;else _0xa5cb0b['push'](_0xa5cb0b['shift']());}catch(_0x58a1b2){_0xa5cb0b['push'](_0xa5cb0b['shift']());}}}(a190_0x55cd,0xa73ec));function a190_0x2ad1(_0x31f0e1,_0x342d6e){_0x31f0e1=_0x31f0e1-0x96;const _0x55cd38=a190_0x55cd();let _0x2ad1f7=_0x55cd38[_0x31f0e1];return _0x2ad1f7;}function env(_0x5a6ace){return process.env[`RABETBASE_${_0x5a6ace}`]||process.env[`LOVRABET_${_0x5a6ace}`]||undefined;}export function isNonInteractive(_0x1b76a9){const _0x419024=a190_0x2ad1;return!!(_0x1b76a9[_0x419024(0xa3)]||_0x1b76a9['ci']||env('CI')===_0x419024(0x96)||process.env.CI===_0x419024(0x96)||!process['stdout'][_0x419024(0x9e)]||!isStdinRawModeSupported());}function isStdinRawModeSupported(){const _0x4345fd=a190_0x2ad1;if(!process['stdin'][_0x4345fd(0x9e)])return![];try{const _0x5761e4=process[_0x4345fd(0x9f)][_0x4345fd(0xa5)];return process[_0x4345fd(0x9f)][_0x4345fd(0x9a)](!![]),process[_0x4345fd(0x9f)][_0x4345fd(0x9a)](_0x5761e4??![]),!![];}catch{return![];}}function a190_0x55cd(){const _0x4c185f=['2MuazTi','true','4gWuxmx','224SnutQn','55nWjooQ','setRawMode','10VoSmfQ','647396BoEJHX','3451809vVQnvd','isTTY','stdin','1085700KoEEcR','3973149PdjsYF','7182456gubjTn','nonInteractive','80878tEAsuZ','isRaw','1557102nmCBZp'];a190_0x55cd=function(){return _0x4c185f;};return a190_0x55cd();}
|
package/lib/utils/logger.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a191_0x57ac97=a191_0x1a98;(function(_0x4eb788,_0x21ece2){const _0x436bc4=a191_0x1a98,_0x397a9b=_0x4eb788();while(!![]){try{const _0x308560=parseInt(_0x436bc4(0xbf))/0x1*(-parseInt(_0x436bc4(0xab))/0x2)+-parseInt(_0x436bc4(0xbe))/0x3*(-parseInt(_0x436bc4(0xcb))/0x4)+parseInt(_0x436bc4(0xa9))/0x5+-parseInt(_0x436bc4(0xb6))/0x6+parseInt(_0x436bc4(0xa7))/0x7+parseInt(_0x436bc4(0xcf))/0x8*(-parseInt(_0x436bc4(0xa0))/0x9)+-parseInt(_0x436bc4(0xb5))/0xa*(-parseInt(_0x436bc4(0xb8))/0xb);if(_0x308560===_0x21ece2)break;else _0x397a9b['push'](_0x397a9b['shift']());}catch(_0xe9dfb9){_0x397a9b['push'](_0x397a9b['shift']());}}}(a191_0xea55,0xac534));function a191_0x1a98(_0x4fe60b,_0x2cea30){_0x4fe60b=_0x4fe60b-0x9c;const _0xea557b=a191_0xea55();let _0x1a9850=_0xea557b[_0x4fe60b];return _0x1a9850;}import a191_0x182388 from'winston';import a191_0x9cd4d4 from'node:fs';import a191_0xf0263 from'node:path';function a191_0xea55(){const _0x459119=['1265127jfTjkE','4BrGrII','blue','writeFileSync','utf8','mkdirSync','parse','完成:\x20','log','timestamp','addColors','transports','split','4yNApSV','getWinstonInstance','rawCommand','trim','9036472xHOGkH','initWinstonLogger','Failed\x20to\x20clear\x20logs:','message','errors','unknown','format','currentRawCommand','winstonLogger','combine','command','createLogger','yellow','stringify','readFileSync','9XPfhhr','success','失败:\x20','existsSync','green','File','error','9568741toGUEN','toISOString','5502305OqgRyf','logFilePath','410158uEJkZW','logTask','.lovrabet.log','red','join','info','Failed\x20to\x20read\x20logs:','clearLogs','warn','map','28990CnWgNi','4496616dAwNbi','setRawCommand','1958zhuOum','level','setLogPath','dirname','now','duration'];a191_0xea55=function(){return _0x459119;};return a191_0xea55();}class Logger{[a191_0x57ac97(0xd7)];[a191_0x57ac97(0xaa)];[a191_0x57ac97(0xd6)]='';constructor(){const _0x33f6d4=a191_0x57ac97;this[_0x33f6d4(0xaa)]='';}[a191_0x57ac97(0xb7)](_0x1d411e){const _0x315e82=a191_0x57ac97;this[_0x315e82(0xd6)]=_0x1d411e;}[a191_0x57ac97(0xd0)](){const _0x4c1df3=a191_0x57ac97,_0x1c2d66=a191_0xf0263[_0x4c1df3(0xbb)](this[_0x4c1df3(0xaa)]);!a191_0x9cd4d4[_0x4c1df3(0xa3)](_0x1c2d66)&&a191_0x9cd4d4[_0x4c1df3(0xc3)](_0x1c2d66,{'recursive':!![]});const _0x3156fd=a191_0x182388[_0x4c1df3(0xd5)][_0x4c1df3(0xd8)](a191_0x182388[_0x4c1df3(0xd5)][_0x4c1df3(0xc7)](),a191_0x182388[_0x4c1df3(0xd5)][_0x4c1df3(0xd3)]({'stack':!![]}),a191_0x182388['format']['printf'](_0xced95a=>{const _0x2c1f8f=_0x4c1df3,_0x3c037d={'timestamp':_0xced95a[_0x2c1f8f(0xc7)]||new Date()[_0x2c1f8f(0xa8)](),'level':_0xced95a[_0x2c1f8f(0xb9)]||_0x2c1f8f(0xb0),'command':_0xced95a[_0x2c1f8f(0xd9)]||_0x2c1f8f(0xd4),'rawCommand':_0xced95a[_0x2c1f8f(0xcd)]||this[_0x2c1f8f(0xd6)]||undefined,'message':_0xced95a[_0x2c1f8f(0xd2)]||'','duration':_0xced95a[_0x2c1f8f(0xbd)]||undefined,'details':_0xced95a['details']||undefined};return JSON[_0x2c1f8f(0x9e)](_0x3c037d);}));this['winstonLogger']=a191_0x182388[_0x4c1df3(0x9c)]({'level':_0x4c1df3(0xb0),'format':_0x3156fd,'transports':[new a191_0x182388[(_0x4c1df3(0xc9))][(_0x4c1df3(0xa5))]({'filename':this[_0x4c1df3(0xaa)],'level':_0x4c1df3(0xb0)})],'silent':![]}),a191_0x182388[_0x4c1df3(0xc8)]({'success':_0x4c1df3(0xa4),'error':_0x4c1df3(0xae),'warn':_0x4c1df3(0x9d),'info':_0x4c1df3(0xc0)});}[a191_0x57ac97(0xba)](_0x2dea18){const _0x13e8c9=a191_0x57ac97;this['logFilePath']=a191_0xf0263[_0x13e8c9(0xaf)](_0x2dea18,_0x13e8c9(0xad)),this[_0x13e8c9(0xd7)]&&this[_0x13e8c9(0xd7)]['clear'](),this['initWinstonLogger']();}[a191_0x57ac97(0xb0)](_0x4b870a,_0x4c4c81,_0x475fbd){const _0x420389=a191_0x57ac97;if(!this['logFilePath']||!this[_0x420389(0xd7)])return;this[_0x420389(0xd7)][_0x420389(0xb0)](_0x4c4c81,{'command':_0x4b870a,'details':_0x475fbd});}[a191_0x57ac97(0xa1)](_0x470dcb,_0x188c01,_0x3eb987,_0x35f508){const _0x21d2a4=a191_0x57ac97;if(!this[_0x21d2a4(0xaa)]||!this[_0x21d2a4(0xd7)])return;this[_0x21d2a4(0xd7)][_0x21d2a4(0xc6)](_0x21d2a4(0xb0),_0x188c01,{'level':_0x21d2a4(0xa1),'command':_0x470dcb,'duration':_0x3eb987,'details':_0x35f508});}[a191_0x57ac97(0xa6)](_0x3068cb,_0x2ba7b8,_0x1572cb){const _0x2ed97d=a191_0x57ac97;if(!this[_0x2ed97d(0xaa)]||!this[_0x2ed97d(0xd7)])return;this[_0x2ed97d(0xd7)]['error'](_0x2ba7b8,{'command':_0x3068cb,'details':_0x1572cb});}[a191_0x57ac97(0xb3)](_0x30fb48,_0x42289a,_0x2d2ed5){const _0x2a1b3f=a191_0x57ac97;if(!this[_0x2a1b3f(0xaa)]||!this['winstonLogger'])return;this[_0x2a1b3f(0xd7)][_0x2a1b3f(0xb3)](_0x42289a,{'command':_0x30fb48,'details':_0x2d2ed5});}async[a191_0x57ac97(0xac)](_0x5dac10,_0x5aa614,_0x3e0331){const _0x21f41f=a191_0x57ac97,_0x4cf62d=Date[_0x21f41f(0xbc)]();this[_0x21f41f(0xb0)](_0x5dac10,'开始执行:\x20'+_0x5aa614);try{const _0x12ba34=await _0x3e0331(),_0x4fc808=Date[_0x21f41f(0xbc)]()-_0x4cf62d;return this['success'](_0x5dac10,_0x21f41f(0xc5)+_0x5aa614,_0x4fc808),_0x12ba34;}catch(_0x3e47c7){const _0x456aaa=Date[_0x21f41f(0xbc)]()-_0x4cf62d;this[_0x21f41f(0xa6)](_0x5dac10,_0x21f41f(0xa2)+_0x5aa614,{'error':_0x3e47c7 instanceof Error?_0x3e47c7['message']:String(_0x3e47c7),'duration':_0x456aaa});throw _0x3e47c7;}}['readLogs'](){const _0x3dd85f=a191_0x57ac97;try{if(!a191_0x9cd4d4[_0x3dd85f(0xa3)](this[_0x3dd85f(0xaa)]))return[];const _0x872278=a191_0x9cd4d4[_0x3dd85f(0x9f)](this[_0x3dd85f(0xaa)],_0x3dd85f(0xc2));return _0x872278[_0x3dd85f(0xca)]('\x0a')['filter'](_0x2f134c=>_0x2f134c[_0x3dd85f(0xce)]())[_0x3dd85f(0xb4)](_0x2edda0=>JSON[_0x3dd85f(0xc4)](_0x2edda0));}catch(_0x2a3cda){return console[_0x3dd85f(0xb3)](_0x3dd85f(0xb1),_0x2a3cda),[];}}[a191_0x57ac97(0xb2)](){const _0x60ebe2=a191_0x57ac97;try{a191_0x9cd4d4[_0x60ebe2(0xa3)](this[_0x60ebe2(0xaa)])&&a191_0x9cd4d4[_0x60ebe2(0xc1)](this[_0x60ebe2(0xaa)],'',_0x60ebe2(0xc2));}catch(_0xaad73b){console[_0x60ebe2(0xb3)](_0x60ebe2(0xd1),_0xaad73b);}}[a191_0x57ac97(0xcc)](){const _0x5ddf7e=a191_0x57ac97;return this[_0x5ddf7e(0xd7)];}}export const logger=new Logger();
|