@lovrabet/rabetbase-cli 2.1.14-beta.3 → 2.2.0
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/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -0
- package/lib/commands/dataset/relation-delete.js +1 -0
- package/lib/commands/dataset/relation-shared.js +1 -0
- package/lib/commands/dataset/relation-update.js +1 -0
- package/lib/commands/dataset/relations.js +1 -0
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/menu/update.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -0
- 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 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +1 -1
- package/lib/commands/dataset/link-create.js +0 -1
- package/lib/commands/dataset/link-delete.js +0 -1
- package/lib/commands/dataset/link-shared.js +0 -1
- package/lib/commands/dataset/link-update.js +0 -1
- package/lib/commands/dataset/links.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a66_0x551f(_0x2cd0c8,_0x10b1d3){_0x2cd0c8=_0x2cd0c8-0xb7;const _0x9acd0=a66_0x9acd();let _0x551f6a=_0x9acd0[_0x2cd0c8];return _0x551f6a;}const a66_0x287485=a66_0x551f;function a66_0x9acd(){const _0xa565ae=['21gaSCOg','plan','46542nLfDil','4567101SoGQrk','570ISkZML','str','Analysis\x20status\x20for\x20','994632mouqNk','12OXwwNY','read','125310JCrKbk','appCode','7975584yUYHRq','string','414579OauqFq','2946530xNsepF','32wFqxvu','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','analyze-status'];a66_0x9acd=function(){return _0xa565ae;};return a66_0x9acd();}(function(_0x59da45,_0x3668c9){const _0x795342=a66_0x551f,_0x138456=_0x59da45();while(!![]){try{const _0x280a34=parseInt(_0x795342(0xc8))/0x1*(parseInt(_0x795342(0xb7))/0x2)+-parseInt(_0x795342(0xbb))/0x3*(parseInt(_0x795342(0xbd))/0x4)+-parseInt(_0x795342(0xc4))/0x5*(parseInt(_0x795342(0xc2))/0x6)+-parseInt(_0x795342(0xc0))/0x7*(-parseInt(_0x795342(0xc7))/0x8)+parseInt(_0x795342(0xb9))/0x9+parseInt(_0x795342(0xbc))/0xa+parseInt(_0x795342(0xc3))/0xb;if(_0x280a34===_0x3668c9)break;else _0x138456['push'](_0x138456['shift']());}catch(_0x3aa06b){_0x138456['push'](_0x138456['shift']());}}}(a66_0x9acd,0xb2791));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';export const dbAnalyzeStatus={'service':'db','command':a66_0x287485(0xbf),'description':'Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','risk':a66_0x287485(0xc9),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a66_0x287485(0xc1),'type':a66_0x287485(0xba),'required':!![],'description':a66_0x287485(0xbe)}],async 'execute'(_0x44b73d){const _0x268758=a66_0x287485,_0x5c5acf=_0x44b73d['num']('id'),_0x3a087c=_0x44b73d[_0x268758(0xc5)]('plan'),_0x1dc625=await getDbAnalysisStatus(_0x3a087c),_0x26138f=buildDbPageLinks(_0x44b73d[_0x268758(0xb8)],_0x5c5acf);return{'ok':!![],'data':{'dbLinkId':_0x5c5acf,'planId':_0x3a087c,'status':_0x1dc625,..._0x26138f?{'links':_0x26138f}:{}},'message':_0x268758(0xc6)+_0x3a087c};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a67_0x4e15e6=a67_0x3e4a;(function(_0x4c0c56,_0x70fa03){const _0x7292f4=a67_0x3e4a,_0x45c875=_0x4c0c56();while(!![]){try{const _0x1eee0c=parseInt(_0x7292f4(0x173))/0x1*(parseInt(_0x7292f4(0x161))/0x2)+-parseInt(_0x7292f4(0x15e))/0x3*(parseInt(_0x7292f4(0x170))/0x4)+-parseInt(_0x7292f4(0x186))/0x5+parseInt(_0x7292f4(0x15c))/0x6*(parseInt(_0x7292f4(0x16a))/0x7)+parseInt(_0x7292f4(0x169))/0x8+-parseInt(_0x7292f4(0x158))/0x9+-parseInt(_0x7292f4(0x15b))/0xa*(-parseInt(_0x7292f4(0x17a))/0xb);if(_0x1eee0c===_0x70fa03)break;else _0x45c875['push'](_0x45c875['shift']());}catch(_0x337db4){_0x45c875['push'](_0x45c875['shift']());}}}(a67_0x334b,0xf0bf4));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a67_0x3e4a(_0x25fde8,_0x57a549){_0x25fde8=_0x25fde8-0x158;const _0x334b93=a67_0x334b();let _0x3e4a39=_0x334b93[_0x25fde8];return _0x3e4a39;}function a67_0x334b(){const _0x401274=['Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','\x20and\x20started\x20analysis','autostart','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','dbparam','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','8.0','boolean','7956955NLITvY','13410738OXZciX','bool','create','11825320zEfHME','5405106ijiIHy','Host\x20and\x20port:\x20host:port','103230hmfHav','message','password','11566AUDJXz','dbtype','databasePage','Database\x20username','/smartapi/dblink/create','dbdesc','Created\x20db\x20link\x20','trim','11029992mhQLkp','7mxYxYG','dbversion','username',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','str','Database\x20password','136VlBuOv','appCode','[redacted]','307gidCAt','Create\x20dblink','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','string','After\x20create,\x20start\x20schema\x20analysis','dbname','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','11ZcqxIm','dburl','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','POST'];a67_0x334b=function(){return _0x401274;};return a67_0x334b();}import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a67_0x4e15e6(0x15a),'description':'Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','risk':'write','flags':[APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a67_0x4e15e6(0x176),'required':!![],'description':a67_0x4e15e6(0x181)},DB_TYPE_FLAG,{'name':a67_0x4e15e6(0x16b),'type':'string','description':a67_0x4e15e6(0x179),'default':'8.0'},{'name':a67_0x4e15e6(0x17b),'type':a67_0x4e15e6(0x176),'required':!![],'description':a67_0x4e15e6(0x15d)},{'name':'username','type':a67_0x4e15e6(0x176),'required':!![],'description':a67_0x4e15e6(0x164)},{'name':a67_0x4e15e6(0x160),'type':'string','required':!![],'description':a67_0x4e15e6(0x16f)},{'name':'dbparam','type':'string','description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':a67_0x4e15e6(0x166),'type':a67_0x4e15e6(0x176),'description':'Human-readable\x20description'},{'name':a67_0x4e15e6(0x180),'type':a67_0x4e15e6(0x185),'description':a67_0x4e15e6(0x177),'default':![]}],async 'validate'(_0x4601c4){const _0x152fd0=a67_0x4e15e6,_0x348ff0=_0x4601c4[_0x152fd0(0x16e)](_0x152fd0(0x17b))[_0x152fd0(0x168)]();if(!validateDbUrl(_0x348ff0))throw CliErrors['validation'](_0x152fd0(0x17c)+_0x348ff0+'\x22',_0x152fd0(0x17e));},async 'dryRun'(_0x6bd6ab){const _0xd4a319=a67_0x4e15e6,_0x4a9542={'appCode':_0x6bd6ab[_0xd4a319(0x171)],'dbName':_0x6bd6ab[_0xd4a319(0x16e)]('dbname'),'dbType':_0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x162)),'dbVersion':_0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x16b))||_0xd4a319(0x184),'dbUrl':_0x6bd6ab[_0xd4a319(0x16e)]('dburl')[_0xd4a319(0x168)](),'username':_0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x16c)),'password':_0xd4a319(0x172),..._0x6bd6ab[_0xd4a319(0x16e)]('dbparam')?{'dbParam':_0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x182))}:{},..._0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x166))?{'dbDesc':_0x6bd6ab[_0xd4a319(0x16e)](_0xd4a319(0x166))}:{}};return{'method':_0xd4a319(0x17d),'url':_0xd4a319(0x165),'body':_0x4a9542,'description':[_0xd4a319(0x174),_0x6bd6ab[_0xd4a319(0x159)](_0xd4a319(0x180))?_0xd4a319(0x175):'No\x20follow-up\x20analysis']['join']('\x0a')};},async 'execute'(_0x46363f){const _0x3b1ad0=a67_0x4e15e6,_0x51bfaa={'appCode':_0x46363f['appCode'],'dbName':_0x46363f[_0x3b1ad0(0x16e)](_0x3b1ad0(0x178)),'dbType':_0x46363f[_0x3b1ad0(0x16e)]('dbtype'),'dbVersion':_0x46363f[_0x3b1ad0(0x16e)](_0x3b1ad0(0x16b))||_0x3b1ad0(0x184),'dbUrl':_0x46363f['str'](_0x3b1ad0(0x17b))[_0x3b1ad0(0x168)](),'username':_0x46363f[_0x3b1ad0(0x16e)](_0x3b1ad0(0x16c)),'password':_0x46363f['str']('password'),..._0x46363f['str'](_0x3b1ad0(0x182))?{'dbParam':_0x46363f[_0x3b1ad0(0x16e)]('dbparam')}:{},..._0x46363f[_0x3b1ad0(0x16e)]('dbdesc')?{'dbDesc':_0x46363f[_0x3b1ad0(0x16e)](_0x3b1ad0(0x166))}:{}},{id:_0x5ae41e,entity:_0x52f1b7}=normalizeEntityWithIdResponse(await createDbLink(_0x51bfaa));if(!_0x5ae41e)return{'ok':![],'message':_0x3b1ad0(0x183),'data':sanitizeDbLinkForOutput(_0x52f1b7)};let _0x399671,_0x3aaaa4;if(_0x46363f[_0x3b1ad0(0x159)](_0x3b1ad0(0x180)))try{_0x399671=await startDbAnalysis(_0x5ae41e);}catch(_0x220bd7){_0x3aaaa4=_0x220bd7 instanceof Error?_0x220bd7[_0x3b1ad0(0x15f)]:String(_0x220bd7);}const _0x1bc7ba=buildDbPageLinks(_0x46363f['appCode'],_0x5ae41e),_0x1a1bc9={'connection':sanitizeDbLinkForOutput(_0x52f1b7),..._0x1bc7ba?{'links':{'databasePage':_0x1bc7ba[_0x3b1ad0(0x163)]}}:{},..._0x399671?{'analysisPlanId':_0x399671}:{},..._0x3aaaa4?{'analysisStartWarning':_0x3aaaa4}:{}};let _0x5e48d9;return _0x46363f[_0x3b1ad0(0x159)](_0x3b1ad0(0x180))?_0x3aaaa4?_0x5e48d9=_0x3b1ad0(0x167)+_0x5ae41e+_0x3b1ad0(0x16d):_0x5e48d9='Created\x20db\x20link\x20'+_0x5ae41e+_0x3b1ad0(0x17f):_0x5e48d9=_0x3b1ad0(0x167)+_0x5ae41e,{'ok':!![],'data':_0x1a1bc9,'message':_0x5e48d9};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a68_0x30b659=a68_0x19e8;function a68_0x19e8(_0x47b706,_0x587140){_0x47b706=_0x47b706-0x180;const _0x1ef205=a68_0x1ef2();let _0x19e84b=_0x1ef205[_0x47b706];return _0x19e84b;}(function(_0x5d6dcf,_0x836259){const _0x4d6534=a68_0x19e8,_0x38ac4e=_0x5d6dcf();while(!![]){try{const _0x4d1bf6=-parseInt(_0x4d6534(0x188))/0x1+-parseInt(_0x4d6534(0x180))/0x2+parseInt(_0x4d6534(0x184))/0x3*(-parseInt(_0x4d6534(0x183))/0x4)+parseInt(_0x4d6534(0x18e))/0x5*(parseInt(_0x4d6534(0x181))/0x6)+parseInt(_0x4d6534(0x186))/0x7*(-parseInt(_0x4d6534(0x18f))/0x8)+-parseInt(_0x4d6534(0x18d))/0x9*(-parseInt(_0x4d6534(0x189))/0xa)+-parseInt(_0x4d6534(0x18c))/0xb*(-parseInt(_0x4d6534(0x18b))/0xc);if(_0x4d1bf6===_0x836259)break;else _0x38ac4e['push'](_0x38ac4e['shift']());}catch(_0x473f63){_0x38ac4e['push'](_0x38ac4e['shift']());}}}(a68_0x1ef2,0x407ec));import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a68_0x1ef2(){const _0x2d7a4c=['high-risk-write','4MlWkLc','1383123TjlIeJ','num','7WeMsMd','Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','458093KwplPa','40vMwPHL','delete','1203348LCOaNB','88pxTYTf','1182366ECOIgH','5svnzUa','755864XTdmtF','657208dbkwbH','1671990UlKEAN'];a68_0x1ef2=function(){return _0x2d7a4c;};return a68_0x1ef2();}export const dbDelete={'service':'db','command':a68_0x30b659(0x18a),'description':a68_0x30b659(0x187),'risk':a68_0x30b659(0x182),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5d3966){const _0x3e8a68=a68_0x30b659,_0x6a84b4=_0x5d3966[_0x3e8a68(0x185)]('id');return await deleteDbLink(_0x6a84b4),{'ok':!![],'data':{'id':_0x6a84b4,'deleted':!![]},'message':'Deleted\x20db\x20link\x20'+_0x6a84b4};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a69_0x43a90b=a69_0x3a01;function a69_0x3a01(_0x199880,_0xec271e){_0x199880=_0x199880-0x1d8;const _0x469c00=a69_0x469c();let _0x3a01b9=_0x469c00[_0x199880];return _0x3a01b9;}(function(_0x55c884,_0x5a2209){const _0x35af2a=a69_0x3a01,_0x4dbc4e=_0x55c884();while(!![]){try{const _0x109777=-parseInt(_0x35af2a(0x1dd))/0x1+parseInt(_0x35af2a(0x1d8))/0x2+parseInt(_0x35af2a(0x1e7))/0x3+parseInt(_0x35af2a(0x1df))/0x4*(-parseInt(_0x35af2a(0x1db))/0x5)+-parseInt(_0x35af2a(0x1de))/0x6*(-parseInt(_0x35af2a(0x1e4))/0x7)+-parseInt(_0x35af2a(0x1dc))/0x8*(-parseInt(_0x35af2a(0x1da))/0x9)+-parseInt(_0x35af2a(0x1e1))/0xa*(parseInt(_0x35af2a(0x1e5))/0xb);if(_0x109777===_0x5a2209)break;else _0x4dbc4e['push'](_0x4dbc4e['shift']());}catch(_0x2a3d60){_0x4dbc4e['push'](_0x4dbc4e['shift']());}}}(a69_0x469c,0x57f7d));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';function a69_0x469c(){const _0x4e2500=['Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','171HdOoLd','40360EXUsoW','110384LvCFPv','72388Mqvgpg','72tINObE','192eFrISr','num','929470KtVQzn','db\x20link\x20','read','236348BfGGnL','77hEiCdG','detail','1614591oUgYTS','530526aOAURA'];a69_0x469c=function(){return _0x4e2500;};return a69_0x469c();}export const dbDetail={'service':'db','command':a69_0x43a90b(0x1e6),'description':a69_0x43a90b(0x1d9),'risk':a69_0x43a90b(0x1e3),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x4f11f0){const _0x5b990b=a69_0x43a90b,_0x3dbdfe=_0x4f11f0[_0x5b990b(0x1e0)]('id'),_0x2e58d8=await getDbLinkInfo(_0x3dbdfe);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x2e58d8),'message':_0x5b990b(0x1e2)+_0x3dbdfe+':\x20'+_0x2e58d8['dbName']};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x31ebc2=a70_0xe092;function a70_0xe092(_0x3a2e9c,_0x177b43){_0x3a2e9c=_0x3a2e9c-0x16e;const _0x23a385=a70_0x23a3();let _0xe0923e=_0x23a385[_0x3a2e9c];return _0xe0923e;}(function(_0x43289b,_0x573cc7){const _0x3b4195=a70_0xe092,_0x28dfd0=_0x43289b();while(!![]){try{const _0x4c8d78=parseInt(_0x3b4195(0x17b))/0x1+parseInt(_0x3b4195(0x181))/0x2+-parseInt(_0x3b4195(0x17f))/0x3+parseInt(_0x3b4195(0x17a))/0x4*(parseInt(_0x3b4195(0x183))/0x5)+parseInt(_0x3b4195(0x182))/0x6*(parseInt(_0x3b4195(0x172))/0x7)+parseInt(_0x3b4195(0x173))/0x8+-parseInt(_0x3b4195(0x16f))/0x9*(parseInt(_0x3b4195(0x184))/0xa);if(_0x4c8d78===_0x573cc7)break;else _0x28dfd0['push'](_0x28dfd0['shift']());}catch(_0x151a1f){_0x28dfd0['push'](_0x28dfd0['shift']());}}}(a70_0x23a3,0xc2037));function a70_0x23a3(){const _0x244465=['\x20row(s),\x20total\x20','26755452kekJgH','number','Paged\x20diff\x20between\x20live\x20database\x20schema\x20and\x20last\x20analyzed\x20snapshot\x20(new\x20/\x20deleted\x20/\x20modified\x20tables)','70AOvyZx','7427440GfGBnu','length','string','Page\x20index\x20(1-based)','page','num','Page\x20size','19816ovWuEJ','1023211UndwWO','table','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','read','4725690PetyWV','pagesize','1853280nIsphb','679098vxCkBz','1345JHDYba','10dJyKPZ','appCode','str'];a70_0x23a3=function(){return _0x244465;};return a70_0x23a3();}import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDiff={'service':'db','command':'diff','description':a70_0x31ebc2(0x171),'risk':a70_0x31ebc2(0x17e),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a70_0x31ebc2(0x17c),'type':a70_0x31ebc2(0x175),'description':a70_0x31ebc2(0x17d)},{'name':a70_0x31ebc2(0x177),'type':a70_0x31ebc2(0x170),'description':a70_0x31ebc2(0x176),'default':0x1},{'name':a70_0x31ebc2(0x180),'type':a70_0x31ebc2(0x170),'description':a70_0x31ebc2(0x179),'default':0x14}],async 'execute'(_0x1794a8){const _0x1fe41b=a70_0x31ebc2,_0x39bfbf=_0x1794a8[_0x1fe41b(0x178)]('id'),_0xef8272=_0x1794a8['num'](_0x1fe41b(0x177),0x1)||0x1,_0x4b8773=_0x1794a8['num']('pagesize',0x14)||0x14,_0x4d64c0=_0x1794a8[_0x1fe41b(0x186)]('table')||undefined,{totalCount:_0x3c1176,tableList:_0x442f06}=await getDbTableDiff(_0x1794a8[_0x1fe41b(0x185)],_0x39bfbf,{'pageIndex':_0xef8272,'pageSize':_0x4b8773,'tableName':_0x4d64c0});return{'ok':!![],'data':{'dbLinkId':_0x39bfbf,'page':_0xef8272,'pageSize':_0x4b8773,'totalCount':_0x3c1176,'tableList':_0x442f06},'message':_0x442f06[_0x1fe41b(0x174)]+_0x1fe41b(0x16e)+_0x3c1176+'\x20(db\x20link\x20'+_0x39bfbf+')'};}};
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x320e17,_0x372d8c){const _0x6da64e=a71_0x17e5,_0x55edd2=_0x320e17();while(!![]){try{const _0x17c1c9=parseInt(_0x6da64e(0x109))/0x1+-parseInt(_0x6da64e(0x10b))/0x2*(-parseInt(_0x6da64e(0x10a))/0x3)+-parseInt(_0x6da64e(0x10d))/0x4+-parseInt(_0x6da64e(0x107))/0x5*(parseInt(_0x6da64e(0x10f))/0x6)+parseInt(_0x6da64e(0x10c))/0x7*(-parseInt(_0x6da64e(0x110))/0x8)+-parseInt(_0x6da64e(0x10e))/0x9+parseInt(_0x6da64e(0x108))/0xa*(parseInt(_0x6da64e(0x111))/0xb);if(_0x17c1c9===_0x372d8c)break;else _0x55edd2['push'](_0x55edd2['shift']());}catch(_0x2de073){_0x55edd2['push'](_0x55edd2['shift']());}}}(a71_0x68da,0xe6cfa));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';function a71_0x17e5(_0x3c05ee,_0x247281){_0x3c05ee=_0x3c05ee-0x107;const _0x68da0e=a71_0x68da();let _0x17e5bc=_0x68da0e[_0x3c05ee];return _0x17e5bc;}import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';function a71_0x68da(){const _0x18bd2d=['5004807dNaCkk','2ibymfZ','21pqlogY','6425340NRKpTS','15072669kRrZye','477774KWBYFb','4246888OFBBpc','186296zNaaFb','65ewXoHG','2330BVdLBY','1239881yKAFAx'];a71_0x68da=function(){return _0x18bd2d;};return a71_0x68da();}import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a72_0x5512(_0x596b21,_0x2d43c7){_0x596b21=_0x596b21-0xf1;const _0x15490d=a72_0x1549();let _0x551269=_0x15490d[_0x596b21];return _0x551269;}const a72_0x1b64c0=a72_0x5512;(function(_0x1121c7,_0x3cdfd9){const _0x3abedc=a72_0x5512,_0x2fecb2=_0x1121c7();while(!![]){try{const _0x13af7c=-parseInt(_0x3abedc(0x103))/0x1+-parseInt(_0x3abedc(0xff))/0x2*(parseInt(_0x3abedc(0x104))/0x3)+parseInt(_0x3abedc(0xf7))/0x4+parseInt(_0x3abedc(0xfc))/0x5*(parseInt(_0x3abedc(0x101))/0x6)+parseInt(_0x3abedc(0xf4))/0x7*(parseInt(_0x3abedc(0xf3))/0x8)+-parseInt(_0x3abedc(0xfd))/0x9+parseInt(_0x3abedc(0x105))/0xa*(-parseInt(_0x3abedc(0xfa))/0xb);if(_0x13af7c===_0x3cdfd9)break;else _0x2fecb2['push'](_0x2fecb2['shift']());}catch(_0x91b77b){_0x2fecb2['push'](_0x2fecb2['shift']());}}}(a72_0x1549,0x49f20));import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a72_0x1b64c0(0xf1),'description':a72_0x1b64c0(0x108),'risk':a72_0x1b64c0(0x106),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'page','type':'number','description':a72_0x1b64c0(0xf9),'default':0x1},{'name':a72_0x1b64c0(0xf6),'type':a72_0x1b64c0(0xfb),'description':a72_0x1b64c0(0xf8),'default':0x64}],async 'execute'(_0x48b1c2){const _0x5b8a91=a72_0x1b64c0,_0x2c1234=_0x48b1c2[_0x5b8a91(0x100)](_0x5b8a91(0x107),0x1)||0x1,_0x5384cb=_0x48b1c2[_0x5b8a91(0x100)](_0x5b8a91(0xf6),0x64)||0x64,{items:_0x29bcc5,paging:_0x8b8c8a}=await listDbLinks(_0x48b1c2[_0x5b8a91(0xf5)],{'currentPage':_0x2c1234,'pageSize':_0x5384cb}),_0x1385c9=sanitizeDbLinkList(_0x29bcc5),_0x2d32f7=_0x8b8c8a?_0x8b8c8a:{'currentPage':_0x2c1234,'pageSize':_0x5384cb,'rowsOnPage':_0x1385c9['length'],'totalCount':null,'note':_0x5b8a91(0xf2)};return{'ok':!![],'data':{'connections':_0x1385c9,'paging':_0x2d32f7},'message':'Found\x20'+_0x1385c9[_0x5b8a91(0x102)]+_0x5b8a91(0xfe)};}};function a72_0x1549(){const _0x161fa7=['2960455MAoytK','1200303QXSuxl','\x20database\x20connection(s)','2HDRlkb','num','6hYUcjw','length','388011XDXjtD','402447hhRwzz','130McHcnB','read','page','List\x20database\x20connections\x20(dblinks)\x20for\x20the\x20current\x20app\x20with\x20analysis\x20status\x20—\x20for\x20AI\x20to\x20pick\x20ids\x20before\x20db\x20detail\x20/\x20analyze\x20/\x20tables','list','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','8WGSOro','1157611icvdiB','appCode','pagesize','1428864SYZVjr','Page\x20size','Page\x20index\x20(1-based)','132231xiFWLr','number'];a72_0x1549=function(){return _0x161fa7;};return a72_0x1549();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x472bb5,_0x3b02c8){const _0x4ebe34=a73_0x190e,_0x32af3e=_0x472bb5();while(!![]){try{const _0x46454a=-parseInt(_0x4ebe34(0x1ef))/0x1+-parseInt(_0x4ebe34(0x204))/0x2*(-parseInt(_0x4ebe34(0x1f3))/0x3)+-parseInt(_0x4ebe34(0x1ed))/0x4+-parseInt(_0x4ebe34(0x1eb))/0x5+-parseInt(_0x4ebe34(0x201))/0x6+parseInt(_0x4ebe34(0x202))/0x7*(parseInt(_0x4ebe34(0x1ec))/0x8)+parseInt(_0x4ebe34(0x1f4))/0x9;if(_0x46454a===_0x3b02c8)break;else _0x32af3e['push'](_0x32af3e['shift']());}catch(_0x3ab1c3){_0x32af3e['push'](_0x32af3e['shift']());}}}(a73_0xf9e0,0xe5293));function a73_0x190e(_0x543524,_0x1665fe){_0x543524=_0x543524-0x1e8;const _0xf9e0c5=a73_0xf9e0();let _0x190e45=_0xf9e0c5[_0x543524];return _0x190e45;}import{getEnv,isDaily,normalizeEnv}from'../../constant/env.js';function shouldRedactKey(_0x4b1305){const _0x37f1aa=a73_0x190e,_0x3fde3e=_0x4b1305[_0x37f1aa(0x1f9)]();if(_0x3fde3e==='password'||_0x3fde3e===_0x37f1aa(0x1fa)||_0x3fde3e===_0x37f1aa(0x1e9))return!![];if(_0x3fde3e[_0x37f1aa(0x1f0)](_0x37f1aa(0x203))||_0x3fde3e['includes']('token')||_0x3fde3e[_0x37f1aa(0x1f0)]('credential'))return!![];if(_0x3fde3e[_0x37f1aa(0x1f0)](_0x37f1aa(0x1fc))||_0x3fde3e['includes'](_0x37f1aa(0x1ea)))return!![];if(_0x3fde3e===_0x37f1aa(0x1f1)||_0x3fde3e==='connectionstring'||_0x3fde3e===_0x37f1aa(0x1fb))return!![];return![];}export function sanitizeDbLinkForOutput(_0x110780){const _0x16c800=a73_0x190e,_0x43117f={..._0x110780};for(const _0x142a7c of Object[_0x16c800(0x1f6)](_0x43117f)){if(!shouldRedactKey(_0x142a7c))continue;const _0x35e0ec=_0x43117f[_0x142a7c];_0x35e0ec!=null&&String(_0x35e0ec)[_0x16c800(0x200)]>0x0&&(_0x43117f[_0x142a7c]=_0x16c800(0x1f2));}return _0x43117f;}export function sanitizeDbLinkList(_0x5662e8){const _0x452dde=a73_0x190e;return _0x5662e8[_0x452dde(0x1f7)](_0x38023a=>sanitizeDbLinkForOutput(_0x38023a));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x548e94){const _0x1609c4=a73_0x190e,_0x2e8e0a=_0x548e94[_0x1609c4(0x1fd)]();if(!_0x2e8e0a)return![];return DB_URL_PATTERN[_0x1609c4(0x1fe)](_0x2e8e0a);}function a73_0xf9e0(){const _0x123f7e=['/data/er?dbId=','https://app.lovrabet.com/app/','dbpassword','accesskey','6834420qJrdIh','237624dLqqKb','3381924qbBnek','/data/database','1390497rshKNg','includes','authorization','[redacted]','282VsryXG','40625730KLuGgM','number','keys','map','https://daily.lovrabet.com/web-app/app/','toLowerCase','passwd','jdbcurl','privatekey','trim','test','isFinite','length','10327896KjiPYH','133PNUUiG','secret','25202lNBBpy'];a73_0xf9e0=function(){return _0x123f7e;};return a73_0xf9e0();}export function buildDbPageLinks(_0xc08ddd,_0x423fd8){const _0x18b7cd=a73_0x190e,_0x1d2c81=_0xc08ddd?.[_0x18b7cd(0x1fd)]();if(!_0x1d2c81)return undefined;const _0x4b7429=typeof _0x423fd8===_0x18b7cd(0x1f5)?String(_0x423fd8):String(_0x423fd8??'')['trim']();if(!_0x4b7429)return undefined;const _0x11efdb=Number(_0x4b7429);if(!Number[_0x18b7cd(0x1ff)](_0x11efdb)||_0x11efdb<=0x0)return undefined;const _0x3b553f=isDaily(normalizeEnv(getEnv()))?_0x18b7cd(0x1f8)+encodeURIComponent(_0x1d2c81):_0x18b7cd(0x1e8)+encodeURIComponent(_0x1d2c81),_0x4d7a7b=encodeURIComponent(String(_0x11efdb));return{'databasePage':_0x3b553f+_0x18b7cd(0x1ee),'erPage':_0x3b553f+_0x18b7cd(0x205)+_0x4d7a7b};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a74_0x85936b=a74_0x17c7;function a74_0x440e(){const _0x55097d=['814938gsaaRa','70dYmoma','7496577PlijeE','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','27176UmbhFR','num','133VRIIJS','5gOjgJm','7195536kozBPo','length','28047tVxNIb','104xcqpMJ','370kzOmAi','1278893ntwDeL','1352TNauMy','tables'];a74_0x440e=function(){return _0x55097d;};return a74_0x440e();}(function(_0x17934f,_0x4209c7){const _0x24ce24=a74_0x17c7,_0x1285cf=_0x17934f();while(!![]){try{const _0x12fb3a=-parseInt(_0x24ce24(0x1a9))/0x1*(-parseInt(_0x24ce24(0x1ab))/0x2)+-parseInt(_0x24ce24(0x1a7))/0x3*(parseInt(_0x24ce24(0x1a8))/0x4)+parseInt(_0x24ce24(0x1a4))/0x5*(-parseInt(_0x24ce24(0x1ad))/0x6)+parseInt(_0x24ce24(0x1a3))/0x7*(parseInt(_0x24ce24(0x1a1))/0x8)+-parseInt(_0x24ce24(0x19f))/0x9+parseInt(_0x24ce24(0x1ae))/0xa*(parseInt(_0x24ce24(0x1aa))/0xb)+parseInt(_0x24ce24(0x1a5))/0xc;if(_0x12fb3a===_0x4209c7)break;else _0x1285cf['push'](_0x1285cf['shift']());}catch(_0x6e89d9){_0x1285cf['push'](_0x1285cf['shift']());}}}(a74_0x440e,0x7e0ba));import{getDbAllTableList}from'../../core/api-client.js';function a74_0x17c7(_0xbcb26d,_0x3198fc){_0xbcb26d=_0xbcb26d-0x19f;const _0x440e5d=a74_0x440e();let _0x17c754=_0x440e5d[_0xbcb26d];return _0x17c754;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a74_0x85936b(0x1ac),'description':a74_0x85936b(0x1a0),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0xd4d80d){const _0x44ff7f=a74_0x85936b,_0x598b5f=_0xd4d80d[_0x44ff7f(0x1a2)]('id'),_0x4c4ef8=await getDbAllTableList(_0xd4d80d['appCode'],_0x598b5f);return{'ok':!![],'data':{'dbLinkId':_0x598b5f,'total':_0x4c4ef8[_0x44ff7f(0x1a6)],'tables':_0x4c4ef8},'message':_0x4c4ef8[_0x44ff7f(0x1a6)]+'\x20table(s)\x20on\x20db\x20link\x20'+_0x598b5f};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a75_0x4f31(_0x4b1911,_0x1eb808){_0x4b1911=_0x4b1911-0x68;const _0x3b70a3=a75_0x3b70();let _0x4f3118=_0x3b70a3[_0x4b1911];return _0x4f3118;}const a75_0x3c4259=a75_0x4f31;(function(_0x2c18fc,_0x554a8c){const _0x5c7d02=a75_0x4f31,_0x448b58=_0x2c18fc();while(!![]){try{const _0x37f544=-parseInt(_0x5c7d02(0x7b))/0x1*(-parseInt(_0x5c7d02(0x68))/0x2)+parseInt(_0x5c7d02(0x74))/0x3*(parseInt(_0x5c7d02(0x6e))/0x4)+parseInt(_0x5c7d02(0x7c))/0x5*(parseInt(_0x5c7d02(0x69))/0x6)+parseInt(_0x5c7d02(0x75))/0x7*(parseInt(_0x5c7d02(0x6c))/0x8)+parseInt(_0x5c7d02(0x6b))/0x9+parseInt(_0x5c7d02(0x71))/0xa+-parseInt(_0x5c7d02(0x70))/0xb*(parseInt(_0x5c7d02(0x72))/0xc);if(_0x37f544===_0x554a8c)break;else _0x448b58['push'](_0x448b58['shift']());}catch(_0x213de0){_0x448b58['push'](_0x448b58['shift']());}}}(a75_0x3b70,0xe4a61));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x52bb35){const _0x586ca9=a75_0x4f31;if(_0x52bb35===!![]||_0x52bb35===![])return{'success':_0x52bb35};if(_0x52bb35===null||_0x52bb35===undefined)return{'type':typeof _0x52bb35};if(typeof _0x52bb35!=='object')return{'type':typeof _0x52bb35};const _0x2cf8b6=_0x52bb35,_0x144981=[_0x586ca9(0x6a),'message',_0x586ca9(0x73),_0x586ca9(0x6d),_0x586ca9(0x77),_0x586ca9(0x79)],_0x5577cd={};for(const _0x119669 of _0x144981){if(_0x119669 in _0x2cf8b6)_0x5577cd[_0x119669]=_0x2cf8b6[_0x119669];}return Object[_0x586ca9(0x6f)](_0x5577cd)['length']===0x0&&(_0x5577cd['keys']=Object['keys'](_0x2cf8b6)[_0x586ca9(0x78)](0x0,0x14)),_0x5577cd;}function a75_0x3b70(){const _0xae96d4=['11MIMLhm','12625970jaTwTN','59128308cRFcos','code','381bsnbBY','26600CuPQlB','\x20(see\x20data.result)','msg','slice','data','test','69425HYMMNI','10FtSAQd','34wlETCM','1937010UtZDSN','success','5981094XIBTql','728kPDVkb','error','55592XdOfXT','keys'];a75_0x3b70=function(){return _0xae96d4;};return a75_0x3b70();}export const dbTest={'service':'db','command':a75_0x3c4259(0x7a),'description':'Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3b4f3a){const _0x3e90c8=a75_0x3c4259,_0x498eac=_0x3b4f3a['num']('id'),_0x5f07d3=await testDbLinkConnect(_0x498eac),_0x4a6690=_0x5f07d3===!![]||typeof _0x5f07d3==='object'&&_0x5f07d3!==null&&_0x5f07d3['success']===!![],_0x26c1b8=summarizeTestConnectResult(_0x5f07d3);return{'ok':!![],'data':{'id':_0x498eac,'connected':Boolean(_0x4a6690),'result':_0x26c1b8},'message':_0x4a6690?'Connection\x20OK\x20for\x20db\x20link\x20'+_0x498eac:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x498eac+_0x3e90c8(0x76)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a76_0x55ad(){const _0x7d9f65=['Updated\x20db\x20link\x20','New\x20database\x20name','write','dbname','108858AxHQHA','New\x20connection\x20parameter\x20string','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','username','dbparam','/smartapi/dblink/update','dbUrl','num','update','31364qNpPVF','2061944aUDYKg','150wkGsOJ','New\x20description','dburl','password','string','1042350xdkRMO','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','dbdesc','167436DSGLJM','trim','dbDesc','27LqCaii','New\x20host:port','str','77JRnxVC','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','dbName','339855RBKvwt','POST','New\x20username','1931210XhxKsb'];a76_0x55ad=function(){return _0x7d9f65;};return a76_0x55ad();}const a76_0x23a1d1=a76_0x4dd9;(function(_0xc6ef72,_0x4cede1){const _0x48d143=a76_0x4dd9,_0x245531=_0xc6ef72();while(!![]){try{const _0x371e97=-parseInt(_0x48d143(0x20b))/0x1+-parseInt(_0x48d143(0x202))/0x2+parseInt(_0x48d143(0x1ff))/0x3+parseInt(_0x48d143(0x1f8))/0x4*(-parseInt(_0x48d143(0x1fa))/0x5)+-parseInt(_0x48d143(0x213))/0x6*(-parseInt(_0x48d143(0x208))/0x7)+-parseInt(_0x48d143(0x1f9))/0x8+-parseInt(_0x48d143(0x205))/0x9*(-parseInt(_0x48d143(0x20e))/0xa);if(_0x371e97===_0x4cede1)break;else _0x245531['push'](_0x245531['shift']());}catch(_0x14acd0){_0x245531['push'](_0x245531['shift']());}}}(a76_0x55ad,0x333b0));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a76_0x4dd9(_0x39f476,_0x13b546){_0x39f476=_0x39f476-0x1f1;const _0x55ad58=a76_0x55ad();let _0x4dd91b=_0x55ad58[_0x39f476];return _0x4dd91b;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbUpdate={'service':'db','command':a76_0x23a1d1(0x1f7),'description':a76_0x23a1d1(0x209),'risk':a76_0x23a1d1(0x211),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a76_0x23a1d1(0x212),'type':a76_0x23a1d1(0x1fe),'description':a76_0x23a1d1(0x210)},{'name':a76_0x23a1d1(0x1fc),'type':a76_0x23a1d1(0x1fe),'description':a76_0x23a1d1(0x206)},{'name':a76_0x23a1d1(0x1f2),'type':'string','description':a76_0x23a1d1(0x20d)},{'name':'password','type':'string','description':a76_0x23a1d1(0x200)},{'name':a76_0x23a1d1(0x1f3),'type':'string','description':a76_0x23a1d1(0x214)},{'name':'dbdesc','type':a76_0x23a1d1(0x1fe),'description':a76_0x23a1d1(0x1fb)}],async 'validate'(_0x2905e9){const _0xd6aab=a76_0x23a1d1,_0x25e5eb=_0x2905e9[_0xd6aab(0x207)](_0xd6aab(0x1fc));if(_0x25e5eb&&!validateDbUrl(_0x25e5eb['trim']()))throw CliErrors['validation']('Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22'+_0x25e5eb+'\x22');},async 'dryRun'(_0x594e7d){const _0x457582=a76_0x23a1d1,_0x268075=_0x594e7d['num']('id'),_0x248d4a=await getDbLinkInfo(_0x268075),_0x491c26={..._0x248d4a},_0x241813=_0x594e7d[_0x457582(0x207)](_0x457582(0x212));if(_0x241813)_0x491c26['dbName']=_0x241813;const _0x31e4d0=_0x594e7d[_0x457582(0x207)](_0x457582(0x1fc));if(_0x31e4d0)_0x491c26[_0x457582(0x1f5)]=_0x31e4d0[_0x457582(0x203)]();const _0x2c7c8f=_0x594e7d[_0x457582(0x207)]('username');if(_0x2c7c8f)_0x491c26['username']=_0x2c7c8f;const _0x229c75=_0x594e7d[_0x457582(0x207)]('password');if(_0x229c75)_0x491c26[_0x457582(0x1fd)]=_0x229c75;const _0x139b24=_0x594e7d['str']('dbparam');if(_0x139b24)_0x491c26['dbParam']=_0x139b24;const _0x456628=_0x594e7d[_0x457582(0x207)]('dbdesc');if(_0x456628)_0x491c26[_0x457582(0x204)]=_0x456628;const _0x21d72c=sanitizeDbLinkForOutput(_0x491c26);return{'method':_0x457582(0x20c),'url':_0x457582(0x1f4),'body':_0x21d72c,'description':_0x457582(0x1f1)};},async 'execute'(_0x51b556){const _0x43dee7=a76_0x23a1d1,_0x5d32c2=_0x51b556[_0x43dee7(0x1f6)]('id'),_0x518bf8=await getDbLinkInfo(_0x5d32c2),_0x167edd={..._0x518bf8},_0x51dcac=_0x51b556[_0x43dee7(0x207)](_0x43dee7(0x212));if(_0x51dcac)_0x167edd[_0x43dee7(0x20a)]=_0x51dcac;const _0x495ac6=_0x51b556[_0x43dee7(0x207)](_0x43dee7(0x1fc));if(_0x495ac6)_0x167edd['dbUrl']=_0x495ac6[_0x43dee7(0x203)]();const _0x209cbd=_0x51b556[_0x43dee7(0x207)](_0x43dee7(0x1f2));if(_0x209cbd)_0x167edd['username']=_0x209cbd;const _0x98fb6f=_0x51b556[_0x43dee7(0x207)]('password');if(_0x98fb6f)_0x167edd[_0x43dee7(0x1fd)]=_0x98fb6f;const _0x566905=_0x51b556[_0x43dee7(0x207)](_0x43dee7(0x1f3));if(_0x566905)_0x167edd['dbParam']=_0x566905;const _0x5291dc=_0x51b556['str'](_0x43dee7(0x201));if(_0x5291dc)_0x167edd[_0x43dee7(0x204)]=_0x5291dc;const {id:_0x4c1ea7,entity:_0x480c68}=normalizeEntityWithIdResponse(await updateDbLink(_0x167edd));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x480c68),'message':_0x43dee7(0x20f)+(_0x4c1ea7??_0x5d32c2)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a77_0x3d3ef3=a77_0x34c9;(function(_0x315df7,_0x30bb55){const _0x1769c4=a77_0x34c9,_0x2d62c7=_0x315df7();while(!![]){try{const _0xa51765=parseInt(_0x1769c4(0x189))/0x1*(-parseInt(_0x1769c4(0x1c5))/0x2)+parseInt(_0x1769c4(0x1c4))/0x3+parseInt(_0x1769c4(0x1c6))/0x4+-parseInt(_0x1769c4(0x1b7))/0x5*(parseInt(_0x1769c4(0x1ae))/0x6)+parseInt(_0x1769c4(0x1a8))/0x7+-parseInt(_0x1769c4(0x1b1))/0x8+parseInt(_0x1769c4(0x1a4))/0x9;if(_0xa51765===_0x30bb55)break;else _0x2d62c7['push'](_0x2d62c7['shift']());}catch(_0x85e812){_0x2d62c7['push'](_0x2d62c7['shift']());}}}(a77_0x37ea,0xc5cf5));import a77_0x3a2946 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';function a77_0x37ea(){const _0x178067=['✓\x20Valid\x20JSON','✓\x20Valid','doctor','gray','(not\x20found)','cookie','log','\x20\x20Merged\x20Config','empty','(default)','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','pageSize','slice','(no\x20file)','✗\x20Not\x20logged\x20in','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20(default)','riskLevel','557WFkgQs','explicitAppName','verbose','Global','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','repeat','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','green','locale','\x20\x20─','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','format','(default:\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(set,\x20length=','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','apiDir','keys','✗\x20Expired','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','length','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20←\x20current','status','\x20\x20Apps','7516017CPEUGA','\x20doctor','appCode','currentApp','9703393nyYMtD','⚠\x20Empty\x20(treated\x20as\x20{})','missing','Project','\x20\x20explicitAppName:\x20','platform','513246XThAvA','padEnd','version','7344432QRkZuH','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apps','15eBWGTk','appcode','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','env','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','(not\x20set)','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','source','bold','red','value','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','1757817WCOtRH','5498HTUmjm','2835392LmfCFT','raw','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','check'];a77_0x37ea=function(){return _0x178067;};return a77_0x37ea();}import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';function a77_0x34c9(_0x3ba47a,_0x13fe39){_0x3ba47a=_0x3ba47a-0x175;const _0x37ea04=a77_0x37ea();let _0x34c920=_0x37ea04[_0x3ba47a];return _0x34c920;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x342a57){const _0x10f7a5=a77_0x34c9,_0x66d2c0=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x10f7a5(0x182)](0x0,0xa)+')':VERSION,_0x3533b=buildConfigFromFlags({}),_0x40a3ea=getCookie();console[_0x10f7a5(0x17a)](),console[_0x10f7a5(0x17a)](a77_0x3a2946[_0x10f7a5(0x1bf)](CLI_BIN_NAME+_0x10f7a5(0x1a5))),console['log'](a77_0x3a2946['gray']('─'[_0x10f7a5(0x18e)](0x32))),console[_0x10f7a5(0x17a)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x66d2c0),console[_0x10f7a5(0x17a)](_0x10f7a5(0x197)+process[_0x10f7a5(0x1b0)]),console[_0x10f7a5(0x17a)](_0x10f7a5(0x193)+process[_0x10f7a5(0x1ad)]+'\x20'+process['arch']),console[_0x10f7a5(0x17a)](),console['log'](a77_0x3a2946[_0x10f7a5(0x1bf)]('\x20\x20Config\x20Files')),console[_0x10f7a5(0x17a)](a77_0x3a2946[_0x10f7a5(0x177)](_0x10f7a5(0x192)['repeat'](0x1e)));const _0x1ab39e=getGlobalConfigPath(),_0x1b47df=getProjectConfigPath();console[_0x10f7a5(0x17a)]('\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x1ab39e||a77_0x3a2946['gray'](_0x10f7a5(0x178)))),console[_0x10f7a5(0x17a)](_0x10f7a5(0x1b3)+(_0x1b47df||a77_0x3a2946['gray'](_0x10f7a5(0x178)))),console[_0x10f7a5(0x17a)](),console[_0x10f7a5(0x17a)](a77_0x3a2946[_0x10f7a5(0x1bf)]('\x20\x20Config\x20JSON')),console[_0x10f7a5(0x17a)](a77_0x3a2946[_0x10f7a5(0x177)](_0x10f7a5(0x192)[_0x10f7a5(0x18e)](0x1e)));const _0x1e0f64=(_0x13f37b,_0x23afb8)=>{const _0x2eece1=_0x10f7a5;if(!_0x23afb8){console[_0x2eece1(0x17a)]('\x20\x20'+_0x13f37b[_0x2eece1(0x1af)](0x11)+'\x20'+a77_0x3a2946[_0x2eece1(0x177)](_0x2eece1(0x183)));return;}const _0x43885d=inspectCliConfigJsonFile(_0x23afb8);if(_0x43885d[_0x2eece1(0x1a2)]==='ok')console[_0x2eece1(0x17a)]('\x20\x20'+_0x13f37b['padEnd'](0x11)+'\x20'+a77_0x3a2946[_0x2eece1(0x190)](_0x2eece1(0x1ca)));else{if(_0x43885d[_0x2eece1(0x1a2)]===_0x2eece1(0x17c))console[_0x2eece1(0x17a)]('\x20\x20'+_0x13f37b[_0x2eece1(0x1af)](0x11)+'\x20'+a77_0x3a2946['yellow'](_0x2eece1(0x1a9)));else _0x43885d[_0x2eece1(0x1a2)]===_0x2eece1(0x1aa)?console[_0x2eece1(0x17a)]('\x20\x20'+_0x13f37b['padEnd'](0x11)+'\x20'+a77_0x3a2946[_0x2eece1(0x177)]('(missing)')):(console['log']('\x20\x20'+_0x13f37b['padEnd'](0x11)+'\x20'+a77_0x3a2946[_0x2eece1(0x1c0)]('✗\x20Invalid\x20JSON')),console[_0x2eece1(0x17a)]('\x20\x20'+''[_0x2eece1(0x1af)](0x11)+'\x20'+a77_0x3a2946['red'](_0x43885d['message'])));}};_0x1e0f64(_0x10f7a5(0x18c),_0x1ab39e),_0x1e0f64(_0x10f7a5(0x1ab),_0x1b47df),console['log'](),console['log'](a77_0x3a2946[_0x10f7a5(0x1bf)](_0x10f7a5(0x17b))),console[_0x10f7a5(0x17a)](a77_0x3a2946[_0x10f7a5(0x177)]('\x20\x20─'[_0x10f7a5(0x18e)](0x1e))),console[_0x10f7a5(0x17a)](_0x10f7a5(0x19d)+(_0x3533b[_0x10f7a5(0x1a6)]||a77_0x3a2946[_0x10f7a5(0x1c0)](_0x10f7a5(0x1bc)))),console[_0x10f7a5(0x17a)](_0x10f7a5(0x1c3)+_0x3533b[_0x10f7a5(0x1ba)]),console['log'](_0x10f7a5(0x185)+_0x3533b[_0x10f7a5(0x191)]),console[_0x10f7a5(0x17a)](_0x10f7a5(0x17f)+_0x3533b[_0x10f7a5(0x19a)]),console['log'](_0x10f7a5(0x1c8)+(_0x3533b['defaultApp']||a77_0x3a2946[_0x10f7a5(0x177)](_0x10f7a5(0x180)))),console[_0x10f7a5(0x17a)](_0x10f7a5(0x1bd)+(_0x3533b[_0x10f7a5(0x1a7)]||a77_0x3a2946['gray'](_0x10f7a5(0x180)))),console[_0x10f7a5(0x17a)](_0x10f7a5(0x1ac)+(_0x3533b[_0x10f7a5(0x18a)]||a77_0x3a2946[_0x10f7a5(0x177)](_0x10f7a5(0x180)))),console['log'](_0x10f7a5(0x17e)+(_0x3533b[_0x10f7a5(0x195)]||a77_0x3a2946['gray'](_0x10f7a5(0x196)+DEFAULT_CONFIG_VALUES[_0x10f7a5(0x195)]+')'))),console['log']('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x3533b[_0x10f7a5(0x181)]??a77_0x3a2946['gray'](_0x10f7a5(0x17d)))),console[_0x10f7a5(0x17a)](_0x10f7a5(0x18f)+_0x3533b[_0x10f7a5(0x188)]),console[_0x10f7a5(0x17a)](_0x10f7a5(0x1b9)+_0x3533b[_0x10f7a5(0x18b)]),console[_0x10f7a5(0x17a)](_0x10f7a5(0x1b2)+(_0x3533b[_0x10f7a5(0x179)]?a77_0x3a2946[_0x10f7a5(0x190)](_0x10f7a5(0x198)+_0x3533b['cookie'][_0x10f7a5(0x19f)]+')'):_0x40a3ea?a77_0x3a2946['green']('(set\x20via\x20file,\x20length='+_0x40a3ea[_0x10f7a5(0x19f)]+')'):a77_0x3a2946[_0x10f7a5(0x177)](_0x10f7a5(0x180))));const _0x647b25=Object[_0x10f7a5(0x19b)](_0x3533b[_0x10f7a5(0x1b6)]);if(_0x647b25['length']>0x0){console[_0x10f7a5(0x17a)](),console[_0x10f7a5(0x17a)](a77_0x3a2946[_0x10f7a5(0x1bf)](_0x10f7a5(0x1a3))),console[_0x10f7a5(0x17a)](a77_0x3a2946['gray']('\x20\x20─'[_0x10f7a5(0x18e)](0x1e)));for(const _0x1b5455 of _0x647b25){const _0x413998=_0x3533b['apps'][_0x1b5455],_0x3b131c=_0x1b5455===_0x3533b[_0x10f7a5(0x19e)],_0x25d280=_0x1b5455===_0x3533b['currentApp'],_0x146332=_0x25d280?a77_0x3a2946[_0x10f7a5(0x190)](_0x10f7a5(0x1a1)):'',_0x51d436=_0x3b131c?_0x10f7a5(0x187):'';console[_0x10f7a5(0x17a)]('\x20\x20'+_0x1b5455+_0x51d436+_0x146332),console[_0x10f7a5(0x17a)](_0x10f7a5(0x1c2)+_0x413998[_0x10f7a5(0x1b8)]);const _0x5ae878=buildAppDoctorFields(_0x413998,{'env':_0x3533b[_0x10f7a5(0x1ba)],'apiDir':_0x3533b[_0x10f7a5(0x1c7)][_0x10f7a5(0x19a)]||DEFAULT_CONFIG_VALUES[_0x10f7a5(0x19a)],'cookie':_0x3533b['cookie']||_0x40a3ea||undefined,'accessKey':_0x3533b[_0x10f7a5(0x1b4)]});console[_0x10f7a5(0x17a)](_0x10f7a5(0x194)+_0x5ae878[_0x10f7a5(0x1ba)][_0x10f7a5(0x1c1)]+'\x20\x20'+a77_0x3a2946['gray']('('+_0x5ae878[_0x10f7a5(0x1ba)][_0x10f7a5(0x1be)]+')')),console['log'](_0x10f7a5(0x1bb)+_0x5ae878[_0x10f7a5(0x19a)]['value']+'\x20\x20'+a77_0x3a2946[_0x10f7a5(0x177)]('('+_0x5ae878['apiDir']['source']+')'));const _0x2cbb21=_0x5ae878['cookie']['value']?a77_0x3a2946['green']('(set,\x20length='+_0x5ae878[_0x10f7a5(0x179)]['value'][_0x10f7a5(0x19f)]+')'):a77_0x3a2946[_0x10f7a5(0x177)](_0x10f7a5(0x180));console[_0x10f7a5(0x17a)](_0x10f7a5(0x1a0)+_0x2cbb21+'\x20\x20'+a77_0x3a2946[_0x10f7a5(0x177)]('('+_0x5ae878[_0x10f7a5(0x179)][_0x10f7a5(0x1be)]+')'));const _0x3c1224=_0x5ae878['accessKey']['value']?a77_0x3a2946[_0x10f7a5(0x190)]('(set,\x20length='+_0x5ae878['accessKey'][_0x10f7a5(0x1c1)][_0x10f7a5(0x19f)]+')'):a77_0x3a2946[_0x10f7a5(0x177)](_0x10f7a5(0x180));console[_0x10f7a5(0x17a)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x3c1224+'\x20\x20'+a77_0x3a2946[_0x10f7a5(0x177)]('('+_0x5ae878[_0x10f7a5(0x1b4)][_0x10f7a5(0x1be)]+')'));}}console['log'](),console[_0x10f7a5(0x17a)](a77_0x3a2946[_0x10f7a5(0x1bf)]('\x20\x20API\x20Endpoints')),console['log'](a77_0x3a2946[_0x10f7a5(0x177)](_0x10f7a5(0x192)[_0x10f7a5(0x18e)](0x1e))),console[_0x10f7a5(0x17a)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x10f7a5(0x17a)](_0x10f7a5(0x18d)+getUserDomain()),console['log'](_0x10f7a5(0x186)+getRuntimeDomain()),console[_0x10f7a5(0x17a)](),console[_0x10f7a5(0x17a)](a77_0x3a2946[_0x10f7a5(0x1bf)]('\x20\x20Auth')),console[_0x10f7a5(0x17a)](a77_0x3a2946['gray']('\x20\x20─'[_0x10f7a5(0x18e)](0x1e)));if(_0x40a3ea){const _0x5ba6a4=await getIsSessionValid();console[_0x10f7a5(0x17a)](_0x10f7a5(0x1b5)+(_0x5ba6a4?a77_0x3a2946[_0x10f7a5(0x190)](_0x10f7a5(0x175)):a77_0x3a2946[_0x10f7a5(0x1c0)](_0x10f7a5(0x19c))));}else console[_0x10f7a5(0x17a)](_0x10f7a5(0x1b5)+a77_0x3a2946[_0x10f7a5(0x1c0)](_0x10f7a5(0x184)));return console[_0x10f7a5(0x17a)](),{'ok':!![]};}export const doctorDefinition={'service':a77_0x3d3ef3(0x176),'command':a77_0x3d3ef3(0x1c9),'description':a77_0x3d3ef3(0x199),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
function a77_0x59b1(_0x46b1d8,_0x28038b){_0x46b1d8=_0x46b1d8-0x125;const _0x57c953=a77_0x57c9();let _0x59b13a=_0x57c953[_0x46b1d8];return _0x59b13a;}const a77_0x20438f=a77_0x59b1;(function(_0x49d41b,_0x144b7d){const _0x1f286f=a77_0x59b1,_0x432a7e=_0x49d41b();while(!![]){try{const _0x2a2bb0=-parseInt(_0x1f286f(0x16e))/0x1+-parseInt(_0x1f286f(0x12b))/0x2*(parseInt(_0x1f286f(0x166))/0x3)+-parseInt(_0x1f286f(0x175))/0x4+parseInt(_0x1f286f(0x131))/0x5+parseInt(_0x1f286f(0x138))/0x6*(parseInt(_0x1f286f(0x140))/0x7)+-parseInt(_0x1f286f(0x156))/0x8*(-parseInt(_0x1f286f(0x152))/0x9)+parseInt(_0x1f286f(0x14d))/0xa;if(_0x2a2bb0===_0x144b7d)break;else _0x432a7e['push'](_0x432a7e['shift']());}catch(_0x3dea4f){_0x432a7e['push'](_0x432a7e['shift']());}}}(a77_0x57c9,0x32503));import a77_0x1823b2 from'chalk';import{CLI_BIN_NAME}from'../constant/cli.js';import{DEFAULT_CONFIG_VALUES}from'../constant/defaults.js';import{VERSION,GIT_COMMIT,BUILD_TIME}from'../generated/build-info.js';import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';import{getProjectConfigPath,getGlobalConfigPath,buildConfigFromFlags,inspectCliConfigJsonFile}from'../context.js';import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x1befd0){const _0x37d28e=a77_0x59b1,_0x4de722=GIT_COMMIT!==_0x37d28e(0x13d)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x37d28e(0x13e)](0x0,0xa)+')':VERSION,_0x43870c=buildConfigFromFlags({}),_0x5be00f=getCookie();console[_0x37d28e(0x15a)](),console['log'](a77_0x1823b2[_0x37d28e(0x15d)](CLI_BIN_NAME+_0x37d28e(0x139))),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x160)]('─'[_0x37d28e(0x13a)](0x32))),console[_0x37d28e(0x15a)]('\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20'+_0x4de722),console[_0x37d28e(0x15a)](_0x37d28e(0x174)+process[_0x37d28e(0x16f)]),console[_0x37d28e(0x15a)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x37d28e(0x161)]+'\x20'+process[_0x37d28e(0x145)]),console[_0x37d28e(0x15a)](),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x15d)](_0x37d28e(0x12e))),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x167)['repeat'](0x1e)));const _0x4155da=getGlobalConfigPath(),_0x49248d=getProjectConfigPath();console[_0x37d28e(0x15a)](_0x37d28e(0x165)+(_0x4155da||a77_0x1823b2['gray'](_0x37d28e(0x132)))),console[_0x37d28e(0x15a)](_0x37d28e(0x158)+(_0x49248d||a77_0x1823b2['gray']('(not\x20found)'))),console['log'](),console['log'](a77_0x1823b2[_0x37d28e(0x15d)](_0x37d28e(0x128))),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x167)[_0x37d28e(0x13a)](0x1e)));const _0x42871b=(_0x31297b,_0x181bb3)=>{const _0x5a22ed=_0x37d28e;if(!_0x181bb3){console[_0x5a22ed(0x15a)]('\x20\x20'+_0x31297b[_0x5a22ed(0x16d)](0x11)+'\x20'+a77_0x1823b2['gray'](_0x5a22ed(0x153)));return;}const _0x5d9f56=inspectCliConfigJsonFile(_0x181bb3);if(_0x5d9f56['status']==='ok')console[_0x5a22ed(0x15a)]('\x20\x20'+_0x31297b[_0x5a22ed(0x16d)](0x11)+'\x20'+a77_0x1823b2['green']('✓\x20Valid\x20JSON'));else{if(_0x5d9f56['status']===_0x5a22ed(0x133))console[_0x5a22ed(0x15a)]('\x20\x20'+_0x31297b['padEnd'](0x11)+'\x20'+a77_0x1823b2[_0x5a22ed(0x13c)](_0x5a22ed(0x154)));else _0x5d9f56[_0x5a22ed(0x149)]===_0x5a22ed(0x172)?console['log']('\x20\x20'+_0x31297b[_0x5a22ed(0x16d)](0x11)+'\x20'+a77_0x1823b2['gray'](_0x5a22ed(0x173))):(console[_0x5a22ed(0x15a)]('\x20\x20'+_0x31297b[_0x5a22ed(0x16d)](0x11)+'\x20'+a77_0x1823b2[_0x5a22ed(0x12a)](_0x5a22ed(0x127))),console[_0x5a22ed(0x15a)]('\x20\x20'+''[_0x5a22ed(0x16d)](0x11)+'\x20'+a77_0x1823b2[_0x5a22ed(0x12a)](_0x5d9f56['message'])));}};_0x42871b(_0x37d28e(0x170),_0x4155da),_0x42871b(_0x37d28e(0x125),_0x49248d),console[_0x37d28e(0x15a)](),console[_0x37d28e(0x15a)](a77_0x1823b2['bold'](_0x37d28e(0x13b))),console['log'](a77_0x1823b2[_0x37d28e(0x160)]('\x20\x20─'['repeat'](0x1e))),console[_0x37d28e(0x15a)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x43870c[_0x37d28e(0x144)]||a77_0x1823b2[_0x37d28e(0x12a)](_0x37d28e(0x12d)))),console['log'](_0x37d28e(0x126)+_0x43870c[_0x37d28e(0x148)]),console['log'](_0x37d28e(0x15b)+_0x43870c[_0x37d28e(0x141)]),console[_0x37d28e(0x15a)](_0x37d28e(0x14b)+_0x43870c[_0x37d28e(0x14c)]),console[_0x37d28e(0x15a)](_0x37d28e(0x129)+(_0x43870c['defaultApp']||a77_0x1823b2[_0x37d28e(0x160)]('(none)'))),console['log'](_0x37d28e(0x137)+(_0x43870c['currentApp']||a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x164)))),console[_0x37d28e(0x15a)]('\x20\x20explicitAppName:\x20'+(_0x43870c[_0x37d28e(0x151)]||a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x164)))),console[_0x37d28e(0x15a)](_0x37d28e(0x143)+(_0x43870c[_0x37d28e(0x155)]||a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x130)+DEFAULT_CONFIG_VALUES[_0x37d28e(0x155)]+')'))),console[_0x37d28e(0x15a)]('\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x43870c['pageSize']??a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x162)))),console['log'](_0x37d28e(0x157)+_0x43870c['riskLevel']),console[_0x37d28e(0x15a)](_0x37d28e(0x163)+_0x43870c[_0x37d28e(0x168)]),console[_0x37d28e(0x15a)]('\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x43870c['cookie']?a77_0x1823b2[_0x37d28e(0x16b)](_0x37d28e(0x12f)+_0x43870c[_0x37d28e(0x176)][_0x37d28e(0x14a)]+')'):_0x5be00f?a77_0x1823b2[_0x37d28e(0x16b)](_0x37d28e(0x12c)+_0x5be00f[_0x37d28e(0x14a)]+')'):a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x164))));const _0x5e3215=Object[_0x37d28e(0x16a)](_0x43870c[_0x37d28e(0x13f)]);if(_0x5e3215['length']>0x0){console[_0x37d28e(0x15a)](),console[_0x37d28e(0x15a)](a77_0x1823b2['bold']('\x20\x20Apps')),console[_0x37d28e(0x15a)](a77_0x1823b2['gray'](_0x37d28e(0x167)[_0x37d28e(0x13a)](0x1e)));for(const _0x11756a of _0x5e3215){const _0x465c1c=_0x43870c['apps'][_0x11756a],_0x2926a7=_0x11756a===_0x43870c['defaultApp'],_0xd56489=_0x11756a===_0x43870c[_0x37d28e(0x14e)],_0x5ba8f7=_0xd56489?a77_0x1823b2[_0x37d28e(0x16b)]('\x20←\x20current'):'',_0x218314=_0x2926a7?'\x20(default)':'';console[_0x37d28e(0x15a)]('\x20\x20'+_0x11756a+_0x218314+_0x5ba8f7),console[_0x37d28e(0x15a)]('\x20\x20\x20\x20appcode:\x20\x20\x20\x20'+_0x465c1c[_0x37d28e(0x135)]);const _0x48044b=buildAppDoctorFields(_0x465c1c,{'env':_0x43870c['env'],'apiDir':_0x43870c[_0x37d28e(0x15f)][_0x37d28e(0x14c)]||DEFAULT_CONFIG_VALUES[_0x37d28e(0x14c)],'cookie':_0x43870c['cookie']||_0x5be00f||undefined,'accessKey':_0x43870c[_0x37d28e(0x16c)]});console['log'](_0x37d28e(0x147)+_0x48044b[_0x37d28e(0x148)][_0x37d28e(0x142)]+'\x20\x20'+a77_0x1823b2['gray']('('+_0x48044b[_0x37d28e(0x148)]['source']+')')),console[_0x37d28e(0x15a)]('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x48044b['apiDir'][_0x37d28e(0x142)]+'\x20\x20'+a77_0x1823b2['gray']('('+_0x48044b[_0x37d28e(0x14c)][_0x37d28e(0x15c)]+')'));const _0x69d03b=_0x48044b['cookie'][_0x37d28e(0x142)]?a77_0x1823b2[_0x37d28e(0x16b)](_0x37d28e(0x12f)+_0x48044b[_0x37d28e(0x176)][_0x37d28e(0x142)][_0x37d28e(0x14a)]+')'):a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x164));console[_0x37d28e(0x15a)]('\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20'+_0x69d03b+'\x20\x20'+a77_0x1823b2[_0x37d28e(0x160)]('('+_0x48044b[_0x37d28e(0x176)][_0x37d28e(0x15c)]+')'));const _0x374677=_0x48044b[_0x37d28e(0x16c)][_0x37d28e(0x142)]?a77_0x1823b2['green']('(set,\x20length='+_0x48044b[_0x37d28e(0x16c)]['value']['length']+')'):a77_0x1823b2[_0x37d28e(0x160)](_0x37d28e(0x164));console[_0x37d28e(0x15a)](_0x37d28e(0x15e)+_0x374677+'\x20\x20'+a77_0x1823b2[_0x37d28e(0x160)]('('+_0x48044b[_0x37d28e(0x16c)][_0x37d28e(0x15c)]+')'));}}console[_0x37d28e(0x15a)](),console['log'](a77_0x1823b2[_0x37d28e(0x15d)]('\x20\x20API\x20Endpoints')),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x160)]('\x20\x20─'[_0x37d28e(0x13a)](0x1e))),console['log'](_0x37d28e(0x14f)+getApiDomain()),console[_0x37d28e(0x15a)](_0x37d28e(0x171)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console['log'](),console[_0x37d28e(0x15a)](a77_0x1823b2[_0x37d28e(0x15d)](_0x37d28e(0x136))),console['log'](a77_0x1823b2[_0x37d28e(0x160)]('\x20\x20─'[_0x37d28e(0x13a)](0x1e)));if(_0x5be00f){const _0x3fb4c7=await getIsSessionValid();console[_0x37d28e(0x15a)](_0x37d28e(0x150)+(_0x3fb4c7?a77_0x1823b2[_0x37d28e(0x16b)](_0x37d28e(0x134)):a77_0x1823b2['red'](_0x37d28e(0x146))));}else console['log']('\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+a77_0x1823b2[_0x37d28e(0x12a)]('✗\x20Not\x20logged\x20in'));return console[_0x37d28e(0x15a)](),{'ok':!![]};}export const doctorDefinition={'service':a77_0x20438f(0x169),'command':'check','description':a77_0x20438f(0x159),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};function a77_0x57c9(){const _0x17f406=['\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','red','32cptyOp','(set\x20via\x20file,\x20length=','(not\x20set)','\x20\x20Config\x20Files','(set,\x20length=','(default:\x20','1117490XDCydm','(not\x20found)','empty','✓\x20Valid','appcode','\x20\x20Auth','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','845454Cozjbp','\x20doctor','repeat','\x20\x20Merged\x20Config','yellow','unknown','slice','apps','7RHujRZ','locale','value','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','appCode','arch','✗\x20Expired','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','env','status','length','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apiDir','1662730KZMweC','currentApp','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','explicitAppName','4707DTfGrT','(no\x20file)','⚠\x20Empty\x20(treated\x20as\x20{})','format','4024ReGOXa','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','log','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','source','bold','\x20\x20\x20\x20accessKey:\x20\x20','raw','gray','platform','(default)','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','22098HCRYNP','\x20\x20─','verbose','doctor','keys','green','accessKey','padEnd','368543sPWlFz','version','Global','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','missing','(missing)','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','405068IThDAs','cookie','Project','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid\x20JSON','\x20\x20Config\x20JSON'];a77_0x57c9=function(){return _0x17f406;};return a77_0x57c9();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a78_0x1bdd(_0x57ffff,_0x38bdf1){_0x57ffff=_0x57ffff-0x11e;const _0x1d648e=a78_0x1d64();let _0x1bdd76=_0x1d648e[_0x57ffff];return _0x1bdd76;}const a78_0x537d03=a78_0x1bdd;(function(_0x474d83,_0x1a8cf9){const _0x4b25f2=a78_0x1bdd,_0x17cc8c=_0x474d83();while(!![]){try{const _0x230a50=parseInt(_0x4b25f2(0x12b))/0x1+parseInt(_0x4b25f2(0x144))/0x2*(-parseInt(_0x4b25f2(0x145))/0x3)+parseInt(_0x4b25f2(0x120))/0x4+-parseInt(_0x4b25f2(0x11f))/0x5+-parseInt(_0x4b25f2(0x12c))/0x6+-parseInt(_0x4b25f2(0x135))/0x7*(-parseInt(_0x4b25f2(0x13a))/0x8)+-parseInt(_0x4b25f2(0x140))/0x9;if(_0x230a50===_0x1a8cf9)break;else _0x17cc8c['push'](_0x17cc8c['shift']());}catch(_0x5d5442){_0x17cc8c['push'](_0x17cc8c['shift']());}}}(a78_0x1d64,0x484e3));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';function a78_0x1d64(){const _0x359ca0=['374625vUwRCY','1251414FxcVTN','Use\x20`','appcode','../../commands/project/init.js','log','\x20\x20Default:\x20','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','production','Write\x20to\x20global\x20config\x20instead\x20of\x20project','1844367HaVjJK','boolean','global','检测到旧配置文件,正在自动升级...\x0a','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','8qSwfvh','bool','appCode','map','nonInteractive','flagMissing','1496844qsESVl','\x0a✓\x20Successfully\x20initialized\x20','Auto-confirm\x20prompts','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','119182EbYNTI','6RdwfLl','Usage:\x20','Target\x20environment','custom','\x20\x20Apps:\x20','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','project','validation','App\x20code\x20to\x20initialize\x20with','join','run','637785ecubrR','1118724ZHlREJ','yes','defaultApp','string','message','env','init','str','\x20config','cwd','some'];a78_0x1d64=function(){return _0x359ca0;};return a78_0x1d64();}import{getCliVersion}from'../../utils/version.js';import{CliErrors}from'../../errors.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{RABETBASE_ENV_VALUES}from'../../constant/env.js';import{existsSync}from'node:fs';import{resolve}from'node:path';import{validateAppcode}from'../../commands/common/validate.js';import{promptCustomAppcode,selectMultipleApps}from'../../commands/common/app-selector.js';import{getCookie}from'../../auth/get-cookie.js';import{buildCanonicalProjectConfig}from'../../config/schema.js';function syntheticApp(_0x1d14be){return{'appCode':_0x1d14be,'appName':_0x1d14be};}function writeInitConfig(_0x2f31fd,_0x467cfe,_0x44d46f){const _0x48355f=a78_0x1bdd,_0x25875d=resolveWriteConfigPath(_0x2f31fd),_0x5d68de=buildCanonicalProjectConfig({},{'appCodes':_0x467cfe['map'](_0x5a4853=>_0x5a4853[_0x48355f(0x13c)]),'env':_0x44d46f,'metadata':{'version':getCliVersion(),'createdAt':new Date()['toLocaleString']()}});writeConfigFile(_0x25875d,_0x5d68de);const _0x46751a=_0x2f31fd===_0x48355f(0x137)?'global':'project';console[_0x48355f(0x130)](_0x48355f(0x141)+_0x46751a+_0x48355f(0x128)),console[_0x48355f(0x130)](_0x48355f(0x149)+_0x467cfe[_0x48355f(0x13d)](_0x1f7b23=>_0x1f7b23[_0x48355f(0x13c)])[_0x48355f(0x14e)](',\x20')),console[_0x48355f(0x130)](_0x48355f(0x131)+_0x5d68de[_0x48355f(0x122)]),console[_0x48355f(0x130)]('\x20\x20Env:\x20'+_0x5d68de['env']),console[_0x48355f(0x130)]('\x20\x20Config:\x20'+_0x25875d);}async function runSmartInit(_0x17d5f9){const _0x11c2e4=a78_0x1bdd,_0x54028c=process[_0x11c2e4(0x129)](),_0x29d5bc=_0x17d5f9['bool'](_0x11c2e4(0x137))?_0x11c2e4(0x137):'project',_0x1e94e0=_0x17d5f9[_0x11c2e4(0x127)](_0x11c2e4(0x125))||_0x11c2e4(0x133),_0x53fad9=_0x17d5f9[_0x11c2e4(0x127)](_0x11c2e4(0x12e))||undefined,_0xa0483=_0x17d5f9[_0x11c2e4(0x13b)](_0x11c2e4(0x14b));if(_0xa0483){const {initConfig:_0x589330}=await import(_0x11c2e4(0x12f));return _0x589330({'appcode':_0x53fad9,'env':_0x1e94e0,'autoYes':_0x17d5f9[_0x11c2e4(0x13b)](_0x11c2e4(0x121))});}if(_0x29d5bc===_0x11c2e4(0x14b)){const _0x4b7bb9=existsSync(resolve(_0x54028c,NEW_CONFIG_NAME)),_0x91914b=LEGACY_CONFIG_NAMES[_0x11c2e4(0x12a)](_0x5c6c18=>existsSync(resolve(_0x54028c,_0x5c6c18)));if(_0x91914b&&!_0x4b7bb9)return console[_0x11c2e4(0x130)](_0x11c2e4(0x138)),upgradeApp(_0x17d5f9[_0x11c2e4(0x13e)],{'yes':_0x17d5f9[_0x11c2e4(0x13b)]('yes')});if(_0x4b7bb9)throw CliErrors[_0x11c2e4(0x14c)](_0x11c2e4(0x132),_0x11c2e4(0x12d)+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x53fad9){const _0x5c8d39=validateAppcode(_0x53fad9);if(!_0x5c8d39['valid'])throw CliErrors[_0x11c2e4(0x14c)](_0x5c8d39[_0x11c2e4(0x124)]);writeInitConfig(_0x29d5bc,[syntheticApp(_0x53fad9)],_0x1e94e0);return;}if(_0x17d5f9[_0x11c2e4(0x13e)])throw CliErrors[_0x11c2e4(0x13f)](_0x11c2e4(0x12e),_0x11c2e4(0x146)+CLI_BIN_NAME+_0x11c2e4(0x143));const _0x3aa334=getCookie(),_0xc0812d=await selectMultipleApps(_0x3aa334),_0x275b5c=_0xc0812d===_0x11c2e4(0x148)?[syntheticApp(await promptCustomAppcode())]:_0xc0812d;writeInitConfig(_0x29d5bc,_0x275b5c,_0x1e94e0);}const initFlags=[{'name':a78_0x537d03(0x137),'type':a78_0x537d03(0x136),'description':a78_0x537d03(0x134),'default':![]},{'name':a78_0x537d03(0x125),'type':'string','description':a78_0x537d03(0x147),'default':'production','enum':[...RABETBASE_ENV_VALUES]},{'name':a78_0x537d03(0x12e),'type':a78_0x537d03(0x123),'description':a78_0x537d03(0x14d)},{'name':'project','type':a78_0x537d03(0x136),'description':a78_0x537d03(0x14a),'default':![]},{'name':'yes','type':a78_0x537d03(0x136),'description':a78_0x537d03(0x142),'default':![]}];export const initDefinitions=[{'service':a78_0x537d03(0x126),'command':a78_0x537d03(0x11e),'description':a78_0x537d03(0x139),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x4bd3ce){return await runSmartInit(_0x4bd3ce),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x44b3a9,_0xebb6d0){const _0x49b69d=a79_0x1a16,_0xa9967d=_0x44b3a9();while(!![]){try{const _0x7335d9=-parseInt(_0x49b69d(0x14e))/0x1+-parseInt(_0x49b69d(0x151))/0x2*(-parseInt(_0x49b69d(0x158))/0x3)+parseInt(_0x49b69d(0x153))/0x4+-parseInt(_0x49b69d(0x150))/0x5+parseInt(_0x49b69d(0x154))/0x6*(parseInt(_0x49b69d(0x155))/0x7)+parseInt(_0x49b69d(0x156))/0x8*(parseInt(_0x49b69d(0x14f))/0x9)+-parseInt(_0x49b69d(0x152))/0xa*(parseInt(_0x49b69d(0x157))/0xb);if(_0x7335d9===_0xebb6d0)break;else _0xa9967d['push'](_0xa9967d['shift']());}catch(_0x42df35){_0xa9967d['push'](_0xa9967d['shift']());}}}(a79_0x5e76,0xd2e70));import{issueReport}from'../../commands/issue/report.js';export const issueDefinitions=[issueReport];function a79_0x1a16(_0x56c387,_0x24f276){_0x56c387=_0x56c387-0x14e;const _0x5e76a7=a79_0x5e76();let _0x1a1660=_0x5e76a7[_0x56c387];return _0x1a1660;}function a79_0x5e76(){const _0x38bc29=['51592wocifh','22PBgcmS','66HMsbza','1203856MrCHrV','1737OQhaDE','3819795SnZdyj','63162eFegEi','4335050PocMIR','1407004eldzYM','8444946ZbNNXc','7nAQfey'];a79_0x5e76=function(){return _0x38bc29;};return a79_0x5e76();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a80_0x21d6dd=a80_0x5dee;(function(_0x12b94d,_0x281e0c){const _0x5e49c2=a80_0x5dee,_0x518d51=_0x12b94d();while(!![]){try{const _0x3da4f5=parseInt(_0x5e49c2(0xbc))/0x1*(parseInt(_0x5e49c2(0xa9))/0x2)+-parseInt(_0x5e49c2(0xba))/0x3*(-parseInt(_0x5e49c2(0xb6))/0x4)+parseInt(_0x5e49c2(0xac))/0x5+-parseInt(_0x5e49c2(0xbf))/0x6*(-parseInt(_0x5e49c2(0xb3))/0x7)+-parseInt(_0x5e49c2(0xc5))/0x8+-parseInt(_0x5e49c2(0xb9))/0x9+-parseInt(_0x5e49c2(0xb8))/0xa*(parseInt(_0x5e49c2(0xc2))/0xb);if(_0x3da4f5===_0x281e0c)break;else _0x518d51['push'](_0x518d51['shift']());}catch(_0x4c2b9b){_0x518d51['push'](_0x518d51['shift']());}}}(a80_0x4997,0x6ff8f));import{CliError}from'../../errors.js';function a80_0x4997(){const _0x12989e=['268401gBqQbB','network_error','flag_missing','15660maOjzU','replace','60OZvmXC','7220403ORWBoY','111NvISuk','length','7FwpBIx','RABETBASE_DISABLE_ISSUE_NUDGE','not_in_project','18JvmYiJ','service','has','1155671yRoLfl','\x20\x20Set\x20','trim','846840BokeGG','\x20issue\x20report\x20\x5c','join','report','config_missing','stderr','auth_required','command','write','validation_error','245604ibrMsA','\x20bug?\x20Help\x20us\x20fix\x20it:','message','4388145bYEAfZ','\x20\x20\x20\x20--title\x20\x22','code','\x20\x20(Cookies\x20/\x20Authorization\x20/\x20access\x20keys\x20are\x20automatically\x20redacted\x20before\x20upload.)','cancelled','=1\x20to\x20silence\x20this\x20hint.','Hit\x20a\x20'];a80_0x4997=function(){return _0x12989e;};return a80_0x4997();}import{CLI_BIN_NAME}from'../../constant/cli.js';export const NUDGE_OPT_OUT_ENV=a80_0x21d6dd(0xbd);const NUDGE_SUPPRESSED_CODES=new Set([a80_0x21d6dd(0xb0),a80_0x21d6dd(0xcb),a80_0x21d6dd(0xc9),a80_0x21d6dd(0xbe),'unknown_command',a80_0x21d6dd(0xb5),a80_0x21d6dd(0xa8),a80_0x21d6dd(0xb4)]),defaultWriter=_0x542347=>{const _0x554d48=a80_0x21d6dd;process[_0x554d48(0xca)][_0x554d48(0xa7)](_0x542347);};export function shouldNudgeForError(_0x297910,_0x595fc3){const _0x5f1253=a80_0x21d6dd;if(process.env[NUDGE_OPT_OUT_ENV]==='1')return![];if(_0x595fc3[_0x5f1253(0xc0)]==='issue'&&_0x595fc3['command']===_0x5f1253(0xc8))return![];if(_0x297910 instanceof CliError)return!NUDGE_SUPPRESSED_CODES[_0x5f1253(0xc1)](_0x297910[_0x5f1253(0xae)]);return!![];}function a80_0x5dee(_0x12f819,_0x5ba27c){_0x12f819=_0x12f819-0xa7;const _0x49976e=a80_0x4997();let _0x5deecb=_0x49976e[_0x12f819];return _0x5deecb;}export function printIssueReportNudgeForError(_0x4602d7,_0x3505c0,_0x43e3b3=defaultWriter){if(!shouldNudgeForError(_0x4602d7,_0x3505c0))return;const _0x2827ff=buildSuggestedTitle(_0x4602d7,_0x3505c0);_0x43e3b3(formatNudge(_0x2827ff));}function buildSuggestedTitle(_0xd5642f,_0x44ec9c){const _0x1bdfe6=a80_0x21d6dd,_0xbc0d01=_0xd5642f instanceof Error?_0xd5642f[_0x1bdfe6(0xab)]:String(_0xd5642f),_0x3c05f6=_0xbc0d01[_0x1bdfe6(0xb7)](/[\r\n]+/g,'\x20')[_0x1bdfe6(0xb7)](/\s+/g,'\x20')[_0x1bdfe6(0xc4)]()['slice'](0x0,0x78)['replace'](/"/g,'\x5c\x22'),_0x276629=CLI_BIN_NAME+'\x20'+_0x44ec9c[_0x1bdfe6(0xc0)]+'\x20'+_0x44ec9c[_0x1bdfe6(0xcc)];return _0x3c05f6[_0x1bdfe6(0xbb)]>0x0?_0x276629+':\x20'+_0x3c05f6:_0x276629;}function formatNudge(_0x3337d5){const _0x4dae53=a80_0x21d6dd;return['',_0x4dae53(0xb2)+CLI_BIN_NAME+_0x4dae53(0xaa),'\x20\x20'+CLI_BIN_NAME+_0x4dae53(0xc6),_0x4dae53(0xad)+_0x3337d5+'\x22\x20\x5c','\x20\x20\x20\x20--description\x20\x22Steps\x20to\x20reproduce,\x20expected\x20vs\x20actual,\x20and\x20any\x20relevant\x20logs.\x22',_0x4dae53(0xaf),_0x4dae53(0xc3)+NUDGE_OPT_OUT_ENV+_0x4dae53(0xb1),''][_0x4dae53(0xc7)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x168399=a81_0x448e;(function(_0x1dfc79,_0x2e2681){const _0x325bf8=a81_0x448e,_0x47c61f=_0x1dfc79();while(!![]){try{const _0x14a1eb=parseInt(_0x325bf8(0x1fc))/0x1*(parseInt(_0x325bf8(0x20e))/0x2)+parseInt(_0x325bf8(0x20a))/0x3+-parseInt(_0x325bf8(0x21c))/0x4*(-parseInt(_0x325bf8(0x1fd))/0x5)+-parseInt(_0x325bf8(0x21d))/0x6+-parseInt(_0x325bf8(0x207))/0x7+parseInt(_0x325bf8(0x1ff))/0x8*(-parseInt(_0x325bf8(0x20b))/0x9)+parseInt(_0x325bf8(0x22c))/0xa;if(_0x14a1eb===_0x2e2681)break;else _0x47c61f['push'](_0x47c61f['shift']());}catch(_0xae88){_0x47c61f['push'](_0x47c61f['shift']());}}}(a81_0x3cc2,0x598b8));import{existsSync}from'node:fs';import{readFile}from'node:fs/promises';import{resolve}from'node:path';import{CliErrors}from'../../errors.js';function a81_0x448e(_0xb8c4d9,_0x278845){_0xb8c4d9=_0xb8c4d9-0x1f3;const _0x3cc231=a81_0x3cc2();let _0x448e02=_0x3cc231[_0xb8c4d9];return _0x448e02;}import{sanitizeIssueDescription}from'../../commands/issue/shared.js';import{PLATFORM_ISSUE_SPAN_NAME,PLATFORM_ISSUE_TRACE_NAME,sendPlatformIssueCollectLog}from'../../telemetry/send-platform-issue-collect-log.js';const DESCRIPTION_FILE_FLAG='description-file';export const issueReport={'service':a81_0x168399(0x22a),'command':a81_0x168399(0x215),'description':'Report\x20a\x20platform\x20issue\x20with\x20title\x20and\x20markdown\x20context','risk':a81_0x168399(0x20f),'requiresAuth':![],'requiresAppCode':![],'defaultOutputFormat':'compress','flags':[{'name':a81_0x168399(0x208),'type':a81_0x168399(0x224),'required':!![],'description':'One-line\x20issue\x20summary'},{'name':a81_0x168399(0x223),'type':a81_0x168399(0x224),'description':a81_0x168399(0x203)},{'name':DESCRIPTION_FILE_FLAG,'type':a81_0x168399(0x224),'description':a81_0x168399(0x212)}],async 'validate'(_0x2781fc){const _0x136467=a81_0x168399,_0x2de33e=_0x2781fc[_0x136467(0x220)](_0x136467(0x208))[_0x136467(0x225)](),_0x2635fd=_0x2781fc[_0x136467(0x220)](_0x136467(0x223))[_0x136467(0x225)](),_0x48ddc9=_0x2781fc[_0x136467(0x220)](DESCRIPTION_FILE_FLAG)[_0x136467(0x225)]();if(!_0x2de33e)throw CliErrors['flagMissing'](_0x136467(0x208),_0x136467(0x206));const _0x15c9c=_0x2635fd['length']>0x0,_0x9a6857=_0x48ddc9[_0x136467(0x22b)]>0x0;if(_0x15c9c===_0x9a6857)throw CliErrors[_0x136467(0x1f8)](_0x136467(0x211),_0x136467(0x21f));if(_0x9a6857){const _0x5a5f0=resolve(process[_0x136467(0x201)](),_0x48ddc9);if(!existsSync(_0x5a5f0))throw CliErrors['validation'](_0x136467(0x222)+_0x5a5f0);}},async 'dryRun'(_0x3f5958){const _0x15ce2d=a81_0x168399,_0x5121ca=await prepareIssueReport(_0x3f5958);return{'method':_0x15ce2d(0x228),'url':_0x15ce2d(0x216)+PLATFORM_ISSUE_TRACE_NAME+'/'+PLATFORM_ISSUE_SPAN_NAME,'body':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logData':{'issue.title':_0x5121ca[_0x15ce2d(0x208)],'issue.description':_0x5121ca[_0x15ce2d(0x223)],'issue.description_original_bytes':_0x5121ca[_0x15ce2d(0x200)][_0x15ce2d(0x1f6)],'issue.description_truncated':_0x5121ca[_0x15ce2d(0x200)][_0x15ce2d(0x227)],'issue.description_redactions':_0x5121ca[_0x15ce2d(0x200)][_0x15ce2d(0x202)],'issue.description_redaction_kinds':_0x5121ca[_0x15ce2d(0x200)][_0x15ce2d(0x21a)][_0x15ce2d(0x1f3)](',')}},'description':[_0x15ce2d(0x21b),'descriptionSource:\x20'+_0x5121ca['descriptionSource'],_0x5121ca['descriptionFilePath']?_0x15ce2d(0x205)+_0x5121ca[_0x15ce2d(0x1f4)]:null,_0x5121ca['sanitize'][_0x15ce2d(0x227)]?'truncated:\x20original\x20'+_0x5121ca[_0x15ce2d(0x200)]['originalBytes']+_0x15ce2d(0x1f7):null,_0x5121ca[_0x15ce2d(0x200)][_0x15ce2d(0x202)]>0x0?_0x15ce2d(0x20d)+_0x5121ca[_0x15ce2d(0x200)]['redactionCount']+'\x20('+_0x5121ca[_0x15ce2d(0x200)][_0x15ce2d(0x21a)][_0x15ce2d(0x1f3)](',\x20')+')':null]['filter'](Boolean)['join']('\x0a')};},async 'execute'(_0x2b1e6b){const _0x18e170=a81_0x168399,_0x41202f=await prepareIssueReport(_0x2b1e6b);try{await sendPlatformIssueCollectLog({'title':_0x41202f['title'],'description':_0x41202f[_0x18e170(0x223)],'sanitize':{'originalBytes':_0x41202f[_0x18e170(0x200)][_0x18e170(0x1f6)],'truncated':_0x41202f[_0x18e170(0x200)][_0x18e170(0x227)],'redactionCount':_0x41202f['sanitize'][_0x18e170(0x202)],'redactionKinds':_0x41202f['sanitize'][_0x18e170(0x21a)]}});}catch(_0x1ab920){throw CliErrors['apiError'](_0x18e170(0x20c)+(_0x1ab920 instanceof Error?_0x1ab920[_0x18e170(0x1fb)]:String(_0x1ab920)),'Check\x20telemetry\x20configuration\x20and\x20network\x20reachability,\x20then\x20retry.');}return{'ok':!![],'message':buildResultMessage(_0x41202f[_0x18e170(0x200)]),'data':{'traceName':PLATFORM_ISSUE_TRACE_NAME,'spanName':PLATFORM_ISSUE_SPAN_NAME,'logDataKeys':[_0x18e170(0x1fa),_0x18e170(0x221),_0x18e170(0x226),_0x18e170(0x219),_0x18e170(0x204),_0x18e170(0x229)],'issue':{'title':_0x41202f[_0x18e170(0x208)],'descriptionLength':_0x41202f[_0x18e170(0x223)][_0x18e170(0x22b)],'descriptionSource':_0x41202f['descriptionSource'],..._0x41202f['descriptionFilePath']?{'descriptionFile':_0x41202f['descriptionFilePath']}:{},'sanitize':{'originalBytes':_0x41202f[_0x18e170(0x200)][_0x18e170(0x1f6)],'truncated':_0x41202f[_0x18e170(0x200)]['truncated'],'redactions':_0x41202f[_0x18e170(0x200)][_0x18e170(0x202)],'redactionKinds':_0x41202f[_0x18e170(0x200)]['redactionKinds']}}}};}};function buildResultMessage(_0x1a7294){const _0x2d2cd9=a81_0x168399,_0x17a184=[];return _0x1a7294['truncated']&&_0x17a184['push'](_0x2d2cd9(0x217)+_0x1a7294['originalBytes']+_0x2d2cd9(0x1f7)),_0x1a7294[_0x2d2cd9(0x202)]>0x0&&_0x17a184['push']('redacted\x20'+_0x1a7294['redactionCount']+_0x2d2cd9(0x1f5)+_0x1a7294[_0x2d2cd9(0x21a)][_0x2d2cd9(0x1f3)](',\x20')),_0x17a184[_0x2d2cd9(0x22b)]===0x0?_0x2d2cd9(0x213):_0x2d2cd9(0x1f9)+_0x17a184[_0x2d2cd9(0x1f3)](';\x20')+')';}async function prepareIssueReport(_0xfb3e5e){const _0xc9c71=a81_0x168399,_0x386510=_0xfb3e5e['str']('title')[_0xc9c71(0x225)](),_0x2189e3=_0xfb3e5e['str'](_0xc9c71(0x223)),_0x50f223=_0xfb3e5e['str'](DESCRIPTION_FILE_FLAG)[_0xc9c71(0x225)]();if(!_0x50f223){const _0x4afe95=_0x2189e3;if(!_0x4afe95[_0xc9c71(0x225)]())throw CliErrors[_0xc9c71(0x1f8)](_0xc9c71(0x218),'Provide\x20non-empty\x20markdown\x20content\x20via\x20--description\x20or\x20--description-file.');const _0x1414af=sanitizeIssueDescription(_0x4afe95);return{'title':_0x386510,'description':_0x1414af['description'],'descriptionSource':_0xc9c71(0x214),'sanitize':_0x1414af};}const _0x4d2218=resolve(process[_0xc9c71(0x201)](),_0x50f223),_0x2917cc=await readFile(_0x4d2218,_0xc9c71(0x1fe));if(!_0x2917cc['trim']())throw CliErrors[_0xc9c71(0x1f8)](_0xc9c71(0x209)+_0x4d2218,_0xc9c71(0x21e));const _0x2f65e6=sanitizeIssueDescription(_0x2917cc);return{'title':_0x386510,'description':_0x2f65e6[_0xc9c71(0x223)],'descriptionSource':_0xc9c71(0x210),'descriptionFilePath':_0x4d2218,'sanitize':_0x2f65e6};}function a81_0x3cc2(){const _0x2df1b0=['otel://','truncated\x20from\x20','Issue\x20description\x20cannot\x20be\x20empty.','issue.description_truncated','redactionKinds','Send\x20platform\x20issue\x20collect\x20log\x20via\x20the\x20CLI\x20telemetry\x20adapter','54368ueWShN','455160vGPRFv','Write\x20markdown\x20context\x20into\x20the\x20file\x20before\x20retrying.','Use\x20--description\x20for\x20short\x20markdown\x20text,\x20or\x20--description-file\x20for\x20full\x20issue\x20context.','str','issue.description','File\x20not\x20found:\x20','description','string','trim','issue.description_original_bytes','truncated','POST','issue.description_redaction_kinds','issue','length','3048360DXTIKz','join','descriptionFilePath','\x20secret(s):\x20','originalBytes','\x20bytes','validation','Platform\x20issue\x20reported\x20(','issue.title','message','1196txwPpD','135wvcqPx','utf8','16YJiVzt','sanitize','cwd','redactionCount','Inline\x20markdown\x20issue\x20description\x20(alternative\x20to\x20--description-file)','issue.description_redactions','descriptionFile:\x20','Provide\x20--title\x20with\x20a\x20one-line\x20issue\x20summary.','3390415gfdZmX','title','Issue\x20description\x20file\x20is\x20empty:\x20','318021gScxKC','114579boSJTI','Failed\x20to\x20report\x20platform\x20issue:\x20','redactions:\x20','292yQLOKi','write','file','Provide\x20exactly\x20one\x20of\x20--description\x20or\x20--description-file.','Path\x20to\x20a\x20markdown\x20file\x20whose\x20contents\x20become\x20issue.description','Platform\x20issue\x20reported','inline','report'];a81_0x3cc2=function(){return _0x2df1b0;};return a81_0x3cc2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a82_0x37d3(_0x5cd8ee,_0x1d9aef){_0x5cd8ee=_0x5cd8ee-0x104;const _0x4097c3=a82_0x4097();let _0x37d31e=_0x4097c3[_0x5cd8ee];return _0x37d31e;}const a82_0x3a62eb=a82_0x37d3;(function(_0x5ed682,_0x1a3094){const _0x4b458f=a82_0x37d3,_0x5677b6=_0x5ed682();while(!![]){try{const _0xc33182=parseInt(_0x4b458f(0x116))/0x1+-parseInt(_0x4b458f(0x11c))/0x2*(parseInt(_0x4b458f(0x11e))/0x3)+parseInt(_0x4b458f(0x104))/0x4*(-parseInt(_0x4b458f(0x117))/0x5)+parseInt(_0x4b458f(0x113))/0x6*(-parseInt(_0x4b458f(0x105))/0x7)+parseInt(_0x4b458f(0x108))/0x8*(-parseInt(_0x4b458f(0x11d))/0x9)+-parseInt(_0x4b458f(0x106))/0xa+parseInt(_0x4b458f(0x10d))/0xb*(parseInt(_0x4b458f(0x122))/0xc);if(_0xc33182===_0x1a3094)break;else _0x5677b6['push'](_0x5677b6['shift']());}catch(_0x5bda19){_0x5677b6['push'](_0x5677b6['shift']());}}}(a82_0x4097,0xbd758));export const ISSUE_DESCRIPTION_MAX_BYTES=0x100*0x400;const TRUNCATION_NOTICE=a82_0x3a62eb(0x118),REDACTION_RULES=[{'kind':a82_0x3a62eb(0x120),'pattern':/(cookie\s*[:=]\s*)[^\s;,'"`]+/gi,'label':a82_0x3a62eb(0x10b)},{'kind':a82_0x3a62eb(0x111),'pattern':/(authorization\s*:\s*)(bearer|basic|token)\s+[^\s'"`]+/gi,'label':a82_0x3a62eb(0x112)},{'kind':'private-key','pattern':/-----BEGIN [A-Z0-9 ]*PRIVATE KEY-----[\s\S]*?-----END [A-Z0-9 ]*PRIVATE KEY-----/g,'label':a82_0x3a62eb(0x11b)},{'kind':'access-key','pattern':/((?:aliyun_)?(?:access|secret)[_-]?key(?:[_-]?id)?\s*[:=]\s*)['"]?[A-Za-z0-9/+_\-]{8,}['"]?/gi,'label':'REDACTED:access-key'},{'kind':a82_0x3a62eb(0x10a),'pattern':/(pass(?:word|wd)\s*[:=]\s*)['"]?[^\s'"`]+['"]?/gi,'label':'REDACTED:password'},{'kind':a82_0x3a62eb(0x11a),'pattern':/\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{10,}\b/g,'label':a82_0x3a62eb(0x107)}];export function sanitizeIssueDescription(_0x13ca8e){const _0x35ce72=a82_0x3a62eb,_0x27f3ec=Buffer[_0x35ce72(0x10f)](_0x13ca8e,_0x35ce72(0x119)),_0x287d33=process.env.RABETBASE_ISSUE_RAW_DESCRIPTION==='1';let _0xf739a7=_0x13ca8e,_0x2229b7=0x0;const _0x41512a=[];if(!_0x287d33)for(const _0x3d61d9 of REDACTION_RULES){let _0x14fee8=0x0;_0xf739a7=_0xf739a7[_0x35ce72(0x109)](_0x3d61d9[_0x35ce72(0x10c)],(_0xa81fbd,_0x24ec08)=>{const _0x361408=_0x35ce72;_0x14fee8+=0x1;const _0x1c3d74=typeof _0x24ec08===_0x361408(0x115)?_0x24ec08:'';return _0x1c3d74+'['+_0x3d61d9[_0x361408(0x110)]+']';}),_0x14fee8>0x0&&(_0x2229b7+=_0x14fee8,!_0x41512a['includes'](_0x3d61d9[_0x35ce72(0x121)])&&_0x41512a[_0x35ce72(0x10e)](_0x3d61d9[_0x35ce72(0x121)]));}let _0x1bfc24=![];if(Buffer[_0x35ce72(0x10f)](_0xf739a7,_0x35ce72(0x119))>ISSUE_DESCRIPTION_MAX_BYTES){_0x1bfc24=!![];const _0x374b3c=Buffer['byteLength'](TRUNCATION_NOTICE,_0x35ce72(0x119)),_0x139f9a=Math['max'](0x0,ISSUE_DESCRIPTION_MAX_BYTES-_0x374b3c);_0xf739a7=sliceUtf8Bytes(_0xf739a7,_0x139f9a)+TRUNCATION_NOTICE;}return{'description':_0xf739a7,'originalBytes':_0x27f3ec,'truncated':_0x1bfc24,'redactionCount':_0x2229b7,'redactionKinds':_0x41512a};}function sliceUtf8Bytes(_0x4adad1,_0x561e49){const _0x98ff14=a82_0x3a62eb;if(_0x561e49<=0x0)return'';const _0x4ec7a8=Buffer[_0x98ff14(0x11f)](_0x4adad1,_0x98ff14(0x119));if(_0x4ec7a8['byteLength']<=_0x561e49)return _0x4adad1;let _0x33117d=_0x561e49;while(_0x33117d>0x0){const _0x9ce9c1=_0x4ec7a8[_0x33117d];if(_0x9ce9c1===undefined||(_0x9ce9c1&0xc0)!==0x80)break;_0x33117d-=0x1;}return _0x4ec7a8['subarray'](0x0,_0x33117d)[_0x98ff14(0x114)](_0x98ff14(0x119));}function a82_0x4097(){const _0x39b2d6=['authorization','REDACTED:authorization','6uWsqsJ','toString','string','1273888wGFlwN','5PwpGcI','\x0a\x0a[...TRUNCATED\x20by\x20rabetbase-cli...]','utf8','bearer-jwt','REDACTED:private-key','962vwzpLv','9QUQZet','7119SdUWAm','from','cookie','kind','19968372IZJcYz','4904364cpvPrN','8043042yyaoJI','12245130SVOJYk','REDACTED:bearer-jwt','5991472pMOZYB','replace','password','REDACTED:cookie','pattern','33eROrhF','push','byteLength','label'];a82_0x4097=function(){return _0x39b2d6;};return a82_0x4097();}
|