@lovrabet/rabetbase-cli 2.3.8 → 2.3.9-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/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/index.js +1 -1
- package/lib/commands/menu/list.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/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/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-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.js +1 -1
- package/lib/help.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.js +1 -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 a75_0x53fd9f=a75_0x23db;(function(_0x3ee5e7,_0x22f521){const _0x3f5ac1=a75_0x23db,_0x552682=_0x3ee5e7();while(!![]){try{const _0x3cf50e=parseInt(_0x3f5ac1(0x1c7))/0x1*(-parseInt(_0x3f5ac1(0x1b4))/0x2)+parseInt(_0x3f5ac1(0x1d8))/0x3+-parseInt(_0x3f5ac1(0x1d2))/0x4*(-parseInt(_0x3f5ac1(0x1d6))/0x5)+-parseInt(_0x3f5ac1(0x1c5))/0x6+parseInt(_0x3f5ac1(0x1d7))/0x7*(-parseInt(_0x3f5ac1(0x1d5))/0x8)+-parseInt(_0x3f5ac1(0x1ba))/0x9+-parseInt(_0x3f5ac1(0x1c2))/0xa*(-parseInt(_0x3f5ac1(0x1d3))/0xb);if(_0x3cf50e===_0x22f521)break;else _0x552682['push'](_0x552682['shift']());}catch(_0x58aab0){_0x552682['push'](_0x552682['shift']());}}}(a75_0x5c2d,0x88c9e));import{getDatasetDetail,updateDrivenData}from'../../core/api-client.js';import{CODE_FLAG,APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';export async function buildDatasetRenameResult({input:_0x2538bd,dryRun:_0x3eaf4b}){const _0x281a18=a75_0x23db;validateInput(_0x2538bd);const _0x12c83c=await getDatasetDetail(_0x2538bd[_0x281a18(0x1b8)]),_0x7cdfa3=resolveCurrentName(_0x12c83c);if(_0x7cdfa3!==_0x2538bd['expectName'])throw CliErrors[_0x281a18(0x1dd)]('Expectation\x20mismatch\x20at\x20dataset.name',_0x281a18(0x1bc)+JSON[_0x281a18(0x1b7)](_0x2538bd['expectName'])+_0x281a18(0x1bb)+JSON[_0x281a18(0x1b7)](_0x7cdfa3));const _0x4702f8=buildRenameRequest(_0x12c83c,_0x2538bd),_0xef358a=_0x7cdfa3!==_0x2538bd[_0x281a18(0x1b5)];let _0x38a115;return _0xef358a&&!_0x3eaf4b&&(_0x38a115=await updateDrivenData(_0x4702f8)),{'ok':!![],'data':{'dataset':{'id':_0x4702f8[_0x281a18(0x1da)],'code':_0x4702f8['modelCode']},'dryRun':_0x3eaf4b,'changed':_0xef358a,'before':{'name':_0x7cdfa3},'after':{'name':_0x2538bd[_0x281a18(0x1b5)]},'request':_0x4702f8,'submitted':_0xef358a&&!_0x3eaf4b,..._0x38a115!==undefined?{'version':_0x38a115}:{}},'message':_0xef358a?_0x3eaf4b?_0x281a18(0x1cd)+_0x4702f8['modelCode']+_0x281a18(0x1c4)+_0x2538bd['name']:_0x281a18(0x1d9)+_0x4702f8[_0x281a18(0x1bf)]+_0x281a18(0x1dc)+_0x2538bd[_0x281a18(0x1b5)]:'No\x20changes\x20for\x20dataset\x20'+_0x4702f8[_0x281a18(0x1bf)]};}function a75_0x5c2d(){const _0x5d0ff3=['--code\x20is\x20required','datasetName','rename','Rename\x20dataset\x20display\x20name\x20safely','Dry-run:\x20dataset\x20','expect-name','POST','--name\x20is\x20required','write','1624WGLOlI','1188121qjkJnU','str','24UVJVhx','12910nPOxFn','606410GrnFMr','462900IMNJXS','Renamed\x20dataset\x20','modelId','expectName','\x20to\x20','validation','dataset','28374STBRsd','name','message','stringify','code','string','2672298pSecKY',',\x20actual\x20','Expected\x20','trim','Expected\x20current\x20dataset\x20display\x20name;\x20mismatch\x20aborts\x20without\x20writing','modelCode','data','request','80xTupWu','object','\x20would\x20be\x20renamed\x20to\x20','5527248TQbLBZ','New\x20dataset\x20display\x20name','2RdHdrT','isArray'];a75_0x5c2d=function(){return _0x5d0ff3;};return a75_0x5c2d();}export const datasetRename={'service':'dataset','command':a75_0x53fd9f(0x1cb),'description':a75_0x53fd9f(0x1cc),'risk':a75_0x53fd9f(0x1d1),'flags':[CODE_FLAG,{'name':a75_0x53fd9f(0x1b5),'type':a75_0x53fd9f(0x1b9),'required':!![],'description':a75_0x53fd9f(0x1c6)},{'name':a75_0x53fd9f(0x1ce),'type':'string','required':!![],'description':a75_0x53fd9f(0x1be)},APPCODE_FLAG_OPTIONAL],async 'validate'(_0x2a240b){validateInput(readDatasetRenameInput(_0x2a240b));},async 'dryRun'(_0x120f1c){const _0x4d6448=a75_0x53fd9f,_0x1348b9=await buildDatasetRenameResult({'input':readDatasetRenameInput(_0x120f1c),'dryRun':!![]});return{'method':_0x4d6448(0x1cf),'url':'/smartapi/dataset/update-driven-data','body':_0x1348b9[_0x4d6448(0x1c0)][_0x4d6448(0x1c1)],'description':_0x1348b9[_0x4d6448(0x1b6)],..._0x1348b9[_0x4d6448(0x1c0)]};},async 'execute'(_0x18ca3f){return buildDatasetRenameResult({'input':readDatasetRenameInput(_0x18ca3f),'dryRun':![]});}};function readDatasetRenameInput(_0xd9412){const _0x52ef45=a75_0x53fd9f;return{'code':trim(_0xd9412['str'](_0x52ef45(0x1b8))),'name':trim(_0xd9412['str'](_0x52ef45(0x1b5))),'expectName':trim(_0xd9412[_0x52ef45(0x1d4)](_0x52ef45(0x1ce)))};}function validateInput(_0x51df0c){const _0x537c70=a75_0x53fd9f;if(!_0x51df0c[_0x537c70(0x1b8)])throw CliErrors['validation'](_0x537c70(0x1c9));if(!_0x51df0c[_0x537c70(0x1b5)])throw CliErrors[_0x537c70(0x1dd)](_0x537c70(0x1d0));if(!_0x51df0c[_0x537c70(0x1db)])throw CliErrors[_0x537c70(0x1dd)]('--expect-name\x20is\x20required');}function a75_0x23db(_0x5424fb,_0x2d2423){_0x5424fb=_0x5424fb-0x1b3;const _0x5c2dc4=a75_0x5c2d();let _0x23dbe2=_0x5c2dc4[_0x5424fb];return _0x23dbe2;}function resolveCurrentName(_0x41deb7){const _0x4e9553=a75_0x53fd9f;return String(_0x41deb7[_0x4e9553(0x1b3)]?.[_0x4e9553(0x1ca)]??_0x41deb7['name']??'')['trim']();}function buildRenameRequest(_0x3ed49f,_0x2f17bb){const _0x4bb94a=a75_0x53fd9f,_0x3ddb83=isPlainObject(_0x3ed49f[_0x4bb94a(0x1b3)])?_0x3ed49f[_0x4bb94a(0x1b3)]:{},_0x4e331d=_0x3ed49f[_0x4bb94a(0x1da)]??_0x3ed49f['id']??_0x3ddb83['datasetId'];if(_0x4e331d===undefined||_0x4e331d===null||_0x4e331d==='')throw CliErrors[_0x4bb94a(0x1dd)]('Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20id');const _0x5a4875=String(_0x3ed49f[_0x4bb94a(0x1bf)]??_0x3ed49f[_0x4bb94a(0x1b8)]??_0x3ddb83['datasetCode']??_0x2f17bb[_0x4bb94a(0x1b8)])[_0x4bb94a(0x1bd)]();if(!_0x5a4875)throw CliErrors[_0x4bb94a(0x1dd)]('Dataset\x20detail\x20does\x20not\x20contain\x20dataset\x20code');return{'modelId':_0x4e331d,'modelCode':_0x5a4875,'name':_0x2f17bb['name'],'dataset':{'datasetId':_0x4e331d,'datasetCode':_0x5a4875,'datasetName':_0x2f17bb[_0x4bb94a(0x1b5)]}};}function isPlainObject(_0x1c1cb1){const _0x1d8d89=a75_0x53fd9f;return Boolean(_0x1c1cb1)&&typeof _0x1c1cb1===_0x1d8d89(0x1c3)&&!Array[_0x1d8d89(0x1c8)](_0x1c1cb1);}function trim(_0x549bd4){const _0x3df77b=a75_0x53fd9f;return String(_0x549bd4||'')[_0x3df77b(0x1bd)]();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a76_0x407c37=a76_0x1d63;(function(_0x326925,_0x1f948d){const _0x2afc07=a76_0x1d63,_0x20fea7=_0x326925();while(!![]){try{const _0x395e1b=parseInt(_0x2afc07(0x18f))/0x1*(parseInt(_0x2afc07(0x164))/0x2)+-parseInt(_0x2afc07(0x17b))/0x3*(parseInt(_0x2afc07(0x15b))/0x4)+-parseInt(_0x2afc07(0x180))/0x5+parseInt(_0x2afc07(0x175))/0x6+parseInt(_0x2afc07(0x165))/0x7+-parseInt(_0x2afc07(0x186))/0x8*(-parseInt(_0x2afc07(0x16a))/0x9)+parseInt(_0x2afc07(0x15c))/0xa;if(_0x395e1b===_0x1f948d)break;else _0x20fea7['push'](_0x20fea7['shift']());}catch(_0x16ee23){_0x20fea7['push'](_0x20fea7['shift']());}}}(a76_0x4c01,0xccca3));import{listDatasets,restoreDataset}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a76_0x4c01(){const _0x403f18=['/smartapi/dataset/restore-dataset','tableName','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','str','7622410MQuwVX','bool','restore','dbtableConfig','Required\x20to\x20execute\x20dataset\x20restore','--confirm\x20is\x20required\x20to\x20restore\x20datasets.','4400qhWdJs','dbId','validation','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','message','appCode','POST','code','isArray','2vXxIGp','boolean','722332TbCaqQ','1324730lYVQwm','filter','dataset','relationPages','\x20dataset(s);\x20','Matched\x20','description','push','1262396gzDaOd','1377887FwTcQN','\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.','number','map','Would\x20restore\x20','19161aYZSUH','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','high-risk-write','id=','Restored\x20','dbName','Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','\x20dataset(s)','length','Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id','source','5188332kyNNzM','expected-count','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','num','dbid','confirm','21kjPmFX'];a76_0x4c01=function(){return _0x403f18;};return a76_0x4c01();}import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':a76_0x407c37(0x167),'description':'Dataset\x20id'},DBID_FLAG={'name':a76_0x407c37(0x179),'type':a76_0x407c37(0x167),'description':a76_0x407c37(0x173)},CONFIRM_FLAG={'name':a76_0x407c37(0x17a),'type':a76_0x407c37(0x190),'description':a76_0x407c37(0x184)},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a76_0x407c37(0x167),'description':a76_0x407c37(0x189)};function a76_0x1d63(_0x2dfac6,_0xb4e7e6){_0x2dfac6=_0x2dfac6-0x15b;const _0x4c01b8=a76_0x4c01();let _0x1d6351=_0x4c01b8[_0x2dfac6];return _0x1d6351;}export const datasetRestore={'service':a76_0x407c37(0x15e),'command':a76_0x407c37(0x182),'description':a76_0x407c37(0x170),'risk':a76_0x407c37(0x16c),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x3cacb5){const _0x431055=a76_0x407c37,_0x13e6f5=_0x3cacb5['num']('id'),_0x5378ba=_0x3cacb5['str'](_0x431055(0x18d)),_0x35a9dd=_0x3cacb5['num']('dbid'),_0x249ac5=[_0x13e6f5>0x0,Boolean(_0x5378ba),_0x35a9dd>0x0]['filter'](Boolean);if(_0x249ac5[_0x431055(0x172)]===0x0)throw CliErrors[_0x431055(0x188)](_0x431055(0x177));if(_0x249ac5[_0x431055(0x172)]>0x1)throw CliErrors[_0x431055(0x188)](_0x431055(0x17e));},async 'dryRun'(_0x4b87dd){const _0x57d763=a76_0x407c37,_0x7805bb=await resolveTargets(_0x4b87dd);return{'method':_0x57d763(0x18c),'url':_0x57d763(0x17c),'body':{'appCode':_0x4b87dd['appCode'],'count':_0x7805bb[_0x57d763(0x172)],'datasets':_0x7805bb},'description':_0x57d763(0x169)+_0x7805bb['length']+_0x57d763(0x166)};},async 'execute'(_0x4986f5){const _0x430148=a76_0x407c37;if(!_0x4986f5[_0x430148(0x181)](_0x430148(0x17a)))throw CliErrors['validation'](_0x430148(0x185),'Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.');const _0x232ec6=await resolveTargets(_0x4986f5),_0x3b3f83=[],_0x12247e=[];for(const _0x56804b of _0x232ec6){try{await restoreDataset(_0x4986f5['appCode'],_0x56804b['id']),_0x3b3f83[_0x430148(0x163)](_0x56804b);}catch(_0x461e10){_0x12247e[_0x430148(0x163)]({..._0x56804b,'error':_0x461e10 instanceof Error?_0x461e10[_0x430148(0x18a)]:String(_0x461e10)});}}if(_0x12247e[_0x430148(0x172)]>0x0)return{'ok':![],'data':{'requested':_0x232ec6[_0x430148(0x172)],'restoredCount':_0x3b3f83[_0x430148(0x172)],'failedCount':_0x12247e[_0x430148(0x172)],'restored':_0x3b3f83,'failed':_0x12247e},'message':_0x430148(0x16e)+_0x3b3f83[_0x430148(0x172)]+'/'+_0x232ec6[_0x430148(0x172)]+_0x430148(0x160)+_0x12247e['length']+'\x20failed'};return{'ok':!![],'data':{'requested':_0x232ec6[_0x430148(0x172)],'restoredCount':_0x3b3f83[_0x430148(0x172)],'restored':_0x3b3f83},'message':'Restored\x20'+_0x3b3f83['length']+_0x430148(0x171)};}};async function resolveTargets(_0xb2659f){const _0x38dbc8=a76_0x407c37,_0x32d034=_0xb2659f['num']('id'),_0x2d562=_0xb2659f[_0x38dbc8(0x17f)](_0x38dbc8(0x18d)),_0x51578c=_0xb2659f[_0x38dbc8(0x178)]('dbid');let _0x43ac06;_0x2d562?(_0x43ac06=await listDatasets(_0xb2659f[_0x38dbc8(0x18b)],{'code':_0x2d562,'deleted':!![]}),_0x43ac06=_0x43ac06[_0x38dbc8(0x15d)](_0xc36e90=>_0xc36e90[_0x38dbc8(0x18d)]===_0x2d562)):(_0x43ac06=await listDatasets(_0xb2659f[_0x38dbc8(0x18b)],{'deleted':!![]}),_0x32d034>0x0&&(_0x43ac06=_0x43ac06[_0x38dbc8(0x15d)](_0x1a4f06=>_0x1a4f06['id']===_0x32d034)),_0x51578c>0x0&&(_0x43ac06=_0x43ac06[_0x38dbc8(0x15d)](_0x2b7231=>_0x2b7231['dbtableConfig']?.[_0x38dbc8(0x187)]===_0x51578c)));const _0x20cab5=_0x43ac06[_0x38dbc8(0x168)](normalizeTarget);if(_0x20cab5[_0x38dbc8(0x172)]===0x0){const _0x17de00=_0x2d562||(_0x32d034>0x0?_0x38dbc8(0x16d)+_0x32d034:'dbid='+_0x51578c);throw CliErrors[_0x38dbc8(0x188)]('No\x20deleted\x20dataset\x20found\x20for\x20'+_0x17de00+'.');}const _0x478e68=_0xb2659f[_0x38dbc8(0x178)](_0x38dbc8(0x176));if(_0x478e68>0x0&&_0x20cab5[_0x38dbc8(0x172)]!==_0x478e68)throw CliErrors['validation'](_0x38dbc8(0x161)+_0x20cab5[_0x38dbc8(0x172)]+_0x38dbc8(0x16b)+_0x478e68+'.');return _0x20cab5;}function normalizeTarget(_0x2b712a){const _0x3a5d05=a76_0x407c37,_0x25e5f5=_0x2b712a[_0x3a5d05(0x183)]??{};return{'id':_0x2b712a['id'],'code':_0x2b712a[_0x3a5d05(0x18d)],'name':_0x2b712a['name'],'description':_0x2b712a[_0x3a5d05(0x162)],'source':_0x2b712a[_0x3a5d05(0x174)],'dbId':_0x25e5f5['dbId'],'dbName':_0x25e5f5[_0x3a5d05(0x16f)],'tableName':_0x25e5f5[_0x3a5d05(0x17d)],'relatedPageCount':Array[_0x3a5d05(0x18e)](_0x2b712a[_0x3a5d05(0x15f)])?_0x2b712a[_0x3a5d05(0x15f)][_0x3a5d05(0x172)]:undefined};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x4ae724,_0x251d4a){const _0xf9228c=a77_0x3c09,_0x45d797=_0x4ae724();while(!![]){try{const _0x126602=parseInt(_0xf9228c(0x11a))/0x1+parseInt(_0xf9228c(0x114))/0x2+-parseInt(_0xf9228c(0x11e))/0x3+-parseInt(_0xf9228c(0x125))/0x4*(-parseInt(_0xf9228c(0x11c))/0x5)+-parseInt(_0xf9228c(0x117))/0x6*(parseInt(_0xf9228c(0x11f))/0x7)+parseInt(_0xf9228c(0x11d))/0x8*(-parseInt(_0xf9228c(0x126))/0x9)+parseInt(_0xf9228c(0x113))/0xa*(parseInt(_0xf9228c(0x115))/0xb);if(_0x126602===_0x251d4a)break;else _0x45d797['push'](_0x45d797['shift']());}catch(_0x1f2030){_0x45d797['push'](_0x45d797['shift']());}}}(a77_0x5332,0x3218d));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;function a77_0x3c09(_0x315919,_0x4ce910){_0x315919=_0x315919-0x10e;const _0x5332f9=a77_0x5332();let _0x3c09eb=_0x5332f9[_0x315919];return _0x3c09eb;}function a77_0x5332(){const _0x537ee9=['byteLength','\x22\x20cannot\x20fit\x20in\x20one\x20database\x20analysis\x20batch:\x20','60639veXBZF','length','10EGGRnW','19016EfTocY','34917pOyvef','1870484eewrSA','split','stringify','Table\x20\x22','has','push','214144pswpMC','1377aYNHKg','validation','utf8','\x20bytes,\x20limit\x20','map','\x20bytes.','122380WoEVZC','601280pQCUdv','341raLQGQ','heuristic','6VfByJO'];a77_0x5332=function(){return _0x537ee9;};return a77_0x5332();}export const DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE=0x3c;export function normalizeAnalysisTableNames(_0x1d2ebf){const _0xe23735=a77_0x3c09,_0x13883e=new Set(),_0x15cdcc=[];for(const _0x548fb8 of _0x1d2ebf[_0xe23735(0x120)](',')){const _0x39a020=_0x548fb8['trim']();if(!_0x39a020||_0x13883e[_0xe23735(0x123)](_0x39a020))continue;_0x13883e['add'](_0x39a020),_0x15cdcc['push'](_0x39a020);}return _0x15cdcc;}export function measureAnalysisInputParamsBytes(_0x5d867d,_0x326acc){const _0xd39fc6=a77_0x3c09;return Buffer[_0xd39fc6(0x118)](JSON[_0xd39fc6(0x121)]({'dbLinkId':_0x5d867d,'tableNames':_0x326acc}),_0xd39fc6(0x10f));}export function buildAnalysisBatchPlan(_0x3836e8,_0x199156){const _0x3a8255=a77_0x3c09;if(_0x199156[_0x3a8255(0x11b)]===0x0)throw CliErrors[_0x3a8255(0x10e)]('At\x20least\x20one\x20table\x20name\x20is\x20required\x20for\x20database\x20analysis\x20planning.');const _0x26380c=[];let _0x24645c=[];for(const _0x35d9ae of _0x199156){const _0x3ac1ad=[..._0x24645c,_0x35d9ae],_0x3a5cbb=_0x3ac1ad[_0x3a8255(0x11b)]>DB_ANALYSIS_MAX_TABLES_PER_BATCH||measureAnalysisInputParamsBytes(_0x3836e8,_0x3ac1ad)>DB_ANALYSIS_BATCH_TARGET_BYTES;_0x3a5cbb&&_0x24645c[_0x3a8255(0x11b)]>0x0?(_0x26380c['push'](_0x24645c),_0x24645c=[_0x35d9ae]):_0x24645c=_0x3ac1ad;const _0x5264f9=measureAnalysisInputParamsBytes(_0x3836e8,_0x24645c);if(_0x5264f9>DB_ANALYSIS_BATCH_TARGET_BYTES)throw CliErrors['validation'](_0x3a8255(0x122)+_0x35d9ae+_0x3a8255(0x119)+_0x5264f9+_0x3a8255(0x110)+DB_ANALYSIS_BATCH_TARGET_BYTES+_0x3a8255(0x112));}_0x24645c['length']>0x0&&_0x26380c[_0x3a8255(0x124)](_0x24645c);const _0x567d55=_0x26380c[_0x3a8255(0x111)]((_0x41c2e3,_0x5793b4)=>({'index':_0x5793b4+0x1,'tableCount':_0x41c2e3[_0x3a8255(0x11b)],'inputParamsBytes':measureAnalysisInputParamsBytes(_0x3836e8,_0x41c2e3),'estimatedDurationSeconds':_0x41c2e3[_0x3a8255(0x11b)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'tableNames':_0x41c2e3})),_0x1217b7=_0x199156[_0x3a8255(0x11b)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE;return{'dbLinkId':_0x3836e8,'tableCount':_0x199156[_0x3a8255(0x11b)],'batchCount':_0x567d55[_0x3a8255(0x11b)],'maxTablesPerBatch':DB_ANALYSIS_MAX_TABLES_PER_BATCH,'maxSerializedBytesPerBatch':DB_ANALYSIS_BATCH_TARGET_BYTES,'serverInputParamsLimitBytes':DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,'planningEstimate':{'basis':_0x3a8255(0x116),'assumedSecondsPerTable':DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'estimatedTotalSeconds':_0x1217b7,'estimatedTotalMinutes':Math['ceil'](_0x1217b7/0x3c)},'batches':_0x567d55};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0xb0feaf=a78_0x4a70;(function(_0x85d9b3,_0x2ba9b3){const _0x8d794d=a78_0x4a70,_0x2ecdb5=_0x85d9b3();while(!![]){try{const _0x110054=-parseInt(_0x8d794d(0x7e))/0x1+-parseInt(_0x8d794d(0x8b))/0x2*(parseInt(_0x8d794d(0x84))/0x3)+parseInt(_0x8d794d(0x78))/0x4+parseInt(_0x8d794d(0x8e))/0x5*(-parseInt(_0x8d794d(0x8c))/0x6)+-parseInt(_0x8d794d(0x7b))/0x7+-parseInt(_0x8d794d(0x87))/0x8*(parseInt(_0x8d794d(0x80))/0x9)+-parseInt(_0x8d794d(0x7a))/0xa*(-parseInt(_0x8d794d(0x83))/0xb);if(_0x110054===_0x2ba9b3)break;else _0x2ecdb5['push'](_0x2ecdb5['shift']());}catch(_0xfd164e){_0x2ecdb5['push'](_0x2ecdb5['shift']());}}}(a78_0x155c,0x749e3));import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a78_0x4a70(_0x23cd4c,_0x2aaac8){_0x23cd4c=_0x23cd4c-0x77;const _0x155cc6=a78_0x155c();let _0x4a7096=_0x155cc6[_0x23cd4c];return _0x4a7096;}import{buildAnalysisBatchPlan,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';export const dbAnalyzeBatchPlan={'service':'db','command':'analyze-batch-plan','description':a78_0xb0feaf(0x85),'risk':a78_0xb0feaf(0x79),'requiresAuth':![],'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a78_0xb0feaf(0x81),'type':'string','required':!![],'description':'Comma-separated\x20table\x20names\x20to\x20split\x20into\x20safe\x20serial\x20batches'}],async 'execute'(_0x4d1a7c){const _0x26778b=a78_0xb0feaf,_0x29d066=_0x4d1a7c[_0x26778b(0x7d)]('id'),_0x4d326a=normalizeAnalysisTableNames(_0x4d1a7c[_0x26778b(0x82)](_0x26778b(0x81))),_0x5e6cb3=buildAnalysisBatchPlan(_0x29d066,_0x4d326a);return{'ok':!![],'data':_0x5e6cb3,'message':'Prepared\x20local\x20batch\x20plan\x20for\x20'+_0x5e6cb3[_0x26778b(0x86)]+_0x26778b(0x8a)+_0x5e6cb3['batchCount']+'\x20serial\x20batch(es)\x20for\x20db\x20link\x20'+_0x29d066+_0x26778b(0x89)+_0x5e6cb3[_0x26778b(0x88)][_0x26778b(0x7f)]+_0x26778b(0x77)+_0x5e6cb3['planningEstimate'][_0x26778b(0x8d)]+_0x26778b(0x7c)};}};function a78_0x155c(){const _0x4439fa=['10lpWePt','1511069FuQlUO','\x20seconds\x20per\x20table;\x20no\x20server\x20task\x20or\x20planId\x20was\x20created','num','744929PuHgUl','estimatedTotalMinutes','27lHWInM','tables','str','27803193dCWWjZ','257058mXQDWI','Preview\x20deterministic\x20local\x20batches\x20and\x20heuristic\x20duration\x20estimates\x20without\x20creating\x20a\x20server\x20task\x20or\x20planId','tableCount','452248oWlkoL','planningEstimate',';\x20estimated\x20about\x20','\x20table(s)\x20in\x20','20HzLLVo','2043762xQpUoH','assumedSecondsPerTable','5FkXEhL','\x20minute(s)\x20at\x20','1111920lxaMBM','read'];a78_0x155c=function(){return _0x4439fa;};return a78_0x155c();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a79_0x8596(){const _0x108fea=['num','948RvexKF','90941BjUHiN','55006bVALJj','21528sZGEiU','2598644RfXkyj','485WNrHlo','3807WWaFin','Cancel\x20an\x20existing\x20schema\x20analysis\x20by\x20explicit\x20plan\x20/\x20trace\x20id','string','analyze-cancel','Cancel\x20requested\x20for\x20plan\x20','823383xkYbbx','str','Existing\x20analysis\x20plan\x20/\x20trace\x20id\x20to\x20cancel','43468DBtNsj','10741380skvuZz','3PXVMNd'];a79_0x8596=function(){return _0x108fea;};return a79_0x8596();}const a79_0x5c5486=a79_0x3e22;function a79_0x3e22(_0xdefdab,_0x1e271b){_0xdefdab=_0xdefdab-0xf4;const _0x859634=a79_0x8596();let _0x3e22e6=_0x859634[_0xdefdab];return _0x3e22e6;}(function(_0x2c5d67,_0x24fab4){const _0x5dce90=a79_0x3e22,_0x12399e=_0x2c5d67();while(!![]){try{const _0x244c91=parseInt(_0x5dce90(0xfc))/0x1+parseInt(_0x5dce90(0xff))/0x2*(-parseInt(_0x5dce90(0xf9))/0x3)+-parseInt(_0x5dce90(0xf7))/0x4*(-parseInt(_0x5dce90(0x100))/0x5)+parseInt(_0x5dce90(0xfb))/0x6*(-parseInt(_0x5dce90(0xfd))/0x7)+parseInt(_0x5dce90(0xfe))/0x8*(parseInt(_0x5dce90(0x101))/0x9)+parseInt(_0x5dce90(0xf8))/0xa+-parseInt(_0x5dce90(0xf4))/0xb;if(_0x244c91===_0x24fab4)break;else _0x12399e['push'](_0x12399e['shift']());}catch(_0x39cf95){_0x12399e['push'](_0x12399e['shift']());}}}(a79_0x8596,0xb5164));import{cancelDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':a79_0x5c5486(0x104),'description':a79_0x5c5486(0x102),'risk':'write','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':a79_0x5c5486(0x103),'required':!![],'description':a79_0x5c5486(0xf6)}],async 'execute'(_0x5ce812){const _0xb45a93=a79_0x5c5486,_0x172c5f=_0x5ce812[_0xb45a93(0xfa)]('id'),_0x1f7b7e=_0x5ce812[_0xb45a93(0xf5)]('plan');return await cancelDbAnalysis(_0x1f7b7e),{'ok':!![],'data':{'dbLinkId':_0x172c5f,'planId':_0x1f7b7e},'message':_0xb45a93(0x105)+_0x1f7b7e};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a80_0x30b2d7=a80_0x2ca2;function a80_0x216b(){const _0x361d0c=['num','\x20db\x20analyze-batch-plan\x20--id\x20','\x20--tables\x20<tables>`\x20and\x20start\x20each\x20batch\x20serially.','194014xBhEFM','Started\x20analysis\x20for\x20db\x20link\x20','991168ggStdo','15ghWJrs','165668lLLmTF','tables','\x20bytes,\x20limit\x20','301ghJJrE','analyze-start','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','1500219DOLfax','319uJDTFW','\x20bytes.\x20Run\x20`','\x20table(s),\x20','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','24690ekoBEb','validation','258480qBRHEX','At\x20least\x20one\x20table\x20name\x20is\x20required\x20when\x20--tables\x20is\x20provided.','length','112940gfxtga','str','16MTYdnm','Targeted\x20database\x20analysis\x20payload\x20is\x20too\x20large:\x20'];a80_0x216b=function(){return _0x361d0c;};return a80_0x216b();}(function(_0x1571cb,_0x224754){const _0x2647e9=a80_0x2ca2,_0x3bff0e=_0x1571cb();while(!![]){try{const _0x556a58=parseInt(_0x2647e9(0x1e6))/0x1+parseInt(_0x2647e9(0x1ea))/0x2*(parseInt(_0x2647e9(0x1e9))/0x3)+-parseInt(_0x2647e9(0x1e8))/0x4+parseInt(_0x2647e9(0x1dc))/0x5+parseInt(_0x2647e9(0x1f5))/0x6*(-parseInt(_0x2647e9(0x1ed))/0x7)+-parseInt(_0x2647e9(0x1e1))/0x8*(-parseInt(_0x2647e9(0x1f0))/0x9)+parseInt(_0x2647e9(0x1df))/0xa*(-parseInt(_0x2647e9(0x1f1))/0xb);if(_0x556a58===_0x224754)break;else _0x3bff0e['push'](_0x3bff0e['shift']());}catch(_0x3dd418){_0x3bff0e['push'](_0x3bff0e['shift']());}}}(a80_0x216b,0x3ad67));import{startDbAnalysis}from'../../core/api-client.js';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 a80_0x2ca2(_0x197a8f,_0x55a3dc){_0x197a8f=_0x197a8f-0x1db;const _0x216b42=a80_0x216b();let _0x2ca25a=_0x216b42[_0x197a8f];return _0x2ca25a;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbAnalyzeStart={'service':'db','command':a80_0x30b2d7(0x1ee),'description':a80_0x30b2d7(0x1f4),'risk':'write','requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a80_0x30b2d7(0x1eb),'type':'string','description':a80_0x30b2d7(0x1ef)}],async 'execute'(_0x58b5bd){const _0x19c0f1=a80_0x30b2d7,_0x228d8c=_0x58b5bd[_0x19c0f1(0x1e3)]('id'),_0x53ad64=_0x58b5bd[_0x19c0f1(0x1e0)](_0x19c0f1(0x1eb)),_0x47b2b3=_0x58b5bd['flag']('tables')!==undefined,_0x47b17a=_0x47b2b3?normalizeAnalysisTableNames(_0x53ad64):undefined;if(_0x47b17a&&_0x47b17a['length']===0x0)throw CliErrors[_0x19c0f1(0x1db)](_0x19c0f1(0x1dd));if(_0x47b17a&&_0x47b17a[_0x19c0f1(0x1de)]>0x0){const _0x4e6e46=measureAnalysisInputParamsBytes(_0x228d8c,_0x47b17a);if(_0x4e6e46>DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES)throw CliErrors[_0x19c0f1(0x1db)](_0x19c0f1(0x1e2)+_0x47b17a[_0x19c0f1(0x1de)]+_0x19c0f1(0x1f3)+_0x4e6e46+_0x19c0f1(0x1ec)+DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES+_0x19c0f1(0x1f2)+CLI_BIN_NAME+_0x19c0f1(0x1e4)+_0x228d8c+_0x19c0f1(0x1e5));}const {planId:_0x1614ae,estimatedMinutes:_0x5d3519,estimatedDurationDesc:_0x43f5ee}=await startDbAnalysis(_0x228d8c,_0x47b17a),_0x45dd6b=buildDbPageLinks(_0x58b5bd['appCode'],_0x228d8c);return{'ok':!![],'data':{'dbLinkId':_0x228d8c,'planId':_0x1614ae,'tableNames':_0x47b17a??[],'serverEstimate':{'estimatedMinutes':_0x5d3519,'estimatedDurationDesc':_0x43f5ee},..._0x45dd6b?{'links':_0x45dd6b}:{}},'message':_0x19c0f1(0x1e7)+_0x228d8c};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x2747ed=a81_0x2001;function a81_0x271c(){const _0x57bb84=['Analysis\x20status\x20for\x20','accumulatedErrorTypeCounts','number','209780bSDYnT','10ItaViq','2534147rSNCjC','startTime','plan','status','read','string','parse','has','4520691VjaDMK','isNaN','object','SUCCESS','costTimeMs','length','6maHEZa','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','180368GCMKVw','isFinite','appCode','RETRYING','isArray','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','jobContext','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','3386131MNqmik','3nMjKMa','keys','3127360zuyNsD','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','now','6KfSJeS','57848Cvzgvi'];a81_0x271c=function(){return _0x57bb84;};return a81_0x271c();}(function(_0x54013b,_0x304471){const _0x290f3a=a81_0x2001,_0x35ae25=_0x54013b();while(!![]){try{const _0x3bba68=-parseInt(_0x290f3a(0x1cd))/0x1*(parseInt(_0x290f3a(0x1db))/0x2)+-parseInt(_0x290f3a(0x1d6))/0x3*(-parseInt(_0x290f3a(0x1d8))/0x4)+-parseInt(_0x290f3a(0x1e0))/0x5+-parseInt(_0x290f3a(0x1cb))/0x6*(parseInt(_0x290f3a(0x1d5))/0x7)+-parseInt(_0x290f3a(0x1dc))/0x8+parseInt(_0x290f3a(0x1ea))/0x9+-parseInt(_0x290f3a(0x1e1))/0xa*(-parseInt(_0x290f3a(0x1e2))/0xb);if(_0x3bba68===_0x304471)break;else _0x35ae25['push'](_0x35ae25['shift']());}catch(_0x51f794){_0x35ae25['push'](_0x35ae25['shift']());}}}(a81_0x271c,0x6b8ac));import{getDbAnalysisStatus}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';const TERMINAL_STATUSES=new Set([a81_0x2747ed(0x1ed),'PARTIAL_SUCCESS','FAILED','CANCELLED']);function a81_0x2001(_0x4e9480,_0x24480c){_0x4e9480=_0x4e9480-0x1ca;const _0x271cc8=a81_0x271c();let _0x20015b=_0x271cc8[_0x4e9480];return _0x20015b;}export const dbAnalyzeStatus={'service':'db','command':'analyze-status','description':a81_0x2747ed(0x1d2),'risk':a81_0x2747ed(0x1e6),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a81_0x2747ed(0x1e4),'type':a81_0x2747ed(0x1e7),'required':!![],'description':a81_0x2747ed(0x1d9)}],async 'execute'(_0x5e5fb8){const _0x49e6cc=a81_0x2747ed,_0x2efaa5=_0x5e5fb8['num']('id'),_0x15aea6=_0x5e5fb8['str']('plan'),_0x36ce43=await getDbAnalysisStatus(_0x15aea6),_0x3b75cb=TERMINAL_STATUSES[_0x49e6cc(0x1e9)](_0x36ce43[_0x49e6cc(0x1e5)]??''),{parsedJobContext:_0x227fc2,jobContextParseWarning:_0x318f06}=parseJobContext(_0x36ce43[_0x49e6cc(0x1d3)]),_0x385eec=readAccumulatedErrorTypeCounts(_0x227fc2),_0x3653af=buildDbPageLinks(_0x5e5fb8[_0x49e6cc(0x1cf)],_0x2efaa5);return{'ok':!![],'data':{'dbLinkId':_0x2efaa5,'planId':_0x15aea6,'status':_0x36ce43,'parsedJobContext':_0x227fc2,'accumulatedErrorTypeCounts':_0x385eec,'accumulatedErrorTypeCountsAdvisory':_0x385eec?_0x49e6cc(0x1cc):_0x49e6cc(0x1d4),'isTerminal':_0x3b75cb,'isRetrying':_0x36ce43[_0x49e6cc(0x1e5)]===_0x49e6cc(0x1d0),'elapsedMs':calculateElapsedMs(_0x36ce43,_0x3b75cb),'jobContextParseWarning':_0x318f06,..._0x3653af?{'links':_0x3653af}:{}},'message':_0x49e6cc(0x1dd)+_0x15aea6};}};function readAccumulatedErrorTypeCounts(_0x40647c){const _0x3274ed=a81_0x2747ed,_0x5af20c=_0x40647c?.[_0x3274ed(0x1de)];if(!_0x5af20c||typeof _0x5af20c!==_0x3274ed(0x1ec)||Array[_0x3274ed(0x1d1)](_0x5af20c))return null;if(Object[_0x3274ed(0x1d7)](_0x5af20c)[_0x3274ed(0x1ca)]===0x0)return null;return _0x5af20c;}function parseJobContext(_0x2c9986){const _0x220615=a81_0x2747ed;if(!_0x2c9986?.['trim']())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x19cf53=JSON[_0x220615(0x1e8)](_0x2c9986);if(_0x19cf53&&typeof _0x19cf53==='object'&&!Array[_0x220615(0x1d1)](_0x19cf53))return{'parsedJobContext':_0x19cf53,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':'jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.'};}function calculateElapsedMs(_0x5a1add,_0x4969f9){const _0xd90154=a81_0x2747ed;if(typeof _0x5a1add[_0xd90154(0x1ee)]===_0xd90154(0x1df)&&Number[_0xd90154(0x1ce)](_0x5a1add[_0xd90154(0x1ee)])&&_0x5a1add[_0xd90154(0x1ee)]>=0x0)return _0x5a1add[_0xd90154(0x1ee)];const _0x13c873=toTimestamp(_0x5a1add[_0xd90154(0x1e3)]);if(_0x13c873===null)return null;const _0x2c7236=toTimestamp(_0x5a1add['endTime']),_0x27ada9=_0x2c7236??(_0x4969f9?null:Date[_0xd90154(0x1da)]());if(_0x27ada9===null||_0x27ada9<_0x13c873)return null;return _0x27ada9-_0x13c873;}function toTimestamp(_0x4fbe70){const _0x31860f=a81_0x2747ed;if(typeof _0x4fbe70===_0x31860f(0x1df))return Number[_0x31860f(0x1ce)](_0x4fbe70)?_0x4fbe70:null;if(typeof _0x4fbe70!==_0x31860f(0x1e7)||_0x4fbe70['trim']()==='')return null;const _0x3061fb=Number(_0x4fbe70);if(Number[_0x31860f(0x1ce)](_0x3061fb))return _0x3061fb;const _0x2c8635=Date[_0x31860f(0x1e8)](_0x4fbe70);return Number[_0x31860f(0x1eb)](_0x2c8635)?null:_0x2c8635;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a82_0x5c4501=a82_0x58f7;(function(_0x134bb8,_0x3def7e){const _0x3fbd8c=a82_0x58f7,_0x1f9e22=_0x134bb8();while(!![]){try{const _0x86a166=-parseInt(_0x3fbd8c(0xd5))/0x1*(-parseInt(_0x3fbd8c(0xc2))/0x2)+-parseInt(_0x3fbd8c(0xbf))/0x3*(parseInt(_0x3fbd8c(0xcc))/0x4)+parseInt(_0x3fbd8c(0xdb))/0x5*(parseInt(_0x3fbd8c(0xb6))/0x6)+parseInt(_0x3fbd8c(0xc1))/0x7*(parseInt(_0x3fbd8c(0xca))/0x8)+parseInt(_0x3fbd8c(0xd3))/0x9*(parseInt(_0x3fbd8c(0xbd))/0xa)+parseInt(_0x3fbd8c(0xde))/0xb+parseInt(_0x3fbd8c(0xc4))/0xc*(-parseInt(_0x3fbd8c(0xc7))/0xd);if(_0x86a166===_0x3def7e)break;else _0x1f9e22['push'](_0x1f9e22['shift']());}catch(_0x164057){_0x1f9e22['push'](_0x1f9e22['shift']());}}}(a82_0x8063,0xad76f));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';function a82_0x58f7(_0x272d3b,_0x464ae5){_0x272d3b=_0x272d3b-0xb4;const _0x806306=a82_0x8063();let _0x58f74b=_0x806306[_0x272d3b];return _0x58f74b;}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a82_0x5c4501(0xd7),'description':'Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','risk':a82_0x5c4501(0xdf),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a82_0x5c4501(0xda),'type':a82_0x5c4501(0xe2),'required':!![],'description':a82_0x5c4501(0xd9)},DB_TYPE_FLAG,{'name':a82_0x5c4501(0xc8),'type':a82_0x5c4501(0xe2),'description':a82_0x5c4501(0xc0),'default':a82_0x5c4501(0xd8)},{'name':a82_0x5c4501(0xb7),'type':a82_0x5c4501(0xe2),'required':!![],'description':a82_0x5c4501(0xbb)},{'name':a82_0x5c4501(0xd1),'type':a82_0x5c4501(0xe2),'required':!![],'description':a82_0x5c4501(0xd6)},{'name':a82_0x5c4501(0xd4),'type':a82_0x5c4501(0xe2),'required':!![],'description':'Database\x20password'},{'name':'dbparam','type':a82_0x5c4501(0xe2),'description':a82_0x5c4501(0xdd)},{'name':a82_0x5c4501(0xe3),'type':a82_0x5c4501(0xe2),'description':a82_0x5c4501(0xcb)},{'name':a82_0x5c4501(0xce),'type':a82_0x5c4501(0xba),'description':'After\x20create,\x20start\x20schema\x20analysis','default':![]}],async 'validate'(_0x9ec4e1){const _0x283dd4=a82_0x5c4501,_0x477860=_0x9ec4e1[_0x283dd4(0xcd)](_0x283dd4(0xb7))[_0x283dd4(0xc6)]();if(!validateDbUrl(_0x477860))throw CliErrors[_0x283dd4(0xbc)](_0x283dd4(0xb9)+_0x477860+'\x22',_0x283dd4(0xb8));},async 'dryRun'(_0x258222){const _0x5eda60=a82_0x5c4501,_0x2181a1={'appCode':_0x258222[_0x5eda60(0xbe)],'dbName':_0x258222['str'](_0x5eda60(0xda)),'dbType':_0x258222['str']('dbtype'),'dbVersion':_0x258222['str'](_0x5eda60(0xc8))||_0x5eda60(0xd8),'dbUrl':_0x258222[_0x5eda60(0xcd)]('dburl')['trim'](),'username':_0x258222[_0x5eda60(0xcd)]('username'),'password':_0x5eda60(0xdc),..._0x258222[_0x5eda60(0xcd)](_0x5eda60(0xb5))?{'dbParam':_0x258222[_0x5eda60(0xcd)]('dbparam')}:{},..._0x258222[_0x5eda60(0xcd)](_0x5eda60(0xe3))?{'dbDesc':_0x258222['str'](_0x5eda60(0xe3))}:{}};return{'method':'POST','url':'/smartapi/dblink/create','body':_0x2181a1,'description':['Create\x20dblink',_0x258222[_0x5eda60(0xe0)](_0x5eda60(0xce))?_0x5eda60(0xc9):_0x5eda60(0xc3)][_0x5eda60(0xd2)]('\x0a')};},async 'execute'(_0x393292){const _0x2d4588=a82_0x5c4501,_0x3f0986={'appCode':_0x393292[_0x2d4588(0xbe)],'dbName':_0x393292[_0x2d4588(0xcd)](_0x2d4588(0xda)),'dbType':_0x393292[_0x2d4588(0xcd)](_0x2d4588(0xcf)),'dbVersion':_0x393292['str'](_0x2d4588(0xc8))||'8.0','dbUrl':_0x393292[_0x2d4588(0xcd)](_0x2d4588(0xb7))[_0x2d4588(0xc6)](),'username':_0x393292[_0x2d4588(0xcd)]('username'),'password':_0x393292[_0x2d4588(0xcd)]('password'),..._0x393292['str']('dbparam')?{'dbParam':_0x393292['str'](_0x2d4588(0xb5))}:{},..._0x393292[_0x2d4588(0xcd)]('dbdesc')?{'dbDesc':_0x393292[_0x2d4588(0xcd)](_0x2d4588(0xe3))}:{}},{id:_0x130894,entity:_0x5daf84}=normalizeEntityWithIdResponse(await createDbLink(_0x3f0986));if(!_0x130894)return{'ok':![],'message':'Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','data':sanitizeDbLinkForOutput(_0x5daf84)};let _0x517f24,_0x55f53f;if(_0x393292[_0x2d4588(0xe0)](_0x2d4588(0xce)))try{_0x517f24=(await startDbAnalysis(_0x130894))[_0x2d4588(0xc5)];}catch(_0x2109f0){_0x55f53f=_0x2109f0 instanceof Error?_0x2109f0[_0x2d4588(0xb4)]:String(_0x2109f0);}const _0x156456=buildDbPageLinks(_0x393292[_0x2d4588(0xbe)],_0x130894),_0x4b161f={'connection':sanitizeDbLinkForOutput(_0x5daf84),..._0x156456?{'links':{'databasePage':_0x156456['databasePage']}}:{},..._0x517f24?{'analysisPlanId':_0x517f24}:{},..._0x55f53f?{'analysisStartWarning':_0x55f53f}:{}};let _0x3446d8;return _0x393292[_0x2d4588(0xe0)](_0x2d4588(0xce))?_0x55f53f?_0x3446d8=_0x2d4588(0xd0)+_0x130894+_0x2d4588(0xe1):_0x3446d8=_0x2d4588(0xd0)+_0x130894+'\x20and\x20started\x20analysis':_0x3446d8=_0x2d4588(0xd0)+_0x130894,{'ok':!![],'data':_0x4b161f,'message':_0x3446d8};}};function a82_0x8063(){const _0x5533cc=['Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','boolean','Host\x20and\x20port:\x20host:port','validation','50HRSMoK','appCode','326475LScMEZ','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','71701SjtUTE','4VUoTYm','No\x20follow-up\x20analysis','24LCSTWC','planId','trim','9061546oPJAMc','dbversion','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','992vcLhfy','Human-readable\x20description','28OzMHLa','str','autostart','dbtype','Created\x20db\x20link\x20','username','join','414KxGgBp','password','156854ITQMWN','Database\x20username','create','8.0','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','dbname','15peeETn','[redacted]','Extra\x20JDBC-style\x20connection\x20parameters\x20string','3542726MxNjtq','write','bool',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','string','dbdesc','message','dbparam','1920468bVlNnW','dburl','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.'];a82_0x8063=function(){return _0x5533cc;};return a82_0x8063();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a83_0x169a(_0x512cd8,_0x5c9f0e){_0x512cd8=_0x512cd8-0x162;const _0x532215=a83_0x5322();let _0x169aab=_0x532215[_0x512cd8];return _0x169aab;}const a83_0x1c5237=a83_0x169a;function a83_0x5322(){const _0x42bc12=['2583264nqFVMa','6ZbPsXL','297aOndmZ','Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','delete','946752aXZmLK','225350pQZuzO','3314661cJexaF','num','16291upbqgz','Deleted\x20db\x20link\x20','24apJFyj','571973FcQRqs','50fBCnBe','6516Fdkhfg','high-risk-write','582648xhIIgy'];a83_0x5322=function(){return _0x42bc12;};return a83_0x5322();}(function(_0x3bf156,_0x13b251){const _0x2e7a57=a83_0x169a,_0x51d544=_0x3bf156();while(!![]){try{const _0x2e67a4=parseInt(_0x2e7a57(0x172))/0x1+-parseInt(_0x2e7a57(0x16b))/0x2*(parseInt(_0x2e7a57(0x167))/0x3)+parseInt(_0x2e7a57(0x166))/0x4+parseInt(_0x2e7a57(0x162))/0x5*(-parseInt(_0x2e7a57(0x165))/0x6)+parseInt(_0x2e7a57(0x16d))/0x7*(parseInt(_0x2e7a57(0x171))/0x8)+-parseInt(_0x2e7a57(0x168))/0x9*(parseInt(_0x2e7a57(0x16c))/0xa)+-parseInt(_0x2e7a57(0x16f))/0xb*(-parseInt(_0x2e7a57(0x163))/0xc);if(_0x2e67a4===_0x13b251)break;else _0x51d544['push'](_0x51d544['shift']());}catch(_0xea47fb){_0x51d544['push'](_0x51d544['shift']());}}}(a83_0x5322,0xbeafe));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':a83_0x1c5237(0x16a),'description':a83_0x1c5237(0x169),'risk':a83_0x1c5237(0x164),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1322c0){const _0x1649e1=a83_0x1c5237,_0x2aa8b1=_0x1322c0[_0x1649e1(0x16e)]('id');return await deleteDbLink(_0x2aa8b1),{'ok':!![],'data':{'id':_0x2aa8b1,'deleted':!![]},'message':_0x1649e1(0x170)+_0x2aa8b1};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a84_0x1f37c6=a84_0x2163;function a84_0x2033(){const _0x5d3bb7=['dbName','20120WTkBDZ','105588ADoUJL','6dSYuEs','1221551MjKpDI','detail','5aoyoOO','72886gqxVex','db\x20link\x20','read','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','610254JAuLCm','6704286oEfmYF','911528bcYMwf','1070FRgEEH','2345iphUZU','num'];a84_0x2033=function(){return _0x5d3bb7;};return a84_0x2033();}(function(_0x44488f,_0x754ca8){const _0x268d6b=a84_0x2163,_0x436a5c=_0x44488f();while(!![]){try{const _0x21a615=-parseInt(_0x268d6b(0x113))/0x1+parseInt(_0x268d6b(0x10b))/0x2*(parseInt(_0x268d6b(0x112))/0x3)+parseInt(_0x268d6b(0x111))/0x4+-parseInt(_0x268d6b(0x115))/0x5*(-parseInt(_0x268d6b(0x10a))/0x6)+parseInt(_0x268d6b(0x10d))/0x7*(-parseInt(_0x268d6b(0x110))/0x8)+parseInt(_0x268d6b(0x109))/0x9+-parseInt(_0x268d6b(0x10c))/0xa*(-parseInt(_0x268d6b(0x116))/0xb);if(_0x21a615===_0x754ca8)break;else _0x436a5c['push'](_0x436a5c['shift']());}catch(_0x284469){_0x436a5c['push'](_0x436a5c['shift']());}}}(a84_0x2033,0xbb812));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a84_0x2163(_0x3cdccc,_0x53107b){_0x3cdccc=_0x3cdccc-0x106;const _0x203365=a84_0x2033();let _0x21636a=_0x203365[_0x3cdccc];return _0x21636a;}import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':a84_0x1f37c6(0x114),'description':a84_0x1f37c6(0x108),'risk':a84_0x1f37c6(0x107),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x30f53d){const _0xe8abd2=a84_0x1f37c6,_0x44e6fd=_0x30f53d[_0xe8abd2(0x10e)]('id'),_0x455154=await getDbLinkInfo(_0x44e6fd);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x455154),'message':_0xe8abd2(0x106)+_0x44e6fd+':\x20'+_0x455154[_0xe8abd2(0x10f)]};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a85_0x4311e6=a85_0x1fd8;(function(_0x4ae2c7,_0x34da81){const _0x47bfca=a85_0x1fd8,_0x6ba686=_0x4ae2c7();while(!![]){try{const _0x7aed13=-parseInt(_0x47bfca(0x17b))/0x1+-parseInt(_0x47bfca(0x164))/0x2*(-parseInt(_0x47bfca(0x162))/0x3)+parseInt(_0x47bfca(0x150))/0x4+-parseInt(_0x47bfca(0x16f))/0x5+parseInt(_0x47bfca(0x156))/0x6*(-parseInt(_0x47bfca(0x17d))/0x7)+parseInt(_0x47bfca(0x168))/0x8+parseInt(_0x47bfca(0x17f))/0x9*(-parseInt(_0x47bfca(0x170))/0xa);if(_0x7aed13===_0x34da81)break;else _0x6ba686['push'](_0x6ba686['shift']());}catch(_0x218e50){_0x6ba686['push'](_0x6ba686['shift']());}}}(a85_0x206b,0x40bfa));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';function a85_0x206b(){const _0x375618=['976630QPwjgT','711910lDRSnb','size','\x20row(s).','DELETED_TABLE','tableList','Page\x20size','set','NEW_TABLE','tableName','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','\x20of\x20','116152oYtQDW','\x20(db\x20link\x20','693833UaNpPa','ALREADY_ANALYZED','18HRPAcd','summary','totalCount','fieldDiff','changed-only','896600KEjAtE','num','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','filter','page','all','6kdGRyy','validation','diffType','bool','string','physicalTableCount','map','boolean','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','deletedColumns','read','table','24vyhYKA','fromEntries','129996crPEoi','diff','pagesize','appCode','592440EdtHQF','addedColumns','length','number','MODIFIED_TABLE','datasetTableCount','\x20row(s),\x20total\x20'];a85_0x206b=function(){return _0x375618;};return a85_0x206b();}function a85_0x1fd8(_0x3f9725,_0x1db39b){_0x3f9725=_0x3f9725-0x14d;const _0x206beb=a85_0x206b();let _0x1fd889=_0x206beb[_0x3f9725];return _0x1fd889;}const ALL_PAGE_SIZE=0x64,DIFF_TYPES=[a85_0x4311e6(0x177),a85_0x4311e6(0x16c),a85_0x4311e6(0x173),a85_0x4311e6(0x17e)];export const dbDiff={'service':'db','command':a85_0x4311e6(0x165),'description':a85_0x4311e6(0x179),'risk':a85_0x4311e6(0x160),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a85_0x4311e6(0x161),'type':a85_0x4311e6(0x15a),'description':a85_0x4311e6(0x152)},{'name':a85_0x4311e6(0x154),'type':'number','description':'Page\x20index\x20(1-based)','default':0x1},{'name':a85_0x4311e6(0x166),'type':a85_0x4311e6(0x16b),'description':a85_0x4311e6(0x175),'default':0x14},{'name':a85_0x4311e6(0x155),'type':a85_0x4311e6(0x15d),'description':a85_0x4311e6(0x15e)},{'name':a85_0x4311e6(0x14f),'type':a85_0x4311e6(0x15d),'description':'Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables'}],async 'execute'(_0x3c660c){const _0x53a27b=a85_0x4311e6,_0x2b6da2=_0x3c660c[_0x53a27b(0x151)]('id'),_0x35a8fc=_0x3c660c[_0x53a27b(0x159)](_0x53a27b(0x155)),_0x2c99c6=_0x3c660c[_0x53a27b(0x159)](_0x53a27b(0x14f)),_0x30ac46=_0x35a8fc?0x1:_0x3c660c['num'](_0x53a27b(0x154),0x1)||0x1,_0x4ff678=_0x35a8fc?ALL_PAGE_SIZE:_0x3c660c[_0x53a27b(0x151)](_0x53a27b(0x166),0x14)||0x14,_0x260853=_0x3c660c['str']('table')||undefined,_0x62a31e=_0x35a8fc?await getAllDbTableDiff(_0x3c660c[_0x53a27b(0x167)],_0x2b6da2,_0x260853):await getDbTableDiff(_0x3c660c['appCode'],_0x2b6da2,{'pageIndex':_0x30ac46,'pageSize':_0x4ff678,'tableName':_0x260853}),_0x1ee46f=_0x62a31e[_0x53a27b(0x174)],_0x58ffd1=_0x2c99c6?_0x1ee46f[_0x53a27b(0x153)](_0x57ec6b=>_0x57ec6b[_0x53a27b(0x158)]!=='ALREADY_ANALYZED'):_0x1ee46f,_0x4f2b7e=Object[_0x53a27b(0x163)](DIFF_TYPES[_0x53a27b(0x15c)](_0x41d04e=>[_0x41d04e,_0x1ee46f[_0x53a27b(0x153)](_0x14e373=>_0x14e373['diffType']===_0x41d04e)[_0x53a27b(0x16a)]])),_0xd457de=_0x1ee46f[_0x53a27b(0x153)](_0x1907de=>_0x1907de[_0x53a27b(0x158)]===_0x53a27b(0x177)||_0x1907de[_0x53a27b(0x158)]===_0x53a27b(0x16c))['map'](_0x40b775=>_0x40b775[_0x53a27b(0x178)]),_0x2f009e=_0x1ee46f[_0x53a27b(0x153)](_0x47cbe4=>_0x47cbe4[_0x53a27b(0x158)]===_0x53a27b(0x173))['map'](_0x5b9717=>_0x5b9717['tableName']),_0xdab960=_0x1ee46f[_0x53a27b(0x153)](_0xeda466=>_0xeda466[_0x53a27b(0x158)]===_0x53a27b(0x16c))[_0x53a27b(0x15c)](_0x12488b=>({'tableName':_0x12488b['tableName'],'addedColumns':_0x12488b[_0x53a27b(0x14e)]?.[_0x53a27b(0x169)]??[],'deletedColumns':_0x12488b[_0x53a27b(0x14e)]?.[_0x53a27b(0x15f)]??[],'modifiedColumns':_0x12488b[_0x53a27b(0x14e)]?.['modifiedColumns']??[]}));return{'ok':!![],'data':{'dbLinkId':_0x2b6da2,'page':_0x30ac46,'pageSize':_0x4ff678,'totalCount':_0x62a31e[_0x53a27b(0x14d)],'physicalTableCount':_0x62a31e[_0x53a27b(0x15b)],'datasetTableCount':_0x62a31e['datasetTableCount'],..._0x62a31e[_0x53a27b(0x180)]?{'summary':_0x62a31e[_0x53a27b(0x180)]}:{},'summaryByType':_0x4f2b7e,'toAnalyzeTables':_0xd457de,'deletedTables':_0x2f009e,'modifiedFieldDiffs':_0xdab960,'tables':_0x58ffd1,'tableList':_0x58ffd1},'message':_0x58ffd1[_0x53a27b(0x16a)]+_0x53a27b(0x16e)+_0x62a31e[_0x53a27b(0x14d)]+_0x53a27b(0x17c)+_0x2b6da2+')'};}};async function getAllDbTableDiff(_0x1ada15,_0x4bfc01,_0x3744bc){const _0x27f52f=a85_0x4311e6,_0x2c99eb=new Map();let _0x407016=0x1,_0x301db3=null;while(!![]){_0x301db3=await getDbTableDiff(_0x1ada15,_0x4bfc01,{'pageIndex':_0x407016,'pageSize':ALL_PAGE_SIZE,'tableName':_0x3744bc});const _0x55c4b1=_0x2c99eb[_0x27f52f(0x171)];for(const _0x395423 of _0x301db3[_0x27f52f(0x174)]){_0x2c99eb[_0x27f52f(0x176)](_0x395423[_0x27f52f(0x178)],_0x395423);}if(_0x2c99eb['size']>=_0x301db3['totalCount'])break;if(_0x301db3[_0x27f52f(0x174)][_0x27f52f(0x16a)]===0x0||_0x2c99eb[_0x27f52f(0x171)]===_0x55c4b1)throw CliErrors[_0x27f52f(0x157)]('Incomplete\x20db\x20diff\x20pagination:\x20collected\x20'+_0x2c99eb[_0x27f52f(0x171)]+_0x27f52f(0x17a)+_0x301db3[_0x27f52f(0x14d)]+_0x27f52f(0x172));_0x407016+=0x1;}return{'totalCount':_0x301db3?.[_0x27f52f(0x14d)]??0x0,'physicalTableCount':_0x301db3?.['physicalTableCount']??0x0,'datasetTableCount':_0x301db3?.[_0x27f52f(0x16d)]??0x0,..._0x301db3?.[_0x27f52f(0x180)]?{'summary':_0x301db3[_0x27f52f(0x180)]}:{},'tableList':[..._0x2c99eb['values']()]};}
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x2f67db,_0x8de912){const _0xba56b2=a86_0x1f4a,_0x4ab0fa=_0x2f67db();while(!![]){try{const _0x382af4=parseInt(_0xba56b2(0x13b))/0x1*(parseInt(_0xba56b2(0x13a))/0x2)+-parseInt(_0xba56b2(0x137))/0x3*(-parseInt(_0xba56b2(0x142))/0x4)+-parseInt(_0xba56b2(0x13c))/0x5*(parseInt(_0xba56b2(0x13e))/0x6)+-parseInt(_0xba56b2(0x138))/0x7*(parseInt(_0xba56b2(0x13d))/0x8)+-parseInt(_0xba56b2(0x140))/0x9*(-parseInt(_0xba56b2(0x141))/0xa)+-parseInt(_0xba56b2(0x13f))/0xb+parseInt(_0xba56b2(0x139))/0xc;if(_0x382af4===_0x8de912)break;else _0x4ab0fa['push'](_0x4ab0fa['shift']());}catch(_0x5448a1){_0x4ab0fa['push'](_0x4ab0fa['shift']());}}}(a86_0x540e,0xde479));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';function a86_0x1f4a(_0x43c2c3,_0x5260cf){_0x43c2c3=_0x43c2c3-0x137;const _0x540e55=a86_0x540e();let _0x1f4a21=_0x540e55[_0x43c2c3];return _0x1f4a21;}import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';function a86_0x540e(){const _0x17bad5=['944DqdxqB','10662ThFBxj','4417hAQaDc','46511076ObmUEQ','24088FtGXkg','11IUNwYD','1760TApjWw','19448OIowcD','25242hXnYPw','17528566GYJIua','1179NOoSGf','51270OnEHkX'];a86_0x540e=function(){return _0x17bad5;};return a86_0x540e();}import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';import{dbDiff}from'../../commands/db/diff.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x4459e2=a87_0x585c;function a87_0x4298(){const _0x11c2cd=['page','749184npfeWK','length','2583290ElkLUJ','list','11StSWUU','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','6530658bvymmj','appCode','number','Page\x20size','5609835VWbkXn','6405790POhLrZ','103FkDfPo','1000260hpgWjZ','pagesize','12106XSBGhB','Found\x20','num','4HexWiu','7nbXVGw','\x20database\x20connection(s)'];a87_0x4298=function(){return _0x11c2cd;};return a87_0x4298();}(function(_0x4199d2,_0x4bccf7){const _0x14e3ba=a87_0x585c,_0x35d9d4=_0x4199d2();while(!![]){try{const _0x5acde2=parseInt(_0x14e3ba(0x1bd))/0x1*(-parseInt(_0x14e3ba(0x1aa))/0x2)+-parseInt(_0x14e3ba(0x1be))/0x3+-parseInt(_0x14e3ba(0x1ad))/0x4*(-parseInt(_0x14e3ba(0x1b3))/0x5)+-parseInt(_0x14e3ba(0x1b7))/0x6*(-parseInt(_0x14e3ba(0x1ae))/0x7)+parseInt(_0x14e3ba(0x1b1))/0x8+parseInt(_0x14e3ba(0x1bb))/0x9+parseInt(_0x14e3ba(0x1bc))/0xa*(-parseInt(_0x14e3ba(0x1b5))/0xb);if(_0x5acde2===_0x4bccf7)break;else _0x35d9d4['push'](_0x35d9d4['shift']());}catch(_0x542d22){_0x35d9d4['push'](_0x35d9d4['shift']());}}}(a87_0x4298,0xb0e7e));function a87_0x585c(_0x466653,_0x33f9ce){_0x466653=_0x466653-0x1a9;const _0x4298b2=a87_0x4298();let _0x585cdd=_0x4298b2[_0x466653];return _0x585cdd;}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':a87_0x4459e2(0x1b4),'description':a87_0x4459e2(0x1b6),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':a87_0x4459e2(0x1b0),'type':'number','description':'Page\x20index\x20(1-based)','default':0x1},{'name':a87_0x4459e2(0x1a9),'type':a87_0x4459e2(0x1b9),'description':a87_0x4459e2(0x1ba),'default':0x64}],async 'execute'(_0x2bb5d4){const _0x5b23cf=a87_0x4459e2,_0x9f4c=_0x2bb5d4[_0x5b23cf(0x1ac)](_0x5b23cf(0x1b0),0x1)||0x1,_0x2e4a0f=_0x2bb5d4['num'](_0x5b23cf(0x1a9),0x64)||0x64,{items:_0x321867,paging:_0x5e3d35}=await listDbLinks(_0x2bb5d4[_0x5b23cf(0x1b8)],{'currentPage':_0x9f4c,'pageSize':_0x2e4a0f}),_0x369c77=sanitizeDbLinkList(_0x321867),_0x3d8444=_0x5e3d35?_0x5e3d35:{'currentPage':_0x9f4c,'pageSize':_0x2e4a0f,'rowsOnPage':_0x369c77[_0x5b23cf(0x1b2)],'totalCount':null,'note':'Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only'};return{'ok':!![],'data':{'connections':_0x369c77,'paging':_0x3d8444},'message':_0x5b23cf(0x1ab)+_0x369c77['length']+_0x5b23cf(0x1af)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x17c074,_0x4e1b00){const _0xbc28b0=a88_0x1927,_0x321d59=_0x17c074();while(!![]){try{const _0xcc4a2c=-parseInt(_0xbc28b0(0x184))/0x1*(parseInt(_0xbc28b0(0x18f))/0x2)+-parseInt(_0xbc28b0(0x18a))/0x3+-parseInt(_0xbc28b0(0x18d))/0x4+-parseInt(_0xbc28b0(0x181))/0x5*(-parseInt(_0xbc28b0(0x191))/0x6)+-parseInt(_0xbc28b0(0x188))/0x7*(-parseInt(_0xbc28b0(0x17a))/0x8)+parseInt(_0xbc28b0(0x18e))/0x9*(parseInt(_0xbc28b0(0x192))/0xa)+-parseInt(_0xbc28b0(0x18c))/0xb*(parseInt(_0xbc28b0(0x180))/0xc);if(_0xcc4a2c===_0x4e1b00)break;else _0x321d59['push'](_0x321d59['shift']());}catch(_0x5d17f8){_0x321d59['push'](_0x321d59['shift']());}}}(a88_0x5af0,0x1b7f1));import{getAppBaseUrl}from'../../constant/domain.js';function a88_0x5af0(){const _0x2b5156=['token','includes','toLowerCase','credential','318272xWymmV','accesskey','password','/data/database','map','[redacted]','12ZIcFUw','1107065AcqTOg','length','isFinite','880CiupwE','/data/er?dbId=','trim','number','21eMYDhx','secret','121503CewVou','authorization','1008117LaRrlK','519184EPXqEb','9AyJras','20SEChSz','keys','6mVJUSN','426040cpfvnv','test','passwd','dbpassword'];a88_0x5af0=function(){return _0x2b5156;};return a88_0x5af0();}function a88_0x1927(_0x3ea93a,_0x27b90a){_0x3ea93a=_0x3ea93a-0x174;const _0x5af09c=a88_0x5af0();let _0x19275d=_0x5af09c[_0x3ea93a];return _0x19275d;}function shouldRedactKey(_0x5e0630){const _0x22457f=a88_0x1927,_0x45c264=_0x5e0630[_0x22457f(0x178)]();if(_0x45c264===_0x22457f(0x17c)||_0x45c264===_0x22457f(0x174)||_0x45c264===_0x22457f(0x175))return!![];if(_0x45c264['includes'](_0x22457f(0x189))||_0x45c264['includes'](_0x22457f(0x176))||_0x45c264[_0x22457f(0x177)](_0x22457f(0x179)))return!![];if(_0x45c264[_0x22457f(0x177)]('privatekey')||_0x45c264['includes'](_0x22457f(0x17b)))return!![];if(_0x45c264===_0x22457f(0x18b)||_0x45c264==='connectionstring'||_0x45c264==='jdbcurl')return!![];return![];}export function sanitizeDbLinkForOutput(_0xe9f5ee){const _0x4403a3=a88_0x1927,_0x3fd63d={..._0xe9f5ee};for(const _0x264997 of Object[_0x4403a3(0x190)](_0x3fd63d)){if(!shouldRedactKey(_0x264997))continue;const _0x578b2d=_0x3fd63d[_0x264997];_0x578b2d!=null&&String(_0x578b2d)[_0x4403a3(0x182)]>0x0&&(_0x3fd63d[_0x264997]=_0x4403a3(0x17f));}return _0x3fd63d;}export function sanitizeDbLinkList(_0x1f42f5){const _0x3138c6=a88_0x1927;return _0x1f42f5[_0x3138c6(0x17e)](_0x40f9b2=>sanitizeDbLinkForOutput(_0x40f9b2));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x25d0eb){const _0x5da694=a88_0x1927,_0x426bf0=_0x25d0eb[_0x5da694(0x186)]();if(!_0x426bf0)return![];return DB_URL_PATTERN[_0x5da694(0x193)](_0x426bf0);}export function buildDbPageLinks(_0x8d2fe,_0x44b1fb){const _0x4ec7e9=a88_0x1927,_0x5c8027=_0x8d2fe?.[_0x4ec7e9(0x186)]();if(!_0x5c8027)return undefined;const _0x4a1bf3=typeof _0x44b1fb===_0x4ec7e9(0x187)?String(_0x44b1fb):String(_0x44b1fb??'')[_0x4ec7e9(0x186)]();if(!_0x4a1bf3)return undefined;const _0x3d7b54=Number(_0x4a1bf3);if(!Number[_0x4ec7e9(0x183)](_0x3d7b54)||_0x3d7b54<=0x0)return undefined;const _0x40f862=getAppBaseUrl(_0x5c8027),_0x3e4b4f=encodeURIComponent(String(_0x3d7b54));return{'databasePage':_0x40f862+_0x4ec7e9(0x17d),'erPage':_0x40f862+_0x4ec7e9(0x185)+_0x3e4b4f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x33cc7c=a89_0x49ad;(function(_0x174118,_0x4ee58a){const _0x30653e=a89_0x49ad,_0x57fbd1=_0x174118();while(!![]){try{const _0x1a02d6=parseInt(_0x30653e(0xa5))/0x1+parseInt(_0x30653e(0xad))/0x2+-parseInt(_0x30653e(0xa8))/0x3+parseInt(_0x30653e(0xa7))/0x4*(-parseInt(_0x30653e(0xa9))/0x5)+-parseInt(_0x30653e(0xb0))/0x6*(parseInt(_0x30653e(0xaf))/0x7)+-parseInt(_0x30653e(0xaa))/0x8+-parseInt(_0x30653e(0xae))/0x9*(-parseInt(_0x30653e(0xb1))/0xa);if(_0x1a02d6===_0x4ee58a)break;else _0x57fbd1['push'](_0x57fbd1['shift']());}catch(_0x2f9ad9){_0x57fbd1['push'](_0x57fbd1['shift']());}}}(a89_0x33f0,0x86aae));import{getDbAllTableList}from'../../core/api-client.js';function a89_0x49ad(_0x3b7827,_0x5e7b57){_0x3b7827=_0x3b7827-0xa2;const _0x33f015=a89_0x33f0();let _0x49ad25=_0x33f015[_0x3b7827];return _0x49ad25;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a89_0x33cc7c(0xa4),'description':a89_0x33cc7c(0xa2),'risk':a89_0x33cc7c(0xab),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x16c3ec){const _0x5ba461=a89_0x33cc7c,_0x14cdc8=_0x16c3ec[_0x5ba461(0xac)]('id'),_0x317a7c=await getDbAllTableList(_0x16c3ec[_0x5ba461(0xa6)],_0x14cdc8);return{'ok':!![],'data':{'dbLinkId':_0x14cdc8,'total':_0x317a7c[_0x5ba461(0xa3)],'tables':_0x317a7c},'message':_0x317a7c[_0x5ba461(0xa3)]+'\x20table(s)\x20on\x20db\x20link\x20'+_0x14cdc8};}};function a89_0x33f0(){const _0x50d976=['num','604534JJoGnJ','21510IJsUjG','111363UUuUKO','342iaXUoD','15060QmtzqP','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','length','tables','335520eNRnRa','appCode','268zKyrGp','2233578bSzzgQ','79535WanjYJ','7747368hytsQc','read'];a89_0x33f0=function(){return _0x50d976;};return a89_0x33f0();}
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a90_0xcd64(){const _0x309bc7=['success','5BEPrSw','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','3006828pSoriH','read','code','98029581GvDrkM','30lbhsqm','object','length','\x20(see\x20data.result)','3KislXk','msg','11163103IDYsSc','15FSoGln','keys','5670324QToqYh','message','220odwHPl','8zZmQQn','error','slice','Connection\x20OK\x20for\x20db\x20link\x20','444732jBxxpF','4226391ffUOMz','9250nGwtuo','test'];a90_0xcd64=function(){return _0x309bc7;};return a90_0xcd64();}const a90_0x2d2960=a90_0x5919;function a90_0x5919(_0xcad05,_0x44fb16){_0xcad05=_0xcad05-0x113;const _0xcd6487=a90_0xcd64();let _0x5919e0=_0xcd6487[_0xcad05];return _0x5919e0;}(function(_0x13fa6a,_0x3d100f){const _0x352d05=a90_0x5919,_0x564348=_0x13fa6a();while(!![]){try{const _0xbf6f57=parseInt(_0x352d05(0x118))/0x1*(-parseInt(_0x352d05(0x115))/0x2)+-parseInt(_0x352d05(0x122))/0x3*(parseInt(_0x352d05(0x127))/0x4)+-parseInt(_0x352d05(0x125))/0x5*(parseInt(_0x352d05(0x11a))/0x6)+-parseInt(_0x352d05(0x124))/0x7*(parseInt(_0x352d05(0x12a))/0x8)+parseInt(_0x352d05(0x114))/0x9*(-parseInt(_0x352d05(0x11e))/0xa)+parseInt(_0x352d05(0x129))/0xb*(-parseInt(_0x352d05(0x113))/0xc)+parseInt(_0x352d05(0x11d))/0xd;if(_0xbf6f57===_0x3d100f)break;else _0x564348['push'](_0x564348['shift']());}catch(_0x24b2ec){_0x564348['push'](_0x564348['shift']());}}}(a90_0xcd64,0xcff9f));import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x4b5950){const _0x89c9ef=a90_0x5919;if(_0x4b5950===!![]||_0x4b5950===![])return{'success':_0x4b5950};if(_0x4b5950===null||_0x4b5950===undefined)return{'type':typeof _0x4b5950};if(typeof _0x4b5950!==_0x89c9ef(0x11f))return{'type':typeof _0x4b5950};const _0x8a2c07=_0x4b5950,_0x417589=[_0x89c9ef(0x117),_0x89c9ef(0x128),_0x89c9ef(0x11c),_0x89c9ef(0x12b),_0x89c9ef(0x123),'data'],_0x57de32={};for(const _0x543a22 of _0x417589){if(_0x543a22 in _0x8a2c07)_0x57de32[_0x543a22]=_0x8a2c07[_0x543a22];}return Object[_0x89c9ef(0x126)](_0x57de32)[_0x89c9ef(0x120)]===0x0&&(_0x57de32[_0x89c9ef(0x126)]=Object[_0x89c9ef(0x126)](_0x8a2c07)[_0x89c9ef(0x12c)](0x0,0x14)),_0x57de32;}export const dbTest={'service':'db','command':a90_0x2d2960(0x116),'description':a90_0x2d2960(0x119),'risk':a90_0x2d2960(0x11b),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x16ddbe){const _0xf42df1=a90_0x2d2960,_0x3942cf=_0x16ddbe['num']('id'),_0x1b2588=await testDbLinkConnect(_0x3942cf),_0x58cb28=_0x1b2588===!![]||typeof _0x1b2588===_0xf42df1(0x11f)&&_0x1b2588!==null&&_0x1b2588[_0xf42df1(0x117)]===!![],_0x1f813a=summarizeTestConnectResult(_0x1b2588);return{'ok':!![],'data':{'id':_0x3942cf,'connected':Boolean(_0x58cb28),'result':_0x1f813a},'message':_0x58cb28?_0xf42df1(0x12d)+_0x3942cf:'Connection\x20check\x20finished\x20for\x20db\x20link\x20'+_0x3942cf+_0xf42df1(0x121)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a91_0x4be666=a91_0x4832;(function(_0x37b7bc,_0x1d218f){const _0x5d18dd=a91_0x4832,_0x903db2=_0x37b7bc();while(!![]){try{const _0x52da84=-parseInt(_0x5d18dd(0x1a3))/0x1*(-parseInt(_0x5d18dd(0x1ac))/0x2)+-parseInt(_0x5d18dd(0x194))/0x3+parseInt(_0x5d18dd(0x1a0))/0x4+-parseInt(_0x5d18dd(0x19f))/0x5*(parseInt(_0x5d18dd(0x198))/0x6)+-parseInt(_0x5d18dd(0x1b4))/0x7*(parseInt(_0x5d18dd(0x1a9))/0x8)+parseInt(_0x5d18dd(0x1ae))/0x9*(-parseInt(_0x5d18dd(0x1af))/0xa)+parseInt(_0x5d18dd(0x1ad))/0xb;if(_0x52da84===_0x1d218f)break;else _0x903db2['push'](_0x903db2['shift']());}catch(_0xf8c590){_0x903db2['push'](_0x903db2['shift']());}}}(a91_0xc21f,0xc9418));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';function a91_0x4832(_0x4dfe10,_0x3e5955){_0x4dfe10=_0x4dfe10-0x193;const _0xc21f4=a91_0xc21f();let _0x4832f6=_0xc21f4[_0x4dfe10];return _0x4832f6;}import{sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set(['******',a91_0x4be666(0x19e)]);function mergeDbLinkUpdate(_0x224b45,_0x574101){const _0x1f08b5=a91_0x4be666,_0x3df07d={..._0x224b45},_0x313077=_0x574101[_0x1f08b5(0x1b0)](_0x1f08b5(0x1a6));if(_0x313077&&MASKED_PASSWORD_VALUES[_0x1f08b5(0x1a1)](_0x313077))throw CliErrors[_0x1f08b5(0x1a4)](_0x1f08b5(0x1aa));if(!_0x313077&&MASKED_PASSWORD_VALUES['has'](String(_0x224b45[_0x1f08b5(0x1a6)]??'')))throw CliErrors[_0x1f08b5(0x1a4)](_0x1f08b5(0x19a));const _0x291249=_0x574101['str'](_0x1f08b5(0x1a8));if(_0x291249)_0x3df07d[_0x1f08b5(0x19b)]=_0x291249;const _0xe0d50e=_0x574101[_0x1f08b5(0x1b0)](_0x1f08b5(0x197));if(_0xe0d50e)_0x3df07d[_0x1f08b5(0x1b2)]=_0xe0d50e[_0x1f08b5(0x1b5)]();const _0x1b4eea=_0x574101[_0x1f08b5(0x1b0)](_0x1f08b5(0x196));if(_0x1b4eea)_0x3df07d[_0x1f08b5(0x196)]=_0x1b4eea;if(_0x313077)_0x3df07d[_0x1f08b5(0x1a6)]=_0x313077;const _0x3c49e3=_0x574101['str'](_0x1f08b5(0x195));if(_0x3c49e3)_0x3df07d['dbParam']=_0x3c49e3;const _0x2a7e5a=_0x574101['str'](_0x1f08b5(0x1a2));if(_0x2a7e5a)_0x3df07d[_0x1f08b5(0x1a7)]=_0x2a7e5a;return _0x3df07d;}function a91_0xc21f(){const _0xede2f7=['434193nZKHtQ','validation','POST','password','dbDesc','dbname','176WSCWTG','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','string','2dtTZxm','12135618ITkgYf','2498427rdKist','10AXnJdr','str','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','dbUrl','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','288239hJOLxI','trim','num','New\x20description','513417PqMomW','dbparam','username','dburl','2487540swLIXz','Merged\x20server\x20record\x20with\x20CLI\x20overrides;\x20password\x20redacted\x20in\x20preview','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','dbName','Updated\x20db\x20link\x20','/smartapi/dblink/update','[redacted]','5yTTHID','4224556hHCVHx','has','dbdesc'];a91_0xc21f=function(){return _0xede2f7;};return a91_0xc21f();}export const dbUpdate={'service':'db','command':'update','description':a91_0x4be666(0x1b1),'risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'dbname','type':a91_0x4be666(0x1ab),'description':'New\x20database\x20name'},{'name':a91_0x4be666(0x197),'type':a91_0x4be666(0x1ab),'description':'New\x20host:port'},{'name':a91_0x4be666(0x196),'type':'string','description':'New\x20username'},{'name':'password','type':a91_0x4be666(0x1ab),'description':'Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20server\x20returns\x20a\x20masked\x20password'},{'name':a91_0x4be666(0x195),'type':a91_0x4be666(0x1ab),'description':'New\x20connection\x20parameter\x20string'},{'name':a91_0x4be666(0x1a2),'type':'string','description':a91_0x4be666(0x193)}],async 'validate'(_0x2437a2){const _0x1cbdd3=a91_0x4be666,_0x718138=_0x2437a2[_0x1cbdd3(0x1b0)](_0x1cbdd3(0x197));if(_0x718138&&!validateDbUrl(_0x718138['trim']()))throw CliErrors[_0x1cbdd3(0x1a4)](_0x1cbdd3(0x1b3)+_0x718138+'\x22');},async 'dryRun'(_0x3465d1){const _0x45323b=a91_0x4be666,_0x2613d3=_0x3465d1[_0x45323b(0x1b6)]('id'),_0x12d4e2=await getDbLinkInfo(_0x2613d3),_0x2c0c41=mergeDbLinkUpdate(_0x12d4e2,_0x3465d1),_0x27bf09=sanitizeDbLinkForOutput(_0x2c0c41);return{'method':_0x45323b(0x1a5),'url':_0x45323b(0x19d),'body':_0x27bf09,'description':_0x45323b(0x199)};},async 'execute'(_0x4a62eb){const _0x3f160e=a91_0x4be666,_0xe13062=_0x4a62eb[_0x3f160e(0x1b6)]('id'),_0x284f1a=await getDbLinkInfo(_0xe13062),_0x1c5af4=mergeDbLinkUpdate(_0x284f1a,_0x4a62eb),{id:_0x1a79c7,entity:_0x2abf4b}=normalizeEntityWithIdResponse(await updateDbLink(_0x1c5af4));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x2abf4b),'message':_0x3f160e(0x19c)+(_0x1a79c7??_0xe13062)};}};
|