@lovrabet/rabetbase-cli 2.1.2 → 2.1.3-beta.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 -0
- 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/dataset/detail.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- 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/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 -0
- package/lib/commands/page/generate-status.js +1 -0
- package/lib/commands/page/index.js +1 -0
- package/lib/commands/page/pull.js +1 -0
- package/lib/commands/page/push.js +1 -0
- package/lib/commands/page/shared.js +1 -0
- package/lib/commands/page/standard-page-status.js +1 -0
- package/lib/commands/page/sync.js +1 -0
- 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 -0
- package/lib/commands/sql/delete.js +1 -0
- 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 -0
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -0
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -0
- 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 -0
- package/lib/core/page/hash.js +1 -0
- package/lib/core/page/lock.js +1 -0
- package/lib/core/page/types.js +1 -0
- package/lib/core/sql-sync/config.js +1 -0
- package/lib/core/sql-sync/file-system.js +1 -0
- package/lib/core/sql-sync/hash.js +1 -0
- package/lib/core/sql-sync/lock.js +1 -0
- package/lib/core/sql-sync/types.js +1 -0
- package/lib/core/sql-sync/utils.js +1 -0
- 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/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 -0
- 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/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 +3 -2
- package/templates/skill/SKILL.md.tpl +1 -1
- package/lib/commands/bff/new.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a53_0x54ae(_0x333388,_0x594e59){_0x333388=_0x333388-0x1a9;const _0x4bfb99=a53_0x4bfb();let _0x54ae1b=_0x4bfb99[_0x333388];return _0x54ae1b;}function a53_0x4bfb(){const _0x3bff34=['1643000RhDCYh','read','286127gXzYaM','plan','2094APMMKN','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','3776150sSetLI','2635460zpnRaH','6MrdEFM','2NBDvKc','7988VsEBqU','10276650BsMXfh','str','3242904xhOdHK','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id'];a53_0x4bfb=function(){return _0x3bff34;};return a53_0x4bfb();}const a53_0x5d8b2d=a53_0x54ae;(function(_0x3896da,_0x480773){const _0x4bb45e=a53_0x54ae,_0x3855ba=_0x3896da();while(!![]){try{const _0x260bc9=-parseInt(_0x4bb45e(0x1ad))/0x1*(-parseInt(_0x4bb45e(0x1b4))/0x2)+parseInt(_0x4bb45e(0x1af))/0x3*(-parseInt(_0x4bb45e(0x1b5))/0x4)+parseInt(_0x4bb45e(0x1b2))/0x5+parseInt(_0x4bb45e(0x1b3))/0x6*(parseInt(_0x4bb45e(0x1b1))/0x7)+-parseInt(_0x4bb45e(0x1a9))/0x8+parseInt(_0x4bb45e(0x1b6))/0x9+parseInt(_0x4bb45e(0x1ab))/0xa;if(_0x260bc9===_0x480773)break;else _0x3855ba['push'](_0x3855ba['shift']());}catch(_0x422491){_0x3855ba['push'](_0x3855ba['shift']());}}}(a53_0x4bfb,0xd1d9e));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeStatus={'service':'db','command':'analyze-status','description':a53_0x5d8b2d(0x1aa),'risk':a53_0x5d8b2d(0x1ac),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a53_0x5d8b2d(0x1ae),'type':'string','required':!![],'description':a53_0x5d8b2d(0x1b0)}],async 'execute'(_0x15ddbf){const _0x32835f=a53_0x5d8b2d,_0x4c3759=_0x15ddbf['num']('id'),_0x252971=_0x15ddbf[_0x32835f(0x1b7)](_0x32835f(0x1ae)),_0x4b3e47=await getDbAnalysisStatus(_0x252971);return{'ok':!![],'data':{'dbLinkId':_0x4c3759,'planId':_0x252971,'status':_0x4b3e47},'message':'Analysis\x20status\x20for\x20'+_0x252971};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a54_0x21ae33=a54_0x1c5b;(function(_0xa540d6,_0x4732ba){const _0x1c36d6=a54_0x1c5b,_0x5d87c2=_0xa540d6();while(!![]){try{const _0x474717=-parseInt(_0x1c36d6(0x92))/0x1+parseInt(_0x1c36d6(0xa7))/0x2+-parseInt(_0x1c36d6(0x9c))/0x3*(parseInt(_0x1c36d6(0x8a))/0x4)+-parseInt(_0x1c36d6(0x8d))/0x5*(parseInt(_0x1c36d6(0xa6))/0x6)+parseInt(_0x1c36d6(0x88))/0x7*(-parseInt(_0x1c36d6(0x82))/0x8)+parseInt(_0x1c36d6(0xa2))/0x9+parseInt(_0x1c36d6(0x85))/0xa;if(_0x474717===_0x4732ba)break;else _0x5d87c2['push'](_0x5d87c2['shift']());}catch(_0x42e3f3){_0x5d87c2['push'](_0x5d87c2['shift']());}}}(a54_0x56b5,0x1a892));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a54_0x56b5(){const _0x93d871=['boolean','344082ZTPson','387620pnLVuA','dbdesc',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','Database\x20username','join','dbtype','Database\x20password','\x20and\x20started\x20analysis','Created\x20db\x20link\x20','validation','16mxfIaF','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','autostart','696940AmIOhK','password','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','653422OAKwQY','create','139580RXOQpg','No\x20follow-up\x20analysis','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','5hPddyk','After\x20create,\x20start\x20schema\x20analysis\x20(same\x20as\x20workbench\x20flow)','str','username','Create\x20dblink','87836HnYmCF','dburl','Extra\x20JDBC-style\x20connection\x20parameters\x20string','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','string','[redacted]','POST','dbname','8.0','/smartapi/dblink/create','3rIPuRr','dbversion','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','trim','appCode','message','1907604qmcBkW','dbparam','bool'];a54_0x56b5=function(){return _0x93d871;};return a54_0x56b5();}import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';function a54_0x1c5b(_0x491378,_0x25ad9a){_0x491378=_0x491378-0x81;const _0x56b587=a54_0x56b5();let _0x1c5b8b=_0x56b587[_0x491378];return _0x1c5b8b;}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a54_0x21ae33(0x89),'description':a54_0x21ae33(0x8c),'risk':'write','flags':[APPCODE_FLAG_OPTIONAL,{'name':a54_0x21ae33(0x99),'type':'string','required':!![],'description':'Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server'},DB_TYPE_FLAG,{'name':a54_0x21ae33(0x9d),'type':a54_0x21ae33(0x96),'description':a54_0x21ae33(0x87),'default':a54_0x21ae33(0x9a)},{'name':a54_0x21ae33(0x93),'type':a54_0x21ae33(0x96),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':a54_0x21ae33(0x90),'type':a54_0x21ae33(0x96),'required':!![],'description':a54_0x21ae33(0xaa)},{'name':a54_0x21ae33(0x86),'type':a54_0x21ae33(0x96),'required':!![],'description':a54_0x21ae33(0xad)},{'name':'dbparam','type':a54_0x21ae33(0x96),'description':a54_0x21ae33(0x94)},{'name':a54_0x21ae33(0xa8),'type':a54_0x21ae33(0x96),'description':'Human-readable\x20description'},{'name':a54_0x21ae33(0x84),'type':a54_0x21ae33(0xa5),'description':a54_0x21ae33(0x8e),'default':![]}],async 'validate'(_0x3cf4b4){const _0x3941dd=a54_0x21ae33,_0x3ae468=_0x3cf4b4['str'](_0x3941dd(0x93))[_0x3941dd(0x9f)]();if(!validateDbUrl(_0x3ae468))throw CliErrors[_0x3941dd(0x81)](_0x3941dd(0x95)+_0x3ae468+'\x22',_0x3941dd(0x9e));},async 'dryRun'(_0x25f7e4){const _0x4c45da=a54_0x21ae33,_0x165b48={'appCode':_0x25f7e4[_0x4c45da(0xa0)],'dbName':_0x25f7e4['str'](_0x4c45da(0x99)),'dbType':_0x25f7e4[_0x4c45da(0x8f)](_0x4c45da(0xac)),'dbVersion':_0x25f7e4[_0x4c45da(0x8f)](_0x4c45da(0x9d))||'8.0','dbUrl':_0x25f7e4['str'](_0x4c45da(0x93))['trim'](),'username':_0x25f7e4['str'](_0x4c45da(0x90)),'password':_0x4c45da(0x97),..._0x25f7e4[_0x4c45da(0x8f)]('dbparam')?{'dbParam':_0x25f7e4[_0x4c45da(0x8f)](_0x4c45da(0xa3))}:{},..._0x25f7e4[_0x4c45da(0x8f)](_0x4c45da(0xa8))?{'dbDesc':_0x25f7e4[_0x4c45da(0x8f)](_0x4c45da(0xa8))}:{}};return{'method':_0x4c45da(0x98),'url':_0x4c45da(0x9b),'body':_0x165b48,'description':[_0x4c45da(0x91),_0x25f7e4[_0x4c45da(0xa4)](_0x4c45da(0x84))?_0x4c45da(0x83):_0x4c45da(0x8b)][_0x4c45da(0xab)]('\x0a')};},async 'execute'(_0x447e67){const _0x1252e6=a54_0x21ae33,_0x78814c={'appCode':_0x447e67[_0x1252e6(0xa0)],'dbName':_0x447e67[_0x1252e6(0x8f)](_0x1252e6(0x99)),'dbType':_0x447e67[_0x1252e6(0x8f)](_0x1252e6(0xac)),'dbVersion':_0x447e67['str'](_0x1252e6(0x9d))||_0x1252e6(0x9a),'dbUrl':_0x447e67['str'](_0x1252e6(0x93))[_0x1252e6(0x9f)](),'username':_0x447e67[_0x1252e6(0x8f)](_0x1252e6(0x90)),'password':_0x447e67[_0x1252e6(0x8f)](_0x1252e6(0x86)),..._0x447e67[_0x1252e6(0x8f)](_0x1252e6(0xa3))?{'dbParam':_0x447e67[_0x1252e6(0x8f)]('dbparam')}:{},..._0x447e67[_0x1252e6(0x8f)]('dbdesc')?{'dbDesc':_0x447e67[_0x1252e6(0x8f)](_0x1252e6(0xa8))}:{}},{id:_0x37fa1a,entity:_0x2b43b0}=normalizeEntityWithIdResponse(await createDbLink(_0x78814c));if(!_0x37fa1a)return{'ok':![],'message':'Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','data':sanitizeDbLinkForOutput(_0x2b43b0)};let _0x3c086e,_0x520ffc;if(_0x447e67[_0x1252e6(0xa4)]('autostart'))try{_0x3c086e=await startDbAnalysis(_0x37fa1a);}catch(_0x430552){_0x520ffc=_0x430552 instanceof Error?_0x430552[_0x1252e6(0xa1)]:String(_0x430552);}const _0xf3c38e={'connection':sanitizeDbLinkForOutput(_0x2b43b0),..._0x3c086e?{'analysisPlanId':_0x3c086e}:{},..._0x520ffc?{'analysisStartWarning':_0x520ffc}:{}};let _0xbe6188;return _0x447e67[_0x1252e6(0xa4)](_0x1252e6(0x84))?_0x520ffc?_0xbe6188='Created\x20db\x20link\x20'+_0x37fa1a+_0x1252e6(0xa9):_0xbe6188=_0x1252e6(0xaf)+_0x37fa1a+_0x1252e6(0xae):_0xbe6188=_0x1252e6(0xaf)+_0x37fa1a,{'ok':!![],'data':_0xf3c38e,'message':_0xbe6188};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a55_0x1bbf(){const _0x1ef3b8=['6ugrdFB','1194075JDztNW','Deleted\x20db\x20link\x20','54iMdUrl','486768royBtO','1445488DmahfO','num','2095919thsQjS','184660bnWRIm','188491hBfngh','2076TLhzBU'];a55_0x1bbf=function(){return _0x1ef3b8;};return a55_0x1bbf();}(function(_0x55e66c,_0x18c118){const _0x3c6257=a55_0x15cf,_0x28eeb6=_0x55e66c();while(!![]){try{const _0x172665=parseInt(_0x3c6257(0x13d))/0x1+parseInt(_0x3c6257(0x143))/0x2+-parseInt(_0x3c6257(0x142))/0x3*(parseInt(_0x3c6257(0x13e))/0x4)+parseInt(_0x3c6257(0x147))/0x5+-parseInt(_0x3c6257(0x13f))/0x6*(parseInt(_0x3c6257(0x146))/0x7)+parseInt(_0x3c6257(0x144))/0x8+-parseInt(_0x3c6257(0x140))/0x9;if(_0x172665===_0x18c118)break;else _0x28eeb6['push'](_0x28eeb6['shift']());}catch(_0x12bba0){_0x28eeb6['push'](_0x28eeb6['shift']());}}}(a55_0x1bbf,0x32cbb));function a55_0x15cf(_0x2b5834,_0x53b25a){_0x2b5834=_0x2b5834-0x13d;const _0x1bbfd3=a55_0x1bbf();let _0x15cf0a=_0x1bbfd3[_0x2b5834];return _0x15cf0a;}import{deleteDbLink}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':'delete','description':'Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','risk':'high-risk-write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5b2a00){const _0x4b9a81=a55_0x15cf,_0x19d29f=_0x5b2a00[_0x4b9a81(0x145)]('id');return await deleteDbLink(_0x19d29f),{'ok':!![],'data':{'id':_0x19d29f,'deleted':!![]},'message':_0x4b9a81(0x141)+_0x19d29f};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a56_0xe6fb(){const _0x146244=['11KJaaJQ','13DLjnLq','876BCVNes','num','122170mUCtck','dbName','6423530OtoGdS','209184qrIDfs','4310eNtJZg','1830207vdehhc','read','4139704HEFDGH','db\x20link\x20','54bhviNf','detail','2539229mcQILd'];a56_0xe6fb=function(){return _0x146244;};return a56_0xe6fb();}const a56_0x434a09=a56_0x22e0;(function(_0x4df945,_0xcda6e3){const _0x3b1e9c=a56_0x22e0,_0x238d95=_0x4df945();while(!![]){try{const _0x4c5394=-parseInt(_0x3b1e9c(0xad))/0x1*(-parseInt(_0x3b1e9c(0xb0))/0x2)+parseInt(_0x3b1e9c(0xb5))/0x3+-parseInt(_0x3b1e9c(0xb7))/0x4+parseInt(_0x3b1e9c(0xb4))/0x5*(-parseInt(_0x3b1e9c(0xae))/0x6)+-parseInt(_0x3b1e9c(0xbb))/0x7+parseInt(_0x3b1e9c(0xb3))/0x8*(parseInt(_0x3b1e9c(0xb9))/0x9)+-parseInt(_0x3b1e9c(0xb2))/0xa*(-parseInt(_0x3b1e9c(0xac))/0xb);if(_0x4c5394===_0xcda6e3)break;else _0x238d95['push'](_0x238d95['shift']());}catch(_0x2ce725){_0x238d95['push'](_0x238d95['shift']());}}}(a56_0xe6fb,0xa5fd2));import{getDbLinkInfo}from'../../core/api-client.js';function a56_0x22e0(_0x5a8b8f,_0x1e6e5e){_0x5a8b8f=_0x5a8b8f-0xac;const _0xe6fb8b=a56_0xe6fb();let _0x22e0b2=_0xe6fb8b[_0x5a8b8f];return _0x22e0b2;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':a56_0x434a09(0xba),'description':'Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','risk':a56_0x434a09(0xb6),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x313850){const _0x2d1e20=a56_0x434a09,_0x473161=_0x313850[_0x2d1e20(0xaf)]('id'),_0x2f15c9=await getDbLinkInfo(_0x473161);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x2f15c9),'message':_0x2d1e20(0xb8)+_0x473161+':\x20'+_0x2f15c9[_0x2d1e20(0xb1)]};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0xae0bce=a57_0x2a86;(function(_0x15ad8a,_0x5c76cc){const _0x508622=a57_0x2a86,_0x1ab877=_0x15ad8a();while(!![]){try{const _0x1601fa=parseInt(_0x508622(0xb6))/0x1*(parseInt(_0x508622(0xab))/0x2)+parseInt(_0x508622(0xc0))/0x3*(-parseInt(_0x508622(0xbf))/0x4)+parseInt(_0x508622(0xb7))/0x5*(parseInt(_0x508622(0xc1))/0x6)+parseInt(_0x508622(0xb0))/0x7*(-parseInt(_0x508622(0xac))/0x8)+-parseInt(_0x508622(0xaf))/0x9+parseInt(_0x508622(0xbe))/0xa+-parseInt(_0x508622(0xb9))/0xb;if(_0x1601fa===_0x5c76cc)break;else _0x1ab877['push'](_0x1ab877['shift']());}catch(_0x275296){_0x1ab877['push'](_0x1ab877['shift']());}}}(a57_0x4ce7,0x948a4));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a57_0x2a86(_0x100f2d,_0x2afe8b){_0x100f2d=_0x100f2d-0xab;const _0x4ce7cb=a57_0x4ce7();let _0x2a86f0=_0x4ce7cb[_0x100f2d];return _0x2a86f0;}export const dbDiff={'service':'db','command':'diff','description':'Paged\x20diff\x20between\x20live\x20database\x20schema\x20and\x20last\x20analyzed\x20snapshot\x20(new\x20/\x20deleted\x20/\x20modified\x20tables)','risk':a57_0xae0bce(0xb8),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a57_0xae0bce(0xad),'type':a57_0xae0bce(0xc2),'description':a57_0xae0bce(0xba)},{'name':a57_0xae0bce(0xb3),'type':a57_0xae0bce(0xbc),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':'pagesize','type':'number','description':a57_0xae0bce(0xb1),'default':0x14}],async 'execute'(_0x19dee3){const _0x427126=a57_0xae0bce,_0x248e2a=_0x19dee3[_0x427126(0xbd)]('id'),_0x2eb227=_0x19dee3[_0x427126(0xbd)](_0x427126(0xb3),0x1)||0x1,_0x5e9650=_0x19dee3['num'](_0x427126(0xbb),0x14)||0x14,_0x15158f=_0x19dee3[_0x427126(0xb4)]('table')||undefined,{totalCount:_0x1d334d,tableList:_0x13d084}=await getDbTableDiff(_0x19dee3[_0x427126(0xb5)],_0x248e2a,{'pageIndex':_0x2eb227,'pageSize':_0x5e9650,'tableName':_0x15158f});return{'ok':!![],'data':{'dbLinkId':_0x248e2a,'page':_0x2eb227,'pageSize':_0x5e9650,'totalCount':_0x1d334d,'tableList':_0x13d084},'message':_0x13d084[_0x427126(0xae)]+_0x427126(0xb2)+_0x1d334d+'\x20(db\x20link\x20'+_0x248e2a+')'};}};function a57_0x4ce7(){const _0x4a1cfe=['table','length','3356730OqJeTT','7ceRMfe','Page\x20size','\x20row(s),\x20total\x20','page','str','appCode','46547pOHeqx','805CswWQR','read','6324538awoRNv','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','pagesize','number','num','10096820UvqFYk','312380Emelqe','15zvENwK','37146wqcmNI','string','16byZLTt','3455888qNMjxB'];a57_0x4ce7=function(){return _0x4a1cfe;};return a57_0x4ce7();}
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3093a9,_0x1accd4){const _0xcc2557=a58_0xbe3d,_0x5bc445=_0x3093a9();while(!![]){try{const _0x157905=-parseInt(_0xcc2557(0xe8))/0x1+-parseInt(_0xcc2557(0xeb))/0x2+parseInt(_0xcc2557(0xea))/0x3*(parseInt(_0xcc2557(0xec))/0x4)+parseInt(_0xcc2557(0xed))/0x5+parseInt(_0xcc2557(0xe5))/0x6*(parseInt(_0xcc2557(0xe7))/0x7)+parseInt(_0xcc2557(0xe9))/0x8+parseInt(_0xcc2557(0xe6))/0x9;if(_0x157905===_0x1accd4)break;else _0x5bc445['push'](_0x5bc445['shift']());}catch(_0x262603){_0x5bc445['push'](_0x5bc445['shift']());}}}(a58_0x4331,0xd614c));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';function a58_0xbe3d(_0x3d7d91,_0x3f7d99){_0x3d7d91=_0x3d7d91-0xe5;const _0x4331d2=a58_0x4331();let _0xbe3d8a=_0x4331d2[_0x3d7d91];return _0xbe3d8a;}function a58_0x4331(){const _0x103ea8=['835084KLZnvc','3750872vQqJbJ','121107AoTpRx','2940028hiGjMi','148ITuRao','3489620DkXkYJ','226434NELblB','4354191CdChZA','7SOoMCJ'];a58_0x4331=function(){return _0x103ea8;};return a58_0x4331();}import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';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
|
-
|
|
1
|
+
const a59_0x204b7c=a59_0x4f0b;(function(_0x40d385,_0x438e3a){const _0x56d57c=a59_0x4f0b,_0x431673=_0x40d385();while(!![]){try{const _0x4ae50a=-parseInt(_0x56d57c(0xad))/0x1+-parseInt(_0x56d57c(0xb0))/0x2+parseInt(_0x56d57c(0xb7))/0x3+-parseInt(_0x56d57c(0xb3))/0x4*(-parseInt(_0x56d57c(0xbf))/0x5)+parseInt(_0x56d57c(0xba))/0x6+-parseInt(_0x56d57c(0xbd))/0x7*(parseInt(_0x56d57c(0xc1))/0x8)+parseInt(_0x56d57c(0xbc))/0x9;if(_0x4ae50a===_0x438e3a)break;else _0x431673['push'](_0x431673['shift']());}catch(_0x3f7379){_0x431673['push'](_0x431673['shift']());}}}(a59_0xf148,0x445ff));function a59_0x4f0b(_0x3b5419,_0x4fccf0){_0x3b5419=_0x3b5419-0xad;const _0xf1487b=a59_0xf148();let _0x4f0b97=_0xf1487b[_0x3b5419];return _0x4f0b97;}import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a59_0xf148(){const _0x38696a=['appCode','Page\x20index\x20(1-based)','223288JdDdjs','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','\x20database\x20connection(s)','1172lCrHXN','length','Page\x20size','list','1337268GqDAyh','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','read','228786SWpaqP','Found\x20','2484765uLIOlQ','829017AYZkiq','number','3070usdvEF','num','8QVwQWi','page','429736YNvuqV'];a59_0xf148=function(){return _0x38696a;};return a59_0xf148();}import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a59_0x204b7c(0xb6),'description':a59_0x204b7c(0xb8),'risk':a59_0x204b7c(0xb9),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a59_0x204b7c(0xc2),'type':a59_0x204b7c(0xbe),'description':a59_0x204b7c(0xaf),'default':0x1},{'name':'pagesize','type':a59_0x204b7c(0xbe),'description':a59_0x204b7c(0xb5),'default':0x64}],async 'execute'(_0x19504e){const _0x291632=a59_0x204b7c,_0x3920b4=_0x19504e['num'](_0x291632(0xc2),0x1)||0x1,_0x43f681=_0x19504e[_0x291632(0xc0)]('pagesize',0x64)||0x64,{items:_0x3bb5f3,paging:_0x28d526}=await listDbLinks(_0x19504e[_0x291632(0xae)],{'currentPage':_0x3920b4,'pageSize':_0x43f681}),_0x2ac975=sanitizeDbLinkList(_0x3bb5f3),_0x3c96bc=_0x28d526?_0x28d526:{'currentPage':_0x3920b4,'pageSize':_0x43f681,'rowsOnPage':_0x2ac975[_0x291632(0xb4)],'totalCount':null,'note':_0x291632(0xb1)};return{'ok':!![],'data':{'connections':_0x2ac975,'paging':_0x3c96bc},'message':_0x291632(0xbb)+_0x2ac975['length']+_0x291632(0xb2)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xfde808,_0x5620ef){const _0x2e04e2=a60_0x12b8,_0x51a567=_0xfde808();while(!![]){try{const _0x8128a3=parseInt(_0x2e04e2(0x1f4))/0x1*(parseInt(_0x2e04e2(0x1ed))/0x2)+parseInt(_0x2e04e2(0x1da))/0x3+-parseInt(_0x2e04e2(0x1ee))/0x4*(parseInt(_0x2e04e2(0x1dc))/0x5)+parseInt(_0x2e04e2(0x1f1))/0x6*(-parseInt(_0x2e04e2(0x1e5))/0x7)+parseInt(_0x2e04e2(0x1ec))/0x8*(-parseInt(_0x2e04e2(0x1e2))/0x9)+-parseInt(_0x2e04e2(0x1ea))/0xa*(parseInt(_0x2e04e2(0x1e7))/0xb)+-parseInt(_0x2e04e2(0x1ef))/0xc*(-parseInt(_0x2e04e2(0x1d9))/0xd);if(_0x8128a3===_0x5620ef)break;else _0x51a567['push'](_0x51a567['shift']());}catch(_0x1f5feb){_0x51a567['push'](_0x51a567['shift']());}}}(a60_0x4056,0x6b7ed));function shouldRedactKey(_0x4119c1){const _0x497df2=a60_0x12b8,_0x1d3085=_0x4119c1['toLowerCase']();if(_0x1d3085===_0x497df2(0x1f3)||_0x1d3085===_0x497df2(0x1d8)||_0x1d3085==='dbpassword')return!![];if(_0x1d3085[_0x497df2(0x1e6)](_0x497df2(0x1eb))||_0x1d3085[_0x497df2(0x1e6)](_0x497df2(0x1e4))||_0x1d3085[_0x497df2(0x1e6)](_0x497df2(0x1f0)))return!![];if(_0x1d3085[_0x497df2(0x1e6)](_0x497df2(0x1df))||_0x1d3085[_0x497df2(0x1e6)]('accesskey'))return!![];if(_0x1d3085===_0x497df2(0x1f2)||_0x1d3085===_0x497df2(0x1db)||_0x1d3085===_0x497df2(0x1e3))return!![];return![];}export function sanitizeDbLinkForOutput(_0x101cf4){const _0x4f3004=a60_0x12b8,_0x42c29e={..._0x101cf4};for(const _0x2a55c7 of Object[_0x4f3004(0x1e0)](_0x42c29e)){if(!shouldRedactKey(_0x2a55c7))continue;const _0x3ffb8f=_0x42c29e[_0x2a55c7];_0x3ffb8f!=null&&String(_0x3ffb8f)[_0x4f3004(0x1e1)]>0x0&&(_0x42c29e[_0x2a55c7]=_0x4f3004(0x1e8));}return _0x42c29e;}export function sanitizeDbLinkList(_0x2bf8ee){const _0x31f952=a60_0x12b8;return _0x2bf8ee[_0x31f952(0x1e9)](_0x55a016=>sanitizeDbLinkForOutput(_0x55a016));}function a60_0x4056(){const _0x16cc3d=['keys','length','279ReAaqj','jdbcurl','token','56QcClci','includes','8054057xJsMps','[redacted]','map','10GaLrcF','secret','3616WmOQQt','1688894sBtTHq','4760ueYvBt','1031388eZUjdD','credential','103746LqrlIF','authorization','password','1uLIFQc','passwd','130Dwalkb','444183EfyniE','connectionstring','2215ZwBuMr','test','trim','privatekey'];a60_0x4056=function(){return _0x16cc3d;};return a60_0x4056();}function a60_0x12b8(_0x187e38,_0xe8c88){_0x187e38=_0x187e38-0x1d8;const _0x40567b=a60_0x4056();let _0x12b899=_0x40567b[_0x187e38];return _0x12b899;}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x7bfbcc){const _0x6b38e6=a60_0x12b8,_0x1103ea=_0x7bfbcc[_0x6b38e6(0x1de)]();if(!_0x1103ea)return![];return DB_URL_PATTERN[_0x6b38e6(0x1dd)](_0x1103ea);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a61_0x536eec=a61_0xb29d;function a61_0xb29d(_0x49cdbd,_0x48f985){_0x49cdbd=_0x49cdbd-0x8a;const _0x238dbe=a61_0x238d();let _0xb29d01=_0x238dbe[_0x49cdbd];return _0xb29d01;}function a61_0x238d(){const _0x457751=['num','1210goSagG','read','8019636sNfUcM','4075350ntgDtQ','1341746xlibMq','392oYpVPf','1449YnxHyy','length','7087913oJdgxO','3747FfQdtG','796eIBuFC','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','appCode','\x20table(s)\x20on\x20db\x20link\x20','14300UbpFSY','tables'];a61_0x238d=function(){return _0x457751;};return a61_0x238d();}(function(_0x1b2f48,_0x1406dc){const _0x56ea94=a61_0xb29d,_0x3b1594=_0x1b2f48();while(!![]){try{const _0x52bc24=parseInt(_0x56ea94(0x96))/0x1+-parseInt(_0x56ea94(0x8b))/0x2*(parseInt(_0x56ea94(0x8a))/0x3)+-parseInt(_0x56ea94(0x8f))/0x4*(parseInt(_0x56ea94(0x92))/0x5)+parseInt(_0x56ea94(0x94))/0x6+-parseInt(_0x56ea94(0x9a))/0x7+parseInt(_0x56ea94(0x97))/0x8*(parseInt(_0x56ea94(0x98))/0x9)+parseInt(_0x56ea94(0x95))/0xa;if(_0x52bc24===_0x1406dc)break;else _0x3b1594['push'](_0x3b1594['shift']());}catch(_0x2a2b52){_0x3b1594['push'](_0x3b1594['shift']());}}}(a61_0x238d,0xaf875));import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a61_0x536eec(0x90),'description':a61_0x536eec(0x8c),'risk':a61_0x536eec(0x93),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x117f6b){const _0x58e5f9=a61_0x536eec,_0x4419e5=_0x117f6b[_0x58e5f9(0x91)]('id'),_0x25c7cb=await getDbAllTableList(_0x117f6b[_0x58e5f9(0x8d)],_0x4419e5);return{'ok':!![],'data':{'dbLinkId':_0x4419e5,'total':_0x25c7cb[_0x58e5f9(0x99)],'tables':_0x25c7cb},'message':_0x25c7cb['length']+_0x58e5f9(0x8e)+_0x4419e5};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a62_0x1c1451=a62_0x48c5;function a62_0x48c5(_0x4fe6ff,_0x582726){_0x4fe6ff=_0x4fe6ff-0x130;const _0x3a7b5d=a62_0x3a7b();let _0x48c592=_0x3a7b5d[_0x4fe6ff];return _0x48c592;}(function(_0x164cfe,_0x32a786){const _0xa017cf=a62_0x48c5,_0x5a1c27=_0x164cfe();while(!![]){try{const _0xe2aeca=-parseInt(_0xa017cf(0x13a))/0x1*(-parseInt(_0xa017cf(0x13e))/0x2)+parseInt(_0xa017cf(0x131))/0x3+parseInt(_0xa017cf(0x139))/0x4*(parseInt(_0xa017cf(0x142))/0x5)+-parseInt(_0xa017cf(0x138))/0x6*(-parseInt(_0xa017cf(0x135))/0x7)+parseInt(_0xa017cf(0x134))/0x8+parseInt(_0xa017cf(0x136))/0x9+-parseInt(_0xa017cf(0x130))/0xa;if(_0xe2aeca===_0x32a786)break;else _0x5a1c27['push'](_0x5a1c27['shift']());}catch(_0x2076ab){_0x5a1c27['push'](_0x5a1c27['shift']());}}}(a62_0x3a7b,0xe0d9e));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x1baed9){const _0x259b22=a62_0x48c5;if(_0x1baed9===!![]||_0x1baed9===![])return{'success':_0x1baed9};if(_0x1baed9===null||_0x1baed9===undefined)return{'type':typeof _0x1baed9};if(typeof _0x1baed9!==_0x259b22(0x146))return{'type':typeof _0x1baed9};const _0x36f514=_0x1baed9,_0x5d6533=[_0x259b22(0x144),'message',_0x259b22(0x13c),_0x259b22(0x13b),'msg',_0x259b22(0x133)],_0x2e6dbd={};for(const _0x4c91ff of _0x5d6533){if(_0x4c91ff in _0x36f514)_0x2e6dbd[_0x4c91ff]=_0x36f514[_0x4c91ff];}return Object[_0x259b22(0x143)](_0x2e6dbd)['length']===0x0&&(_0x2e6dbd[_0x259b22(0x143)]=Object['keys'](_0x36f514)[_0x259b22(0x13d)](0x0,0x14)),_0x2e6dbd;}export const dbTest={'service':'db','command':a62_0x1c1451(0x137),'description':a62_0x1c1451(0x145),'risk':a62_0x1c1451(0x132),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1e465c){const _0x51e2e8=a62_0x1c1451,_0x156d6d=_0x1e465c[_0x51e2e8(0x140)]('id'),_0x3407a2=await testDbLinkConnect(_0x156d6d),_0x55a24b=_0x3407a2===!![]||typeof _0x3407a2===_0x51e2e8(0x146)&&_0x3407a2!==null&&_0x3407a2[_0x51e2e8(0x144)]===!![],_0x3397c2=summarizeTestConnectResult(_0x3407a2);return{'ok':!![],'data':{'id':_0x156d6d,'connected':Boolean(_0x55a24b),'result':_0x3397c2},'message':_0x55a24b?_0x51e2e8(0x13f)+_0x156d6d:_0x51e2e8(0x141)+_0x156d6d+'\x20(see\x20data.result)'};}};function a62_0x3a7b(){const _0x210222=['53606NirmFl','Connection\x20OK\x20for\x20db\x20link\x20','num','Connection\x20check\x20finished\x20for\x20db\x20link\x20','5okEdRl','keys','success','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','object','46868900yZbNoh','3901032ygJbCZ','read','data','7791512VMhwli','8647891JlUGEg','2847375pJFkCo','test','6OMDmKf','2731544dlvOtD','41FaHjEW','error','code','slice'];a62_0x3a7b=function(){return _0x210222;};return a62_0x3a7b();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a63_0x464e(){const _0x59f047=['str','validation','580341YSkpZd','14518TkjvKb','6470525lIMIzc','username','string','/smartapi/dblink/update','dbparam','10NEOoAo','dbParam','4797256MccTzZ','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','num','dburl','New\x20host:port','24073929ZSgmad','New\x20connection\x20parameter\x20string','New\x20database\x20name','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','dbDesc','write','6171600FEYsRx','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API','2552QqLnlu','dbUrl','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','password','POST','update','dbname','New\x20username','dbdesc','trim','Updated\x20db\x20link\x20','1183385DqLgoF'];a63_0x464e=function(){return _0x59f047;};return a63_0x464e();}const a63_0x34af90=a63_0x1987;(function(_0x409d20,_0x5f7b97){const _0xb54a76=a63_0x1987,_0x460e82=_0x409d20();while(!![]){try{const _0x4531e0=-parseInt(_0xb54a76(0xc7))/0x1+parseInt(_0xb54a76(0xad))/0x2*(-parseInt(_0xb54a76(0xca))/0x3)+parseInt(_0xb54a76(0xaf))/0x4+-parseInt(_0xb54a76(0xcc))/0x5+parseInt(_0xb54a76(0xba))/0x6+parseInt(_0xb54a76(0xcb))/0x7*(-parseInt(_0xb54a76(0xbc))/0x8)+parseInt(_0xb54a76(0xb4))/0x9;if(_0x4531e0===_0x5f7b97)break;else _0x460e82['push'](_0x460e82['shift']());}catch(_0x29ced1){_0x460e82['push'](_0x460e82['shift']());}}}(a63_0x464e,0xc2730));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a63_0x1987(_0x3dcf00,_0xfe2d06){_0x3dcf00=_0x3dcf00-0xab;const _0x464e18=a63_0x464e();let _0x1987f7=_0x464e18[_0x3dcf00];return _0x1987f7;}import{CliErrors}from'../../errors.js';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':a63_0x34af90(0xc1),'description':a63_0x34af90(0xb0),'risk':a63_0x34af90(0xb9),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a63_0x34af90(0xc2),'type':a63_0x34af90(0xce),'description':a63_0x34af90(0xb6)},{'name':a63_0x34af90(0xb2),'type':a63_0x34af90(0xce),'description':a63_0x34af90(0xb3)},{'name':'username','type':a63_0x34af90(0xce),'description':a63_0x34af90(0xc3)},{'name':a63_0x34af90(0xbf),'type':a63_0x34af90(0xce),'description':a63_0x34af90(0xbb)},{'name':a63_0x34af90(0xac),'type':a63_0x34af90(0xce),'description':a63_0x34af90(0xb5)},{'name':a63_0x34af90(0xc4),'type':a63_0x34af90(0xce),'description':'New\x20description'}],async 'validate'(_0xc36855){const _0x40ce3b=a63_0x34af90,_0x6d0970=_0xc36855[_0x40ce3b(0xc8)]('dburl');if(_0x6d0970&&!validateDbUrl(_0x6d0970[_0x40ce3b(0xc5)]()))throw CliErrors[_0x40ce3b(0xc9)](_0x40ce3b(0xb7)+_0x6d0970+'\x22');},async 'dryRun'(_0x4631ed){const _0x1a14c6=a63_0x34af90,_0x1afd49=_0x4631ed[_0x1a14c6(0xb1)]('id'),_0x39b49a=await getDbLinkInfo(_0x1afd49),_0x2f29a0={..._0x39b49a},_0x5a2656=_0x4631ed[_0x1a14c6(0xc8)](_0x1a14c6(0xc2));if(_0x5a2656)_0x2f29a0['dbName']=_0x5a2656;const _0x2de32d=_0x4631ed[_0x1a14c6(0xc8)](_0x1a14c6(0xb2));if(_0x2de32d)_0x2f29a0[_0x1a14c6(0xbd)]=_0x2de32d[_0x1a14c6(0xc5)]();const _0x213517=_0x4631ed[_0x1a14c6(0xc8)](_0x1a14c6(0xcd));if(_0x213517)_0x2f29a0['username']=_0x213517;const _0x587e52=_0x4631ed[_0x1a14c6(0xc8)]('password');if(_0x587e52)_0x2f29a0['password']=_0x587e52;const _0x443f87=_0x4631ed['str'](_0x1a14c6(0xac));if(_0x443f87)_0x2f29a0[_0x1a14c6(0xae)]=_0x443f87;const _0x17c8f4=_0x4631ed[_0x1a14c6(0xc8)](_0x1a14c6(0xc4));if(_0x17c8f4)_0x2f29a0['dbDesc']=_0x17c8f4;const _0x14be72=sanitizeDbLinkForOutput(_0x2f29a0);return{'method':_0x1a14c6(0xc0),'url':_0x1a14c6(0xab),'body':_0x14be72,'description':_0x1a14c6(0xbe)};},async 'execute'(_0x42ba13){const _0x2d13be=a63_0x34af90,_0x2320a0=_0x42ba13[_0x2d13be(0xb1)]('id'),_0x5f3253=await getDbLinkInfo(_0x2320a0),_0x408900={..._0x5f3253},_0x5a6737=_0x42ba13[_0x2d13be(0xc8)]('dbname');if(_0x5a6737)_0x408900['dbName']=_0x5a6737;const _0x4880de=_0x42ba13[_0x2d13be(0xc8)](_0x2d13be(0xb2));if(_0x4880de)_0x408900['dbUrl']=_0x4880de[_0x2d13be(0xc5)]();const _0x50de51=_0x42ba13[_0x2d13be(0xc8)](_0x2d13be(0xcd));if(_0x50de51)_0x408900[_0x2d13be(0xcd)]=_0x50de51;const _0x46e65e=_0x42ba13[_0x2d13be(0xc8)](_0x2d13be(0xbf));if(_0x46e65e)_0x408900['password']=_0x46e65e;const _0xff064b=_0x42ba13[_0x2d13be(0xc8)](_0x2d13be(0xac));if(_0xff064b)_0x408900[_0x2d13be(0xae)]=_0xff064b;const _0x317a2e=_0x42ba13[_0x2d13be(0xc8)](_0x2d13be(0xc4));if(_0x317a2e)_0x408900[_0x2d13be(0xb8)]=_0x317a2e;const {id:_0x522eac,entity:_0x12be0f}=normalizeEntityWithIdResponse(await updateDbLink(_0x408900));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x12be0f),'message':_0x2d13be(0xc6)+(_0x522eac??_0x2320a0)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a76_0x79228b=a76_0x5a35;function a76_0x5a35(_0x1a6084,_0x2ee673){_0x1a6084=_0x1a6084-0x67;const _0x3adbaf=a76_0x3adb();let _0x5a3540=_0x3adbaf[_0x1a6084];return _0x5a3540;}(function(_0x23c858,_0x4592e9){const _0x72b743=a76_0x5a35,_0x5d033b=_0x23c858();while(!![]){try{const _0x45ca53=-parseInt(_0x72b743(0xb3))/0x1+-parseInt(_0x72b743(0xb5))/0x2*(parseInt(_0x72b743(0xa1))/0x3)+parseInt(_0x72b743(0x9f))/0x4+parseInt(_0x72b743(0x7f))/0x5*(parseInt(_0x72b743(0xa2))/0x6)+-parseInt(_0x72b743(0x67))/0x7+-parseInt(_0x72b743(0x69))/0x8*(parseInt(_0x72b743(0xa8))/0x9)+-parseInt(_0x72b743(0x90))/0xa*(-parseInt(_0x72b743(0x9e))/0xb);if(_0x45ca53===_0x4592e9)break;else _0x5d033b['push'](_0x5d033b['shift']());}catch(_0x49371d){_0x5d033b['push'](_0x5d033b['shift']());}}}(a76_0x3adb,0x9524c));import a76_0x4230c2 from'chalk';function a76_0x3adb(){const _0x2ddf0d=['(none)','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','132147nAttGl','(set\x20via\x20file,\x20length=','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','green','padEnd','cookie','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','keys','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','env','✓\x20Valid\x20JSON','750045MwcFJi','gray','25734foCuTN','accessKey','status','empty','missing','check','\x20\x20─','\x20\x20\x20\x20accessKey:\x20\x20','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','1395177HzyRWr','\x20(default)','264JbepKD','\x20\x20explicitAppName:\x20','✗\x20Not\x20logged\x20in','explicitAppName','\x20doctor','✗\x20Invalid\x20JSON','(default:\x20','riskLevel','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','slice','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','appCode','red','apps','source','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','length','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','✓\x20Valid','bold','2325KkjpBf','arch','apiDir','platform','locale','pageSize','unknown','(set,\x20length=','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','(missing)','(no\x20file)','doctor','appcode','✗\x20Expired','\x20\x20Config\x20Files','40740vFeXNd','(not\x20set)','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','log','⚠\x20Empty\x20(treated\x20as\x20{})','(not\x20found)','\x20\x20API\x20Endpoints','\x20←\x20current','repeat','Global','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','value','7128wYqGIf','353012syCorI','\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','267OpaXNX','5958jbsxVM','\x20\x20Config\x20JSON','currentApp','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'];a76_0x3adb=function(){return _0x2ddf0d;};return a76_0x3adb();}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(_0x35e0d4){const _0x457c20=a76_0x5a35,_0x178f53=GIT_COMMIT!==_0x457c20(0x85)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x457c20(0x73)](0x0,0xa)+')':VERSION,_0x5a9232=buildConfigFromFlags({}),_0x2fd4a5=getCookie();console['log'](),console['log'](a76_0x4230c2[_0x457c20(0x7e)](CLI_BIN_NAME+_0x457c20(0x6d))),console[_0x457c20(0x94)](a76_0x4230c2['gray']('─'[_0x457c20(0x99)](0x32))),console[_0x457c20(0x94)](_0x457c20(0x7a)+_0x178f53),console[_0x457c20(0x94)]('\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+process['version']),console[_0x457c20(0x94)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x457c20(0x82)]+'\x20'+process[_0x457c20(0x80)]),console[_0x457c20(0x94)](),console[_0x457c20(0x94)](a76_0x4230c2[_0x457c20(0x7e)](_0x457c20(0x8f))),console['log'](a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0xbb)['repeat'](0x1e)));const _0x5ab36a=getGlobalConfigPath(),_0x17cadb=getProjectConfigPath();console[_0x457c20(0x94)](_0x457c20(0x71)+(_0x5ab36a||a76_0x4230c2[_0x457c20(0xb4)]('(not\x20found)'))),console[_0x457c20(0x94)](_0x457c20(0x92)+(_0x17cadb||a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0x96)))),console[_0x457c20(0x94)](),console['log'](a76_0x4230c2[_0x457c20(0x7e)](_0x457c20(0xa3))),console[_0x457c20(0x94)](a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0xbb)[_0x457c20(0x99)](0x1e)));const _0x404ced=(_0x535520,_0x331f47)=>{const _0x2fcfe5=_0x457c20;if(!_0x331f47){console[_0x2fcfe5(0x94)]('\x20\x20'+_0x535520[_0x2fcfe5(0xac)](0x11)+'\x20'+a76_0x4230c2[_0x2fcfe5(0xb4)](_0x2fcfe5(0x8b)));return;}const _0x2ea37c=inspectCliConfigJsonFile(_0x331f47);if(_0x2ea37c[_0x2fcfe5(0xb7)]==='ok')console[_0x2fcfe5(0x94)]('\x20\x20'+_0x535520[_0x2fcfe5(0xac)](0x11)+'\x20'+a76_0x4230c2[_0x2fcfe5(0xab)](_0x2fcfe5(0xb2)));else{if(_0x2ea37c[_0x2fcfe5(0xb7)]===_0x2fcfe5(0xb8))console['log']('\x20\x20'+_0x535520[_0x2fcfe5(0xac)](0x11)+'\x20'+a76_0x4230c2['yellow'](_0x2fcfe5(0x95)));else _0x2ea37c[_0x2fcfe5(0xb7)]===_0x2fcfe5(0xb9)?console[_0x2fcfe5(0x94)]('\x20\x20'+_0x535520[_0x2fcfe5(0xac)](0x11)+'\x20'+a76_0x4230c2[_0x2fcfe5(0xb4)](_0x2fcfe5(0x8a))):(console['log']('\x20\x20'+_0x535520[_0x2fcfe5(0xac)](0x11)+'\x20'+a76_0x4230c2[_0x2fcfe5(0x76)](_0x2fcfe5(0x6e))),console[_0x2fcfe5(0x94)]('\x20\x20'+''[_0x2fcfe5(0xac)](0x11)+'\x20'+a76_0x4230c2[_0x2fcfe5(0x76)](_0x2ea37c['message'])));}};_0x404ced(_0x457c20(0x9a),_0x5ab36a),_0x404ced('Project',_0x17cadb),console[_0x457c20(0x94)](),console[_0x457c20(0x94)](a76_0x4230c2['bold']('\x20\x20Merged\x20Config')),console[_0x457c20(0x94)](a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0xbb)['repeat'](0x1e))),console[_0x457c20(0x94)](_0x457c20(0x89)+(_0x5a9232[_0x457c20(0x75)]||a76_0x4230c2[_0x457c20(0x76)](_0x457c20(0x91)))),console[_0x457c20(0x94)](_0x457c20(0xa0)+_0x5a9232[_0x457c20(0xb1)]),console[_0x457c20(0x94)](_0x457c20(0xa5)+_0x5a9232[_0x457c20(0x83)]),console[_0x457c20(0x94)]('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x5a9232[_0x457c20(0x81)]),console[_0x457c20(0x94)](_0x457c20(0x87)+(_0x5a9232[_0x457c20(0x72)]||a76_0x4230c2['gray'](_0x457c20(0xa6)))),console[_0x457c20(0x94)](_0x457c20(0xa7)+(_0x5a9232[_0x457c20(0xa4)]||a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0xa6)))),console[_0x457c20(0x94)](_0x457c20(0x6a)+(_0x5a9232[_0x457c20(0x6c)]||a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0xa6)))),console[_0x457c20(0x94)](_0x457c20(0x9c)+(_0x5a9232[_0x457c20(0x93)]||a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0x6f)+DEFAULT_CONFIG_VALUES[_0x457c20(0x93)]+')'))),console[_0x457c20(0x94)](_0x457c20(0x79)+(_0x5a9232[_0x457c20(0x84)]??a76_0x4230c2['gray']('(default)'))),console[_0x457c20(0x94)](_0x457c20(0xae)+_0x5a9232[_0x457c20(0x70)]),console['log'](_0x457c20(0xb0)+_0x5a9232['verbose']),console[_0x457c20(0x94)](_0x457c20(0xaa)+(_0x5a9232['cookie']?a76_0x4230c2[_0x457c20(0xab)]('(set,\x20length='+_0x5a9232[_0x457c20(0xad)]['length']+')'):_0x2fd4a5?a76_0x4230c2[_0x457c20(0xab)](_0x457c20(0xa9)+_0x2fd4a5[_0x457c20(0x7b)]+')'):a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0xa6))));const _0x5e0fa9=Object[_0x457c20(0xaf)](_0x5a9232['apps']);if(_0x5e0fa9[_0x457c20(0x7b)]>0x0){console[_0x457c20(0x94)](),console[_0x457c20(0x94)](a76_0x4230c2[_0x457c20(0x7e)]('\x20\x20Apps')),console['log'](a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0xbb)['repeat'](0x1e)));for(const _0x26791b of _0x5e0fa9){const _0x1f73a1=_0x5a9232[_0x457c20(0x77)][_0x26791b],_0x222b82=_0x26791b===_0x5a9232[_0x457c20(0x72)],_0x41c23d=_0x26791b===_0x5a9232[_0x457c20(0xa4)],_0x482972=_0x41c23d?a76_0x4230c2[_0x457c20(0xab)](_0x457c20(0x98)):'',_0x188f3b=_0x222b82?_0x457c20(0x68):'';console[_0x457c20(0x94)]('\x20\x20'+_0x26791b+_0x188f3b+_0x482972),console['log'](_0x457c20(0xbd)+_0x1f73a1[_0x457c20(0x8d)]);const _0x34d5ce=buildAppDoctorFields(_0x1f73a1,{'env':_0x5a9232[_0x457c20(0xb1)],'apiDir':_0x5a9232['raw'][_0x457c20(0x81)]||DEFAULT_CONFIG_VALUES[_0x457c20(0x81)],'cookie':_0x5a9232['cookie']||_0x2fd4a5||undefined,'accessKey':_0x5a9232[_0x457c20(0xb6)]});console[_0x457c20(0x94)]('\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20'+_0x34d5ce[_0x457c20(0xb1)][_0x457c20(0x9d)]+'\x20\x20'+a76_0x4230c2[_0x457c20(0xb4)]('('+_0x34d5ce[_0x457c20(0xb1)]['source']+')')),console[_0x457c20(0x94)](_0x457c20(0x9b)+_0x34d5ce[_0x457c20(0x81)][_0x457c20(0x9d)]+'\x20\x20'+a76_0x4230c2[_0x457c20(0xb4)]('('+_0x34d5ce[_0x457c20(0x81)]['source']+')'));const _0x1dd604=_0x34d5ce[_0x457c20(0xad)][_0x457c20(0x9d)]?a76_0x4230c2[_0x457c20(0xab)](_0x457c20(0x86)+_0x34d5ce[_0x457c20(0xad)][_0x457c20(0x9d)][_0x457c20(0x7b)]+')'):a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0xa6));console['log'](_0x457c20(0x74)+_0x1dd604+'\x20\x20'+a76_0x4230c2['gray']('('+_0x34d5ce[_0x457c20(0xad)][_0x457c20(0x78)]+')'));const _0x31ccce=_0x34d5ce[_0x457c20(0xb6)][_0x457c20(0x9d)]?a76_0x4230c2[_0x457c20(0xab)](_0x457c20(0x86)+_0x34d5ce[_0x457c20(0xb6)][_0x457c20(0x9d)][_0x457c20(0x7b)]+')'):a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0xa6));console['log'](_0x457c20(0xbc)+_0x31ccce+'\x20\x20'+a76_0x4230c2['gray']('('+_0x34d5ce[_0x457c20(0xb6)][_0x457c20(0x78)]+')'));}}console[_0x457c20(0x94)](),console[_0x457c20(0x94)](a76_0x4230c2[_0x457c20(0x7e)](_0x457c20(0x97))),console[_0x457c20(0x94)](a76_0x4230c2[_0x457c20(0xb4)]('\x20\x20─'['repeat'](0x1e))),console['log']('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x457c20(0x94)]('\x20\x20userDomain:\x20\x20\x20\x20\x20\x20'+getUserDomain()),console[_0x457c20(0x94)]('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x457c20(0x94)](),console[_0x457c20(0x94)](a76_0x4230c2[_0x457c20(0x7e)]('\x20\x20Auth')),console[_0x457c20(0x94)](a76_0x4230c2[_0x457c20(0xb4)](_0x457c20(0xbb)['repeat'](0x1e)));if(_0x2fd4a5){const _0x2b8d5a=await getIsSessionValid();console['log'](_0x457c20(0x88)+(_0x2b8d5a?a76_0x4230c2[_0x457c20(0xab)](_0x457c20(0x7d)):a76_0x4230c2[_0x457c20(0x76)](_0x457c20(0x8e))));}else console[_0x457c20(0x94)](_0x457c20(0x88)+a76_0x4230c2[_0x457c20(0x76)](_0x457c20(0x6b)));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a76_0x79228b(0x8c),'command':a76_0x79228b(0xba),'description':a76_0x79228b(0x7c),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a64_0x2a558f=a64_0x5779;(function(_0x340773,_0x10a9da){const _0x66c10c=a64_0x5779,_0x4c3509=_0x340773();while(!![]){try{const _0x501921=-parseInt(_0x66c10c(0x1f4))/0x1+-parseInt(_0x66c10c(0x1d5))/0x2+parseInt(_0x66c10c(0x1df))/0x3+-parseInt(_0x66c10c(0x1e3))/0x4+parseInt(_0x66c10c(0x203))/0x5*(parseInt(_0x66c10c(0x1fd))/0x6)+parseInt(_0x66c10c(0x1db))/0x7*(-parseInt(_0x66c10c(0x1ee))/0x8)+parseInt(_0x66c10c(0x1c1))/0x9;if(_0x501921===_0x10a9da)break;else _0x4c3509['push'](_0x4c3509['shift']());}catch(_0x366451){_0x4c3509['push'](_0x4c3509['shift']());}}}(a64_0x4f22,0x568c2));import a64_0x3b7ec6 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';function a64_0x5779(_0x22ded9,_0x550bf2){_0x22ded9=_0x22ded9-0x1bd;const _0x4f2261=a64_0x4f22();let _0x5779fa=_0x4f2261[_0x22ded9];return _0x5779fa;}import{getApiDomain,getUserDomain,getRuntimeDomain}from'../constant/domain.js';function a64_0x4f22(){const _0x49a757=['8502PexJiK','platform','gray','raw','✗\x20Invalid\x20JSON','(default:\x20','1930dLZwgE','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','(set,\x20length=','\x20doctor','\x20←\x20current','verbose','pageSize','env','yellow','accessKey','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','log','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','message','(default)','9011358GtqRzU','arch','\x20\x20explicitAppName:\x20','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','missing','doctor','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','defaultApp','explicitAppName','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20accessKey:\x20\x20','padEnd','\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20','✓\x20Valid','bold','✗\x20Expired','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','apps','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','591024MJFypb','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','source','\x20\x20Auth','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','108311cqwnQO','value','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','currentApp','423177iSuyey','\x20\x20Merged\x20Config','Project','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','154100QWDtLe','repeat','green','(missing)','⚠\x20Empty\x20(treated\x20as\x20{})','(none)','length','\x20(default)','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','apiDir','\x20\x20runtimeDomain:\x20\x20\x20','296jXteNZ','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','Global','read','cookie','red','428247HlmagU','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','slice','status','\x20\x20Apps','(not\x20set)','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20─','appcode'];a64_0x4f22=function(){return _0x49a757;};return a64_0x4f22();}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(_0x5bc28f){const _0x59e5f8=a64_0x5779,_0x2badba=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x59e5f8(0x1f6)](0x0,0xa)+')':VERSION,_0x578354=buildConfigFromFlags({}),_0x1ff2f1=getCookie();console[_0x59e5f8(0x1bd)](),console['log'](a64_0x3b7ec6[_0x59e5f8(0x1d0)](CLI_BIN_NAME+_0x59e5f8(0x206))),console[_0x59e5f8(0x1bd)](a64_0x3b7ec6[_0x59e5f8(0x1ff)]('─'[_0x59e5f8(0x1e4)](0x32))),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1d2)+_0x2badba),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1fa)+process['version']),console['log'](_0x59e5f8(0x1ce)+process[_0x59e5f8(0x1fe)]+'\x20'+process[_0x59e5f8(0x1c2)]),console[_0x59e5f8(0x1bd)](),console['log'](a64_0x3b7ec6['bold']('\x20\x20Config\x20Files')),console[_0x59e5f8(0x1bd)](a64_0x3b7ec6[_0x59e5f8(0x1ff)](_0x59e5f8(0x1fb)[_0x59e5f8(0x1e4)](0x1e)));const _0x7fa1ee=getGlobalConfigPath(),_0x12f3aa=getProjectConfigPath();console['log'](_0x59e5f8(0x1da)+(_0x7fa1ee||a64_0x3b7ec6[_0x59e5f8(0x1ff)]('(not\x20found)'))),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1c8)+(_0x12f3aa||a64_0x3b7ec6[_0x59e5f8(0x1ff)]('(not\x20found)'))),console['log'](),console[_0x59e5f8(0x1bd)](a64_0x3b7ec6[_0x59e5f8(0x1d0)]('\x20\x20Config\x20JSON')),console[_0x59e5f8(0x1bd)](a64_0x3b7ec6['gray'](_0x59e5f8(0x1fb)[_0x59e5f8(0x1e4)](0x1e)));const _0x3bfbdb=(_0x34bf8d,_0x180da)=>{const _0x383ebf=_0x59e5f8;if(!_0x180da){console[_0x383ebf(0x1bd)]('\x20\x20'+_0x34bf8d[_0x383ebf(0x1cd)](0x11)+'\x20'+a64_0x3b7ec6[_0x383ebf(0x1ff)]('(no\x20file)'));return;}const _0x4d1e30=inspectCliConfigJsonFile(_0x180da);if(_0x4d1e30[_0x383ebf(0x1f7)]==='ok')console['log']('\x20\x20'+_0x34bf8d['padEnd'](0x11)+'\x20'+a64_0x3b7ec6[_0x383ebf(0x1e5)]('✓\x20Valid\x20JSON'));else{if(_0x4d1e30['status']==='empty')console[_0x383ebf(0x1bd)]('\x20\x20'+_0x34bf8d[_0x383ebf(0x1cd)](0x11)+'\x20'+a64_0x3b7ec6[_0x383ebf(0x20b)](_0x383ebf(0x1e7)));else _0x4d1e30[_0x383ebf(0x1f7)]===_0x383ebf(0x1c6)?console[_0x383ebf(0x1bd)]('\x20\x20'+_0x34bf8d[_0x383ebf(0x1cd)](0x11)+'\x20'+a64_0x3b7ec6[_0x383ebf(0x1ff)](_0x383ebf(0x1e6))):(console[_0x383ebf(0x1bd)]('\x20\x20'+_0x34bf8d[_0x383ebf(0x1cd)](0x11)+'\x20'+a64_0x3b7ec6[_0x383ebf(0x1f3)](_0x383ebf(0x201))),console['log']('\x20\x20'+''['padEnd'](0x11)+'\x20'+a64_0x3b7ec6[_0x383ebf(0x1f3)](_0x4d1e30[_0x383ebf(0x1bf)])));}};_0x3bfbdb(_0x59e5f8(0x1f0),_0x7fa1ee),_0x3bfbdb(_0x59e5f8(0x1e1),_0x12f3aa),console['log'](),console[_0x59e5f8(0x1bd)](a64_0x3b7ec6[_0x59e5f8(0x1d0)](_0x59e5f8(0x1e0))),console[_0x59e5f8(0x1bd)](a64_0x3b7ec6[_0x59e5f8(0x1ff)](_0x59e5f8(0x1fb)[_0x59e5f8(0x1e4)](0x1e))),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1be)+(_0x578354['appCode']||a64_0x3b7ec6[_0x59e5f8(0x1f3)](_0x59e5f8(0x1f9)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x578354[_0x59e5f8(0x20a)]),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1eb)+_0x578354['locale']),console['log']('\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x578354[_0x59e5f8(0x1ec)]),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x204)+(_0x578354['defaultApp']||a64_0x3b7ec6[_0x59e5f8(0x1ff)](_0x59e5f8(0x1e8)))),console[_0x59e5f8(0x1bd)]('\x20\x20currentApp:\x20\x20\x20\x20\x20\x20'+(_0x578354[_0x59e5f8(0x1de)]||a64_0x3b7ec6['gray']('(none)'))),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1c3)+(_0x578354[_0x59e5f8(0x1ca)]||a64_0x3b7ec6[_0x59e5f8(0x1ff)](_0x59e5f8(0x1e8)))),console[_0x59e5f8(0x1bd)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x578354[_0x59e5f8(0x1c5)]||a64_0x3b7ec6[_0x59e5f8(0x1ff)](_0x59e5f8(0x202)+DEFAULT_CONFIG_VALUES[_0x59e5f8(0x1c5)]+')'))),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1d6)+(_0x578354[_0x59e5f8(0x209)]??a64_0x3b7ec6['gray'](_0x59e5f8(0x1c0)))),console['log']('\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20'+_0x578354['riskLevel']),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1ef)+_0x578354[_0x59e5f8(0x208)]),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1c4)+(_0x578354[_0x59e5f8(0x1f2)]?a64_0x3b7ec6[_0x59e5f8(0x1e5)](_0x59e5f8(0x205)+_0x578354[_0x59e5f8(0x1f2)][_0x59e5f8(0x1e9)]+')'):_0x1ff2f1?a64_0x3b7ec6[_0x59e5f8(0x1e5)]('(set\x20via\x20file,\x20length='+_0x1ff2f1[_0x59e5f8(0x1e9)]+')'):a64_0x3b7ec6[_0x59e5f8(0x1ff)](_0x59e5f8(0x1e8))));const _0x4b6232=Object['keys'](_0x578354['apps']);if(_0x4b6232[_0x59e5f8(0x1e9)]>0x0){console['log'](),console[_0x59e5f8(0x1bd)](a64_0x3b7ec6['bold'](_0x59e5f8(0x1f8))),console[_0x59e5f8(0x1bd)](a64_0x3b7ec6[_0x59e5f8(0x1ff)](_0x59e5f8(0x1fb)[_0x59e5f8(0x1e4)](0x1e)));for(const _0x999462 of _0x4b6232){const _0x2cd1aa=_0x578354[_0x59e5f8(0x1d3)][_0x999462],_0xda58d3=_0x999462===_0x578354[_0x59e5f8(0x1c9)],_0x386d8a=_0x999462===_0x578354['currentApp'],_0x34ec4f=_0x386d8a?a64_0x3b7ec6[_0x59e5f8(0x1e5)](_0x59e5f8(0x207)):'',_0x84af11=_0xda58d3?_0x59e5f8(0x1ea):'';console[_0x59e5f8(0x1bd)]('\x20\x20'+_0x999462+_0x84af11+_0x34ec4f),console['log'](_0x59e5f8(0x20d)+_0x2cd1aa[_0x59e5f8(0x1fc)]);const _0x4bf20e=buildAppDoctorFields(_0x2cd1aa,{'env':_0x578354['env'],'apiDir':_0x578354[_0x59e5f8(0x200)][_0x59e5f8(0x1ec)]||DEFAULT_CONFIG_VALUES[_0x59e5f8(0x1ec)],'cookie':_0x578354['cookie']||_0x1ff2f1||undefined,'accessKey':_0x578354['accessKey']});console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1f5)+_0x4bf20e[_0x59e5f8(0x20a)][_0x59e5f8(0x1dc)]+'\x20\x20'+a64_0x3b7ec6[_0x59e5f8(0x1ff)]('('+_0x4bf20e[_0x59e5f8(0x20a)][_0x59e5f8(0x1d8)]+')')),console['log']('\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20'+_0x4bf20e[_0x59e5f8(0x1ec)][_0x59e5f8(0x1dc)]+'\x20\x20'+a64_0x3b7ec6[_0x59e5f8(0x1ff)]('('+_0x4bf20e['apiDir']['source']+')'));const _0xe950a9=_0x4bf20e[_0x59e5f8(0x1f2)][_0x59e5f8(0x1dc)]?a64_0x3b7ec6[_0x59e5f8(0x1e5)]('(set,\x20length='+_0x4bf20e['cookie'][_0x59e5f8(0x1dc)][_0x59e5f8(0x1e9)]+')'):a64_0x3b7ec6[_0x59e5f8(0x1ff)]('(none)');console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1d7)+_0xe950a9+'\x20\x20'+a64_0x3b7ec6[_0x59e5f8(0x1ff)]('('+_0x4bf20e[_0x59e5f8(0x1f2)][_0x59e5f8(0x1d8)]+')'));const _0x1a71f3=_0x4bf20e[_0x59e5f8(0x20c)][_0x59e5f8(0x1dc)]?a64_0x3b7ec6[_0x59e5f8(0x1e5)](_0x59e5f8(0x205)+_0x4bf20e[_0x59e5f8(0x20c)]['value'][_0x59e5f8(0x1e9)]+')'):a64_0x3b7ec6[_0x59e5f8(0x1ff)](_0x59e5f8(0x1e8));console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1cc)+_0x1a71f3+'\x20\x20'+a64_0x3b7ec6[_0x59e5f8(0x1ff)]('('+_0x4bf20e['accessKey']['source']+')'));}}console['log'](),console[_0x59e5f8(0x1bd)](a64_0x3b7ec6[_0x59e5f8(0x1d0)]('\x20\x20API\x20Endpoints')),console['log'](a64_0x3b7ec6[_0x59e5f8(0x1ff)](_0x59e5f8(0x1fb)[_0x59e5f8(0x1e4)](0x1e))),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1cb)+getApiDomain()),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1d4)+getUserDomain()),console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1ed)+getRuntimeDomain()),console[_0x59e5f8(0x1bd)](),console['log'](a64_0x3b7ec6['bold'](_0x59e5f8(0x1d9))),console[_0x59e5f8(0x1bd)](a64_0x3b7ec6[_0x59e5f8(0x1ff)]('\x20\x20─'[_0x59e5f8(0x1e4)](0x1e)));if(_0x1ff2f1){const _0x493b74=await getIsSessionValid();console[_0x59e5f8(0x1bd)](_0x59e5f8(0x1dd)+(_0x493b74?a64_0x3b7ec6[_0x59e5f8(0x1e5)](_0x59e5f8(0x1cf)):a64_0x3b7ec6[_0x59e5f8(0x1f3)](_0x59e5f8(0x1d1))));}else console['log'](_0x59e5f8(0x1dd)+a64_0x3b7ec6[_0x59e5f8(0x1f3)]('✗\x20Not\x20logged\x20in'));return console[_0x59e5f8(0x1bd)](),{'ok':!![]};}export const doctorDefinition={'service':a64_0x2a558f(0x1c7),'command':'check','description':a64_0x2a558f(0x1e2),'risk':a64_0x2a558f(0x1f1),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a65_0x1e484c=a65_0x4ba6;(function(_0x1528c3,_0x3057be){const _0x12ca0b=a65_0x4ba6,_0x31ef9b=_0x1528c3();while(!![]){try{const _0x42e633=-parseInt(_0x12ca0b(0xfc))/0x1+parseInt(_0x12ca0b(0xf7))/0x2+-parseInt(_0x12ca0b(0xf9))/0x3*(parseInt(_0x12ca0b(0xf0))/0x4)+-parseInt(_0x12ca0b(0x10b))/0x5+parseInt(_0x12ca0b(0x110))/0x6+-parseInt(_0x12ca0b(0xed))/0x7+parseInt(_0x12ca0b(0x104))/0x8;if(_0x42e633===_0x3057be)break;else _0x31ef9b['push'](_0x31ef9b['shift']());}catch(_0x57e4d9){_0x31ef9b['push'](_0x31ef9b['shift']());}}}(a65_0x238a,0x42225));import{NEW_CONFIG_NAME,LEGACY_CONFIG_NAMES,writeConfigFile,resolveWriteConfigPath}from'../../context.js';import{upgradeApp}from'../../commands/project/upgrade.js';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';function a65_0x238a(){const _0x2cebf2=['env','\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]','Write\x20to\x20global\x20config\x20instead\x20of\x20project','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','11127440LCAJqJ','appcode','boolean','production','\x20config','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','appCode','2166330AtshJk','project','validation','bool','map','1704012lbhpLg','defaultApp','yes','str','Use\x20`','\x20\x20Default:\x20','global','检测到旧配置文件,正在自动升级...\x0a','write','Usage:\x20','1990877XkJiZP','custom','log','11588oVZARR','\x20\x20Apps:\x20','join','\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.','\x20\x20Config:\x20','../../commands/project/init.js','flagMissing','240242vfoSyC','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','282EUqGQG','toLocaleString','some','534173ElNsNG','nonInteractive','Target\x20environment','string'];a65_0x238a=function(){return _0x2cebf2;};return a65_0x238a();}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(_0x2e70df){return{'appCode':_0x2e70df,'appName':_0x2e70df};}function writeInitConfig(_0x2876a7,_0x32505b,_0x27a63c){const _0x59af59=a65_0x4ba6,_0x3eb618=resolveWriteConfigPath(_0x2876a7),_0x2a6585=buildCanonicalProjectConfig({},{'appCodes':_0x32505b[_0x59af59(0x10f)](_0x5a1d6b=>_0x5a1d6b['appCode']),'env':_0x27a63c,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x59af59(0xfa)]()}});writeConfigFile(_0x3eb618,_0x2a6585);const _0x3688f2=_0x2876a7===_0x59af59(0xe9)?'global':_0x59af59(0x10c);console[_0x59af59(0xef)]('\x0a✓\x20Successfully\x20initialized\x20'+_0x3688f2+_0x59af59(0x108)),console[_0x59af59(0xef)](_0x59af59(0xf1)+_0x32505b[_0x59af59(0x10f)](_0x1d9e95=>_0x1d9e95[_0x59af59(0x10a)])[_0x59af59(0xf2)](',\x20')),console[_0x59af59(0xef)](_0x59af59(0xe8)+_0x2a6585[_0x59af59(0x111)]),console[_0x59af59(0xef)]('\x20\x20Env:\x20'+_0x2a6585[_0x59af59(0x100)]),console[_0x59af59(0xef)](_0x59af59(0xf4)+_0x3eb618);}async function runSmartInit(_0x338c46){const _0x36aebf=a65_0x4ba6,_0x55125f=process['cwd'](),_0x454c0c=_0x338c46[_0x36aebf(0x10e)](_0x36aebf(0xe9))?_0x36aebf(0xe9):'project',_0x346f4e=_0x338c46[_0x36aebf(0x113)](_0x36aebf(0x100))||_0x36aebf(0x107),_0x424ee8=_0x338c46[_0x36aebf(0x113)]('appcode')||undefined,_0x379c60=_0x338c46[_0x36aebf(0x10e)]('project');if(_0x379c60){const {initConfig:_0x564b17}=await import(_0x36aebf(0xf5));return _0x564b17({'appcode':_0x424ee8,'env':_0x346f4e,'autoYes':_0x338c46['bool']('yes')});}if(_0x454c0c===_0x36aebf(0x10c)){const _0x56cbad=existsSync(resolve(_0x55125f,NEW_CONFIG_NAME)),_0xe8f614=LEGACY_CONFIG_NAMES[_0x36aebf(0xfb)](_0x398158=>existsSync(resolve(_0x55125f,_0x398158)));if(_0xe8f614&&!_0x56cbad)return console[_0x36aebf(0xef)](_0x36aebf(0xea)),upgradeApp(_0x338c46['nonInteractive'],{'yes':_0x338c46['bool'](_0x36aebf(0x112))});if(_0x56cbad)throw CliErrors[_0x36aebf(0x10d)](_0x36aebf(0x109),_0x36aebf(0xe7)+CLI_BIN_NAME+_0x36aebf(0xf3));}if(_0x424ee8){const _0x190add=validateAppcode(_0x424ee8);if(!_0x190add['valid'])throw CliErrors[_0x36aebf(0x10d)](_0x190add['message']);writeInitConfig(_0x454c0c,[syntheticApp(_0x424ee8)],_0x346f4e);return;}if(_0x338c46[_0x36aebf(0xfd)])throw CliErrors[_0x36aebf(0xf6)](_0x36aebf(0x105),_0x36aebf(0xec)+CLI_BIN_NAME+_0x36aebf(0x101));const _0x350e8d=getCookie(),_0x39c330=await selectMultipleApps(_0x350e8d),_0x80aacb=_0x39c330===_0x36aebf(0xee)?[syntheticApp(await promptCustomAppcode())]:_0x39c330;writeInitConfig(_0x454c0c,_0x80aacb,_0x346f4e);}const initFlags=[{'name':a65_0x1e484c(0xe9),'type':'boolean','description':a65_0x1e484c(0x102),'default':![]},{'name':a65_0x1e484c(0x100),'type':a65_0x1e484c(0xff),'description':a65_0x1e484c(0xfe),'default':a65_0x1e484c(0x107),'enum':[...RABETBASE_ENV_VALUES]},{'name':a65_0x1e484c(0x105),'type':a65_0x1e484c(0xff),'description':'App\x20code\x20to\x20initialize\x20with'},{'name':a65_0x1e484c(0x10c),'type':'boolean','description':a65_0x1e484c(0xf8),'default':![]},{'name':a65_0x1e484c(0x112),'type':a65_0x1e484c(0x106),'description':'Auto-confirm\x20prompts','default':![]}];function a65_0x4ba6(_0xafab51,_0x3cca18){_0xafab51=_0xafab51-0xe7;const _0x238ab3=a65_0x238a();let _0x4ba6bb=_0x238ab3[_0xafab51];return _0x4ba6bb;}export const initDefinitions=[{'service':'init','command':'run','description':a65_0x1e484c(0x103),'risk':a65_0x1e484c(0xeb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0x2e073a){return await runSmartInit(_0x2e073a),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x530865=a66_0x33cf;(function(_0x352fc4,_0x3ee092){const _0x5e6f93=a66_0x33cf,_0x4141c2=_0x352fc4();while(!![]){try{const _0x4e5857=parseInt(_0x5e6f93(0xc0))/0x1+parseInt(_0x5e6f93(0xae))/0x2*(parseInt(_0x5e6f93(0xc3))/0x3)+-parseInt(_0x5e6f93(0xc1))/0x4+parseInt(_0x5e6f93(0xaf))/0x5*(parseInt(_0x5e6f93(0xc9))/0x6)+parseInt(_0x5e6f93(0xb9))/0x7*(parseInt(_0x5e6f93(0xad))/0x8)+parseInt(_0x5e6f93(0xb3))/0x9+-parseInt(_0x5e6f93(0xb2))/0xa*(parseInt(_0x5e6f93(0xb5))/0xb);if(_0x4e5857===_0x3ee092)break;else _0x4141c2['push'](_0x4141c2['shift']());}catch(_0x43557a){_0x4141c2['push'](_0x4141c2['shift']());}}}(a66_0xa425,0x3228b));import{logger}from'../../utils/logger.js';function printLogs(_0x1fbae1){const _0x506928=a66_0x33cf;if(_0x1fbae1[_0x506928(0xb6)]===0x0){console[_0x506928(0xc4)]('*\x20No\x20logs\x20found');return;}console['log'](_0x506928(0xb8)),_0x1fbae1['forEach']((_0x460509,_0x5018ad)=>{const _0x4e0b71=_0x506928,_0x4aefa1=new Date(_0x460509['timestamp'])[_0x4e0b71(0xbc)](_0x4e0b71(0xc6)),_0x49cd30=_0x460509[_0x4e0b71(0xc5)]===_0x4e0b71(0xc2)?'√':_0x460509[_0x4e0b71(0xc5)]==='error'?'×':_0x460509[_0x4e0b71(0xc5)]==='warn'?'!':'i';console['log'](_0x5018ad+0x1+'.\x20'+_0x49cd30+'\x20['+_0x460509[_0x4e0b71(0xb1)]+']\x20'+_0x460509[_0x4e0b71(0xaa)]),console[_0x4e0b71(0xc4)](_0x4e0b71(0xbd)+_0x4aefa1),_0x460509[_0x4e0b71(0xcb)]&&console[_0x4e0b71(0xc4)]('\x20\x20\x20Duration:\x20'+_0x460509[_0x4e0b71(0xcb)]+'ms'),_0x460509[_0x4e0b71(0xc8)]&&Object[_0x4e0b71(0xc7)](_0x460509[_0x4e0b71(0xc8)])[_0x4e0b71(0xb6)]>0x0&&console[_0x4e0b71(0xc4)]('\x20\x20\x20Details:\x20'+JSON[_0x4e0b71(0xb0)](_0x460509[_0x4e0b71(0xc8)],null,0x2)),console[_0x4e0b71(0xc4)]('');});}function a66_0x33cf(_0x1c636e,_0xf1d92e){_0x1c636e=_0x1c636e-0xaa;const _0xa425f6=a66_0xa425();let _0x33cf86=_0xa425f6[_0x1c636e];return _0x33cf86;}function a66_0xa425(){const _0x1961c3=['logs','11RklNfd','length','Clear\x20command\x20history\x20logs','*\x20Lovrabet\x20CLI\x20logs:\x0a','2407741GfmMjV','readLogs','read','toLocaleString','\x20\x20\x20Time:\x20','clearLogs','show','346550iMxigV','674928cufIxe','success','9zgfKlI','log','level','en-US','keys','details','1168326MzAoTq','write','duration','message','*\x20Logs\x20cleared','View\x20command\x20history\x20logs','8VCRbkl','110574qPIJYJ','5DMXnuY','stringify','command','9283310ONrLtf','2262771NTnnvF'];a66_0xa425=function(){return _0x1961c3;};return a66_0xa425();}export const logsDefinitions=[{'service':a66_0x530865(0xb4),'command':a66_0x530865(0xbf),'description':a66_0x530865(0xac),'risk':a66_0x530865(0xbb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x535c2b){const _0x38eec3=a66_0x530865;return printLogs(logger[_0x38eec3(0xba)]()),{'ok':!![]};}},{'service':a66_0x530865(0xb4),'command':'clear','description':a66_0x530865(0xb7),'risk':a66_0x530865(0xca),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x1f92d2){const _0x23bf6f=a66_0x530865;return logger[_0x23bf6f(0xbe)](),console[_0x23bf6f(0xc4)](_0x23bf6f(0xab)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x4bfb4a,_0x5c560e){const _0x375add=a67_0x8b38,_0x33a20e=_0x4bfb4a();while(!![]){try{const _0x32098b=-parseInt(_0x375add(0x1ba))/0x1*(parseInt(_0x375add(0x1b7))/0x2)+-parseInt(_0x375add(0x1b8))/0x3+-parseInt(_0x375add(0x1bf))/0x4+parseInt(_0x375add(0x1bb))/0x5*(parseInt(_0x375add(0x1b9))/0x6)+-parseInt(_0x375add(0x1be))/0x7+parseInt(_0x375add(0x1b6))/0x8*(parseInt(_0x375add(0x1bc))/0x9)+-parseInt(_0x375add(0x1c0))/0xa*(-parseInt(_0x375add(0x1bd))/0xb);if(_0x32098b===_0x5c560e)break;else _0x33a20e['push'](_0x33a20e['shift']());}catch(_0x1e290d){_0x33a20e['push'](_0x33a20e['shift']());}}}(a67_0x2a81,0x28555));import{menuSync}from'../../commands/menu/sync.js';import{menuUpdate}from'../../commands/menu/update.js';function a67_0x8b38(_0x5eaa70,_0x47fa0e){_0x5eaa70=_0x5eaa70-0x1b6;const _0x2a815c=a67_0x2a81();let _0x8b3801=_0x2a815c[_0x5eaa70];return _0x8b3801;}export const menuDefinitions=[menuSync,menuUpdate];function a67_0x2a81(){const _0x5d56c5=['8ilkHTZ','2ZJfyeh','943599GQKMFf','438htSFKo','255298DVQPgN','6910USIzBE','495459jnpMAC','103158SLORPk','568456tZrzFI','584804GKwfGX','860BWQBxE'];a67_0x2a81=function(){return _0x5d56c5;};return a67_0x2a81();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x29d879,_0x1cafc9){const _0x5d444f=a68_0xa7c0,_0x1157f8=_0x29d879();while(!![]){try{const _0x22a712=-parseInt(_0x5d444f(0x17e))/0x1*(parseInt(_0x5d444f(0x18d))/0x2)+-parseInt(_0x5d444f(0x17f))/0x3+parseInt(_0x5d444f(0x178))/0x4*(-parseInt(_0x5d444f(0x177))/0x5)+parseInt(_0x5d444f(0x174))/0x6+-parseInt(_0x5d444f(0x181))/0x7+parseInt(_0x5d444f(0x184))/0x8*(-parseInt(_0x5d444f(0x17a))/0x9)+parseInt(_0x5d444f(0x182))/0xa;if(_0x22a712===_0x1cafc9)break;else _0x1157f8['push'](_0x1157f8['shift']());}catch(_0x20545c){_0x1157f8['push'](_0x1157f8['shift']());}}}(a68_0x2757,0xaa7db));function strWidth(_0x165ae4){const _0x1ccd7f=a68_0xa7c0;let _0x6049c5=0x0;for(const _0x5cc3a1 of _0x165ae4){_0x6049c5+=/[\u4e00-\u9fa5]/[_0x1ccd7f(0x179)](_0x5cc3a1)?0x2:0x1;}return _0x6049c5;}function padRight(_0x3485ed,_0x348ac9){const _0x1f8230=a68_0xa7c0,_0x5cb12f=strWidth(_0x3485ed);return _0x3485ed+'\x20'[_0x1f8230(0x17d)](Math['max'](0x0,_0x348ac9-_0x5cb12f));}function a68_0xa7c0(_0x3a57e7,_0x4b546b){_0x3a57e7=_0x3a57e7-0x16f;const _0x275772=a68_0x2757();let _0xa7c0cf=_0x275772[_0x3a57e7];return _0xa7c0cf;}export function renderCompareTable(_0x2703a1,_0x4677d5={}){const _0x4f27f3=a68_0xa7c0;if(_0x2703a1['length']===0x0)return'';const _0x2a8ae0=_0x4677d5[_0x4f27f3(0x173)]??!![],_0x1b1241=Math[_0x4f27f3(0x170)](0x1e,..._0x2703a1[_0x4f27f3(0x171)](_0x25bb91=>strWidth(_0x25bb91[_0x4f27f3(0x18c)]))),_0x32d7ec=0x4,_0x3ff595=[],_0x1b6483='\x20\x20'+padRight(_0x4f27f3(0x176),_0x1b1241),_0x94d8c6=padRight(_0x4f27f3(0x18b),_0x32d7ec),_0x11c013=_0x2a8ae0?'\x20\x20'+padRight(_0x4f27f3(0x186),_0x32d7ec):'';_0x3ff595[_0x4f27f3(0x189)](_0x1b6483+'\x20\x20'+_0x94d8c6+(_0x2a8ae0?_0x11c013:'')),_0x3ff595[_0x4f27f3(0x189)]('\x20\x20'+'─'[_0x4f27f3(0x17d)](_0x1b1241)+'\x20\x20'+'─'[_0x4f27f3(0x17d)](_0x32d7ec)+(_0x2a8ae0?'\x20\x20'+'─'[_0x4f27f3(0x17d)](_0x32d7ec):''));for(const _0x409712 of _0x2703a1){const _0x276b5f=padRight(_0x409712[_0x4f27f3(0x18c)],_0x1b1241),_0x109046=_0x409712[_0x4f27f3(0x180)]?'✓':'✗',_0x34a895=padRight(_0x109046,_0x32d7ec);let _0x2a8a17='\x20\x20'+_0x276b5f+'\x20\x20'+_0x34a895;if(_0x2a8ae0){const _0x2757ff=_0x409712[_0x4f27f3(0x175)]?'✓':'✗';_0x2a8a17+='\x20\x20'+padRight(_0x2757ff,_0x32d7ec);}_0x3ff595[_0x4f27f3(0x189)](_0x2a8a17);}return _0x3ff595[_0x4f27f3(0x172)]('\x0a');}export function renderSyncSummary(_0x1fb207,_0x5f1ce7){const _0x11c5af=a68_0xa7c0;if(_0x1fb207[_0x11c5af(0x187)]===0x0)return _0x5f1ce7?_0x11c5af(0x18a):'\x20\x20No\x20pages\x20to\x20sync.';const _0x3d4d78=['\x20\x20'+_0x1fb207[_0x11c5af(0x187)]+_0x11c5af(0x17c)];for(const _0x4ecc11 of _0x1fb207){_0x3d4d78[_0x11c5af(0x189)](_0x11c5af(0x16f)+_0x4ecc11['label']+'\x20('+_0x4ecc11['path']+')');}return _0x3d4d78[_0x11c5af(0x172)]('\x0a');}function a68_0x2757(){const _0x3709b3=['test','6029109XlTjzE','(unchanged)','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','repeat','500951PttloH','3783210yohOiJ','local','3503759DdwTAV','54654160QGxZeG','\x20\x20Affected\x20menus:\x20','16KBCdQl','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','Platform','length','\x20\x20\x20\x20CSS:\x20','push','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','Local','label','4uQTUxj','\x20\x20\x20\x20•\x20','max','map','join','showOnline','962574MYoCJX','online','Menu\x20Name','77755JDeLnk','212mBnrRV'];a68_0x2757=function(){return _0x3709b3;};return a68_0x2757();}export function renderUpdateSummary(_0x2354a6,_0x22b038){const _0x49d00c=a68_0xa7c0;if(_0x2354a6[_0x49d00c(0x187)]===0x0)return'\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.';const _0x1e0b09=['\x20\x20'+_0x2354a6[_0x49d00c(0x187)]+_0x49d00c(0x185),'\x20\x20\x20\x20JS:\x20\x20'+(_0x22b038[0x0]??_0x49d00c(0x17b)),_0x49d00c(0x188)+(_0x22b038[0x1]??_0x49d00c(0x17b)),'',_0x49d00c(0x183)+_0x2354a6[_0x49d00c(0x172)](',\x20')];return _0x1e0b09[_0x49d00c(0x172)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x279591,_0x28567c){var _0x1915e4=a69_0x2036,_0x270eb7=_0x279591();while(!![]){try{var _0x1e1d65=-parseInt(_0x1915e4(0x168))/0x1+-parseInt(_0x1915e4(0x167))/0x2+parseInt(_0x1915e4(0x166))/0x3+-parseInt(_0x1915e4(0x165))/0x4+-parseInt(_0x1915e4(0x16b))/0x5+parseInt(_0x1915e4(0x16a))/0x6+parseInt(_0x1915e4(0x169))/0x7;if(_0x1e1d65===_0x28567c)break;else _0x270eb7['push'](_0x270eb7['shift']());}catch(_0x3a4567){_0x270eb7['push'](_0x270eb7['shift']());}}}(a69_0x2715,0x59a0b));export*from'../../../commands/menu/shared/types.js';function a69_0x2036(_0x2be34d,_0x596154){_0x2be34d=_0x2be34d-0x165;var _0x271518=a69_0x2715();var _0x2036bb=_0x271518[_0x2be34d];return _0x2036bb;}export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';function a69_0x2715(){var _0x14b1c2=['399542hYaYkA','572071lgtKWj','7409220cPHSYY','1256280pNMiNs','1633960WjiUex','41960lFXVdU','625197tpohLM'];a69_0x2715=function(){return _0x14b1c2;};return a69_0x2715();}export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xaf51eb,_0x8535e7){const _0x59979d=a70_0x1155,_0x12ce97=_0xaf51eb();while(!![]){try{const _0x500c9f=parseInt(_0x59979d(0x171))/0x1*(parseInt(_0x59979d(0x154))/0x2)+-parseInt(_0x59979d(0x16d))/0x3*(-parseInt(_0x59979d(0x159))/0x4)+parseInt(_0x59979d(0x151))/0x5*(-parseInt(_0x59979d(0x162))/0x6)+parseInt(_0x59979d(0x15c))/0x7+parseInt(_0x59979d(0x16b))/0x8+-parseInt(_0x59979d(0x153))/0x9*(parseInt(_0x59979d(0x163))/0xa)+-parseInt(_0x59979d(0x175))/0xb;if(_0x500c9f===_0x8535e7)break;else _0x12ce97['push'](_0x12ce97['shift']());}catch(_0x2ce72f){_0x12ce97['push'](_0x12ce97['shift']());}}}(a70_0x6a6b,0xc2f71));import a70_0x4d5ce3 from'chalk';function a70_0x6a6b(){const _0x1fa1c3=['stdin','13454451OcaGOx','3152874cPJGsi','\x20\x20✗\x20JS\x20URL\x20must\x20be\x20a\x20valid\x20https://...js\x20URL','Cancelled.','catch','\x20\x20Checking\x20CSS\x20URL\x20reachability...','16ewFyfy','JS\x20URL\x20check\x20failed','ExitPromptError','1584597JFQBEx','trim','[new]','This\x20command\x20requires\x20an\x20interactive\x20terminal.\x20','No\x20menus\x20selected.','map','1853118ozEoZj','10Cynhlu','cancelled','path','label','has','red','filter','\x20\x20Checking\x20JS\x20URL\x20reachability...','6294136vBprYI','JS\x20URL\x20checked','205053LHYPTr','CSS\x20URL\x20check\x20failed','start','succeed','1sfJJGZ','gray','error','\x20\x20Select\x20menus\x20to\x20sync\x20(space\x20to\x20toggle,\x20a=all,\x20i=invert):','2866710DWLfmX','test','CSS\x20URL\x20checked','name','fail','\x20\x20✗\x20CSS\x20URL\x20is\x20unreachable','Use\x20--yes\x20to\x20run\x20in\x20non-interactive\x20mode,\x20or\x20pipe\x20data\x20via\x20--params.','includes','5PSJqlV'];a70_0x6a6b=function(){return _0x1fa1c3;};return a70_0x6a6b();}import{checkbox,input,confirm}from'@inquirer/prompts';import a70_0x48b30d from'ora';import{isUrlReachable}from'../../../commands/menu/shared/valid-url.js';import{CliErrors}from'../../../errors.js';function onCancel(_0x4400af){const _0x167d1f=a70_0x1155;return _0x4400af[_0x167d1f(0x157)](_0x426475=>{const _0x3351d5=_0x167d1f;if(_0x426475?.[_0x3351d5(0x178)]===_0x3351d5(0x15b))throw CliErrors['cancelled']('Cancelled.');throw _0x426475;});}export function startSpinner(_0x551735){const _0x4b8485=a70_0x1155;return a70_0x48b30d({'text':_0x551735,'color':'cyan'})[_0x4b8485(0x16f)]();}export function stopSpinner(_0x167d53,_0x497001,_0x4b934d){const _0x18d03f=a70_0x1155;_0x4b934d?_0x167d53[_0x18d03f(0x170)](_0x497001):_0x167d53[_0x18d03f(0x14d)](_0x497001);}export async function askConfirm(_0x532783){return onCancel(confirm({'message':_0x532783,'theme':{'prefix':''}}));}export async function askJsUrl(_0x4a7412){const _0x2a8029=a70_0x1155;while(!![]){const _0x131217=await onCancel(input({'message':'\x20\x20JS\x20URL:','default':_0x4a7412,'theme':{'prefix':''}}));if(_0x131217['trim']()==='')throw CliErrors[_0x2a8029(0x164)](_0x2a8029(0x156));if(!/^https:\/\/.+\.js(\?.*)?$/[_0x2a8029(0x176)](_0x131217[_0x2a8029(0x15d)]())){console[_0x2a8029(0x173)](a70_0x4d5ce3['red'](_0x2a8029(0x155)));continue;}const _0x1407d1=startSpinner(_0x2a8029(0x16a));try{const _0x10c820=await isUrlReachable(_0x131217[_0x2a8029(0x15d)]());stopSpinner(_0x1407d1,_0x2a8029(0x16c),_0x10c820);if(!_0x10c820){console[_0x2a8029(0x173)](a70_0x4d5ce3[_0x2a8029(0x168)]('\x20\x20✗\x20JS\x20URL\x20is\x20unreachable'));continue;}return _0x131217[_0x2a8029(0x15d)]();}catch(_0x5880b8){stopSpinner(_0x1407d1,_0x2a8029(0x15a),![]);throw _0x5880b8;}}}export async function askCssUrl(_0x715dd9){const _0xf3af9f=a70_0x1155;while(!![]){const _0x5aebf7=await onCancel(input({'message':'\x20\x20CSS\x20URL:','default':_0x715dd9,'theme':{'prefix':''}}));if(_0x5aebf7[_0xf3af9f(0x15d)]()==='')throw CliErrors['cancelled']('Cancelled.');if(!/^https:\/\/.+\.css(\?.*)?$/[_0xf3af9f(0x176)](_0x5aebf7[_0xf3af9f(0x15d)]())){console[_0xf3af9f(0x173)](a70_0x4d5ce3['red']('\x20\x20✗\x20CSS\x20URL\x20must\x20be\x20a\x20valid\x20https://...css\x20URL'));continue;}const _0x50d45a=startSpinner(_0xf3af9f(0x158));try{const _0x42d1e1=await isUrlReachable(_0x5aebf7[_0xf3af9f(0x15d)]());stopSpinner(_0x50d45a,_0xf3af9f(0x177),_0x42d1e1);if(!_0x42d1e1){console['error'](a70_0x4d5ce3['red'](_0xf3af9f(0x14e)));continue;}return _0x5aebf7['trim']();}catch(_0x50a462){stopSpinner(_0x50d45a,_0xf3af9f(0x16e),![]);throw _0x50a462;}}}function a70_0x1155(_0x556602,_0x23ec5d){_0x556602=_0x556602-0x14d;const _0x6a6b1a=a70_0x6a6b();let _0x115586=_0x6a6b1a[_0x556602];return _0x115586;}export async function selectPages(_0x360e5b,_0x501712,_0x9656eb){const _0x4ccce3=a70_0x1155,_0x3c46b5=_0x360e5b[_0x4ccce3(0x161)](_0xd419a1=>({'name':_0xd419a1['label']+'\x20\x20'+(_0x501712[_0x4ccce3(0x167)](_0xd419a1[_0x4ccce3(0x165)])?a70_0x4d5ce3[_0x4ccce3(0x172)]('[already\x20on\x20platform]'):a70_0x4d5ce3['green'](_0x4ccce3(0x15e))),'value':_0xd419a1[_0x4ccce3(0x166)],'checked':_0x9656eb?_0x9656eb[_0x4ccce3(0x150)](_0xd419a1[_0x4ccce3(0x166)]):!_0x501712[_0x4ccce3(0x167)](_0xd419a1[_0x4ccce3(0x165)])}));if(_0x3c46b5['length']===0x0)throw new Error('No\x20local\x20pages\x20found.');const _0x390201=await onCancel(checkbox({'message':_0x4ccce3(0x174),'choices':_0x3c46b5,'loop':![],'theme':{'prefix':''}}));if(_0x390201['length']===0x0)throw new Error(_0x4ccce3(0x160));return _0x360e5b[_0x4ccce3(0x169)](_0x5a549b=>_0x390201[_0x4ccce3(0x150)](_0x5a549b[_0x4ccce3(0x166)]));}export function isInteractive(){const _0x5868e7=a70_0x1155;return process[_0x5868e7(0x152)]['isTTY']===!![];}export function requireInteractive(){const _0x536de6=a70_0x1155;if(!isInteractive())throw new Error(_0x536de6(0x15f)+_0x536de6(0x14f));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a71_0x2c0df0=a71_0x6ca5;function a71_0x29ee(){const _0xbe0b39=['path','3761752zZZrkS','endsWith','cwd','forEach','push','10YESVdK','split','match','1739022OUpZvn','utf-8','replace','18ecCQTe','5790789OVBIiB','filter','slice','index.tsx','453784pXQbMf','6nUdhoX','1142814seBzrr','.tsx','4841335SPDIDk','concat','1698172jzTiOs','join'];a71_0x29ee=function(){return _0xbe0b39;};return a71_0x29ee();}(function(_0x4eb8e3,_0x51917b){const _0x56f6a6=a71_0x6ca5,_0x109167=_0x4eb8e3();while(!![]){try{const _0xe0de2e=parseInt(_0x56f6a6(0x1b7))/0x1+parseInt(_0x56f6a6(0x1ad))/0x2+-parseInt(_0x56f6a6(0x1b0))/0x3*(parseInt(_0x56f6a6(0x1b5))/0x4)+-parseInt(_0x56f6a6(0x1b9))/0x5*(parseInt(_0x56f6a6(0x1b6))/0x6)+parseInt(_0x56f6a6(0x1bb))/0x7+-parseInt(_0x56f6a6(0x1a5))/0x8+parseInt(_0x56f6a6(0x1b1))/0x9*(parseInt(_0x56f6a6(0x1aa))/0xa);if(_0xe0de2e===_0x51917b)break;else _0x109167['push'](_0x109167['shift']());}catch(_0x5043a3){_0x109167['push'](_0x109167['shift']());}}}(a71_0x29ee,0xbe3ac));function a71_0x6ca5(_0x477fb6,_0x3dddb2){_0x477fb6=_0x477fb6-0x1a3;const _0x29ee14=a71_0x29ee();let _0x6ca5f3=_0x29ee14[_0x477fb6];return _0x6ca5f3;}import{readdirSync,statSync,readFileSync}from'fs';import{join,relative,resolve,sep}from'path';const pagesDir=resolve(process[a71_0x2c0df0(0x1a7)](),'src/pages');export function extractTitleFromComment(_0x32dd0e){const _0x7b4ed8=a71_0x2c0df0;try{const _0x51dc8b=readFileSync(_0x32dd0e,_0x7b4ed8(0x1ae)),_0x2a1e4b=_0x51dc8b[_0x7b4ed8(0x1ac)](/^\s*\/\*\*?([\s\S]*?)\*\//);if(_0x2a1e4b&&_0x2a1e4b[0x1]){const _0x52aaa8=_0x2a1e4b[0x1],_0x167edc=_0x52aaa8[_0x7b4ed8(0x1ac)](/^\s*\*?\s*title\s*:\s*(.+)/im);if(_0x167edc&&_0x167edc[0x1])return _0x167edc[0x1]['trim']();}let _0x3ee7ac=null;const _0x2304f1=_0x51dc8b[_0x7b4ed8(0x1ac)](/export\s+default\s+([A-Z][a-zA-Z0-9]*)/);_0x2304f1&&_0x2304f1[0x1]&&(_0x3ee7ac=_0x2304f1[0x1]);if(!_0x3ee7ac){const _0x17397e=_0x51dc8b['match'](/export\s+default\s+function\s+([A-Z][a-zA-Z0-9]*)/);_0x17397e&&_0x17397e[0x1]&&(_0x3ee7ac=_0x17397e[0x1]);}if(_0x3ee7ac){const _0x1a4be0=new RegExp('\x5cb'+_0x3ee7ac+'\x5c.displayName\x5cs*=\x5cs*[\x22\x27]([^\x22\x27]+)[\x22\x27]'),_0x40db30=_0x51dc8b[_0x7b4ed8(0x1ac)](_0x1a4be0);if(_0x40db30&&_0x40db30[0x1])return _0x40db30[0x1];return _0x3ee7ac;}return null;}catch(_0x5c4591){return null;}}export function getLocalPages(_0x370480=pagesDir,_0x3c9ab1=pagesDir){const _0x84501d=a71_0x2c0df0;let _0x1b1132=[];const _0x2e3a81=readdirSync(_0x370480);return _0x2e3a81[_0x84501d(0x1a8)](_0x3b2bc4=>{const _0x1852f8=_0x84501d,_0x1017b8=join(_0x370480,_0x3b2bc4),_0x3c76c3=statSync(_0x1017b8);if(_0x3c76c3&&_0x3c76c3['isDirectory']())_0x1b1132=_0x1b1132[_0x1852f8(0x1ba)](getLocalPages(_0x1017b8,_0x3c9ab1));else{if(_0x3b2bc4[_0x1852f8(0x1a6)](_0x1852f8(0x1b8))){let _0xe254a7=relative(_0x3c9ab1,_0x1017b8);_0xe254a7[_0x1852f8(0x1a6)](_0x1852f8(0x1b4))?_0xe254a7=_0xe254a7[_0x1852f8(0x1af)](/index\.tsx$/,''):_0xe254a7=_0xe254a7['replace'](/\.tsx$/,'');_0xe254a7[_0x1852f8(0x1a6)](sep)&&(_0xe254a7=_0xe254a7[_0x1852f8(0x1b3)](0x0,-0x1));const _0x945bee=_0xe254a7[_0x1852f8(0x1ab)](sep)[_0x1852f8(0x1a3)]('/'),_0x527342=extractTitleFromComment(_0x1017b8),_0x118081=_0x527342||_0x945bee;_0x1b1132[_0x1852f8(0x1a9)]({'path':_0x945bee['replaceAll']('$',':'),'label':_0x118081});}}}),_0x1b1132[_0x84501d(0x1b2)](_0x51e871=>_0x51e871[_0x84501d(0x1a4)]!=='');}
|