@lovrabet/rabetbase-cli 2.3.16-beta.4 → 2.3.16-beta.6
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.d.ts +9 -0
- package/lib/api/api-doc.js +1 -1
- package/lib/api/fetch-model-list.d.ts +2 -0
- package/lib/api/fetch-model-list.js +1 -1
- package/lib/api/generate-api-file.d.ts +8 -0
- package/lib/api/generate-api-file.js +1 -1
- package/lib/auth/auth-server-ui.d.ts +13 -0
- package/lib/auth/auth-server-ui.js +1 -1
- package/lib/auth/auth-server.d.ts +25 -0
- package/lib/auth/auth-server.js +1 -1
- package/lib/auth/constant.d.ts +2 -0
- package/lib/auth/constant.js +1 -1
- package/lib/auth/get-cookie.d.ts +1 -0
- package/lib/auth/get-cookie.js +1 -1
- package/lib/auth/get-session-user.d.ts +51 -0
- package/lib/auth/get-session-user.js +1 -1
- package/lib/auth/is-session-valid.d.ts +1 -0
- package/lib/auth/is-session-valid.js +1 -1
- package/lib/auth/login-success-html.d.ts +5 -0
- package/lib/auth/login-success-html.js +1 -1
- package/lib/auth/logout.d.ts +1 -0
- package/lib/auth/logout.js +1 -1
- package/lib/cli-flags.d.ts +12 -0
- package/lib/cli-flags.js +1 -1
- package/lib/cli.d.ts +2 -0
- package/lib/cli.js +1 -1
- package/lib/commands/api/generate.d.ts +2 -0
- package/lib/commands/api/generate.js +1 -1
- package/lib/commands/api/index.d.ts +2 -0
- package/lib/commands/api/index.js +1 -1
- package/lib/commands/api/list.d.ts +2 -0
- package/lib/commands/api/list.js +1 -1
- package/lib/commands/api/pull.d.ts +2 -0
- package/lib/commands/api/pull.js +1 -1
- package/lib/commands/api/shared.d.ts +18 -0
- package/lib/commands/api/shared.js +1 -1
- package/lib/commands/app/index.d.ts +5 -0
- package/lib/commands/app/index.js +1 -1
- package/lib/commands/app/list.d.ts +10 -0
- package/lib/commands/app/list.js +1 -1
- package/lib/commands/app/members-list.d.ts +2 -0
- package/lib/commands/app/members-list.js +1 -1
- package/lib/commands/app/remote-directory.d.ts +11 -0
- package/lib/commands/app/remote-directory.js +1 -1
- package/lib/commands/app/shared.d.ts +46 -0
- package/lib/commands/app/shared.js +1 -1
- package/lib/commands/app-config/delete.d.ts +2 -0
- package/lib/commands/app-config/delete.js +1 -1
- package/lib/commands/app-config/get.d.ts +2 -0
- package/lib/commands/app-config/get.js +1 -1
- package/lib/commands/app-config/index.d.ts +2 -0
- package/lib/commands/app-config/index.js +1 -1
- package/lib/commands/app-config/list.d.ts +2 -0
- package/lib/commands/app-config/list.js +1 -1
- package/lib/commands/app-config/set.d.ts +2 -0
- package/lib/commands/app-config/set.js +1 -1
- package/lib/commands/app-config/shared.d.ts +105 -0
- package/lib/commands/app-config/shared.js +1 -1
- package/lib/commands/auth/index.d.ts +2 -0
- package/lib/commands/auth/index.js +1 -1
- package/lib/commands/bff/create.d.ts +4 -0
- package/lib/commands/bff/create.js +1 -1
- package/lib/commands/bff/delete.d.ts +2 -0
- package/lib/commands/bff/delete.js +1 -1
- package/lib/commands/bff/detail.d.ts +2 -0
- package/lib/commands/bff/detail.js +1 -1
- package/lib/commands/bff/index.d.ts +5 -0
- package/lib/commands/bff/index.js +1 -1
- package/lib/commands/bff/list.d.ts +2 -0
- package/lib/commands/bff/list.js +1 -1
- package/lib/commands/bff/pull.d.ts +2 -0
- package/lib/commands/bff/pull.js +1 -1
- package/lib/commands/bff/push.d.ts +2 -0
- package/lib/commands/bff/push.js +1 -1
- package/lib/commands/bff/status.d.ts +2 -0
- package/lib/commands/bff/status.js +1 -1
- package/lib/commands/cli-skill/index.d.ts +8 -0
- package/lib/commands/cli-skill/index.js +1 -1
- package/lib/commands/cli-update.d.ts +2 -0
- package/lib/commands/cli-update.js +1 -1
- package/lib/commands/codegen/index.d.ts +2 -0
- package/lib/commands/codegen/index.js +1 -1
- package/lib/commands/codegen/sdk.d.ts +2 -0
- package/lib/commands/codegen/sdk.js +1 -1
- package/lib/commands/codegen/sql.d.ts +2 -0
- package/lib/commands/codegen/sql.js +1 -1
- package/lib/commands/common/app-registry.d.ts +17 -0
- package/lib/commands/common/app-registry.js +1 -1
- package/lib/commands/common/app-selector.d.ts +17 -0
- package/lib/commands/common/app-selector.js +1 -1
- package/lib/commands/common/async-task.d.ts +11 -0
- package/lib/commands/common/async-task.js +1 -1
- package/lib/commands/common/dry-run.d.ts +12 -0
- package/lib/commands/common/dry-run.js +1 -1
- package/lib/commands/common/flags.d.ts +26 -0
- package/lib/commands/common/flags.js +1 -1
- package/lib/commands/common/local-file.d.ts +6 -0
- package/lib/commands/common/local-file.js +1 -1
- package/lib/commands/common/validate.d.ts +13 -0
- package/lib/commands/common/validate.js +1 -1
- package/lib/commands/config/get.d.ts +5 -0
- package/lib/commands/config/get.js +1 -1
- package/lib/commands/config/index.d.ts +5 -0
- package/lib/commands/config/index.js +1 -1
- package/lib/commands/config/list.d.ts +5 -0
- package/lib/commands/config/list.js +1 -1
- package/lib/commands/config/set.d.ts +5 -0
- package/lib/commands/config/set.js +1 -1
- package/lib/commands/config/shared.d.ts +16 -0
- package/lib/commands/config/shared.js +1 -1
- package/lib/commands/data/filter.d.ts +7 -0
- package/lib/commands/data/filter.js +1 -1
- package/lib/commands/data/getOne.d.ts +7 -0
- package/lib/commands/data/getOne.js +1 -1
- package/lib/commands/data/index.d.ts +8 -0
- package/lib/commands/data/index.js +1 -1
- package/lib/commands/data/shared.d.ts +33 -0
- package/lib/commands/data/shared.js +1 -1
- package/lib/commands/dataset/business-group-update.d.ts +18 -0
- package/lib/commands/dataset/business-group-update.js +1 -1
- package/lib/commands/dataset/capability.d.ts +11 -0
- package/lib/commands/dataset/capability.js +1 -1
- package/lib/commands/dataset/delete.d.ts +2 -0
- package/lib/commands/dataset/delete.js +1 -1
- package/lib/commands/dataset/detail.d.ts +2 -0
- package/lib/commands/dataset/detail.js +1 -1
- package/lib/commands/dataset/extend-update.d.ts +26 -0
- package/lib/commands/dataset/extend-update.js +1 -1
- package/lib/commands/dataset/field-update.d.ts +27 -0
- package/lib/commands/dataset/field-update.js +1 -1
- package/lib/commands/dataset/generate.d.ts +3 -0
- package/lib/commands/dataset/generate.js +1 -1
- package/lib/commands/dataset/index.d.ts +2 -0
- package/lib/commands/dataset/index.js +1 -1
- package/lib/commands/dataset/list.d.ts +2 -0
- package/lib/commands/dataset/list.js +1 -1
- package/lib/commands/dataset/operations.d.ts +2 -0
- package/lib/commands/dataset/operations.js +1 -1
- package/lib/commands/dataset/relation-audit.d.ts +2 -0
- package/lib/commands/dataset/relation-audit.js +1 -1
- package/lib/commands/dataset/relation-create.d.ts +2 -0
- package/lib/commands/dataset/relation-create.js +1 -1
- package/lib/commands/dataset/relation-delete.d.ts +2 -0
- package/lib/commands/dataset/relation-delete.js +1 -1
- package/lib/commands/dataset/relation-shared.d.ts +128 -0
- package/lib/commands/dataset/relation-shared.js +1 -1
- package/lib/commands/dataset/relation-update.d.ts +2 -0
- package/lib/commands/dataset/relation-update.js +1 -1
- package/lib/commands/dataset/relations.d.ts +53 -0
- package/lib/commands/dataset/relations.js +1 -1
- package/lib/commands/dataset/rename.d.ts +17 -0
- package/lib/commands/dataset/rename.js +1 -1
- package/lib/commands/dataset/restore.d.ts +2 -0
- package/lib/commands/dataset/restore.js +1 -1
- package/lib/commands/db/analysis-batching.d.ts +30 -0
- package/lib/commands/db/analysis-batching.js +1 -1
- package/lib/commands/db/analyze-batch-plan.d.ts +2 -0
- package/lib/commands/db/analyze-batch-plan.js +1 -1
- package/lib/commands/db/analyze-cancel.d.ts +2 -0
- package/lib/commands/db/analyze-cancel.js +1 -1
- package/lib/commands/db/analyze-start.d.ts +2 -0
- package/lib/commands/db/analyze-start.js +1 -1
- package/lib/commands/db/analyze-status.d.ts +2 -0
- package/lib/commands/db/analyze-status.js +1 -1
- package/lib/commands/db/create.d.ts +2 -0
- package/lib/commands/db/create.js +1 -1
- package/lib/commands/db/delete.d.ts +2 -0
- package/lib/commands/db/delete.js +1 -1
- package/lib/commands/db/detail.d.ts +2 -0
- package/lib/commands/db/detail.js +1 -1
- package/lib/commands/db/diff.d.ts +2 -0
- package/lib/commands/db/diff.js +1 -1
- package/lib/commands/db/index.d.ts +5 -0
- package/lib/commands/db/index.js +1 -1
- package/lib/commands/db/list.d.ts +2 -0
- package/lib/commands/db/list.js +1 -1
- package/lib/commands/db/shared.d.ts +15 -0
- package/lib/commands/db/shared.js +1 -1
- package/lib/commands/db/tables.d.ts +2 -0
- package/lib/commands/db/tables.js +1 -1
- package/lib/commands/db/test.d.ts +2 -0
- package/lib/commands/db/test.js +1 -1
- package/lib/commands/db/update.d.ts +2 -0
- package/lib/commands/db/update.js +1 -1
- package/lib/commands/doctor.d.ts +2 -0
- package/lib/commands/doctor.js +1 -1
- package/lib/commands/file/index.d.ts +2 -0
- package/lib/commands/file/index.js +1 -1
- package/lib/commands/init/index.d.ts +11 -0
- package/lib/commands/init/index.js +1 -1
- package/lib/commands/issue/index.d.ts +2 -0
- package/lib/commands/issue/index.js +1 -1
- package/lib/commands/issue/nudge.d.ts +23 -0
- package/lib/commands/issue/nudge.js +1 -1
- package/lib/commands/issue/report.d.ts +2 -0
- package/lib/commands/issue/report.js +1 -1
- package/lib/commands/issue/shared.d.ts +32 -0
- package/lib/commands/issue/shared.js +1 -1
- package/lib/commands/kb/create.d.ts +2 -0
- package/lib/commands/kb/create.js +1 -1
- package/lib/commands/kb/delete.d.ts +2 -0
- package/lib/commands/kb/delete.js +1 -1
- package/lib/commands/kb/detail.d.ts +2 -0
- package/lib/commands/kb/detail.js +1 -1
- package/lib/commands/kb/index.d.ts +2 -0
- package/lib/commands/kb/index.js +1 -1
- package/lib/commands/kb/list.d.ts +2 -0
- package/lib/commands/kb/list.js +1 -1
- package/lib/commands/kb/shared.d.ts +33 -0
- package/lib/commands/kb/shared.js +1 -1
- package/lib/commands/kb/update.d.ts +2 -0
- package/lib/commands/kb/update.js +1 -1
- package/lib/commands/logs/index.d.ts +5 -0
- package/lib/commands/logs/index.js +1 -1
- package/lib/commands/menu/asset-update.d.ts +2 -0
- package/lib/commands/menu/asset-update.js +1 -1
- package/lib/commands/menu/delete.d.ts +2 -0
- package/lib/commands/menu/delete.js +1 -1
- package/lib/commands/menu/external-link-create.d.ts +3 -0
- package/lib/commands/menu/external-link-create.js +1 -1
- package/lib/commands/menu/external-link-update.d.ts +2 -0
- package/lib/commands/menu/external-link-update.js +1 -1
- package/lib/commands/menu/group-create.d.ts +2 -0
- package/lib/commands/menu/group-create.js +1 -1
- package/lib/commands/menu/group-update.d.ts +2 -0
- package/lib/commands/menu/group-update.js +1 -1
- package/lib/commands/menu/index.d.ts +17 -0
- package/lib/commands/menu/index.js +1 -1
- package/lib/commands/menu/list.d.ts +2 -0
- package/lib/commands/menu/list.js +1 -1
- package/lib/commands/menu/move.d.ts +2 -0
- package/lib/commands/menu/move.js +1 -1
- package/lib/commands/menu/regroup-start.d.ts +2 -0
- package/lib/commands/menu/regroup-start.js +1 -1
- package/lib/commands/menu/rename.d.ts +2 -0
- package/lib/commands/menu/rename.js +1 -1
- package/lib/commands/menu/shared/compare-table.d.ts +27 -0
- package/lib/commands/menu/shared/compare-table.js +1 -1
- package/lib/commands/menu/shared/delete-plan.d.ts +51 -0
- package/lib/commands/menu/shared/delete-plan.js +1 -1
- package/lib/commands/menu/shared/facts.d.ts +12 -0
- package/lib/commands/menu/shared/facts.js +1 -1
- package/lib/commands/menu/shared/index.d.ts +12 -0
- package/lib/commands/menu/shared/index.js +1 -1
- package/lib/commands/menu/shared/inquirer.d.ts +10 -0
- package/lib/commands/menu/shared/inquirer.js +1 -1
- package/lib/commands/menu/shared/local-pages.d.ts +12 -0
- package/lib/commands/menu/shared/local-pages.js +1 -1
- package/lib/commands/menu/shared/logic.d.ts +28 -0
- package/lib/commands/menu/shared/logic.js +1 -1
- package/lib/commands/menu/shared/mutations.d.ts +69 -0
- package/lib/commands/menu/shared/mutations.js +1 -1
- package/lib/commands/menu/shared/service.d.ts +17 -0
- package/lib/commands/menu/shared/service.js +1 -1
- package/lib/commands/menu/shared/sync-core.d.ts +7 -0
- package/lib/commands/menu/shared/sync-core.js +1 -1
- package/lib/commands/menu/shared/types.d.ts +162 -0
- package/lib/commands/menu/shared/update-core.d.ts +11 -0
- package/lib/commands/menu/shared/update-core.js +1 -1
- package/lib/commands/menu/shared/valid-url.d.ts +6 -0
- package/lib/commands/menu/shared/valid-url.js +1 -1
- package/lib/commands/menu/sync.d.ts +2 -0
- package/lib/commands/menu/sync.js +1 -1
- package/lib/commands/notification/config-list.d.ts +2 -0
- package/lib/commands/notification/config-list.js +1 -1
- package/lib/commands/notification/index.d.ts +2 -0
- package/lib/commands/notification/index.js +1 -1
- package/lib/commands/ocr/index.d.ts +2 -0
- package/lib/commands/ocr/index.js +1 -1
- package/lib/commands/page/generate-start.d.ts +2 -0
- package/lib/commands/page/generate-start.js +1 -1
- package/lib/commands/page/generate-status.d.ts +2 -0
- package/lib/commands/page/generate-status.js +1 -1
- package/lib/commands/page/index.d.ts +2 -0
- package/lib/commands/page/index.js +1 -1
- package/lib/commands/page/pull.d.ts +2 -0
- package/lib/commands/page/pull.js +1 -1
- package/lib/commands/page/push.d.ts +2 -0
- package/lib/commands/page/push.js +1 -1
- package/lib/commands/page/relation-audit.d.ts +2 -0
- package/lib/commands/page/relation-audit.js +1 -1
- package/lib/commands/page/restore.d.ts +2 -0
- package/lib/commands/page/restore.js +1 -1
- package/lib/commands/page/shared.d.ts +105 -0
- package/lib/commands/page/shared.js +1 -1
- package/lib/commands/page/standard-page-status.d.ts +2 -0
- package/lib/commands/page/standard-page-status.js +1 -1
- package/lib/commands/page/sync.d.ts +2 -0
- package/lib/commands/page/sync.js +1 -1
- package/lib/commands/permit/index.d.ts +2 -0
- package/lib/commands/permit/index.js +1 -1
- package/lib/commands/permit/page-get.d.ts +2 -0
- package/lib/commands/permit/page-get.js +1 -1
- package/lib/commands/permit/page-set.d.ts +2 -0
- package/lib/commands/permit/page-set.js +1 -1
- package/lib/commands/permit/role-apis-set.d.ts +2 -0
- package/lib/commands/permit/role-apis-set.js +1 -1
- package/lib/commands/permit/role-menus-set.d.ts +2 -0
- package/lib/commands/permit/role-menus-set.js +1 -1
- package/lib/commands/permit/role-menus.d.ts +2 -0
- package/lib/commands/permit/role-menus.js +1 -1
- package/lib/commands/permit/shared.d.ts +74 -0
- package/lib/commands/permit/shared.js +1 -1
- package/lib/commands/project/create/enhanced-guided-create.d.ts +7 -0
- package/lib/commands/project/create/enhanced-guided-create.js +1 -1
- package/lib/commands/project/create/format-elapsed.d.ts +1 -0
- package/lib/commands/project/create/format-elapsed.js +1 -1
- package/lib/commands/project/create/main.d.ts +6 -0
- package/lib/commands/project/create/main.js +1 -1
- package/lib/commands/project/create/non-interactive.d.ts +9 -0
- package/lib/commands/project/create/non-interactive.js +1 -1
- package/lib/commands/project/create/project-template-path.d.ts +4 -0
- package/lib/commands/project/create/project-template-path.js +1 -1
- package/lib/commands/project/create/use-copy-project-template.d.ts +1 -0
- package/lib/commands/project/create/use-copy-project-template.js +1 -1
- package/lib/commands/project/create/use-format-code.d.ts +1 -0
- package/lib/commands/project/create/use-format-code.js +1 -1
- package/lib/commands/project/create/use-install-dependencies.d.ts +1 -0
- package/lib/commands/project/create/use-install-dependencies.js +1 -1
- package/lib/commands/project/index.d.ts +2 -0
- package/lib/commands/project/index.js +1 -1
- package/lib/commands/project/upgrade.d.ts +1 -0
- package/lib/commands/project/upgrade.js +1 -1
- package/lib/commands/registry.d.ts +66 -0
- package/lib/commands/registry.js +1 -1
- package/lib/commands/role/create.d.ts +2 -0
- package/lib/commands/role/create.js +1 -1
- package/lib/commands/role/delete.d.ts +2 -0
- package/lib/commands/role/delete.js +1 -1
- package/lib/commands/role/detail.d.ts +2 -0
- package/lib/commands/role/detail.js +1 -1
- package/lib/commands/role/index.d.ts +2 -0
- package/lib/commands/role/index.js +1 -1
- package/lib/commands/role/list.d.ts +2 -0
- package/lib/commands/role/list.js +1 -1
- package/lib/commands/role/shared.d.ts +107 -0
- package/lib/commands/role/shared.js +1 -1
- package/lib/commands/role/update.d.ts +2 -0
- package/lib/commands/role/update.js +1 -1
- package/lib/commands/role/user-add.d.ts +2 -0
- package/lib/commands/role/user-add.js +1 -1
- package/lib/commands/role/user-remove.d.ts +2 -0
- package/lib/commands/role/user-remove.js +1 -1
- package/lib/commands/role/user-resolve.d.ts +2 -0
- package/lib/commands/role/user-resolve.js +1 -1
- package/lib/commands/run/index.d.ts +2 -0
- package/lib/commands/run/index.js +1 -1
- package/lib/commands/schema.d.ts +5 -0
- package/lib/commands/schema.js +1 -1
- package/lib/commands/sql/create.d.ts +10 -0
- package/lib/commands/sql/create.js +1 -1
- package/lib/commands/sql/delete.d.ts +5 -0
- package/lib/commands/sql/delete.js +1 -1
- package/lib/commands/sql/detail.d.ts +2 -0
- package/lib/commands/sql/detail.js +1 -1
- package/lib/commands/sql/exec.d.ts +2 -0
- package/lib/commands/sql/exec.js +1 -1
- package/lib/commands/sql/index.d.ts +5 -0
- package/lib/commands/sql/index.js +1 -1
- package/lib/commands/sql/list.d.ts +2 -0
- package/lib/commands/sql/list.js +1 -1
- package/lib/commands/sql/pull.d.ts +5 -0
- package/lib/commands/sql/pull.js +1 -1
- package/lib/commands/sql/push.d.ts +5 -0
- package/lib/commands/sql/push.js +1 -1
- package/lib/commands/sql/shared.d.ts +23 -0
- package/lib/commands/sql/shared.js +1 -1
- package/lib/commands/sql/status.d.ts +5 -0
- package/lib/commands/sql/status.js +1 -1
- package/lib/commands/sql/validate.d.ts +2 -0
- package/lib/commands/sql/validate.js +1 -1
- package/lib/commands/task/index.d.ts +2 -0
- package/lib/commands/task/index.js +1 -1
- package/lib/commands/task/status.d.ts +2 -0
- package/lib/commands/task/status.js +1 -1
- package/lib/commands/tenant/index.d.ts +2 -0
- package/lib/commands/tenant/index.js +1 -1
- package/lib/commands/tenant/members-list.d.ts +2 -0
- package/lib/commands/tenant/members-list.js +1 -1
- package/lib/commands/tenant/shared.d.ts +10 -0
- package/lib/commands/tenant/shared.js +1 -1
- package/lib/commands/workspace/add.d.ts +6 -0
- package/lib/commands/workspace/add.js +1 -1
- package/lib/commands/workspace/index.d.ts +11 -0
- package/lib/commands/workspace/index.js +1 -1
- package/lib/commands/workspace/remove.d.ts +6 -0
- package/lib/commands/workspace/remove.js +1 -1
- package/lib/config/schema.d.ts +50 -0
- package/lib/config/schema.js +1 -1
- package/lib/constant/cdn.d.ts +1 -0
- package/lib/constant/cdn.js +1 -1
- package/lib/constant/cli.d.ts +34 -0
- package/lib/constant/cli.js +1 -1
- package/lib/constant/defaults.d.ts +10 -0
- package/lib/constant/defaults.js +1 -1
- package/lib/constant/domain.d.ts +14 -0
- package/lib/constant/domain.js +1 -1
- package/lib/constant/env.d.ts +11 -0
- package/lib/constant/env.js +1 -1
- package/lib/constant/output.d.ts +1 -0
- package/lib/constant/output.js +1 -1
- package/lib/constant/paths.d.ts +5 -0
- package/lib/constant/paths.js +1 -1
- package/lib/constant/risk.d.ts +1 -0
- package/lib/constant/risk.js +1 -1
- package/lib/context/app-resolver.d.ts +36 -0
- package/lib/context/app-resolver.js +1 -1
- package/lib/context/auth-resolver.d.ts +5 -0
- package/lib/context/auth-resolver.js +1 -1
- package/lib/context/config-loader.d.ts +61 -0
- package/lib/context/config-loader.js +1 -1
- package/lib/context.d.ts +102 -0
- package/lib/context.js +1 -1
- package/lib/core/alias-resolver.d.ts +31 -0
- package/lib/core/alias-resolver.js +1 -1
- package/lib/core/api-client.d.ts +1018 -0
- package/lib/core/api-client.js +1 -1
- package/lib/core/bff/config.d.ts +8 -0
- package/lib/core/bff/config.js +1 -1
- package/lib/core/bff/file-system.d.ts +28 -0
- package/lib/core/bff/file-system.js +1 -1
- package/lib/core/bff/hash.d.ts +7 -0
- package/lib/core/bff/hash.js +1 -1
- package/lib/core/bff/lock.d.ts +25 -0
- package/lib/core/bff/lock.js +1 -1
- package/lib/core/bff/types.d.ts +92 -0
- package/lib/core/bff/utils.d.ts +25 -0
- package/lib/core/bff/utils.js +1 -1
- package/lib/core/db-resolver.d.ts +43 -0
- package/lib/core/db-resolver.js +1 -1
- package/lib/core/page/file-system.d.ts +6 -0
- package/lib/core/page/file-system.js +1 -1
- package/lib/core/page/hash.d.ts +4 -0
- package/lib/core/page/hash.js +1 -1
- package/lib/core/page/lock.d.ts +8 -0
- package/lib/core/page/lock.js +1 -1
- package/lib/core/page/types.d.ts +22 -0
- package/lib/core/sql-index-auditor.d.ts +33 -0
- package/lib/core/sql-index-auditor.js +1 -1
- package/lib/core/sql-sync/config.d.ts +7 -0
- package/lib/core/sql-sync/config.js +1 -1
- package/lib/core/sql-sync/file-system.d.ts +7 -0
- package/lib/core/sql-sync/file-system.js +1 -1
- package/lib/core/sql-sync/hash.d.ts +5 -0
- package/lib/core/sql-sync/hash.js +1 -1
- package/lib/core/sql-sync/lock.d.ts +14 -0
- package/lib/core/sql-sync/lock.js +1 -1
- package/lib/core/sql-sync/types.d.ts +43 -0
- package/lib/core/sql-sync/utils.d.ts +10 -0
- package/lib/core/sql-sync/utils.js +1 -1
- package/lib/core/sql-validator.d.ts +34 -0
- package/lib/core/sql-validator.js +1 -1
- package/lib/errors.d.ts +3 -0
- package/lib/errors.js +1 -1
- package/lib/framework/build-all-flags.d.ts +2 -0
- package/lib/framework/build-all-flags.js +1 -1
- package/lib/framework/error-output.d.ts +9 -0
- package/lib/framework/error-output.js +1 -1
- package/lib/framework/explicit-yes.d.ts +3 -0
- package/lib/framework/explicit-yes.js +1 -1
- package/lib/framework/flags.d.ts +3 -0
- package/lib/framework/flags.js +1 -1
- package/lib/framework/help.d.ts +4 -0
- package/lib/framework/help.js +1 -1
- package/lib/framework/index.d.ts +11 -0
- package/lib/framework/index.js +1 -1
- package/lib/framework/output.d.ts +15 -0
- package/lib/framework/output.js +1 -1
- package/lib/framework/response.d.ts +2 -0
- package/lib/framework/response.js +1 -1
- package/lib/framework/runner-alias.d.ts +14 -0
- package/lib/framework/runner-alias.js +1 -1
- package/lib/framework/runner.d.ts +36 -0
- package/lib/framework/runner.js +1 -1
- package/lib/framework/schema-export.d.ts +3 -0
- package/lib/framework/schema-export.js +1 -1
- package/lib/framework/types.d.ts +63 -0
- package/lib/framework/types.js +1 -1
- package/lib/generated/build-info.d.ts +4 -0
- package/lib/generated/build-info.js +1 -1
- package/lib/help.d.ts +1 -0
- package/lib/help.js +1 -1
- package/lib/runtime/confirmation.d.ts +4 -0
- package/lib/runtime/confirmation.js +1 -0
- package/lib/runtime/event.d.ts +5 -0
- package/lib/runtime/event.js +1 -0
- package/lib/runtime/index.d.ts +7 -0
- package/lib/runtime/index.js +1 -0
- package/lib/runtime/queue.d.ts +5 -0
- package/lib/runtime/queue.js +1 -0
- package/lib/runtime/resolve.d.ts +8 -0
- package/lib/runtime/resolve.js +1 -0
- package/lib/runtime/types.d.ts +50 -0
- package/lib/runtime/types.js +1 -0
- package/lib/skills/main.d.ts +41 -0
- package/lib/skills/main.js +1 -1
- package/lib/skills/npx-skills-add.d.ts +99 -0
- package/lib/skills/npx-skills-add.js +1 -1
- package/lib/skills/skill-presence.d.ts +44 -0
- package/lib/skills/skill-presence.js +1 -1
- package/lib/telemetry/cli-command-trace.d.ts +12 -0
- package/lib/telemetry/cli-command-trace.js +1 -1
- package/lib/telemetry/cli-help-trace.d.ts +8 -0
- package/lib/telemetry/cli-help-trace.js +1 -1
- package/lib/telemetry/ensure-cli-otel-config.d.ts +6 -0
- package/lib/telemetry/ensure-cli-otel-config.js +1 -1
- package/lib/telemetry/register-otel-exit-shutdown.d.ts +3 -0
- package/lib/telemetry/register-otel-exit-shutdown.js +1 -1
- package/lib/telemetry/send-cli-trace-log.d.ts +17 -0
- package/lib/telemetry/send-cli-trace-log.js +1 -1
- package/lib/telemetry/send-platform-issue-collect-log.d.ts +26 -0
- package/lib/telemetry/send-platform-issue-collect-log.js +1 -1
- package/lib/types/index.d.ts +93 -0
- package/lib/utils/ai_config.d.ts +47 -0
- package/lib/utils/ai_config.js +1 -1
- package/lib/utils/apply-jq-filter.d.ts +1 -0
- package/lib/utils/apply-jq-filter.js +1 -1
- package/lib/utils/cdn-config.d.ts +42 -0
- package/lib/utils/cdn-config.js +1 -1
- package/lib/utils/check-sdk-version.d.ts +23 -0
- package/lib/utils/check-sdk-version.js +1 -1
- package/lib/utils/cli-version-check.d.ts +37 -0
- package/lib/utils/cli-version-check.js +1 -1
- package/lib/utils/cli-version-policy.d.ts +9 -0
- package/lib/utils/cli-version-policy.js +1 -1
- package/lib/utils/config.d.ts +42 -0
- package/lib/utils/config.js +1 -1
- package/lib/utils/copy-directory.d.ts +1 -0
- package/lib/utils/copy-directory.js +1 -1
- package/lib/utils/entity-with-id.d.ts +30 -0
- package/lib/utils/entity-with-id.js +1 -1
- package/lib/utils/file-utils.d.ts +25 -0
- package/lib/utils/file-utils.js +1 -1
- package/lib/utils/guides-cdn.d.ts +80 -0
- package/lib/utils/guides-cdn.js +1 -1
- package/lib/utils/http-client.d.ts +30 -0
- package/lib/utils/http-client.js +1 -1
- package/lib/utils/is-non-interactive.d.ts +7 -0
- package/lib/utils/is-non-interactive.js +1 -1
- package/lib/utils/logger.d.ts +62 -0
- package/lib/utils/logger.js +1 -1
- package/lib/utils/params.d.ts +15 -0
- package/lib/utils/params.js +1 -1
- package/lib/utils/platform.d.ts +21 -0
- package/lib/utils/platform.js +1 -1
- package/lib/utils/rules-cdn.d.ts +38 -0
- package/lib/utils/rules-cdn.js +1 -1
- package/lib/utils/sleep.d.ts +1 -0
- package/lib/utils/sleep.js +1 -1
- package/lib/utils/template-replacer.d.ts +55 -0
- package/lib/utils/template-replacer.js +1 -1
- package/lib/utils/update-notice.d.ts +10 -0
- package/lib/utils/update-notice.js +1 -1
- package/lib/utils/version.d.ts +1 -0
- package/lib/utils/version.js +1 -1
- package/lib/utils/with-active-cookie.d.ts +1 -0
- package/lib/utils/with-active-cookie.js +1 -1
- package/lib/utils/write-cli-side-channel.d.ts +6 -0
- package/lib/utils/write-cli-side-channel.js +1 -1
- package/package.json +9 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a76_0x4b70d0=a76_0x5d54;(function(_0x3264d0,_0x391ada){const _0x50c35b=a76_0x5d54,_0xfa2b11=_0x3264d0();while(!![]){try{const _0x58a41b=-parseInt(_0x50c35b(0x1f5))/0x1+parseInt(_0x50c35b(0x1f6))/0x2*(parseInt(_0x50c35b(0x1eb))/0x3)+parseInt(_0x50c35b(0x1dc))/0x4*(-parseInt(_0x50c35b(0x1f0))/0x5)+-parseInt(_0x50c35b(0x1c7))/0x6+parseInt(_0x50c35b(0x1e0))/0x7*(-parseInt(_0x50c35b(0x1cd))/0x8)+-parseInt(_0x50c35b(0x1e6))/0x9+parseInt(_0x50c35b(0x1c9))/0xa;if(_0x58a41b===_0x391ada)break;else _0xfa2b11['push'](_0xfa2b11['shift']());}catch(_0x1caaa8){_0xfa2b11['push'](_0xfa2b11['shift']());}}}(a76_0x2501,0x7a407));import{listDatasets,listDeletedPages,restoreDataset}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';import{APPCODE_FLAG_OPTIONAL,CODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';const DATASET_ID_FLAG={'name':'id','type':'number','description':a76_0x4b70d0(0x1ef)},DBID_FLAG={'name':a76_0x4b70d0(0x1f9),'type':a76_0x4b70d0(0x1ec),'description':a76_0x4b70d0(0x1c0)},CONFIRM_FLAG={'name':a76_0x4b70d0(0x1e3),'type':'boolean','description':'Required\x20to\x20execute\x20dataset\x20restore'},EXPECTED_COUNT_FLAG={'name':'expected-count','type':a76_0x4b70d0(0x1ec),'description':a76_0x4b70d0(0x1d4)},DELETED_PAGE_SIZE=0x64;export const datasetRestore={'service':a76_0x4b70d0(0x1ce),'command':'restore','description':a76_0x4b70d0(0x1cb),'risk':a76_0x4b70d0(0x1d6),'flags':[DATASET_ID_FLAG,CODE_FLAG_OPTIONAL,DBID_FLAG,CONFIRM_FLAG,EXPECTED_COUNT_FLAG,APPCODE_FLAG_OPTIONAL],async 'validate'(_0x550915){const _0x48d9a6=a76_0x4b70d0,_0x30e5f0=_0x550915[_0x48d9a6(0x1d1)]('id'),_0x2fe8f9=_0x550915['str'](_0x48d9a6(0x1ea)),_0x316e0d=_0x550915[_0x48d9a6(0x1d1)](_0x48d9a6(0x1f9)),_0x172f7c=[_0x30e5f0>0x0,Boolean(_0x2fe8f9),_0x316e0d>0x0][_0x48d9a6(0x1de)](Boolean);if(_0x172f7c[_0x48d9a6(0x1d7)]===0x0)throw CliErrors['validation'](_0x48d9a6(0x1f1));if(_0x172f7c[_0x48d9a6(0x1d7)]>0x1)throw CliErrors[_0x48d9a6(0x1c5)](_0x48d9a6(0x1f8));},async 'dryRun'(_0x316034){const _0x5acdcc=a76_0x4b70d0,_0x19f035=await resolveTargets(_0x316034);return{'method':_0x5acdcc(0x1f4),'url':_0x5acdcc(0x1c4),'body':{'appCode':_0x316034[_0x5acdcc(0x1d5)],'count':_0x19f035[_0x5acdcc(0x1d7)],'datasets':_0x19f035},'description':_0x5acdcc(0x1c3)+_0x19f035[_0x5acdcc(0x1d7)]+_0x5acdcc(0x1cc)};},async 'execute'(_0x2982e9){const _0x1fda47=a76_0x4b70d0;if(!_0x2982e9[_0x1fda47(0x1d8)](_0x1fda47(0x1e3)))throw CliErrors[_0x1fda47(0x1c5)](_0x1fda47(0x1f2),_0x1fda47(0x1da));const _0x186b16=await resolveTargets(_0x2982e9),_0x10acf7=[],_0x42f214=[];for(const _0x4ea154 of _0x186b16){try{await restoreDataset(_0x2982e9[_0x1fda47(0x1d5)],_0x4ea154['id']),_0x10acf7['push'](_0x4ea154);}catch(_0x25fafb){_0x42f214[_0x1fda47(0x1ed)]({..._0x4ea154,'error':_0x25fafb instanceof Error?_0x25fafb[_0x1fda47(0x1d2)]:String(_0x25fafb)});}}if(_0x42f214[_0x1fda47(0x1d7)]>0x0)return{'ok':![],'data':{'requested':_0x186b16[_0x1fda47(0x1d7)],'restoredCount':_0x10acf7[_0x1fda47(0x1d7)],'failedCount':_0x42f214['length'],'restored':_0x10acf7,'failed':_0x42f214},'message':_0x1fda47(0x1c2)+_0x10acf7['length']+'/'+_0x186b16[_0x1fda47(0x1d7)]+_0x1fda47(0x1d0)+_0x42f214[_0x1fda47(0x1d7)]+_0x1fda47(0x1c8)};return{'ok':!![],'data':{'requested':_0x186b16[_0x1fda47(0x1d7)],'restoredCount':_0x10acf7[_0x1fda47(0x1d7)],'restored':_0x10acf7},'message':'Restored\x20'+_0x10acf7[_0x1fda47(0x1d7)]+_0x1fda47(0x1bf)};}};async function resolveTargets(_0x5acf2f){const _0x2eef62=a76_0x4b70d0,_0x62b8b=_0x5acf2f[_0x2eef62(0x1d1)]('id'),_0x17aba7=_0x5acf2f[_0x2eef62(0x1e1)]('code'),_0x4bff90=_0x5acf2f[_0x2eef62(0x1d1)]('dbid');let _0x375b67;_0x17aba7?(_0x375b67=await listDatasets(_0x5acf2f[_0x2eef62(0x1d5)],{'code':_0x17aba7,'deleted':!![]}),_0x375b67=_0x375b67[_0x2eef62(0x1de)](_0x290c55=>_0x290c55[_0x2eef62(0x1ea)]===_0x17aba7)):(_0x375b67=await listDatasets(_0x5acf2f['appCode'],{'deleted':!![]}),_0x62b8b>0x0&&(_0x375b67=_0x375b67[_0x2eef62(0x1de)](_0x5a9e65=>_0x5a9e65['id']===_0x62b8b)),_0x4bff90>0x0&&(_0x375b67=_0x375b67[_0x2eef62(0x1de)](_0x41319a=>_0x41319a[_0x2eef62(0x1f7)]?.[_0x2eef62(0x1e2)]===_0x4bff90)));const _0x303331=await loadDeletedRelatedPageCounts(_0x5acf2f[_0x2eef62(0x1d5)]),_0x4e4eb8=_0x375b67[_0x2eef62(0x1e7)](_0x1e9123=>normalizeTarget(_0x1e9123,_0x303331[_0x2eef62(0x1e8)](_0x1e9123['id'])??0x0));if(_0x4e4eb8[_0x2eef62(0x1d7)]===0x0){const _0x56c25b=_0x17aba7||(_0x62b8b>0x0?_0x2eef62(0x1cf)+_0x62b8b:_0x2eef62(0x1ca)+_0x4bff90);throw CliErrors[_0x2eef62(0x1c5)](_0x2eef62(0x1f3)+_0x56c25b+'.');}const _0xbd83ce=_0x5acf2f[_0x2eef62(0x1d1)](_0x2eef62(0x1fa));if(_0xbd83ce>0x0&&_0x4e4eb8['length']!==_0xbd83ce)throw CliErrors[_0x2eef62(0x1c5)](_0x2eef62(0x1fb)+_0x4e4eb8[_0x2eef62(0x1d7)]+_0x2eef62(0x1ee)+_0xbd83ce+'.');return _0x4e4eb8;}function a76_0x5d54(_0x2a8efd,_0x455d53){_0x2a8efd=_0x2a8efd-0x1bf;const _0x2501c8=a76_0x2501();let _0x5d5460=_0x2501c8[_0x2a8efd];return _0x5d5460;}async function loadDeletedRelatedPageCounts(_0x519535){const _0x575e63=a76_0x4b70d0,_0x336546=new Map();let _0x19f414=0x1;while(!![]){const _0x57f7d1=await listDeletedPages(_0x519535,'STANDARD',{'currentPage':_0x19f414,'pageSize':DELETED_PAGE_SIZE}),_0x10e676=Array[_0x575e63(0x1e4)](_0x57f7d1['tableData'])?_0x57f7d1[_0x575e63(0x1fc)]:[];for(const _0xf03fcf of _0x10e676){const _0x318229=Array['isArray'](_0xf03fcf[_0x575e63(0x1d9)])?new Set(_0xf03fcf['datasetIds'][_0x575e63(0x1e7)](_0xa190fa=>Number(_0xa190fa))['filter'](_0x32c97c=>Number[_0x575e63(0x1df)](_0x32c97c))):new Set();for(const _0x53556c of _0x318229){_0x336546['set'](_0x53556c,(_0x336546['get'](_0x53556c)??0x0)+0x1);}}const _0x541cca=_0x57f7d1['paging']?.[_0x575e63(0x1d3)]??_0x19f414,_0x46d8a8=_0x57f7d1[_0x575e63(0x1c1)]?.[_0x575e63(0x1c6)]??DELETED_PAGE_SIZE,_0x1fbe60=_0x57f7d1[_0x575e63(0x1c1)]?.['totalCount']??0x0;if(_0x10e676[_0x575e63(0x1d7)]===0x0||_0x46d8a8<=0x0||_0x541cca*_0x46d8a8>=_0x1fbe60)return _0x336546;const _0x45cdda=_0x541cca+0x1;if(_0x45cdda<=_0x19f414)return _0x336546;_0x19f414=_0x45cdda;}}function normalizeTarget(_0x4865ed,_0x45daa3){const _0x42bed0=a76_0x4b70d0,_0x458ca6=_0x4865ed[_0x42bed0(0x1f7)]??{};return{'id':_0x4865ed['id'],'code':_0x4865ed[_0x42bed0(0x1ea)],'name':_0x4865ed[_0x42bed0(0x1dd)],'description':_0x4865ed[_0x42bed0(0x1db)],'source':_0x4865ed[_0x42bed0(0x1e9)],'dbId':_0x458ca6[_0x42bed0(0x1e2)],'dbName':_0x458ca6['dbName'],'tableName':_0x458ca6[_0x42bed0(0x1e5)],'relatedPageCount':_0x45daa3};}function a76_0x2501(){const _0x2c9f1c=['datasetIds','Run\x20with\x20--dry-run\x20first,\x20then\x20add\x20--confirm\x20when\x20the\x20target\x20list\x20is\x20correct.','description','788gsFmlg','name','filter','isFinite','11956AkJsdI','str','dbId','confirm','isArray','tableName','5078835RFoWPP','map','get','source','code','1662MdVlVv','number','push','\x20dataset(s),\x20but\x20--expected-count\x20is\x20','Dataset\x20id','8785xxUtcK','One\x20of\x20--id,\x20--code,\x20or\x20--dbid\x20is\x20required.','--confirm\x20is\x20required\x20to\x20restore\x20datasets.','No\x20deleted\x20dataset\x20found\x20for\x20','POST','593253xtZeXX','416LKuuNZ','dbtableConfig','Use\x20only\x20one\x20of\x20--id,\x20--code,\x20or\x20--dbid.','dbid','expected-count','Matched\x20','tableData','\x20dataset(s)','Restore\x20all\x20deleted\x20datasets\x20under\x20this\x20database\x20connection\x20id','paging','Restored\x20','Would\x20restore\x20','/smartapi/dataset/restore-dataset','validation','pageSize','5499792rTnFNG','\x20failed','29134440ViNpUw','dbid=','Restore\x20deleted\x20dataset\x20metadata\x20by\x20id/code\x20or\x20all\x20deleted\x20datasets\x20under\x20a\x20db\x20id','\x20deleted\x20dataset(s)\x20and\x20related\x20deleted\x20page/menu\x20records.','504elEYfC','dataset','id=','\x20dataset(s);\x20','num','message','currentPage','Abort\x20unless\x20the\x20matched\x20dataset\x20count\x20equals\x20this\x20value','appCode','high-risk-write','length','bool'];a76_0x2501=function(){return _0x2c9f1c;};return a76_0x2501();}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const DB_ANALYSIS_MAX_TABLES_PER_BATCH = 10;
|
|
2
|
+
export declare const DB_ANALYSIS_BATCH_TARGET_BYTES = 960;
|
|
3
|
+
export declare const DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES = 1024;
|
|
4
|
+
export declare const DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE = 60;
|
|
5
|
+
export interface DbAnalysisPlanningEstimate {
|
|
6
|
+
basis: "heuristic";
|
|
7
|
+
assumedSecondsPerTable: number;
|
|
8
|
+
estimatedTotalSeconds: number;
|
|
9
|
+
estimatedTotalMinutes: number;
|
|
10
|
+
}
|
|
11
|
+
export interface DbAnalysisBatch {
|
|
12
|
+
index: number;
|
|
13
|
+
tableCount: number;
|
|
14
|
+
inputParamsBytes: number;
|
|
15
|
+
estimatedDurationSeconds: number;
|
|
16
|
+
tableNames: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface DbAnalysisBatchPlan {
|
|
19
|
+
dbLinkId: number;
|
|
20
|
+
tableCount: number;
|
|
21
|
+
batchCount: number;
|
|
22
|
+
maxTablesPerBatch: number;
|
|
23
|
+
maxSerializedBytesPerBatch: number;
|
|
24
|
+
serverInputParamsLimitBytes: number;
|
|
25
|
+
planningEstimate: DbAnalysisPlanningEstimate;
|
|
26
|
+
batches: DbAnalysisBatch[];
|
|
27
|
+
}
|
|
28
|
+
export declare function normalizeAnalysisTableNames(raw: string): string[];
|
|
29
|
+
export declare function measureAnalysisInputParamsBytes(dbLinkId: number, tableNames: string[]): number;
|
|
30
|
+
export declare function buildAnalysisBatchPlan(dbLinkId: number, tableNames: string[]): DbAnalysisBatchPlan;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
(function(_0x21fb57,_0x24734c){const _0x6b3b88=a77_0x4cd3,_0x1eb211=_0x21fb57();while(!![]){try{const _0x461e70=parseInt(_0x6b3b88(0x163))/0x1+-parseInt(_0x6b3b88(0x155))/0x2+parseInt(_0x6b3b88(0x162))/0x3+-parseInt(_0x6b3b88(0x157))/0x4*(parseInt(_0x6b3b88(0x153))/0x5)+-parseInt(_0x6b3b88(0x159))/0x6+-parseInt(_0x6b3b88(0x156))/0x7+parseInt(_0x6b3b88(0x154))/0x8*(parseInt(_0x6b3b88(0x15c))/0x9);if(_0x461e70===_0x24734c)break;else _0x1eb211['push'](_0x1eb211['shift']());}catch(_0x5d39b8){_0x1eb211['push'](_0x1eb211['shift']());}}}(a77_0x1f6f,0xe5ba2));function a77_0x4cd3(_0x38f053,_0x3f4266){_0x38f053=_0x38f053-0x14f;const _0x1f6f56=a77_0x1f6f();let _0x4cd3a5=_0x1f6f56[_0x38f053];return _0x4cd3a5;}import{CliErrors}from'../../errors.js';function a77_0x1f6f(){const _0x40737b=['\x20bytes,\x20limit\x20','heuristic','split','At\x20least\x20one\x20table\x20name\x20is\x20required\x20for\x20database\x20analysis\x20planning.','195cceCFM','53664QIaTtp','1720062OMKhAp','11392591dsaxnn','114220WRCHOL','\x20bytes.','9080322cdNvLa','add','length','5274UJaxCS','map','validation','push','has','Table\x20\x22','3191682gGZzgt','1060756CLvGhw','trim'];a77_0x1f6f=function(){return _0x40737b;};return a77_0x1f6f();}export const DB_ANALYSIS_MAX_TABLES_PER_BATCH=0xa;export const DB_ANALYSIS_BATCH_TARGET_BYTES=0x3c0;export const DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES=0x400;export const DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE=0x3c;export function normalizeAnalysisTableNames(_0x2d6a68){const _0x464d66=a77_0x4cd3,_0x437398=new Set(),_0x1fec7f=[];for(const _0x5565a4 of _0x2d6a68[_0x464d66(0x151)](',')){const _0x818498=_0x5565a4[_0x464d66(0x164)]();if(!_0x818498||_0x437398[_0x464d66(0x160)](_0x818498))continue;_0x437398[_0x464d66(0x15a)](_0x818498),_0x1fec7f[_0x464d66(0x15f)](_0x818498);}return _0x1fec7f;}export function measureAnalysisInputParamsBytes(_0x19d26d,_0x11439a){return Buffer['byteLength'](JSON['stringify']({'dbLinkId':_0x19d26d,'tableNames':_0x11439a}),'utf8');}export function buildAnalysisBatchPlan(_0x535223,_0x20fefa){const _0x24b186=a77_0x4cd3;if(_0x20fefa[_0x24b186(0x15b)]===0x0)throw CliErrors[_0x24b186(0x15e)](_0x24b186(0x152));const _0x211168=[];let _0x58944a=[];for(const _0x1cff6b of _0x20fefa){const _0x450c21=[..._0x58944a,_0x1cff6b],_0x31daf8=_0x450c21[_0x24b186(0x15b)]>DB_ANALYSIS_MAX_TABLES_PER_BATCH||measureAnalysisInputParamsBytes(_0x535223,_0x450c21)>DB_ANALYSIS_BATCH_TARGET_BYTES;_0x31daf8&&_0x58944a[_0x24b186(0x15b)]>0x0?(_0x211168[_0x24b186(0x15f)](_0x58944a),_0x58944a=[_0x1cff6b]):_0x58944a=_0x450c21;const _0x252b13=measureAnalysisInputParamsBytes(_0x535223,_0x58944a);if(_0x252b13>DB_ANALYSIS_BATCH_TARGET_BYTES)throw CliErrors[_0x24b186(0x15e)](_0x24b186(0x161)+_0x1cff6b+'\x22\x20cannot\x20fit\x20in\x20one\x20database\x20analysis\x20batch:\x20'+_0x252b13+_0x24b186(0x14f)+DB_ANALYSIS_BATCH_TARGET_BYTES+_0x24b186(0x158));}_0x58944a['length']>0x0&&_0x211168[_0x24b186(0x15f)](_0x58944a);const _0x313d1e=_0x211168[_0x24b186(0x15d)]((_0x35e51b,_0x2514b2)=>({'index':_0x2514b2+0x1,'tableCount':_0x35e51b[_0x24b186(0x15b)],'inputParamsBytes':measureAnalysisInputParamsBytes(_0x535223,_0x35e51b),'estimatedDurationSeconds':_0x35e51b['length']*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'tableNames':_0x35e51b})),_0x4d1ff8=_0x20fefa[_0x24b186(0x15b)]*DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE;return{'dbLinkId':_0x535223,'tableCount':_0x20fefa[_0x24b186(0x15b)],'batchCount':_0x313d1e['length'],'maxTablesPerBatch':DB_ANALYSIS_MAX_TABLES_PER_BATCH,'maxSerializedBytesPerBatch':DB_ANALYSIS_BATCH_TARGET_BYTES,'serverInputParamsLimitBytes':DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,'planningEstimate':{'basis':_0x24b186(0x150),'assumedSecondsPerTable':DB_ANALYSIS_ESTIMATED_SECONDS_PER_TABLE,'estimatedTotalSeconds':_0x4d1ff8,'estimatedTotalMinutes':Math['ceil'](_0x4d1ff8/0x3c)},'batches':_0x313d1e};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a78_0x441c4c=a78_0x2136;function a78_0x2136(_0x6a760e,_0x18aa5e){_0x6a760e=_0x6a760e-0xa0;const _0x235c8e=a78_0x235c();let _0x21365b=_0x235c8e[_0x6a760e];return _0x21365b;}(function(_0x4aee19,_0x29ef68){const _0x259df6=a78_0x2136,_0x2cd2a7=_0x4aee19();while(!![]){try{const _0x2585e6=-parseInt(_0x259df6(0xae))/0x1*(-parseInt(_0x259df6(0xaf))/0x2)+-parseInt(_0x259df6(0xa2))/0x3*(-parseInt(_0x259df6(0xb4))/0x4)+-parseInt(_0x259df6(0xb8))/0x5+parseInt(_0x259df6(0xb0))/0x6+-parseInt(_0x259df6(0xa4))/0x7+parseInt(_0x259df6(0xa7))/0x8*(parseInt(_0x259df6(0xb2))/0x9)+-parseInt(_0x259df6(0xb6))/0xa;if(_0x2585e6===_0x29ef68)break;else _0x2cd2a7['push'](_0x2cd2a7['shift']());}catch(_0x383db8){_0x2cd2a7['push'](_0x2cd2a7['shift']());}}}(a78_0x235c,0xcfc27));import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildAnalysisBatchPlan,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';function a78_0x235c(){const _0x3d739d=['12dtpcfr','read','25598670RTPgsi','Prepared\x20local\x20batch\x20plan\x20for\x20','802425wweLKg','\x20table(s)\x20in\x20','planningEstimate',';\x20estimated\x20about\x20','assumedSecondsPerTable','773958aLsbTy','Preview\x20deterministic\x20local\x20batches\x20and\x20heuristic\x20duration\x20estimates\x20without\x20creating\x20a\x20server\x20task\x20or\x20planId','341033ykGfmH','analyze-batch-plan','batchCount','21872foBLhe','\x20minute(s)\x20at\x20','string','num','tables','\x20serial\x20batch(es)\x20for\x20db\x20link\x20','estimatedTotalMinutes','9NhwFjc','241678DSKylR','2644542jyDMfC','\x20seconds\x20per\x20table;\x20no\x20server\x20task\x20or\x20planId\x20was\x20created','4338NsmPcQ','Comma-separated\x20table\x20names\x20to\x20split\x20into\x20safe\x20serial\x20batches'];a78_0x235c=function(){return _0x3d739d;};return a78_0x235c();}export const dbAnalyzeBatchPlan={'service':'db','command':a78_0x441c4c(0xa5),'description':a78_0x441c4c(0xa3),'risk':a78_0x441c4c(0xb5),'requiresAuth':![],'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'tables','type':a78_0x441c4c(0xa9),'required':!![],'description':a78_0x441c4c(0xb3)}],async 'execute'(_0x23d3c4){const _0x484992=a78_0x441c4c,_0x51e2f0=_0x23d3c4[_0x484992(0xaa)]('id'),_0x163a4f=normalizeAnalysisTableNames(_0x23d3c4['str'](_0x484992(0xab))),_0x3c5bdf=buildAnalysisBatchPlan(_0x51e2f0,_0x163a4f);return{'ok':!![],'data':_0x3c5bdf,'message':_0x484992(0xb7)+_0x3c5bdf['tableCount']+_0x484992(0xb9)+_0x3c5bdf[_0x484992(0xa6)]+_0x484992(0xac)+_0x51e2f0+_0x484992(0xa0)+_0x3c5bdf['planningEstimate'][_0x484992(0xad)]+_0x484992(0xa8)+_0x3c5bdf[_0x484992(0xba)][_0x484992(0xa1)]+_0x484992(0xb1)};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a79_0x86c2(_0x8fe328,_0x3c4a7f){_0x8fe328=_0x8fe328-0x134;const _0x56a5a6=a79_0x56a5();let _0x86c233=_0x56a5a6[_0x8fe328];return _0x86c233;}function a79_0x56a5(){const _0x905bb3=['Cancel\x20requested\x20for\x20plan\x20','504pPooxv','string','plan','456282cepTjS','6159132XnPaBl','41fvClQg','3012816hUAfRe','62022kcSxXv','9527478uFvrpt','606875gqKslr','write','str','3106017WACTOt','Cancel\x20an\x20existing\x20schema\x20analysis\x20by\x20explicit\x20plan\x20/\x20trace\x20id','num'];a79_0x56a5=function(){return _0x905bb3;};return a79_0x56a5();}const a79_0xd995e1=a79_0x86c2;(function(_0x3c868c,_0x5eb922){const _0xedc121=a79_0x86c2,_0x49bd59=_0x3c868c();while(!![]){try{const _0x412a95=-parseInt(_0xedc121(0x141))/0x1*(parseInt(_0xedc121(0x143))/0x2)+-parseInt(_0xedc121(0x138))/0x3+-parseInt(_0xedc121(0x142))/0x4+parseInt(_0xedc121(0x135))/0x5+parseInt(_0xedc121(0x134))/0x6+-parseInt(_0xedc121(0x140))/0x7+parseInt(_0xedc121(0x13c))/0x8*(parseInt(_0xedc121(0x13f))/0x9);if(_0x412a95===_0x5eb922)break;else _0x49bd59['push'](_0x49bd59['shift']());}catch(_0x299a1d){_0x49bd59['push'](_0x49bd59['shift']());}}}(a79_0x56a5,0xeb340));import{cancelDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbAnalyzeCancel={'service':'db','command':'analyze-cancel','description':a79_0xd995e1(0x139),'risk':a79_0xd995e1(0x136),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a79_0xd995e1(0x13e),'type':a79_0xd995e1(0x13d),'required':!![],'description':'Existing\x20analysis\x20plan\x20/\x20trace\x20id\x20to\x20cancel'}],async 'execute'(_0x4862be){const _0x4463f2=a79_0xd995e1,_0x45c158=_0x4862be[_0x4463f2(0x13a)]('id'),_0x2eefeb=_0x4862be[_0x4463f2(0x137)](_0x4463f2(0x13e));return await cancelDbAnalysis(_0x2eefeb),{'ok':!![],'data':{'dbLinkId':_0x45c158,'planId':_0x2eefeb},'message':_0x4463f2(0x13b)+_0x2eefeb};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a80_0x118e(){const _0x24f5e9=['\x20bytes,\x20limit\x20','string','\x20bytes.\x20Run\x20`','502HdVpJW','analyze-start','At\x20least\x20one\x20table\x20name\x20is\x20required\x20when\x20--tables\x20is\x20provided.','length','49368YSLwYv','tables','1505791OZypJQ','Comma-separated\x20table\x20names\x20for\x20incremental\x20analysis\x20(omit\x20for\x20full\x20analysis)','379oUbEAY','Targeted\x20database\x20analysis\x20payload\x20is\x20too\x20large:\x20','validation','\x20--tables\x20<tables>`\x20and\x20start\x20each\x20batch\x20serially.','4362wCTNHi','13DqiOJQ','Start\x20schema\x20analysis\x20(full\x20or\x20incremental\x20table\x20list).\x20Returns\x20planId\x20for\x20analyze-status','130VhZTEc','write','32oPicfp','175CuoLRD','104PMLHDR','187913ycQKzk','771642wDfBkh','4908312yWxkbp','str','\x20table(s),\x20'];a80_0x118e=function(){return _0x24f5e9;};return a80_0x118e();}const a80_0x5e3d42=a80_0x4dc5;(function(_0x3aa7ba,_0xca28e5){const _0x115a9b=a80_0x4dc5,_0x1683cf=_0x3aa7ba();while(!![]){try{const _0x1d6485=parseInt(_0x115a9b(0x1af))/0x1*(-parseInt(_0x115a9b(0x1a7))/0x2)+-parseInt(_0x115a9b(0x1b3))/0x3*(-parseInt(_0x115a9b(0x1ba))/0x4)+parseInt(_0x115a9b(0x1b9))/0x5*(parseInt(_0x115a9b(0x1ab))/0x6)+-parseInt(_0x115a9b(0x1ad))/0x7+parseInt(_0x115a9b(0x1b8))/0x8*(parseInt(_0x115a9b(0x1bc))/0x9)+parseInt(_0x115a9b(0x1b6))/0xa*(parseInt(_0x115a9b(0x1bb))/0xb)+-parseInt(_0x115a9b(0x1bd))/0xc*(parseInt(_0x115a9b(0x1b4))/0xd);if(_0x1d6485===_0xca28e5)break;else _0x1683cf['push'](_0x1683cf['shift']());}catch(_0x12ffdc){_0x1683cf['push'](_0x1683cf['shift']());}}}(a80_0x118e,0x29e1b));import{startDbAnalysis}from'../../core/api-client.js';import{DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks}from'../../commands/db/shared.js';import{DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES,measureAnalysisInputParamsBytes,normalizeAnalysisTableNames}from'../../commands/db/analysis-batching.js';function a80_0x4dc5(_0x472d6d,_0x3f0bc5){_0x472d6d=_0x472d6d-0x1a7;const _0x118ee8=a80_0x118e();let _0x4dc52f=_0x118ee8[_0x472d6d];return _0x4dc52f;}import{CLI_BIN_NAME}from'../../constant/cli.js';import{CliErrors}from'../../errors.js';export const dbAnalyzeStart={'service':'db','command':a80_0x5e3d42(0x1a8),'description':a80_0x5e3d42(0x1b5),'risk':a80_0x5e3d42(0x1b7),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':'tables','type':a80_0x5e3d42(0x1c1),'description':a80_0x5e3d42(0x1ae)}],async 'execute'(_0x48e792){const _0x26b6ab=a80_0x5e3d42,_0x5aab86=_0x48e792['num']('id'),_0x5743c7=_0x48e792[_0x26b6ab(0x1be)](_0x26b6ab(0x1ac)),_0x374a33=_0x48e792['flag'](_0x26b6ab(0x1ac))!==undefined,_0x2f1d97=_0x374a33?normalizeAnalysisTableNames(_0x5743c7):undefined;if(_0x2f1d97&&_0x2f1d97[_0x26b6ab(0x1aa)]===0x0)throw CliErrors[_0x26b6ab(0x1b1)](_0x26b6ab(0x1a9));if(_0x2f1d97&&_0x2f1d97['length']>0x0){const _0x32a2db=measureAnalysisInputParamsBytes(_0x5aab86,_0x2f1d97);if(_0x32a2db>DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES)throw CliErrors[_0x26b6ab(0x1b1)](_0x26b6ab(0x1b0)+_0x2f1d97['length']+_0x26b6ab(0x1bf)+_0x32a2db+_0x26b6ab(0x1c0)+DB_ANALYSIS_SERVER_INPUT_LIMIT_BYTES+_0x26b6ab(0x1c2)+CLI_BIN_NAME+'\x20db\x20analyze-batch-plan\x20--id\x20'+_0x5aab86+_0x26b6ab(0x1b2));}const {planId:_0x2db456,estimatedMinutes:_0x4cfd47,estimatedDurationDesc:_0x1e6fd0}=await startDbAnalysis(_0x5aab86,_0x2f1d97),_0x47acae=buildDbPageLinks(_0x48e792['appCode'],_0x5aab86);return{'ok':!![],'data':{'dbLinkId':_0x5aab86,'planId':_0x2db456,'tableNames':_0x2f1d97??[],'serverEstimate':{'estimatedMinutes':_0x4cfd47,'estimatedDurationDesc':_0x1e6fd0},..._0x47acae?{'links':_0x47acae}:{}},'message':'Started\x20analysis\x20for\x20db\x20link\x20'+_0x5aab86};}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a81_0x2f1c60=a81_0x9f7e;(function(_0x4f0739,_0xa1bfc9){const _0x5ce1b9=a81_0x9f7e,_0x3dd9a2=_0x4f0739();while(!![]){try{const _0x3f5220=parseInt(_0x5ce1b9(0x13f))/0x1+-parseInt(_0x5ce1b9(0x124))/0x2*(parseInt(_0x5ce1b9(0x13e))/0x3)+parseInt(_0x5ce1b9(0x130))/0x4*(-parseInt(_0x5ce1b9(0x140))/0x5)+-parseInt(_0x5ce1b9(0x146))/0x6+parseInt(_0x5ce1b9(0x11c))/0x7*(-parseInt(_0x5ce1b9(0x12c))/0x8)+parseInt(_0x5ce1b9(0x123))/0x9*(parseInt(_0x5ce1b9(0x142))/0xa)+parseInt(_0x5ce1b9(0x118))/0xb;if(_0x3f5220===_0xa1bfc9)break;else _0x3dd9a2['push'](_0x3dd9a2['shift']());}catch(_0x1b2407){_0x3dd9a2['push'](_0x3dd9a2['shift']());}}}(a81_0x147d,0x319a4));function a81_0x9f7e(_0x4b5351,_0x401b23){_0x4b5351=_0x4b5351-0x116;const _0x147d9=a81_0x147d();let _0x9f7eb9=_0x147d9[_0x4b5351];return _0x9f7eb9;}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(['SUCCESS',a81_0x2f1c60(0x122),a81_0x2f1c60(0x144),a81_0x2f1c60(0x143)]);export const dbAnalyzeStatus={'service':'db','command':a81_0x2f1c60(0x12d),'description':a81_0x2f1c60(0x136),'risk':a81_0x2f1c60(0x11d),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,{'name':a81_0x2f1c60(0x128),'type':a81_0x2f1c60(0x11e),'required':!![],'description':a81_0x2f1c60(0x11b)}],async 'execute'(_0x6d157a){const _0xe3ffda=a81_0x2f1c60,_0x14981c=_0x6d157a[_0xe3ffda(0x131)]('id'),_0x1aca31=_0x6d157a[_0xe3ffda(0x11f)](_0xe3ffda(0x128)),_0x58a6ae=await getDbAnalysisStatus(_0x1aca31),_0x41705a=TERMINAL_STATUSES[_0xe3ffda(0x134)](_0x58a6ae[_0xe3ffda(0x12f)]??''),{parsedJobContext:_0x4d24f7,jobContextParseWarning:_0x21bc13}=parseJobContext(_0x58a6ae['jobContext']),{requestedAnalysis:_0x2f1913,requestedAnalysisParseWarning:_0x177f8f}=parseRequestedAnalysis(_0x58a6ae[_0xe3ffda(0x12a)]),_0x3ad0b6=readAccumulatedErrorTypeCounts(_0x4d24f7),_0x39d85c=calculateAttemptElapsedMs(_0x58a6ae,_0x41705a),_0x5928cf=calculateElapsedFromStart(_0x58a6ae[_0xe3ffda(0x121)],_0x58a6ae['endTime'],_0x41705a),_0x1ac3bb=detectMultipleAttempts(_0x58a6ae),_0x5a0209=buildDbPageLinks(_0x6d157a['appCode'],_0x14981c);return{'ok':!![],'data':{'dbLinkId':_0x14981c,'planId':_0x1aca31,'status':_0x58a6ae,'requestedAnalysis':_0x2f1913,'requestedAnalysisParseWarning':_0x177f8f,'parsedJobContext':_0x4d24f7,'accumulatedErrorTypeCounts':_0x3ad0b6,'accumulatedErrorTypeCountsAdvisory':_0x3ad0b6?_0xe3ffda(0x117):_0xe3ffda(0x116),'isTerminal':_0x41705a,'isRetrying':_0x58a6ae[_0xe3ffda(0x12f)]===_0xe3ffda(0x133),'attemptElapsedMs':_0x39d85c,'totalElapsedMs':_0x5928cf,'hasMultipleAttempts':_0x1ac3bb,'jobContextParseWarning':_0x21bc13,..._0x5a0209?{'links':_0x5a0209}:{}},'message':_0xe3ffda(0x125)+_0x1aca31};}};function parseRequestedAnalysis(_0x43c991){const _0x2952cf=a81_0x2f1c60,_0x3f7ed5={'mode':_0x2952cf(0x11a),'tableCount':null,'tableNames':null};if(!_0x43c991?.[_0x2952cf(0x137)]())return{'requestedAnalysis':_0x3f7ed5,'requestedAnalysisParseWarning':_0x2952cf(0x13d)};try{const _0x29342f=JSON[_0x2952cf(0x13b)](_0x43c991);if(!_0x29342f||typeof _0x29342f!==_0x2952cf(0x120)||Array['isArray'](_0x29342f))throw new Error(_0x2952cf(0x139));const _0x14b59b=_0x29342f[_0x2952cf(0x129)];if(_0x14b59b===undefined||_0x14b59b===null)return{'requestedAnalysis':{'mode':_0x2952cf(0x12e),'tableCount':null,'tableNames':null},'requestedAnalysisParseWarning':null};if(Array['isArray'](_0x14b59b)&&_0x14b59b[_0x2952cf(0x141)](_0x4f465a=>typeof _0x4f465a===_0x2952cf(0x11e)))return{'requestedAnalysis':{'mode':_0x14b59b[_0x2952cf(0x119)]>0x0?'TARGETED':_0x2952cf(0x12e),'tableCount':_0x14b59b['length'],'tableNames':_0x14b59b},'requestedAnalysisParseWarning':null};}catch{}return{'requestedAnalysis':_0x3f7ed5,'requestedAnalysisParseWarning':_0x2952cf(0x145)};}function a81_0x147d(){const _0x15f0c9=['CANCELLED','FAILED','inputParams\x20does\x20not\x20contain\x20a\x20valid\x20analysis\x20request\x20object.','326340gTGPmj','accumulatedErrorTypeCounts','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20unavailable;\x20use\x20task\x20status\x20for\x20lifecycle\x20and\x20db\x20diff\x20for\x20convergence.','Server-provided\x20accumulated\x20failure\x20counts\x20are\x20reference\x20only;\x20do\x20not\x20use\x20them\x20for\x20automatic\x20decisions\x20until\x20the\x20server\x20contract\x20is\x20verified.','1061126AfCbBs','length','UNKNOWN','Analysis\x20plan\x20/\x20trace\x20id\x20(from\x20analyze-start\x20or\x20db\x20list\x20latestAnalysisTraceId)','427fGSSpT','read','string','str','object','firstStartTime','PARTIAL_SUCCESS','2766753RdoczO','2MVinrN','Analysis\x20status\x20for\x20','isArray','jobContext\x20is\x20not\x20a\x20valid\x20JSON\x20object.','plan','tableNames','inputParams','number','6064cyBRnU','analyze-status','FULL','status','19172OkRXTV','num','startTime','RETRYING','has','isNaN','Fetch\x20schema\x20analysis\x20job\x20status\x20by\x20plan\x20/\x20trace\x20id','trim','now','inputParams\x20is\x20not\x20an\x20object','costTimeMs','parse','isFinite','Original\x20analysis\x20request\x20scope\x20is\x20unavailable\x20because\x20inputParams\x20is\x20missing.','108933OsDZQI','142327YGZPYP','215yIvWgg','every','10snuznh'];a81_0x147d=function(){return _0x15f0c9;};return a81_0x147d();}function readAccumulatedErrorTypeCounts(_0x447c56){const _0x298bfc=a81_0x2f1c60,_0x45939f=_0x447c56?.[_0x298bfc(0x147)];if(!_0x45939f||typeof _0x45939f!==_0x298bfc(0x120)||Array[_0x298bfc(0x126)](_0x45939f))return null;if(Object['keys'](_0x45939f)[_0x298bfc(0x119)]===0x0)return null;return _0x45939f;}function parseJobContext(_0x4de72d){const _0x490be5=a81_0x2f1c60;if(!_0x4de72d?.[_0x490be5(0x137)]())return{'parsedJobContext':null,'jobContextParseWarning':null};try{const _0x2761a6=JSON[_0x490be5(0x13b)](_0x4de72d);if(_0x2761a6&&typeof _0x2761a6===_0x490be5(0x120)&&!Array['isArray'](_0x2761a6))return{'parsedJobContext':_0x2761a6,'jobContextParseWarning':null};}catch{}return{'parsedJobContext':null,'jobContextParseWarning':_0x490be5(0x127)};}function calculateAttemptElapsedMs(_0xa0898a,_0x2de7c6){const _0x22bc04=a81_0x2f1c60;if(typeof _0xa0898a[_0x22bc04(0x13a)]===_0x22bc04(0x12b)&&Number[_0x22bc04(0x13c)](_0xa0898a[_0x22bc04(0x13a)])&&_0xa0898a['costTimeMs']>=0x0)return _0xa0898a[_0x22bc04(0x13a)];return calculateElapsedFromStart(_0xa0898a[_0x22bc04(0x132)],_0xa0898a['endTime'],_0x2de7c6);}function calculateElapsedFromStart(_0x67d249,_0x538a3a,_0x2357ce){const _0x1a6c99=a81_0x2f1c60,_0x3c4789=toTimestamp(_0x67d249);if(_0x3c4789===null)return null;const _0x45b91c=toTimestamp(_0x538a3a),_0x701127=_0x45b91c??(_0x2357ce?null:Date[_0x1a6c99(0x138)]());if(_0x701127===null||_0x701127<_0x3c4789)return null;return _0x701127-_0x3c4789;}function detectMultipleAttempts(_0x5c9f34){const _0xe142f=a81_0x2f1c60,_0x6646cc=toTimestamp(_0x5c9f34['firstStartTime']),_0x1c2629=toTimestamp(_0x5c9f34[_0xe142f(0x132)]);return _0x6646cc!==null&&_0x1c2629!==null&&_0x6646cc!==_0x1c2629;}function toTimestamp(_0x4c95f6){const _0x52b94c=a81_0x2f1c60;if(typeof _0x4c95f6==='number')return Number[_0x52b94c(0x13c)](_0x4c95f6)?_0x4c95f6:null;if(typeof _0x4c95f6!==_0x52b94c(0x11e)||_0x4c95f6[_0x52b94c(0x137)]()==='')return null;const _0x2adb6d=Number(_0x4c95f6);if(Number[_0x52b94c(0x13c)](_0x2adb6d))return _0x2adb6d;const _0x42bddd=Date[_0x52b94c(0x13b)](_0x4c95f6);return Number[_0x52b94c(0x135)](_0x42bddd)?null:_0x42bddd;}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a82_0x428fdd=a82_0x4597;(function(_0x25b69c,_0x531714){const _0x4fb63c=a82_0x4597,_0x2a77b5=_0x25b69c();while(!![]){try{const _0x585b20=parseInt(_0x4fb63c(0xd8))/0x1*(-parseInt(_0x4fb63c(0xd4))/0x2)+-parseInt(_0x4fb63c(0xf1))/0x3*(-parseInt(_0x4fb63c(0xee))/0x4)+-parseInt(_0x4fb63c(0xea))/0x5+parseInt(_0x4fb63c(0xef))/0x6*(parseInt(_0x4fb63c(0xdb))/0x7)+parseInt(_0x4fb63c(0xde))/0x8+-parseInt(_0x4fb63c(0xcf))/0x9+parseInt(_0x4fb63c(0xc6))/0xa*(parseInt(_0x4fb63c(0xe0))/0xb);if(_0x585b20===_0x531714)break;else _0x2a77b5['push'](_0x2a77b5['shift']());}catch(_0x21b81b){_0x2a77b5['push'](_0x2a77b5['shift']());}}}(a82_0x3115,0xef3b9));import{createDbLink,startDbAnalysis}from'../../core/api-client.js';import{CliErrors}from'../../errors.js';function a82_0x4597(_0x428e4c,_0x1baf76){_0x428e4c=_0x428e4c-0xc5;const _0x311502=a82_0x3115();let _0x4597c3=_0x311502[_0x428e4c];return _0x4597c3;}import{APPCODE_FLAG_OPTIONAL,DB_TYPE_FLAG}from'../../commands/common/flags.js';import{buildDbPageLinks,sanitizeDbLinkForOutput,validateDbUrl}from'../../commands/db/shared.js';import{normalizeEntityWithIdResponse}from'../../utils/entity-with-id.js';export const dbCreate={'service':'db','command':a82_0x428fdd(0xda),'description':a82_0x428fdd(0xe8),'risk':a82_0x428fdd(0xeb),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a82_0x428fdd(0xc7),'type':a82_0x428fdd(0xd3),'required':!![],'description':a82_0x428fdd(0xd1)},DB_TYPE_FLAG,{'name':a82_0x428fdd(0xf4),'type':a82_0x428fdd(0xd3),'description':a82_0x428fdd(0xf0),'default':a82_0x428fdd(0xe3)},{'name':a82_0x428fdd(0xd2),'type':a82_0x428fdd(0xd3),'required':!![],'description':a82_0x428fdd(0xe2)},{'name':'username','type':'string','required':!![],'description':a82_0x428fdd(0xf3)},{'name':a82_0x428fdd(0xc9),'type':a82_0x428fdd(0xd3),'required':!![],'description':a82_0x428fdd(0xd5)},{'name':'dbparam','type':a82_0x428fdd(0xd3),'description':'Extra\x20JDBC-style\x20connection\x20parameters\x20string'},{'name':'dbdesc','type':'string','description':a82_0x428fdd(0xe5)},{'name':a82_0x428fdd(0xdd),'type':'boolean','description':'After\x20create,\x20start\x20schema\x20analysis','default':![]}],async 'validate'(_0x58b70c){const _0x1e958d=a82_0x428fdd,_0x56c18f=_0x58b70c['str'](_0x1e958d(0xd2))[_0x1e958d(0xdc)]();if(!validateDbUrl(_0x56c18f))throw CliErrors[_0x1e958d(0xca)](_0x1e958d(0xd6)+_0x56c18f+'\x22',_0x1e958d(0xce));},async 'dryRun'(_0x3eb082){const _0x108bf5=a82_0x428fdd,_0x30d63c={'appCode':_0x3eb082[_0x108bf5(0xe6)],'dbName':_0x3eb082[_0x108bf5(0xec)]('dbname'),'dbType':_0x3eb082['str']('dbtype'),'dbVersion':_0x3eb082[_0x108bf5(0xec)](_0x108bf5(0xf4))||_0x108bf5(0xe3),'dbUrl':_0x3eb082[_0x108bf5(0xec)](_0x108bf5(0xd2))[_0x108bf5(0xdc)](),'username':_0x3eb082['str']('username'),'password':_0x108bf5(0xed),..._0x3eb082[_0x108bf5(0xec)]('dbparam')?{'dbParam':_0x3eb082[_0x108bf5(0xec)]('dbparam')}:{},..._0x3eb082[_0x108bf5(0xec)]('dbdesc')?{'dbDesc':_0x3eb082[_0x108bf5(0xec)](_0x108bf5(0xe1))}:{}};return{'method':_0x108bf5(0xcd),'url':_0x108bf5(0xd0),'body':_0x30d63c,'description':[_0x108bf5(0xd9),_0x3eb082[_0x108bf5(0xdf)](_0x108bf5(0xdd))?'Then\x20POST\x20start\x20analysis\x20for\x20returned\x20id':_0x108bf5(0xcc)]['join']('\x0a')};},async 'execute'(_0x358dea){const _0x43d96b=a82_0x428fdd,_0x409406={'appCode':_0x358dea[_0x43d96b(0xe6)],'dbName':_0x358dea[_0x43d96b(0xec)](_0x43d96b(0xc7)),'dbType':_0x358dea[_0x43d96b(0xec)]('dbtype'),'dbVersion':_0x358dea[_0x43d96b(0xec)](_0x43d96b(0xf4))||_0x43d96b(0xe3),'dbUrl':_0x358dea['str'](_0x43d96b(0xd2))[_0x43d96b(0xdc)](),'username':_0x358dea[_0x43d96b(0xec)]('username'),'password':_0x358dea[_0x43d96b(0xec)](_0x43d96b(0xc9)),..._0x358dea[_0x43d96b(0xec)](_0x43d96b(0xf2))?{'dbParam':_0x358dea[_0x43d96b(0xec)](_0x43d96b(0xf2))}:{},..._0x358dea[_0x43d96b(0xec)](_0x43d96b(0xe1))?{'dbDesc':_0x358dea['str'](_0x43d96b(0xe1))}:{}},{id:_0x38716d,entity:_0x20d698}=normalizeEntityWithIdResponse(await createDbLink(_0x409406));if(!_0x38716d)return{'ok':![],'message':_0x43d96b(0xcb),'data':sanitizeDbLinkForOutput(_0x20d698)};let _0x56dcfc,_0x3b5fbb;if(_0x358dea[_0x43d96b(0xdf)](_0x43d96b(0xdd)))try{_0x56dcfc=(await startDbAnalysis(_0x38716d))[_0x43d96b(0xc5)];}catch(_0x2410cf){_0x3b5fbb=_0x2410cf instanceof Error?_0x2410cf[_0x43d96b(0xe9)]:String(_0x2410cf);}const _0x1e518=buildDbPageLinks(_0x358dea[_0x43d96b(0xe6)],_0x38716d),_0x3c1166={'connection':sanitizeDbLinkForOutput(_0x20d698),..._0x1e518?{'links':{'databasePage':_0x1e518[_0x43d96b(0xe7)]}}:{},..._0x56dcfc?{'analysisPlanId':_0x56dcfc}:{},..._0x3b5fbb?{'analysisStartWarning':_0x3b5fbb}:{}};let _0x54a018;return _0x358dea['bool'](_0x43d96b(0xdd))?_0x3b5fbb?_0x54a018=_0x43d96b(0xc8)+_0x38716d+_0x43d96b(0xd7):_0x54a018=_0x43d96b(0xc8)+_0x38716d+_0x43d96b(0xe4):_0x54a018=_0x43d96b(0xc8)+_0x38716d,{'ok':!![],'data':_0x3c1166,'message':_0x54a018};}};function a82_0x3115(){const _0x5648f5=['/smartapi/dblink/create','Logical\x20database\x20/\x20schema\x20name\x20on\x20the\x20server','dburl','string','44vfoSUY','Database\x20password','Invalid\x20--dburl:\x20expected\x20host:port\x20(e.g.\x20db.example.com:3306),\x20got\x20\x22',';\x20schema\x20analysis\x20failed\x20to\x20start\x20—\x20see\x20data.analysisStartWarning','83929QqxkHm','Create\x20dblink','create','217MJodLZ','trim','autostart','12144392BsfBUC','bool','38108510bJCfTC','dbdesc','Host\x20and\x20port:\x20host:port','8.0','\x20and\x20started\x20analysis','Human-readable\x20description','appCode','databasePage','Create\x20a\x20new\x20database\x20connection\x20(dblink).\x20Optionally\x20auto-start\x20schema\x20analysis\x20after\x20creation','message','5992585dpADXF','write','str','[redacted]','32ZphxWl','27270MBFOGM','Server\x20version\x20string\x20(default:\x208.0\x20when\x20omitted)','164121fnTufv','dbparam','Database\x20username','dbversion','planId','10NuUvqa','dbname','Created\x20db\x20link\x20','password','validation','Create\x20returned\x20no\x20id\x20—\x20check\x20API\x20response','No\x20follow-up\x20analysis','POST','Check\x20firewall\x20allowlist\x20and\x20connection\x20string\x20format.','13825422cLCwoB'];a82_0x3115=function(){return _0x5648f5;};return a82_0x3115();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a83_0x5404fd=a83_0x131f;(function(_0x5b5ce2,_0x23e8ee){const _0x42b0d5=a83_0x131f,_0x435fde=_0x5b5ce2();while(!![]){try{const _0x1bed80=-parseInt(_0x42b0d5(0xd6))/0x1+parseInt(_0x42b0d5(0xd7))/0x2+parseInt(_0x42b0d5(0xd1))/0x3+parseInt(_0x42b0d5(0xce))/0x4*(parseInt(_0x42b0d5(0xcb))/0x5)+parseInt(_0x42b0d5(0xd5))/0x6*(parseInt(_0x42b0d5(0xcd))/0x7)+parseInt(_0x42b0d5(0xd2))/0x8*(parseInt(_0x42b0d5(0xd4))/0x9)+parseInt(_0x42b0d5(0xca))/0xa*(-parseInt(_0x42b0d5(0xd0))/0xb);if(_0x1bed80===_0x23e8ee)break;else _0x435fde['push'](_0x435fde['shift']());}catch(_0x300f46){_0x435fde['push'](_0x435fde['shift']());}}}(a83_0x401f,0x239ca));import{deleteDbLink}from'../../core/api-client.js';function a83_0x131f(_0x290486,_0xbd974){_0x290486=_0x290486-0xca;const _0x401ff2=a83_0x401f();let _0x131fd4=_0x401ff2[_0x290486];return _0x131fd4;}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbDelete={'service':'db','command':a83_0x5404fd(0xd3),'description':'Logically\x20delete\x20a\x20database\x20connection\x20(dblink)','risk':a83_0x5404fd(0xcf),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x3a9fab){const _0x4bb6ce=a83_0x5404fd,_0x11ef7e=_0x3a9fab[_0x4bb6ce(0xcc)]('id');return await deleteDbLink(_0x11ef7e),{'ok':!![],'data':{'id':_0x11ef7e,'deleted':!![]},'message':'Deleted\x20db\x20link\x20'+_0x11ef7e};}};function a83_0x401f(){const _0x4a45ad=['4AXhSfM','high-risk-write','95062lERmvl','427404aQDExZ','32ZZhQBW','delete','521406IVBTay','1138476NeujMc','244840FdJbir','483054HNKvzc','590iEYNfC','475535CgXWcF','num','7kiqMTf'];a83_0x401f=function(){return _0x4a45ad;};return a83_0x401f();}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a84_0x5bd4(_0x95291a,_0x3afde6){_0x95291a=_0x95291a-0xd2;const _0xa577e1=a84_0xa577();let _0x5bd4d8=_0xa577e1[_0x95291a];return _0x5bd4d8;}const a84_0x377dd6=a84_0x5bd4;function a84_0xa577(){const _0x5270a9=['1441AohMcb','read','db\x20link\x20','2lQaFwt','100568FNAgaJ','355956mYubWn','9733570grbwDr','1089VFrDLg','num','186424WHDGOL','236890JTWHRB','1052207CjxmNT','102nnFsSF','dbName','Get\x20one\x20database\x20connection\x20by\x20id\x20(metadata\x20+\x20analysis\x20fields;\x20password\x20redacted)','1557450mEaWnZ'];a84_0xa577=function(){return _0x5270a9;};return a84_0xa577();}(function(_0x4c5ef7,_0x16849d){const _0x218688=a84_0x5bd4,_0x3cbbdd=_0x4c5ef7();while(!![]){try{const _0x3fdfa1=parseInt(_0x218688(0xd9))/0x1*(-parseInt(_0x218688(0xe1))/0x2)+parseInt(_0x218688(0xda))/0x3*(-parseInt(_0x218688(0xd7))/0x4)+parseInt(_0x218688(0xdd))/0x5+parseInt(_0x218688(0xd3))/0x6+-parseInt(_0x218688(0xd4))/0x7+-parseInt(_0x218688(0xd2))/0x8*(-parseInt(_0x218688(0xd5))/0x9)+parseInt(_0x218688(0xd8))/0xa*(parseInt(_0x218688(0xde))/0xb);if(_0x3fdfa1===_0x16849d)break;else _0x3cbbdd['push'](_0x3cbbdd['shift']());}catch(_0x26d1bf){_0x3cbbdd['push'](_0x3cbbdd['shift']());}}}(a84_0xa577,0xec4a5));import{getDbLinkInfo}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{sanitizeDbLinkForOutput}from'../../commands/db/shared.js';export const dbDetail={'service':'db','command':'detail','description':a84_0x377dd6(0xdc),'risk':a84_0x377dd6(0xdf),'requiresAppCode':![],'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x44551f){const _0x49c971=a84_0x377dd6,_0x51f670=_0x44551f[_0x49c971(0xd6)]('id'),_0x41c9e2=await getDbLinkInfo(_0x51f670);return{'ok':!![],'data':sanitizeDbLinkForOutput(_0x41c9e2),'message':_0x49c971(0xe0)+_0x51f670+':\x20'+_0x41c9e2[_0x49c971(0xdb)]};}};
|
package/lib/commands/db/diff.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
const a85_0x1d495e=a85_0x95cc;(function(_0x3b465c,_0x12a673){const _0xb0042d=a85_0x95cc,_0x2b1218=_0x3b465c();while(!![]){try{const _0x5b3bae=-parseInt(_0xb0042d(0xe2))/0x1+parseInt(_0xb0042d(0x100))/0x2*(-parseInt(_0xb0042d(0xfe))/0x3)+parseInt(_0xb0042d(0xe3))/0x4+-parseInt(_0xb0042d(0x101))/0x5*(parseInt(_0xb0042d(0xf2))/0x6)+parseInt(_0xb0042d(0xe4))/0x7+parseInt(_0xb0042d(0xdc))/0x8*(parseInt(_0xb0042d(0xdd))/0x9)+-parseInt(_0xb0042d(0xd6))/0xa;if(_0x5b3bae===_0x12a673)break;else _0x2b1218['push'](_0x2b1218['shift']());}catch(_0x2a2f13){_0x2b1218['push'](_0x2b1218['shift']());}}}(a85_0x3612,0x4d1ca));import{getDbTableDiff}from'../../core/api-client.js';function a85_0x3612(){const _0x4575c5=['datasetTableCount','6616RxtLyk','2403QLGxpf','fromEntries','modifiedColumns','boolean','string','376433NlTXQO','2228796hGCeMo','2343817OVWXeu','diff','changed-only','Exclude\x20ALREADY_ANALYZED\x20rows\x20while\x20keeping\x20deleted\x20tables','Page\x20index\x20(1-based)','summary','table','str','ALREADY_ANALYZED','values','totalCount','fieldDiff','filter','length','20544SBcjcv','number','Incomplete\x20db\x20diff\x20pagination:\x20collected\x20','\x20row(s),\x20total\x20','page','DELETED_TABLE','read','bool','tableName','Fetch\x20and\x20aggregate\x20every\x20page\x20(overrides\x20--page\x20and\x20--pagesize)','pagesize','diffType','32472cWYQft','num','24wixgpV','280jivGAH','Compare\x20datasets\x20with\x20physical\x20database\x20tables\x20and\x20show\x20schema\x20drift','appCode','size','\x20of\x20','tableList','map','\x20row(s).','validation','989240Muvpnq','NEW_TABLE','all','physicalTableCount','MODIFIED_TABLE'];a85_0x3612=function(){return _0x4575c5;};return a85_0x3612();}import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';import{CliErrors}from'../../errors.js';const ALL_PAGE_SIZE=0x64,DIFF_TYPES=[a85_0x1d495e(0xd7),a85_0x1d495e(0xda),a85_0x1d495e(0xf7),a85_0x1d495e(0xec)];export const dbDiff={'service':'db','command':a85_0x1d495e(0xe5),'description':a85_0x1d495e(0x102),'risk':a85_0x1d495e(0xf8),'flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL,{'name':a85_0x1d495e(0xea),'type':a85_0x1d495e(0xe1),'description':'Filter\x20table\x20name\x20(substring\x20match\x20on\x20server)'},{'name':a85_0x1d495e(0xf6),'type':a85_0x1d495e(0xf3),'description':a85_0x1d495e(0xe8),'default':0x1},{'name':a85_0x1d495e(0xfc),'type':a85_0x1d495e(0xf3),'description':'Page\x20size','default':0x14},{'name':a85_0x1d495e(0xd8),'type':a85_0x1d495e(0xe0),'description':a85_0x1d495e(0xfb)},{'name':a85_0x1d495e(0xe6),'type':a85_0x1d495e(0xe0),'description':a85_0x1d495e(0xe7)}],async 'execute'(_0x44e1f3){const _0x2275c2=a85_0x1d495e,_0x4e0c6d=_0x44e1f3[_0x2275c2(0xff)]('id'),_0x2c37c4=_0x44e1f3['bool'](_0x2275c2(0xd8)),_0x2ba6dd=_0x44e1f3[_0x2275c2(0xf9)]('changed-only'),_0x300fd5=_0x2c37c4?0x1:_0x44e1f3[_0x2275c2(0xff)](_0x2275c2(0xf6),0x1)||0x1,_0x53f4f2=_0x2c37c4?ALL_PAGE_SIZE:_0x44e1f3[_0x2275c2(0xff)](_0x2275c2(0xfc),0x14)||0x14,_0x3aea6c=_0x44e1f3[_0x2275c2(0xeb)]('table')||undefined,_0x2e446b=_0x2c37c4?await getAllDbTableDiff(_0x44e1f3['appCode'],_0x4e0c6d,_0x3aea6c):await getDbTableDiff(_0x44e1f3[_0x2275c2(0x103)],_0x4e0c6d,{'pageIndex':_0x300fd5,'pageSize':_0x53f4f2,'tableName':_0x3aea6c}),_0x4912d4=_0x2e446b[_0x2275c2(0x106)],_0x111906=_0x2ba6dd?_0x4912d4['filter'](_0x4c79c6=>_0x4c79c6[_0x2275c2(0xfd)]!==_0x2275c2(0xec)):_0x4912d4,_0x3af667=Object[_0x2275c2(0xde)](DIFF_TYPES[_0x2275c2(0x107)](_0x209431=>[_0x209431,_0x4912d4['filter'](_0x5d29b5=>_0x5d29b5['diffType']===_0x209431)[_0x2275c2(0xf1)]])),_0x59e2af=_0x4912d4[_0x2275c2(0xf0)](_0x473571=>_0x473571[_0x2275c2(0xfd)]==='NEW_TABLE'||_0x473571['diffType']===_0x2275c2(0xda))[_0x2275c2(0x107)](_0x5b215d=>_0x5b215d[_0x2275c2(0xfa)]),_0x339be4=_0x4912d4[_0x2275c2(0xf0)](_0x54ee5c=>_0x54ee5c[_0x2275c2(0xfd)]===_0x2275c2(0xf7))[_0x2275c2(0x107)](_0x4ac58b=>_0x4ac58b['tableName']),_0x230fcb=_0x4912d4['filter'](_0x5e6b95=>_0x5e6b95[_0x2275c2(0xfd)]===_0x2275c2(0xda))[_0x2275c2(0x107)](_0xbd689b=>({'tableName':_0xbd689b[_0x2275c2(0xfa)],'addedColumns':_0xbd689b[_0x2275c2(0xef)]?.['addedColumns']??[],'deletedColumns':_0xbd689b[_0x2275c2(0xef)]?.['deletedColumns']??[],'modifiedColumns':_0xbd689b[_0x2275c2(0xef)]?.[_0x2275c2(0xdf)]??[]}));return{'ok':!![],'data':{'dbLinkId':_0x4e0c6d,'page':_0x300fd5,'pageSize':_0x53f4f2,'totalCount':_0x2e446b[_0x2275c2(0xee)],'physicalTableCount':_0x2e446b[_0x2275c2(0xd9)],'datasetTableCount':_0x2e446b[_0x2275c2(0xdb)],..._0x2e446b['summary']?{'summary':_0x2e446b[_0x2275c2(0xe9)]}:{},'summaryByType':_0x3af667,'toAnalyzeTables':_0x59e2af,'deletedTables':_0x339be4,'modifiedFieldDiffs':_0x230fcb,'tables':_0x111906,'tableList':_0x111906},'message':_0x111906[_0x2275c2(0xf1)]+_0x2275c2(0xf5)+_0x2e446b[_0x2275c2(0xee)]+'\x20(db\x20link\x20'+_0x4e0c6d+')'};}};function a85_0x95cc(_0xb754c5,_0x45e682){_0xb754c5=_0xb754c5-0xd6;const _0x3612f7=a85_0x3612();let _0x95cc65=_0x3612f7[_0xb754c5];return _0x95cc65;}async function getAllDbTableDiff(_0xf00107,_0x46df3a,_0x5cdfc6){const _0x2f78ff=a85_0x1d495e,_0x3b6ad3=new Map();let _0x359892=0x1,_0x11b332=null;while(!![]){_0x11b332=await getDbTableDiff(_0xf00107,_0x46df3a,{'pageIndex':_0x359892,'pageSize':ALL_PAGE_SIZE,'tableName':_0x5cdfc6});const _0x538f44=_0x3b6ad3[_0x2f78ff(0x104)];for(const _0x12f3c4 of _0x11b332[_0x2f78ff(0x106)]){_0x3b6ad3['set'](_0x12f3c4[_0x2f78ff(0xfa)],_0x12f3c4);}if(_0x3b6ad3[_0x2f78ff(0x104)]>=_0x11b332[_0x2f78ff(0xee)])break;if(_0x11b332[_0x2f78ff(0x106)][_0x2f78ff(0xf1)]===0x0||_0x3b6ad3[_0x2f78ff(0x104)]===_0x538f44)throw CliErrors[_0x2f78ff(0x109)](_0x2f78ff(0xf4)+_0x3b6ad3['size']+_0x2f78ff(0x105)+_0x11b332['totalCount']+_0x2f78ff(0x108));_0x359892+=0x1;}return{'totalCount':_0x11b332?.[_0x2f78ff(0xee)]??0x0,'physicalTableCount':_0x11b332?.['physicalTableCount']??0x0,'datasetTableCount':_0x11b332?.[_0x2f78ff(0xdb)]??0x0,..._0x11b332?.[_0x2f78ff(0xe9)]?{'summary':_0x11b332[_0x2f78ff(0xe9)]}:{},'tableList':[..._0x3b6ad3[_0x2f78ff(0xed)]()]};}
|
package/lib/commands/db/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x3e946c,_0x665bed){const _0x5ef74a=a86_0x52b0,_0x4c3798=_0x3e946c();while(!![]){try{const _0x1cd118=parseInt(_0x5ef74a(0x18d))/0x1*(-parseInt(_0x5ef74a(0x189))/0x2)+-parseInt(_0x5ef74a(0x18c))/0x3*(-parseInt(_0x5ef74a(0x18b))/0x4)+parseInt(_0x5ef74a(0x192))/0x5*(-parseInt(_0x5ef74a(0x190))/0x6)+parseInt(_0x5ef74a(0x18a))/0x7+parseInt(_0x5ef74a(0x18e))/0x8+parseInt(_0x5ef74a(0x191))/0x9+-parseInt(_0x5ef74a(0x188))/0xa*(-parseInt(_0x5ef74a(0x18f))/0xb);if(_0x1cd118===_0x665bed)break;else _0x4c3798['push'](_0x4c3798['shift']());}catch(_0x190690){_0x4c3798['push'](_0x4c3798['shift']());}}}(a86_0x123d,0xc25e2));import{dbList}from'../../commands/db/list.js';import{dbDetail}from'../../commands/db/detail.js';function a86_0x123d(){const _0x4a8fcc=['78AnFWXI','540886pHrVea','3601720yWlOvG','30261EeFBfY','30twKUHv','1075743NEEFky','784435KLePGI','1830ycGgjT','4GtIPAh','9885988VwEpBD','27212OIlmRY'];a86_0x123d=function(){return _0x4a8fcc;};return a86_0x123d();}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';function a86_0x52b0(_0x24c814,_0x3e6541){_0x24c814=_0x24c814-0x188;const _0x123dcd=a86_0x123d();let _0x52b053=_0x123dcd[_0x24c814];return _0x52b053;}export const dbDefinitions=[dbList,dbDetail,dbCreate,dbUpdate,dbDelete,dbTest,dbAnalyzeBatchPlan,dbAnalyzeStart,dbAnalyzeCancel,dbAnalyzeStatus,dbTables,dbDiff];
|
package/lib/commands/db/list.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
const a87_0x2eac95=a87_0x40dd;(function(_0x8b765b,_0x56c275){const _0x54780=a87_0x40dd,_0x3a5642=_0x8b765b();while(!![]){try{const _0x3746b4=-parseInt(_0x54780(0xb2))/0x1*(parseInt(_0x54780(0xbd))/0x2)+-parseInt(_0x54780(0xb7))/0x3+-parseInt(_0x54780(0xab))/0x4*(parseInt(_0x54780(0xb0))/0x5)+parseInt(_0x54780(0xbc))/0x6*(parseInt(_0x54780(0xb9))/0x7)+parseInt(_0x54780(0xb5))/0x8+parseInt(_0x54780(0xb4))/0x9*(-parseInt(_0x54780(0xa7))/0xa)+-parseInt(_0x54780(0xa8))/0xb*(-parseInt(_0x54780(0xb8))/0xc);if(_0x3746b4===_0x56c275)break;else _0x3a5642['push'](_0x3a5642['shift']());}catch(_0x2879ac){_0x3a5642['push'](_0x3a5642['shift']());}}}(a87_0x59a0,0xeeb44));import{listDbLinks}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL}from'../../commands/common/flags.js';function a87_0x40dd(_0x2c4c75,_0xd7ca7b){_0x2c4c75=_0x2c4c75-0xa7;const _0x59a0bc=a87_0x59a0();let _0x40dde9=_0x59a0bc[_0x2c4c75];return _0x40dde9;}import{sanitizeDbLinkList}from'../../commands/db/shared.js';function a87_0x59a0(){const _0x1fd0ed=['Page\x20size','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','10865754dBfWca','194576NblMXn','list','num','16370170WhIajc','250250putOff','Server\x20omitted\x20paging\x20metadata;\x20totalCount\x20is\x20unknown\x20—\x20rowsOnPage\x20is\x20this\x20page\x20only','Page\x20index\x20(1-based)','568644TwpkJc','length','page','number','pagesize','55qGaTsH','\x20database\x20connection(s)','4LERJVD','Found\x20','9gIuIqH','12959176UwfQWh','read','1640052aJQxue','888NhQXPw','7TiXusr'];a87_0x59a0=function(){return _0x1fd0ed;};return a87_0x59a0();}export const dbList={'service':'db','command':a87_0x2eac95(0xbe),'description':a87_0x2eac95(0xbb),'risk':a87_0x2eac95(0xb6),'flags':[APPCODE_FLAG_OPTIONAL,{'name':a87_0x2eac95(0xad),'type':a87_0x2eac95(0xae),'description':a87_0x2eac95(0xaa),'default':0x1},{'name':'pagesize','type':a87_0x2eac95(0xae),'description':a87_0x2eac95(0xba),'default':0x64}],async 'execute'(_0x2b3a19){const _0x3afa5d=a87_0x2eac95,_0x47f9d3=_0x2b3a19['num'](_0x3afa5d(0xad),0x1)||0x1,_0x55062d=_0x2b3a19[_0x3afa5d(0xbf)](_0x3afa5d(0xaf),0x64)||0x64,{items:_0x2d3307,paging:_0x804645}=await listDbLinks(_0x2b3a19['appCode'],{'currentPage':_0x47f9d3,'pageSize':_0x55062d}),_0x11dca4=sanitizeDbLinkList(_0x2d3307),_0x249c08=_0x804645?_0x804645:{'currentPage':_0x47f9d3,'pageSize':_0x55062d,'rowsOnPage':_0x11dca4[_0x3afa5d(0xac)],'totalCount':null,'note':_0x3afa5d(0xa9)};return{'ok':!![],'data':{'connections':_0x11dca4,'paging':_0x249c08},'message':_0x3afa5d(0xb3)+_0x11dca4[_0x3afa5d(0xac)]+_0x3afa5d(0xb1)};}};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* db 子命令共享:输出脱敏(凭据类字段不落盘到 AI 可读 JSON)。
|
|
3
|
+
*/
|
|
4
|
+
import type { DbLinkInfo } from "../../core/api-client.js";
|
|
5
|
+
/**
|
|
6
|
+
* 单条连接信息脱敏后返回(避免把明文凭据回传给 agent)。
|
|
7
|
+
*/
|
|
8
|
+
export declare function sanitizeDbLinkForOutput(link: DbLinkInfo | Record<string, unknown>): Record<string, unknown>;
|
|
9
|
+
export declare function sanitizeDbLinkList(items: DbLinkInfo[]): Record<string, unknown>[];
|
|
10
|
+
export declare function validateDbUrl(dbUrl: string): boolean;
|
|
11
|
+
export interface DbPageLinks {
|
|
12
|
+
databasePage: string;
|
|
13
|
+
erPage: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function buildDbPageLinks(appCode: string | undefined, dbLinkId: number | string | undefined): DbPageLinks | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(_0x5f9c97,_0x5c6df7){const _0x5095df=a88_0x4870,_0x4c1319=_0x5f9c97();while(!![]){try{const _0x59b762=-parseInt(_0x5095df(0xa0))/0x1+parseInt(_0x5095df(0x9c))/0x2+parseInt(_0x5095df(0x8b))/0x3*(parseInt(_0x5095df(0x90))/0x4)+-parseInt(_0x5095df(0x8f))/0x5+-parseInt(_0x5095df(0xa1))/0x6+parseInt(_0x5095df(0x91))/0x7*(parseInt(_0x5095df(0x9e))/0x8)+parseInt(_0x5095df(0x8c))/0x9;if(_0x59b762===_0x5c6df7)break;else _0x4c1319['push'](_0x4c1319['shift']());}catch(_0x5f4fed){_0x4c1319['push'](_0x4c1319['shift']());}}}(a88_0x6b90,0x28792));import{getAppBaseUrl}from'../../constant/domain.js';function shouldRedactKey(_0x5975c1){const _0x549586=a88_0x4870,_0xd9afea=_0x5975c1['toLowerCase']();if(_0xd9afea==='password'||_0xd9afea===_0x549586(0x8e)||_0xd9afea==='dbpassword')return!![];if(_0xd9afea[_0x549586(0x95)](_0x549586(0x97))||_0xd9afea[_0x549586(0x95)]('token')||_0xd9afea[_0x549586(0x95)]('credential'))return!![];if(_0xd9afea[_0x549586(0x95)](_0x549586(0xa2))||_0xd9afea[_0x549586(0x95)]('accesskey'))return!![];if(_0xd9afea===_0x549586(0x98)||_0xd9afea===_0x549586(0x8d)||_0xd9afea===_0x549586(0x9f))return!![];return![];}export function sanitizeDbLinkForOutput(_0x141947){const _0x455cbc=a88_0x4870,_0x24a9b6={..._0x141947};for(const _0x2fac48 of Object[_0x455cbc(0x94)](_0x24a9b6)){if(!shouldRedactKey(_0x2fac48))continue;const _0x4b890c=_0x24a9b6[_0x2fac48];_0x4b890c!=null&&String(_0x4b890c)[_0x455cbc(0x96)]>0x0&&(_0x24a9b6[_0x2fac48]=_0x455cbc(0x9b));}return _0x24a9b6;}function a88_0x4870(_0x1a9ad7,_0x4a9abb){_0x1a9ad7=_0x1a9ad7-0x89;const _0x6b9080=a88_0x6b90();let _0x487010=_0x6b9080[_0x1a9ad7];return _0x487010;}export function sanitizeDbLinkList(_0x21c96f){const _0x36eef2=a88_0x4870;return _0x21c96f[_0x36eef2(0x9d)](_0xa23311=>sanitizeDbLinkForOutput(_0xa23311));}const DB_URL_PATTERN=/^[^\s:]+(?::\d+)?$/;export function validateDbUrl(_0xf0202d){const _0x145bca=a88_0x4870,_0x238183=_0xf0202d['trim']();if(!_0x238183)return![];return DB_URL_PATTERN[_0x145bca(0x8a)](_0x238183);}function a88_0x6b90(){const _0x2e127c=['number','/data/er?dbId=','[redacted]','231712WyeRIl','map','1576PpCzHf','jdbcurl','32020YWvXzG','432798iVKiXk','privatekey','/data/database','test','52971jDhxHD','512370ePnHCO','connectionstring','passwd','1175675ArRVzh','68qaXglP','1141IYINkl','isFinite','trim','keys','includes','length','secret','authorization'];a88_0x6b90=function(){return _0x2e127c;};return a88_0x6b90();}export function buildDbPageLinks(_0x32ac8d,_0x24bc7b){const _0x1ea0fc=a88_0x4870,_0x52b588=_0x32ac8d?.[_0x1ea0fc(0x93)]();if(!_0x52b588)return undefined;const _0x3ae9ea=typeof _0x24bc7b===_0x1ea0fc(0x99)?String(_0x24bc7b):String(_0x24bc7b??'')[_0x1ea0fc(0x93)]();if(!_0x3ae9ea)return undefined;const _0x41174d=Number(_0x3ae9ea);if(!Number[_0x1ea0fc(0x92)](_0x41174d)||_0x41174d<=0x0)return undefined;const _0x28ecf5=getAppBaseUrl(_0x52b588),_0x27414d=encodeURIComponent(String(_0x41174d));return{'databasePage':_0x28ecf5+_0x1ea0fc(0x89),'erPage':_0x28ecf5+_0x1ea0fc(0x9a)+_0x27414d};}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const
|
|
1
|
+
function a89_0x45ae(_0x5538b4,_0x28883b){_0x5538b4=_0x5538b4-0x120;const _0x46d006=a89_0x46d0();let _0x45ae3f=_0x46d006[_0x5538b4];return _0x45ae3f;}function a89_0x46d0(){const _0x16a332=['56238EoDGIK','78qjDfcD','88DvZgiV','List\x20physical\x20tables\x20for\x20a\x20database\x20connection\x20(tags\x20show\x20analysis\x20state\x20vs\x20schema\x20drift)','293737RxrHdT','\x20table(s)\x20on\x20db\x20link\x20','3866040irLHVU','4672256ZTYNlA','appCode','2191749krsyny','354396XFFUFe','35LYiPfp','2LIjdUF','length','3699990fUIfUu','tables'];a89_0x46d0=function(){return _0x16a332;};return a89_0x46d0();}const a89_0x2261cf=a89_0x45ae;(function(_0xc55679,_0x34ccc3){const _0xe89c9d=a89_0x45ae,_0xabb6ec=_0xc55679();while(!![]){try{const _0x4e264a=-parseInt(_0xe89c9d(0x120))/0x1+-parseInt(_0xe89c9d(0x128))/0x2*(parseInt(_0xe89c9d(0x125))/0x3)+parseInt(_0xe89c9d(0x126))/0x4*(-parseInt(_0xe89c9d(0x127))/0x5)+-parseInt(_0xe89c9d(0x12d))/0x6*(-parseInt(_0xe89c9d(0x12c))/0x7)+-parseInt(_0xe89c9d(0x123))/0x8+-parseInt(_0xe89c9d(0x122))/0x9+parseInt(_0xe89c9d(0x12a))/0xa*(parseInt(_0xe89c9d(0x12e))/0xb);if(_0x4e264a===_0x34ccc3)break;else _0xabb6ec['push'](_0xabb6ec['shift']());}catch(_0x394f8c){_0xabb6ec['push'](_0xabb6ec['shift']());}}}(a89_0x46d0,0x63339));import{getDbAllTableList}from'../../core/api-client.js';import{APPCODE_FLAG_OPTIONAL,DBLINK_ID_FLAG}from'../../commands/common/flags.js';export const dbTables={'service':'db','command':a89_0x2261cf(0x12b),'description':a89_0x2261cf(0x12f),'risk':'read','flags':[DBLINK_ID_FLAG,APPCODE_FLAG_OPTIONAL],async 'execute'(_0x591672){const _0x55b800=a89_0x2261cf,_0x38841c=_0x591672['num']('id'),_0x1cf962=await getDbAllTableList(_0x591672[_0x55b800(0x124)],_0x38841c);return{'ok':!![],'data':{'dbLinkId':_0x38841c,'total':_0x1cf962[_0x55b800(0x129)],'tables':_0x1cf962},'message':_0x1cf962[_0x55b800(0x129)]+_0x55b800(0x121)+_0x38841c};}};
|