@lovrabet/rabetbase-cli 2.1.5 → 2.1.6-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 -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 -0
- package/lib/commands/data/getOne.js +1 -0
- package/lib/commands/data/index.js +1 -0
- package/lib/commands/data/shared.js +1 -0
- 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 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/init.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.js +1 -1
- package/lib/commands/skill/index.js +1 -1
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/save.js +1 -1
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.js +1 -1
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.js +1 -1
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/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 -0
- 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 +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a55_0x2b3390=a55_0xce43;(function(_0x2a0378,_0x167487){const _0x31ffb5=a55_0xce43,_0x154b7b=_0x2a0378();while(!![]){try{const _0x10da00=-parseInt(_0x31ffb5(0x126))/0x1+parseInt(_0x31ffb5(0x11e))/0x2*(-parseInt(_0x31ffb5(0x129))/0x3)+parseInt(_0x31ffb5(0x122))/0x4+-parseInt(_0x31ffb5(0x127))/0x5*(parseInt(_0x31ffb5(0x11f))/0x6)+-parseInt(_0x31ffb5(0x125))/0x7*(-parseInt(_0x31ffb5(0x11d))/0x8)+-parseInt(_0x31ffb5(0x130))/0x9*(-parseInt(_0x31ffb5(0x12c))/0xa)+parseInt(_0x31ffb5(0x123))/0xb*(-parseInt(_0x31ffb5(0x12d))/0xc);if(_0x10da00===_0x167487)break;else _0x154b7b['push'](_0x154b7b['shift']());}catch(_0xc84dc4){_0x154b7b['push'](_0x154b7b['shift']());}}}(a55_0x589a,0x91182));import{cancelDbAnalysis,getDbLinkInfo}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a55_0xce43(_0x41b6a2,_0x493a36){_0x41b6a2=_0x41b6a2-0x11d;const _0x589ac6=a55_0x589a();let _0xce433b=_0x589ac6[_0x41b6a2];return _0xce433b;}export const dbAnalyzeCancel={'service':'db','command':a55_0x2b3390(0x131),'description':'Cancel\x20a\x20running\x20schema\x20analysis.\x20Omit\x20--plan\x20to\x20use\x20latestAnalysisTraceId\x20from\x20the\x20link','risk':a55_0x2b3390(0x121),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a55_0x2b3390(0x128),'type':a55_0x2b3390(0x12b),'description':a55_0x2b3390(0x12e)}],async 'execute'(_0x5e73ae){const _0x42c28a=a55_0x2b3390,_0x3ff56e=_0x5e73ae['num']('id');let _0x5eb967=_0x5e73ae[_0x42c28a(0x120)](_0x42c28a(0x128))||undefined;if(!_0x5eb967){const _0x47b1f6=await getDbLinkInfo(_0x3ff56e);_0x5eb967=_0x47b1f6[_0x42c28a(0x12a)]??undefined;if(!_0x5eb967)throw CliErrors['validation'](_0x42c28a(0x12f),_0x42c28a(0x124));}return await cancelDbAnalysis(_0x5eb967),{'ok':!![],'data':{'dbLinkId':_0x3ff56e,'planId':_0x5eb967},'message':'Cancel\x20requested\x20for\x20plan\x20'+_0x5eb967};}};function a55_0x589a(){const _0x3c1ce3=['string','275320zrayNk','5532irOQfZ','Analysis\x20plan\x20/\x20trace\x20id\x20(optional\x20—\x20defaults\x20to\x20latest\x20trace\x20from\x20db\x20list/detail)','No\x20latestAnalysisTraceId\x20on\x20this\x20link.\x20Pass\x20--plan\x20<traceId>\x20from\x20db\x20list/detail.','234goqBTM','analyze-cancel','176AxCQwb','2267546BIXBnb','47688UuccCb','str','write','4677784wuUONH','6886hVhrEs','Analysis\x20may\x20already\x20be\x20finished\x20or\x20never\x20started.','307118WhcmVF','794101hXUXBk','25gVwxhr','plan','3RObVPO','latestAnalysisTraceId'];a55_0x589a=function(){return _0x3c1ce3;};return a55_0x589a();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a56_0x50a1da=a56_0x5525;function a56_0x7587(){const _0x1508d8=['tables','map','3104181FZJeGW','7892250gfAkML','261005kwEOPR','analyze-start','94332BwSUAx','string','6wxPyBn','write','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','336369OJXqKN','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','14jwWrVy','Started\x20analysis\x20for\x20db\x20link\x20','4lhKFOL','str','24KPyanQ','2525607jjUfvJ','6357153eQEFwz','12IINMYy','num'];a56_0x7587=function(){return _0x1508d8;};return a56_0x7587();}(function(_0x19e128,_0x58b3eb){const _0x5aa013=a56_0x5525,_0x31f83e=_0x19e128();while(!![]){try{const _0x5979a8=parseInt(_0x5aa013(0x152))/0x1+-parseInt(_0x5aa013(0x13e))/0x2*(-parseInt(_0x5aa013(0x14d))/0x3)+-parseInt(_0x5aa013(0x140))/0x4*(parseInt(_0x5aa013(0x14b))/0x5)+-parseInt(_0x5aa013(0x14f))/0x6*(-parseInt(_0x5aa013(0x143))/0x7)+parseInt(_0x5aa013(0x142))/0x8*(parseInt(_0x5aa013(0x149))/0x9)+-parseInt(_0x5aa013(0x14a))/0xa+parseInt(_0x5aa013(0x144))/0xb*(-parseInt(_0x5aa013(0x145))/0xc);if(_0x5979a8===_0x58b3eb)break;else _0x31f83e['push'](_0x31f83e['shift']());}catch(_0x3482ab){_0x31f83e['push'](_0x31f83e['shift']());}}}(a56_0x7587,0x820b0));import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a56_0x5525(_0x55c1a2,_0x28b5bf){_0x55c1a2=_0x55c1a2-0x13d;const _0x7587d8=a56_0x7587();let _0x552530=_0x7587d8[_0x55c1a2];return _0x552530;}export const dbAnalyzeStart={'service':'db','command':a56_0x50a1da(0x14c),'description':a56_0x50a1da(0x151),'risk':a56_0x50a1da(0x150),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'tables','type':a56_0x50a1da(0x14e),'description':a56_0x50a1da(0x13d)}],async 'execute'(_0x2c2134){const _0x1bf183=a56_0x50a1da,_0x42ffbe=_0x2c2134[_0x1bf183(0x146)]('id'),_0x4667fd=_0x2c2134[_0x1bf183(0x141)](_0x1bf183(0x147)),_0xa08363=_0x4667fd?_0x4667fd['split'](',')[_0x1bf183(0x148)](_0x966869=>_0x966869['trim']())['filter'](Boolean):undefined,_0x27e5a8=await startDbAnalysis(_0x42ffbe,_0xa08363);return{'ok':!![],'data':{'dbLinkId':_0x42ffbe,'planId':_0x27e5a8,'tableNames':_0xa08363??[]},'message':_0x1bf183(0x13f)+_0x42ffbe};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a57_0x205c87=a57_0x5657;(function(_0x2729fb,_0x19fb60){const _0xe7b765=a57_0x5657,_0x14f174=_0x2729fb();while(!![]){try{const _0x1bae48=parseInt(_0xe7b765(0x1f3))/0x1+parseInt(_0xe7b765(0x1f0))/0x2+-parseInt(_0xe7b765(0x1f5))/0x3+-parseInt(_0xe7b765(0x1ea))/0x4+-parseInt(_0xe7b765(0x1ec))/0x5*(-parseInt(_0xe7b765(0x1ed))/0x6)+parseInt(_0xe7b765(0x1f1))/0x7+parseInt(_0xe7b765(0x1f2))/0x8;if(_0x1bae48===_0x19fb60)break;else _0x14f174['push'](_0x14f174['shift']());}catch(_0x4ee75a){_0x14f174['push'](_0x14f174['shift']());}}}(a57_0x2ab8,0xb2cdc));import{getDbAnalysisStatus}from'../../core/api-client.js';function a57_0x2ab8(){const _0x1293db=['7037608CzHwim','77436xAcmHv','analyze-status','3927729kMHwvH','str','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','4656172oFIfGy','read','294205pxcnOn','138uTqZnD','num','string','122994kaOSww','5835823mujFby'];a57_0x2ab8=function(){return _0x1293db;};return a57_0x2ab8();}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a57_0x5657(_0x32e008,_0x118101){_0x32e008=_0x32e008-0x1ea;const _0x2ab801=a57_0x2ab8();let _0x565707=_0x2ab801[_0x32e008];return _0x565707;}export const dbAnalyzeStatus={'service':'db','command':a57_0x205c87(0x1f4),'description':a57_0x205c87(0x1f7),'risk':a57_0x205c87(0x1eb),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':a57_0x205c87(0x1ef),'required':!![],'description':'Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)'}],async 'execute'(_0x3aa6df){const _0x457e5b=a57_0x205c87,_0x43e7f1=_0x3aa6df[_0x457e5b(0x1ee)]('id'),_0x46f5cf=_0x3aa6df[_0x457e5b(0x1f6)]('plan'),_0x26d98e=await getDbAnalysisStatus(_0x46f5cf);return{'ok':!![],'data':{'dbLinkId':_0x43e7f1,'planId':_0x46f5cf,'status':_0x26d98e},'message':'Analysis\x20status\x20for\x20'+_0x46f5cf};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a58_0x1c1e2a=a58_0x4ded;(function(_0x5a3b11,_0x4bf266){const _0x4ffdd3=a58_0x4ded,_0x24f8a4=_0x5a3b11();while(!![]){try{const _0x22e55e=-parseInt(_0x4ffdd3(0xe1))/0x1+parseInt(_0x4ffdd3(0xfb))/0x2+parseInt(_0x4ffdd3(0xd6))/0x3+parseInt(_0x4ffdd3(0xfe))/0x4*(parseInt(_0x4ffdd3(0xef))/0x5)+-parseInt(_0x4ffdd3(0xf9))/0x6*(parseInt(_0x4ffdd3(0xde))/0x7)+parseInt(_0x4ffdd3(0x101))/0x8+parseInt(_0x4ffdd3(0xe3))/0x9*(parseInt(_0x4ffdd3(0xfc))/0xa);if(_0x22e55e===_0x4bf266)break;else _0x24f8a4['push'](_0x24f8a4['shift']());}catch(_0x177c60){_0x24f8a4['push'](_0x24f8a4['shift']());}}}(a58_0xcb98,0x4b709));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';function a58_0x4ded(_0xf3bb1c,_0xca682){_0xf3bb1c=_0xf3bb1c-0xd4;const _0xcb98fa=a58_0xcb98();let _0x4dedad=_0xcb98fa[_0xf3bb1c];return _0x4dedad;}import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';function a58_0xcb98(){const _0x1014bf=['appCode','241470LrjqWp','username','751868bmqqZU','10020EhLFiO','password','132WYnZRd','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','2282896fhLsbG','Create\x20dblink','\x20and\x20started\x20analysis','POST','661686NFoitC','/smartapi/dblink/create','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','8.0','Human-readable\x20description','dbname','Database\x20password','70wAaqsJ','boolean','dburl','517720GvXAvI','write','2961youIqm','string','str','join','After\x20create,\x20start\x20schema\x20analysis\x20(same\x20as\x20workbench\x20flow)','Database\x20username','dbdesc','Created\x20db\x20link\x20','autostart',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','2675dKvYTl','trim','create','message','dbversion','dbparam','No\x20follow-up\x20analysis','dbtype','bool'];a58_0xcb98=function(){return _0x1014bf;};return a58_0xcb98();}export const dbCreate={'service':'db','command':a58_0x1c1e2a(0xf1),'description':a58_0x1c1e2a(0x100),'risk':a58_0x1c1e2a(0xe2),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a58_0x1c1e2a(0xdc),'type':a58_0x1c1e2a(0xe4),'required':!![],'description':a58_0x1c1e2a(0xed)},DB_TYPE_FLAG,{'name':a58_0x1c1e2a(0xf3),'type':'string','description':a58_0x1c1e2a(0xd8),'default':a58_0x1c1e2a(0xda)},{'name':a58_0x1c1e2a(0xe0),'type':'string','required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':'username','type':'string','required':!![],'description':a58_0x1c1e2a(0xe8)},{'name':a58_0x1c1e2a(0xfd),'type':a58_0x1c1e2a(0xe4),'required':!![],'description':a58_0x1c1e2a(0xdd)},{'name':'dbparam','type':'string','description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':a58_0x1c1e2a(0xe9),'type':a58_0x1c1e2a(0xe4),'description':a58_0x1c1e2a(0xdb)},{'name':'autostart','type':a58_0x1c1e2a(0xdf),'description':a58_0x1c1e2a(0xe7),'default':![]}],async 'validate'(_0x4dfce5){const _0x4057d4=a58_0x1c1e2a,_0x1abfa9=_0x4dfce5[_0x4057d4(0xe5)]('dburl')[_0x4057d4(0xf0)]();if(!validateDbUrl(_0x1abfa9))throw CliErrors['validation'](_0x4057d4(0xff)+_0x1abfa9+'\x22',_0x4057d4(0xd9));},async 'dryRun'(_0x251464){const _0x3a4093=a58_0x1c1e2a,_0x22a67f={'appCode':_0x251464[_0x3a4093(0xf8)],'dbName':_0x251464[_0x3a4093(0xe5)]('dbname'),'dbType':_0x251464['str'](_0x3a4093(0xf6)),'dbVersion':_0x251464[_0x3a4093(0xe5)]('dbversion')||'8.0','dbUrl':_0x251464[_0x3a4093(0xe5)]('dburl')[_0x3a4093(0xf0)](),'username':_0x251464[_0x3a4093(0xe5)](_0x3a4093(0xfa)),'password':'[redacted]',..._0x251464[_0x3a4093(0xe5)](_0x3a4093(0xf4))?{'dbParam':_0x251464[_0x3a4093(0xe5)](_0x3a4093(0xf4))}:{},..._0x251464[_0x3a4093(0xe5)]('dbdesc')?{'dbDesc':_0x251464[_0x3a4093(0xe5)](_0x3a4093(0xe9))}:{}};return{'method':_0x3a4093(0xd5),'url':_0x3a4093(0xd7),'body':_0x22a67f,'description':[_0x3a4093(0x102),_0x251464['bool'](_0x3a4093(0xeb))?_0x3a4093(0xee):_0x3a4093(0xf5)][_0x3a4093(0xe6)]('\x0a')};},async 'execute'(_0x545789){const _0x4153c9=a58_0x1c1e2a,_0x1163a5={'appCode':_0x545789[_0x4153c9(0xf8)],'dbName':_0x545789[_0x4153c9(0xe5)](_0x4153c9(0xdc)),'dbType':_0x545789[_0x4153c9(0xe5)](_0x4153c9(0xf6)),'dbVersion':_0x545789[_0x4153c9(0xe5)](_0x4153c9(0xf3))||_0x4153c9(0xda),'dbUrl':_0x545789[_0x4153c9(0xe5)]('dburl')['trim'](),'username':_0x545789[_0x4153c9(0xe5)](_0x4153c9(0xfa)),'password':_0x545789['str'](_0x4153c9(0xfd)),..._0x545789[_0x4153c9(0xe5)](_0x4153c9(0xf4))?{'dbParam':_0x545789[_0x4153c9(0xe5)](_0x4153c9(0xf4))}:{},..._0x545789[_0x4153c9(0xe5)](_0x4153c9(0xe9))?{'dbDesc':_0x545789[_0x4153c9(0xe5)]('dbdesc')}:{}},{id:_0x1fc7b2,entity:_0x62218b}=normalizeEntityWithIdResponse(await createDbLink(_0x1163a5));if(!_0x1fc7b2)return{'ok':![],'message':'Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','data':sanitizeDbLinkForOutput(_0x62218b)};let _0x5977ec,_0x25ba32;if(_0x545789[_0x4153c9(0xf7)](_0x4153c9(0xeb)))try{_0x5977ec=await startDbAnalysis(_0x1fc7b2);}catch(_0xfcf33d){_0x25ba32=_0xfcf33d instanceof Error?_0xfcf33d[_0x4153c9(0xf2)]:String(_0xfcf33d);}const _0x427929={'connection':sanitizeDbLinkForOutput(_0x62218b),..._0x5977ec?{'analysisPlanId':_0x5977ec}:{},..._0x25ba32?{'analysisStartWarning':_0x25ba32}:{}};let _0x28803c;return _0x545789[_0x4153c9(0xf7)](_0x4153c9(0xeb))?_0x25ba32?_0x28803c=_0x4153c9(0xea)+_0x1fc7b2+_0x4153c9(0xec):_0x28803c=_0x4153c9(0xea)+_0x1fc7b2+_0x4153c9(0xd4):_0x28803c=_0x4153c9(0xea)+_0x1fc7b2,{'ok':!![],'data':_0x427929,'message':_0x28803c};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a59_0x572db9=a59_0x52b8;(function(_0x3e799b,_0x4f4969){const _0x530d8c=a59_0x52b8,_0x1d186c=_0x3e799b();while(!![]){try{const _0x56d36d=parseInt(_0x530d8c(0x133))/0x1+-parseInt(_0x530d8c(0x139))/0x2*(-parseInt(_0x530d8c(0x132))/0x3)+-parseInt(_0x530d8c(0x130))/0x4*(-parseInt(_0x530d8c(0x138))/0x5)+parseInt(_0x530d8c(0x137))/0x6*(-parseInt(_0x530d8c(0x13c))/0x7)+parseInt(_0x530d8c(0x134))/0x8+-parseInt(_0x530d8c(0x13d))/0x9*(parseInt(_0x530d8c(0x131))/0xa)+-parseInt(_0x530d8c(0x135))/0xb;if(_0x56d36d===_0x4f4969)break;else _0x1d186c['push'](_0x1d186c['shift']());}catch(_0x5962e9){_0x1d186c['push'](_0x1d186c['shift']());}}}(a59_0xa717,0xdb8ad));function a59_0x52b8(_0x2fb6e8,_0x25704f){_0x2fb6e8=_0x2fb6e8-0x12e;const _0xa717f3=a59_0xa717();let _0x52b8f1=_0xa717f3[_0x2fb6e8];return _0x52b8f1;}function a59_0xa717(){const _0x5b2d01=['Delete\x20a\x20database\x20connection\x20(dblink)\x20permanently','num','112pUHBVO','10ZyIvxJ','9SXfStZ','1099222CQBiFX','2745072ZWsJCy','5690399XDrkmU','Deleted\x20db\x20link\x20','6FXaNSL','212035HVmgsb','6904AmIPrT','high-risk-write','delete','6624821FljVKK','2494359ymTiMH'];a59_0xa717=function(){return _0x5b2d01;};return a59_0xa717();}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':a59_0x572db9(0x13b),'description':a59_0x572db9(0x12e),'risk':a59_0x572db9(0x13a),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3d807e){const _0x4da392=a59_0x572db9,_0x3219b9=_0x3d807e[_0x4da392(0x12f)]('id');return await deleteDbLink(_0x3219b9),{'ok':!![],'data':{'id':_0x3219b9,'deleted':!![]},'message':_0x4da392(0x136)+_0x3219b9};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a60_0x45931f=a60_0x4f70;(function(_0x2c11e7,_0x2ff216){const _0x489967=a60_0x4f70,_0x1de749=_0x2c11e7();while(!![]){try{const _0x5ddf21=-parseInt(_0x489967(0x157))/0x1*(-parseInt(_0x489967(0x159))/0x2)+-parseInt(_0x489967(0x15e))/0x3+-parseInt(_0x489967(0x15a))/0x4+-parseInt(_0x489967(0x15b))/0x5*(-parseInt(_0x489967(0x15f))/0x6)+-parseInt(_0x489967(0x154))/0x7*(-parseInt(_0x489967(0x15c))/0x8)+-parseInt(_0x489967(0x160))/0x9+parseInt(_0x489967(0x15d))/0xa;if(_0x5ddf21===_0x2ff216)break;else _0x1de749['push'](_0x1de749['shift']());}catch(_0x5d619b){_0x1de749['push'](_0x1de749['shift']());}}}(a60_0x14a3,0xc7709));function a60_0x4f70(_0x5354a2,_0x367f65){_0x5354a2=_0x5354a2-0x154;const _0x14a3ae=a60_0x14a3();let _0x4f7082=_0x14a3ae[_0x5354a2];return _0x4f7082;}import{getDbLinkInfo}from'../../core/api-client.js';function a60_0x14a3(){const _0x34c7b8=['4815771GfHuRC','54234qkpewb','11774412tePLGV','4102zxtbyt','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','detail','1jMgMVs','num','2634314RxBkZt','5907020IErOqV','315UIlsab','7776hvrCZH','27509790eJERdU'];a60_0x14a3=function(){return _0x34c7b8;};return a60_0x14a3();}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':a60_0x45931f(0x156),'description':a60_0x45931f(0x155),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x13d89c){const _0x23e85d=a60_0x45931f,_0x27e63f=_0x13d89c[_0x23e85d(0x158)]('id'),_0x33cada=await getDbLinkInfo(_0x27e63f);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x33cada),'message':'db\x20link\x20'+_0x27e63f+':\x20'+_0x33cada['dbName']};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a61_0xa4b6db=a61_0x30d9;(function(_0x9065c3,_0x3db724){const _0x5104da=a61_0x30d9,_0x56e330=_0x9065c3();while(!![]){try{const _0x25d23a=-parseInt(_0x5104da(0x1cf))/0x1*(parseInt(_0x5104da(0x1c8))/0x2)+parseInt(_0x5104da(0x1c5))/0x3+-parseInt(_0x5104da(0x1cc))/0x4+-parseInt(_0x5104da(0x1c1))/0x5*(-parseInt(_0x5104da(0x1cb))/0x6)+-parseInt(_0x5104da(0x1d5))/0x7*(-parseInt(_0x5104da(0x1d2))/0x8)+parseInt(_0x5104da(0x1cd))/0x9*(-parseInt(_0x5104da(0x1c0))/0xa)+-parseInt(_0x5104da(0x1d7))/0xb*(-parseInt(_0x5104da(0x1c3))/0xc);if(_0x25d23a===_0x3db724)break;else _0x56e330['push'](_0x56e330['shift']());}catch(_0x994734){_0x56e330['push'](_0x56e330['shift']());}}}(a61_0x1f40,0x7583b));import{getDbTableDiff}from'../../core/api-client.js';function a61_0x1f40(){const _0x31cbad=['2187771jXMgnZ','Page\x20size','num','116GVJdme','diff','appCode','38244grzaOb','3010728NDQEgA','5679eYzNso','string','9553auJceE','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','number','5082472FtpJfk','\x20row(s),\x20total\x20','pagesize','7BEYNEl','read','3810917AnnDkL','\x20(db\x20link\x20','length','2920LzPdVK','205JlvQlj','table','12IQvujp','page'];a61_0x1f40=function(){return _0x31cbad;};return a61_0x1f40();}function a61_0x30d9(_0x36789f,_0x4412c7){_0x36789f=_0x36789f-0x1bf;const _0x1f407a=a61_0x1f40();let _0x30d9f1=_0x1f407a[_0x36789f];return _0x30d9f1;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDiff={'service':'db','command':a61_0xa4b6db(0x1c9),'description':'Paged\x20diff\x20between\x20live\x20database\x20schema\x20and\x20last\x20analyzed\x20snapshot\x20(new\x20/\x20deleted\x20/\x20modified\x20tables)','risk':a61_0xa4b6db(0x1d6),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'table','type':a61_0xa4b6db(0x1ce),'description':a61_0xa4b6db(0x1d0)},{'name':a61_0xa4b6db(0x1c4),'type':a61_0xa4b6db(0x1d1),'description':'Page\x20index\x20(1-based)','default':0x1},{'name':a61_0xa4b6db(0x1d4),'type':a61_0xa4b6db(0x1d1),'description':a61_0xa4b6db(0x1c6),'default':0x14}],async 'execute'(_0x135932){const _0x17932d=a61_0xa4b6db,_0x36bec4=_0x135932['num']('id'),_0x4f022b=_0x135932[_0x17932d(0x1c7)](_0x17932d(0x1c4),0x1)||0x1,_0x4940d3=_0x135932[_0x17932d(0x1c7)](_0x17932d(0x1d4),0x14)||0x14,_0x39cb79=_0x135932['str'](_0x17932d(0x1c2))||undefined,{totalCount:_0x26f4d2,tableList:_0x4c8a32}=await getDbTableDiff(_0x135932[_0x17932d(0x1ca)],_0x36bec4,{'pageIndex':_0x4f022b,'pageSize':_0x4940d3,'tableName':_0x39cb79});return{'ok':!![],'data':{'dbLinkId':_0x36bec4,'page':_0x4f022b,'pageSize':_0x4940d3,'totalCount':_0x26f4d2,'tableList':_0x4c8a32},'message':_0x4c8a32[_0x17932d(0x1bf)]+_0x17932d(0x1d3)+_0x26f4d2+_0x17932d(0x1d8)+_0x36bec4+')'};}};
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0xe4690b,_0x41708b){const _0x14a369=a62_0x4f71,_0x26a83f=_0xe4690b();while(!![]){try{const _0x252604=-parseInt(_0x14a369(0xed))/0x1+-parseInt(_0x14a369(0xef))/0x2+parseInt(_0x14a369(0xee))/0x3*(-parseInt(_0x14a369(0xe9))/0x4)+parseInt(_0x14a369(0xec))/0x5*(parseInt(_0x14a369(0xeb))/0x6)+parseInt(_0x14a369(0xe8))/0x7+-parseInt(_0x14a369(0xf0))/0x8*(-parseInt(_0x14a369(0xf2))/0x9)+-parseInt(_0x14a369(0xf1))/0xa*(-parseInt(_0x14a369(0xea))/0xb);if(_0x252604===_0x41708b)break;else _0x26a83f['push'](_0x26a83f['shift']());}catch(_0x38a6){_0x26a83f['push'](_0x26a83f['shift']());}}}(a62_0x21d8,0x481ef));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 a62_0x4f71(_0x1eef07,_0x53345c){_0x1eef07=_0x1eef07-0xe8;const _0x21d8d5=a62_0x21d8();let _0x4f7179=_0x21d8d5[_0x1eef07];return _0x4f7179;}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';function a62_0x21d8(){const _0x3768c8=['2284403qrbYAN','6180hiEcMY','1370CGcbDe','321059GzlJEL','3UbkHHr','451634ZIoKGD','856FvlBKI','10ZBiySf','7731TNfiWo','4132380GQDmtD','1319452xEszgE'];a62_0x21d8=function(){return _0x3768c8;};return a62_0x21d8();}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
|
+
const a63_0x27c455=a63_0x5736;(function(_0x2b3925,_0x5c9dbf){const _0x427572=a63_0x5736,_0x1b931e=_0x2b3925();while(!![]){try{const _0x47cb21=-parseInt(_0x427572(0x9e))/0x1*(parseInt(_0x427572(0xa3))/0x2)+parseInt(_0x427572(0x9c))/0x3*(parseInt(_0x427572(0x97))/0x4)+-parseInt(_0x427572(0x8e))/0x5*(parseInt(_0x427572(0x90))/0x6)+parseInt(_0x427572(0xa5))/0x7*(-parseInt(_0x427572(0x95))/0x8)+-parseInt(_0x427572(0x99))/0x9*(parseInt(_0x427572(0x9f))/0xa)+parseInt(_0x427572(0x8f))/0xb*(-parseInt(_0x427572(0xa0))/0xc)+parseInt(_0x427572(0xa4))/0xd;if(_0x47cb21===_0x5c9dbf)break;else _0x1b931e['push'](_0x1b931e['shift']());}catch(_0x18484e){_0x1b931e['push'](_0x1b931e['shift']());}}}(a63_0x3b77,0x2c9bc));function a63_0x5736(_0x505eb8,_0x50628e){_0x505eb8=_0x505eb8-0x8d;const _0x3b77ed=a63_0x3b77();let _0x573644=_0x3b77ed[_0x505eb8];return _0x573644;}import{listDbLinks}from'../../core/api-client.js';function a63_0x3b77(){const _0x55c071=['728uDoHIC','\x20database\x20connection(s)','65565oPahqD','1881soItFJ','150jkQNKA','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','Found\x20','2048oIqGlJ','length','28124tlrBRI','page','20799unhgTf','pagesize','Page\x20size','27MYzsQa','number','56VOegmK','880PMwejV','25572WDKhwa','num','appCode','4442VGkpqF','15158403iOWeqC'];a63_0x3b77=function(){return _0x55c071;};return a63_0x3b77();}import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a63_0x27c455(0x92),'description':a63_0x27c455(0x91),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a63_0x27c455(0x98),'type':'number','description':'Page\x20index\x20(1-based)','default':0x1},{'name':a63_0x27c455(0x9a),'type':a63_0x27c455(0x9d),'description':a63_0x27c455(0x9b),'default':0x64}],async 'execute'(_0x3dc485){const _0x43542d=a63_0x27c455,_0x2cfffd=_0x3dc485[_0x43542d(0xa1)](_0x43542d(0x98),0x1)||0x1,_0x33c194=_0x3dc485[_0x43542d(0xa1)]('pagesize',0x64)||0x64,{items:_0x8a52cd,paging:_0x489735}=await listDbLinks(_0x3dc485[_0x43542d(0xa2)],{'currentPage':_0x2cfffd,'pageSize':_0x33c194}),_0x833fa8=sanitizeDbLinkList(_0x8a52cd),_0x317047=_0x489735?_0x489735:{'currentPage':_0x2cfffd,'pageSize':_0x33c194,'rowsOnPage':_0x833fa8[_0x43542d(0x96)],'totalCount':null,'note':_0x43542d(0x93)};return{'ok':!![],'data':{'connections':_0x833fa8,'paging':_0x317047},'message':_0x43542d(0x94)+_0x833fa8[_0x43542d(0x96)]+_0x43542d(0x8d)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x333f38,_0x4bb6e9){const _0x2b317a=a64_0x99c7,_0x200f34=_0x333f38();while(!![]){try{const _0x986466=-parseInt(_0x2b317a(0x6a))/0x1*(parseInt(_0x2b317a(0x6b))/0x2)+-parseInt(_0x2b317a(0x70))/0x3*(-parseInt(_0x2b317a(0x6e))/0x4)+parseInt(_0x2b317a(0x76))/0x5*(-parseInt(_0x2b317a(0x80))/0x6)+-parseInt(_0x2b317a(0x7f))/0x7*(-parseInt(_0x2b317a(0x69))/0x8)+-parseInt(_0x2b317a(0x75))/0x9+-parseInt(_0x2b317a(0x67))/0xa*(-parseInt(_0x2b317a(0x7b))/0xb)+-parseInt(_0x2b317a(0x6c))/0xc;if(_0x986466===_0x4bb6e9)break;else _0x200f34['push'](_0x200f34['shift']());}catch(_0x3beb57){_0x200f34['push'](_0x200f34['shift']());}}}(a64_0xd16e,0x4fed5));function shouldRedactKey(_0x2307ac){const _0x40ed81=a64_0x99c7,_0x2c5312=_0x2307ac['toLowerCase']();if(_0x2c5312===_0x40ed81(0x68)||_0x2c5312===_0x40ed81(0x6f)||_0x2c5312==='dbpassword')return!![];if(_0x2c5312[_0x40ed81(0x78)](_0x40ed81(0x7e))||_0x2c5312[_0x40ed81(0x78)](_0x40ed81(0x79))||_0x2c5312[_0x40ed81(0x78)](_0x40ed81(0x77)))return!![];if(_0x2c5312[_0x40ed81(0x78)](_0x40ed81(0x7a))||_0x2c5312['includes'](_0x40ed81(0x7d)))return!![];if(_0x2c5312===_0x40ed81(0x7c)||_0x2c5312==='connectionstring'||_0x2c5312===_0x40ed81(0x71))return!![];return![];}function a64_0xd16e(){const _0x394f79=['includes','token','privatekey','961730XCZhhY','authorization','accesskey','secret','763ZRFBEy','50766PVortC','60FLXpLS','password','3784FbXgwl','4VhZRWo','83878QEUQQU','356496Kfroxw','length','1691596GHDuuX','passwd','3LeiORI','jdbcurl','keys','[redacted]','test','4115421SXkLZz','10ExDkRK','credential'];a64_0xd16e=function(){return _0x394f79;};return a64_0xd16e();}export function sanitizeDbLinkForOutput(_0xe275e5){const _0x261bf9=a64_0x99c7,_0xea94c9={..._0xe275e5};for(const _0x4cc871 of Object[_0x261bf9(0x72)](_0xea94c9)){if(!shouldRedactKey(_0x4cc871))continue;const _0x1a5ad1=_0xea94c9[_0x4cc871];_0x1a5ad1!=null&&String(_0x1a5ad1)[_0x261bf9(0x6d)]>0x0&&(_0xea94c9[_0x4cc871]=_0x261bf9(0x73));}return _0xea94c9;}export function sanitizeDbLinkList(_0x3dacba){return _0x3dacba['map'](_0x476219=>sanitizeDbLinkForOutput(_0x476219));}function a64_0x99c7(_0x14085d,_0x1bef14){_0x14085d=_0x14085d-0x67;const _0xd16eaf=a64_0xd16e();let _0x99c769=_0xd16eaf[_0x14085d];return _0x99c769;}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x394083){const _0x155e5f=a64_0x99c7,_0x1b9927=_0x394083['trim']();if(!_0x1b9927)return![];return DB_URL_PATTERN[_0x155e5f(0x74)](_0x1b9927);}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a65_0x35b716=a65_0xe551;(function(_0x36ce3f,_0x497986){const _0x1663ae=a65_0xe551,_0x550b20=_0x36ce3f();while(!![]){try{const _0x1cf382=parseInt(_0x1663ae(0xe6))/0x1*(-parseInt(_0x1663ae(0xe3))/0x2)+-parseInt(_0x1663ae(0xe7))/0x3*(-parseInt(_0x1663ae(0xe0))/0x4)+-parseInt(_0x1663ae(0xda))/0x5*(-parseInt(_0x1663ae(0xe9))/0x6)+-parseInt(_0x1663ae(0xe5))/0x7+-parseInt(_0x1663ae(0xe2))/0x8+-parseInt(_0x1663ae(0xe4))/0x9*(-parseInt(_0x1663ae(0xdd))/0xa)+parseInt(_0x1663ae(0xde))/0xb;if(_0x1cf382===_0x497986)break;else _0x550b20['push'](_0x550b20['shift']());}catch(_0x4d8e14){_0x550b20['push'](_0x550b20['shift']());}}}(a65_0x2e4b,0xc9477));function a65_0xe551(_0x57f1b7,_0x110d3f){_0x57f1b7=_0x57f1b7-0xda;const _0x2e4b4e=a65_0x2e4b();let _0xe5515a=_0x2e4b4e[_0x57f1b7];return _0xe5515a;}import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a65_0x2e4b(){const _0x374983=['appCode','757780abytxc','\x20table(s)\x20on\x20db\x20link\x20','1098768AHoZxQ','2NCmySf','48123ZKKFLj','2677563YvMPFu','1595756lnXYFs','6IvvXML','num','4566tsugGB','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','10465HCZUBz','read','length','1400iMMMdE','2417877KOHhrV'];a65_0x2e4b=function(){return _0x374983;};return a65_0x2e4b();}export const dbTables={'service':'db','command':'tables','description':a65_0x35b716(0xea),'risk':a65_0x35b716(0xdb),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x10dd9c){const _0x5eafa1=a65_0x35b716,_0x2b6e11=_0x10dd9c[_0x5eafa1(0xe8)]('id'),_0x217fe6=await getDbAllTableList(_0x10dd9c[_0x5eafa1(0xdf)],_0x2b6e11);return{'ok':!![],'data':{'dbLinkId':_0x2b6e11,'total':_0x217fe6[_0x5eafa1(0xdc)],'tables':_0x217fe6},'message':_0x217fe6['length']+_0x5eafa1(0xe1)+_0x2b6e11};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a66_0x36672c=a66_0x14d7;(function(_0x589a9b,_0x331aef){const _0x4d3e6f=a66_0x14d7,_0x4f1d87=_0x589a9b();while(!![]){try{const _0x12626e=-parseInt(_0x4d3e6f(0x90))/0x1*(parseInt(_0x4d3e6f(0x87))/0x2)+parseInt(_0x4d3e6f(0x95))/0x3+parseInt(_0x4d3e6f(0x85))/0x4+parseInt(_0x4d3e6f(0x8b))/0x5+parseInt(_0x4d3e6f(0x91))/0x6+-parseInt(_0x4d3e6f(0x93))/0x7*(-parseInt(_0x4d3e6f(0x8f))/0x8)+-parseInt(_0x4d3e6f(0x98))/0x9;if(_0x12626e===_0x331aef)break;else _0x4f1d87['push'](_0x4f1d87['shift']());}catch(_0x3369eb){_0x4f1d87['push'](_0x4f1d87['shift']());}}}(a66_0x185d,0xd6679));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a66_0x14d7(_0x4eee57,_0xf24cde){_0x4eee57=_0x4eee57-0x84;const _0x185dc4=a66_0x185d();let _0x14d74e=_0x185dc4[_0x4eee57];return _0x14d74e;}function summarizeTestConnectResult(_0x3601c7){const _0x214a79=a66_0x14d7;if(_0x3601c7===!![]||_0x3601c7===![])return{'success':_0x3601c7};if(_0x3601c7===null||_0x3601c7===undefined)return{'type':typeof _0x3601c7};if(typeof _0x3601c7!==_0x214a79(0x8e))return{'type':typeof _0x3601c7};const _0x3a028e=_0x3601c7,_0xecf9db=[_0x214a79(0x96),_0x214a79(0x94),_0x214a79(0x89),_0x214a79(0x8d),_0x214a79(0x86),_0x214a79(0x97)],_0x140196={};for(const _0x1b0625 of _0xecf9db){if(_0x1b0625 in _0x3a028e)_0x140196[_0x1b0625]=_0x3a028e[_0x1b0625];}return Object[_0x214a79(0x8c)](_0x140196)['length']===0x0&&(_0x140196[_0x214a79(0x8c)]=Object[_0x214a79(0x8c)](_0x3a028e)['slice'](0x0,0x14)),_0x140196;}function a66_0x185d(){const _0x33f293=['1zldltO','6596292dcfspi','test','42spNiBo','message','4965030fIvUGW','success','data','35474643VeRXgP','num','6794484SzaBkH','msg','2621958qevvmV','\x20(see\x20data.result)','code','read','3294190iecidU','keys','error','object','1358608nhMhEG'];a66_0x185d=function(){return _0x33f293;};return a66_0x185d();}export const dbTest={'service':'db','command':a66_0x36672c(0x92),'description':'Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','risk':a66_0x36672c(0x8a),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x507bbf){const _0x3331e6=a66_0x36672c,_0x4519b0=_0x507bbf[_0x3331e6(0x84)]('id'),_0x30c5b3=await testDbLinkConnect(_0x4519b0),_0x1c6037=_0x30c5b3===!![]||typeof _0x30c5b3==='object'&&_0x30c5b3!==null&&_0x30c5b3[_0x3331e6(0x96)]===!![],_0x56dfb6=summarizeTestConnectResult(_0x30c5b3);return{'ok':!![],'data':{'id':_0x4519b0,'connected':Boolean(_0x1c6037),'result':_0x56dfb6},'message':_0x1c6037?'Connection\x20OK\x20for\x20db\x20link\x20'+_0x4519b0:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x4519b0+_0x3331e6(0x88)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a67_0x113f(){const _0x5476b9=['2562024TNcEWm','1577fCjaFl','24YfhfcW','dbparam','Updated\x20db\x20link\x20','dbParam','Update\x20an\x20existing\x20database\x20connection.\x20Only\x20supplied\x20fields\x20are\x20overwritten;\x20others\x20keep\x20server\x20values','1654276gVFhbW','48CVlldM','string','dbUrl','validation','200011vyUnVl','username','update','dbdesc','dbDesc','9JAJAlX','dbname','3829859ZjIHWB','dbName','New\x20database\x20name','str','5855390OeWfQC','dburl','674fQkjcx','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','New\x20username','trim','num','/smartapi/dblink/update','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','password','118100qMiawW','6QrrCCj','New\x20password\x20(omit\x20to\x20leave\x20unchanged).\x20Empty\x20string\x20may\x20be\x20treated\x20as\x20no-op\x20or\x20rejected\x20by\x20API'];a67_0x113f=function(){return _0x5476b9;};return a67_0x113f();}function a67_0x20f7(_0x5ef803,_0x32e3a4){_0x5ef803=_0x5ef803-0x108;const _0x113f38=a67_0x113f();let _0x20f70b=_0x113f38[_0x5ef803];return _0x20f70b;}const a67_0x463e27=a67_0x20f7;(function(_0x1a9a08,_0x29cdfa){const _0x30ece9=a67_0x20f7,_0x384042=_0x1a9a08();while(!![]){try{const _0x33ac77=parseInt(_0x30ece9(0x114))/0x1*(parseInt(_0x30ece9(0x108))/0x2)+parseInt(_0x30ece9(0x111))/0x3*(parseInt(_0x30ece9(0x11a))/0x4)+parseInt(_0x30ece9(0x12a))/0x5+parseInt(_0x30ece9(0x115))/0x6*(-parseInt(_0x30ece9(0x11f))/0x7)+-parseInt(_0x30ece9(0x113))/0x8*(parseInt(_0x30ece9(0x124))/0x9)+-parseInt(_0x30ece9(0x110))/0xa+parseInt(_0x30ece9(0x126))/0xb*(-parseInt(_0x30ece9(0x11b))/0xc);if(_0x33ac77===_0x29cdfa)break;else _0x384042['push'](_0x384042['shift']());}catch(_0x34a0d4){_0x384042['push'](_0x384042['shift']());}}}(a67_0x113f,0xa89ca));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';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':a67_0x463e27(0x121),'description':a67_0x463e27(0x119),'risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a67_0x463e27(0x125),'type':a67_0x463e27(0x11c),'description':a67_0x463e27(0x128)},{'name':a67_0x463e27(0x12b),'type':'string','description':'New\x20host:port'},{'name':'username','type':'string','description':a67_0x463e27(0x10a)},{'name':a67_0x463e27(0x10f),'type':a67_0x463e27(0x11c),'description':a67_0x463e27(0x112)},{'name':a67_0x463e27(0x116),'type':'string','description':'New\x20connection\x20parameter\x20string'},{'name':'dbdesc','type':a67_0x463e27(0x11c),'description':'New\x20description'}],async 'validate'(_0x4e66c7){const _0xbb481c=a67_0x463e27,_0x54b972=_0x4e66c7[_0xbb481c(0x129)](_0xbb481c(0x12b));if(_0x54b972&&!validateDbUrl(_0x54b972[_0xbb481c(0x10b)]()))throw CliErrors[_0xbb481c(0x11e)](_0xbb481c(0x109)+_0x54b972+'\x22');},async 'dryRun'(_0x18b90e){const _0x249bfa=a67_0x463e27,_0x349aa1=_0x18b90e['num']('id'),_0x3bda54=await getDbLinkInfo(_0x349aa1),_0xc3dfce={..._0x3bda54},_0x188b1b=_0x18b90e[_0x249bfa(0x129)](_0x249bfa(0x125));if(_0x188b1b)_0xc3dfce[_0x249bfa(0x127)]=_0x188b1b;const _0x57cb1d=_0x18b90e[_0x249bfa(0x129)](_0x249bfa(0x12b));if(_0x57cb1d)_0xc3dfce[_0x249bfa(0x11d)]=_0x57cb1d['trim']();const _0x56c40f=_0x18b90e[_0x249bfa(0x129)]('username');if(_0x56c40f)_0xc3dfce[_0x249bfa(0x120)]=_0x56c40f;const _0x1e636a=_0x18b90e[_0x249bfa(0x129)](_0x249bfa(0x10f));if(_0x1e636a)_0xc3dfce[_0x249bfa(0x10f)]=_0x1e636a;const _0x121ff5=_0x18b90e['str'](_0x249bfa(0x116));if(_0x121ff5)_0xc3dfce[_0x249bfa(0x118)]=_0x121ff5;const _0x3a13cf=_0x18b90e[_0x249bfa(0x129)](_0x249bfa(0x122));if(_0x3a13cf)_0xc3dfce[_0x249bfa(0x123)]=_0x3a13cf;const _0x5f0d70=sanitizeDbLinkForOutput(_0xc3dfce);return{'method':'POST','url':_0x249bfa(0x10d),'body':_0x5f0d70,'description':_0x249bfa(0x10e)};},async 'execute'(_0x59290b){const _0xc99e6c=a67_0x463e27,_0x3c157b=_0x59290b[_0xc99e6c(0x10c)]('id'),_0x143619=await getDbLinkInfo(_0x3c157b),_0x1d9de4={..._0x143619},_0x2124c3=_0x59290b[_0xc99e6c(0x129)](_0xc99e6c(0x125));if(_0x2124c3)_0x1d9de4[_0xc99e6c(0x127)]=_0x2124c3;const _0x445e94=_0x59290b[_0xc99e6c(0x129)]('dburl');if(_0x445e94)_0x1d9de4[_0xc99e6c(0x11d)]=_0x445e94['trim']();const _0x487ae8=_0x59290b['str'](_0xc99e6c(0x120));if(_0x487ae8)_0x1d9de4[_0xc99e6c(0x120)]=_0x487ae8;const _0x5416ee=_0x59290b[_0xc99e6c(0x129)](_0xc99e6c(0x10f));if(_0x5416ee)_0x1d9de4['password']=_0x5416ee;const _0x15c2e5=_0x59290b[_0xc99e6c(0x129)](_0xc99e6c(0x116));if(_0x15c2e5)_0x1d9de4['dbParam']=_0x15c2e5;const _0xfbdae2=_0x59290b[_0xc99e6c(0x129)](_0xc99e6c(0x122));if(_0xfbdae2)_0x1d9de4[_0xc99e6c(0x123)]=_0xfbdae2;const {id:_0x193aef,entity:_0x3c331b}=normalizeEntityWithIdResponse(await updateDbLink(_0x1d9de4));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x3c331b),'message':_0xc99e6c(0x117)+(_0x193aef??_0x3c157b)};}};
|
package/lib/commands/doctor.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const a64_0x52dc65=a64_0x58c8;(function(_0x279795,_0x3f034d){const _0x1a12de=a64_0x58c8,_0xe4e5c4=_0x279795();while(!![]){try{const _0x3cc736=parseInt(_0x1a12de(0xbd))/0x1*(parseInt(_0x1a12de(0xc7))/0x2)+parseInt(_0x1a12de(0x95))/0x3*(-parseInt(_0x1a12de(0xcd))/0x4)+-parseInt(_0x1a12de(0xd2))/0x5+parseInt(_0x1a12de(0x9d))/0x6+-parseInt(_0x1a12de(0xa3))/0x7+parseInt(_0x1a12de(0x93))/0x8*(-parseInt(_0x1a12de(0xbc))/0x9)+parseInt(_0x1a12de(0xca))/0xa*(parseInt(_0x1a12de(0x96))/0xb);if(_0x3cc736===_0x3f034d)break;else _0xe4e5c4['push'](_0xe4e5c4['shift']());}catch(_0x5f4e0a){_0xe4e5c4['push'](_0xe4e5c4['shift']());}}}(a64_0x2714,0x23d1c));import a64_0x2fd7a9 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';function a64_0x2714(){const _0x5b278e=['empty','(set,\x20length=','336966NRbBCx','accessKey','repeat','log','verbose','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','673603YVuBOu','platform','(missing)','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','gray','currentApp','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','bold','✗\x20Expired','cookie','(default)','padEnd','\x20\x20Apps','✓\x20Valid\x20JSON','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','\x20\x20Auth','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','format','Global','value','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','missing','read','676359jzanqZ','1Mxaxjq','locale','riskLevel','version','Project','explicitAppName','red','\x20\x20explicitAppName:\x20','raw','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','531044NLkahd','source','apps','40NwPwbc','⚠\x20Empty\x20(treated\x20as\x20{})','apiDir','4ZHsEPF','\x20\x20Merged\x20Config','✓\x20Valid','appcode','\x20\x20API\x20Endpoints','688725QoAqDc','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','check','\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','✗\x20Invalid\x20JSON','\x20\x20Config\x20Files','keys','\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20','defaultApp','green','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20─','slice','(not\x20set)','env','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','appCode','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','✗\x20Not\x20logged\x20in','(not\x20found)','status','length','8mvHgGt','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','2874wtyBty','371569wTYdWt','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','\x20\x20runtimeDomain:\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(none)'];a64_0x2714=function(){return _0x5b278e;};return a64_0x2714();}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(_0x12a39f){const _0x52177d=a64_0x58c8,_0x4923e8=GIT_COMMIT!=='unknown'?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x52177d(0x89)](0x0,0xa)+')':VERSION,_0x403f87=buildConfigFromFlags({}),_0x504c14=getCookie();console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](CLI_BIN_NAME+'\x20doctor')),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xa7)]('─'[_0x52177d(0x9f)](0x32))),console[_0x52177d(0xa0)](_0x52177d(0x94)+_0x4923e8),console[_0x52177d(0xa0)](_0x52177d(0xb5)+process[_0x52177d(0xc0)]),console[_0x52177d(0xa0)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x52177d(0xa4)]+'\x20'+process['arch']),console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](_0x52177d(0xd8))),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x88)[_0x52177d(0x9f)](0x1e)));const _0x2bc342=getGlobalConfigPath(),_0x52b9a0=getProjectConfigPath();console['log'](_0x52177d(0x99)+(_0x2bc342||a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x90)))),console['log'](_0x52177d(0xa2)+(_0x52b9a0||a64_0x2fd7a9[_0x52177d(0xa7)]('(not\x20found)'))),console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)]('\x20\x20Config\x20JSON')),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x88)[_0x52177d(0x9f)](0x1e)));const _0x2903d6=(_0x22e25f,_0x53f6ee)=>{const _0x2afd34=_0x52177d;if(!_0x53f6ee){console['log']('\x20\x20'+_0x22e25f['padEnd'](0x11)+'\x20'+a64_0x2fd7a9[_0x2afd34(0xa7)]('(no\x20file)'));return;}const _0x58e3fe=inspectCliConfigJsonFile(_0x53f6ee);if(_0x58e3fe[_0x2afd34(0x91)]==='ok')console[_0x2afd34(0xa0)]('\x20\x20'+_0x22e25f[_0x2afd34(0xaf)](0x11)+'\x20'+a64_0x2fd7a9[_0x2afd34(0x86)](_0x2afd34(0xb1)));else{if(_0x58e3fe[_0x2afd34(0x91)]===_0x2afd34(0x9b))console['log']('\x20\x20'+_0x22e25f['padEnd'](0x11)+'\x20'+a64_0x2fd7a9['yellow'](_0x2afd34(0xcb)));else _0x58e3fe[_0x2afd34(0x91)]===_0x2afd34(0xba)?console[_0x2afd34(0xa0)]('\x20\x20'+_0x22e25f[_0x2afd34(0xaf)](0x11)+'\x20'+a64_0x2fd7a9[_0x2afd34(0xa7)](_0x2afd34(0xa5))):(console['log']('\x20\x20'+_0x22e25f[_0x2afd34(0xaf)](0x11)+'\x20'+a64_0x2fd7a9[_0x2afd34(0xc3)](_0x2afd34(0xd7))),console[_0x2afd34(0xa0)]('\x20\x20'+''['padEnd'](0x11)+'\x20'+a64_0x2fd7a9['red'](_0x58e3fe['message'])));}};_0x2903d6(_0x52177d(0xb7),_0x2bc342),_0x2903d6(_0x52177d(0xc1),_0x52b9a0),console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](_0x52177d(0xce))),console['log'](a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x88)['repeat'](0x1e))),console[_0x52177d(0xa0)](_0x52177d(0xd5)+(_0x403f87[_0x52177d(0x8d)]||a64_0x2fd7a9['red'](_0x52177d(0x8a)))),console['log']('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x403f87[_0x52177d(0x8b)]),console[_0x52177d(0xa0)](_0x52177d(0xc6)+_0x403f87[_0x52177d(0xbe)]),console[_0x52177d(0xa0)](_0x52177d(0xa9)+_0x403f87[_0x52177d(0xcc)]),console[_0x52177d(0xa0)](_0x52177d(0xda)+(_0x403f87[_0x52177d(0x85)]||a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x9a)))),console[_0x52177d(0xa0)](_0x52177d(0x8e)+(_0x403f87[_0x52177d(0xa8)]||a64_0x2fd7a9[_0x52177d(0xa7)]('(none)'))),console[_0x52177d(0xa0)](_0x52177d(0xc4)+(_0x403f87[_0x52177d(0xc2)]||a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x9a)))),console[_0x52177d(0xa0)]('\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x403f87[_0x52177d(0xb6)]||a64_0x2fd7a9[_0x52177d(0xa7)]('(default:\x20'+DEFAULT_CONFIG_VALUES[_0x52177d(0xb6)]+')'))),console['log'](_0x52177d(0xb9)+(_0x403f87['pageSize']??a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0xae)))),console['log'](_0x52177d(0xd6)+_0x403f87[_0x52177d(0xbf)]),console[_0x52177d(0xa0)]('\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x403f87[_0x52177d(0xa1)]),console['log'](_0x52177d(0xb2)+(_0x403f87[_0x52177d(0xad)]?a64_0x2fd7a9[_0x52177d(0x86)](_0x52177d(0x9c)+_0x403f87[_0x52177d(0xad)][_0x52177d(0x92)]+')'):_0x504c14?a64_0x2fd7a9[_0x52177d(0x86)]('(set\x20via\x20file,\x20length='+_0x504c14[_0x52177d(0x92)]+')'):a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x9a))));const _0x41db51=Object[_0x52177d(0xd9)](_0x403f87[_0x52177d(0xc9)]);if(_0x41db51['length']>0x0){console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](_0x52177d(0xb0))),console['log'](a64_0x2fd7a9[_0x52177d(0xa7)]('\x20\x20─'[_0x52177d(0x9f)](0x1e)));for(const _0x1cc8da of _0x41db51){const _0x4aab6d=_0x403f87[_0x52177d(0xc9)][_0x1cc8da],_0x4b6fde=_0x1cc8da===_0x403f87[_0x52177d(0x85)],_0x3921b7=_0x1cc8da===_0x403f87['currentApp'],_0xab730d=_0x3921b7?a64_0x2fd7a9[_0x52177d(0x86)]('\x20←\x20current'):'',_0x5eedf1=_0x4b6fde?'\x20(default)':'';console[_0x52177d(0xa0)]('\x20\x20'+_0x1cc8da+_0x5eedf1+_0xab730d),console[_0x52177d(0xa0)](_0x52177d(0xa6)+_0x4aab6d[_0x52177d(0xd0)]);const _0x12d89a=buildAppDoctorFields(_0x4aab6d,{'env':_0x403f87[_0x52177d(0x8b)],'apiDir':_0x403f87[_0x52177d(0xc5)]['apiDir']||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x403f87[_0x52177d(0xad)]||_0x504c14||undefined,'accessKey':_0x403f87[_0x52177d(0x9e)]});console[_0x52177d(0xa0)](_0x52177d(0x8c)+_0x12d89a[_0x52177d(0x8b)][_0x52177d(0xb8)]+'\x20\x20'+a64_0x2fd7a9[_0x52177d(0xa7)]('('+_0x12d89a[_0x52177d(0x8b)][_0x52177d(0xc8)]+')')),console[_0x52177d(0xa0)](_0x52177d(0x97)+_0x12d89a['apiDir']['value']+'\x20\x20'+a64_0x2fd7a9['gray']('('+_0x12d89a[_0x52177d(0xcc)]['source']+')'));const _0x53bee6=_0x12d89a[_0x52177d(0xad)][_0x52177d(0xb8)]?a64_0x2fd7a9[_0x52177d(0x86)](_0x52177d(0x9c)+_0x12d89a[_0x52177d(0xad)]['value'][_0x52177d(0x92)]+')'):a64_0x2fd7a9[_0x52177d(0xa7)]('(none)');console[_0x52177d(0xa0)](_0x52177d(0xb3)+_0x53bee6+'\x20\x20'+a64_0x2fd7a9[_0x52177d(0xa7)]('('+_0x12d89a['cookie']['source']+')'));const _0x431fda=_0x12d89a[_0x52177d(0x9e)]['value']?a64_0x2fd7a9['green'](_0x52177d(0x9c)+_0x12d89a[_0x52177d(0x9e)][_0x52177d(0xb8)]['length']+')'):a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x9a));console[_0x52177d(0xa0)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x431fda+'\x20\x20'+a64_0x2fd7a9[_0x52177d(0xa7)]('('+_0x12d89a['accessKey'][_0x52177d(0xc8)]+')'));}}console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](_0x52177d(0xd1))),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xa7)](_0x52177d(0x88)['repeat'](0x1e))),console[_0x52177d(0xa0)]('\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20'+getApiDomain()),console[_0x52177d(0xa0)](_0x52177d(0x87)+getUserDomain()),console[_0x52177d(0xa0)](_0x52177d(0x98)+getRuntimeDomain()),console[_0x52177d(0xa0)](),console[_0x52177d(0xa0)](a64_0x2fd7a9[_0x52177d(0xab)](_0x52177d(0xb4))),console['log'](a64_0x2fd7a9['gray']('\x20\x20─'['repeat'](0x1e)));if(_0x504c14){const _0x215d3d=await getIsSessionValid();console[_0x52177d(0xa0)](_0x52177d(0xd3)+(_0x215d3d?a64_0x2fd7a9[_0x52177d(0x86)](_0x52177d(0xcf)):a64_0x2fd7a9[_0x52177d(0xc3)](_0x52177d(0xac))));}else console[_0x52177d(0xa0)](_0x52177d(0xd3)+a64_0x2fd7a9[_0x52177d(0xc3)](_0x52177d(0x8f)));return console[_0x52177d(0xa0)](),{'ok':!![]};}function a64_0x58c8(_0x349678,_0x5f2d73){_0x349678=_0x349678-0x85;const _0x27143f=a64_0x2714();let _0x58c81d=_0x27143f[_0x349678];return _0x58c81d;}export const doctorDefinition={'service':'doctor','command':a64_0x52dc65(0xd4),'description':a64_0x52dc65(0xaa),'risk':a64_0x52dc65(0xbb),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
1
|
+
const a68_0x5c1f53=a68_0x113e;(function(_0x10d3f2,_0x2d9b3f){const _0x2b51c8=a68_0x113e,_0x4a6d05=_0x10d3f2();while(!![]){try{const _0x278909=-parseInt(_0x2b51c8(0x11d))/0x1+parseInt(_0x2b51c8(0x13c))/0x2+-parseInt(_0x2b51c8(0x117))/0x3*(parseInt(_0x2b51c8(0x104))/0x4)+parseInt(_0x2b51c8(0x102))/0x5*(-parseInt(_0x2b51c8(0x126))/0x6)+-parseInt(_0x2b51c8(0x10c))/0x7*(parseInt(_0x2b51c8(0x107))/0x8)+-parseInt(_0x2b51c8(0x12a))/0x9+-parseInt(_0x2b51c8(0x136))/0xa*(-parseInt(_0x2b51c8(0x128))/0xb);if(_0x278909===_0x2d9b3f)break;else _0x4a6d05['push'](_0x4a6d05['shift']());}catch(_0x48d9df){_0x4a6d05['push'](_0x4a6d05['shift']());}}}(a68_0x4f80,0xca1d4));function a68_0x4f80(){const _0x3a6525=['format','\x20\x20\x20\x20appcode:\x20\x20\x20\x20','(not\x20set)','\x20\x20userDomain:\x20\x20\x20\x20\x20\x20','\x20\x20\x20\x20apiDir:\x20\x20\x20\x20\x20','(default:\x20','42uJJUaS','\x20\x20Project:\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Global:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20←\x20current','value','slice','1301344lKBMum','\x20\x20pageSize:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Config\x20JSON','cookie','repeat','\x20\x20CLI\x20Version:\x20\x20\x20\x20\x20','unknown','check','doctor','444vOAjQE','source','1260303WyUMFp','(set,\x20length=','2301561lsdNqT','platform','appCode','arch','\x20\x20\x20\x20cookie:\x20\x20\x20\x20\x20','env','log','\x20\x20cookie:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Node:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20currentApp:\x20\x20\x20\x20\x20\x20','\x20\x20explicitAppName:\x20','(none)','350ANVPza','missing','\x20\x20Auth','status','apiDir','locale','792814QyxQUR','red','bold','\x20\x20Status:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(no\x20file)','✗\x20Invalid\x20JSON','verbose','riskLevel','Project','green','\x20\x20apiDomain:\x20\x20\x20\x20\x20\x20\x20','\x20\x20format:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(default)','\x20doctor','gray','raw','length','Diagnose\x20CLI\x20configuration\x20and\x20connectivity','\x20\x20apiDir:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','(not\x20found)','✓\x20Valid','message','\x20(default)','\x20\x20─','\x20\x20riskLevel:\x20\x20\x20\x20\x20\x20\x20','45640UpCCEI','\x20\x20API\x20Endpoints','150288yVOBER','\x20\x20verbose:\x20\x20\x20\x20\x20\x20\x20\x20\x20','accessKey','6560392FYbMTS','Global','apps','currentApp','defaultApp','7xQhaez','\x20\x20\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20locale:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','\x20\x20Merged\x20Config','padEnd'];a68_0x4f80=function(){return _0x3a6525;};return a68_0x4f80();}import a68_0x45dfbc 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';function a68_0x113e(_0x3741cf,_0x52b750){_0x3741cf=_0x3741cf-0xfc;const _0x4f8068=a68_0x4f80();let _0x113e42=_0x4f8068[_0x3741cf];return _0x113e42;}import{getIsSessionValid}from'../auth/is-session-valid.js';import{getCookie}from'../auth/get-cookie.js';import{buildAppDoctorFields}from'../config/schema.js';async function execute(_0x2bc535){const _0x23e9be=a68_0x113e,_0x8fb3f3=GIT_COMMIT!==_0x23e9be(0x123)?VERSION+'\x20('+GIT_COMMIT+',\x20'+BUILD_TIME[_0x23e9be(0x11c)](0x0,0xa)+')':VERSION,_0x51cbe0=buildConfigFromFlags({}),_0x65b599=getCookie();console[_0x23e9be(0x130)](),console[_0x23e9be(0x130)](a68_0x45dfbc[_0x23e9be(0x13e)](CLI_BIN_NAME+_0x23e9be(0x149))),console[_0x23e9be(0x130)](a68_0x45dfbc[_0x23e9be(0x14a)]('─'[_0x23e9be(0x121)](0x32))),console['log'](_0x23e9be(0x122)+_0x8fb3f3),console[_0x23e9be(0x130)](_0x23e9be(0x132)+process['version']),console[_0x23e9be(0x130)]('\x20\x20Platform:\x20\x20\x20\x20\x20\x20\x20\x20'+process[_0x23e9be(0x12b)]+'\x20'+process[_0x23e9be(0x12d)]),console[_0x23e9be(0x130)](),console[_0x23e9be(0x130)](a68_0x45dfbc['bold']('\x20\x20Config\x20Files')),console[_0x23e9be(0x130)](a68_0x45dfbc[_0x23e9be(0x14a)](_0x23e9be(0x100)[_0x23e9be(0x121)](0x1e)));const _0x3aaec5=getGlobalConfigPath(),_0x10bae9=getProjectConfigPath();console[_0x23e9be(0x130)](_0x23e9be(0x119)+(_0x3aaec5||a68_0x45dfbc[_0x23e9be(0x14a)]('(not\x20found)'))),console[_0x23e9be(0x130)](_0x23e9be(0x118)+(_0x10bae9||a68_0x45dfbc['gray'](_0x23e9be(0xfc)))),console[_0x23e9be(0x130)](),console[_0x23e9be(0x130)](a68_0x45dfbc[_0x23e9be(0x13e)](_0x23e9be(0x11f))),console[_0x23e9be(0x130)](a68_0x45dfbc[_0x23e9be(0x14a)](_0x23e9be(0x100)[_0x23e9be(0x121)](0x1e)));const _0x5f3271=(_0x2d47e8,_0x479569)=>{const _0x26ce63=_0x23e9be;if(!_0x479569){console[_0x26ce63(0x130)]('\x20\x20'+_0x2d47e8[_0x26ce63(0x110)](0x11)+'\x20'+a68_0x45dfbc[_0x26ce63(0x14a)](_0x26ce63(0x140)));return;}const _0x1748d6=inspectCliConfigJsonFile(_0x479569);if(_0x1748d6[_0x26ce63(0x139)]==='ok')console[_0x26ce63(0x130)]('\x20\x20'+_0x2d47e8[_0x26ce63(0x110)](0x11)+'\x20'+a68_0x45dfbc[_0x26ce63(0x145)]('✓\x20Valid\x20JSON'));else{if(_0x1748d6[_0x26ce63(0x139)]==='empty')console['log']('\x20\x20'+_0x2d47e8[_0x26ce63(0x110)](0x11)+'\x20'+a68_0x45dfbc['yellow']('⚠\x20Empty\x20(treated\x20as\x20{})'));else _0x1748d6[_0x26ce63(0x139)]===_0x26ce63(0x137)?console[_0x26ce63(0x130)]('\x20\x20'+_0x2d47e8[_0x26ce63(0x110)](0x11)+'\x20'+a68_0x45dfbc[_0x26ce63(0x14a)]('(missing)')):(console['log']('\x20\x20'+_0x2d47e8['padEnd'](0x11)+'\x20'+a68_0x45dfbc['red'](_0x26ce63(0x141))),console[_0x26ce63(0x130)]('\x20\x20'+''[_0x26ce63(0x110)](0x11)+'\x20'+a68_0x45dfbc[_0x26ce63(0x13d)](_0x1748d6[_0x26ce63(0xfe)])));}};_0x5f3271(_0x23e9be(0x108),_0x3aaec5),_0x5f3271(_0x23e9be(0x144),_0x10bae9),console[_0x23e9be(0x130)](),console['log'](a68_0x45dfbc[_0x23e9be(0x13e)](_0x23e9be(0x10f))),console[_0x23e9be(0x130)](a68_0x45dfbc[_0x23e9be(0x14a)](_0x23e9be(0x100)[_0x23e9be(0x121)](0x1e))),console[_0x23e9be(0x130)]('\x20\x20appCode:\x20\x20\x20\x20\x20\x20\x20\x20\x20'+(_0x51cbe0[_0x23e9be(0x12c)]||a68_0x45dfbc[_0x23e9be(0x13d)](_0x23e9be(0x113)))),console[_0x23e9be(0x130)]('\x20\x20env:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20'+_0x51cbe0[_0x23e9be(0x12f)]),console[_0x23e9be(0x130)](_0x23e9be(0x10e)+_0x51cbe0[_0x23e9be(0x13b)]),console[_0x23e9be(0x130)](_0x23e9be(0x14e)+_0x51cbe0[_0x23e9be(0x13a)]),console[_0x23e9be(0x130)]('\x20\x20defaultApp:\x20\x20\x20\x20\x20\x20'+(_0x51cbe0['defaultApp']||a68_0x45dfbc[_0x23e9be(0x14a)](_0x23e9be(0x135)))),console[_0x23e9be(0x130)](_0x23e9be(0x133)+(_0x51cbe0[_0x23e9be(0x10a)]||a68_0x45dfbc[_0x23e9be(0x14a)]('(none)'))),console['log'](_0x23e9be(0x134)+(_0x51cbe0['explicitAppName']||a68_0x45dfbc[_0x23e9be(0x14a)](_0x23e9be(0x135)))),console[_0x23e9be(0x130)](_0x23e9be(0x147)+(_0x51cbe0[_0x23e9be(0x111)]||a68_0x45dfbc[_0x23e9be(0x14a)](_0x23e9be(0x116)+DEFAULT_CONFIG_VALUES['format']+')'))),console[_0x23e9be(0x130)](_0x23e9be(0x11e)+(_0x51cbe0['pageSize']??a68_0x45dfbc[_0x23e9be(0x14a)](_0x23e9be(0x148)))),console['log'](_0x23e9be(0x101)+_0x51cbe0[_0x23e9be(0x143)]),console[_0x23e9be(0x130)](_0x23e9be(0x105)+_0x51cbe0[_0x23e9be(0x142)]),console[_0x23e9be(0x130)](_0x23e9be(0x131)+(_0x51cbe0['cookie']?a68_0x45dfbc[_0x23e9be(0x145)](_0x23e9be(0x129)+_0x51cbe0[_0x23e9be(0x120)][_0x23e9be(0x14c)]+')'):_0x65b599?a68_0x45dfbc['green']('(set\x20via\x20file,\x20length='+_0x65b599['length']+')'):a68_0x45dfbc[_0x23e9be(0x14a)](_0x23e9be(0x135))));const _0x4fa77b=Object['keys'](_0x51cbe0[_0x23e9be(0x109)]);if(_0x4fa77b[_0x23e9be(0x14c)]>0x0){console[_0x23e9be(0x130)](),console['log'](a68_0x45dfbc[_0x23e9be(0x13e)]('\x20\x20Apps')),console[_0x23e9be(0x130)](a68_0x45dfbc[_0x23e9be(0x14a)]('\x20\x20─'[_0x23e9be(0x121)](0x1e)));for(const _0x15df60 of _0x4fa77b){const _0x23b75a=_0x51cbe0['apps'][_0x15df60],_0x24090a=_0x15df60===_0x51cbe0[_0x23e9be(0x10b)],_0x3b7aab=_0x15df60===_0x51cbe0['currentApp'],_0x3f9792=_0x3b7aab?a68_0x45dfbc[_0x23e9be(0x145)](_0x23e9be(0x11a)):'',_0x52d908=_0x24090a?_0x23e9be(0xff):'';console[_0x23e9be(0x130)]('\x20\x20'+_0x15df60+_0x52d908+_0x3f9792),console[_0x23e9be(0x130)](_0x23e9be(0x112)+_0x23b75a['appcode']);const _0x2cf63f=buildAppDoctorFields(_0x23b75a,{'env':_0x51cbe0[_0x23e9be(0x12f)],'apiDir':_0x51cbe0[_0x23e9be(0x14b)][_0x23e9be(0x13a)]||DEFAULT_CONFIG_VALUES['apiDir'],'cookie':_0x51cbe0[_0x23e9be(0x120)]||_0x65b599||undefined,'accessKey':_0x51cbe0['accessKey']});console[_0x23e9be(0x130)](_0x23e9be(0x10d)+_0x2cf63f['env']['value']+'\x20\x20'+a68_0x45dfbc[_0x23e9be(0x14a)]('('+_0x2cf63f[_0x23e9be(0x12f)][_0x23e9be(0x127)]+')')),console[_0x23e9be(0x130)](_0x23e9be(0x115)+_0x2cf63f[_0x23e9be(0x13a)][_0x23e9be(0x11b)]+'\x20\x20'+a68_0x45dfbc[_0x23e9be(0x14a)]('('+_0x2cf63f[_0x23e9be(0x13a)][_0x23e9be(0x127)]+')'));const _0x1e3b98=_0x2cf63f[_0x23e9be(0x120)]['value']?a68_0x45dfbc[_0x23e9be(0x145)](_0x23e9be(0x129)+_0x2cf63f['cookie']['value'][_0x23e9be(0x14c)]+')'):a68_0x45dfbc[_0x23e9be(0x14a)](_0x23e9be(0x135));console[_0x23e9be(0x130)](_0x23e9be(0x12e)+_0x1e3b98+'\x20\x20'+a68_0x45dfbc[_0x23e9be(0x14a)]('('+_0x2cf63f[_0x23e9be(0x120)][_0x23e9be(0x127)]+')'));const _0x22b869=_0x2cf63f['accessKey'][_0x23e9be(0x11b)]?a68_0x45dfbc[_0x23e9be(0x145)](_0x23e9be(0x129)+_0x2cf63f[_0x23e9be(0x106)]['value'][_0x23e9be(0x14c)]+')'):a68_0x45dfbc[_0x23e9be(0x14a)]('(none)');console[_0x23e9be(0x130)]('\x20\x20\x20\x20accessKey:\x20\x20'+_0x22b869+'\x20\x20'+a68_0x45dfbc['gray']('('+_0x2cf63f[_0x23e9be(0x106)][_0x23e9be(0x127)]+')'));}}console[_0x23e9be(0x130)](),console[_0x23e9be(0x130)](a68_0x45dfbc[_0x23e9be(0x13e)](_0x23e9be(0x103))),console[_0x23e9be(0x130)](a68_0x45dfbc[_0x23e9be(0x14a)](_0x23e9be(0x100)['repeat'](0x1e))),console[_0x23e9be(0x130)](_0x23e9be(0x146)+getApiDomain()),console[_0x23e9be(0x130)](_0x23e9be(0x114)+getUserDomain()),console['log']('\x20\x20runtimeDomain:\x20\x20\x20'+getRuntimeDomain()),console[_0x23e9be(0x130)](),console[_0x23e9be(0x130)](a68_0x45dfbc[_0x23e9be(0x13e)](_0x23e9be(0x138))),console[_0x23e9be(0x130)](a68_0x45dfbc[_0x23e9be(0x14a)](_0x23e9be(0x100)[_0x23e9be(0x121)](0x1e)));if(_0x65b599){const _0x2411e8=await getIsSessionValid();console['log'](_0x23e9be(0x13f)+(_0x2411e8?a68_0x45dfbc[_0x23e9be(0x145)](_0x23e9be(0xfd)):a68_0x45dfbc[_0x23e9be(0x13d)]('✗\x20Expired')));}else console[_0x23e9be(0x130)](_0x23e9be(0x13f)+a68_0x45dfbc[_0x23e9be(0x13d)]('✗\x20Not\x20logged\x20in'));return console['log'](),{'ok':!![]};}export const doctorDefinition={'service':a68_0x5c1f53(0x125),'command':a68_0x5c1f53(0x124),'description':a68_0x5c1f53(0x14d),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],'execute':execute};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a69_0x3759(){const _0x7fc209=['defaultApp','App\x20code\x20to\x20initialize\x20with','\x0a✓\x20Successfully\x20initialized\x20','Delegate\x20to\x20legacy\x20Ink\x20init\x20flow','init','1761429QYRxBr','boolean','\x20\x20Default:\x20','cwd','bool','str','project','log','596953aoGjrm','Target\x20environment','appcode','7FxkuYF','nonInteractive','map','yes','global','toLocaleString','\x20\x20Env:\x20','join','5392DocSrG','1628oIuImf','flagMissing','Smart\x20init:\x20auto-detect,\x20upgrade,\x20or\x20select\x20app\x20from\x20platform','20VNSOui','Usage:\x20','.rabetbase.json\x20already\x20exists\x20in\x20current\x20directory.','message','env','../../commands/project/init.js','valid','validation','string','2utHsQr','run','49224tuJlJe','some','2225770VXsALT','3213bVzqDJ','2004714pTwkMb','Use\x20`','\x20config','production','Write\x20to\x20global\x20config\x20instead\x20of\x20project','436744kVFMJo','appCode'];a69_0x3759=function(){return _0x7fc209;};return a69_0x3759();}const a69_0x4a8a18=a69_0x185d;(function(_0x48cf7f,_0x51e6bb){const _0x4784f5=a69_0x185d,_0x2021a6=_0x48cf7f();while(!![]){try{const _0x4734c9=parseInt(_0x4784f5(0x14e))/0x1+-parseInt(_0x4784f5(0x166))/0x2*(parseInt(_0x4784f5(0x146))/0x3)+parseInt(_0x4784f5(0x171))/0x4*(-parseInt(_0x4784f5(0x15d))/0x5)+parseInt(_0x4784f5(0x16c))/0x6*(-parseInt(_0x4784f5(0x151))/0x7)+parseInt(_0x4784f5(0x159))/0x8*(parseInt(_0x4784f5(0x16b))/0x9)+parseInt(_0x4784f5(0x16a))/0xa+-parseInt(_0x4784f5(0x15a))/0xb*(-parseInt(_0x4784f5(0x168))/0xc);if(_0x4734c9===_0x51e6bb)break;else _0x2021a6['push'](_0x2021a6['shift']());}catch(_0x3fadaf){_0x2021a6['push'](_0x2021a6['shift']());}}}(a69_0x3759,0x4b7f6));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';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(_0x23e7df){return{'appCode':_0x23e7df,'appName':_0x23e7df};}function writeInitConfig(_0x610215,_0x78a901,_0x20e6a5){const _0x5d7cf0=a69_0x185d,_0x166483=resolveWriteConfigPath(_0x610215),_0x158f19=buildCanonicalProjectConfig({},{'appCodes':_0x78a901[_0x5d7cf0(0x153)](_0x28809c=>_0x28809c[_0x5d7cf0(0x172)]),'env':_0x20e6a5,'metadata':{'version':getCliVersion(),'createdAt':new Date()[_0x5d7cf0(0x156)]()}});writeConfigFile(_0x166483,_0x158f19);const _0x171e04=_0x610215===_0x5d7cf0(0x155)?'global':_0x5d7cf0(0x14c);console[_0x5d7cf0(0x14d)](_0x5d7cf0(0x175)+_0x171e04+_0x5d7cf0(0x16e)),console['log']('\x20\x20Apps:\x20'+_0x78a901[_0x5d7cf0(0x153)](_0x58fa5d=>_0x58fa5d[_0x5d7cf0(0x172)])[_0x5d7cf0(0x158)](',\x20')),console[_0x5d7cf0(0x14d)](_0x5d7cf0(0x148)+_0x158f19[_0x5d7cf0(0x173)]),console[_0x5d7cf0(0x14d)](_0x5d7cf0(0x157)+_0x158f19[_0x5d7cf0(0x161)]),console['log']('\x20\x20Config:\x20'+_0x166483);}async function runSmartInit(_0x4e45c4){const _0x5c05e0=a69_0x185d,_0x67e983=process[_0x5c05e0(0x149)](),_0x56049f=_0x4e45c4['bool'](_0x5c05e0(0x155))?_0x5c05e0(0x155):'project',_0x2a5eda=_0x4e45c4[_0x5c05e0(0x14b)]('env')||_0x5c05e0(0x16f),_0x208e9c=_0x4e45c4[_0x5c05e0(0x14b)](_0x5c05e0(0x150))||undefined,_0xe4f159=_0x4e45c4[_0x5c05e0(0x14a)](_0x5c05e0(0x14c));if(_0xe4f159){const {initConfig:_0x13c2cf}=await import(_0x5c05e0(0x162));return _0x13c2cf({'appcode':_0x208e9c,'env':_0x2a5eda,'autoYes':_0x4e45c4[_0x5c05e0(0x14a)]('yes')});}if(_0x56049f===_0x5c05e0(0x14c)){const _0x14ac3b=existsSync(resolve(_0x67e983,NEW_CONFIG_NAME)),_0x241a54=LEGACY_CONFIG_NAMES[_0x5c05e0(0x169)](_0x5d6d7e=>existsSync(resolve(_0x67e983,_0x5d6d7e)));if(_0x241a54&&!_0x14ac3b)return console[_0x5c05e0(0x14d)]('检测到旧配置文件,正在自动升级...\x0a'),upgradeApp(_0x4e45c4[_0x5c05e0(0x152)],{'yes':_0x4e45c4[_0x5c05e0(0x14a)](_0x5c05e0(0x154))});if(_0x14ac3b)throw CliErrors[_0x5c05e0(0x164)](_0x5c05e0(0x15f),_0x5c05e0(0x16d)+CLI_BIN_NAME+'\x20project\x20upgrade`\x20to\x20migrate\x20from\x20legacy\x20config.');}if(_0x208e9c){const _0x317714=validateAppcode(_0x208e9c);if(!_0x317714[_0x5c05e0(0x163)])throw CliErrors[_0x5c05e0(0x164)](_0x317714[_0x5c05e0(0x160)]);writeInitConfig(_0x56049f,[syntheticApp(_0x208e9c)],_0x2a5eda);return;}if(_0x4e45c4['nonInteractive'])throw CliErrors[_0x5c05e0(0x15b)]('appcode',_0x5c05e0(0x15e)+CLI_BIN_NAME+'\x20init\x20--appcode\x20<code>\x20[--env\x20<env>]');const _0x129f07=getCookie(),_0x5812c3=await selectMultipleApps(_0x129f07),_0x4d8b53=_0x5812c3==='custom'?[syntheticApp(await promptCustomAppcode())]:_0x5812c3;writeInitConfig(_0x56049f,_0x4d8b53,_0x2a5eda);}const initFlags=[{'name':'global','type':'boolean','description':a69_0x4a8a18(0x170),'default':![]},{'name':a69_0x4a8a18(0x161),'type':a69_0x4a8a18(0x165),'description':a69_0x4a8a18(0x14f),'default':a69_0x4a8a18(0x16f),'enum':[...RABETBASE_ENV_VALUES]},{'name':a69_0x4a8a18(0x150),'type':'string','description':a69_0x4a8a18(0x174)},{'name':'project','type':a69_0x4a8a18(0x147),'description':a69_0x4a8a18(0x144),'default':![]},{'name':a69_0x4a8a18(0x154),'type':a69_0x4a8a18(0x147),'description':'Auto-confirm\x20prompts','default':![]}];function a69_0x185d(_0xd08003,_0x3c1ad4){_0xd08003=_0xd08003-0x144;const _0x37595c=a69_0x3759();let _0x185d1c=_0x37595c[_0xd08003];return _0x185d1c;}export const initDefinitions=[{'service':a69_0x4a8a18(0x145),'command':a69_0x4a8a18(0x167),'description':a69_0x4a8a18(0x15c),'risk':'write','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':initFlags,async 'execute'(_0xdc01fb){return await runSmartInit(_0xdc01fb),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a70_0x137139=a70_0x3786;(function(_0x1d7f65,_0x2441b8){const _0x50ddef=a70_0x3786,_0xc3821c=_0x1d7f65();while(!![]){try{const _0xea7caa=-parseInt(_0x50ddef(0x1a2))/0x1*(-parseInt(_0x50ddef(0x19b))/0x2)+parseInt(_0x50ddef(0x18f))/0x3+-parseInt(_0x50ddef(0x198))/0x4+-parseInt(_0x50ddef(0x18d))/0x5*(parseInt(_0x50ddef(0x19d))/0x6)+parseInt(_0x50ddef(0x195))/0x7+-parseInt(_0x50ddef(0x193))/0x8+-parseInt(_0x50ddef(0x1a5))/0x9*(-parseInt(_0x50ddef(0x194))/0xa);if(_0xea7caa===_0x2441b8)break;else _0xc3821c['push'](_0xc3821c['shift']());}catch(_0x32ffd7){_0xc3821c['push'](_0xc3821c['shift']());}}}(a70_0x2aad,0xe4e17));import{logger}from'../../utils/logger.js';function a70_0x2aad(){const _0x5de200=['2288514lEbDTu','*\x20No\x20logs\x20found','write','clearLogs','duration','1613407bDzosD','details','success','3915927xRqZzS','show','en-US','View\x20command\x20history\x20logs','level','Clear\x20command\x20history\x20logs','timestamp','clear','20rLXQPK','message','4143534QJhbiF','*\x20Logs\x20cleared','command','log','14843176rrxeNq','30wJNJgh','12982214TRBDUQ','*\x20Lovrabet\x20CLI\x20logs:\x0a','logs','7343712vlwxWU','keys','error','2jpvCdV','forEach'];a70_0x2aad=function(){return _0x5de200;};return a70_0x2aad();}function a70_0x3786(_0x2d2258,_0x631f2d){_0x2d2258=_0x2d2258-0x18c;const _0x2aad4c=a70_0x2aad();let _0x37866a=_0x2aad4c[_0x2d2258];return _0x37866a;}function printLogs(_0x42faf1){const _0x10c7c4=a70_0x3786;if(_0x42faf1['length']===0x0){console['log'](_0x10c7c4(0x19e));return;}console['log'](_0x10c7c4(0x196)),_0x42faf1[_0x10c7c4(0x19c)]((_0x63bb15,_0x3fca1f)=>{const _0x435577=_0x10c7c4,_0x58adaf=new Date(_0x63bb15[_0x435577(0x1ab)])['toLocaleString'](_0x435577(0x1a7)),_0x25aff4=_0x63bb15[_0x435577(0x1a9)]===_0x435577(0x1a4)?'√':_0x63bb15[_0x435577(0x1a9)]===_0x435577(0x19a)?'×':_0x63bb15[_0x435577(0x1a9)]==='warn'?'!':'i';console[_0x435577(0x192)](_0x3fca1f+0x1+'.\x20'+_0x25aff4+'\x20['+_0x63bb15[_0x435577(0x191)]+']\x20'+_0x63bb15[_0x435577(0x18e)]),console[_0x435577(0x192)]('\x20\x20\x20Time:\x20'+_0x58adaf),_0x63bb15[_0x435577(0x1a1)]&&console['log']('\x20\x20\x20Duration:\x20'+_0x63bb15['duration']+'ms'),_0x63bb15[_0x435577(0x1a3)]&&Object[_0x435577(0x199)](_0x63bb15[_0x435577(0x1a3)])['length']>0x0&&console['log']('\x20\x20\x20Details:\x20'+JSON['stringify'](_0x63bb15[_0x435577(0x1a3)],null,0x2)),console[_0x435577(0x192)]('');});}export const logsDefinitions=[{'service':'logs','command':a70_0x137139(0x1a6),'description':a70_0x137139(0x1a8),'risk':'read','requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x2fb68d){return printLogs(logger['readLogs']()),{'ok':!![]};}},{'service':a70_0x137139(0x197),'command':a70_0x137139(0x18c),'description':a70_0x137139(0x1aa),'risk':a70_0x137139(0x19f),'requiresAuth':![],'requiresAppCode':![],'hasFormat':![],'flags':[],async 'execute'(_0x27c805){const _0x21b47f=a70_0x137139;return logger[_0x21b47f(0x1a0)](),console[_0x21b47f(0x192)](_0x21b47f(0x190)),{'ok':!![]};}}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x14796a,_0x5b5b4e){const _0x55034c=a71_0x57ed,_0x304dfc=_0x14796a();while(!![]){try{const _0x4e0284=parseInt(_0x55034c(0x7c))/0x1+parseInt(_0x55034c(0x75))/0x2*(-parseInt(_0x55034c(0x7d))/0x3)+-parseInt(_0x55034c(0x76))/0x4*(-parseInt(_0x55034c(0x79))/0x5)+parseInt(_0x55034c(0x77))/0x6+parseInt(_0x55034c(0x73))/0x7*(-parseInt(_0x55034c(0x7b))/0x8)+parseInt(_0x55034c(0x78))/0x9*(parseInt(_0x55034c(0x74))/0xa)+parseInt(_0x55034c(0x7a))/0xb;if(_0x4e0284===_0x5b5b4e)break;else _0x304dfc['push'](_0x304dfc['shift']());}catch(_0x2823c5){_0x304dfc['push'](_0x304dfc['shift']());}}}(a71_0x1c95,0x18f9d));function a71_0x57ed(_0x2d75ee,_0x437bdf){_0x2d75ee=_0x2d75ee-0x73;const _0x1c9597=a71_0x1c95();let _0x57ed0f=_0x1c9597[_0x2d75ee];return _0x57ed0f;}import{menuSync}from'../../commands/menu/sync.js';function a71_0x1c95(){const _0x3736a4=['15jeoqgI','10129VAidef','204870HBHfFm','28162YBdyOv','21748DfERDl','473238vVGAlx','54GedvDC','5ruDTAs','1718211dgbZJR','1096JKBoqL','7512BfLIhi'];a71_0x1c95=function(){return _0x3736a4;};return a71_0x1c95();}import{menuUpdate}from'../../commands/menu/update.js';export const menuDefinitions=[menuSync,menuUpdate];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x595f92,_0x1e6ecd){const _0x5146a1=a72_0x18f9,_0xf8ef76=_0x595f92();while(!![]){try{const _0x3f1797=-parseInt(_0x5146a1(0x17d))/0x1*(-parseInt(_0x5146a1(0x191))/0x2)+parseInt(_0x5146a1(0x183))/0x3+parseInt(_0x5146a1(0x17f))/0x4*(parseInt(_0x5146a1(0x18a))/0x5)+parseInt(_0x5146a1(0x18b))/0x6+-parseInt(_0x5146a1(0x18e))/0x7+parseInt(_0x5146a1(0x17c))/0x8+-parseInt(_0x5146a1(0x17b))/0x9;if(_0x3f1797===_0x1e6ecd)break;else _0xf8ef76['push'](_0xf8ef76['shift']());}catch(_0x3d4744){_0xf8ef76['push'](_0xf8ef76['shift']());}}}(a72_0x517c,0x5e3a7));function a72_0x18f9(_0x458a31,_0x296617){_0x458a31=_0x458a31-0x178;const _0x517cd8=a72_0x517c();let _0x18f907=_0x517cd8[_0x458a31];return _0x18f907;}function strWidth(_0xcd4b55){let _0xce556b=0x0;for(const _0x5ed6a7 of _0xcd4b55){_0xce556b+=/[\u4e00-\u9fa5]/['test'](_0x5ed6a7)?0x2:0x1;}return _0xce556b;}function padRight(_0x53fb09,_0x5c2dc0){const _0x31212d=a72_0x18f9,_0x1d3bf2=strWidth(_0x53fb09);return _0x53fb09+'\x20'[_0x31212d(0x187)](Math[_0x31212d(0x186)](0x0,_0x5c2dc0-_0x1d3bf2));}export function renderCompareTable(_0x3f49bd,_0x181b13={}){const _0xcf60a8=a72_0x18f9;if(_0x3f49bd[_0xcf60a8(0x190)]===0x0)return'';const _0x1da167=_0x181b13[_0xcf60a8(0x188)]??!![],_0xa5306f=Math['max'](0x1e,..._0x3f49bd[_0xcf60a8(0x18c)](_0x495fde=>strWidth(_0x495fde[_0xcf60a8(0x195)]))),_0x410cc4=0x4,_0x29f768=[],_0x398fc7='\x20\x20'+padRight(_0xcf60a8(0x17e),_0xa5306f),_0x127ebd=padRight(_0xcf60a8(0x179),_0x410cc4),_0x21e72f=_0x1da167?'\x20\x20'+padRight(_0xcf60a8(0x185),_0x410cc4):'';_0x29f768['push'](_0x398fc7+'\x20\x20'+_0x127ebd+(_0x1da167?_0x21e72f:'')),_0x29f768[_0xcf60a8(0x18d)]('\x20\x20'+'─'[_0xcf60a8(0x187)](_0xa5306f)+'\x20\x20'+'─'['repeat'](_0x410cc4)+(_0x1da167?'\x20\x20'+'─'['repeat'](_0x410cc4):''));for(const _0x408aa3 of _0x3f49bd){const _0x1fe85e=padRight(_0x408aa3[_0xcf60a8(0x195)],_0xa5306f),_0x52871c=_0x408aa3['local']?'✓':'✗',_0x3e2cb7=padRight(_0x52871c,_0x410cc4);let _0x3c32ab='\x20\x20'+_0x1fe85e+'\x20\x20'+_0x3e2cb7;if(_0x1da167){const _0x503683=_0x408aa3[_0xcf60a8(0x184)]?'✓':'✗';_0x3c32ab+='\x20\x20'+padRight(_0x503683,_0x410cc4);}_0x29f768[_0xcf60a8(0x18d)](_0x3c32ab);}return _0x29f768['join']('\x0a');}function a72_0x517c(){const _0x4404e1=['22CZIZiZ','\x20\x20No\x20pages\x20to\x20sync.','path','\x20\x20\x20\x20•\x20','label','\x20\x20\x20\x20JS:\x20\x20','Local','\x20menu(s)\x20will\x20be\x20updated\x20with\x20new\x20assets:','6212277nsNEns','191888tqONwx','39332AysYgb','Menu\x20Name','561140BHmZoJ','\x20\x20Affected\x20menus:\x20','(unchanged)','join','1252296zsctZq','online','Platform','max','repeat','showOnline','\x20page(s)\x20will\x20be\x20created\x20on\x20platform:','5HJIgse','1260390dYllSp','map','push','1037456MGbkTV','\x20\x20All\x20local\x20pages\x20are\x20already\x20on\x20platform.','length'];a72_0x517c=function(){return _0x4404e1;};return a72_0x517c();}export function renderSyncSummary(_0x12a33a,_0x3a5aad){const _0x14858e=a72_0x18f9;if(_0x12a33a[_0x14858e(0x190)]===0x0)return _0x3a5aad?_0x14858e(0x18f):_0x14858e(0x192);const _0x363440=['\x20\x20'+_0x12a33a['length']+_0x14858e(0x189)];for(const _0x54dc23 of _0x12a33a){_0x363440[_0x14858e(0x18d)](_0x14858e(0x194)+_0x54dc23[_0x14858e(0x195)]+'\x20('+_0x54dc23[_0x14858e(0x193)]+')');}return _0x363440[_0x14858e(0x182)]('\x0a');}export function renderUpdateSummary(_0x11b4df,_0x2ea851){const _0xf7e42c=a72_0x18f9;if(_0x11b4df[_0xf7e42c(0x190)]===0x0)return'\x20\x20No\x20menus\x20with\x20existing\x20resources\x20found.';const _0x491f73=['\x20\x20'+_0x11b4df[_0xf7e42c(0x190)]+_0xf7e42c(0x17a),_0xf7e42c(0x178)+(_0x2ea851[0x0]??_0xf7e42c(0x181)),'\x20\x20\x20\x20CSS:\x20'+(_0x2ea851[0x1]??'(unchanged)'),'',_0xf7e42c(0x180)+_0x11b4df['join'](',\x20')];return _0x491f73[_0xf7e42c(0x182)]('\x0a');}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x8ae63e,_0x5e756f){var _0x450c74=a73_0x9b5d,_0x2173a9=_0x8ae63e();while(!![]){try{var _0x540566=-parseInt(_0x450c74(0x143))/0x1+parseInt(_0x450c74(0x141))/0x2*(parseInt(_0x450c74(0x144))/0x3)+parseInt(_0x450c74(0x148))/0x4*(parseInt(_0x450c74(0x146))/0x5)+parseInt(_0x450c74(0x145))/0x6+-parseInt(_0x450c74(0x147))/0x7+parseInt(_0x450c74(0x149))/0x8*(parseInt(_0x450c74(0x142))/0x9)+parseInt(_0x450c74(0x140))/0xa*(-parseInt(_0x450c74(0x13f))/0xb);if(_0x540566===_0x5e756f)break;else _0x2173a9['push'](_0x2173a9['shift']());}catch(_0x4f466c){_0x2173a9['push'](_0x2173a9['shift']());}}}(a73_0x5e42,0xad811));function a73_0x9b5d(_0x47c8ca,_0x2fb10e){_0x47c8ca=_0x47c8ca-0x13f;var _0x5e4230=a73_0x5e42();var _0x9b5d98=_0x5e4230[_0x47c8ca];return _0x9b5d98;}export*from'../../../commands/menu/shared/types.js';export*from'../../../commands/menu/shared/logic.js';export*from'../../../commands/menu/shared/compare-table.js';export*from'../../../commands/menu/shared/inquirer.js';export*from'../../../commands/menu/shared/valid-url.js';export*from'../../../commands/menu/shared/local-pages.js';function a73_0x5e42(){var _0x38eb44=['364893QIqTXy','6723576tzhVmN','755cZnydT','7726719Wysiak','32372TOsQVA','58584tfBIIP','525547EjTbOH','430UZNYxE','16BKiUMS','1008sdvnrI','266962IrnxDp'];a73_0x5e42=function(){return _0x38eb44;};return a73_0x5e42();}export*from'../../../commands/menu/shared/service.js';export*from'../../../commands/menu/shared/sync-core.js';export*from'../../../commands/menu/shared/update-core.js';
|