@lovrabet/rabetbase-cli 2.5.1-beta.3 → 2.5.1-beta.5
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/README.md +75 -1
- 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/api/generate-sdk-config-file.d.ts +0 -1
- package/lib/api/generate-sdk-config-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/index.js +1 -1
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.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.d.ts +2 -0
- 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/delete.js +1 -1
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/init.d.ts +3 -1
- package/lib/commands/config/init.js +1 -1
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/business-groups.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-restore.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/dataset/user-deleted-field-list.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-refresh-start.js +1 -1
- package/lib/commands/db/diff-refresh-status.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/table-diff-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/deployment/auto-sync.js +1 -1
- package/lib/commands/deployment/index.js +1 -1
- package/lib/commands/deployment/sync.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/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/kb/create.js +1 -1
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/search.js +1 -1
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.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/move.js +1 -1
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.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/visibility-update.js +1 -1
- package/lib/commands/notification/config-create.js +1 -1
- package/lib/commands/notification/config-delete.js +1 -1
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/config-update.js +1 -1
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/notification/shared.js +1 -1
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/create.js +1 -1
- package/lib/commands/page/custom/detail.js +1 -1
- package/lib/commands/page/custom/list.js +1 -1
- package/lib/commands/page/custom/publish.js +1 -1
- package/lib/commands/page/custom/shared.js +1 -1
- package/lib/commands/page/custom/syntax.js +1 -1
- package/lib/commands/page/custom/template.js +1 -1
- package/lib/commands/page/custom/update.js +1 -1
- package/lib/commands/page/data-list-status.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/restore.js +1 -1
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +1 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/materialize-project-template.js +1 -1
- package/lib/commands/project/create/project-name.js +1 -1
- package/lib/commands/project/create/project-template-archive.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/domain-routing-sync.d.ts +2 -0
- package/lib/commands/project/domain-routing-sync.js +1 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.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/rule/get.d.ts +2 -0
- package/lib/commands/rule/get.js +1 -0
- package/lib/commands/rule/index.d.ts +2 -0
- package/lib/commands/rule/index.js +1 -0
- package/lib/commands/rule/list.d.ts +2 -0
- package/lib/commands/rule/list.js +1 -0
- package/lib/commands/rule/set.d.ts +2 -0
- package/lib/commands/rule/set.js +1 -0
- package/lib/commands/rule/shared.d.ts +43 -0
- package/lib/commands/rule/shared.js +1 -0
- 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/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/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/user-account/dingding-sandbox-bind.js +1 -1
- package/lib/commands/user-account/index.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/deployment-sync.js +1 -1
- package/lib/config/domain-config.d.ts +38 -2
- package/lib/config/domain-config.js +1 -1
- package/lib/config/project-domain-routing.d.ts +27 -0
- package/lib/config/project-domain-routing.js +1 -0
- package/lib/config/schema.d.ts +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.d.ts +10 -6
- 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/region.d.ts +4 -1
- package/lib/constant/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.d.ts +43 -49
- package/lib/constant/routing-profile.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.d.ts +2 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +37 -0
- 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.d.ts +0 -1
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -4
- package/lib/generated/build-info.js +1 -1
- package/lib/generated/official-routing.d.ts +83 -0
- package/lib/generated/official-routing.js +1 -0
- package/lib/generated/routing-contract.d.ts +9 -0
- package/lib/generated/routing-contract.js +1 -0
- package/lib/help.js +1 -1
- package/lib/postinstall.js +1 -1
- package/lib/runtime/confirmation.js +1 -1
- package/lib/runtime/event.js +1 -1
- package/lib/runtime/index.js +1 -1
- package/lib/runtime/queue.js +1 -1
- package/lib/runtime/resolve.js +1 -1
- package/lib/skills/builtin-skill.js +1 -1
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.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/types/index.d.ts +0 -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/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/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 +2 -1
- package/skills/rabetbase/SKILL.md +16 -13
- package/skills/rabetbase/guides/sdk-client-generation.md +10 -8
- package/skills/rabetbase/references/rabetbase-api-pull.md +16 -11
- package/skills/rabetbase/references/rabetbase-config.md +3 -6
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -1
- package/skills/rabetbase/references/rabetbase-init.md +32 -10
- package/skills/rabetbase/references/rabetbase-kb.md +7 -7
- package/skills/rabetbase/references/rabetbase-project-create.md +33 -8
- package/skills/rabetbase/references/rabetbase-project-domain-routing-sync.md +28 -0
- package/skills/rabetbase/references/rabetbase-rule.md +49 -0
- package/skills/rabetbase.manifest.json +5 -3
- package/lib/config/project-routing.d.ts +0 -30
- package/lib/config/project-routing.js +0 -1
- package/lib/core/kb-search-client.d.ts +0 -30
- package/lib/core/kb-search-client.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a83_0x2b0696=a83_0x26ec;function a83_0x26ec(_0x1b57e9,_0x3addd9){_0x1b57e9=_0x1b57e9-0x108;const _0x11b0c1=a83_0x11b0();let _0x26ec5d=_0x11b0c1[_0x1b57e9];return _0x26ec5d;}(function(_0x259bbe,_0x311dd6){const _0x28f8c6=a83_0x26ec,_0x3f559a=_0x259bbe();while(!![]){try{const _0x814cf8=parseInt(_0x28f8c6(0x120))/0x1*(-parseInt(_0x28f8c6(0x128))/0x2)+parseInt(_0x28f8c6(0x11b))/0x3*(parseInt(_0x28f8c6(0x108))/0x4)+-parseInt(_0x28f8c6(0x110))/0x5+parseInt(_0x28f8c6(0x131))/0x6+parseInt(_0x28f8c6(0x123))/0x7*(-parseInt(_0x28f8c6(0x139))/0x8)+parseInt(_0x28f8c6(0x137))/0x9+parseInt(_0x28f8c6(0x109))/0xa*(parseInt(_0x28f8c6(0x10f))/0xb);if(_0x814cf8===_0x311dd6)break;else _0x3f559a['push'](_0x3f559a['shift']());}catch(_0x51533c){_0x3f559a['push'](_0x3f559a['shift']());}}}(a83_0x11b0,0xad1e1));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([a83_0x2b0696(0x115),'PARTIAL_SUCCESS',a83_0x2b0696(0x121),a83_0x2b0696(0x136)]);export const dbAnalyzeStatus={'service':'db','command':a83_0x2b0696(0x116),'description':a83_0x2b0696(0x12f),'risk':a83_0x2b0696(0x10c),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a83_0x2b0696(0x12d),'type':a83_0x2b0696(0x12a),'required':!![],'description':a83_0x2b0696(0x11d)}],async 'execute'(_0x417412){const _0x55f55d=a83_0x2b0696,_0x5701ce=_0x417412[_0x55f55d(0x114)]('id'),_0x5f55d9=_0x417412['str'](_0x55f55d(0x12d)),_0x284213=await getDbAnalysisStatus(_0x5f55d9),_0x1459b9=TERMINAL_STATUSES[_0x55f55d(0x132)](_0x284213[_0x55f55d(0x12e)]??''),{parsedJobContext:_0x34e58a,jobContextParseWarning:_0x633c9a}=parseJobContext(_0x284213[_0x55f55d(0x133)]),{requestedAnalysis:_0x5b5777,requestedAnalysisParseWarning:_0x19e19a}=parseRequestedAnalysis(_0x284213[_0x55f55d(0x11a)]),_0x1d1b5e=readAccumulatedErrorTypeCounts(_0x34e58a),_0x4bd22e=calculateAttemptElapsedMs(_0x284213,_0x1459b9),_0x109c5c=calculateElapsedFromStart(_0x284213[_0x55f55d(0x138)],_0x284213[_0x55f55d(0x130)],_0x1459b9),_0x26a254=detectMultipleAttempts(_0x284213),_0x26cf38=buildDbPageLinks(_0x417412[_0x55f55d(0x126)],_0x5701ce);return{'ok':!![],'data':{'dbLinkId':_0x5701ce,'planId':_0x5f55d9,'status':_0x284213,'requestedAnalysis':_0x5b5777,'requestedAnalysisParseWarning':_0x19e19a,'parsedJobContext':_0x34e58a,'accumulatedErrorTypeCounts':_0x1d1b5e,'accumulatedErrorTypeCountsAdvisory':_0x1d1b5e?'Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.':_0x55f55d(0x11f),'isTerminal':_0x1459b9,'isRetrying':_0x284213[_0x55f55d(0x12e)]===_0x55f55d(0x135),'attemptElapsedMs':_0x4bd22e,'totalElapsedMs':_0x109c5c,'hasMultipleAttempts':_0x26a254,'jobContextParseWarning':_0x633c9a,..._0x26cf38?{'links':_0x26cf38}:{}},'message':_0x55f55d(0x113)+_0x5f55d9};}};function parseRequestedAnalysis(_0x47a95d){const _0x15fdc8=a83_0x2b0696,_0xe315fe={'mode':_0x15fdc8(0x117),'tableCount':null,'tableNames':null};if(!_0x47a95d?.[_0x15fdc8(0x10b)]())return{'requestedAnalysis':_0xe315fe,'requestedAnalysisParseWarning':_0x15fdc8(0x11c)};try{const _0x591832=JSON[_0x15fdc8(0x124)](_0x47a95d);if(!_0x591832||typeof _0x591832!=='object'||Array[_0x15fdc8(0x127)](_0x591832))throw new Error(_0x15fdc8(0x134));const _0x20b662=_0x591832['tableNames'];if(_0x20b662===undefined||_0x20b662===null)return{'requestedAnalysis':{'mode':_0x15fdc8(0x12b),'tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array[_0x15fdc8(0x127)](_0x20b662)&&_0x20b662[_0x15fdc8(0x125)](_0x398fb2=>typeof _0x398fb2===_0x15fdc8(0x12a)))return{'requestedAnalysis':{'mode':_0x20b662['length']>0x0?_0x15fdc8(0x10a):_0x15fdc8(0x12b),'tableCount':_0x20b662['length'],'tableNames':_0x20b662},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0xe315fe,'requestedAnalysisParseWarning':'inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.'};}function readAccumulatedErrorTypeCounts(_0x145084){const _0xbe875f=a83_0x2b0696,_0x2ed0b2=_0x145084?.[_0xbe875f(0x118)];if(!_0x2ed0b2||typeof _0x2ed0b2!==_0xbe875f(0x10e)||Array[_0xbe875f(0x127)](_0x2ed0b2))return null;if(Object['keys'](_0x2ed0b2)[_0xbe875f(0x129)]===0x0)return null;return _0x2ed0b2;}function parseJobContext(_0x29f885){const _0x36daae=a83_0x2b0696;if(!_0x29f885?.[_0x36daae(0x10b)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0xa41bbb=JSON[_0x36daae(0x124)](_0x29f885);if(_0xa41bbb&&typeof _0xa41bbb===_0x36daae(0x10e)&&!Array['isArray'](_0xa41bbb))return{'parsedJobContext':_0xa41bbb,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x36daae(0x112)};}function a83_0x11b0(){const _0x2a0284=['333310JiyFuk','TARGETED','trim','read','now','object','1001DRvtDQ','4936940ANZBTc','startTime','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','Analysis\x20status\x20for\x20','num','SUCCESS','analyze-status','UNKNOWN','accumulatedErrorTypeCounts','isNaN','inputParams','18609QJSKMx','Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','costTimeMs','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','651043JYgvnf','FAILED','number','6318137olDryV','parse','every','appCode','isArray','4PTPrae','length','string','FULL','isFinite','plan','status','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','endTime','1389672PaAwSS','has','jobContext','inputParams\x20is\x20not\x20an\x20object','RETRYING','CANCELLED','145089dGgVKq','firstStartTime','8LgdsOo','400FXOkNV'];a83_0x11b0=function(){return _0x2a0284;};return a83_0x11b0();}function calculateAttemptElapsedMs(_0x3d70f7,_0x59ca75){const _0x59c2e3=a83_0x2b0696;if(typeof _0x3d70f7[_0x59c2e3(0x11e)]===_0x59c2e3(0x122)&&Number[_0x59c2e3(0x12c)](_0x3d70f7[_0x59c2e3(0x11e)])&&_0x3d70f7[_0x59c2e3(0x11e)]>=0x0)return _0x3d70f7['costTimeMs'];return calculateElapsedFromStart(_0x3d70f7[_0x59c2e3(0x111)],_0x3d70f7['endTime'],_0x59ca75);}function calculateElapsedFromStart(_0x360b35,_0x4d9eae,_0x3ee518){const _0x25ba18=a83_0x2b0696,_0x3feda0=toTimestamp(_0x360b35);if(_0x3feda0===null)return null;const _0x4a8cf9=toTimestamp(_0x4d9eae),_0x3082df=_0x4a8cf9??(_0x3ee518?null:Date[_0x25ba18(0x10d)]());if(_0x3082df===null||_0x3082df<_0x3feda0)return null;return _0x3082df-_0x3feda0;}function detectMultipleAttempts(_0x3af48f){const _0x2cf24f=a83_0x2b0696,_0x477c0d=toTimestamp(_0x3af48f['firstStartTime']),_0xfc97ad=toTimestamp(_0x3af48f[_0x2cf24f(0x111)]);return _0x477c0d!==null&&_0xfc97ad!==null&&_0x477c0d!==_0xfc97ad;}function toTimestamp(_0x3836fc){const _0xf9d028=a83_0x2b0696;if(typeof _0x3836fc===_0xf9d028(0x122))return Number[_0xf9d028(0x12c)](_0x3836fc)?_0x3836fc:null;if(typeof _0x3836fc!=='string'||_0x3836fc[_0xf9d028(0x10b)]()==='')return null;const _0x10e55e=Number(_0x3836fc);if(Number[_0xf9d028(0x12c)](_0x10e55e))return _0x10e55e;const _0x18c70d=Date['parse'](_0x3836fc);return Number[_0xf9d028(0x119)](_0x18c70d)?null:_0x18c70d;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x22a9fc=a84_0x2d5a;(function(_0x4524e7,_0x53d3e6){const _0x492556=a84_0x2d5a,_0xaeadc6=_0x4524e7();while(!![]){try{const _0x9406b2=parseInt(_0x492556(0x1b5))/0x1*(parseInt(_0x492556(0x1af))/0x2)+parseInt(_0x492556(0x1b9))/0x3*(-parseInt(_0x492556(0x1a9))/0x4)+parseInt(_0x492556(0x1b2))/0x5+parseInt(_0x492556(0x1ba))/0x6+-parseInt(_0x492556(0x1ac))/0x7*(parseInt(_0x492556(0x1c3))/0x8)+parseInt(_0x492556(0x1bc))/0x9+-parseInt(_0x492556(0x1c2))/0xa;if(_0x9406b2===_0x53d3e6)break;else _0xaeadc6['push'](_0xaeadc6['shift']());}catch(_0x198543){_0xaeadc6['push'](_0xaeadc6['shift']());}}}(a84_0x50d2,0xb837a));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a84_0x2d5a(_0x27e888,_0x2035f8){_0x27e888=_0x27e888-0x1a8;const _0x50d266=a84_0x50d2();let _0x2d5aaf=_0x50d266[_0x27e888];return _0x2d5aaf;}import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':'create','description':a84_0x22a9fc(0x1cc),'risk':a84_0x22a9fc(0x1d2),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a84_0x22a9fc(0x1bd),'type':a84_0x22a9fc(0x1bb),'required':!![],'description':a84_0x22a9fc(0x1c8)},DB_TYPE_FLAG,{'name':a84_0x22a9fc(0x1aa),'type':a84_0x22a9fc(0x1bb),'description':a84_0x22a9fc(0x1c4),'default':a84_0x22a9fc(0x1d3)},{'name':a84_0x22a9fc(0x1c6),'type':a84_0x22a9fc(0x1bb),'required':!![],'description':a84_0x22a9fc(0x1cb)},{'name':'username','type':a84_0x22a9fc(0x1bb),'required':!![],'description':a84_0x22a9fc(0x1ab)},{'name':'password','type':a84_0x22a9fc(0x1bb),'required':!![],'description':a84_0x22a9fc(0x1b6)},{'name':a84_0x22a9fc(0x1d0),'type':a84_0x22a9fc(0x1bb),'description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':a84_0x22a9fc(0x1c1),'type':a84_0x22a9fc(0x1bb),'description':a84_0x22a9fc(0x1cd)},{'name':a84_0x22a9fc(0x1cf),'type':'boolean','description':a84_0x22a9fc(0x1b7),'default':![]},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x215f70){const _0x4d8aab=a84_0x22a9fc,_0x1a189b=_0x215f70[_0x4d8aab(0x1b3)](_0x4d8aab(0x1c6))[_0x4d8aab(0x1c5)]();if(!validateDbUrl(_0x1a189b))throw CliErrors[_0x4d8aab(0x1ce)](_0x4d8aab(0x1c0)+_0x1a189b+'\x22',_0x4d8aab(0x1ad));},async 'dryRun'(_0x229943){const _0x17bf8c=a84_0x22a9fc,_0x1635b4={'appCode':_0x229943[_0x17bf8c(0x1ae)],'dbName':_0x229943[_0x17bf8c(0x1b3)]('dbname'),'dbType':_0x229943[_0x17bf8c(0x1b3)](_0x17bf8c(0x1d1)),'dbVersion':_0x229943[_0x17bf8c(0x1b3)]('dbversion')||_0x17bf8c(0x1d3),'dbUrl':_0x229943['str'](_0x17bf8c(0x1c6))[_0x17bf8c(0x1c5)](),'username':_0x229943[_0x17bf8c(0x1b3)](_0x17bf8c(0x1b8)),'password':_0x17bf8c(0x1be),..._0x229943['str']('dbparam')?{'dbParam':_0x229943[_0x17bf8c(0x1b3)](_0x17bf8c(0x1d0))}:{},..._0x229943[_0x17bf8c(0x1b3)](_0x17bf8c(0x1c1))?{'dbDesc':_0x229943[_0x17bf8c(0x1b3)](_0x17bf8c(0x1c1))}:{}};return{'method':_0x17bf8c(0x1a8),'url':_0x17bf8c(0x1ca),'body':_0x1635b4,'description':[_0x17bf8c(0x1d5),_0x229943['bool'](_0x17bf8c(0x1cf))?'Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id':'No\x20follow-up\x20analysis'][_0x17bf8c(0x1b4)]('\x0a'),'connectionPreflight':{'enabled':!_0x229943['bool']('skip-connection-test'),'executed':![]}};},async 'execute'(_0x19475a){const _0x3f56dd=a84_0x22a9fc,_0x2ba228={'appCode':_0x19475a[_0x3f56dd(0x1ae)],'dbName':_0x19475a[_0x3f56dd(0x1b3)](_0x3f56dd(0x1bd)),'dbType':_0x19475a[_0x3f56dd(0x1b3)](_0x3f56dd(0x1d1)),'dbVersion':_0x19475a[_0x3f56dd(0x1b3)](_0x3f56dd(0x1aa))||_0x3f56dd(0x1d3),'dbUrl':_0x19475a['str'](_0x3f56dd(0x1c6))[_0x3f56dd(0x1c5)](),'username':_0x19475a[_0x3f56dd(0x1b3)](_0x3f56dd(0x1b8)),'password':_0x19475a['str'](_0x3f56dd(0x1d6)),..._0x19475a['str']('dbparam')?{'dbParam':_0x19475a[_0x3f56dd(0x1b3)](_0x3f56dd(0x1d0))}:{},..._0x19475a[_0x3f56dd(0x1b3)](_0x3f56dd(0x1c1))?{'dbDesc':_0x19475a[_0x3f56dd(0x1b3)](_0x3f56dd(0x1c1))}:{}};!_0x19475a['bool'](_0x3f56dd(0x1bf))&&await assertDbLinkConnectionPreflight(_0x2ba228);const {id:_0xf7f02f,entity:_0x40fecc}=normalizeEntityWithIdResponse(await createDbLink(_0x2ba228));if(!_0xf7f02f)return{'ok':![],'message':'Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','data':sanitizeDbLinkForOutput(_0x40fecc)};let _0x4e2359,_0x4df11c;if(_0x19475a[_0x3f56dd(0x1d4)]('autostart'))try{_0x4e2359=(await startDbAnalysis(_0xf7f02f))[_0x3f56dd(0x1b0)];}catch(_0x252112){_0x4df11c=_0x252112 instanceof Error?_0x252112[_0x3f56dd(0x1c7)]:String(_0x252112);}const _0x1a8ae0=buildDbPageLinks(_0x19475a['appCode'],_0xf7f02f),_0x29562e={'connection':sanitizeDbLinkForOutput(_0x40fecc),..._0x1a8ae0?{'links':{'databasePage':_0x1a8ae0[_0x3f56dd(0x1c9)]}}:{},..._0x4e2359?{'analysisPlanId':_0x4e2359}:{},..._0x4df11c?{'analysisStartWarning':_0x4df11c}:{}};let _0x45bac2;return _0x19475a['bool'](_0x3f56dd(0x1cf))?_0x4df11c?_0x45bac2=_0x3f56dd(0x1b1)+_0xf7f02f+';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning':_0x45bac2='Created\x20db\x20link\x20'+_0xf7f02f+'\x20and\x20started\x20analysis':_0x45bac2=_0x3f56dd(0x1b1)+_0xf7f02f,{'ok':!![],'data':_0x29562e,'message':_0x45bac2};}};function a84_0x50d2(){const _0x474a44=['dbversion','Database\x20username','10245102OOrIWE','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','appCode','1278076ptOnLG','planId','Created\x20db\x20link\x20','2741375tBELSL','str','join','2JZuXRm','Database\x20password','After\x20create,\x20start\x20schema\x20analysis','username','170979DKyGHt','2905146RoGrsq','string','11193597kIIDZr','dbname','[redacted]','skip-connection-test','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22','dbdesc','11651560SwBrFJ','8sUlpUN','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','trim','dburl','message','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','databasePage','/smartapi/dblink/create','Host\x20and\x20port:\x20host:port','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','Human-readable\x20description','validation','autostart','dbparam','dbtype','write','8.0','bool','Create\x20dblink','password','POST','12XqhsHI'];a84_0x50d2=function(){return _0x474a44;};return a84_0x50d2();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a85_0x1482(){const _0x331281=['\x20active\x20Dataset(s);\x20deletion\x20is\x20blocked.','Deletion\x20is\x20blocked\x20by\x20','delete','appCode','validation','POST','activeDatasetCount','Confirm\x20deletion\x20after\x20reviewing\x20the\x20active\x20Dataset\x20count','2456508xLBGRd','expected-dataset-count','Run\x20with\x20--dry-run\x20first\x20and\x20verify\x20the\x20active\x20Dataset\x20count.','Would\x20logically\x20delete\x20this\x20dependency-free\x20database\x20connection\x20after\x20--confirm.','\x20still\x20has\x20','240fcyaGE','num','\x20active\x20DB_TABLE\x20Dataset(s).','confirm','all','/smartapi/dblink/delete','Expected\x20','3xwnupT','1609605Glcdgw','--expected-dataset-count\x20must\x20be\x20a\x20non-negative\x20integer.','datasetDependency','number','36913cRUPJe','datasets','high-risk-write','Run\x20--dry-run\x20again\x20and\x20review\x20the\x20current\x20dependencies.','flag','bool','boolean','--confirm\x20is\x20required\x20to\x20delete\x20a\x20database\x20connection.','403281BHIxDp','Database\x20connection\x20','9733416tdhkNs','Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','Delete\x20or\x20migrate\x20the\x20listed\x20DB_TABLE\x20Datasets\x20first.\x20There\x20is\x20no\x20force\x20bypass.','6992902Axnxdw','DB_TABLE','10GVmAOP','4513380fYeWvh','Abort\x20unless\x20the\x20active\x20DB_TABLE\x20Dataset\x20count\x20equals\x20this\x20value'];a85_0x1482=function(){return _0x331281;};return a85_0x1482();}const a85_0xedfbf4=a85_0x3466;(function(_0x348878,_0x23597f){const _0x195758=a85_0x3466,_0x3434f9=_0x348878();while(!![]){try{const _0x5b6409=parseInt(_0x195758(0xe8))/0x1*(parseInt(_0x195758(0xf7))/0x2)+parseInt(_0x195758(0xe3))/0x3*(parseInt(_0x195758(0x102))/0x4)+-parseInt(_0x195758(0xe4))/0x5+-parseInt(_0x195758(0xf8))/0x6+parseInt(_0x195758(0xf5))/0x7+parseInt(_0x195758(0xf2))/0x8+-parseInt(_0x195758(0xf0))/0x9*(parseInt(_0x195758(0xdc))/0xa);if(_0x5b6409===_0x23597f)break;else _0x3434f9['push'](_0x3434f9['shift']());}catch(_0x495f71){_0x3434f9['push'](_0x3434f9['shift']());}}}(a85_0x1482,0xd3214));import{deleteDbLink,getDbLinkInfo,listDatasets}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';const CONFIRM_FLAG={'name':'confirm','type':a85_0xedfbf4(0xee),'description':a85_0xedfbf4(0x101)},EXPECTED_DATASET_COUNT_FLAG={'name':a85_0xedfbf4(0xd8),'type':a85_0xedfbf4(0xe7),'description':a85_0xedfbf4(0xf9)};export const dbDelete={'service':'db','command':a85_0xedfbf4(0xfc),'description':a85_0xedfbf4(0xf3),'risk':a85_0xedfbf4(0xea),'flags':[DBLINK_ID_FLAG,CONFIRM_FLAG,EXPECTED_DATASET_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x160144){const _0x4f0e40=a85_0xedfbf4,_0x382bb6=await loadDeleteImpact(_0x160144);return assertExpectedDatasetCount(_0x160144,_0x382bb6[_0x4f0e40(0xe6)][_0x4f0e40(0x100)]),{'method':_0x4f0e40(0xff),'url':_0x4f0e40(0xe1),'body':{'id':_0x382bb6['id']},'description':_0x382bb6[_0x4f0e40(0xe6)][_0x4f0e40(0x100)]>0x0?_0x4f0e40(0xfb)+_0x382bb6[_0x4f0e40(0xe6)][_0x4f0e40(0x100)]+_0x4f0e40(0xde):_0x4f0e40(0xda),..._0x382bb6};},async 'execute'(_0x229f87){const _0x1e1727=a85_0xedfbf4;if(!_0x229f87[_0x1e1727(0xed)](_0x1e1727(0xdf)))throw CliErrors['validation'](_0x1e1727(0xef),_0x1e1727(0xd9));const _0x26136d=_0x229f87[_0x1e1727(0xdd)]('id'),_0x5c9c4d=await loadDeleteImpact(_0x229f87),_0x23ba0c=_0x5c9c4d[_0x1e1727(0xe6)][_0x1e1727(0x100)];assertExpectedDatasetCount(_0x229f87,_0x23ba0c);if(_0x23ba0c>0x0)throw CliErrors[_0x1e1727(0xfe)](_0x1e1727(0xf1)+_0x26136d+_0x1e1727(0xdb)+_0x23ba0c+_0x1e1727(0xfa),_0x1e1727(0xf4));return await deleteDbLink(_0x26136d),{'ok':!![],'data':{'id':_0x26136d,'deleted':!![],'activeDatasetCount':_0x23ba0c},'message':'Deleted\x20db\x20link\x20'+_0x26136d};}};async function loadDeleteImpact(_0x5861be){const _0x112b5a=a85_0xedfbf4,_0x2a72ec=_0x5861be['num']('id'),[_0x49a543,_0x5ba632]=await Promise[_0x112b5a(0xe0)]([getDbLinkInfo(_0x2a72ec),listDatasets(_0x5861be[_0x112b5a(0xfd)],{'source':_0x112b5a(0xf6)})]),_0x1b63d1=buildDbDatasetDependency(_0x49a543,_0x5ba632);return{'id':_0x2a72ec,'connection':sanitizeDbLinkForOutput(_0x49a543),'datasetDependency':_0x1b63d1[_0x112b5a(0xe6)],'activeDatasetCount':_0x1b63d1[_0x112b5a(0xe6)][_0x112b5a(0x100)],'datasets':_0x1b63d1[_0x112b5a(0xe9)]};}function a85_0x3466(_0x3ea277,_0x2b721c){_0x3ea277=_0x3ea277-0xd8;const _0x1482fa=a85_0x1482();let _0x346679=_0x1482fa[_0x3ea277];return _0x346679;}function assertExpectedDatasetCount(_0x4fd810,_0x210ddc){const _0x4d3cd5=a85_0xedfbf4,_0x479117=_0x4fd810[_0x4d3cd5(0xec)](_0x4d3cd5(0xd8));if(_0x479117===undefined||_0x479117==='')return;const _0x286783=_0x4fd810[_0x4d3cd5(0xdd)](_0x4d3cd5(0xd8));if(!Number['isInteger'](_0x286783)||_0x286783<0x0)throw CliErrors[_0x4d3cd5(0xfe)](_0x4d3cd5(0xe5));if(_0x286783!==_0x210ddc)throw CliErrors[_0x4d3cd5(0xfe)](_0x4d3cd5(0xe2)+_0x286783+'\x20active\x20Dataset(s),\x20but\x20found\x20'+_0x210ddc+'.',_0x4d3cd5(0xeb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a86_0x5f34(){const _0x379015=['211676GXLMyX','6rKFXft','read','1398oBnfXP','972DpZQEN','db\x20link\x20','18389PDARXr','59621ZfNsdE','appCode','1855KvYAgy','datasetDependency','72Iflrpj','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','652545ZAJXmD','421400mEaYOV','80Gjpcax','2312079KFzAhV'];a86_0x5f34=function(){return _0x379015;};return a86_0x5f34();}const a86_0x10964c=a86_0xe2f0;(function(_0x5c8d74,_0x469ca7){const _0x1af521=a86_0xe2f0,_0x1f5ec5=_0x5c8d74();while(!![]){try{const _0x9b1d64=parseInt(_0x1af521(0xa5))/0x1+parseInt(_0x1af521(0x9e))/0x2*(parseInt(_0x1af521(0x9f))/0x3)+parseInt(_0x1af521(0xa2))/0x4*(parseInt(_0x1af521(0xa7))/0x5)+parseInt(_0x1af521(0xa1))/0x6*(-parseInt(_0x1af521(0xa4))/0x7)+-parseInt(_0x1af521(0xac))/0x8+-parseInt(_0x1af521(0xab))/0x9*(parseInt(_0x1af521(0x9c))/0xa)+-parseInt(_0x1af521(0x9d))/0xb*(-parseInt(_0x1af521(0xa9))/0xc);if(_0x9b1d64===_0x469ca7)break;else _0x1f5ec5['push'](_0x1f5ec5['shift']());}catch(_0x3ee52a){_0x1f5ec5['push'](_0x1f5ec5['shift']());}}}(a86_0x5f34,0x5c3b2));import{getDbLinkInfo,listDatasets}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';function a86_0xe2f0(_0x422fa4,_0x22c5d){_0x422fa4=_0x422fa4-0x9c;const _0x5f34f8=a86_0x5f34();let _0xe2f0b=_0x5f34f8[_0x422fa4];return _0xe2f0b;}export const dbDetail={'service':'db','command':'detail','description':a86_0x10964c(0xaa),'risk':a86_0x10964c(0xa0),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x1d355c){const _0x14a631=a86_0x10964c,_0xe9aa9b=_0x1d355c['num']('id'),_0x5aeee3=await getDbLinkInfo(_0xe9aa9b),_0x4c89a3=await listDatasets(_0x5aeee3[_0x14a631(0xa6)]||_0x1d355c['appCode'],{'source':'DB_TABLE'}),_0x41be03=buildDbDatasetDependency(_0x5aeee3,_0x4c89a3);return{'ok':!![],'data':{...sanitizeDbLinkForOutput(_0x5aeee3),'datasetDependency':_0x41be03[_0x14a631(0xa8)]},'message':_0x14a631(0xa3)+_0xe9aa9b+':\x20'+_0x5aeee3['dbName']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x259aea=a87_0x1f98;function a87_0x1060(){const _0x374fbd=['appCode','Table-diff\x20refresh\x20started\x20without\x20a\x20traceId;\x20the\x20request\x20outcome\x20is\x20unknown.\x20Do\x20not\x20submit\x20another\x20refresh\x20automatically.','81568DOXzIO','trim','1315330USuaJt','1177301YKFIRx','traceId','27tvLnqK','6597528MRwTnp','\x20--plan\x20','6UVFNXh','6530755ykkenM','validation','6IpOXXy','4675395CyXWdZ','\x20db\x20diff-refresh-status\x20--id\x20','status','5356070HPbmbr','Start\x20an\x20asynchronous\x20refresh\x20of\x20the\x20database\x20table-diff\x20result','\x20--format\x20compress'];a87_0x1060=function(){return _0x374fbd;};return a87_0x1060();}(function(_0x3d86c7,_0xa944e4){const _0x69e111=a87_0x1f98,_0x569c39=_0x3d86c7();while(!![]){try{const _0x1d67a7=-parseInt(_0x69e111(0x104))/0x1+-parseInt(_0x69e111(0x103))/0x2+-parseInt(_0x69e111(0x109))/0x3*(-parseInt(_0x69e111(0x101))/0x4)+parseInt(_0x69e111(0x10d))/0x5+parseInt(_0x69e111(0x10c))/0x6*(-parseInt(_0x69e111(0x10a))/0x7)+parseInt(_0x69e111(0x107))/0x8+-parseInt(_0x69e111(0x106))/0x9*(-parseInt(_0x69e111(0x110))/0xa);if(_0x1d67a7===_0xa944e4)break;else _0x569c39['push'](_0x569c39['shift']());}catch(_0x4effe0){_0x569c39['push'](_0x569c39['shift']());}}}(a87_0x1060,0x9c1d4));function a87_0x1f98(_0x212703,_0x1c5a5f){_0x212703=_0x212703-0xff;const _0x1060a9=a87_0x1060();let _0x1f9830=_0x1060a9[_0x212703];return _0x1f9830;}import{startDbTableDiffRefresh}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbDiffRefreshStart={'service':'db','command':'diff-refresh-start','description':a87_0x259aea(0x111),'risk':'write','flags':[DBLINK_ID_FLAG],async 'execute'(_0xe413cb){const _0x3332cb=a87_0x259aea,_0x25ac1a=_0xe413cb['num']('id'),_0x54e9f7=await startDbTableDiffRefresh(_0xe413cb[_0x3332cb(0xff)],_0x25ac1a),_0x1f892a=_0x54e9f7[_0x3332cb(0x105)]?.[_0x3332cb(0x102)]();if(!_0x1f892a)throw CliErrors[_0x3332cb(0x10b)](_0x3332cb(0x100));return{'ok':!![],'data':{'dbLinkId':_0x25ac1a,'traceId':_0x1f892a,'status':_0x54e9f7[_0x3332cb(0x10f)]??null,'query':{'command':CLI_BIN_NAME+_0x3332cb(0x10e)+_0x25ac1a+_0x3332cb(0x108)+_0x1f892a+_0x3332cb(0x112)}},'message':'Started\x20table-diff\x20refresh\x20for\x20db\x20link\x20'+_0x25ac1a};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x4a1f45=a88_0x4d7b;(function(_0x9abc21,_0x3deda7){const _0x24cda5=a88_0x4d7b,_0x5053c2=_0x9abc21();while(!![]){try{const _0x71a80c=parseInt(_0x24cda5(0x15e))/0x1*(-parseInt(_0x24cda5(0x15b))/0x2)+parseInt(_0x24cda5(0x15d))/0x3*(-parseInt(_0x24cda5(0x16d))/0x4)+parseInt(_0x24cda5(0x159))/0x5*(parseInt(_0x24cda5(0x15c))/0x6)+-parseInt(_0x24cda5(0x15f))/0x7+parseInt(_0x24cda5(0x168))/0x8+-parseInt(_0x24cda5(0x160))/0x9+-parseInt(_0x24cda5(0x164))/0xa*(-parseInt(_0x24cda5(0x169))/0xb);if(_0x71a80c===_0x3deda7)break;else _0x5053c2['push'](_0x5053c2['shift']());}catch(_0x3a9a8f){_0x5053c2['push'](_0x5053c2['shift']());}}}(a88_0x2380,0x4fc9c));function a88_0x2380(){const _0x5d692a=['7017461SxkPPw','CANCELLED','FAILED','Fetch\x20table-diff\x20refresh\x20status\x20by\x20plan\x20/\x20trace\x20id','4WCpwrw','RETRYING','Table-diff\x20refresh\x20trace\x20id\x20from\x20diff-refresh-start','read','PENDING','UNKNOWN','RUNNING','plan','51430AEeogN','Table-diff\x20refresh\x20status\x20for\x20','142064BhxQBt','108qwUOpX','1238418oGgkrF','8rtYzbO','740320jFfvTJ','5255946cIkdAW','str','SUCCESS','\x20--format\x20compress','20lIWMRQ','\x20--plan\x20','has','\x20db\x20diff-refresh-status\x20--id\x20','4292624IlFFaP'];a88_0x2380=function(){return _0x5d692a;};return a88_0x2380();}import{getDbAnalysisStatus}from'../../core/api-client.js';function a88_0x4d7b(_0x32436d,_0x4d8ba){_0x32436d=_0x32436d-0x152;const _0x2380f6=a88_0x2380();let _0x4d7b63=_0x2380f6[_0x32436d];return _0x4d7b63;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CLI_BIN_NAME}from'../../constant/cli.js';const TERMINAL_STATUSES=new Set([a88_0x4a1f45(0x162),a88_0x4a1f45(0x16b),a88_0x4a1f45(0x16a)]),RUNNING_STATUSES=new Set([a88_0x4a1f45(0x155),a88_0x4a1f45(0x157),a88_0x4a1f45(0x152)]);export const dbDiffRefreshStatus={'service':'db','command':'diff-refresh-status','description':a88_0x4a1f45(0x16c),'risk':a88_0x4a1f45(0x154),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a88_0x4a1f45(0x158),'type':'string','required':!![],'description':a88_0x4a1f45(0x153)}],async 'execute'(_0x3cc2ce){const _0x408f7e=a88_0x4a1f45,_0x1560cf=_0x3cc2ce['num']('id'),_0x3fb3e9=_0x3cc2ce[_0x408f7e(0x161)](_0x408f7e(0x158)),_0x355060=await getDbAnalysisStatus(_0x3fb3e9),_0x3a5f59=_0x355060['status']??null,_0xee2d3e=TERMINAL_STATUSES['has'](_0x3a5f59??''),_0x4f720e=_0x3a5f59===_0x408f7e(0x162),_0x1819e2=_0xee2d3e||RUNNING_STATUSES[_0x408f7e(0x166)](_0x3a5f59??'');return{'ok':!![],'data':{'dbLinkId':_0x1560cf,'planId':_0x3fb3e9,'status':_0x355060,'knownStatus':_0x1819e2,'isTerminal':_0xee2d3e,'isSuccessful':_0x4f720e,'query':_0x1819e2&&!_0xee2d3e?{'command':CLI_BIN_NAME+_0x408f7e(0x167)+_0x1560cf+_0x408f7e(0x165)+_0x3fb3e9+_0x408f7e(0x163)}:null},'message':_0x408f7e(0x15a)+_0x3fb3e9+':\x20'+(_0x3a5f59??_0x408f7e(0x156))};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a89_0x247a7f=a89_0x4270;function a89_0x4270(_0x4a4dcd,_0x216c53){_0x4a4dcd=_0x4a4dcd-0x10d;const _0x3de903=a89_0x3de9();let _0x427077=_0x3de903[_0x4a4dcd];return _0x427077;}(function(_0x144d19,_0x2f94ba){const _0x184603=a89_0x4270,_0x1bba29=_0x144d19();while(!![]){try{const _0xbbc0a1=-parseInt(_0x184603(0x132))/0x1+parseInt(_0x184603(0x10e))/0x2*(parseInt(_0x184603(0x11a))/0x3)+-parseInt(_0x184603(0x123))/0x4*(-parseInt(_0x184603(0x115))/0x5)+-parseInt(_0x184603(0x11e))/0x6*(parseInt(_0x184603(0x125))/0x7)+-parseInt(_0x184603(0x117))/0x8+-parseInt(_0x184603(0x110))/0x9*(-parseInt(_0x184603(0x11c))/0xa)+-parseInt(_0x184603(0x127))/0xb*(parseInt(_0x184603(0x128))/0xc);if(_0xbbc0a1===_0x2f94ba)break;else _0x1bba29['push'](_0x1bba29['shift']());}catch(_0x4a8b3b){_0x1bba29['push'](_0x1bba29['shift']());}}}(a89_0x3de9,0x39f35));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{DB_TABLE_PAGE_SIZE,getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';export const dbDiff={'service':'db','command':a89_0x247a7f(0x111),'description':'Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','risk':a89_0x247a7f(0x135),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a89_0x247a7f(0x134),'type':a89_0x247a7f(0x124),'description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'},{'name':a89_0x247a7f(0x129),'type':a89_0x247a7f(0x10f),'description':a89_0x247a7f(0x122),'default':0x1},{'name':a89_0x247a7f(0x12c),'type':a89_0x247a7f(0x10f),'description':a89_0x247a7f(0x11b),'default':0x14},{'name':a89_0x247a7f(0x136),'type':'boolean','description':a89_0x247a7f(0x113)}],async 'execute'(_0x258f1f){const _0x2daffd=a89_0x247a7f,_0x527fd7=_0x258f1f[_0x2daffd(0x133)]('id'),_0x2453f5=_0x258f1f[_0x2daffd(0x120)]('all'),_0x4c635c=_0x2453f5?0x1:_0x258f1f[_0x2daffd(0x133)](_0x2daffd(0x129),0x1)||0x1,_0x2d67ce=_0x2453f5?DB_TABLE_PAGE_SIZE:_0x258f1f[_0x2daffd(0x133)]('pagesize',0x14)||0x14,_0x4ac4c3=_0x258f1f['str'](_0x2daffd(0x134))||undefined,_0x335216=_0x2453f5?await getAllDbTableDiff(getDbTableDiff,_0x258f1f[_0x2daffd(0x116)],_0x527fd7,_0x4ac4c3):await getDbTableDiff(_0x258f1f[_0x2daffd(0x116)],_0x527fd7,{'pageIndex':_0x4c635c,'pageSize':_0x2d67ce,'tableName':_0x4ac4c3}),_0x3e6078=_0x335216['tableList'],_0x31988d=summarizeDbTableDiff(_0x3e6078),_0x7c1f32=_0x3e6078['filter'](_0x55d760=>_0x55d760['diffType']===_0x2daffd(0x11f)||_0x55d760['diffType']===_0x2daffd(0x12f))['map'](_0x4cc7f3=>_0x4cc7f3[_0x2daffd(0x12d)]),_0x6d7f75=_0x3e6078[_0x2daffd(0x119)](_0x23f8a5=>_0x23f8a5[_0x2daffd(0x118)]===_0x2daffd(0x12e))[_0x2daffd(0x12a)](_0x1700a6=>_0x1700a6[_0x2daffd(0x12d)]),_0x1ed459=_0x3e6078[_0x2daffd(0x119)](_0x4ca32a=>_0x4ca32a['diffType']===_0x2daffd(0x12f))[_0x2daffd(0x12a)](_0xc7506a=>({'tableName':_0xc7506a[_0x2daffd(0x12d)],'addedColumns':_0xc7506a[_0x2daffd(0x114)]?.[_0x2daffd(0x112)]??[],'deletedColumns':_0xc7506a['fieldDiff']?.[_0x2daffd(0x137)]??[],'modifiedColumns':_0xc7506a['fieldDiff']?.[_0x2daffd(0x126)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x527fd7,'page':_0x4c635c,'pageSize':_0x2d67ce,'totalCount':_0x335216['totalCount'],...typeof _0x335216[_0x2daffd(0x12b)]===_0x2daffd(0x10f)?{'physicalTableCount':_0x335216[_0x2daffd(0x12b)]}:{},...typeof _0x335216[_0x2daffd(0x11d)]==='number'?{'datasetTableCount':_0x335216[_0x2daffd(0x11d)]}:{},..._0x335216[_0x2daffd(0x10d)]?{'summary':_0x335216[_0x2daffd(0x10d)]}:{},'summaryByType':_0x31988d,'toAnalyzeTables':_0x7c1f32,'deletedTables':_0x6d7f75,'modifiedFieldDiffs':_0x1ed459,'tables':_0x3e6078},'message':_0x3e6078[_0x2daffd(0x131)]+_0x2daffd(0x130)+_0x335216['totalCount']+_0x2daffd(0x121)+_0x527fd7+')'};}};function a89_0x3de9(){const _0x3f8ce1=['684545XrwgtK','appCode','1583824uPxbaF','diffType','filter','3wSxjyU','Page\x20size','20WlcOHE','datasetTableCount','397146cKdgfa','NEW_TABLE','bool','\x20(db\x20link\x20','Page\x20index\x20(1-based)','4gdaibC','string','7Oynpna','modifiedColumns','1732621jMpWHi','12Ktvabp','page','map','physicalTableCount','pagesize','tableName','DELETED_TABLE','MODIFIED_TABLE','\x20changed\x20table\x20row(s),\x20total\x20','length','9879ixhJeA','num','table','read','all','deletedColumns','summary','906106FOYlMY','number','355329xzoLBv','diff','addedColumns','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','fieldDiff'];a89_0x3de9=function(){return _0x3f8ce1;};return a89_0x3de9();}
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x48b419,_0x3cbe45){const _0x4bf3a1=a90_0x4b8d,_0x2e36d9=_0x48b419();while(!![]){try{const _0x560f02=-parseInt(_0x4bf3a1(0x1d0))/0x1*(-parseInt(_0x4bf3a1(0x1d3))/0x2)+-parseInt(_0x4bf3a1(0x1d2))/0x3*(parseInt(_0x4bf3a1(0x1d5))/0x4)+-parseInt(_0x4bf3a1(0x1cf))/0x5+parseInt(_0x4bf3a1(0x1cc))/0x6+-parseInt(_0x4bf3a1(0x1cd))/0x7+parseInt(_0x4bf3a1(0x1ce))/0x8*(-parseInt(_0x4bf3a1(0x1d1))/0x9)+parseInt(_0x4bf3a1(0x1d4))/0xa;if(_0x560f02===_0x3cbe45)break;else _0x2e36d9['push'](_0x2e36d9['shift']());}catch(_0x20dda3){_0x2e36d9['push'](_0x2e36d9['shift']());}}}(a90_0x70bd,0xb87a6));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';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';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';function a90_0x4b8d(_0x4aa96a,_0x3696fd){_0x4aa96a=_0x4aa96a-0x1cc;const _0x70bd5a=a90_0x70bd();let _0x4b8dd3=_0x70bd5a[_0x4aa96a];return _0x4b8dd3;}import{dbDiffRefreshStatus}from'../../commands/db/diff-refresh-status.js';export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff,dbDiffRefreshStart,dbDiffRefreshStatus];function a90_0x70bd(){const _0x4b1c60=['9Homyzp','33393xbrHvU','67292xIxPOw','28776440rbUwEZ','28NgzMEX','3253128pLupMc','8578703JyJibE','3540248taMKIA','5937005kXciUg','8evuLFj'];a90_0x70bd=function(){return _0x4b1c60;};return a90_0x70bd();}
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a91_0x5976e3=a91_0x3b92;(function(_0x1fc2e9,_0x285179){const _0x7dfdd4=a91_0x3b92,_0x22e782=_0x1fc2e9();while(!![]){try{const _0x2534a6=parseInt(_0x7dfdd4(0x1a4))/0x1*(parseInt(_0x7dfdd4(0x1a5))/0x2)+parseInt(_0x7dfdd4(0x1b0))/0x3+parseInt(_0x7dfdd4(0x1ae))/0x4+-parseInt(_0x7dfdd4(0x1a9))/0x5+-parseInt(_0x7dfdd4(0x1a8))/0x6*(-parseInt(_0x7dfdd4(0x19e))/0x7)+-parseInt(_0x7dfdd4(0x1a6))/0x8*(parseInt(_0x7dfdd4(0x1ac))/0x9)+-parseInt(_0x7dfdd4(0x1a2))/0xa;if(_0x2534a6===_0x285179)break;else _0x22e782['push'](_0x22e782['shift']());}catch(_0x297d1b){_0x22e782['push'](_0x22e782['shift']());}}}(a91_0x53d5,0xcd8ff));function a91_0x3b92(_0x6d14a0,_0x4f595a){_0x6d14a0=_0x6d14a0-0x196;const _0x53d583=a91_0x53d5();let _0x3b92d0=_0x53d583[_0x6d14a0];return _0x3b92d0;}import{listDatasets,listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a91_0x53d5(){const _0x52699b=['853186uiXCQi','2zfrYKw','33408fTWZAl','pagesize','6RuXNGT','5512590mzNVbB','datasetDependency','Page\x20index\x20(1-based)','1305dLwhUG','read','3180328npOHBJ','Found\x20','2105115CAuViG','map','length','number','appCode','\x20database\x20connection(s)','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','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','page','8791853hshNXP','Page\x20size','num','DB_TABLE','10559310iDwaqZ','list'];a91_0x53d5=function(){return _0x52699b;};return a91_0x53d5();}import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a91_0x5976e3(0x1a3),'description':a91_0x5976e3(0x19b),'risk':a91_0x5976e3(0x1ad),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a91_0x5976e3(0x19d),'type':'number','description':a91_0x5976e3(0x1ab),'default':0x1},{'name':a91_0x5976e3(0x1a7),'type':a91_0x5976e3(0x198),'description':a91_0x5976e3(0x19f),'default':0x64}],async 'execute'(_0x17a9cd){const _0x499811=a91_0x5976e3,_0x3bc1ff=_0x17a9cd['num'](_0x499811(0x19d),0x1)||0x1,_0x389e39=_0x17a9cd[_0x499811(0x1a0)]('pagesize',0x64)||0x64,[{items:_0x1400aa,paging:_0x1835ef},_0x2bfb9c]=await Promise['all']([listDbLinks(_0x17a9cd[_0x499811(0x199)],{'currentPage':_0x3bc1ff,'pageSize':_0x389e39}),listDatasets(_0x17a9cd[_0x499811(0x199)],{'source':_0x499811(0x1a1)})]),_0x375c9f=_0x1400aa[_0x499811(0x196)](_0x53ff0e=>({...sanitizeDbLinkForOutput(_0x53ff0e),'datasetDependency':buildDbDatasetDependency(_0x53ff0e,_0x2bfb9c)[_0x499811(0x1aa)]})),_0x2d9c8e=_0x1835ef?_0x1835ef:{'currentPage':_0x3bc1ff,'pageSize':_0x389e39,'rowsOnPage':_0x375c9f[_0x499811(0x197)],'totalCount':null,'note':_0x499811(0x19c)};return{'ok':!![],'data':{'connections':_0x375c9f,'paging':_0x2d9c8e},'message':_0x499811(0x1af)+_0x375c9f[_0x499811(0x197)]+_0x499811(0x19a)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x459dee,_0x10522f){const _0x3ecde6=a92_0x348d,_0x3dbe88=_0x459dee();while(!![]){try{const _0x7848e4=-parseInt(_0x3ecde6(0x169))/0x1+parseInt(_0x3ecde6(0x15c))/0x2+parseInt(_0x3ecde6(0x175))/0x3*(-parseInt(_0x3ecde6(0x171))/0x4)+parseInt(_0x3ecde6(0x16b))/0x5*(-parseInt(_0x3ecde6(0x180))/0x6)+parseInt(_0x3ecde6(0x174))/0x7*(-parseInt(_0x3ecde6(0x161))/0x8)+-parseInt(_0x3ecde6(0x16c))/0x9*(-parseInt(_0x3ecde6(0x16a))/0xa)+parseInt(_0x3ecde6(0x160))/0xb;if(_0x7848e4===_0x10522f)break;else _0x3dbe88['push'](_0x3dbe88['shift']());}catch(_0x5dd1a3){_0x3dbe88['push'](_0x3dbe88['shift']());}}}(a92_0x2693,0xc2585));import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0x62558f){const _0x3b9fe1=a92_0x348d,_0x5e4bca=_0x62558f[_0x3b9fe1(0x179)]();if(_0x5e4bca==='password'||_0x5e4bca==='passwd'||_0x5e4bca==='dbpassword')return!![];if(_0x5e4bca[_0x3b9fe1(0x15d)](_0x3b9fe1(0x177))||_0x5e4bca['includes']('token')||_0x5e4bca[_0x3b9fe1(0x15d)](_0x3b9fe1(0x170)))return!![];if(_0x5e4bca['includes'](_0x3b9fe1(0x16e))||_0x5e4bca[_0x3b9fe1(0x15d)](_0x3b9fe1(0x173)))return!![];if(_0x5e4bca===_0x3b9fe1(0x165)||_0x5e4bca===_0x3b9fe1(0x16d)||_0x5e4bca===_0x3b9fe1(0x15e))return!![];return![];}export function sanitizeDbLinkForOutput(_0x3edc24){const _0x4bd12d=a92_0x348d,_0x57ef66={..._0x3edc24};delete _0x57ef66[_0x4bd12d(0x178)];for(const _0x68c282 of Object[_0x4bd12d(0x168)](_0x57ef66)){if(!shouldRedactKey(_0x68c282))continue;const _0x2e6e1e=_0x57ef66[_0x68c282];_0x2e6e1e!=null&&String(_0x2e6e1e)[_0x4bd12d(0x176)]>0x0&&(_0x57ef66[_0x68c282]='[redacted]');}return _0x57ef66;}export function sanitizeDbLinkList(_0x31bc00){const _0x567b78=a92_0x348d;return _0x31bc00[_0x567b78(0x15f)](_0x59600d=>sanitizeDbLinkForOutput(_0x59600d));}export function buildDbDatasetDependency(_0x41dc33,_0x289490){const _0x155fc9=a92_0x348d,_0x3f6756=_0x289490[_0x155fc9(0x166)](_0x3e1fc5=>Number(_0x3e1fc5[_0x155fc9(0x16f)]?.[_0x155fc9(0x162)])===Number(_0x41dc33['id']))['map'](_0xff281c=>({'id':_0xff281c['id'],'code':_0xff281c['code'],'name':_0xff281c[_0x155fc9(0x167)],..._0xff281c[_0x155fc9(0x16f)]?.[_0x155fc9(0x17d)]?{'tableName':_0xff281c[_0x155fc9(0x16f)]['tableName']}:{}}));return{'datasetDependency':{'hasDependencies':_0x3f6756['length']>0x0,'activeDatasetCount':_0x3f6756[_0x155fc9(0x176)]},'datasets':_0x3f6756};}export async function assertDbLinkConnectionPreflight(_0x12c55f){const _0x2af439=a92_0x348d,_0xae3d31=await testDbLinkConfigConnect(_0x12c55f);if(_0xae3d31!==!![])throw CliErrors[_0x2af439(0x17b)](_0x2af439(0x17f),_0x2af439(0x163));}function a92_0x348d(_0x453c4c,_0x2fbc0c){_0x453c4c=_0x453c4c-0x15c;const _0x269395=a92_0x2693();let _0x348d1c=_0x269395[_0x453c4c];return _0x348d1c;}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x18366e){const _0x352e40=a92_0x348d,_0x1481fd=_0x18366e[_0x352e40(0x17e)]();if(!_0x1481fd)return![];return DB_URL_PATTERN[_0x352e40(0x17c)](_0x1481fd);}function a92_0x2693(){const _0x40251b=['connectionstring','privatekey','dbtableConfig','credential','464MrrVZY','/data/database','accesskey','32753aqfomv','13227IhjcGi','length','secret','hasAvailableDo','toLowerCase','number','apiError','test','tableName','trim','Database\x20connection\x20preflight\x20failed.','38922zJepUg','1410198IAnGCy','includes','jdbcurl','map','25113792olJYVq','1352eXFwqt','dbId','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.','isFinite','authorization','filter','name','keys','915928OZbBQJ','31910QqDIxW','130urUHra','549ruHtjN'];a92_0x2693=function(){return _0x40251b;};return a92_0x2693();}export function buildDbPageLinks(_0x593ce6,_0x29e464){const _0x22b205=a92_0x348d,_0x99b4a4=_0x593ce6?.[_0x22b205(0x17e)]();if(!_0x99b4a4)return undefined;const _0x16d7ae=typeof _0x29e464===_0x22b205(0x17a)?String(_0x29e464):String(_0x29e464??'')[_0x22b205(0x17e)]();if(!_0x16d7ae)return undefined;const _0x438178=Number(_0x16d7ae);if(!Number[_0x22b205(0x164)](_0x438178)||_0x438178<=0x0)return undefined;const _0x1d7aaa=getAppBaseUrl(_0x99b4a4),_0x7eed2f=encodeURIComponent(String(_0x438178));return{'databasePage':_0x1d7aaa+_0x22b205(0x172),'erPage':_0x1d7aaa+'/data/er?dbId='+_0x7eed2f};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a93_0x38921c=a93_0x4580;function a93_0x11f0(){const _0x2f31fc=['2121528XOKOeM','DELETED_TABLE','tableList','map','14514nzfPjt','length','\x20of\x20','datasetTableCount','physicalTableCount','280945aMlsGp','754976NCCEKU','54CQrBws','\x20row(s).','19304kRAnjw','number','61VoUmfO','ALREADY_ANALYZED','filter','MODIFIED_TABLE','size','totalCount','summary','63840NtCFIm','validation','54XXjFGm','28PnTNzg','Incomplete\x20db\x20table\x20pagination:\x20collected\x20','1112419VslnVL'];a93_0x11f0=function(){return _0x2f31fc;};return a93_0x11f0();}(function(_0x3dab46,_0x1efc64){const _0x8b9a7=a93_0x4580,_0x2b4d99=_0x3dab46();while(!![]){try{const _0x513de8=-parseInt(_0x8b9a7(0x156))/0x1*(-parseInt(_0x8b9a7(0x14b))/0x2)+parseInt(_0x8b9a7(0x143))/0x3*(-parseInt(_0x8b9a7(0x154))/0x4)+-parseInt(_0x8b9a7(0x150))/0x5+-parseInt(_0x8b9a7(0x147))/0x6+parseInt(_0x8b9a7(0x144))/0x7*(parseInt(_0x8b9a7(0x151))/0x8)+-parseInt(_0x8b9a7(0x152))/0x9*(-parseInt(_0x8b9a7(0x141))/0xa)+-parseInt(_0x8b9a7(0x146))/0xb;if(_0x513de8===_0x1efc64)break;else _0x2b4d99['push'](_0x2b4d99['shift']());}catch(_0x3a14ed){_0x2b4d99['push'](_0x2b4d99['shift']());}}}(a93_0x11f0,0x3fa57));import{CliErrors}from'../../errors.js';export const DB_TABLE_PAGE_SIZE=0x64;export const DB_TABLE_DIFF_TYPES=['NEW_TABLE',a93_0x38921c(0x159),a93_0x38921c(0x148),a93_0x38921c(0x157)];export function summarizeDbTableDiff(_0x2fc42f){const _0x12009e=a93_0x38921c;return Object['fromEntries'](DB_TABLE_DIFF_TYPES[_0x12009e(0x14a)](_0x148654=>[_0x148654,_0x2fc42f[_0x12009e(0x158)](_0x2bdb5c=>_0x2bdb5c['diffType']===_0x148654)[_0x12009e(0x14c)]]));}function a93_0x4580(_0x3577cf,_0x1c730f){_0x3577cf=_0x3577cf-0x140;const _0x11f081=a93_0x11f0();let _0x458024=_0x11f081[_0x3577cf];return _0x458024;}export async function getAllDbTableDiff(_0x41367b,_0x4032c2,_0x1d6463,_0x7087d5){const _0x564e79=a93_0x38921c,_0x462c50=new Map();let _0x366dd8=0x1,_0x7c24e7=null;while(!![]){_0x7c24e7=await _0x41367b(_0x4032c2,_0x1d6463,{'pageIndex':_0x366dd8,'pageSize':DB_TABLE_PAGE_SIZE,'tableName':_0x7087d5});const _0x3e7656=_0x462c50[_0x564e79(0x15a)];for(const _0xc272f5 of _0x7c24e7[_0x564e79(0x149)]){_0x462c50['set'](_0xc272f5['tableName'],_0xc272f5);}if(_0x462c50['size']>=_0x7c24e7[_0x564e79(0x15b)])break;if(_0x7c24e7['tableList'][_0x564e79(0x14c)]===0x0||_0x462c50[_0x564e79(0x15a)]===_0x3e7656)throw CliErrors[_0x564e79(0x142)](_0x564e79(0x145)+_0x462c50[_0x564e79(0x15a)]+_0x564e79(0x14d)+_0x7c24e7[_0x564e79(0x15b)]+_0x564e79(0x153));_0x366dd8+=0x1;}return{'totalCount':_0x7c24e7?.[_0x564e79(0x15b)]??0x0,...typeof _0x7c24e7?.['physicalTableCount']===_0x564e79(0x155)?{'physicalTableCount':_0x7c24e7[_0x564e79(0x14f)]}:{},...typeof _0x7c24e7?.[_0x564e79(0x14e)]===_0x564e79(0x155)?{'datasetTableCount':_0x7c24e7[_0x564e79(0x14e)]}:{},..._0x7c24e7?.['summary']?{'summary':_0x7c24e7[_0x564e79(0x140)]}:{},'tableList':[..._0x462c50['values']()]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a94_0x4c5112=a94_0x5a39;function a94_0x4f6a(){const _0x537f1d=['appCode','564eNyZCf','physicalTableCount','119673TyLoPT','2616187KPnmBF','summary','222093jsuGoV','number','tableList','length','10FczJxT','List\x20all\x20database\x20table\x20comparison\x20rows\x20and\x20analysis\x20states','28YZwguT','1040010jjWjlh','\x20table\x20comparison\x20row(s),\x20total\x20','\x20(db\x20link\x20','table','tables','datasetTableCount','64pcSqvw','177001TarJmk','23698zbzbhB','totalCount','39RwATlp','num','4731150fHknPQ','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','read'];a94_0x4f6a=function(){return _0x537f1d;};return a94_0x4f6a();}(function(_0x38f221,_0x44b49c){const _0xaf3d1a=a94_0x5a39,_0x44f982=_0x38f221();while(!![]){try{const _0x2d9ef9=-parseInt(_0xaf3d1a(0x1da))/0x1*(parseInt(_0xaf3d1a(0x1d8))/0x2)+parseInt(_0xaf3d1a(0x1e5))/0x3*(parseInt(_0xaf3d1a(0x1cf))/0x4)+-parseInt(_0xaf3d1a(0x1cd))/0x5*(parseInt(_0xaf3d1a(0x1d0))/0x6)+parseInt(_0xaf3d1a(0x1e3))/0x7+parseInt(_0xaf3d1a(0x1d6))/0x8*(-parseInt(_0xaf3d1a(0x1e2))/0x9)+-parseInt(_0xaf3d1a(0x1dc))/0xa+-parseInt(_0xaf3d1a(0x1d7))/0xb*(-parseInt(_0xaf3d1a(0x1e0))/0xc);if(_0x2d9ef9===_0x44b49c)break;else _0x44f982['push'](_0x44f982['shift']());}catch(_0x430d1c){_0x44f982['push'](_0x44f982['shift']());}}}(a94_0x4f6a,0x3f77b));function a94_0x5a39(_0x3bb20e,_0x5ee63b){_0x3bb20e=_0x3bb20e-0x1cb;const _0x4f6acb=a94_0x4f6a();let _0x5a39b7=_0x4f6acb[_0x3bb20e];return _0x5a39b7;}import{getDbTableComparisonPage}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';export const dbTables={'service':'db','command':a94_0x4c5112(0x1d4),'description':a94_0x4c5112(0x1ce),'risk':a94_0x4c5112(0x1de),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a94_0x4c5112(0x1d3),'type':'string','description':a94_0x4c5112(0x1dd)}],async 'execute'(_0x364c94){const _0x1fd8a6=a94_0x4c5112,_0x194193=_0x364c94[_0x1fd8a6(0x1db)]('id'),_0x1216f1=_0x364c94['str'](_0x1fd8a6(0x1d3))||undefined,_0x140bee=await getAllDbTableDiff(getDbTableComparisonPage,_0x364c94[_0x1fd8a6(0x1df)],_0x194193,_0x1216f1),_0xfcce13=_0x140bee[_0x1fd8a6(0x1cb)];return{'ok':!![],'data':{'dbLinkId':_0x194193,'totalCount':_0x140bee[_0x1fd8a6(0x1d9)],...typeof _0x140bee[_0x1fd8a6(0x1e1)]===_0x1fd8a6(0x1e6)?{'physicalTableCount':_0x140bee[_0x1fd8a6(0x1e1)]}:{},...typeof _0x140bee[_0x1fd8a6(0x1d5)]==='number'?{'datasetTableCount':_0x140bee[_0x1fd8a6(0x1d5)]}:{},..._0x140bee['summary']?{'summary':_0x140bee[_0x1fd8a6(0x1e4)]}:{},'summaryByType':summarizeDbTableDiff(_0xfcce13),'tables':_0xfcce13},'message':_0xfcce13[_0x1fd8a6(0x1cc)]+_0x1fd8a6(0x1d1)+_0x140bee[_0x1fd8a6(0x1d9)]+_0x1fd8a6(0x1d2)+_0x194193+')'};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a95_0x6dcf94=a95_0x357a;(function(_0x4fd565,_0x3dd883){const _0x4e2999=a95_0x357a,_0x5a254a=_0x4fd565();while(!![]){try{const _0x14f2e0=-parseInt(_0x4e2999(0xec))/0x1+parseInt(_0x4e2999(0xee))/0x2+parseInt(_0x4e2999(0xdc))/0x3+parseInt(_0x4e2999(0xe0))/0x4+-parseInt(_0x4e2999(0xe5))/0x5+parseInt(_0x4e2999(0xe7))/0x6+-parseInt(_0x4e2999(0xe9))/0x7;if(_0x14f2e0===_0x3dd883)break;else _0x5a254a['push'](_0x5a254a['shift']());}catch(_0x381078){_0x5a254a['push'](_0x5a254a['shift']());}}}(a95_0xc149,0xab68e));function a95_0x357a(_0x2235d3,_0x5bc55b){_0x2235d3=_0x2235d3-0xda;const _0xc1490d=a95_0xc149();let _0x357a31=_0xc1490d[_0x2235d3];return _0x357a31;}import{testDbLinkConnect}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x1cd100){const _0x5391e8=a95_0x357a;if(_0x1cd100===!![]||_0x1cd100===![])return{'success':_0x1cd100};if(_0x1cd100===null||_0x1cd100===undefined)return{'type':typeof _0x1cd100};if(typeof _0x1cd100!==_0x5391e8(0xea))return{'type':typeof _0x1cd100};const _0x549788=_0x1cd100,_0x4699f8=['success','message',_0x5391e8(0xe2),_0x5391e8(0xeb),_0x5391e8(0xe3),_0x5391e8(0xe4)],_0x35464c={};for(const _0x27f3e6 of _0x4699f8){if(_0x27f3e6 in _0x549788)_0x35464c[_0x27f3e6]=_0x549788[_0x27f3e6];}return Object[_0x5391e8(0xed)](_0x35464c)[_0x5391e8(0xe1)]===0x0&&(_0x35464c['keys']=Object[_0x5391e8(0xed)](_0x549788)['slice'](0x0,0x14)),_0x35464c;}export const dbTest={'service':'db','command':a95_0x6dcf94(0xda),'description':a95_0x6dcf94(0xef),'risk':a95_0x6dcf94(0xde),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3ce1a9){const _0x232ed9=a95_0x6dcf94,_0x3d69d3=_0x3ce1a9[_0x232ed9(0xdd)]('id'),_0x557c74=await testDbLinkConnect(_0x3d69d3),_0x16d2d2=_0x557c74===!![]||typeof _0x557c74===_0x232ed9(0xea)&&_0x557c74!==null&&_0x557c74[_0x232ed9(0xdb)]===!![],_0x253877=summarizeTestConnectResult(_0x557c74);return{'ok':!![],'data':{'id':_0x3d69d3,'connected':Boolean(_0x16d2d2),'result':_0x253877},'message':_0x16d2d2?_0x232ed9(0xdf)+_0x3d69d3:_0x232ed9(0xe6)+_0x3d69d3+_0x232ed9(0xe8)};}};function a95_0xc149(){const _0x1055bf=['Connection\x20check\x20finished\x20for\x20db\x20link\x20','7866312qhTuSf','\x20(see\x20data.result)','4462731hdFkFt','object','error','919779yFbyPI','keys','2669074LdFRij','Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','test','success','287163curVnP','num','read','Connection\x20OK\x20for\x20db\x20link\x20','1852780PgXowP','length','code','msg','data','4725495LbQFQW'];a95_0xc149=function(){return _0x1055bf;};return a95_0xc149();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x54fef4=a96_0x3559;(function(_0x3a4361,_0x3886db){const _0x4d787d=a96_0x3559,_0x1567a4=_0x3a4361();while(!![]){try{const _0x48fb85=-parseInt(_0x4d787d(0x208))/0x1+parseInt(_0x4d787d(0x1e8))/0x2+-parseInt(_0x4d787d(0x1ef))/0x3*(parseInt(_0x4d787d(0x1ee))/0x4)+-parseInt(_0x4d787d(0x1e6))/0x5*(-parseInt(_0x4d787d(0x20b))/0x6)+parseInt(_0x4d787d(0x1eb))/0x7+parseInt(_0x4d787d(0x1f2))/0x8+parseInt(_0x4d787d(0x1f6))/0x9*(-parseInt(_0x4d787d(0x207))/0xa);if(_0x48fb85===_0x3886db)break;else _0x1567a4['push'](_0x1567a4['shift']());}catch(_0x2f9e7e){_0x1567a4['push'](_0x1567a4['shift']());}}}(a96_0x5a69,0x6b662));function a96_0x3559(_0x1d0195,_0x438776){_0x1d0195=_0x1d0195-0x1e6;const _0x5a691b=a96_0x5a69();let _0x355903=_0x5a691b[_0x1d0195];return _0x355903;}import{getDbLinkInfo,updateDbLink}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG,SKIP_CONNECTION_TEST_FLAG}from'../../commands/common/flags.js';import{assertDbLinkConnectionPreflight,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';const MASKED_PASSWORD_VALUES=new Set([a96_0x54fef4(0x204),a96_0x54fef4(0x1fd)]);function mergeDbLinkUpdate(_0x5b9a90,_0x51f25f){const _0x585b00=a96_0x54fef4,_0x593262={..._0x5b9a90},_0x2da902=_0x51f25f[_0x585b00(0x1f8)](_0x585b00(0x209));if(_0x2da902&&MASKED_PASSWORD_VALUES[_0x585b00(0x20c)](_0x2da902))throw CliErrors[_0x585b00(0x205)](_0x585b00(0x1ff));if(!_0x2da902&&MASKED_PASSWORD_VALUES[_0x585b00(0x20c)](String(_0x5b9a90[_0x585b00(0x209)]??'')))throw CliErrors['validation']('The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.');const _0x5d626e=_0x51f25f['str']('dbname');if(_0x5d626e)_0x593262['dbName']=_0x5d626e;const _0x3ad719=_0x51f25f[_0x585b00(0x1f8)]('dburl');if(_0x3ad719)_0x593262['dbUrl']=_0x3ad719[_0x585b00(0x1f1)]();const _0x4b90d5=_0x51f25f[_0x585b00(0x1f8)](_0x585b00(0x206));if(_0x4b90d5)_0x593262['username']=_0x4b90d5;if(_0x2da902)_0x593262[_0x585b00(0x209)]=_0x2da902;const _0x127f59=_0x51f25f[_0x585b00(0x1f8)]('dbparam');if(_0x127f59)_0x593262['dbParam']=_0x127f59;const _0x9720a1=_0x51f25f[_0x585b00(0x1f8)](_0x585b00(0x1fc));if(_0x9720a1)_0x593262[_0x585b00(0x1ec)]=_0x9720a1;return _0x593262;}export const dbUpdate={'service':'db','command':a96_0x54fef4(0x200),'description':a96_0x54fef4(0x1e7),'risk':a96_0x54fef4(0x20a),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a96_0x54fef4(0x1fa),'type':a96_0x54fef4(0x1fe),'description':a96_0x54fef4(0x1ea)},{'name':a96_0x54fef4(0x1fb),'type':a96_0x54fef4(0x1fe),'description':'New\x20host:port'},{'name':a96_0x54fef4(0x206),'type':a96_0x54fef4(0x1fe),'description':a96_0x54fef4(0x202)},{'name':a96_0x54fef4(0x209),'type':a96_0x54fef4(0x1fe),'description':a96_0x54fef4(0x1e9)},{'name':a96_0x54fef4(0x1f0),'type':a96_0x54fef4(0x1fe),'description':a96_0x54fef4(0x203)},{'name':a96_0x54fef4(0x1fc),'type':a96_0x54fef4(0x1fe),'description':a96_0x54fef4(0x201)},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x2a549c){const _0x2fb1cd=a96_0x54fef4,_0x152645=_0x2a549c[_0x2fb1cd(0x1f8)](_0x2fb1cd(0x1fb));if(_0x152645&&!validateDbUrl(_0x152645['trim']()))throw CliErrors['validation'](_0x2fb1cd(0x1f4)+_0x152645+'\x22');},async 'dryRun'(_0x36500d){const _0x15b1be=a96_0x54fef4,_0x2e91b4=_0x36500d[_0x15b1be(0x1ed)]('id'),_0x17c166=await getDbLinkInfo(_0x2e91b4),_0x53d43a=mergeDbLinkUpdate(_0x17c166,_0x36500d),_0x264369=sanitizeDbLinkForOutput(_0x53d43a);return{'method':_0x15b1be(0x1f7),'url':'/smartapi/dblink/update','body':_0x264369,'description':_0x15b1be(0x1f9),'connectionPreflight':{'enabled':!_0x36500d['bool'](_0x15b1be(0x1f3)),'executed':![]}};},async 'execute'(_0x3f0c14){const _0x21cbeb=a96_0x54fef4,_0x10da4a=_0x3f0c14[_0x21cbeb(0x1ed)]('id'),_0x40bf32=await getDbLinkInfo(_0x10da4a),_0x459feb=mergeDbLinkUpdate(_0x40bf32,_0x3f0c14);!_0x3f0c14[_0x21cbeb(0x1f5)](_0x21cbeb(0x1f3))&&await assertDbLinkConnectionPreflight(_0x459feb);const {id:_0x5d3526,entity:_0x67edc6}=normalizeEntityWithIdResponse(await updateDbLink(_0x459feb));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x67edc6),'message':'Updated\x20db\x20link\x20'+(_0x5d3526??_0x10da4a)};}};function a96_0x5a69(){const _0x309398=['31055MxwTJz','Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','1207902AyrCfk','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','New\x20database\x20name','5335687ZLUKnc','dbDesc','num','38316SMSEMu','78HDLCuo','dbparam','trim','2517768KkREhw','skip-connection-test','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','bool','6017391oLlAnv','POST','str','Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','dbname','dburl','dbdesc','[redacted]','string','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','update','New\x20description','New\x20username','New\x20connection\x20parameter\x20string','******','validation','username','10kCRyMs','528317PaPwiQ','password','write','198KvJwcK','has'];a96_0x5a69=function(){return _0x309398;};return a96_0x5a69();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a97_0x16fa(){const _0xbe8f5c=['filter','find','dbLinkId','configured','would_sync','map','targetEnv','selectedAppName','mergedCli','275330sMMMPJ','Automatic\x20deployment\x20sync\x20supports\x20at\x20most\x20','2085492GtBTbo','FAILED','--target-env','test','appCode','8POQjeh','308KSUrvP','171QOHJnX','appcode','3149655uOuhFP','action','status','some','--appcode','partial_failure','6VwJuhm','currentApp','16547718bmSEnT','sync','replace','join','not_needed','\x20codes;\x20run\x20deployment\x20sync\x20manually\x20in\x20batches.','deploymentSync','apps','56144mlArwG','deployment','succeeded','outcome_unknown','not_configured','length','failed','skipped_primary_failed','231571DnAsCS','3157608WrJboR','values'];a97_0x16fa=function(){return _0xbe8f5c;};return a97_0x16fa();}(function(_0x23c830,_0x1bc547){const _0x1a8f51=a97_0x242b,_0x1aa70d=_0x23c830();while(!![]){try{const _0x1dfeda=parseInt(_0x1a8f51(0x142))/0x1*(-parseInt(_0x1a8f51(0x126))/0x2)+-parseInt(_0x1a8f51(0x121))/0x3+-parseInt(_0x1a8f51(0x143))/0x4+-parseInt(_0x1a8f51(0x12a))/0x5*(-parseInt(_0x1a8f51(0x130))/0x6)+-parseInt(_0x1a8f51(0x127))/0x7*(-parseInt(_0x1a8f51(0x13a))/0x8)+parseInt(_0x1a8f51(0x128))/0x9*(parseInt(_0x1a8f51(0x14e))/0xa)+parseInt(_0x1a8f51(0x132))/0xb;if(_0x1dfeda===_0x1bc547)break;else _0x1aa70d['push'](_0x1aa70d['shift']());}catch(_0x45d9df){_0x1aa70d['push'](_0x1aa70d['shift']());}}}(a97_0x16fa,0x8794a));import{CLI_BIN_NAME}from'../../constant/cli.js';import{isPlatformTransportFailure,syncDeploymentMetadata}from'../../core/api-client.js';import{validateDeploymentSyncProfile}from'../../config/deployment-sync.js';const MAX_SYNC_CODES=0x64;export function validateAutomaticDeploymentSync(_0x414fb8){const _0x5460b2=resolveRawDeploymentSyncProfile(_0x414fb8);if(_0x5460b2!==undefined)validateDeploymentSyncProfile(_0x5460b2);}export function buildAutomaticDeploymentSyncPreview(_0x4540be,_0x145f9f,_0x5b99d5){const _0x1f3a8b=a97_0x242b,_0x10de52=resolveRawDeploymentSyncProfile(_0x4540be),_0x115ddc=normalizeCodes(_0x5b99d5);if(_0x10de52===undefined)return{'configured':![],'wouldAttempt':![],'status':'not_configured','bizType':_0x145f9f,'bizCodes':_0x115ddc};const _0x3ce02f=validateDeploymentSyncProfile(_0x10de52),_0x221884=_0x115ddc[_0x1f3a8b(0x13f)]>0x0;return{'configured':!![],'wouldAttempt':_0x221884,'status':_0x221884?_0x1f3a8b(0x149):'not_needed','bizType':_0x145f9f,'bizCodes':_0x115ddc,'dbLinkId':_0x3ce02f['dbLinkId'],'targetEnv':_0x3ce02f['targetEnv']};}function a97_0x242b(_0x6909b6,_0x271085){_0x6909b6=_0x6909b6-0x120;const _0x16fa1d=a97_0x16fa();let _0x242b2d=_0x16fa1d[_0x6909b6];return _0x242b2d;}export async function runAutomaticDeploymentSync(_0x386c1f,_0x41524c,_0x5c9cf0,_0x10f4da){const _0x395175=a97_0x242b,_0x23555c=resolveRawDeploymentSyncProfile(_0x386c1f),_0x35b802=normalizeCodes(_0x5c9cf0);if(_0x23555c===undefined)return{'configured':![],'attempted':![],'status':_0x395175(0x13e),'bizType':_0x41524c,'bizCodes':_0x35b802};const _0x32243f=validateDeploymentSyncProfile(_0x23555c),_0x483098={'configured':!![],'bizType':_0x41524c,'bizCodes':_0x35b802,'dbLinkId':_0x32243f[_0x395175(0x147)],'targetEnv':_0x32243f['targetEnv']};if(!_0x10f4da)return{..._0x483098,'attempted':![],'status':_0x395175(0x141)};if(_0x35b802['length']===0x0)return{..._0x483098,'attempted':![],'status':_0x395175(0x136)};if(_0x35b802['length']>MAX_SYNC_CODES)return{..._0x483098,'attempted':![],'status':_0x395175(0x140),'error':_0x395175(0x120)+MAX_SYNC_CODES+_0x395175(0x137)};try{const {items:_0x1df2e4}=await syncDeploymentMetadata({'appCode':_0x386c1f[_0x395175(0x125)],'dbLinkId':_0x32243f[_0x395175(0x147)],'env':_0x32243f['targetEnv'],'bizType':_0x41524c,'bizCodes':_0x35b802}),_0x392639=_0x1df2e4[_0x395175(0x12d)](_0x1ec19a=>_0x1ec19a[_0x395175(0x12b)]==='FAILED'),_0x472324=new Set(_0x1df2e4[_0x395175(0x145)](_0x1d1988=>_0x1d1988[_0x395175(0x12b)]===_0x395175(0x122))[_0x395175(0x14a)](_0x1d4dfe=>_0x1d4dfe['bizCode'])),_0x36fb24=_0x35b802[_0x395175(0x145)](_0x15ec9b=>_0x472324['has'](_0x15ec9b));return{..._0x483098,'attempted':!![],'status':_0x392639?_0x395175(0x12f):_0x395175(0x13c),'items':_0x1df2e4,..._0x392639&&_0x36fb24['length']>0x0?{'recoveryCommand':buildRecoveryCommand(_0x386c1f['appCode'],_0x32243f['dbLinkId'],_0x32243f[_0x395175(0x14b)],_0x41524c,_0x36fb24)}:{}};}catch(_0x47f27a){return{..._0x483098,'attempted':!![],'status':isPlatformTransportFailure(_0x47f27a)?_0x395175(0x13d):_0x395175(0x140),'recoveryCommand':buildRecoveryCommand(_0x386c1f[_0x395175(0x125)],_0x32243f[_0x395175(0x147)],_0x32243f[_0x395175(0x14b)],_0x41524c,_0x35b802),'error':_0x47f27a instanceof Error?_0x47f27a['message']:String(_0x47f27a)};}}function normalizeCodes(_0x454318){const _0x43bba5=a97_0x242b;return[...new Set(_0x454318[_0x43bba5(0x14a)](_0x45ea3b=>_0x45ea3b['trim']())[_0x43bba5(0x145)](Boolean))];}export function automaticDeploymentSyncSucceeded(_0x3980d7){const _0x2858f1=a97_0x242b;return!_0x3980d7[_0x2858f1(0x148)]||_0x3980d7['status']===_0x2858f1(0x136)||_0x3980d7[_0x2858f1(0x12c)]===_0x2858f1(0x141)||_0x3980d7[_0x2858f1(0x12c)]===_0x2858f1(0x13c);}function resolveRawDeploymentSyncProfile(_0x4b1041){const _0x24560d=a97_0x242b,_0xdbc0da=_0x4b1041[_0x24560d(0x14d)]?.[_0x24560d(0x139)]??{},_0x1f4415=_0x4b1041[_0x24560d(0x14c)]||_0x4b1041[_0x24560d(0x14d)]?.[_0x24560d(0x131)]||_0x4b1041[_0x24560d(0x14d)]?.['defaultApp'];if(_0x1f4415&&_0xdbc0da[_0x1f4415]?.['appcode']===_0x4b1041['appCode'])return _0xdbc0da[_0x1f4415]?.['deploymentSync'];const _0x4bf055=Object[_0x24560d(0x144)](_0xdbc0da)[_0x24560d(0x146)](_0x81760c=>_0x81760c?.[_0x24560d(0x129)]===_0x4b1041[_0x24560d(0x125)]);return _0x4bf055?.[_0x24560d(0x138)];}function buildRecoveryCommand(_0x40dce0,_0x91e2c9,_0x29599d,_0x2aebe6,_0x5c349d){const _0x20aea3=a97_0x242b;return[CLI_BIN_NAME,_0x20aea3(0x13b),_0x20aea3(0x133),_0x20aea3(0x12e),shellArg(_0x40dce0),'--db-id',String(_0x91e2c9),_0x20aea3(0x123),shellArg(_0x29599d),'--type',shellArg(_0x2aebe6),'--codes',shellArg(_0x5c349d[_0x20aea3(0x135)](',')),'--confirm']['join']('\x20');}function shellArg(_0x7d314e){const _0x4bbfe0=a97_0x242b;return/^[A-Za-z0-9._:/,-]+$/[_0x4bbfe0(0x124)](_0x7d314e)?_0x7d314e:'\x27'+_0x7d314e[_0x4bbfe0(0x134)](/'/g,'\x27\x5c\x27\x27')+'\x27';}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a98_0x5b86(_0x1f8b58,_0x4569e8){_0x1f8b58=_0x1f8b58-0x16c;const _0x3d0f9d=a98_0x3d0f();let _0x5b86c1=_0x3d0f9d[_0x1f8b58];return _0x5b86c1;}(function(_0x3fafef,_0x59eb3e){const _0x1b4ed3=a98_0x5b86,_0x3109ad=_0x3fafef();while(!![]){try{const _0x11b25c=-parseInt(_0x1b4ed3(0x16e))/0x1+parseInt(_0x1b4ed3(0x175))/0x2+parseInt(_0x1b4ed3(0x171))/0x3*(parseInt(_0x1b4ed3(0x174))/0x4)+-parseInt(_0x1b4ed3(0x172))/0x5+parseInt(_0x1b4ed3(0x170))/0x6+parseInt(_0x1b4ed3(0x16f))/0x7*(parseInt(_0x1b4ed3(0x16c))/0x8)+-parseInt(_0x1b4ed3(0x16d))/0x9*(-parseInt(_0x1b4ed3(0x173))/0xa);if(_0x11b25c===_0x59eb3e)break;else _0x3109ad['push'](_0x3109ad['shift']());}catch(_0x41c230){_0x3109ad['push'](_0x3109ad['shift']());}}}(a98_0x3d0f,0xb2c5e));import{deploymentSync}from'../../commands/deployment/sync.js';export const deploymentDefinitions=[deploymentSync];function a98_0x3d0f(){const _0x6e65d9=['3516mlLwVX','606924wjFEOY','160HCBElc','18exiBLk','1131834xjtmvC','24829bfsmwz','405282YQOFOK','2436xzooyS','2915115fqDFVX','6457070YhhLLv'];a98_0x3d0f=function(){return _0x6e65d9;};return a98_0x3d0f();}
|