@lovrabet/rabetbase-cli 2.3.9 → 2.3.10-beta.1
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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/remove.js +1 -1
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.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-skill/index.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-registry.js +1 -1
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.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/file/index.js +1 -1
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.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/mutations.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/notification/config-list.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.js +1 -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/permit/index.js +1 -1
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.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/role/create.js +1 -1
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.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/commands/task/index.js +1 -1
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.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/app-resolver.js +1 -1
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.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-index-auditor.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/error-output.js +1 -1
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -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 +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a76_0x26d309=a76_0x370a;(function(_0x293d38,_0x44841a){const _0x468144=a76_0x370a,_0x140152=_0x293d38();while(!![]){try{const _0x29f028=-parseInt(_0x468144(0x1c6))/0x1*(parseInt(_0x468144(0x1c1))/0x2)+-parseInt(_0x468144(0x1a9))/0x3+parseInt(_0x468144(0x1b9))/0x4+parseInt(_0x468144(0x1cf))/0x5+parseInt(_0x468144(0x1d4))/0x6*(-parseInt(_0x468144(0x1bd))/0x7)+parseInt(_0x468144(0x1b0))/0x8*(-parseInt(_0x468144(0x1bb))/0x9)+parseInt(_0x468144(0x1d3))/0xa;if(_0x29f028===_0x44841a)break;else _0x140152['push'](_0x140152['shift']());}catch(_0x219348){_0x140152['push'](_0x140152['shift']());}}}(a76_0x55df,0xddf82));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';function a76_0x55df(){const _0x2c9588=['trim','763278MiMkLY','No\x20changes\x20for\x20dataset\x20','datasetId','Renamed\x20dataset\x20','Rename\x20dataset\x20display\x20name\x20safely','data','POST','2272RUTWib','object','str','--expect-name\x20is\x20required','--name\x20is\x20required',',\x20actual\x20','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id','datasetCode','Expected\x20','1714660IyWJFv','write','10566bwMiBd','expectName','7upQXGX','\x20to\x20','Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing','name','164326rswpOp','modelCode','New\x20dataset\x20display\x20name','--code\x20is\x20required','dataset','8EBGoOP','Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code','datasetName','Dry-run:\x20dataset\x20','Expectation\x20mismatch\x20at\x20dataset.name','stringify','rename','/smartapi/dataset/update-driven-data','isArray','879660aYYaOE','validation','\x20would\x20be\x20renamed\x20to\x20','request','27216060OudEXv','7031226AyOsQR','modelId','code'];a76_0x55df=function(){return _0x2c9588;};return a76_0x55df();}import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a76_0x370a(_0x2a6957,_0x1c9620){_0x2a6957=_0x2a6957-0x1a9;const _0x55dfbf=a76_0x55df();let _0x370ab5=_0x55dfbf[_0x2a6957];return _0x370ab5;}export async function buildDatasetRenameResult({input:_0x4569ae,dryRun:_0x2668f8}){const _0x46c4d5=a76_0x370a;validateInput(_0x4569ae);const _0x4db9a3=await getDatasetDetail(_0x4569ae[_0x46c4d5(0x1d6)]),_0x170a1e=resolveCurrentName(_0x4db9a3);if(_0x170a1e!==_0x4569ae['expectName'])throw CliErrors[_0x46c4d5(0x1d0)](_0x46c4d5(0x1ca),_0x46c4d5(0x1b8)+JSON[_0x46c4d5(0x1cb)](_0x4569ae[_0x46c4d5(0x1bc)])+_0x46c4d5(0x1b5)+JSON[_0x46c4d5(0x1cb)](_0x170a1e));const _0xfb2771=buildRenameRequest(_0x4db9a3,_0x4569ae),_0x1e1928=_0x170a1e!==_0x4569ae[_0x46c4d5(0x1c0)];let _0x2c9012;return _0x1e1928&&!_0x2668f8&&(_0x2c9012=await updateDrivenData(_0xfb2771)),{'ok':!![],'data':{'dataset':{'id':_0xfb2771['modelId'],'code':_0xfb2771[_0x46c4d5(0x1c2)]},'dryRun':_0x2668f8,'changed':_0x1e1928,'before':{'name':_0x170a1e},'after':{'name':_0x4569ae[_0x46c4d5(0x1c0)]},'request':_0xfb2771,'submitted':_0x1e1928&&!_0x2668f8,..._0x2c9012!==undefined?{'version':_0x2c9012}:{}},'message':_0x1e1928?_0x2668f8?_0x46c4d5(0x1c9)+_0xfb2771[_0x46c4d5(0x1c2)]+_0x46c4d5(0x1d1)+_0x4569ae['name']:_0x46c4d5(0x1ac)+_0xfb2771[_0x46c4d5(0x1c2)]+_0x46c4d5(0x1be)+_0x4569ae[_0x46c4d5(0x1c0)]:_0x46c4d5(0x1aa)+_0xfb2771['modelCode']};}export const datasetRename={'service':'dataset','command':a76_0x26d309(0x1cc),'description':a76_0x26d309(0x1ad),'risk':a76_0x26d309(0x1ba),'flags':[CODE_FLAG,{'name':a76_0x26d309(0x1c0),'type':'string','required':!![],'description':a76_0x26d309(0x1c3)},{'name':'expect-name','type':'string','required':!![],'description':a76_0x26d309(0x1bf)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x58a2be){validateInput(readDatasetRenameInput(_0x58a2be));},async 'dryRun'(_0x1b6c14){const _0x5cd2c9=a76_0x26d309,_0x4575ce=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x1b6c14),'dryRun':!![]});return{'method':_0x5cd2c9(0x1af),'url':_0x5cd2c9(0x1cd),'body':_0x4575ce[_0x5cd2c9(0x1ae)][_0x5cd2c9(0x1d2)],'description':_0x4575ce['message'],..._0x4575ce['data']};},async 'execute'(_0x59316f){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x59316f),'dryRun':![]});}};function readDatasetRenameInput(_0x91d256){const _0x2dc41f=a76_0x26d309;return{'code':trim(_0x91d256[_0x2dc41f(0x1b2)](_0x2dc41f(0x1d6))),'name':trim(_0x91d256[_0x2dc41f(0x1b2)]('name')),'expectName':trim(_0x91d256[_0x2dc41f(0x1b2)]('expect-name'))};}function validateInput(_0x367591){const _0x36a151=a76_0x26d309;if(!_0x367591[_0x36a151(0x1d6)])throw CliErrors[_0x36a151(0x1d0)](_0x36a151(0x1c4));if(!_0x367591[_0x36a151(0x1c0)])throw CliErrors[_0x36a151(0x1d0)](_0x36a151(0x1b4));if(!_0x367591['expectName'])throw CliErrors['validation'](_0x36a151(0x1b3));}function resolveCurrentName(_0x286cdc){const _0x55cf8b=a76_0x26d309;return String(_0x286cdc[_0x55cf8b(0x1c5)]?.[_0x55cf8b(0x1c8)]??_0x286cdc[_0x55cf8b(0x1c0)]??'')[_0x55cf8b(0x1d7)]();}function buildRenameRequest(_0x3a9785,_0x3563f3){const _0x2b3701=a76_0x26d309,_0x2d3f0b=isPlainObject(_0x3a9785[_0x2b3701(0x1c5)])?_0x3a9785[_0x2b3701(0x1c5)]:{},_0x237f37=_0x3a9785[_0x2b3701(0x1d5)]??_0x3a9785['id']??_0x2d3f0b[_0x2b3701(0x1ab)];if(_0x237f37===undefined||_0x237f37===null||_0x237f37==='')throw CliErrors[_0x2b3701(0x1d0)](_0x2b3701(0x1b6));const _0x347b55=String(_0x3a9785['modelCode']??_0x3a9785['code']??_0x2d3f0b[_0x2b3701(0x1b7)]??_0x3563f3[_0x2b3701(0x1d6)])[_0x2b3701(0x1d7)]();if(!_0x347b55)throw CliErrors[_0x2b3701(0x1d0)](_0x2b3701(0x1c7));return{'modelId':_0x237f37,'modelCode':_0x347b55,'name':_0x3563f3[_0x2b3701(0x1c0)],'dataset':{'datasetId':_0x237f37,'datasetCode':_0x347b55,'datasetName':_0x3563f3[_0x2b3701(0x1c0)]}};}function isPlainObject(_0x564c83){const _0x1dfc95=a76_0x26d309;return Boolean(_0x564c83)&&typeof _0x564c83===_0x1dfc95(0x1b1)&&!Array[_0x1dfc95(0x1ce)](_0x564c83);}function trim(_0xba70f6){const _0x5a6af9=a76_0x26d309;return String(_0xba70f6||'')[_0x5a6af9(0x1d7)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a77_0x2a28(){const _0x271c57=['relationPages','1441803KiZNfb','dbtableConfig','10NpBlBt','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','number','391705uIgCyN','/smartapi/dataset/restore-dataset','boolean','--confirm\x20is\x20required\x20to\x20restore\x20datasets.','length','num','653359EqpWDP','code','push','filter','Required\x20to\x20execute\x20dataset\x20restore','46290DVEhbg','isArray','\x20dataset(s);\x20','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','20NFcNUT','183840JRpvds','POST','Restored\x20','\x20dataset(s)','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','Would\x20restore\x20','str','dataset','dbid','dbId','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id','Dataset\x20id','high-risk-write','message','12ukANPn','2289192Zztuxp','No\x20deleted\x20dataset\x20found\x20for\x20','676449YLZdNv','8IgWala','tableName','confirm','map','name','Matched\x20','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','dbid=','dbName','\x20failed','appCode','expected-count','validation'];a77_0x2a28=function(){return _0x271c57;};return a77_0x2a28();}const a77_0x171466=a77_0x3863;(function(_0x31fe21,_0x2a5beb){const _0x15f82d=a77_0x3863,_0x5c3d1c=_0x31fe21();while(!![]){try{const _0x40bcc4=-parseInt(_0x15f82d(0x190))/0x1+parseInt(_0x15f82d(0x17d))/0x2*(parseInt(_0x15f82d(0x18b))/0x3)+parseInt(_0x15f82d(0x1a0))/0x4*(parseInt(_0x15f82d(0x180))/0x5)+parseInt(_0x15f82d(0x1a1))/0x6+-parseInt(_0x15f82d(0x186))/0x7*(parseInt(_0x15f82d(0x1a4))/0x8)+parseInt(_0x15f82d(0x1a3))/0x9+parseInt(_0x15f82d(0x18f))/0xa*(-parseInt(_0x15f82d(0x17b))/0xb);if(_0x40bcc4===_0x2a5beb)break;else _0x5c3d1c['push'](_0x5c3d1c['shift']());}catch(_0x384083){_0x5c3d1c['push'](_0x5c3d1c['shift']());}}}(a77_0x2a28,0x380a7));import{listDatasets,restoreDataset}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a77_0x171466(0x17f),'description':a77_0x171466(0x19d)},DBID_FLAG={'name':a77_0x171466(0x198),'type':'number','description':a77_0x171466(0x19c)},CONFIRM_FLAG={'name':'confirm','type':a77_0x171466(0x182),'description':a77_0x171466(0x18a)},EXPECTED_COUNT_FLAG={'name':a77_0x171466(0x178),'type':a77_0x171466(0x17f),'description':a77_0x171466(0x17e)};function a77_0x3863(_0x129657,_0x537073){_0x129657=_0x129657-0x174;const _0x2a282c=a77_0x2a28();let _0x3863f4=_0x2a282c[_0x129657];return _0x3863f4;}export const datasetRestore={'service':a77_0x171466(0x197),'command':'restore','description':a77_0x171466(0x19b),'risk':a77_0x171466(0x19e),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x45ac6b){const _0x591d00=a77_0x171466,_0x356d80=_0x45ac6b['num']('id'),_0x366718=_0x45ac6b[_0x591d00(0x196)]('code'),_0x3eecd3=_0x45ac6b[_0x591d00(0x185)]('dbid'),_0x55f77f=[_0x356d80>0x0,Boolean(_0x366718),_0x3eecd3>0x0][_0x591d00(0x189)](Boolean);if(_0x55f77f[_0x591d00(0x184)]===0x0)throw CliErrors['validation'](_0x591d00(0x18e));if(_0x55f77f[_0x591d00(0x184)]>0x1)throw CliErrors[_0x591d00(0x179)](_0x591d00(0x1aa));},async 'dryRun'(_0x1643a6){const _0xe831a1=a77_0x171466,_0x51f704=await resolveTargets(_0x1643a6);return{'method':_0xe831a1(0x191),'url':_0xe831a1(0x181),'body':{'appCode':_0x1643a6[_0xe831a1(0x177)],'count':_0x51f704['length'],'datasets':_0x51f704},'description':_0xe831a1(0x195)+_0x51f704['length']+'\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.'};},async 'execute'(_0x427cc6){const _0x17fe9a=a77_0x171466;if(!_0x427cc6['bool'](_0x17fe9a(0x1a6)))throw CliErrors['validation'](_0x17fe9a(0x183),_0x17fe9a(0x194));const _0x3dd898=await resolveTargets(_0x427cc6),_0x10ec62=[],_0x2c1e19=[];for(const _0x375b1a of _0x3dd898){try{await restoreDataset(_0x427cc6[_0x17fe9a(0x177)],_0x375b1a['id']),_0x10ec62[_0x17fe9a(0x188)](_0x375b1a);}catch(_0x9b161f){_0x2c1e19[_0x17fe9a(0x188)]({..._0x375b1a,'error':_0x9b161f instanceof Error?_0x9b161f[_0x17fe9a(0x19f)]:String(_0x9b161f)});}}if(_0x2c1e19['length']>0x0)return{'ok':![],'data':{'requested':_0x3dd898[_0x17fe9a(0x184)],'restoredCount':_0x10ec62['length'],'failedCount':_0x2c1e19[_0x17fe9a(0x184)],'restored':_0x10ec62,'failed':_0x2c1e19},'message':_0x17fe9a(0x192)+_0x10ec62[_0x17fe9a(0x184)]+'/'+_0x3dd898[_0x17fe9a(0x184)]+_0x17fe9a(0x18d)+_0x2c1e19[_0x17fe9a(0x184)]+_0x17fe9a(0x176)};return{'ok':!![],'data':{'requested':_0x3dd898['length'],'restoredCount':_0x10ec62[_0x17fe9a(0x184)],'restored':_0x10ec62},'message':_0x17fe9a(0x192)+_0x10ec62[_0x17fe9a(0x184)]+_0x17fe9a(0x193)};}};async function resolveTargets(_0x56c9f9){const _0x1fc1bc=a77_0x171466,_0x3dba7f=_0x56c9f9['num']('id'),_0xef2d47=_0x56c9f9[_0x1fc1bc(0x196)](_0x1fc1bc(0x187)),_0x4bc99f=_0x56c9f9['num'](_0x1fc1bc(0x198));let _0x545537;_0xef2d47?(_0x545537=await listDatasets(_0x56c9f9['appCode'],{'code':_0xef2d47,'deleted':!![]}),_0x545537=_0x545537[_0x1fc1bc(0x189)](_0x2510b4=>_0x2510b4['code']===_0xef2d47)):(_0x545537=await listDatasets(_0x56c9f9['appCode'],{'deleted':!![]}),_0x3dba7f>0x0&&(_0x545537=_0x545537['filter'](_0x2ebd22=>_0x2ebd22['id']===_0x3dba7f)),_0x4bc99f>0x0&&(_0x545537=_0x545537[_0x1fc1bc(0x189)](_0x514a0b=>_0x514a0b[_0x1fc1bc(0x17c)]?.[_0x1fc1bc(0x199)]===_0x4bc99f)));const _0xe46c4c=_0x545537[_0x1fc1bc(0x1a7)](normalizeTarget);if(_0xe46c4c['length']===0x0){const _0x513c16=_0xef2d47||(_0x3dba7f>0x0?'id='+_0x3dba7f:_0x1fc1bc(0x174)+_0x4bc99f);throw CliErrors[_0x1fc1bc(0x179)](_0x1fc1bc(0x1a2)+_0x513c16+'.');}const _0x39c00f=_0x56c9f9[_0x1fc1bc(0x185)]('expected-count');if(_0x39c00f>0x0&&_0xe46c4c['length']!==_0x39c00f)throw CliErrors[_0x1fc1bc(0x179)](_0x1fc1bc(0x1a9)+_0xe46c4c[_0x1fc1bc(0x184)]+_0x1fc1bc(0x19a)+_0x39c00f+'.');return _0xe46c4c;}function normalizeTarget(_0x10173d){const _0x479f9a=a77_0x171466,_0x2c3d1b=_0x10173d[_0x479f9a(0x17c)]??{};return{'id':_0x10173d['id'],'code':_0x10173d[_0x479f9a(0x187)],'name':_0x10173d[_0x479f9a(0x1a8)],'description':_0x10173d['description'],'source':_0x10173d['source'],'dbId':_0x2c3d1b[_0x479f9a(0x199)],'dbName':_0x2c3d1b[_0x479f9a(0x175)],'tableName':_0x2c3d1b[_0x479f9a(0x1a5)],'relatedPageCount':Array[_0x479f9a(0x18c)](_0x10173d['relationPages'])?_0x10173d[_0x479f9a(0x17a)]['length']:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a78_0x58fb(_0x46b3c5,_0x51c42c){_0x46b3c5=_0x46b3c5-0xa7;const _0x183f06=a78_0x183f();let _0x58fb84=_0x183f06[_0x46b3c5];return _0x58fb84;}(function(_0x343307,_0x160f5a){const _0x29ff90=a78_0x58fb,_0xb14a77=_0x343307();while(!![]){try{const _0x484564=-parseInt(_0x29ff90(0xb7))/0x1+parseInt(_0x29ff90(0xb2))/0x2+parseInt(_0x29ff90(0xaf))/0x3+parseInt(_0x29ff90(0xb1))/0x4*(-parseInt(_0x29ff90(0xb8))/0x5)+parseInt(_0x29ff90(0xaa))/0x6+parseInt(_0x29ff90(0xb6))/0x7+parseInt(_0x29ff90(0xba))/0x8*(parseInt(_0x29ff90(0xbd))/0x9);if(_0x484564===_0x160f5a)break;else _0xb14a77['push'](_0xb14a77['shift']());}catch(_0x3726b7){_0xb14a77['push'](_0xb14a77['shift']());}}}(a78_0x183f,0x4aa81));import{CliErrors}from'../../errors.js';export const DB_ANALYSIS_MAX_TABLES_PER_BATCH=0xa;export const DB_ANALYSIS_BATCH_TARGET_BYTES=0x3c0;export const DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES=0x400;export const DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE=0x3c;export function normalizeAnalysisTableNames(_0x2ae929){const _0x5f2256=a78_0x58fb,_0x2d07f3=new Set(),_0x5e53f4=[];for(const _0xdb5f1e of _0x2ae929[_0x5f2256(0xb5)](',')){const _0x5660bc=_0xdb5f1e[_0x5f2256(0xbe)]();if(!_0x5660bc||_0x2d07f3[_0x5f2256(0xb0)](_0x5660bc))continue;_0x2d07f3['add'](_0x5660bc),_0x5e53f4['push'](_0x5660bc);}return _0x5e53f4;}export function measureAnalysisInputParamsBytes(_0x8b1d4,_0x13857c){const _0x4ae230=a78_0x58fb;return Buffer[_0x4ae230(0xb3)](JSON[_0x4ae230(0xa9)]({'dbLinkId':_0x8b1d4,'tableNames':_0x13857c}),_0x4ae230(0xad));}export function buildAnalysisBatchPlan(_0xecb9d2,_0x413f62){const _0x4521c1=a78_0x58fb;if(_0x413f62[_0x4521c1(0xbc)]===0x0)throw CliErrors['validation'](_0x4521c1(0xbf));const _0x2b5c6a=[];let _0xe376da=[];for(const _0x4253e2 of _0x413f62){const _0x5e73a2=[..._0xe376da,_0x4253e2],_0x11ae6c=_0x5e73a2[_0x4521c1(0xbc)]>DB_ANALYSIS_MAX_TABLES_PER_BATCH||measureAnalysisInputParamsBytes(_0xecb9d2,_0x5e73a2)>DB_ANALYSIS_BATCH_TARGET_BYTES;_0x11ae6c&&_0xe376da[_0x4521c1(0xbc)]>0x0?(_0x2b5c6a[_0x4521c1(0xb4)](_0xe376da),_0xe376da=[_0x4253e2]):_0xe376da=_0x5e73a2;const _0x321be9=measureAnalysisInputParamsBytes(_0xecb9d2,_0xe376da);if(_0x321be9>DB_ANALYSIS_BATCH_TARGET_BYTES)throw CliErrors[_0x4521c1(0xa7)](_0x4521c1(0xab)+_0x4253e2+_0x4521c1(0xbb)+_0x321be9+_0x4521c1(0xac)+DB_ANALYSIS_BATCH_TARGET_BYTES+_0x4521c1(0xb9));}_0xe376da[_0x4521c1(0xbc)]>0x0&&_0x2b5c6a[_0x4521c1(0xb4)](_0xe376da);const _0x2a9d11=_0x2b5c6a['map']((_0x1a9725,_0x254615)=>({'index':_0x254615+0x1,'tableCount':_0x1a9725['length'],'inputParamsBytes':measureAnalysisInputParamsBytes(_0xecb9d2,_0x1a9725),'estimatedDurationSeconds':_0x1a9725['length']*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'tableNames':_0x1a9725})),_0x5a6102=_0x413f62[_0x4521c1(0xbc)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE;return{'dbLinkId':_0xecb9d2,'tableCount':_0x413f62[_0x4521c1(0xbc)],'batchCount':_0x2a9d11[_0x4521c1(0xbc)],'maxTablesPerBatch':DB_ANALYSIS_MAX_TABLES_PER_BATCH,'maxSerializedBytesPerBatch':DB_ANALYSIS_BATCH_TARGET_BYTES,'serverInputParamsLimitBytes':DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,'planningEstimate':{'basis':_0x4521c1(0xa8),'assumedSecondsPerTable':DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'estimatedTotalSeconds':_0x5a6102,'estimatedTotalMinutes':Math[_0x4521c1(0xae)](_0x5a6102/0x3c)},'batches':_0x2a9d11};}function a78_0x183f(){const _0x50bae3=['2784924yUACJV','Table\x20\x22','\x20bytes,\x20limit\x20','utf8','ceil','349977PHglCt','has','60igbdkP','670108jIUIxT','byteLength','push','split','83839KfXLfZ','549186RLiZyk','64595TTiDmI','\x20bytes.','193472AWSTHE','\x22\x20cannot\x20fit\x20in\x20one\x20database\x20analysis\x20batch:\x20','length','45cLifFc','trim','At\x20least\x20one\x20table\x20name\x20is\x20required\x20for\x20database\x20analysis\x20planning.','validation','heuristic','stringify'];a78_0x183f=function(){return _0x50bae3;};return a78_0x183f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a79_0x5b4b40=a79_0x2e0c;(function(_0x2c86f6,_0x5a3e29){const _0x36ea93=a79_0x2e0c,_0x1ffbb8=_0x2c86f6();while(!![]){try{const _0x42b2ba=-parseInt(_0x36ea93(0xa8))/0x1+parseInt(_0x36ea93(0xac))/0x2*(parseInt(_0x36ea93(0xa1))/0x3)+-parseInt(_0x36ea93(0xa9))/0x4+-parseInt(_0x36ea93(0xab))/0x5*(-parseInt(_0x36ea93(0xa4))/0x6)+parseInt(_0x36ea93(0xaf))/0x7*(parseInt(_0x36ea93(0x9e))/0x8)+-parseInt(_0x36ea93(0xb0))/0x9*(-parseInt(_0x36ea93(0x9d))/0xa)+parseInt(_0x36ea93(0xaa))/0xb*(-parseInt(_0x36ea93(0xa2))/0xc);if(_0x42b2ba===_0x5a3e29)break;else _0x1ffbb8['push'](_0x1ffbb8['shift']());}catch(_0x4f1d60){_0x1ffbb8['push'](_0x1ffbb8['shift']());}}}(a79_0x10eb,0xc1ee7));import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildAnalysisBatchPlan,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';function a79_0x2e0c(_0x26d05c,_0x18ef76){_0x26d05c=_0x26d05c-0x9a;const _0x10eb6a=a79_0x10eb();let _0x2e0c22=_0x10eb6a[_0x26d05c];return _0x2e0c22;}function a79_0x10eb(){const _0x455afe=['tables','2274UHaPlg','num','tableCount','\x20seconds\x20per\x20table;\x20no\x20server\x20task\x20or\x20planId\x20was\x20created','380680fTlMGb','337064KOdHAc','57002baIJcG','11195XHMLYk','1382642AOdDDx','analyze-batch-plan','str','343rCITRu','12357IJMhlw','planningEstimate','read','\x20serial\x20batch(es)\x20for\x20db\x20link\x20','assumedSecondsPerTable','string','10nMJcdN','6416mCtaln','Prepared\x20local\x20batch\x20plan\x20for\x20','Comma-separated\x20table\x20names\x20to\x20split\x20into\x20safe\x20serial\x20batches','3lzdTlN','744DtwehW'];a79_0x10eb=function(){return _0x455afe;};return a79_0x10eb();}export const dbAnalyzeBatchPlan={'service':'db','command':a79_0x5b4b40(0xad),'description':'Preview\x20deterministic\x20local\x20batches\x20and\x20heuristic\x20duration\x20estimates\x20without\x20creating\x20a\x20server\x20task\x20or\x20planId','risk':a79_0x5b4b40(0xb2),'requiresAuth':![],'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a79_0x5b4b40(0xa3),'type':a79_0x5b4b40(0x9c),'required':!![],'description':a79_0x5b4b40(0xa0)}],async 'execute'(_0x32adf5){const _0xed85c1=a79_0x5b4b40,_0x2dd587=_0x32adf5[_0xed85c1(0xa5)]('id'),_0x4d8963=normalizeAnalysisTableNames(_0x32adf5[_0xed85c1(0xae)](_0xed85c1(0xa3))),_0x8101d0=buildAnalysisBatchPlan(_0x2dd587,_0x4d8963);return{'ok':!![],'data':_0x8101d0,'message':_0xed85c1(0x9f)+_0x8101d0[_0xed85c1(0xa6)]+'\x20table(s)\x20in\x20'+_0x8101d0['batchCount']+_0xed85c1(0x9a)+_0x2dd587+';\x20estimated\x20about\x20'+_0x8101d0[_0xed85c1(0xb1)]['estimatedTotalMinutes']+'\x20minute(s)\x20at\x20'+_0x8101d0[_0xed85c1(0xb1)][_0xed85c1(0x9b)]+_0xed85c1(0xa7)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a80_0x2b27f8=a80_0x104c;function a80_0x104c(_0x39b717,_0x412829){_0x39b717=_0x39b717-0x1c1;const _0x498c33=a80_0x498c();let _0x104c1a=_0x498c33[_0x39b717];return _0x104c1a;}(function(_0x3529ad,_0x3da325){const _0x1dd2a2=a80_0x104c,_0x37f61f=_0x3529ad();while(!![]){try{const _0x2fa107=parseInt(_0x1dd2a2(0x1ca))/0x1*(parseInt(_0x1dd2a2(0x1cb))/0x2)+-parseInt(_0x1dd2a2(0x1c3))/0x3+-parseInt(_0x1dd2a2(0x1cd))/0x4+parseInt(_0x1dd2a2(0x1cc))/0x5+-parseInt(_0x1dd2a2(0x1c1))/0x6*(-parseInt(_0x1dd2a2(0x1c7))/0x7)+-parseInt(_0x1dd2a2(0x1ce))/0x8*(-parseInt(_0x1dd2a2(0x1c4))/0x9)+-parseInt(_0x1dd2a2(0x1c8))/0xa;if(_0x2fa107===_0x3da325)break;else _0x37f61f['push'](_0x37f61f['shift']());}catch(_0xb163a1){_0x37f61f['push'](_0x37f61f['shift']());}}}(a80_0x498c,0xb7ba7));function a80_0x498c(){const _0x34ea06=['8iNhDUf','1929195PINdrh','3208972EmHfZZ','7560296exhnTo','plan','num','1438488wSukjk','analyze-cancel','268782onCedI','9hpwJcK','str','write','28seWfaB','20263640Vhyglx','string','345221GMRXzY'];a80_0x498c=function(){return _0x34ea06;};return a80_0x498c();}import{cancelDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':a80_0x2b27f8(0x1c2),'description':'Cancel\x20an\x20existing\x20schema\x20analysis\x20by\x20explicit\x20plan\x20/\x20trace\x20id','risk':a80_0x2b27f8(0x1c6),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':a80_0x2b27f8(0x1c9),'required':!![],'description':'Existing\x20analysis\x20plan\x20/\x20trace\x20id\x20to\x20cancel'}],async 'execute'(_0x67f54c){const _0x15d334=a80_0x2b27f8,_0x207d90=_0x67f54c[_0x15d334(0x1d0)]('id'),_0x313022=_0x67f54c[_0x15d334(0x1c5)](_0x15d334(0x1cf));return await cancelDbAnalysis(_0x313022),{'ok':!![],'data':{'dbLinkId':_0x207d90,'planId':_0x313022},'message':'Cancel\x20requested\x20for\x20plan\x20'+_0x313022};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x2583b7=a81_0x4c6b;(function(_0x1ea25f,_0xb089dc){const _0x367f9f=a81_0x4c6b,_0x509206=_0x1ea25f();while(!![]){try{const _0x114e34=-parseInt(_0x367f9f(0x1da))/0x1*(-parseInt(_0x367f9f(0x1e6))/0x2)+-parseInt(_0x367f9f(0x1e0))/0x3+-parseInt(_0x367f9f(0x1ea))/0x4*(parseInt(_0x367f9f(0x1e1))/0x5)+-parseInt(_0x367f9f(0x1ec))/0x6+-parseInt(_0x367f9f(0x1f4))/0x7*(parseInt(_0x367f9f(0x1f6))/0x8)+parseInt(_0x367f9f(0x1e4))/0x9+parseInt(_0x367f9f(0x1de))/0xa*(parseInt(_0x367f9f(0x1e7))/0xb);if(_0x114e34===_0xb089dc)break;else _0x509206['push'](_0x509206['shift']());}catch(_0x1e2331){_0x509206['push'](_0x509206['shift']());}}}(a81_0x40c3,0x7faae));import{startDbAnalysis}from'../../core/api-client.js';function a81_0x40c3(){const _0x425997=['Targeted\x20database\x20analysis\x20payload\x20is\x20too\x20large:\x20','4357827gyHwVr','\x20bytes,\x20limit\x20','2WMgtrL','429OvSSUi','Started\x20analysis\x20for\x20db\x20link\x20','At\x20least\x20one\x20table\x20name\x20is\x20required\x20when\x20--tables\x20is\x20provided.','3606764zVAKtv','appCode','4034766QGyLXi','length','\x20table(s),\x20','write','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','tables','string','num','14TwIISw','\x20bytes.\x20Run\x20`','3909464NGMSgZ','782338khgQFF','\x20--tables\x20<tables>`\x20and\x20start\x20each\x20batch\x20serially.','str','validation','483490OVxAgy','\x20db\x20analyze-batch-plan\x20--id\x20','233124YNOcMx','5hOUuSE','flag'];a81_0x40c3=function(){return _0x425997;};return a81_0x40c3();}import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';import{DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,measureAnalysisInputParamsBytes,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';function a81_0x4c6b(_0xed154b,_0x38152c){_0xed154b=_0xed154b-0x1da;const _0x40c3db=a81_0x40c3();let _0x4c6bcc=_0x40c3db[_0xed154b];return _0x4c6bcc;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbAnalyzeStart={'service':'db','command':'analyze-start','description':'Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','risk':a81_0x2583b7(0x1ef),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a81_0x2583b7(0x1f1),'type':a81_0x2583b7(0x1f2),'description':a81_0x2583b7(0x1f0)}],async 'execute'(_0x2a35ae){const _0x3f0069=a81_0x2583b7,_0x555943=_0x2a35ae[_0x3f0069(0x1f3)]('id'),_0x21aed4=_0x2a35ae[_0x3f0069(0x1dc)](_0x3f0069(0x1f1)),_0x553e7b=_0x2a35ae[_0x3f0069(0x1e2)](_0x3f0069(0x1f1))!==undefined,_0x91b467=_0x553e7b?normalizeAnalysisTableNames(_0x21aed4):undefined;if(_0x91b467&&_0x91b467[_0x3f0069(0x1ed)]===0x0)throw CliErrors[_0x3f0069(0x1dd)](_0x3f0069(0x1e9));if(_0x91b467&&_0x91b467[_0x3f0069(0x1ed)]>0x0){const _0x6789d8=measureAnalysisInputParamsBytes(_0x555943,_0x91b467);if(_0x6789d8>DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES)throw CliErrors['validation'](_0x3f0069(0x1e3)+_0x91b467['length']+_0x3f0069(0x1ee)+_0x6789d8+_0x3f0069(0x1e5)+DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES+_0x3f0069(0x1f5)+CLI_BIN_NAME+_0x3f0069(0x1df)+_0x555943+_0x3f0069(0x1db));}const {planId:_0x473ea,estimatedMinutes:_0x449c02,estimatedDurationDesc:_0x4a9353}=await startDbAnalysis(_0x555943,_0x91b467),_0x5d2cfc=buildDbPageLinks(_0x2a35ae[_0x3f0069(0x1eb)],_0x555943);return{'ok':!![],'data':{'dbLinkId':_0x555943,'planId':_0x473ea,'tableNames':_0x91b467??[],'serverEstimate':{'estimatedMinutes':_0x449c02,'estimatedDurationDesc':_0x4a9353},..._0x5d2cfc?{'links':_0x5d2cfc}:{}},'message':_0x3f0069(0x1e8)+_0x555943};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x44a4b9=a82_0xee1d;(function(_0x317a43,_0x4bf172){const _0x4c1cbb=a82_0xee1d,_0x1baf59=_0x317a43();while(!![]){try{const _0x1daef0=parseInt(_0x4c1cbb(0x1d3))/0x1+parseInt(_0x4c1cbb(0x1bc))/0x2+-parseInt(_0x4c1cbb(0x1d2))/0x3*(parseInt(_0x4c1cbb(0x1d1))/0x4)+-parseInt(_0x4c1cbb(0x1c3))/0x5+parseInt(_0x4c1cbb(0x1c5))/0x6*(parseInt(_0x4c1cbb(0x1d4))/0x7)+-parseInt(_0x4c1cbb(0x1bf))/0x8*(-parseInt(_0x4c1cbb(0x1c9))/0x9)+parseInt(_0x4c1cbb(0x1c0))/0xa;if(_0x1daef0===_0x4bf172)break;else _0x1baf59['push'](_0x1baf59['shift']());}catch(_0x47eda1){_0x1baf59['push'](_0x1baf59['shift']());}}}(a82_0x4751,0xa5b71));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';function a82_0x4751(){const _0x5cd4fb=['plan','FAILED','appCode','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','status','accumulatedErrorTypeCounts','1185244nSPnkt','length','Analysis\x20status\x20for\x20','35016XvcwPX','1936090gApiUW','keys','SUCCESS','6736380SaQCsG','isFinite','115932zBHVoU','num','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','RETRYING','855UHkQdW','string','str','PARTIAL_SUCCESS','now','CANCELLED','has','parse','8eZDbrd','1959123TiviZX','1125337VcfJxU','364dQnkAd','trim','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','number','costTimeMs','object','isArray'];a82_0x4751=function(){return _0x5cd4fb;};return a82_0x4751();}const TERMINAL_STATUSES=new Set([a82_0x44a4b9(0x1c2),a82_0x44a4b9(0x1cc),a82_0x44a4b9(0x1b6),a82_0x44a4b9(0x1ce)]);export const dbAnalyzeStatus={'service':'db','command':'analyze-status','description':a82_0x44a4b9(0x1b8),'risk':'read','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a82_0x44a4b9(0x1b5),'type':a82_0x44a4b9(0x1ca),'required':!![],'description':a82_0x44a4b9(0x1d6)}],async 'execute'(_0x554f96){const _0x105004=a82_0x44a4b9,_0x1c3140=_0x554f96[_0x105004(0x1c6)]('id'),_0x329f57=_0x554f96[_0x105004(0x1cb)](_0x105004(0x1b5)),_0x578627=await getDbAnalysisStatus(_0x329f57),_0x1af2a9=TERMINAL_STATUSES[_0x105004(0x1cf)](_0x578627['status']??''),{parsedJobContext:_0x42da28,jobContextParseWarning:_0xb28224}=parseJobContext(_0x578627['jobContext']),_0x212987=readAccumulatedErrorTypeCounts(_0x42da28),_0x3e363e=buildDbPageLinks(_0x554f96[_0x105004(0x1b7)],_0x1c3140);return{'ok':!![],'data':{'dbLinkId':_0x1c3140,'planId':_0x329f57,'status':_0x578627,'parsedJobContext':_0x42da28,'accumulatedErrorTypeCounts':_0x212987,'accumulatedErrorTypeCountsAdvisory':_0x212987?_0x105004(0x1b9):_0x105004(0x1c7),'isTerminal':_0x1af2a9,'isRetrying':_0x578627[_0x105004(0x1ba)]===_0x105004(0x1c8),'elapsedMs':calculateElapsedMs(_0x578627,_0x1af2a9),'jobContextParseWarning':_0xb28224,..._0x3e363e?{'links':_0x3e363e}:{}},'message':_0x105004(0x1be)+_0x329f57};}};function readAccumulatedErrorTypeCounts(_0x5a5b73){const _0x411ed7=a82_0x44a4b9,_0x4586c6=_0x5a5b73?.[_0x411ed7(0x1bb)];if(!_0x4586c6||typeof _0x4586c6!==_0x411ed7(0x1d9)||Array[_0x411ed7(0x1da)](_0x4586c6))return null;if(Object[_0x411ed7(0x1c1)](_0x4586c6)[_0x411ed7(0x1bd)]===0x0)return null;return _0x4586c6;}function a82_0xee1d(_0x4e3d11,_0x21d608){_0x4e3d11=_0x4e3d11-0x1b5;const _0x4751f9=a82_0x4751();let _0xee1da8=_0x4751f9[_0x4e3d11];return _0xee1da8;}function parseJobContext(_0x4cac22){const _0x5a4f67=a82_0x44a4b9;if(!_0x4cac22?.[_0x5a4f67(0x1d5)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x42d57b=JSON['parse'](_0x4cac22);if(_0x42d57b&&typeof _0x42d57b===_0x5a4f67(0x1d9)&&!Array[_0x5a4f67(0x1da)](_0x42d57b))return{'parsedJobContext':_0x42d57b,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':'jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.'};}function calculateElapsedMs(_0x363532,_0x936521){const _0x3aef50=a82_0x44a4b9;if(typeof _0x363532['costTimeMs']==='number'&&Number[_0x3aef50(0x1c4)](_0x363532['costTimeMs'])&&_0x363532[_0x3aef50(0x1d8)]>=0x0)return _0x363532[_0x3aef50(0x1d8)];const _0x18e6f7=toTimestamp(_0x363532['startTime']);if(_0x18e6f7===null)return null;const _0x3a37eb=toTimestamp(_0x363532['endTime']),_0x21cb53=_0x3a37eb??(_0x936521?null:Date[_0x3aef50(0x1cd)]());if(_0x21cb53===null||_0x21cb53<_0x18e6f7)return null;return _0x21cb53-_0x18e6f7;}function toTimestamp(_0x5c9d72){const _0x34d5d9=a82_0x44a4b9;if(typeof _0x5c9d72===_0x34d5d9(0x1d7))return Number[_0x34d5d9(0x1c4)](_0x5c9d72)?_0x5c9d72:null;if(typeof _0x5c9d72!==_0x34d5d9(0x1ca)||_0x5c9d72['trim']()==='')return null;const _0x1eeffa=Number(_0x5c9d72);if(Number['isFinite'](_0x1eeffa))return _0x1eeffa;const _0x4c5524=Date[_0x34d5d9(0x1d0)](_0x5c9d72);return Number['isNaN'](_0x4c5524)?null:_0x4c5524;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x4026e4=a83_0x57ab;(function(_0x256219,_0x3c94b1){const _0x28dc44=a83_0x57ab,_0x598c3a=_0x256219();while(!![]){try{const _0x2a97ff=parseInt(_0x28dc44(0x1bb))/0x1*(-parseInt(_0x28dc44(0x1d6))/0x2)+parseInt(_0x28dc44(0x1d0))/0x3*(-parseInt(_0x28dc44(0x1de))/0x4)+-parseInt(_0x28dc44(0x1dc))/0x5*(-parseInt(_0x28dc44(0x1dd))/0x6)+-parseInt(_0x28dc44(0x1b7))/0x7+parseInt(_0x28dc44(0x1d5))/0x8+-parseInt(_0x28dc44(0x1cb))/0x9+parseInt(_0x28dc44(0x1cc))/0xa*(parseInt(_0x28dc44(0x1ce))/0xb);if(_0x2a97ff===_0x3c94b1)break;else _0x598c3a['push'](_0x598c3a['shift']());}catch(_0x4182f2){_0x598c3a['push'](_0x598c3a['shift']());}}}(a83_0x1e43,0x4ee0d));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';import{buildDbPageLinks,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a83_0x4026e4(0x1db),'description':a83_0x4026e4(0x1c0),'risk':a83_0x4026e4(0x1e5),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a83_0x4026e4(0x1da),'required':!![],'description':a83_0x4026e4(0x1e8)},DB_TYPE_FLAG,{'name':a83_0x4026e4(0x1e2),'type':'string','description':a83_0x4026e4(0x1bf),'default':'8.0'},{'name':'dburl','type':a83_0x4026e4(0x1da),'required':!![],'description':'Host\x20and\x20port:\x20host:port'},{'name':a83_0x4026e4(0x1c3),'type':a83_0x4026e4(0x1da),'required':!![],'description':a83_0x4026e4(0x1c5)},{'name':a83_0x4026e4(0x1d3),'type':a83_0x4026e4(0x1da),'required':!![],'description':a83_0x4026e4(0x1be)},{'name':a83_0x4026e4(0x1df),'type':a83_0x4026e4(0x1da),'description':a83_0x4026e4(0x1c8)},{'name':'dbdesc','type':a83_0x4026e4(0x1da),'description':'Human-readable\x20description'},{'name':a83_0x4026e4(0x1ca),'type':a83_0x4026e4(0x1c6),'description':a83_0x4026e4(0x1bd),'default':![]}],async 'validate'(_0x368edb){const _0x1d83bb=a83_0x4026e4,_0x504d1e=_0x368edb['str'](_0x1d83bb(0x1d9))[_0x1d83bb(0x1cf)]();if(!validateDbUrl(_0x504d1e))throw CliErrors[_0x1d83bb(0x1e3)](_0x1d83bb(0x1c2)+_0x504d1e+'\x22',_0x1d83bb(0x1bc));},async 'dryRun'(_0x38a795){const _0x59da69=a83_0x4026e4,_0x18bcb2={'appCode':_0x38a795[_0x59da69(0x1e7)],'dbName':_0x38a795[_0x59da69(0x1d8)](_0x59da69(0x1d4)),'dbType':_0x38a795[_0x59da69(0x1d8)]('dbtype'),'dbVersion':_0x38a795[_0x59da69(0x1d8)](_0x59da69(0x1e2))||_0x59da69(0x1cd),'dbUrl':_0x38a795['str'](_0x59da69(0x1d9))[_0x59da69(0x1cf)](),'username':_0x38a795[_0x59da69(0x1d8)](_0x59da69(0x1c3)),'password':_0x59da69(0x1d7),..._0x38a795[_0x59da69(0x1d8)](_0x59da69(0x1df))?{'dbParam':_0x38a795['str'](_0x59da69(0x1df))}:{},..._0x38a795[_0x59da69(0x1d8)]('dbdesc')?{'dbDesc':_0x38a795['str'](_0x59da69(0x1c4))}:{}};return{'method':_0x59da69(0x1e6),'url':'/smartapi/dblink/create','body':_0x18bcb2,'description':[_0x59da69(0x1c7),_0x38a795[_0x59da69(0x1b9)]('autostart')?_0x59da69(0x1b6):_0x59da69(0x1d1)][_0x59da69(0x1e1)]('\x0a')};},async 'execute'(_0x4b6825){const _0x514cc3=a83_0x4026e4,_0x569a52={'appCode':_0x4b6825[_0x514cc3(0x1e7)],'dbName':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1d4)),'dbType':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1e4)),'dbVersion':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1e2))||_0x514cc3(0x1cd),'dbUrl':_0x4b6825['str'](_0x514cc3(0x1d9))['trim'](),'username':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1c3)),'password':_0x4b6825['str'](_0x514cc3(0x1d3)),..._0x4b6825[_0x514cc3(0x1d8)]('dbparam')?{'dbParam':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1df))}:{},..._0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1c4))?{'dbDesc':_0x4b6825[_0x514cc3(0x1d8)](_0x514cc3(0x1c4))}:{}},{id:_0x477e41,entity:_0x15ba93}=normalizeEntityWithIdResponse(await createDbLink(_0x569a52));if(!_0x477e41)return{'ok':![],'message':_0x514cc3(0x1b8),'data':sanitizeDbLinkForOutput(_0x15ba93)};let _0x79d7bf,_0x938993;if(_0x4b6825[_0x514cc3(0x1b9)](_0x514cc3(0x1ca)))try{_0x79d7bf=(await startDbAnalysis(_0x477e41))[_0x514cc3(0x1e0)];}catch(_0x32cec8){_0x938993=_0x32cec8 instanceof Error?_0x32cec8[_0x514cc3(0x1c1)]:String(_0x32cec8);}const _0x42d148=buildDbPageLinks(_0x4b6825['appCode'],_0x477e41),_0x48aed5={'connection':sanitizeDbLinkForOutput(_0x15ba93),..._0x42d148?{'links':{'databasePage':_0x42d148['databasePage']}}:{},..._0x79d7bf?{'analysisPlanId':_0x79d7bf}:{},..._0x938993?{'analysisStartWarning':_0x938993}:{}};let _0x544134;return _0x4b6825['bool'](_0x514cc3(0x1ca))?_0x938993?_0x544134='Created\x20db\x20link\x20'+_0x477e41+_0x514cc3(0x1c9):_0x544134=_0x514cc3(0x1ba)+_0x477e41+_0x514cc3(0x1d2):_0x544134=_0x514cc3(0x1ba)+_0x477e41,{'ok':!![],'data':_0x48aed5,'message':_0x544134};}};function a83_0x57ab(_0xccccfd,_0x4a7d3a){_0xccccfd=_0xccccfd-0x1b6;const _0x1e4365=a83_0x1e43();let _0x57ab48=_0x1e4365[_0xccccfd];return _0x57ab48;}function a83_0x1e43(){const _0x34330a=['planId','join','dbversion','validation','dbtype','write','POST','appCode','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','2268546QLXyfd','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','bool','Created\x20db\x20link\x20','1tvraje','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','After\x20create,\x20start\x20schema\x20analysis','Database\x20password','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','message','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','username','dbdesc','Database\x20username','boolean','Create\x20dblink','Extra\x20JDBC-style\x20connection\x20parameters\x20string',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','autostart','4152690rTdtJq','50qcpBqQ','8.0','2311727cugEYG','trim','75yzkdfl','No\x20follow-up\x20analysis','\x20and\x20started\x20analysis','password','dbname','1851704FquCeR','1262934WZTdCX','[redacted]','str','dburl','string','create','34495GsAsNC','498AJyMDJ','18372DzknTD','dbparam'];a83_0x1e43=function(){return _0x34330a;};return a83_0x1e43();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a84_0x379563=a84_0x2755;(function(_0x385503,_0x521c99){const _0x4b0ea3=a84_0x2755,_0xac302d=_0x385503();while(!![]){try{const _0x133c97=parseInt(_0x4b0ea3(0x1a6))/0x1*(parseInt(_0x4b0ea3(0x199))/0x2)+parseInt(_0x4b0ea3(0x19d))/0x3*(parseInt(_0x4b0ea3(0x19e))/0x4)+-parseInt(_0x4b0ea3(0x1a0))/0x5+-parseInt(_0x4b0ea3(0x19c))/0x6*(parseInt(_0x4b0ea3(0x1a3))/0x7)+-parseInt(_0x4b0ea3(0x1a1))/0x8+-parseInt(_0x4b0ea3(0x1a7))/0x9+parseInt(_0x4b0ea3(0x19b))/0xa*(parseInt(_0x4b0ea3(0x19a))/0xb);if(_0x133c97===_0x521c99)break;else _0xac302d['push'](_0xac302d['shift']());}catch(_0x331714){_0xac302d['push'](_0xac302d['shift']());}}}(a84_0x3144,0x8820a));import{deleteDbLink}from'../../core/api-client.js';function a84_0x2755(_0x599f0d,_0x2a76fa){_0x599f0d=_0x599f0d-0x199;const _0x3144a8=a84_0x3144();let _0x27556d=_0x3144a8[_0x599f0d];return _0x27556d;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a84_0x3144(){const _0x1fc0e3=['8427816LRlWRC','Deleted\x20db\x20link\x20','2179086KFmLAX','delete','high-risk-write','1693EAsAoQ','6791418FJLMcD','Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','914eubPxP','583EjkVwU','398710jGqPJZ','6DIzkHL','131052bQNdEz','28HhkQSY','num','2578485bQSWIB'];a84_0x3144=function(){return _0x1fc0e3;};return a84_0x3144();}export const dbDelete={'service':'db','command':a84_0x379563(0x1a4),'description':a84_0x379563(0x1a8),'risk':a84_0x379563(0x1a5),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3a072e){const _0x2b86bb=a84_0x379563,_0xb0f9f1=_0x3a072e[_0x2b86bb(0x19f)]('id');return await deleteDbLink(_0xb0f9f1),{'ok':!![],'data':{'id':_0xb0f9f1,'deleted':!![]},'message':_0x2b86bb(0x1a2)+_0xb0f9f1};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a85_0x185f(){const _0x3c1385=['1534656DKebzd','52dvboYs','10928ClcrAn','2lRihcA','896cRuenE','detail','53537pRESUL','read','455962lUTHaw','7545096VpgjFa','dbName','db\x20link\x20','2640CKWyEO','2908080txFyge','314795tGDjFq'];a85_0x185f=function(){return _0x3c1385;};return a85_0x185f();}const a85_0x153d91=a85_0x464b;(function(_0xb40e8b,_0x4e02d7){const _0x10410d=a85_0x464b,_0x3929f7=_0xb40e8b();while(!![]){try{const _0x3dd2bd=-parseInt(_0x10410d(0xdc))/0x1*(parseInt(_0x10410d(0xe1))/0x2)+parseInt(_0x10410d(0xd9))/0x3+-parseInt(_0x10410d(0xda))/0x4*(-parseInt(_0x10410d(0xd8))/0x5)+parseInt(_0x10410d(0xe2))/0x6+-parseInt(_0x10410d(0xdd))/0x7*(-parseInt(_0x10410d(0xdb))/0x8)+-parseInt(_0x10410d(0xd7))/0x9+parseInt(_0x10410d(0xe5))/0xa*(-parseInt(_0x10410d(0xdf))/0xb);if(_0x3dd2bd===_0x4e02d7)break;else _0x3929f7['push'](_0x3929f7['shift']());}catch(_0x502f4b){_0x3929f7['push'](_0x3929f7['shift']());}}}(a85_0x185f,0xaa82d));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a85_0x464b(_0x267149,_0x52b9eb){_0x267149=_0x267149-0xd7;const _0x185f89=a85_0x185f();let _0x464b9b=_0x185f89[_0x267149];return _0x464b9b;}import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':a85_0x153d91(0xde),'description':'Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','risk':a85_0x153d91(0xe0),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1164aa){const _0x36d24d=a85_0x153d91,_0x318b35=_0x1164aa['num']('id'),_0x272eb9=await getDbLinkInfo(_0x318b35);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x272eb9),'message':_0x36d24d(0xe4)+_0x318b35+':\x20'+_0x272eb9[_0x36d24d(0xe3)]};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x38af56=a86_0x216f;(function(_0xd0e044,_0x54734b){const _0x490b69=a86_0x216f,_0x3a9498=_0xd0e044();while(!![]){try{const _0x18a522=parseInt(_0x490b69(0xc3))/0x1*(-parseInt(_0x490b69(0xcc))/0x2)+parseInt(_0x490b69(0xdc))/0x3*(-parseInt(_0x490b69(0xc9))/0x4)+parseInt(_0x490b69(0xc0))/0x5*(parseInt(_0x490b69(0xb5))/0x6)+parseInt(_0x490b69(0xcd))/0x7+-parseInt(_0x490b69(0xc5))/0x8*(parseInt(_0x490b69(0xb6))/0x9)+-parseInt(_0x490b69(0xc1))/0xa+-parseInt(_0x490b69(0xd8))/0xb*(-parseInt(_0x490b69(0xce))/0xc);if(_0x18a522===_0x54734b)break;else _0x3a9498['push'](_0x3a9498['shift']());}catch(_0x34a963){_0x3a9498['push'](_0x3a9498['shift']());}}}(a86_0x2586,0xd5dba));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a86_0x216f(_0x46d4d3,_0x241e05){_0x46d4d3=_0x46d4d3-0xb3;const _0x258672=a86_0x2586();let _0x216f0f=_0x258672[_0x46d4d3];return _0x216f0f;}import{CliErrors}from'../../errors.js';const ALL_PAGE_SIZE=0x64,DIFF_TYPES=[a86_0x38af56(0xdf),a86_0x38af56(0xb8),'DELETED_TABLE','ALREADY_ANALYZED'];function a86_0x2586(){const _0x56009e=['appCode','\x20of\x20','totalCount','size','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','3499495deUdsz','16890350kbAghy','filter','81874pGcyqk','fieldDiff','2787560GcVaXA','string','Page\x20size','deletedColumns','182116lfgVSG','boolean','addedColumns','36EXefNQ','5613923LNZTxR','84XGGboQ','summary','str','tableList','map','Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables','bool','\x20(db\x20link\x20','tableName','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','5720759ATLkJm','Page\x20index\x20(1-based)','changed-only','\x20row(s).','27oTQYNh','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','NEW_TABLE','DELETED_TABLE','length','diffType','num','read','datasetTableCount','all','fromEntries','physicalTableCount','table','modifiedColumns','number','12mhnnHt','36OiGhGJ','diff','MODIFIED_TABLE','page','pagesize'];a86_0x2586=function(){return _0x56009e;};return a86_0x2586();}export const dbDiff={'service':'db','command':a86_0x38af56(0xb7),'description':a86_0x38af56(0xd7),'risk':a86_0x38af56(0xe4),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a86_0x38af56(0xe9),'type':a86_0x38af56(0xc6),'description':a86_0x38af56(0xdd)},{'name':a86_0x38af56(0xb9),'type':a86_0x38af56(0xb4),'description':a86_0x38af56(0xd9),'default':0x1},{'name':a86_0x38af56(0xba),'type':a86_0x38af56(0xb4),'description':a86_0x38af56(0xc7),'default':0x14},{'name':a86_0x38af56(0xe6),'type':'boolean','description':a86_0x38af56(0xbf)},{'name':'changed-only','type':a86_0x38af56(0xca),'description':a86_0x38af56(0xd3)}],async 'execute'(_0x53fbaf){const _0x21a734=a86_0x38af56,_0x34b3df=_0x53fbaf['num']('id'),_0x18ea13=_0x53fbaf[_0x21a734(0xd4)](_0x21a734(0xe6)),_0x3030fc=_0x53fbaf[_0x21a734(0xd4)](_0x21a734(0xda)),_0x596fda=_0x18ea13?0x1:_0x53fbaf[_0x21a734(0xe3)](_0x21a734(0xb9),0x1)||0x1,_0x399266=_0x18ea13?ALL_PAGE_SIZE:_0x53fbaf[_0x21a734(0xe3)](_0x21a734(0xba),0x14)||0x14,_0x2f2c22=_0x53fbaf[_0x21a734(0xd0)](_0x21a734(0xe9))||undefined,_0x2758b9=_0x18ea13?await getAllDbTableDiff(_0x53fbaf[_0x21a734(0xbb)],_0x34b3df,_0x2f2c22):await getDbTableDiff(_0x53fbaf['appCode'],_0x34b3df,{'pageIndex':_0x596fda,'pageSize':_0x399266,'tableName':_0x2f2c22}),_0xfc2f59=_0x2758b9[_0x21a734(0xd1)],_0x5b0b7c=_0x3030fc?_0xfc2f59['filter'](_0x2051c0=>_0x2051c0['diffType']!=='ALREADY_ANALYZED'):_0xfc2f59,_0x267300=Object[_0x21a734(0xe7)](DIFF_TYPES[_0x21a734(0xd2)](_0x4514b3=>[_0x4514b3,_0xfc2f59['filter'](_0x6e729b=>_0x6e729b[_0x21a734(0xe2)]===_0x4514b3)['length']])),_0x949764=_0xfc2f59[_0x21a734(0xc2)](_0x1c8b10=>_0x1c8b10[_0x21a734(0xe2)]===_0x21a734(0xdf)||_0x1c8b10[_0x21a734(0xe2)]===_0x21a734(0xb8))[_0x21a734(0xd2)](_0x32f389=>_0x32f389['tableName']),_0xec2d65=_0xfc2f59['filter'](_0x3a6d35=>_0x3a6d35[_0x21a734(0xe2)]===_0x21a734(0xe0))[_0x21a734(0xd2)](_0x48be2f=>_0x48be2f['tableName']),_0x5b44e1=_0xfc2f59[_0x21a734(0xc2)](_0x51bab6=>_0x51bab6[_0x21a734(0xe2)]===_0x21a734(0xb8))['map'](_0x44fefa=>({'tableName':_0x44fefa[_0x21a734(0xd6)],'addedColumns':_0x44fefa[_0x21a734(0xc4)]?.[_0x21a734(0xcb)]??[],'deletedColumns':_0x44fefa['fieldDiff']?.[_0x21a734(0xc8)]??[],'modifiedColumns':_0x44fefa['fieldDiff']?.[_0x21a734(0xb3)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x34b3df,'page':_0x596fda,'pageSize':_0x399266,'totalCount':_0x2758b9[_0x21a734(0xbd)],'physicalTableCount':_0x2758b9[_0x21a734(0xe8)],'datasetTableCount':_0x2758b9[_0x21a734(0xe5)],..._0x2758b9[_0x21a734(0xcf)]?{'summary':_0x2758b9[_0x21a734(0xcf)]}:{},'summaryByType':_0x267300,'toAnalyzeTables':_0x949764,'deletedTables':_0xec2d65,'modifiedFieldDiffs':_0x5b44e1,'tables':_0x5b0b7c,'tableList':_0x5b0b7c},'message':_0x5b0b7c[_0x21a734(0xe1)]+'\x20row(s),\x20total\x20'+_0x2758b9['totalCount']+_0x21a734(0xd5)+_0x34b3df+')'};}};async function getAllDbTableDiff(_0x2937b6,_0x5470b3,_0x45c96c){const _0x2b806c=a86_0x38af56,_0x1ffa6f=new Map();let _0x5dd0c7=0x1,_0x1b81b2=null;while(!![]){_0x1b81b2=await getDbTableDiff(_0x2937b6,_0x5470b3,{'pageIndex':_0x5dd0c7,'pageSize':ALL_PAGE_SIZE,'tableName':_0x45c96c});const _0x535461=_0x1ffa6f['size'];for(const _0x59a164 of _0x1b81b2['tableList']){_0x1ffa6f['set'](_0x59a164[_0x2b806c(0xd6)],_0x59a164);}if(_0x1ffa6f[_0x2b806c(0xbe)]>=_0x1b81b2['totalCount'])break;if(_0x1b81b2[_0x2b806c(0xd1)][_0x2b806c(0xe1)]===0x0||_0x1ffa6f[_0x2b806c(0xbe)]===_0x535461)throw CliErrors['validation'](_0x2b806c(0xde)+_0x1ffa6f[_0x2b806c(0xbe)]+_0x2b806c(0xbc)+_0x1b81b2[_0x2b806c(0xbd)]+_0x2b806c(0xdb));_0x5dd0c7+=0x1;}return{'totalCount':_0x1b81b2?.[_0x2b806c(0xbd)]??0x0,'physicalTableCount':_0x1b81b2?.[_0x2b806c(0xe8)]??0x0,'datasetTableCount':_0x1b81b2?.[_0x2b806c(0xe5)]??0x0,..._0x1b81b2?.[_0x2b806c(0xcf)]?{'summary':_0x1b81b2['summary']}:{},'tableList':[..._0x1ffa6f['values']()]};}
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3a9764,_0x5b9c76){const _0x5aa1e2=a87_0x290c,_0x159276=_0x3a9764();while(!![]){try{const _0x3a6e1b=-parseInt(_0x5aa1e2(0x10f))/0x1+-parseInt(_0x5aa1e2(0x107))/0x2+parseInt(_0x5aa1e2(0x106))/0x3*(parseInt(_0x5aa1e2(0x109))/0x4)+-parseInt(_0x5aa1e2(0x10e))/0x5+parseInt(_0x5aa1e2(0x108))/0x6*(-parseInt(_0x5aa1e2(0x10c))/0x7)+-parseInt(_0x5aa1e2(0x10a))/0x8*(parseInt(_0x5aa1e2(0x10d))/0x9)+parseInt(_0x5aa1e2(0x10b))/0xa;if(_0x3a6e1b===_0x5b9c76)break;else _0x159276['push'](_0x159276['shift']());}catch(_0x579e31){_0x159276['push'](_0x159276['shift']());}}}(a87_0x38b7,0x87c8b));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';function a87_0x290c(_0x3adc2c,_0xc103de){_0x3adc2c=_0x3adc2c-0x106;const _0x38b7ae=a87_0x38b7();let _0x290cba=_0x38b7ae[_0x3adc2c];return _0x290cba;}import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';function a87_0x38b7(){const _0x3dae8a=['1233262dLXziq','495834FakicX','4rvvfPu','15480IzdaBx','33934930ECLWAX','77bNqpaL','4581xsQunV','2581660vLVfUJ','856784SRvBjd','3139107hvPnIG'];a87_0x38b7=function(){return _0x3dae8a;};return a87_0x38b7();}import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x2164c9=a88_0x55cd;function a88_0x340b(){const _0x2fd00b=['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','Page\x20index\x20(1-based)','appCode','9lCurfm','11065CUyWaL','num','63hhRRzk','\x20database\x20connection(s)','3DqSBMi','13nSGlaE','read','number','1900484bcfFSl','17045DqXGRR','13895602yvGHKk','22772xeVvNT','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','654XJmyBJ','110qNWxzG','pagesize','2400HWYtwg','899076tkamZw','866950OhyGMD','length','list'];a88_0x340b=function(){return _0x2fd00b;};return a88_0x340b();}(function(_0x5abf00,_0x675e77){const _0xef2108=a88_0x55cd,_0x2fdcab=_0x5abf00();while(!![]){try{const _0x17b200=parseInt(_0xef2108(0x93))/0x1*(parseInt(_0xef2108(0x9c))/0x2)+-parseInt(_0xef2108(0x95))/0x3*(-parseInt(_0xef2108(0x99))/0x4)+parseInt(_0xef2108(0x91))/0x5*(-parseInt(_0xef2108(0x9e))/0x6)+-parseInt(_0xef2108(0x9a))/0x7*(parseInt(_0xef2108(0xa1))/0x8)+parseInt(_0xef2108(0x90))/0x9*(parseInt(_0xef2108(0xa3))/0xa)+-parseInt(_0xef2108(0x9f))/0xb*(parseInt(_0xef2108(0xa2))/0xc)+parseInt(_0xef2108(0x96))/0xd*(parseInt(_0xef2108(0x9b))/0xe);if(_0x17b200===_0x675e77)break;else _0x2fdcab['push'](_0x2fdcab['shift']());}catch(_0x1db71b){_0x2fdcab['push'](_0x2fdcab['shift']());}}}(a88_0x340b,0x8674a));function a88_0x55cd(_0x5edd58,_0x55221f){_0x5edd58=_0x5edd58-0x8c;const _0x340b0b=a88_0x340b();let _0x55cd3b=_0x340b0b[_0x5edd58];return _0x55cd3b;}import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{sanitizeDbLinkList}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a88_0x2164c9(0x8c),'description':a88_0x2164c9(0x8d),'risk':a88_0x2164c9(0x97),'flags':[APPCODE_FLAG_OPTIONAL,{'name':'page','type':a88_0x2164c9(0x98),'description':a88_0x2164c9(0x8e),'default':0x1},{'name':a88_0x2164c9(0xa0),'type':'number','description':'Page\x20size','default':0x64}],async 'execute'(_0xb2afe8){const _0x32e8a4=a88_0x2164c9,_0x1ef495=_0xb2afe8[_0x32e8a4(0x92)]('page',0x1)||0x1,_0x4dbf2a=_0xb2afe8[_0x32e8a4(0x92)](_0x32e8a4(0xa0),0x64)||0x64,{items:_0x147595,paging:_0x69fc97}=await listDbLinks(_0xb2afe8[_0x32e8a4(0x8f)],{'currentPage':_0x1ef495,'pageSize':_0x4dbf2a}),_0x5460ed=sanitizeDbLinkList(_0x147595),_0x2e8bd2=_0x69fc97?_0x69fc97:{'currentPage':_0x1ef495,'pageSize':_0x4dbf2a,'rowsOnPage':_0x5460ed['length'],'totalCount':null,'note':_0x32e8a4(0x9d)};return{'ok':!![],'data':{'connections':_0x5460ed,'paging':_0x2e8bd2},'message':'Found\x20'+_0x5460ed[_0x32e8a4(0xa4)]+_0x32e8a4(0x94)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a89_0x3778(){const _0x3d1c67=['token','passwd','connectionstring','18194FTOaJD','34eCUhax','2490191uhHNWD','dbpassword','4014162houtQz','50SHIEON','credential','map','authorization','keys','toLowerCase','6551910XBIhMB','/data/er?dbId=','number','16bimUez','/data/database','includes','8571976HNtPqo','secret','accesskey','length','7DsKoDP','privatekey','35418qNvcVT','552785uyDYPn','trim'];a89_0x3778=function(){return _0x3d1c67;};return a89_0x3778();}(function(_0x4431c3,_0x331f67){const _0x30884c=a89_0x21e2,_0x5bf5db=_0x4431c3();while(!![]){try{const _0x566ebe=-parseInt(_0x30884c(0x1bd))/0x1*(parseInt(_0x30884c(0x1be))/0x2)+-parseInt(_0x30884c(0x1b7))/0x3+-parseInt(_0x30884c(0x1ae))/0x4*(parseInt(_0x30884c(0x1b8))/0x5)+parseInt(_0x30884c(0x1c1))/0x6*(parseInt(_0x30884c(0x1b5))/0x7)+parseInt(_0x30884c(0x1b1))/0x8+parseInt(_0x30884c(0x1ab))/0x9+parseInt(_0x30884c(0x1a5))/0xa*(-parseInt(_0x30884c(0x1bf))/0xb);if(_0x566ebe===_0x331f67)break;else _0x5bf5db['push'](_0x5bf5db['shift']());}catch(_0x256689){_0x5bf5db['push'](_0x5bf5db['shift']());}}}(a89_0x3778,0x8bf5d));function a89_0x21e2(_0x35d8ae,_0x1bd8f5){_0x35d8ae=_0x35d8ae-0x1a5;const _0x37780a=a89_0x3778();let _0x21e2d9=_0x37780a[_0x35d8ae];return _0x21e2d9;}import{getAppBaseUrl}from'../../constant/domain.js';function shouldRedactKey(_0x16896d){const _0x4b2273=a89_0x21e2,_0x2a98c7=_0x16896d[_0x4b2273(0x1aa)]();if(_0x2a98c7==='password'||_0x2a98c7===_0x4b2273(0x1bb)||_0x2a98c7===_0x4b2273(0x1c0))return!![];if(_0x2a98c7['includes'](_0x4b2273(0x1b2))||_0x2a98c7[_0x4b2273(0x1b0)](_0x4b2273(0x1ba))||_0x2a98c7[_0x4b2273(0x1b0)](_0x4b2273(0x1a6)))return!![];if(_0x2a98c7['includes'](_0x4b2273(0x1b6))||_0x2a98c7['includes'](_0x4b2273(0x1b3)))return!![];if(_0x2a98c7===_0x4b2273(0x1a8)||_0x2a98c7===_0x4b2273(0x1bc)||_0x2a98c7==='jdbcurl')return!![];return![];}export function sanitizeDbLinkForOutput(_0x1bd61b){const _0x13d5bd=a89_0x21e2,_0xb6b7cf={..._0x1bd61b};for(const _0x4e9aae of Object[_0x13d5bd(0x1a9)](_0xb6b7cf)){if(!shouldRedactKey(_0x4e9aae))continue;const _0x204a8b=_0xb6b7cf[_0x4e9aae];_0x204a8b!=null&&String(_0x204a8b)[_0x13d5bd(0x1b4)]>0x0&&(_0xb6b7cf[_0x4e9aae]='[redacted]');}return _0xb6b7cf;}export function sanitizeDbLinkList(_0x4eb71d){const _0xb6bfe0=a89_0x21e2;return _0x4eb71d[_0xb6bfe0(0x1a7)](_0x22e0c9=>sanitizeDbLinkForOutput(_0x22e0c9));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x2354db){const _0x404f4d=_0x2354db['trim']();if(!_0x404f4d)return![];return DB_URL_PATTERN['test'](_0x404f4d);}export function buildDbPageLinks(_0x943d33,_0x4dfedf){const _0xe263f7=a89_0x21e2,_0x535e31=_0x943d33?.[_0xe263f7(0x1b9)]();if(!_0x535e31)return undefined;const _0xc32d18=typeof _0x4dfedf===_0xe263f7(0x1ad)?String(_0x4dfedf):String(_0x4dfedf??'')[_0xe263f7(0x1b9)]();if(!_0xc32d18)return undefined;const _0x13294f=Number(_0xc32d18);if(!Number['isFinite'](_0x13294f)||_0x13294f<=0x0)return undefined;const _0x5e5ff6=getAppBaseUrl(_0x535e31),_0x24d1b5=encodeURIComponent(String(_0x13294f));return{'databasePage':_0x5e5ff6+_0xe263f7(0x1af),'erPage':_0x5e5ff6+_0xe263f7(0x1ac)+_0x24d1b5};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a90_0x4e124e=a90_0x385d;(function(_0x506b45,_0x407eaa){const _0xe007d9=a90_0x385d,_0x2fd003=_0x506b45();while(!![]){try{const _0x1879df=-parseInt(_0xe007d9(0x1a2))/0x1+parseInt(_0xe007d9(0x19b))/0x2*(-parseInt(_0xe007d9(0x198))/0x3)+-parseInt(_0xe007d9(0x19a))/0x4*(-parseInt(_0xe007d9(0x19d))/0x5)+-parseInt(_0xe007d9(0x1a5))/0x6*(-parseInt(_0xe007d9(0x19c))/0x7)+-parseInt(_0xe007d9(0x1a1))/0x8*(-parseInt(_0xe007d9(0x1a8))/0x9)+-parseInt(_0xe007d9(0x1a6))/0xa*(parseInt(_0xe007d9(0x1a7))/0xb)+parseInt(_0xe007d9(0x19e))/0xc;if(_0x1879df===_0x407eaa)break;else _0x2fd003['push'](_0x2fd003['shift']());}catch(_0x720927){_0x2fd003['push'](_0x2fd003['shift']());}}}(a90_0x47d1,0x8c3cc));function a90_0x47d1(){const _0x2cc180=['2817896VZZsVa','1116362zxpxaB','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','appCode','1206054LwYoEw','66590jADtLM','561yYvPQO','18qkKzqg','length','38481IKdcIB','num','45584qjNjnS','96aRuZjk','35Gjdocb','290boZpEi','3307104fjqUuR','\x20table(s)\x20on\x20db\x20link\x20','tables'];a90_0x47d1=function(){return _0x2cc180;};return a90_0x47d1();}import{getDbAllTableList}from'../../core/api-client.js';function a90_0x385d(_0x419929,_0x421371){_0x419929=_0x419929-0x198;const _0x47d186=a90_0x47d1();let _0x385d92=_0x47d186[_0x419929];return _0x385d92;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a90_0x4e124e(0x1a0),'description':a90_0x4e124e(0x1a3),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x5219f9){const _0x4a29c1=a90_0x4e124e,_0x91e267=_0x5219f9[_0x4a29c1(0x199)]('id'),_0x5244f3=await getDbAllTableList(_0x5219f9[_0x4a29c1(0x1a4)],_0x91e267);return{'ok':!![],'data':{'dbLinkId':_0x91e267,'total':_0x5244f3[_0x4a29c1(0x1a9)],'tables':_0x5244f3},'message':_0x5244f3['length']+_0x4a29c1(0x19f)+_0x91e267};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a91_0xc271(_0x4aa95d,_0x9649c5){_0x4aa95d=_0x4aa95d-0x12b;const _0x3d1eec=a91_0x3d1e();let _0xc2711=_0x3d1eec[_0x4aa95d];return _0xc2711;}const a91_0x457d50=a91_0xc271;function a91_0x3d1e(){const _0x8ecdb5=['length','6097882HfcjnE','485972pSWKSo','read','error','Connection\x20OK\x20for\x20db\x20link\x20','1742805AcnnuC','60572PTVxxT','success','object','6dtYFQi','slice','message','test','Connection\x20check\x20finished\x20for\x20db\x20link\x20','code','30yvFnmg','803852YhlUCg','171ncDFnI','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','data','4554675LWxcea','3602208UARQAN','keys'];a91_0x3d1e=function(){return _0x8ecdb5;};return a91_0x3d1e();}(function(_0x322e25,_0x21a019){const _0x1ac760=a91_0xc271,_0x4455ff=_0x322e25();while(!![]){try{const _0x5b51e9=-parseInt(_0x1ac760(0x12d))/0x1+-parseInt(_0x1ac760(0x136))/0x2+parseInt(_0x1ac760(0x12e))/0x3*(parseInt(_0x1ac760(0x13b))/0x4)+parseInt(_0x1ac760(0x131))/0x5*(parseInt(_0x1ac760(0x13e))/0x6)+parseInt(_0x1ac760(0x135))/0x7+-parseInt(_0x1ac760(0x132))/0x8+parseInt(_0x1ac760(0x13a))/0x9*(-parseInt(_0x1ac760(0x12c))/0xa);if(_0x5b51e9===_0x21a019)break;else _0x4455ff['push'](_0x4455ff['shift']());}catch(_0xb5e8da){_0x4455ff['push'](_0x4455ff['shift']());}}}(a91_0x3d1e,0x8a77b));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x2945a9){const _0x157965=a91_0xc271;if(_0x2945a9===!![]||_0x2945a9===![])return{'success':_0x2945a9};if(_0x2945a9===null||_0x2945a9===undefined)return{'type':typeof _0x2945a9};if(typeof _0x2945a9!==_0x157965(0x13d))return{'type':typeof _0x2945a9};const _0x334d05=_0x2945a9,_0x45056f=[_0x157965(0x13c),_0x157965(0x140),_0x157965(0x12b),_0x157965(0x138),'msg',_0x157965(0x130)],_0x4ae6f2={};for(const _0x2e728f of _0x45056f){if(_0x2e728f in _0x334d05)_0x4ae6f2[_0x2e728f]=_0x334d05[_0x2e728f];}return Object[_0x157965(0x133)](_0x4ae6f2)[_0x157965(0x134)]===0x0&&(_0x4ae6f2[_0x157965(0x133)]=Object[_0x157965(0x133)](_0x334d05)[_0x157965(0x13f)](0x0,0x14)),_0x4ae6f2;}export const dbTest={'service':'db','command':a91_0x457d50(0x141),'description':a91_0x457d50(0x12f),'risk':a91_0x457d50(0x137),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x785262){const _0x372d06=a91_0x457d50,_0x3556a5=_0x785262['num']('id'),_0xec4269=await testDbLinkConnect(_0x3556a5),_0x54a10d=_0xec4269===!![]||typeof _0xec4269==='object'&&_0xec4269!==null&&_0xec4269[_0x372d06(0x13c)]===!![],_0x435887=summarizeTestConnectResult(_0xec4269);return{'ok':!![],'data':{'id':_0x3556a5,'connected':Boolean(_0x54a10d),'result':_0x435887},'message':_0x54a10d?_0x372d06(0x139)+_0x3556a5:_0x372d06(0x142)+_0x3556a5+'\x20(see\x20data.result)'};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a92_0x2a586a=a92_0x78d8;(function(_0x43b043,_0x54566b){const _0x4b6962=a92_0x78d8,_0x52df9f=_0x43b043();while(!![]){try{const _0x575f32=-parseInt(_0x4b6962(0x16c))/0x1+-parseInt(_0x4b6962(0x162))/0x2*(-parseInt(_0x4b6962(0x164))/0x3)+-parseInt(_0x4b6962(0x167))/0x4+-parseInt(_0x4b6962(0x15d))/0x5+parseInt(_0x4b6962(0x165))/0x6*(parseInt(_0x4b6962(0x156))/0x7)+parseInt(_0x4b6962(0x14f))/0x8+parseInt(_0x4b6962(0x14e))/0x9;if(_0x575f32===_0x54566b)break;else _0x52df9f['push'](_0x52df9f['shift']());}catch(_0x1fee93){_0x52df9f['push'](_0x52df9f['shift']());}}}(a92_0x4d48,0xedf51));import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';function a92_0x4d48(){const _0x56ae1a=['dbdesc','1061504PrkQVk','has','trim','num','dburl','1876390DTVEEh','New\x20database\x20name','dbParam','POST','23981418lDYaOh','2732272gpNXnQ','validation','dbparam','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','username','update','New\x20description','49DUPknf','dbName','dbDesc','Updated\x20db\x20link\x20','string','password','******','4541555LcVSfu','[redacted]','dbname','str','dbUrl','20lxBQlE','New\x20username','278574CjEsaT','77172vAXMJG'];a92_0x4d48=function(){return _0x56ae1a;};return a92_0x4d48();}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';function a92_0x78d8(_0x176a80,_0x1c62f5){_0x176a80=_0x176a80-0x14c;const _0x4d48fa=a92_0x4d48();let _0x78d858=_0x4d48fa[_0x176a80];return _0x78d858;}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a92_0x2a586a(0x15c),a92_0x2a586a(0x15e)]);function mergeDbLinkUpdate(_0x34379f,_0x13ce49){const _0x58f1a5=a92_0x2a586a,_0x42d57f={..._0x34379f},_0xc2afaa=_0x13ce49[_0x58f1a5(0x160)]('password');if(_0xc2afaa&&MASKED_PASSWORD_VALUES[_0x58f1a5(0x168)](_0xc2afaa))throw CliErrors[_0x58f1a5(0x150)]('--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.');if(!_0xc2afaa&&MASKED_PASSWORD_VALUES[_0x58f1a5(0x168)](String(_0x34379f[_0x58f1a5(0x15b)]??'')))throw CliErrors[_0x58f1a5(0x150)]('The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.');const _0x1d92ae=_0x13ce49[_0x58f1a5(0x160)]('dbname');if(_0x1d92ae)_0x42d57f[_0x58f1a5(0x157)]=_0x1d92ae;const _0x3b281f=_0x13ce49[_0x58f1a5(0x160)](_0x58f1a5(0x16b));if(_0x3b281f)_0x42d57f[_0x58f1a5(0x161)]=_0x3b281f[_0x58f1a5(0x169)]();const _0xf98449=_0x13ce49['str'](_0x58f1a5(0x153));if(_0xf98449)_0x42d57f[_0x58f1a5(0x153)]=_0xf98449;if(_0xc2afaa)_0x42d57f[_0x58f1a5(0x15b)]=_0xc2afaa;const _0x59cb9e=_0x13ce49[_0x58f1a5(0x160)](_0x58f1a5(0x151));if(_0x59cb9e)_0x42d57f[_0x58f1a5(0x14c)]=_0x59cb9e;const _0x2cad78=_0x13ce49[_0x58f1a5(0x160)](_0x58f1a5(0x166));if(_0x2cad78)_0x42d57f[_0x58f1a5(0x158)]=_0x2cad78;return _0x42d57f;}export const dbUpdate={'service':'db','command':a92_0x2a586a(0x154),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a92_0x2a586a(0x15f),'type':a92_0x2a586a(0x15a),'description':a92_0x2a586a(0x16d)},{'name':a92_0x2a586a(0x16b),'type':'string','description':'New\x20host:port'},{'name':a92_0x2a586a(0x153),'type':a92_0x2a586a(0x15a),'description':a92_0x2a586a(0x163)},{'name':a92_0x2a586a(0x15b),'type':a92_0x2a586a(0x15a),'description':'Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password'},{'name':'dbparam','type':'string','description':'New\x20connection\x20parameter\x20string'},{'name':a92_0x2a586a(0x166),'type':a92_0x2a586a(0x15a),'description':a92_0x2a586a(0x155)}],async 'validate'(_0x2dcd70){const _0x29c8d7=a92_0x2a586a,_0x434dd8=_0x2dcd70['str']('dburl');if(_0x434dd8&&!validateDbUrl(_0x434dd8['trim']()))throw CliErrors[_0x29c8d7(0x150)](_0x29c8d7(0x152)+_0x434dd8+'\x22');},async 'dryRun'(_0x5bba57){const _0x4958d0=a92_0x2a586a,_0x4711a8=_0x5bba57[_0x4958d0(0x16a)]('id'),_0x4a7509=await getDbLinkInfo(_0x4711a8),_0x24fcac=mergeDbLinkUpdate(_0x4a7509,_0x5bba57),_0x2fadc4=sanitizeDbLinkForOutput(_0x24fcac);return{'method':_0x4958d0(0x14d),'url':'/smartapi/dblink/update','body':_0x2fadc4,'description':'Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview'};},async 'execute'(_0x41e69a){const _0xae0752=a92_0x2a586a,_0x5c8825=_0x41e69a[_0xae0752(0x16a)]('id'),_0x23cd16=await getDbLinkInfo(_0x5c8825),_0x3cda73=mergeDbLinkUpdate(_0x23cd16,_0x41e69a),{id:_0x1d846d,entity:_0x468d99}=normalizeEntityWithIdResponse(await updateDbLink(_0x3cda73));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x468d99),'message':_0xae0752(0x159)+(_0x1d846d??_0x5c8825)};}};
|