@lovrabet/rabetbase-cli 2.5.2 → 2.5.3-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.d.ts +1 -1
- package/lib/api/generate-api-file.js +1 -1
- package/lib/api/generate-sdk-config-file.d.ts +2 -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.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.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/index.js +1 -1
- package/lib/commands/deployment/sync-all.js +1 -1
- package/lib/commands/deployment/sync-jobs.js +1 -1
- package/lib/commands/deployment/sync-status.js +1 -1
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/instant-api-policy/current.js +1 -1
- package/lib/commands/instant-api-policy/index.js +1 -1
- package/lib/commands/instant-api-policy/init.js +1 -1
- package/lib/commands/instant-api-policy/publish.js +1 -1
- package/lib/commands/instant-api-policy/pull.js +1 -1
- package/lib/commands/instant-api-policy/revision.js +1 -1
- package/lib/commands/instant-api-policy/revisions.js +1 -1
- package/lib/commands/instant-api-policy/rollback.js +1 -1
- package/lib/commands/instant-api-policy/shared.js +1 -1
- package/lib/commands/instant-api-policy/validate.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/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.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.js +1 -1
- 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.js +1 -1
- package/lib/commands/rule/index.js +1 -1
- package/lib/commands/rule/list.js +1 -1
- package/lib/commands/rule/set.js +1 -1
- package/lib/commands/rule/shared.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/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/domain-config.js +1 -1
- package/lib/config/project-domain-routing.js +1 -1
- package/lib/config/region-config.d.ts +23 -0
- package/lib/config/region-config.js +1 -0
- package/lib/config/schema.d.ts +15 -0
- 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/region.js +1 -1
- package/lib/constant/risk.js +1 -1
- package/lib/constant/routing-profile.js +1 -1
- package/lib/context/app-resolver.d.ts +6 -0
- 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 +13 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +2 -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/instant-api-policy/config.js +1 -1
- package/lib/core/kb-search-client.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/page/lr-smart-jsx.d.ts +6 -0
- package/lib/core/page/lr-smart-jsx.js +1 -0
- 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/supported-flags.js +1 -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.js +1 -1
- package/lib/generated/routing-contract.js +1 -1
- 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 +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.d.ts +2 -8
- 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.d.ts +2 -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
- package/skills/rabetbase/SKILL.md +6 -5
- package/skills/rabetbase/guides/page-development-workflow.md +3 -0
- package/skills/rabetbase/guides/sdk-client-generation.md +5 -5
- package/skills/rabetbase/knowledge/page-schema/LrSmartJsx.md +11 -3
- package/skills/rabetbase/references/rabetbase-api-pull.md +5 -4
- package/skills/rabetbase/references/rabetbase-app-list.md +3 -0
- package/skills/rabetbase/references/rabetbase-bff-list.md +1 -1
- package/skills/rabetbase/references/rabetbase-bff-pull.md +2 -0
- package/skills/rabetbase/references/rabetbase-bff-status.md +2 -0
- package/skills/rabetbase/references/rabetbase-config.md +10 -9
- package/skills/rabetbase/references/rabetbase-doctor.md +2 -2
- package/skills/rabetbase/references/rabetbase-page-push.md +5 -1
- package/skills/rabetbase/references/rabetbase-workspace.md +4 -2
- package/skills/rabetbase.manifest.json +3 -3
- package/templates/generate-api/client.ts.tpl +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a80_0x30d1(_0x5559fe,_0x19b693){_0x5559fe=_0x5559fe-0x150;const _0x347117=a80_0x3471();let _0x30d123=_0x347117[_0x5559fe];return _0x30d123;}function a80_0x3471(){const _0x333a75=['analyze-batch-plan','\x20serial\x20batch(es)\x20for\x20db\x20link\x20','1982830upkEbm','200qxKBUO','str','421330yuLfFB','batchCount','42kCPUeO','3uPPrdu','\x20minute(s)\x20at\x20','read','1976412OfZSWR','1WIlVAx','\x20seconds\x20per\x20table;\x20no\x20server\x20task\x20or\x20planId\x20was\x20created','2939814nVyEZu','Comma-separated\x20table\x20names\x20to\x20split\x20into\x20safe\x20serial\x20batches','string','1623180KDLKbP','planningEstimate','Preview\x20deterministic\x20local\x20batches\x20and\x20heuristic\x20duration\x20estimates\x20without\x20creating\x20a\x20server\x20task\x20or\x20planId','num','tables','22vFlVFg','tableCount','2116534PjRPzh','Prepared\x20local\x20batch\x20plan\x20for\x20','149065ftuEvZ'];a80_0x3471=function(){return _0x333a75;};return a80_0x3471();}const a80_0x393848=a80_0x30d1;(function(_0x53e70e,_0x46fd01){const _0x45b1ff=a80_0x30d1,_0x4f0e93=_0x53e70e();while(!![]){try{const _0x243b37=-parseInt(_0x45b1ff(0x151))/0x1*(-parseInt(_0x45b1ff(0x15d))/0x2)+-parseInt(_0x45b1ff(0x168))/0x3*(-parseInt(_0x45b1ff(0x156))/0x4)+-parseInt(_0x45b1ff(0x165))/0x5*(parseInt(_0x45b1ff(0x167))/0x6)+-parseInt(_0x45b1ff(0x15f))/0x7*(parseInt(_0x45b1ff(0x163))/0x8)+parseInt(_0x45b1ff(0x153))/0x9+parseInt(_0x45b1ff(0x162))/0xa+parseInt(_0x45b1ff(0x15b))/0xb*(-parseInt(_0x45b1ff(0x150))/0xc);if(_0x243b37===_0x46fd01)break;else _0x4f0e93['push'](_0x4f0e93['shift']());}catch(_0x3c818a){_0x4f0e93['push'](_0x4f0e93['shift']());}}}(a80_0x3471,0x83308));import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildAnalysisBatchPlan,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';export const dbAnalyzeBatchPlan={'service':'db','command':a80_0x393848(0x160),'description':a80_0x393848(0x158),'risk':a80_0x393848(0x16a),'requiresAuth':![],'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a80_0x393848(0x15a),'type':a80_0x393848(0x155),'required':!![],'description':a80_0x393848(0x154)}],async 'execute'(_0x2e6d8a){const _0x1ff97a=a80_0x393848,_0x27f01c=_0x2e6d8a[_0x1ff97a(0x159)]('id'),_0x27c044=normalizeAnalysisTableNames(_0x2e6d8a[_0x1ff97a(0x164)](_0x1ff97a(0x15a))),_0x440761=buildAnalysisBatchPlan(_0x27f01c,_0x27c044);return{'ok':!![],'data':_0x440761,'message':_0x1ff97a(0x15e)+_0x440761[_0x1ff97a(0x15c)]+'\x20table(s)\x20in\x20'+_0x440761[_0x1ff97a(0x166)]+_0x1ff97a(0x161)+_0x27f01c+';\x20estimated\x20about\x20'+_0x440761[_0x1ff97a(0x157)]['estimatedTotalMinutes']+_0x1ff97a(0x169)+_0x440761[_0x1ff97a(0x157)]['assumedSecondsPerTable']+_0x1ff97a(0x152)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a81_0x52e4(_0x1b5754,_0x3eef16){_0x1b5754=_0x1b5754-0x1d0;const _0x35ddf7=a81_0x35dd();let _0x52e4f3=_0x35ddf7[_0x1b5754];return _0x52e4f3;}const a81_0x56c9d9=a81_0x52e4;(function(_0x4b3f22,_0x554eea){const _0x3b92b5=a81_0x52e4,_0x957d9=_0x4b3f22();while(!![]){try{const _0x4953d5=parseInt(_0x3b92b5(0x1d1))/0x1*(parseInt(_0x3b92b5(0x1d4))/0x2)+parseInt(_0x3b92b5(0x1d3))/0x3*(parseInt(_0x3b92b5(0x1e0))/0x4)+-parseInt(_0x3b92b5(0x1d7))/0x5*(-parseInt(_0x3b92b5(0x1d0))/0x6)+parseInt(_0x3b92b5(0x1d9))/0x7+-parseInt(_0x3b92b5(0x1e2))/0x8*(parseInt(_0x3b92b5(0x1d5))/0x9)+parseInt(_0x3b92b5(0x1d6))/0xa*(parseInt(_0x3b92b5(0x1da))/0xb)+parseInt(_0x3b92b5(0x1d8))/0xc*(-parseInt(_0x3b92b5(0x1db))/0xd);if(_0x4953d5===_0x554eea)break;else _0x957d9['push'](_0x957d9['shift']());}catch(_0xd70133){_0x957d9['push'](_0x957d9['shift']());}}}(a81_0x35dd,0x74e1c));function a81_0x35dd(){const _0x20a13c=['8AgEQop','Cancel\x20requested\x20for\x20plan\x20','1470eiHSJB','2483EVjeqA','num','159BgJMRA','26ibPgyD','8302419sCuoar','659930VXDyJT','15185yMODOS','84pdciBX','4604096ZRYDgi','99CFBWQg','2718287wiSJzI','analyze-cancel','Cancel\x20an\x20existing\x20schema\x20analysis\x20by\x20explicit\x20plan\x20/\x20trace\x20id','Existing\x20analysis\x20plan\x20/\x20trace\x20id\x20to\x20cancel','str','63164YjMySd','write'];a81_0x35dd=function(){return _0x20a13c;};return a81_0x35dd();}import{cancelDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':a81_0x56c9d9(0x1dc),'description':a81_0x56c9d9(0x1dd),'risk':a81_0x56c9d9(0x1e1),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'plan','type':'string','required':!![],'description':a81_0x56c9d9(0x1de)}],async 'execute'(_0x2d1578){const _0x523b01=a81_0x56c9d9,_0x369c69=_0x2d1578[_0x523b01(0x1d2)]('id'),_0x41c674=_0x2d1578[_0x523b01(0x1df)]('plan');return await cancelDbAnalysis(_0x41c674),{'ok':!![],'data':{'dbLinkId':_0x369c69,'planId':_0x41c674},'message':_0x523b01(0x1e3)+_0x41c674};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x1d0983=a82_0x3197;(function(_0x54b074,_0x1ff9a6){const _0xca5435=a82_0x3197,_0x2c81ef=_0x54b074();while(!![]){try{const _0x466de1=-parseInt(_0xca5435(0x113))/0x1*(-parseInt(_0xca5435(0x104))/0x2)+-parseInt(_0xca5435(0x10c))/0x3*(-parseInt(_0xca5435(0x114))/0x4)+parseInt(_0xca5435(0xfb))/0x5*(parseInt(_0xca5435(0xfd))/0x6)+-parseInt(_0xca5435(0x10e))/0x7+parseInt(_0xca5435(0xfc))/0x8*(parseInt(_0xca5435(0x110))/0x9)+-parseInt(_0xca5435(0x112))/0xa+-parseInt(_0xca5435(0x10d))/0xb;if(_0x466de1===_0x1ff9a6)break;else _0x2c81ef['push'](_0x2c81ef['shift']());}catch(_0x49db29){_0x2c81ef['push'](_0x2c81ef['shift']());}}}(a82_0x5732,0x36fa8));import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a82_0x5732(){const _0x336777=['12bGNRUl','\x20bytes.\x20Run\x20`','analyze-start','Started\x20analysis\x20for\x20db\x20link\x20','\x20bytes,\x20limit\x20','flag','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','308620XRjLVy','num','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','Targeted\x20database\x20analysis\x20payload\x20is\x20too\x20large:\x20','At\x20least\x20one\x20table\x20name\x20is\x20required\x20when\x20--tables\x20is\x20provided.','tables','str','write','6WkmsnK','8825652dgNUAQ','27083fwbITK','validation','7083OOLQdX','length','2233780oBitZq','1lVwkLx','842236vjuLzS','appCode','\x20table(s),\x20','834625fxHDPn','3512nHBBsR'];a82_0x5732=function(){return _0x336777;};return a82_0x5732();}import{buildDbPageLinks}from'../../commands/db/shared.js';import{DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,measureAnalysisInputParamsBytes,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';import{CLI_BIN_NAME}from'../../constant/cli.js';function a82_0x3197(_0x38b571,_0x351456){_0x38b571=_0x38b571-0xf9;const _0x5732f3=a82_0x5732();let _0x319766=_0x5732f3[_0x38b571];return _0x319766;}import{CliErrors}from'../../errors.js';export const dbAnalyzeStart={'service':'db','command':a82_0x1d0983(0xff),'description':a82_0x1d0983(0x103),'risk':a82_0x1d0983(0x10b),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a82_0x1d0983(0x109),'type':'string','description':a82_0x1d0983(0x106)}],async 'execute'(_0x240a1e){const _0x180f14=a82_0x1d0983,_0x4ff88d=_0x240a1e[_0x180f14(0x105)]('id'),_0xb38908=_0x240a1e[_0x180f14(0x10a)](_0x180f14(0x109)),_0x100aac=_0x240a1e[_0x180f14(0x102)](_0x180f14(0x109))!==undefined,_0x68f74a=_0x100aac?normalizeAnalysisTableNames(_0xb38908):undefined;if(_0x68f74a&&_0x68f74a[_0x180f14(0x111)]===0x0)throw CliErrors[_0x180f14(0x10f)](_0x180f14(0x108));if(_0x68f74a&&_0x68f74a[_0x180f14(0x111)]>0x0){const _0x1435c2=measureAnalysisInputParamsBytes(_0x4ff88d,_0x68f74a);if(_0x1435c2>DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES)throw CliErrors[_0x180f14(0x10f)](_0x180f14(0x107)+_0x68f74a[_0x180f14(0x111)]+_0x180f14(0xfa)+_0x1435c2+_0x180f14(0x101)+DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES+_0x180f14(0xfe)+CLI_BIN_NAME+'\x20db\x20analyze-batch-plan\x20--id\x20'+_0x4ff88d+'\x20--tables\x20<tables>`\x20and\x20start\x20each\x20batch\x20serially.');}const {planId:_0x3ac813,estimatedMinutes:_0x402bf5,estimatedDurationDesc:_0x1aabe8}=await startDbAnalysis(_0x4ff88d,_0x68f74a),_0x506ee9=buildDbPageLinks(_0x240a1e[_0x180f14(0xf9)],_0x4ff88d);return{'ok':!![],'data':{'dbLinkId':_0x4ff88d,'planId':_0x3ac813,'tableNames':_0x68f74a??[],'serverEstimate':{'estimatedMinutes':_0x402bf5,'estimatedDurationDesc':_0x1aabe8},..._0x506ee9?{'links':_0x506ee9}:{}},'message':_0x180f14(0x100)+_0x4ff88d};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a83_0x48f421=a83_0x2277;(function(_0x201625,_0x40b055){const _0x5187eb=a83_0x2277,_0x248231=_0x201625();while(!![]){try{const _0x4c1700=parseInt(_0x5187eb(0x114))/0x1*(parseInt(_0x5187eb(0xfb))/0x2)+parseInt(_0x5187eb(0x121))/0x3+parseInt(_0x5187eb(0x117))/0x4+parseInt(_0x5187eb(0x11b))/0x5*(parseInt(_0x5187eb(0xff))/0x6)+-parseInt(_0x5187eb(0x122))/0x7*(-parseInt(_0x5187eb(0x11d))/0x8)+-parseInt(_0x5187eb(0x115))/0x9*(-parseInt(_0x5187eb(0x100))/0xa)+-parseInt(_0x5187eb(0x123))/0xb;if(_0x4c1700===_0x40b055)break;else _0x248231['push'](_0x248231['shift']());}catch(_0x4aa99e){_0x248231['push'](_0x248231['shift']());}}}(a83_0x5597,0xab8be));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_0x48f421(0x110),'PARTIAL_SUCCESS',a83_0x48f421(0xf8),a83_0x48f421(0xfd)]);export const dbAnalyzeStatus={'service':'db','command':'analyze-status','description':a83_0x48f421(0x11a),'risk':a83_0x48f421(0xf9),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a83_0x48f421(0x11f),'type':a83_0x48f421(0x127),'required':!![],'description':a83_0x48f421(0xfc)}],async 'execute'(_0x1621de){const _0x2cc880=a83_0x48f421,_0x2bee10=_0x1621de['num']('id'),_0x356095=_0x1621de[_0x2cc880(0x111)](_0x2cc880(0x11f)),_0xa6fb86=await getDbAnalysisStatus(_0x356095),_0x5abab6=TERMINAL_STATUSES[_0x2cc880(0x11c)](_0xa6fb86[_0x2cc880(0x112)]??''),{parsedJobContext:_0xdff7fc,jobContextParseWarning:_0xf81409}=parseJobContext(_0xa6fb86[_0x2cc880(0xfa)]),{requestedAnalysis:_0x30065a,requestedAnalysisParseWarning:_0x1a3308}=parseRequestedAnalysis(_0xa6fb86[_0x2cc880(0x126)]),_0x14d0fb=readAccumulatedErrorTypeCounts(_0xdff7fc),_0x40cf1d=calculateAttemptElapsedMs(_0xa6fb86,_0x5abab6),_0x10324a=calculateElapsedFromStart(_0xa6fb86[_0x2cc880(0x124)],_0xa6fb86[_0x2cc880(0x108)],_0x5abab6),_0xf55b6c=detectMultipleAttempts(_0xa6fb86),_0x39548f=buildDbPageLinks(_0x1621de[_0x2cc880(0xfe)],_0x2bee10);return{'ok':!![],'data':{'dbLinkId':_0x2bee10,'planId':_0x356095,'status':_0xa6fb86,'requestedAnalysis':_0x30065a,'requestedAnalysisParseWarning':_0x1a3308,'parsedJobContext':_0xdff7fc,'accumulatedErrorTypeCounts':_0x14d0fb,'accumulatedErrorTypeCountsAdvisory':_0x14d0fb?_0x2cc880(0x101):'Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','isTerminal':_0x5abab6,'isRetrying':_0xa6fb86[_0x2cc880(0x112)]==='RETRYING','attemptElapsedMs':_0x40cf1d,'totalElapsedMs':_0x10324a,'hasMultipleAttempts':_0xf55b6c,'jobContextParseWarning':_0xf81409,..._0x39548f?{'links':_0x39548f}:{}},'message':_0x2cc880(0x10c)+_0x356095};}};function parseRequestedAnalysis(_0x425418){const _0x490e0f=a83_0x48f421,_0x281094={'mode':_0x490e0f(0x10e),'tableCount':null,'tableNames':null};if(!_0x425418?.[_0x490e0f(0x120)]())return{'requestedAnalysis':_0x281094,'requestedAnalysisParseWarning':_0x490e0f(0x109)};try{const _0x321f45=JSON[_0x490e0f(0x102)](_0x425418);if(!_0x321f45||typeof _0x321f45!==_0x490e0f(0x10f)||Array['isArray'](_0x321f45))throw new Error(_0x490e0f(0xf7));const _0x342bd7=_0x321f45[_0x490e0f(0x10b)];if(_0x342bd7===undefined||_0x342bd7===null)return{'requestedAnalysis':{'mode':_0x490e0f(0x10d),'tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array[_0x490e0f(0x11e)](_0x342bd7)&&_0x342bd7[_0x490e0f(0x119)](_0x553933=>typeof _0x553933===_0x490e0f(0x127)))return{'requestedAnalysis':{'mode':_0x342bd7[_0x490e0f(0x116)]>0x0?_0x490e0f(0x106):_0x490e0f(0x10d),'tableCount':_0x342bd7[_0x490e0f(0x116)],'tableNames':_0x342bd7},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0x281094,'requestedAnalysisParseWarning':_0x490e0f(0x104)};}function a83_0x2277(_0x418d69,_0x421f51){_0x418d69=_0x418d69-0xf7;const _0x5597f3=a83_0x5597();let _0x2277c9=_0x5597f3[_0x418d69];return _0x2277c9;}function readAccumulatedErrorTypeCounts(_0xa4f738){const _0xafcb0b=a83_0x48f421,_0x2ad12f=_0xa4f738?.['accumulatedErrorTypeCounts'];if(!_0x2ad12f||typeof _0x2ad12f!==_0xafcb0b(0x10f)||Array[_0xafcb0b(0x11e)](_0x2ad12f))return null;if(Object[_0xafcb0b(0x125)](_0x2ad12f)[_0xafcb0b(0x116)]===0x0)return null;return _0x2ad12f;}function parseJobContext(_0x5bdbf5){const _0x55df49=a83_0x48f421;if(!_0x5bdbf5?.['trim']())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x5b6a05=JSON[_0x55df49(0x102)](_0x5bdbf5);if(_0x5b6a05&&typeof _0x5b6a05==='object'&&!Array[_0x55df49(0x11e)](_0x5b6a05))return{'parsedJobContext':_0x5b6a05,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':'jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.'};}function a83_0x5597(){const _0xc46dbb=['81WRdblb','length','1315932DQKRlJ','startTime','every','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','10GCWofX','has','134432niIeqz','isArray','plan','trim','238269TvowRl','266MSoVCF','30721372KnoFwI','firstStartTime','keys','inputParams','string','inputParams\x20is\x20not\x20an\x20object','FAILED','read','jobContext','5488UYBtZw','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','CANCELLED','appCode','3184380VTEdda','742400HVcfoc','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','parse','isNaN','inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.','number','TARGETED','costTimeMs','endTime','Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.','now','tableNames','Analysis\x20status\x20for\x20','FULL','UNKNOWN','object','SUCCESS','str','status','isFinite','262ygWleH'];a83_0x5597=function(){return _0xc46dbb;};return a83_0x5597();}function calculateAttemptElapsedMs(_0x55590c,_0x5d772d){const _0x3e5d57=a83_0x48f421;if(typeof _0x55590c[_0x3e5d57(0x107)]===_0x3e5d57(0x105)&&Number['isFinite'](_0x55590c['costTimeMs'])&&_0x55590c[_0x3e5d57(0x107)]>=0x0)return _0x55590c[_0x3e5d57(0x107)];return calculateElapsedFromStart(_0x55590c[_0x3e5d57(0x118)],_0x55590c['endTime'],_0x5d772d);}function calculateElapsedFromStart(_0x30b295,_0x110558,_0x4240a5){const _0x199537=a83_0x48f421,_0x1fa284=toTimestamp(_0x30b295);if(_0x1fa284===null)return null;const _0x50ba95=toTimestamp(_0x110558),_0x36322c=_0x50ba95??(_0x4240a5?null:Date[_0x199537(0x10a)]());if(_0x36322c===null||_0x36322c<_0x1fa284)return null;return _0x36322c-_0x1fa284;}function detectMultipleAttempts(_0x146af4){const _0x102540=a83_0x48f421,_0x552752=toTimestamp(_0x146af4[_0x102540(0x124)]),_0xc7a1ed=toTimestamp(_0x146af4[_0x102540(0x118)]);return _0x552752!==null&&_0xc7a1ed!==null&&_0x552752!==_0xc7a1ed;}function toTimestamp(_0x8400){const _0xbf574c=a83_0x48f421;if(typeof _0x8400===_0xbf574c(0x105))return Number[_0xbf574c(0x113)](_0x8400)?_0x8400:null;if(typeof _0x8400!=='string'||_0x8400['trim']()==='')return null;const _0x3a9460=Number(_0x8400);if(Number[_0xbf574c(0x113)](_0x3a9460))return _0x3a9460;const _0x2be1c9=Date[_0xbf574c(0x102)](_0x8400);return Number[_0xbf574c(0x103)](_0x2be1c9)?null:_0x2be1c9;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a84_0x91ef15=a84_0x259e;function a84_0x3f3b(){const _0x10187a=['4KeKKje','write','dbname','boolean','/smartapi/dblink/create','Database\x20username','Host\x20and\x20port:\x20host:port','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','74013wcKOTw','str','No\x20follow-up\x20analysis','message','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','2736BOgZMM','dbversion','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','username','855Zwlkuv','dbtype','string','trim','7910298ojRZHV','Created\x20db\x20link\x20','skip-connection-test',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','databasePage','4880QXWIFU','password','appCode','21606MpIYbf','autostart','dburl','8.0','13190hiKzux','dbparam','Create\x20dblink','bool','validation','3269VcyXdb','dbdesc','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id','102320HyVINd','123337WPPWMS','Database\x20password','planId','POST','Human-readable\x20description'];a84_0x3f3b=function(){return _0x10187a;};return a84_0x3f3b();}(function(_0xa62f0,_0x28a391){const _0x2c2b67=a84_0x259e,_0x184c91=_0xa62f0();while(!![]){try{const _0x2045b3=-parseInt(_0x2c2b67(0x1f3))/0x1+parseInt(_0x2c2b67(0x1f2))/0x2+-parseInt(_0x2c2b67(0x200))/0x3*(parseInt(_0x2c2b67(0x1f8))/0x4)+parseInt(_0x2c2b67(0x209))/0x5*(-parseInt(_0x2c2b67(0x1e5))/0x6)+parseInt(_0x2c2b67(0x1ee))/0x7*(parseInt(_0x2c2b67(0x1e2))/0x8)+-parseInt(_0x2c2b67(0x205))/0x9*(-parseInt(_0x2c2b67(0x1e9))/0xa)+parseInt(_0x2c2b67(0x20d))/0xb;if(_0x2045b3===_0x28a391)break;else _0x184c91['push'](_0x184c91['shift']());}catch(_0x4d01c0){_0x184c91['push'](_0x184c91['shift']());}}}(a84_0x3f3b,0xa9079));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';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';function a84_0x259e(_0x302269,_0x398bdb){_0x302269=_0x302269-0x1df;const _0x3f3bf7=a84_0x3f3b();let _0x259e5e=_0x3f3bf7[_0x302269];return _0x259e5e;}import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':'create','description':'Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','risk':a84_0x91ef15(0x1f9),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a84_0x91ef15(0x1fa),'type':'string','required':!![],'description':a84_0x91ef15(0x204)},DB_TYPE_FLAG,{'name':a84_0x91ef15(0x206),'type':a84_0x91ef15(0x20b),'description':a84_0x91ef15(0x207),'default':a84_0x91ef15(0x1e8)},{'name':a84_0x91ef15(0x1e7),'type':a84_0x91ef15(0x20b),'required':!![],'description':a84_0x91ef15(0x1fe)},{'name':a84_0x91ef15(0x208),'type':a84_0x91ef15(0x20b),'required':!![],'description':a84_0x91ef15(0x1fd)},{'name':a84_0x91ef15(0x1e3),'type':'string','required':!![],'description':a84_0x91ef15(0x1f4)},{'name':a84_0x91ef15(0x1ea),'type':a84_0x91ef15(0x20b),'description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':'dbdesc','type':a84_0x91ef15(0x20b),'description':a84_0x91ef15(0x1f7)},{'name':a84_0x91ef15(0x1e6),'type':a84_0x91ef15(0x1fb),'description':'After\x20create,\x20start\x20schema\x20analysis','default':![]},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x314161){const _0x4a3904=a84_0x91ef15,_0x553ebb=_0x314161[_0x4a3904(0x201)](_0x4a3904(0x1e7))[_0x4a3904(0x20c)]();if(!validateDbUrl(_0x553ebb))throw CliErrors[_0x4a3904(0x1ed)]('Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22'+_0x553ebb+'\x22',_0x4a3904(0x1ff));},async 'dryRun'(_0x1216ca){const _0x4ea9ae=a84_0x91ef15,_0x223055={'appCode':_0x1216ca['appCode'],'dbName':_0x1216ca['str'](_0x4ea9ae(0x1fa)),'dbType':_0x1216ca[_0x4ea9ae(0x201)](_0x4ea9ae(0x20a)),'dbVersion':_0x1216ca[_0x4ea9ae(0x201)]('dbversion')||_0x4ea9ae(0x1e8),'dbUrl':_0x1216ca[_0x4ea9ae(0x201)](_0x4ea9ae(0x1e7))[_0x4ea9ae(0x20c)](),'username':_0x1216ca[_0x4ea9ae(0x201)]('username'),'password':'[redacted]',..._0x1216ca['str']('dbparam')?{'dbParam':_0x1216ca[_0x4ea9ae(0x201)]('dbparam')}:{},..._0x1216ca[_0x4ea9ae(0x201)](_0x4ea9ae(0x1ef))?{'dbDesc':_0x1216ca[_0x4ea9ae(0x201)](_0x4ea9ae(0x1ef))}:{}};return{'method':_0x4ea9ae(0x1f6),'url':_0x4ea9ae(0x1fc),'body':_0x223055,'description':[_0x4ea9ae(0x1eb),_0x1216ca[_0x4ea9ae(0x1ec)](_0x4ea9ae(0x1e6))?_0x4ea9ae(0x1f1):_0x4ea9ae(0x202)]['join']('\x0a'),'connectionPreflight':{'enabled':!_0x1216ca['bool'](_0x4ea9ae(0x1df)),'executed':![]}};},async 'execute'(_0x1d8612){const _0x2ef942=a84_0x91ef15,_0xadd3ac={'appCode':_0x1d8612['appCode'],'dbName':_0x1d8612[_0x2ef942(0x201)](_0x2ef942(0x1fa)),'dbType':_0x1d8612[_0x2ef942(0x201)]('dbtype'),'dbVersion':_0x1d8612['str'](_0x2ef942(0x206))||_0x2ef942(0x1e8),'dbUrl':_0x1d8612['str'](_0x2ef942(0x1e7))['trim'](),'username':_0x1d8612[_0x2ef942(0x201)]('username'),'password':_0x1d8612[_0x2ef942(0x201)]('password'),..._0x1d8612[_0x2ef942(0x201)](_0x2ef942(0x1ea))?{'dbParam':_0x1d8612[_0x2ef942(0x201)](_0x2ef942(0x1ea))}:{},..._0x1d8612[_0x2ef942(0x201)](_0x2ef942(0x1ef))?{'dbDesc':_0x1d8612['str'](_0x2ef942(0x1ef))}:{}};!_0x1d8612[_0x2ef942(0x1ec)](_0x2ef942(0x1df))&&await assertDbLinkConnectionPreflight(_0xadd3ac);const {id:_0x4bb3a0,entity:_0x230a23}=normalizeEntityWithIdResponse(await createDbLink(_0xadd3ac));if(!_0x4bb3a0)return{'ok':![],'message':_0x2ef942(0x1f0),'data':sanitizeDbLinkForOutput(_0x230a23)};let _0x4bf3e3,_0x1d48d0;if(_0x1d8612['bool'](_0x2ef942(0x1e6)))try{_0x4bf3e3=(await startDbAnalysis(_0x4bb3a0))[_0x2ef942(0x1f5)];}catch(_0x2856da){_0x1d48d0=_0x2856da instanceof Error?_0x2856da[_0x2ef942(0x203)]:String(_0x2856da);}const _0xc1ce2c=buildDbPageLinks(_0x1d8612[_0x2ef942(0x1e4)],_0x4bb3a0),_0x3295be={'connection':sanitizeDbLinkForOutput(_0x230a23),..._0xc1ce2c?{'links':{'databasePage':_0xc1ce2c[_0x2ef942(0x1e1)]}}:{},..._0x4bf3e3?{'analysisPlanId':_0x4bf3e3}:{},..._0x1d48d0?{'analysisStartWarning':_0x1d48d0}:{}};let _0xa8db0c;return _0x1d8612[_0x2ef942(0x1ec)]('autostart')?_0x1d48d0?_0xa8db0c=_0x2ef942(0x20e)+_0x4bb3a0+_0x2ef942(0x1e0):_0xa8db0c=_0x2ef942(0x20e)+_0x4bb3a0+'\x20and\x20started\x20analysis':_0xa8db0c=_0x2ef942(0x20e)+_0x4bb3a0,{'ok':!![],'data':_0x3295be,'message':_0xa8db0c};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a85_0x1be145=a85_0x2432;(function(_0x13e2b4,_0x4c4e5a){const _0x1f9764=a85_0x2432,_0x3ab2fd=_0x13e2b4();while(!![]){try{const _0x33d54f=parseInt(_0x1f9764(0xdd))/0x1*(-parseInt(_0x1f9764(0xcf))/0x2)+parseInt(_0x1f9764(0xe1))/0x3+parseInt(_0x1f9764(0xd2))/0x4+parseInt(_0x1f9764(0xef))/0x5+parseInt(_0x1f9764(0xd6))/0x6+-parseInt(_0x1f9764(0xd4))/0x7+parseInt(_0x1f9764(0xda))/0x8*(parseInt(_0x1f9764(0xd7))/0x9);if(_0x33d54f===_0x4c4e5a)break;else _0x3ab2fd['push'](_0x3ab2fd['shift']());}catch(_0x105f1d){_0x3ab2fd['push'](_0x3ab2fd['shift']());}}}(a85_0x2e7d,0x5d6e5));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':a85_0x1be145(0xd1),'type':a85_0x1be145(0xf3),'description':'Confirm\x20deletion\x20after\x20reviewing\x20the\x20active\x20Dataset\x20count'},EXPECTED_DATASET_COUNT_FLAG={'name':a85_0x1be145(0xf2),'type':a85_0x1be145(0xd3),'description':a85_0x1be145(0xe8)};export const dbDelete={'service':'db','command':a85_0x1be145(0xe6),'description':a85_0x1be145(0xe5),'risk':'high-risk-write','flags':[DBLINK_ID_FLAG,CONFIRM_FLAG,EXPECTED_DATASET_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'dryRun'(_0x402da7){const _0x2328e4=a85_0x1be145,_0x4badd1=await loadDeleteImpact(_0x402da7);return assertExpectedDatasetCount(_0x402da7,_0x4badd1[_0x2328e4(0xd8)][_0x2328e4(0xe0)]),{'method':_0x2328e4(0xeb),'url':'/smartapi/dblink/delete','body':{'id':_0x4badd1['id']},'description':_0x4badd1[_0x2328e4(0xd8)][_0x2328e4(0xe0)]>0x0?'Deletion\x20is\x20blocked\x20by\x20'+_0x4badd1[_0x2328e4(0xd8)]['activeDatasetCount']+_0x2328e4(0xdc):_0x2328e4(0xed),..._0x4badd1};},async 'execute'(_0x4bda54){const _0x41fce4=a85_0x1be145;if(!_0x4bda54[_0x41fce4(0xf4)](_0x41fce4(0xd1)))throw CliErrors[_0x41fce4(0xf0)](_0x41fce4(0xf1),_0x41fce4(0xd9));const _0x3ba82f=_0x4bda54['num']('id'),_0x5a2e64=await loadDeleteImpact(_0x4bda54),_0x5aa6c6=_0x5a2e64[_0x41fce4(0xd8)][_0x41fce4(0xe0)];assertExpectedDatasetCount(_0x4bda54,_0x5aa6c6);if(_0x5aa6c6>0x0)throw CliErrors[_0x41fce4(0xf0)](_0x41fce4(0xde)+_0x3ba82f+_0x41fce4(0xd5)+_0x5aa6c6+_0x41fce4(0xea),_0x41fce4(0xd0));return await deleteDbLink(_0x3ba82f),{'ok':!![],'data':{'id':_0x3ba82f,'deleted':!![],'activeDatasetCount':_0x5aa6c6},'message':_0x41fce4(0xe4)+_0x3ba82f};}};async function loadDeleteImpact(_0x141d2c){const _0x1bf476=a85_0x1be145,_0x5e84e8=_0x141d2c[_0x1bf476(0xe9)]('id'),[_0x4cad2f,_0x4c7ec6]=await Promise['all']([getDbLinkInfo(_0x5e84e8),listDatasets(_0x141d2c['appCode'],{'source':'DB_TABLE'})]),_0x1bf0d1=buildDbDatasetDependency(_0x4cad2f,_0x4c7ec6);return{'id':_0x5e84e8,'connection':sanitizeDbLinkForOutput(_0x4cad2f),'datasetDependency':_0x1bf0d1[_0x1bf476(0xd8)],'activeDatasetCount':_0x1bf0d1[_0x1bf476(0xd8)][_0x1bf476(0xe0)],'datasets':_0x1bf0d1[_0x1bf476(0xe2)]};}function a85_0x2432(_0x3fc80a,_0x33c01d){_0x3fc80a=_0x3fc80a-0xcf;const _0x2e7d1c=a85_0x2e7d();let _0x24329b=_0x2e7d1c[_0x3fc80a];return _0x24329b;}function a85_0x2e7d(){const _0x49c267=['32138CCKiEf','Delete\x20or\x20migrate\x20the\x20listed\x20DB_TABLE\x20Datasets\x20first.\x20There\x20is\x20no\x20force\x20bypass.','confirm','2274264zIlqSk','number','1316322GSoOvz','\x20still\x20has\x20','3133602NgkvaF','54477ApeVwj','datasetDependency','Run\x20with\x20--dry-run\x20first\x20and\x20verify\x20the\x20active\x20Dataset\x20count.','40IhREkp','Run\x20--dry-run\x20again\x20and\x20review\x20the\x20current\x20dependencies.','\x20active\x20DB_TABLE\x20Dataset(s).','47LvSiZk','Database\x20connection\x20','flag','activeDatasetCount','507888YwNNwp','datasets','isInteger','Deleted\x20db\x20link\x20','Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','delete','--expected-dataset-count\x20must\x20be\x20a\x20non-negative\x20integer.','Abort\x20unless\x20the\x20active\x20DB_TABLE\x20Dataset\x20count\x20equals\x20this\x20value','num','\x20active\x20Dataset(s);\x20deletion\x20is\x20blocked.','POST','\x20active\x20Dataset(s),\x20but\x20found\x20','Would\x20logically\x20delete\x20this\x20dependency-free\x20database\x20connection\x20after\x20--confirm.','Expected\x20','177940PmHzES','validation','--confirm\x20is\x20required\x20to\x20delete\x20a\x20database\x20connection.','expected-dataset-count','boolean','bool'];a85_0x2e7d=function(){return _0x49c267;};return a85_0x2e7d();}function assertExpectedDatasetCount(_0x1ca913,_0xcc5b6d){const _0x3c1748=a85_0x1be145,_0x4d0ad0=_0x1ca913[_0x3c1748(0xdf)](_0x3c1748(0xf2));if(_0x4d0ad0===undefined||_0x4d0ad0==='')return;const _0x322303=_0x1ca913[_0x3c1748(0xe9)](_0x3c1748(0xf2));if(!Number[_0x3c1748(0xe3)](_0x322303)||_0x322303<0x0)throw CliErrors[_0x3c1748(0xf0)](_0x3c1748(0xe7));if(_0x322303!==_0xcc5b6d)throw CliErrors[_0x3c1748(0xf0)](_0x3c1748(0xee)+_0x322303+_0x3c1748(0xec)+_0xcc5b6d+'.',_0x3c1748(0xdb));}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a86_0x1b96a9=a86_0x5f30;(function(_0xb7cd56,_0xb14a93){const _0x3c6573=a86_0x5f30,_0x145fa2=_0xb7cd56();while(!![]){try{const _0x18b6f4=parseInt(_0x3c6573(0x177))/0x1*(parseInt(_0x3c6573(0x184))/0x2)+parseInt(_0x3c6573(0x180))/0x3*(-parseInt(_0x3c6573(0x17b))/0x4)+parseInt(_0x3c6573(0x183))/0x5+-parseInt(_0x3c6573(0x176))/0x6+-parseInt(_0x3c6573(0x179))/0x7*(-parseInt(_0x3c6573(0x182))/0x8)+-parseInt(_0x3c6573(0x17c))/0x9*(parseInt(_0x3c6573(0x17f))/0xa)+parseInt(_0x3c6573(0x185))/0xb*(-parseInt(_0x3c6573(0x175))/0xc);if(_0x18b6f4===_0xb14a93)break;else _0x145fa2['push'](_0x145fa2['shift']());}catch(_0xc42733){_0x145fa2['push'](_0x145fa2['shift']());}}}(a86_0x59a6,0x61cb2));function a86_0x59a6(){const _0x26bbfc=['3145746uizbaP','226fXWgOc','read','143059WqKmpO','DB_TABLE','2624084AWvYQp','9EAcOpt','appCode','db\x20link\x20','847910kdLppJ','3nzxdRI','num','248grdhNf','3934510THHFyH','4964OVEZAf','868219pRZtLu','datasetDependency','48HfbriH'];a86_0x59a6=function(){return _0x26bbfc;};return a86_0x59a6();}import{getDbLinkInfo,listDatasets}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a86_0x5f30(_0x40225b,_0x181f03){_0x40225b=_0x40225b-0x174;const _0x59a69c=a86_0x59a6();let _0x5f3002=_0x59a69c[_0x40225b];return _0x5f3002;}import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':'detail','description':'Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','risk':a86_0x1b96a9(0x178),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x2343f8){const _0x1883e4=a86_0x1b96a9,_0x4334e4=_0x2343f8[_0x1883e4(0x181)]('id'),_0xe4872a=await getDbLinkInfo(_0x4334e4),_0x47be11=await listDatasets(_0xe4872a[_0x1883e4(0x17d)]||_0x2343f8[_0x1883e4(0x17d)],{'source':_0x1883e4(0x17a)}),_0x5b2e14=buildDbDatasetDependency(_0xe4872a,_0x47be11);return{'ok':!![],'data':{...sanitizeDbLinkForOutput(_0xe4872a),'datasetDependency':_0x5b2e14[_0x1883e4(0x174)]},'message':_0x1883e4(0x17e)+_0x4334e4+':\x20'+_0xe4872a['dbName']};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a87_0x58fb29=a87_0x2d4a;(function(_0x22926d,_0x3eb65c){const _0x5835a7=a87_0x2d4a,_0x3054c0=_0x22926d();while(!![]){try{const _0x49a09c=parseInt(_0x5835a7(0x1db))/0x1+-parseInt(_0x5835a7(0x1d1))/0x2*(-parseInt(_0x5835a7(0x1d3))/0x3)+parseInt(_0x5835a7(0x1e3))/0x4*(-parseInt(_0x5835a7(0x1d8))/0x5)+parseInt(_0x5835a7(0x1e6))/0x6*(parseInt(_0x5835a7(0x1e4))/0x7)+parseInt(_0x5835a7(0x1dd))/0x8+-parseInt(_0x5835a7(0x1d5))/0x9+-parseInt(_0x5835a7(0x1d0))/0xa*(parseInt(_0x5835a7(0x1e1))/0xb);if(_0x49a09c===_0x3eb65c)break;else _0x3054c0['push'](_0x3054c0['shift']());}catch(_0x444ae0){_0x3054c0['push'](_0x3054c0['shift']());}}}(a87_0x2927,0xb98e5));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':a87_0x58fb29(0x1d7),'description':a87_0x58fb29(0x1d4),'risk':a87_0x58fb29(0x1d6),'flags':[DBLINK_ID_FLAG],async 'execute'(_0x40d990){const _0x2076fd=a87_0x58fb29,_0x90581d=_0x40d990[_0x2076fd(0x1e0)]('id'),_0x5ee9c7=await startDbTableDiffRefresh(_0x40d990[_0x2076fd(0x1dc)],_0x90581d),_0x3345a3=_0x5ee9c7[_0x2076fd(0x1e2)]?.[_0x2076fd(0x1df)]();if(!_0x3345a3)throw CliErrors[_0x2076fd(0x1e7)](_0x2076fd(0x1da));return{'ok':!![],'data':{'dbLinkId':_0x90581d,'traceId':_0x3345a3,'status':_0x5ee9c7['status']??null,'query':{'command':CLI_BIN_NAME+_0x2076fd(0x1d9)+_0x90581d+_0x2076fd(0x1d2)+_0x3345a3+_0x2076fd(0x1e5)}},'message':_0x2076fd(0x1de)+_0x90581d};}};function a87_0x2d4a(_0x15bda5,_0x95daeb){_0x15bda5=_0x15bda5-0x1d0;const _0x292779=a87_0x2927();let _0x2d4a41=_0x292779[_0x15bda5];return _0x2d4a41;}function a87_0x2927(){const _0x25c4ad=['132818cBPzQc','\x20--format\x20compress','210QXsRDg','validation','62800Hnpqtt','206AXMySl','\x20--plan\x20','294kCqjFC','Start\x20an\x20asynchronous\x20refresh\x20of\x20the\x20database\x20table-diff\x20result','574974ikUqYX','write','diff-refresh-start','3011735LJyQOs','\x20db\x20diff-refresh-status\x20--id\x20','Table-diff\x20refresh\x20started\x20without\x20a\x20traceId;\x20the\x20request\x20outcome\x20is\x20unknown.\x20Do\x20not\x20submit\x20another\x20refresh\x20automatically.','830332LSamHG','appCode','9166568bCaxJA','Started\x20table-diff\x20refresh\x20for\x20db\x20link\x20','trim','num','1089xbzpUs','traceId','8zZZGal'];a87_0x2927=function(){return _0x25c4ad;};return a87_0x2927();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a88_0x83b98e=a88_0x1825;(function(_0x404af4,_0x4b9b0b){const _0x17198f=a88_0x1825,_0x4f30b9=_0x404af4();while(!![]){try{const _0x5803ed=-parseInt(_0x17198f(0xf0))/0x1*(parseInt(_0x17198f(0xe6))/0x2)+parseInt(_0x17198f(0xf4))/0x3+parseInt(_0x17198f(0xf2))/0x4*(parseInt(_0x17198f(0xdd))/0x5)+-parseInt(_0x17198f(0xe4))/0x6*(parseInt(_0x17198f(0xf5))/0x7)+parseInt(_0x17198f(0xf1))/0x8*(-parseInt(_0x17198f(0xe0))/0x9)+parseInt(_0x17198f(0xf6))/0xa*(parseInt(_0x17198f(0xef))/0xb)+-parseInt(_0x17198f(0xe2))/0xc;if(_0x5803ed===_0x4b9b0b)break;else _0x4f30b9['push'](_0x4f30b9['shift']());}catch(_0x13c4ae){_0x4f30b9['push'](_0x4f30b9['shift']());}}}(a88_0x15d7,0x30185));import{getDbAnalysisStatus}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a88_0x15d7(){const _0x294333=['35CTAdSL','has','Table-diff\x20refresh\x20trace\x20id\x20from\x20diff-refresh-start','55854kGcCsd','string','451176gdTeps','num','768234djIoZI','RETRYING','932HrdeaJ','UNKNOWN','plan','PENDING','CANCELLED','Fetch\x20table-diff\x20refresh\x20status\x20by\x20plan\x20/\x20trace\x20id','read','Table-diff\x20refresh\x20status\x20for\x20','diff-refresh-status','11KdClyC','629lkbmMC','48EnvAJD','216160DiCqix','\x20db\x20diff-refresh-status\x20--id\x20','790791ZzOVIQ','7oRRWEU','511070kkMFZI'];a88_0x15d7=function(){return _0x294333;};return a88_0x15d7();}import{CLI_BIN_NAME}from'../../constant/cli.js';const TERMINAL_STATUSES=new Set(['SUCCESS','FAILED',a88_0x83b98e(0xea)]),RUNNING_STATUSES=new Set([a88_0x83b98e(0xe9),'RUNNING',a88_0x83b98e(0xe5)]);function a88_0x1825(_0xc1d7c,_0x30352e){_0xc1d7c=_0xc1d7c-0xdd;const _0x15d758=a88_0x15d7();let _0x1825a2=_0x15d758[_0xc1d7c];return _0x1825a2;}export const dbDiffRefreshStatus={'service':'db','command':a88_0x83b98e(0xee),'description':a88_0x83b98e(0xeb),'risk':a88_0x83b98e(0xec),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'plan','type':a88_0x83b98e(0xe1),'required':!![],'description':a88_0x83b98e(0xdf)}],async 'execute'(_0x33d0b6){const _0x256346=a88_0x83b98e,_0x1d3482=_0x33d0b6[_0x256346(0xe3)]('id'),_0x4320ff=_0x33d0b6['str'](_0x256346(0xe8)),_0x1e75e0=await getDbAnalysisStatus(_0x4320ff),_0x4c6240=_0x1e75e0['status']??null,_0x52b2d8=TERMINAL_STATUSES[_0x256346(0xde)](_0x4c6240??''),_0x316b15=_0x4c6240==='SUCCESS',_0x3766b1=_0x52b2d8||RUNNING_STATUSES['has'](_0x4c6240??'');return{'ok':!![],'data':{'dbLinkId':_0x1d3482,'planId':_0x4320ff,'status':_0x1e75e0,'knownStatus':_0x3766b1,'isTerminal':_0x52b2d8,'isSuccessful':_0x316b15,'query':_0x3766b1&&!_0x52b2d8?{'command':CLI_BIN_NAME+_0x256346(0xf3)+_0x1d3482+'\x20--plan\x20'+_0x4320ff+'\x20--format\x20compress'}:null},'message':_0x256346(0xed)+_0x4320ff+':\x20'+(_0x4c6240??_0x256346(0xe7))};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function a89_0x358b(){const _0x1ea550=['3762KbCBew','diffType','MODIFIED_TABLE','all','length','1379476WJCzpp','bool','filter','5950BjgnTP','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','map','42SMmRrr','10FeZwWI','tableList','number','9824247OPgSeP','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','read','1318304dRGaBv','str','appCode','table','DELETED_TABLE','\x20changed\x20table\x20row(s),\x20total\x20','datasetTableCount','pagesize','diff','6166NqdSLe','fieldDiff','totalCount','page','Page\x20size','NEW_TABLE','2445377yIiEBQ','tableName','Page\x20index\x20(1-based)','4264665Rzyeah','summary','num','physicalTableCount','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','string','addedColumns','261cdhfNH'];a89_0x358b=function(){return _0x1ea550;};return a89_0x358b();}const a89_0x112673=a89_0x3d01;(function(_0x2b5e3d,_0x410ab5){const _0x502fb6=a89_0x3d01,_0x40d22c=_0x2b5e3d();while(!![]){try{const _0x2f570c=parseInt(_0x502fb6(0x6f))/0x1*(parseInt(_0x502fb6(0x8b))/0x2)+-parseInt(_0x502fb6(0x94))/0x3+parseInt(_0x502fb6(0x75))/0x4+parseInt(_0x502fb6(0x78))/0x5*(parseInt(_0x502fb6(0x70))/0x6)+-parseInt(_0x502fb6(0x7b))/0x7*(parseInt(_0x502fb6(0x82))/0x8)+parseInt(_0x502fb6(0x7f))/0x9*(parseInt(_0x502fb6(0x7c))/0xa)+parseInt(_0x502fb6(0x91))/0xb;if(_0x2f570c===_0x410ab5)break;else _0x40d22c['push'](_0x40d22c['shift']());}catch(_0x4e7ca6){_0x40d22c['push'](_0x40d22c['shift']());}}}(a89_0x358b,0xc3225));import{getDbTableDiff}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function a89_0x3d01(_0x20359a,_0x233a14){_0x20359a=_0x20359a-0x6a;const _0x358be1=a89_0x358b();let _0x3d01ef=_0x358be1[_0x20359a];return _0x3d01ef;}import{DB_TABLE_PAGE_SIZE,getAllDbTableDiff,summarizeDbTableDiff}from'../../commands/db/table-diff-shared.js';export const dbDiff={'service':'db','command':a89_0x112673(0x8a),'description':a89_0x112673(0x80),'risk':a89_0x112673(0x81),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':'table','type':a89_0x112673(0x6d),'description':a89_0x112673(0x6c)},{'name':a89_0x112673(0x8e),'type':'number','description':a89_0x112673(0x93),'default':0x1},{'name':'pagesize','type':a89_0x112673(0x7e),'description':a89_0x112673(0x8f),'default':0x14},{'name':a89_0x112673(0x73),'type':'boolean','description':a89_0x112673(0x79)}],async 'execute'(_0x4ffcb4){const _0x510ac2=a89_0x112673,_0x26910a=_0x4ffcb4[_0x510ac2(0x6a)]('id'),_0x4d4dc7=_0x4ffcb4[_0x510ac2(0x76)]('all'),_0x421e16=_0x4d4dc7?0x1:_0x4ffcb4['num'](_0x510ac2(0x8e),0x1)||0x1,_0x501963=_0x4d4dc7?DB_TABLE_PAGE_SIZE:_0x4ffcb4[_0x510ac2(0x6a)](_0x510ac2(0x89),0x14)||0x14,_0x126cf9=_0x4ffcb4[_0x510ac2(0x83)](_0x510ac2(0x85))||undefined,_0x4339df=_0x4d4dc7?await getAllDbTableDiff(getDbTableDiff,_0x4ffcb4[_0x510ac2(0x84)],_0x26910a,_0x126cf9):await getDbTableDiff(_0x4ffcb4['appCode'],_0x26910a,{'pageIndex':_0x421e16,'pageSize':_0x501963,'tableName':_0x126cf9}),_0x1d9ef4=_0x4339df[_0x510ac2(0x7d)],_0x4002de=summarizeDbTableDiff(_0x1d9ef4),_0x27719e=_0x1d9ef4[_0x510ac2(0x77)](_0x8d75d8=>_0x8d75d8[_0x510ac2(0x71)]===_0x510ac2(0x90)||_0x8d75d8[_0x510ac2(0x71)]===_0x510ac2(0x72))[_0x510ac2(0x7a)](_0x37c5cb=>_0x37c5cb[_0x510ac2(0x92)]),_0x9ecfc2=_0x1d9ef4[_0x510ac2(0x77)](_0x31a800=>_0x31a800[_0x510ac2(0x71)]===_0x510ac2(0x86))[_0x510ac2(0x7a)](_0x3667a0=>_0x3667a0['tableName']),_0x1b1f20=_0x1d9ef4['filter'](_0x1bc7fd=>_0x1bc7fd[_0x510ac2(0x71)]===_0x510ac2(0x72))[_0x510ac2(0x7a)](_0x5b94f4=>({'tableName':_0x5b94f4[_0x510ac2(0x92)],'addedColumns':_0x5b94f4[_0x510ac2(0x8c)]?.[_0x510ac2(0x6e)]??[],'deletedColumns':_0x5b94f4[_0x510ac2(0x8c)]?.['deletedColumns']??[],'modifiedColumns':_0x5b94f4[_0x510ac2(0x8c)]?.['modifiedColumns']??[]}));return{'ok':!![],'data':{'dbLinkId':_0x26910a,'page':_0x421e16,'pageSize':_0x501963,'totalCount':_0x4339df[_0x510ac2(0x8d)],...typeof _0x4339df[_0x510ac2(0x6b)]==='number'?{'physicalTableCount':_0x4339df[_0x510ac2(0x6b)]}:{},...typeof _0x4339df[_0x510ac2(0x88)]==='number'?{'datasetTableCount':_0x4339df[_0x510ac2(0x88)]}:{},..._0x4339df['summary']?{'summary':_0x4339df[_0x510ac2(0x95)]}:{},'summaryByType':_0x4002de,'toAnalyzeTables':_0x27719e,'deletedTables':_0x9ecfc2,'modifiedFieldDiffs':_0x1b1f20,'tables':_0x1d9ef4},'message':_0x1d9ef4[_0x510ac2(0x74)]+_0x510ac2(0x87)+_0x4339df[_0x510ac2(0x8d)]+'\x20(db\x20link\x20'+_0x26910a+')'};}};
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x36d51c,_0x58069d){const _0x450e7d=a90_0x3045,_0x1b1ab6=_0x36d51c();while(!![]){try{const _0x2e5fda=-parseInt(_0x450e7d(0x15c))/0x1*(-parseInt(_0x450e7d(0x15f))/0x2)+-parseInt(_0x450e7d(0x15b))/0x3*(-parseInt(_0x450e7d(0x157))/0x4)+-parseInt(_0x450e7d(0x159))/0x5+parseInt(_0x450e7d(0x15a))/0x6+parseInt(_0x450e7d(0x158))/0x7+-parseInt(_0x450e7d(0x15e))/0x8*(-parseInt(_0x450e7d(0x15d))/0x9)+-parseInt(_0x450e7d(0x156))/0xa;if(_0x2e5fda===_0x58069d)break;else _0x1b1ab6['push'](_0x1b1ab6['shift']());}catch(_0x2e79c5){_0x1b1ab6['push'](_0x1b1ab6['shift']());}}}(a90_0x11d2,0xe3888));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';import{dbCreate}from'../../commands/db/create.js';import{dbUpdate}from'../../commands/db/update.js';import{dbDelete}from'../../commands/db/delete.js';import{dbTest}from'../../commands/db/test.js';import{dbAnalyzeBatchPlan}from'../../commands/db/analyze-batch-plan.js';import{dbAnalyzeStart}from'../../commands/db/analyze-start.js';function a90_0x11d2(){const _0x2b5698=['4654464mxhFkr','986046opsfzj','163MVVvgO','9ODjoTd','9567208aiyAeD','6126ciJpYo','41698830nSzCJX','16KWabqw','9236745StAAeg','16590UlzhXT'];a90_0x11d2=function(){return _0x2b5698;};return a90_0x11d2();}import{dbAnalyzeCancel}from'../../commands/db/analyze-cancel.js';import{dbAnalyzeStatus}from'../../commands/db/analyze-status.js';import{dbTables}from'../../commands/db/tables.js';function a90_0x3045(_0x606f79,_0x2cd3bc){_0x606f79=_0x606f79-0x156;const _0x11d273=a90_0x11d2();let _0x3045e7=_0x11d273[_0x606f79];return _0x3045e7;}import{dbDiff}from'../../commands/db/diff.js';import{dbDiffRefreshStart}from'../../commands/db/diff-refresh-start.js';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];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a91_0x1c3d(_0x5d685d,_0x155145){_0x5d685d=_0x5d685d-0x190;const _0x16083a=a91_0x1608();let _0x1c3d0e=_0x16083a[_0x5d685d];return _0x1c3d0e;}function a91_0x1608(){const _0x1635bd=['DB_TABLE','6963264SILmiG','list','3378hHfkda','4288OmrlEs','1719SpcpPf','1928552GLfyTu','page','\x20database\x20connection(s)','Page\x20index\x20(1-based)','Page\x20size','1643012vUQynz','number','appCode','pagesize','46912daFSLB','3966310Rxnniy','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','5AuNunW','num','length','datasetDependency','273215aFTzIG','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'];a91_0x1608=function(){return _0x1635bd;};return a91_0x1608();}const a91_0x32b4ec=a91_0x1c3d;(function(_0x42709f,_0x24584c){const _0x104550=a91_0x1c3d,_0x1b6987=_0x42709f();while(!![]){try{const _0x3e6937=parseInt(_0x104550(0x1a4))/0x1+parseInt(_0x104550(0x194))/0x2+-parseInt(_0x104550(0x191))/0x3*(parseInt(_0x104550(0x192))/0x4)+parseInt(_0x104550(0x1a0))/0x5*(-parseInt(_0x104550(0x1a7))/0x6)+parseInt(_0x104550(0x199))/0x7+parseInt(_0x104550(0x19d))/0x8*(parseInt(_0x104550(0x193))/0x9)+parseInt(_0x104550(0x19e))/0xa;if(_0x3e6937===_0x24584c)break;else _0x1b6987['push'](_0x1b6987['shift']());}catch(_0x4e2cd1){_0x1b6987['push'](_0x1b6987['shift']());}}}(a91_0x1608,0x97abe));import{listDatasets,listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';import{buildDbDatasetDependency,sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbList={'service':'db','command':a91_0x32b4ec(0x190),'description':a91_0x32b4ec(0x1a5),'risk':'read','flags':[APPCODE_FLAG_OPTIONAL,{'name':'page','type':'number','description':a91_0x32b4ec(0x197),'default':0x1},{'name':a91_0x32b4ec(0x19c),'type':a91_0x32b4ec(0x19a),'description':a91_0x32b4ec(0x198),'default':0x64}],async 'execute'(_0x245015){const _0x26b43c=a91_0x32b4ec,_0x589bfd=_0x245015[_0x26b43c(0x1a1)](_0x26b43c(0x195),0x1)||0x1,_0x138303=_0x245015['num']('pagesize',0x64)||0x64,[{items:_0x5d09e6,paging:_0x4023d2},_0x4cb40b]=await Promise['all']([listDbLinks(_0x245015[_0x26b43c(0x19b)],{'currentPage':_0x589bfd,'pageSize':_0x138303}),listDatasets(_0x245015[_0x26b43c(0x19b)],{'source':_0x26b43c(0x1a6)})]),_0x128376=_0x5d09e6['map'](_0x232238=>({...sanitizeDbLinkForOutput(_0x232238),'datasetDependency':buildDbDatasetDependency(_0x232238,_0x4cb40b)[_0x26b43c(0x1a3)]})),_0x36c602=_0x4023d2?_0x4023d2:{'currentPage':_0x589bfd,'pageSize':_0x138303,'rowsOnPage':_0x128376[_0x26b43c(0x1a2)],'totalCount':null,'note':_0x26b43c(0x19f)};return{'ok':!![],'data':{'connections':_0x128376,'paging':_0x36c602},'message':'Found\x20'+_0x128376[_0x26b43c(0x1a2)]+_0x26b43c(0x196)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x1ecb13,_0x2b05ad){const _0x4c2b88=a92_0xb088,_0x2d461d=_0x1ecb13();while(!![]){try{const _0x23a793=-parseInt(_0x4c2b88(0x1c1))/0x1+-parseInt(_0x4c2b88(0x1bb))/0x2*(-parseInt(_0x4c2b88(0x1ba))/0x3)+parseInt(_0x4c2b88(0x1b8))/0x4+parseInt(_0x4c2b88(0x1c6))/0x5*(parseInt(_0x4c2b88(0x1c4))/0x6)+parseInt(_0x4c2b88(0x1cf))/0x7*(-parseInt(_0x4c2b88(0x1d1))/0x8)+parseInt(_0x4c2b88(0x1c0))/0x9+-parseInt(_0x4c2b88(0x1d4))/0xa;if(_0x23a793===_0x2b05ad)break;else _0x2d461d['push'](_0x2d461d['shift']());}catch(_0x1c0721){_0x2d461d['push'](_0x2d461d['shift']());}}}(a92_0x47df,0xa5caf));import{testDbLinkConfigConnect}from'../../core/api-client.js';import{getAppBaseUrl}from'../../constant/domain.js';import{CliErrors}from'../../errors.js';function shouldRedactKey(_0x4df172){const _0x5bf463=a92_0xb088,_0x58a816=_0x4df172[_0x5bf463(0x1bd)]();if(_0x58a816==='password'||_0x58a816===_0x5bf463(0x1ce)||_0x58a816===_0x5bf463(0x1c3))return!![];if(_0x58a816[_0x5bf463(0x1b9)](_0x5bf463(0x1cb))||_0x58a816[_0x5bf463(0x1b9)](_0x5bf463(0x1bf))||_0x58a816[_0x5bf463(0x1b9)]('credential'))return!![];if(_0x58a816['includes'](_0x5bf463(0x1d5))||_0x58a816['includes']('accesskey'))return!![];if(_0x58a816==='authorization'||_0x58a816===_0x5bf463(0x1be)||_0x58a816==='jdbcurl')return!![];return![];}function a92_0x47df(){const _0x2364cd=['trim','8SnLLUL','number','map','24910190BVIolt','privatekey','tableName','name','isFinite','406896HzNCFl','includes','192jLxaUG','41332XkkNdf','test','toLowerCase','connectionstring','token','12026169nLWKPE','234642QKyQQj','filter','dbpassword','5820NZSzUP','/data/database','6995cQKici','length','hasAvailableDo','dbId','dbtableConfig','secret','The\x20configuration\x20was\x20not\x20saved.\x20Verify\x20the\x20host,\x20credentials,\x20database\x20name,\x20network,\x20and\x20allowlist,\x20or\x20explicitly\x20pass\x20--skip-connection-test.','Database\x20connection\x20preflight\x20failed.','passwd','4990097TdWrni'];a92_0x47df=function(){return _0x2364cd;};return a92_0x47df();}export function sanitizeDbLinkForOutput(_0x11baa2){const _0x40aa16=a92_0xb088,_0x3a8087={..._0x11baa2};delete _0x3a8087[_0x40aa16(0x1c8)];for(const _0x516dbb of Object['keys'](_0x3a8087)){if(!shouldRedactKey(_0x516dbb))continue;const _0x30c9ed=_0x3a8087[_0x516dbb];_0x30c9ed!=null&&String(_0x30c9ed)[_0x40aa16(0x1c7)]>0x0&&(_0x3a8087[_0x516dbb]='[redacted]');}return _0x3a8087;}export function sanitizeDbLinkList(_0x3d5dc2){const _0x2fddb6=a92_0xb088;return _0x3d5dc2[_0x2fddb6(0x1d3)](_0x5afc55=>sanitizeDbLinkForOutput(_0x5afc55));}function a92_0xb088(_0x29a833,_0x59d6a9){_0x29a833=_0x29a833-0x1b7;const _0x47df1c=a92_0x47df();let _0xb0881a=_0x47df1c[_0x29a833];return _0xb0881a;}export function buildDbDatasetDependency(_0x89950,_0x511545){const _0x2ec9cf=a92_0xb088,_0x2ed5b1=_0x511545[_0x2ec9cf(0x1c2)](_0x34390c=>Number(_0x34390c['dbtableConfig']?.[_0x2ec9cf(0x1c9)])===Number(_0x89950['id']))[_0x2ec9cf(0x1d3)](_0x56549e=>({'id':_0x56549e['id'],'code':_0x56549e['code'],'name':_0x56549e[_0x2ec9cf(0x1d7)],..._0x56549e[_0x2ec9cf(0x1ca)]?.[_0x2ec9cf(0x1d6)]?{'tableName':_0x56549e[_0x2ec9cf(0x1ca)][_0x2ec9cf(0x1d6)]}:{}}));return{'datasetDependency':{'hasDependencies':_0x2ed5b1['length']>0x0,'activeDatasetCount':_0x2ed5b1['length']},'datasets':_0x2ed5b1};}export async function assertDbLinkConnectionPreflight(_0x80e82c){const _0x302c76=a92_0xb088,_0xb556bc=await testDbLinkConfigConnect(_0x80e82c);if(_0xb556bc!==!![])throw CliErrors['apiError'](_0x302c76(0x1cd),_0x302c76(0x1cc));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0x473ee4){const _0x2d530c=a92_0xb088,_0xdf0855=_0x473ee4[_0x2d530c(0x1d0)]();if(!_0xdf0855)return![];return DB_URL_PATTERN[_0x2d530c(0x1bc)](_0xdf0855);}export function buildDbPageLinks(_0x453f25,_0x5188b8){const _0x2dce83=a92_0xb088,_0x1c233a=_0x453f25?.[_0x2dce83(0x1d0)]();if(!_0x1c233a)return undefined;const _0x290bda=typeof _0x5188b8===_0x2dce83(0x1d2)?String(_0x5188b8):String(_0x5188b8??'')[_0x2dce83(0x1d0)]();if(!_0x290bda)return undefined;const _0x57e1e4=Number(_0x290bda);if(!Number[_0x2dce83(0x1b7)](_0x57e1e4)||_0x57e1e4<=0x0)return undefined;const _0x3d43f3=getAppBaseUrl(_0x1c233a),_0x5c576d=encodeURIComponent(String(_0x57e1e4));return{'databasePage':_0x3d43f3+_0x2dce83(0x1c5),'erPage':_0x3d43f3+'/data/er?dbId='+_0x5c576d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
function a93_0x2829(_0x21fe70,_0x443a43){_0x21fe70=_0x21fe70-0x7d;const _0x9e4e7=a93_0x9e4e();let _0x282953=_0x9e4e7[_0x21fe70];return _0x282953;}function a93_0x9e4e(){const _0x2e7127=['summary','number','totalCount','tableName','size','map','\x20of\x20','validation','1511217vIoRMT','NEW_TABLE','datasetTableCount','808080pfoYDW','DELETED_TABLE','fromEntries','ALREADY_ANALYZED','2EZRlGE','Incomplete\x20db\x20table\x20pagination:\x20collected\x20','6IULuFB','165332BuaITZ','values','set','639596kyGpkW','14959UqEwoS','length','MODIFIED_TABLE','\x20row(s).','physicalTableCount','522VLfVjO','3648904RCYBfL','13758700QiWmzP','tableList','diffType'];a93_0x9e4e=function(){return _0x2e7127;};return a93_0x9e4e();}const a93_0x29668c=a93_0x2829;(function(_0x2b40fe,_0x39b90f){const _0x34249c=a93_0x2829,_0x543944=_0x2b40fe();while(!![]){try{const _0x1f0a8a=-parseInt(_0x34249c(0x91))/0x1*(parseInt(_0x34249c(0x8e))/0x2)+-parseInt(_0x34249c(0x90))/0x3*(parseInt(_0x34249c(0x94))/0x4)+parseInt(_0x34249c(0x8a))/0x5+parseInt(_0x34249c(0x9a))/0x6*(-parseInt(_0x34249c(0x95))/0x7)+-parseInt(_0x34249c(0x9b))/0x8+-parseInt(_0x34249c(0x87))/0x9+parseInt(_0x34249c(0x9c))/0xa;if(_0x1f0a8a===_0x39b90f)break;else _0x543944['push'](_0x543944['shift']());}catch(_0x27af56){_0x543944['push'](_0x543944['shift']());}}}(a93_0x9e4e,0x3b2eb));import{CliErrors}from'../../errors.js';export const DB_TABLE_PAGE_SIZE=0x64;export const DB_TABLE_DIFF_TYPES=[a93_0x29668c(0x88),a93_0x29668c(0x97),a93_0x29668c(0x8b),a93_0x29668c(0x8d)];export function summarizeDbTableDiff(_0x45b556){const _0x362738=a93_0x29668c;return Object[_0x362738(0x8c)](DB_TABLE_DIFF_TYPES[_0x362738(0x84)](_0x1237db=>[_0x1237db,_0x45b556['filter'](_0x5ce09b=>_0x5ce09b[_0x362738(0x7e)]===_0x1237db)[_0x362738(0x96)]]));}export async function getAllDbTableDiff(_0x3be521,_0x2e8cd5,_0x430e60,_0x1b5652){const _0x323b90=a93_0x29668c,_0x38e45c=new Map();let _0x4218a4=0x1,_0x595875=null;while(!![]){_0x595875=await _0x3be521(_0x2e8cd5,_0x430e60,{'pageIndex':_0x4218a4,'pageSize':DB_TABLE_PAGE_SIZE,'tableName':_0x1b5652});const _0x2d1acc=_0x38e45c[_0x323b90(0x83)];for(const _0x2a0767 of _0x595875[_0x323b90(0x7d)]){_0x38e45c[_0x323b90(0x93)](_0x2a0767[_0x323b90(0x82)],_0x2a0767);}if(_0x38e45c[_0x323b90(0x83)]>=_0x595875[_0x323b90(0x81)])break;if(_0x595875[_0x323b90(0x7d)][_0x323b90(0x96)]===0x0||_0x38e45c[_0x323b90(0x83)]===_0x2d1acc)throw CliErrors[_0x323b90(0x86)](_0x323b90(0x8f)+_0x38e45c[_0x323b90(0x83)]+_0x323b90(0x85)+_0x595875[_0x323b90(0x81)]+_0x323b90(0x98));_0x4218a4+=0x1;}return{'totalCount':_0x595875?.[_0x323b90(0x81)]??0x0,...typeof _0x595875?.[_0x323b90(0x99)]===_0x323b90(0x80)?{'physicalTableCount':_0x595875[_0x323b90(0x99)]}:{},...typeof _0x595875?.[_0x323b90(0x89)]===_0x323b90(0x80)?{'datasetTableCount':_0x595875['datasetTableCount']}:{},..._0x595875?.['summary']?{'summary':_0x595875[_0x323b90(0x7f)]}:{},'tableList':[..._0x38e45c[_0x323b90(0x92)]()]};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
function
|
|
1
|
+
const a94_0x19e711=a94_0x53ec;function a94_0x53ec(_0x290fc8,_0x534223){_0x290fc8=_0x290fc8-0x1ec;const _0x51d276=a94_0x51d2();let _0x53ec8c=_0x51d276[_0x290fc8];return _0x53ec8c;}(function(_0x18863c,_0x2aecda){const _0x53f926=a94_0x53ec,_0x99f0aa=_0x18863c();while(!![]){try{const _0x10b5c3=-parseInt(_0x53f926(0x202))/0x1+parseInt(_0x53f926(0x203))/0x2+-parseInt(_0x53f926(0x1fa))/0x3*(-parseInt(_0x53f926(0x204))/0x4)+-parseInt(_0x53f926(0x1f0))/0x5+-parseInt(_0x53f926(0x1f3))/0x6+parseInt(_0x53f926(0x1ef))/0x7+parseInt(_0x53f926(0x1ed))/0x8*(parseInt(_0x53f926(0x1fe))/0x9);if(_0x10b5c3===_0x2aecda)break;else _0x99f0aa['push'](_0x99f0aa['shift']());}catch(_0x47d038){_0x99f0aa['push'](_0x99f0aa['shift']());}}}(a94_0x51d2,0xe29da));import{getDbTableComparisonPage}from'../../core/api-client.js';function a94_0x51d2(){const _0x13a2a1=['1063395EEmjrg','read','str','number','664622rVImLN','562548WHnxJq','96724tnCeLo','Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)','80qSlQcI','num','10260670nwGJkg','28540hqMbpv','summary','totalCount','8125602JgtaLT','\x20table\x20comparison\x20row(s),\x20total\x20','length','physicalTableCount','datasetTableCount','tableList','table','3ZQzGRg','List\x20all\x20database\x20table\x20comparison\x20rows\x20and\x20analysis\x20states','tables','appCode'];a94_0x51d2=function(){return _0x13a2a1;};return a94_0x51d2();}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_0x19e711(0x1fc),'description':a94_0x19e711(0x1fb),'risk':a94_0x19e711(0x1ff),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a94_0x19e711(0x1f9),'type':'string','description':a94_0x19e711(0x1ec)}],async 'execute'(_0x205ea8){const _0xf8abeb=a94_0x19e711,_0x4bcb64=_0x205ea8[_0xf8abeb(0x1ee)]('id'),_0x2fdd7b=_0x205ea8[_0xf8abeb(0x200)](_0xf8abeb(0x1f9))||undefined,_0x1ed2e5=await getAllDbTableDiff(getDbTableComparisonPage,_0x205ea8[_0xf8abeb(0x1fd)],_0x4bcb64,_0x2fdd7b),_0x183cda=_0x1ed2e5[_0xf8abeb(0x1f8)];return{'ok':!![],'data':{'dbLinkId':_0x4bcb64,'totalCount':_0x1ed2e5[_0xf8abeb(0x1f2)],...typeof _0x1ed2e5[_0xf8abeb(0x1f6)]===_0xf8abeb(0x201)?{'physicalTableCount':_0x1ed2e5[_0xf8abeb(0x1f6)]}:{},...typeof _0x1ed2e5[_0xf8abeb(0x1f7)]==='number'?{'datasetTableCount':_0x1ed2e5['datasetTableCount']}:{},..._0x1ed2e5[_0xf8abeb(0x1f1)]?{'summary':_0x1ed2e5['summary']}:{},'summaryByType':summarizeDbTableDiff(_0x183cda),'tables':_0x183cda},'message':_0x183cda[_0xf8abeb(0x1f5)]+_0xf8abeb(0x1f4)+_0x1ed2e5['totalCount']+'\x20(db\x20link\x20'+_0x4bcb64+')'};}};
|
package/lib/commands/db/test.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a95_0x22db54=a95_0x1cbb;(function(_0x53f407,_0x557d13){const _0x37b5ee=a95_0x1cbb,_0x3c1225=_0x53f407();while(!![]){try{const _0x593bbe=-parseInt(_0x37b5ee(0x1b2))/0x1*(-parseInt(_0x37b5ee(0x1a7))/0x2)+parseInt(_0x37b5ee(0x1b3))/0x3*(parseInt(_0x37b5ee(0x1a5))/0x4)+-parseInt(_0x37b5ee(0x1ae))/0x5*(-parseInt(_0x37b5ee(0x19e))/0x6)+parseInt(_0x37b5ee(0x1b4))/0x7*(parseInt(_0x37b5ee(0x1aa))/0x8)+parseInt(_0x37b5ee(0x1a9))/0x9*(-parseInt(_0x37b5ee(0x1a6))/0xa)+-parseInt(_0x37b5ee(0x1b0))/0xb*(-parseInt(_0x37b5ee(0x1b1))/0xc)+-parseInt(_0x37b5ee(0x19c))/0xd;if(_0x593bbe===_0x557d13)break;else _0x3c1225['push'](_0x3c1225['shift']());}catch(_0x56f238){_0x3c1225['push'](_0x3c1225['shift']());}}}(a95_0x5791,0xd3ee1));import{testDbLinkConnect}from'../../core/api-client.js';function a95_0x5791(){const _0x5487b0=['6191628byzpOL','keys','msg','error','Connection\x20OK\x20for\x20db\x20link\x20','slice','object','56OHCcfD','26140UaWQqx','504gWusys','success','5571cCjoIG','1393768WIienW','num','length','data','5acPeAt','read','76934aSyiVR','1716CFPPQp','5707sTxUOS','322887nEPHwR','49lJAXFT','code','\x20(see\x20data.result)','48236058jImAfN','Connection\x20check\x20finished\x20for\x20db\x20link\x20'];a95_0x5791=function(){return _0x5487b0;};return a95_0x5791();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';function summarizeTestConnectResult(_0x1525e4){const _0x272810=a95_0x1cbb;if(_0x1525e4===!![]||_0x1525e4===![])return{'success':_0x1525e4};if(_0x1525e4===null||_0x1525e4===undefined)return{'type':typeof _0x1525e4};if(typeof _0x1525e4!==_0x272810(0x1a4))return{'type':typeof _0x1525e4};const _0x499745=_0x1525e4,_0x26073d=[_0x272810(0x1a8),'message',_0x272810(0x19a),_0x272810(0x1a1),_0x272810(0x1a0),_0x272810(0x1ad)],_0x4ba34f={};for(const _0x1a9601 of _0x26073d){if(_0x1a9601 in _0x499745)_0x4ba34f[_0x1a9601]=_0x499745[_0x1a9601];}return Object[_0x272810(0x19f)](_0x4ba34f)[_0x272810(0x1ac)]===0x0&&(_0x4ba34f[_0x272810(0x19f)]=Object[_0x272810(0x19f)](_0x499745)[_0x272810(0x1a3)](0x0,0x14)),_0x4ba34f;}function a95_0x1cbb(_0x340074,_0x23bfac){_0x340074=_0x340074-0x19a;const _0x579168=a95_0x5791();let _0x1cbbf9=_0x579168[_0x340074];return _0x1cbbf9;}export const dbTest={'service':'db','command':'test','description':'Test\x20connectivity\x20to\x20the\x20configured\x20database\x20(uses\x20saved\x20credentials\x20on\x20server)','risk':a95_0x22db54(0x1af),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3c15e6){const _0x29d23a=a95_0x22db54,_0x4245cc=_0x3c15e6[_0x29d23a(0x1ab)]('id'),_0x2a19bf=await testDbLinkConnect(_0x4245cc),_0x58bc86=_0x2a19bf===!![]||typeof _0x2a19bf==='object'&&_0x2a19bf!==null&&_0x2a19bf[_0x29d23a(0x1a8)]===!![],_0x438561=summarizeTestConnectResult(_0x2a19bf);return{'ok':!![],'data':{'id':_0x4245cc,'connected':Boolean(_0x58bc86),'result':_0x438561},'message':_0x58bc86?_0x29d23a(0x1a2)+_0x4245cc:_0x29d23a(0x19d)+_0x4245cc+_0x29d23a(0x19b)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a96_0x55395b=a96_0x2153;(function(_0xbb9dcc,_0x55cfe5){const _0x422baf=a96_0x2153,_0x3d4a19=_0xbb9dcc();while(!![]){try{const _0x3e7cd7=parseInt(_0x422baf(0x12d))/0x1+parseInt(_0x422baf(0x132))/0x2+-parseInt(_0x422baf(0x137))/0x3+-parseInt(_0x422baf(0x139))/0x4+-parseInt(_0x422baf(0x13b))/0x5*(-parseInt(_0x422baf(0x130))/0x6)+-parseInt(_0x422baf(0x13f))/0x7*(-parseInt(_0x422baf(0x140))/0x8)+parseInt(_0x422baf(0x135))/0x9*(-parseInt(_0x422baf(0x123))/0xa);if(_0x3e7cd7===_0x55cfe5)break;else _0x3d4a19['push'](_0x3d4a19['shift']());}catch(_0x1dc8bf){_0x3d4a19['push'](_0x3d4a19['shift']());}}}(a96_0x35d0,0xe841f));function a96_0x2153(_0x5a3f14,_0x190e55){_0x5a3f14=_0x5a3f14-0x11d;const _0x35d0b9=a96_0x35d0();let _0x215384=_0x35d0b9[_0x5a3f14];return _0x215384;}function a96_0x35d0(){const _0x1a958d=['916825bDkOJY','Updated\x20db\x20link\x20','password','dbName','56lBZWWH','1184096yzfvjT','validation','num','Current\x20or\x20replacement\x20password.\x20Required\x20when\x20the\x20stored\x20password\x20is\x20masked','dbDesc','update','/smartapi/dblink/update','has','dburl','dbdesc','10qeLTUk','dbParam','dbparam','Invalid\x20--dburl:\x20expected\x20host:port,\x20got\x20\x22','skip-connection-test','dbname','[redacted]','New\x20database\x20name','trim','bool','349790YdndXl','POST','username','30pNFTFq','New\x20host:port','2887672OubSwD','string','New\x20connection\x20parameter\x20string','4467843kTAURP','--password\x20must\x20contain\x20the\x20real\x20database\x20password,\x20not\x20a\x20masked\x20value.','2180796ypwZfp','The\x20server\x20returned\x20a\x20masked\x20database\x20password.\x20Pass\x20the\x20current\x20or\x20replacement\x20password\x20explicitly\x20with\x20--password\x20to\x20update\x20this\x20connection\x20safely.','6879444ZnYqbQ','str'];a96_0x35d0=function(){return _0x1a958d;};return a96_0x35d0();}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_0x55395b(0x129)]);function mergeDbLinkUpdate(_0x38dde6,_0x5b8ae4){const _0x45eb13=a96_0x55395b,_0x4eb4e7={..._0x38dde6},_0x32021c=_0x5b8ae4['str']('password');if(_0x32021c&&MASKED_PASSWORD_VALUES['has'](_0x32021c))throw CliErrors[_0x45eb13(0x141)](_0x45eb13(0x136));if(!_0x32021c&&MASKED_PASSWORD_VALUES[_0x45eb13(0x120)](String(_0x38dde6[_0x45eb13(0x13d)]??'')))throw CliErrors[_0x45eb13(0x141)](_0x45eb13(0x138));const _0x5b71d0=_0x5b8ae4[_0x45eb13(0x13a)](_0x45eb13(0x128));if(_0x5b71d0)_0x4eb4e7[_0x45eb13(0x13e)]=_0x5b71d0;const _0x1b628d=_0x5b8ae4['str'](_0x45eb13(0x121));if(_0x1b628d)_0x4eb4e7['dbUrl']=_0x1b628d[_0x45eb13(0x12b)]();const _0x18c420=_0x5b8ae4[_0x45eb13(0x13a)](_0x45eb13(0x12f));if(_0x18c420)_0x4eb4e7[_0x45eb13(0x12f)]=_0x18c420;if(_0x32021c)_0x4eb4e7[_0x45eb13(0x13d)]=_0x32021c;const _0x1f05ab=_0x5b8ae4[_0x45eb13(0x13a)](_0x45eb13(0x125));if(_0x1f05ab)_0x4eb4e7[_0x45eb13(0x124)]=_0x1f05ab;const _0xf41ed7=_0x5b8ae4[_0x45eb13(0x13a)]('dbdesc');if(_0xf41ed7)_0x4eb4e7[_0x45eb13(0x11d)]=_0xf41ed7;return _0x4eb4e7;}export const dbUpdate={'service':'db','command':a96_0x55395b(0x11e),'description':'Update\x20a\x20database\x20connection\x20by\x20merging\x20supplied\x20fields\x20into\x20the\x20current\x20server\x20record.\x20A\x20masked\x20server\x20password\x20requires\x20explicit\x20--password','risk':'write','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a96_0x55395b(0x128),'type':a96_0x55395b(0x133),'description':a96_0x55395b(0x12a)},{'name':a96_0x55395b(0x121),'type':'string','description':a96_0x55395b(0x131)},{'name':a96_0x55395b(0x12f),'type':'string','description':'New\x20username'},{'name':a96_0x55395b(0x13d),'type':a96_0x55395b(0x133),'description':a96_0x55395b(0x143)},{'name':'dbparam','type':a96_0x55395b(0x133),'description':a96_0x55395b(0x134)},{'name':a96_0x55395b(0x122),'type':a96_0x55395b(0x133),'description':'New\x20description'},SKIP_CONNECTION_TEST_FLAG],async 'validate'(_0x4cf974){const _0x115cfd=a96_0x55395b,_0x573031=_0x4cf974[_0x115cfd(0x13a)](_0x115cfd(0x121));if(_0x573031&&!validateDbUrl(_0x573031[_0x115cfd(0x12b)]()))throw CliErrors[_0x115cfd(0x141)](_0x115cfd(0x126)+_0x573031+'\x22');},async 'dryRun'(_0x31238e){const _0x56237c=a96_0x55395b,_0x375820=_0x31238e[_0x56237c(0x142)]('id'),_0x469481=await getDbLinkInfo(_0x375820),_0x2eb929=mergeDbLinkUpdate(_0x469481,_0x31238e),_0x5891d1=sanitizeDbLinkForOutput(_0x2eb929);return{'method':_0x56237c(0x12e),'url':_0x56237c(0x11f),'body':_0x5891d1,'description':'Preview\x20the\x20merged\x20database\x20connection\x20update;\x20password\x20redacted','connectionPreflight':{'enabled':!_0x31238e['bool'](_0x56237c(0x127)),'executed':![]}};},async 'execute'(_0x55a6f3){const _0x973856=a96_0x55395b,_0x2143eb=_0x55a6f3[_0x973856(0x142)]('id'),_0x5e905f=await getDbLinkInfo(_0x2143eb),_0x2872d1=mergeDbLinkUpdate(_0x5e905f,_0x55a6f3);!_0x55a6f3[_0x973856(0x12c)](_0x973856(0x127))&&await assertDbLinkConnectionPreflight(_0x2872d1);const {id:_0x569754,entity:_0x4bd17d}=normalizeEntityWithIdResponse(await updateDbLink(_0x2872d1));return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x4bd17d),'message':_0x973856(0x13c)+(_0x569754??_0x2143eb)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
function a97_0x1ce2(){const _0x380222=['4144xpujxw','23456fUpxNe','423ampVeo','946416mCNYKP','2276WClKtP','1532244dtnBTv','118eQGOuG','1062759QUchVm','240485YqFZkh'];a97_0x1ce2=function(){return _0x380222;};return a97_0x1ce2();}(function(_0x53c5a9,_0x5942d3){const _0x57308f=a97_0x1b59,_0x101e9a=_0x53c5a9();while(!![]){try{const _0x45c51e=-parseInt(_0x57308f(0x72))/0x1*(parseInt(_0x57308f(0x70))/0x2)+parseInt(_0x57308f(0x6a))/0x3+parseInt(_0x57308f(0x6c))/0x4+parseInt(_0x57308f(0x6b))/0x5+-parseInt(_0x57308f(0x6f))/0x6+parseInt(_0x57308f(0x71))/0x7+parseInt(_0x57308f(0x6d))/0x8*(-parseInt(_0x57308f(0x6e))/0x9);if(_0x45c51e===_0x5942d3)break;else _0x101e9a['push'](_0x101e9a['shift']());}catch(_0x311d61){_0x101e9a['push'](_0x101e9a['shift']());}}}(a97_0x1ce2,0x2efc6));import{deploymentSyncAll}from'../../commands/deployment/sync-all.js';import{deploymentSyncStatus}from'../../commands/deployment/sync-status.js';import{deploymentSyncJobs}from'../../commands/deployment/sync-jobs.js';function a97_0x1b59(_0x11da5e,_0x538a79){_0x11da5e=_0x11da5e-0x6a;const _0x1ce2c5=a97_0x1ce2();let _0x1b59e6=_0x1ce2c5[_0x11da5e];return _0x1b59e6;}export const deploymentDefinitions=[deploymentSyncAll,deploymentSyncStatus,deploymentSyncJobs];
|